/*! For license information please see extension.js.LICENSE.txt */ (()=>{var e,t={8452:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Feedback=void 0,(n=t.Feedback||(t.Feedback={})).UP_VOTE="up_vote",n.DOWN_VOTE="down_vote",n.FLAG_OFFENSIVE="flag_offensive",n.FLAG_INSECURE="flag_insecure",n.FLAG_DEPRECATED="flag_deprecated",n.FLAG_OTHER="flag_other"},9556:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingService=t.LogLevel=void 0,function(e){e[e.ALL=0]="ALL",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.FATAL=5]="FATAL",e[e.OFF=6]="OFF"}(n=t.LogLevel||(t.LogLevel={})),t.LoggingService=class{constructor(e,t){this.logWriter=e,this.logLevel=t}debug(e){this.write(e,n.DEBUG)}info(e){this.write(e,n.INFO)}warn(e){this.write(e,n.WARN)}error(e){this.write(e,n.ERROR)}fatal(e){this.write(e,n.FATAL)}write(e,t){t>=this.logLevel&&this.logWriter(e)}}},3419:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelNodeType=t.ServiceVersion=void 0,(r=t.ServiceVersion||(t.ServiceVersion={}))[r.V1=0]="V1",(n=t.ModelNodeType||(t.ModelNodeType={})).ApiFunctionName="api_function_name",n.ApiFunctionFullSignature="api_function_full_signature"},9754:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingService=t.LogLevel=t.ServiceVersion=t.Feedback=void 0;const r=n(8452);Object.defineProperty(t,"Feedback",{enumerable:!0,get:function(){return r.Feedback}});const i=n(3419);Object.defineProperty(t,"ServiceVersion",{enumerable:!0,get:function(){return i.ServiceVersion}});const a=n(9556);Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function(){return a.LogLevel}}),Object.defineProperty(t,"LoggingService",{enumerable:!0,get:function(){return a.LoggingService}})},9877:(e,t,n)=>{var r,i=Object.create,a=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,m=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))p.call(t,n)&&m(e,n,t[n]);if(d)for(var n of d(t))_.call(t,n)&&m(e,n,t[n]);return e},h=(e,t)=>o(e,l(t)),E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),f=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of c(t))!p.call(e,i)&&i!==n&&a(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},S=(e,t,n)=>(n=null!=e?i(u(e)):{},f(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)),b=E(((e,t)=>{"use strict";var n=function(){function e(){}return e.info=function(t){for(var n=[],r=1;r{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{var n;e=t.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],a=e.src=[],o=0,s=o++;a[s]="0|[1-9]\\d*";var l=o++;a[l]="[0-9]+";var c=o++;a[c]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=o++;a[d]="("+a[s]+")\\.("+a[s]+")\\.("+a[s]+")";var u=o++;a[u]="("+a[l]+")\\.("+a[l]+")\\.("+a[l]+")";var p=o++;a[p]="(?:"+a[s]+"|"+a[c]+")";var _=o++;a[_]="(?:"+a[l]+"|"+a[c]+")";var m=o++;a[m]="(?:-("+a[p]+"(?:\\."+a[p]+")*))";var g=o++;a[g]="(?:-?("+a[_]+"(?:\\."+a[_]+")*))";var h=o++;a[h]="[0-9A-Za-z-]+";var E=o++;a[E]="(?:\\+("+a[h]+"(?:\\."+a[h]+")*))";var f=o++,S="v?"+a[d]+a[m]+"?"+a[E]+"?";a[f]="^"+S+"$";var b="[v=\\s]*"+a[u]+a[g]+"?"+a[E]+"?",v=o++;a[v]="^"+b+"$";var T=o++;a[T]="((?:<|>)?=?)";var y=o++;a[y]=a[l]+"|x|X|\\*";var C=o++;a[C]=a[s]+"|x|X|\\*";var R=o++;a[R]="[v=\\s]*("+a[C]+")(?:\\.("+a[C]+")(?:\\.("+a[C]+")(?:"+a[m]+")?"+a[E]+"?)?)?";var O=o++;a[O]="[v=\\s]*("+a[y]+")(?:\\.("+a[y]+")(?:\\.("+a[y]+")(?:"+a[g]+")?"+a[E]+"?)?)?";var N=o++;a[N]="^"+a[T]+"\\s*"+a[R]+"$";var I=o++;a[I]="^"+a[T]+"\\s*"+a[O]+"$";var A=o++;a[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=o++;a[D]="(?:~>?)";var w=o++;a[w]="(\\s*)"+a[D]+"\\s+",i[w]=new RegExp(a[w],"g");var x=o++;a[x]="^"+a[D]+a[R]+"$";var P=o++;a[P]="^"+a[D]+a[O]+"$";var M=o++;a[M]="(?:\\^)";var L=o++;a[L]="(\\s*)"+a[M]+"\\s+",i[L]=new RegExp(a[L],"g");var k=o++;a[k]="^"+a[M]+a[R]+"$";var F=o++;a[F]="^"+a[M]+a[O]+"$";var U=o++;a[U]="^"+a[T]+"\\s*("+b+")$|^$";var B=o++;a[B]="^"+a[T]+"\\s*("+S+")$|^$";var G=o++;a[G]="(\\s*)"+a[T]+"\\s*("+b+"|"+a[R]+")",i[G]=new RegExp(a[G],"g");var q=o++;a[q]="^\\s*("+a[R]+")\\s+-\\s+("+a[R]+")\\s*$";var H=o++;a[H]="^\\s*("+a[O]+")\\s+-\\s+("+a[O]+")\\s*$";var Y,j=o++;for(a[j]="(<|>)?=?\\s*\\*",Y=0;Y<35;Y++)n(Y,a[Y]),i[Y]||(i[Y]=new RegExp(a[Y]));function V(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[v]:i[f]).test(e))return null;try{return new $(e,t)}catch{return null}}function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var a=e.trim().match(t.loose?i[v]:i[f]);if(!a)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new $(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=V(e),r=V(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var a="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==r[o])return i+o;return a},e.compareIdentifiers=W;var z=/^[0-9]+$/;function W(e,t){var n=z.test(e),r=z.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return K(e,t,n)<0}function Z(e,t,n){return 0===K(e,t,n)}function J(e,t,n){return 0!==K(e,t,n)}function ee(e,t,n){return K(e,t,n)>=0}function te(e,t,n){return K(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Z(e,n,r);case"!=":return J(e,n,r);case">":return Q(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return W(t,e)},e.major=function(e,t){return new $(e,t).major},e.minor=function(e,t){return new $(e,t).minor},e.patch=function(e,t){return new $(e,t).patch},e.compare=K,e.compareLoose=function(e,t){return K(e,t,!0)},e.rcompare=function(e,t,n){return K(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Q,e.lt=X,e.eq=Z,e.neq=J,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function ae(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ae)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new ae(e.raw,t);if(e instanceof re)return new ae(e.value,t);if(!(this instanceof ae))return new ae(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function oe(e){return!e||"x"===e.toLowerCase()||"*"===e}function se(e,t,n,r,i,a,o,s,l,c,d,u,p){return((t=oe(n)?"":oe(r)?">="+n+".0.0":oe(i)?">="+n+"."+r+".0":">="+t)+" "+(s=oe(l)?"":oe(c)?"<"+(+l+1)+".0.0":oe(d)?"<"+l+"."+(+c+1)+".0":u?"<="+l+"."+c+"."+d+"-"+u:"<="+s)).trim()}function le(e,t,r){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function ce(e,t,n){try{t=new ae(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,a,o,s,l;switch(e=new $(e,r),t=new ae(t,r),n){case">":i=Q,a=te,o=X,s=">",l=">=";break;case"<":i=X,a=ee,o=Q,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ce(e,t,r))return!1;for(var c=0;c=0.0.0")),u=u||e,p=p||e,i(e.semver,u.semver,r)?u=e:o(e.semver,p.semver,r)&&(p=e)})),u.operator===s||u.operator===l||(!p.operator||p.operator===s)&&a(e,p.semver))return!1;if(p.operator===l&&o(e,p.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[U]:i[B],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new $(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new ae(e.value,t),ce(this.value,n,t);if(""===e.operator)return n=new ae(this.value,t),ce(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||a&&o||s||l},e.Range=ae,ae.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},ae.prototype.toString=function(){return this.range},ae.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[H]:i[q];e=e.replace(r,se),n("hyphen replace",e),e=e.replace(i[G],"$1$2$3"),n("comparator trim",e,i[G]),e=(e=(e=e.replace(i[w],"$1~")).replace(i[L],"$1^")).split(/\s+/).join(" ");var a=t?i[U]:i[B],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[F]:i[k];return e.replace(r,(function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),oe(r)?s="":oe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":oe(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+"-"+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[P]:i[x];return e.replace(r,(function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),oe(r)?s="":oe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":oe(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),s=">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[I]:i[N];return e.replace(r,(function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var l=oe(i),c=l||oe(a),d=c||oe(o);return"="===r&&d&&(r=""),l?t=">"===r||"<"===r?"<0.0.0":"*":r&&d?(c&&(a=0),o=0,">"===r?(r=">=",c?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":d&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[j],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(a)}))),o.map((function(e){return new re(e,this.options)}),this)},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new ae(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},ae.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Q(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new ae(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=V(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new ae(e,n),t=new ae(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:V(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),y=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makePatchingRequire=void 0;var t=n(1017),r=T(),i=n(8188),a=Object.keys(process.binding("natives")),o=i.prototype.require;e.makePatchingRequire=function(e){var n={};return function(s){var l=o.apply(this,arguments);if(e[s]){var c=i._resolveFilename(s,this);if(n.hasOwnProperty(c))return n[c];var d=void 0;if(a.indexOf(s)<0)try{d=o.call(this,t.join(s,"package.json")).version}catch{return l}else d=process.version.substring(1);var u=d.indexOf("-");u>=0&&(d=d.substring(0,u));for(var p=l,_=0,m=e[s];_{t.exports={name:"diagnostic-channel",version:"1.0.0",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"tslint -c tslint.json -p tsconfig.json",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^5.3.0"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",tslint:"^5.0.0",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}})),R=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.channel=e.makePatchingRequire=void 0;var t=y(),r=y();Object.defineProperty(e,"makePatchingRequire",{enumerable:!0,get:function(){return r.makePatchingRequire}});var i=function(e){return!0},a=function(){function e(){this.version=C().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var r={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,n.forEach((function(e){var t=e.listener,n=e.filter;try{n&&n(!0)&&t(r)}catch{}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,n){void 0===n&&(n=i),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:n})},e.prototype.unsubscribe=function(e,t,n){void 0===n&&(n=i);var r=this.subscribers[e];if(r)for(var a=0;a{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),N=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._globalThis=void 0,e._globalThis="object"==typeof globalThis?globalThis:global})),I=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(N(),e)})),A=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(I(),e)})),D=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.0.3"})),w=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompatible=e._makeCompatibilityCheck=void 0;var t=D(),n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function r(e){var t=new Set([e]),r=new Set,i=e.match(n);if(!i)return function(){return!1};var a=+i[1],o=+i[2],s=+i[3];if(null!=i[4])return function(t){return t===e};function l(e){return r.add(e),!1}function c(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var i=e.match(n);if(!i)return l(e);var d=+i[1],u=+i[2],p=+i[3];return null!=i[4]||a!==d?l(e):0===a?o===u&&s<=p?c(e):l(e):o<=u?c(e):l(e)}}e._makeCompatibilityCheck=r,e.isCompatible=r(t.VERSION)})),x=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unregisterGlobal=e.getGlobal=e.registerGlobal=void 0;var t=A(),n=D(),r=w(),i=n.VERSION.split(".")[0],a=Symbol.for("opentelemetry.js.api."+i),o=t._globalThis;e.registerGlobal=function(e,t,r,i){var s;void 0===i&&(i=!1);var l=o[a]=null!==(s=o[a])&&void 0!==s?s:{version:n.VERSION};if(!i&&l[e]){var c=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(c.stack||c.message),!1}return l.version!==n.VERSION?(c=new Error("@opentelemetry/api: All API registration versions must match"),r.error(c.stack||c.message),!1):(l[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+n.VERSION+"."),!0)},e.getGlobal=function(e){var t,n,i=null===(t=o[a])||void 0===t?void 0:t.version;if(i&&r.isCompatible(i))return null===(n=o[a])||void 0===n?void 0:n[e]},e.unregisterGlobal=function(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+n.VERSION+".");var r=o[a];r&&delete r[e]}})),P=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagComponentLogger=void 0;var t=x(),n=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiagLogLevel=void 0,(t=e.DiagLogLevel||(e.DiagLogLevel={}))[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})),L=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogLevelDiagLogger=void 0;var t=M();e.createLogLevelDiagLogger=function(e,n){function r(t,r){var i=n[t];return"function"==typeof i&&e>=r?i.bind(n):function(){}}return et.DiagLogLevel.ALL&&(e=t.DiagLogLevel.ALL),n=n||{},{error:r("error",t.DiagLogLevel.ERROR),warn:r("warn",t.DiagLogLevel.WARN),info:r("info",t.DiagLogLevel.INFO),debug:r("debug",t.DiagLogLevel.DEBUG),verbose:r("verbose",t.DiagLogLevel.VERBOSE)}}})),k=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagAPI=void 0;var t=P(),n=L(),r=M(),i=x(),a=function(){function e(){function e(e){return function(){var t=i.getGlobal("diag");if(t)return t[e].apply(t,arguments)}}var a=this;a.setLogger=function(e,t){var o,s;if(void 0===t&&(t=r.DiagLogLevel.INFO),e===a){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return a.error(null!==(o=l.stack)&&void 0!==o?o:l.message),!1}var c=i.getGlobal("diag"),d=n.createLogLevelDiagLogger(t,e);if(c){var u=null!==(s=(new Error).stack)&&void 0!==s?s:"";c.warn("Current logger will be overwritten from "+u),d.warn("Current logger will overwrite one already registered from "+u)}return i.registerGlobal("diag",d,a,!0)},a.disable=function(){i.unregisterGlobal("diag",a)},a.createComponentLogger=function(e){return new t.DiagComponentLogger(e)},a.verbose=e("verbose"),a.debug=e("debug"),a.info=e("info"),a.warn=e("warn"),a.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();e.DiagAPI=a})),F=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaggageImpl=void 0;var t=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){return[e[0],e[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t=[],n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataSymbol=void 0,e.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")})),B=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataFromString=e.createBaggage=void 0;var t=k(),n=F(),r=U(),i=t.DiagAPI.instance();e.createBaggage=function(e){return void 0===e&&(e={}),new n.BaggageImpl(new Map(Object.entries(e)))},e.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(i.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:r.baggageEntryMetadataSymbol,toString:function(){return e}}}})),G=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),q=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),H=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagConsoleLogger=void 0;var t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];e.DiagConsoleLogger=function(){function e(e){return function(){var t=arguments;if(console){var n=console[e];if("function"!=typeof n&&(n=console.log),"function"==typeof n)return n.apply(console,t)}}}for(var n=0;n{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(H(),e),n(M(),e)})),j=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTextMapSetter=e.defaultTextMapGetter=void 0,e.defaultTextMapGetter={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},e.defaultTextMapSetter={set:function(e,t,n){null!=e&&(e[t]=n)}}})),V=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),$=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),z=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ROOT_CONTEXT=e.createContextKey=void 0,e.createContextKey=function(e){return Symbol.for(e)};e.ROOT_CONTEXT=new function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}})),W=E((e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TraceFlags=void 0,(t=e.TraceFlags||(e.TraceFlags={}))[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})),X=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=void 0;var t=Q();e.INVALID_SPANID="0000000000000000",e.INVALID_TRACEID="00000000000000000000000000000000",e.INVALID_SPAN_CONTEXT={traceId:e.INVALID_TRACEID,spanId:e.INVALID_SPANID,traceFlags:t.TraceFlags.NONE}})),Z=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NonRecordingSpan=void 0;var t=X(),n=function(){function e(e){void 0===e&&(e=t.INVALID_SPAN_CONTEXT),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}();e.NonRecordingSpan=n})),J=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSpanContext=e.setSpanContext=e.deleteSpan=e.setSpan=e.getSpan=void 0;var t=z(),n=Z(),r=t.createContextKey("OpenTelemetry Context Key SPAN");function i(e){return e.getValue(r)||void 0}function a(e,t){return e.setValue(r,t)}e.getSpan=i,e.setSpan=a,e.deleteSpan=function(e){return e.deleteValue(r)},e.setSpanContext=function(e,t){return a(e,new n.NonRecordingSpan(t))},e.getSpanContext=function(e){var t;return null===(t=i(e))||void 0===t?void 0:t.spanContext()}})),ee=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSpanContext=e.isSpanContextValid=e.isValidSpanId=e.isValidTraceId=void 0;var t=X(),n=Z(),r=/^([0-9a-f]{32})$/i,i=/^[0-9a-f]{16}$/i;function a(e){return r.test(e)&&e!==t.INVALID_TRACEID}function o(e){return i.test(e)&&e!==t.INVALID_SPANID}e.isValidTraceId=a,e.isValidSpanId=o,e.isSpanContextValid=function(e){return a(e.traceId)&&o(e.spanId)},e.wrapSpanContext=function(e){return new n.NonRecordingSpan(e)}})),te=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracer=void 0;var t=K(),n=J(),r=Z(),i=ee(),a=t.ContextAPI.getInstance(),o=function(){function e(){}return e.prototype.startSpan=function(e,t,a){if(Boolean(null==t?void 0:t.root))return new r.NonRecordingSpan;var o=a&&n.getSpanContext(a);return function(e){return"object"==typeof e&&"string"==typeof e.spanId&&"string"==typeof e.traceId&&"number"==typeof e.traceFlags}(o)&&i.isSpanContextValid(o)?new r.NonRecordingSpan(o):new r.NonRecordingSpan},e.prototype.startActiveSpan=function(e,t,r,i){var o,s,l;if(!(arguments.length<2)){2===arguments.length?l=t:3===arguments.length?(o=t,l=r):(o=t,s=r,l=i);var c=s??a.active(),d=this.startSpan(e,o,c),u=n.setSpan(c,d);return a.with(u,l,void 0,d)}},e}();e.NoopTracer=o})),ne=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracer=void 0;var t=new(te().NoopTracer),n=function(){function e(e,t,n){this._provider=e,this.name=t,this.version=n}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version);return e?(this._delegate=e,this._delegate):t},e}();e.ProxyTracer=n})),re=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracerProvider=void 0;var t=te(),n=function(){function e(){}return e.prototype.getTracer=function(e,n){return new t.NoopTracer},e}();e.NoopTracerProvider=n})),ie=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracerProvider=void 0;var t=ne(),n=new(re().NoopTracerProvider),r=function(){function e(){}return e.prototype.getTracer=function(e,n){var r;return null!==(r=this.getDelegateTracer(e,n))&&void 0!==r?r:new t.ProxyTracer(this,e,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:n},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t)},e}();e.ProxyTracerProvider=r})),ae=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),oe=E((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SamplingDecision=void 0,(t=e.SamplingDecision||(e.SamplingDecision={}))[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})),se=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),le=E((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanKind=void 0,(t=e.SpanKind||(e.SpanKind={}))[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})),ce=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),de=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ue=E((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanStatusCode=void 0,(t=e.SpanStatusCode||(e.SpanStatusCode={}))[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})),pe=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),_e=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),me=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ge=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),he=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceAPI=void 0;var t=x(),n=ie(),r=ee(),i=J(),a=k(),o="trace",s=function(){function e(){this._proxyTracerProvider=new n.ProxyTracerProvider,this.wrapSpanContext=r.wrapSpanContext,this.isSpanContextValid=r.isSpanContextValid,this.deleteSpan=i.deleteSpan,this.getSpan=i.getSpan,this.getSpanContext=i.getSpanContext,this.setSpan=i.setSpan,this.setSpanContext=i.setSpanContext}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var n=t.registerGlobal(o,this._proxyTracerProvider,a.DiagAPI.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},e.prototype.getTracerProvider=function(){return t.getGlobal(o)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){t.unregisterGlobal(o,a.DiagAPI.instance()),this._proxyTracerProvider=new n.ProxyTracerProvider},e}();e.TraceAPI=s})),Ee=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTextMapPropagator=void 0;var t=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}();e.NoopTextMapPropagator=t})),fe=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteBaggage=e.setBaggage=e.getBaggage=void 0;var t=z().createContextKey("OpenTelemetry Baggage Key");e.getBaggage=function(e){return e.getValue(t)||void 0},e.setBaggage=function(e,n){return e.setValue(t,n)},e.deleteBaggage=function(e){return e.deleteValue(t)}})),Se=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropagationAPI=void 0;var t=x(),n=Ee(),r=j(),i=fe(),a=B(),o=k(),s="propagation",l=new n.NoopTextMapPropagator,c=function(){function e(){this.createBaggage=a.createBaggage,this.getBaggage=i.getBaggage,this.setBaggage=i.setBaggage,this.deleteBaggage=i.deleteBaggage}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return t.registerGlobal(s,e,o.DiagAPI.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=r.defaultTextMapSetter),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=r.defaultTextMapGetter),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){t.unregisterGlobal(s,o.DiagAPI.instance())},e.prototype._getGlobalPropagator=function(){return t.getGlobal(s)||l},e}();e.PropagationAPI=c})),be=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.diag=e.propagation=e.trace=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.baggageEntryMetadataFromString=void 0,n(O(),e);var r=B();Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return r.baggageEntryMetadataFromString}}),n(G(),e),n(q(),e),n(Y(),e),n(j(),e),n(V(),e),n($(),e),n(ne(),e),n(ie(),e),n(ae(),e),n(oe(),e),n(se(),e),n(le(),e),n(ce(),e),n(de(),e),n(ue(),e),n(Q(),e),n(pe(),e),n(_e(),e),n(me(),e);var i=ee();Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return i.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return i.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return i.isValidSpanId}});var a=X();Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return a.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return a.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return a.INVALID_SPAN_CONTEXT}}),n(z(),e),n(ge(),e);var o=K();e.context=o.ContextAPI.getInstance();var s=he();e.trace=s.TraceAPI.getInstance();var l=Se();e.propagation=l.PropagationAPI.getInstance();var c=k();e.diag=c.DiagAPI.instance(),e.default={trace:e.trace,context:e.context,propagation:e.propagation,diag:e.diag}})),ve=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTracingSuppressed=e.unsuppressTracing=e.suppressTracing=void 0;var t=be().createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");e.suppressTracing=function(e){return e.setValue(t,!0)},e.unsuppressTracing=function(e){return e.deleteValue(t)},e.isTracingSuppressed=function(e){return!0===e.getValue(t)}})),Te=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BAGGAGE_MAX_TOTAL_LENGTH=e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=e.BAGGAGE_MAX_NAME_VALUE_PAIRS=e.BAGGAGE_HEADER=e.BAGGAGE_ITEMS_SEPARATOR=e.BAGGAGE_PROPERTIES_SEPARATOR=e.BAGGAGE_KEY_PAIR_SEPARATOR=void 0,e.BAGGAGE_KEY_PAIR_SEPARATOR="=",e.BAGGAGE_PROPERTIES_SEPARATOR=";",e.BAGGAGE_ITEMS_SEPARATOR=",",e.BAGGAGE_HEADER="baggage",e.BAGGAGE_MAX_NAME_VALUE_PAIRS=180,e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096,e.BAGGAGE_MAX_TOTAL_LENGTH=8192})),ye=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseKeyPairsIntoRecord=e.parsePairKeyValue=e.getKeyPairs=e.serializeKeyPairs=void 0;var t=be(),n=Te();e.serializeKeyPairs=e=>e.reduce(((e,t)=>{let r=`${e}${""!==e?n.BAGGAGE_ITEMS_SEPARATOR:""}${t}`;return r.length>n.BAGGAGE_MAX_TOTAL_LENGTH?e:r}),""),e.getKeyPairs=e=>e.getAllEntries().map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`)),e.parsePairKeyValue=e=>{let r=e.split(n.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let i=r.shift();if(!i)return;let a=i.split(n.BAGGAGE_KEY_PAIR_SEPARATOR);if(2!==a.length)return;let o,s=decodeURIComponent(a[0].trim()),l=decodeURIComponent(a[1].trim());return r.length>0&&(o=t.baggageEntryMetadataFromString(r.join(n.BAGGAGE_PROPERTIES_SEPARATOR))),{key:s,value:l,metadata:o}},e.parseKeyPairsIntoRecord=t=>"string"!=typeof t||0===t.length?{}:t.split(n.BAGGAGE_ITEMS_SEPARATOR).map((t=>e.parsePairKeyValue(t))).filter((e=>void 0!==e&&e.value.length>0)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})})),Ce=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpBaggagePropagator=void 0;var t=be(),n=ve(),r=Te(),i=ye();e.HttpBaggagePropagator=class{inject(e,a,o){let s=t.propagation.getBaggage(e);if(!s||n.isTracingSuppressed(e))return;let l=i.getKeyPairs(s).filter((e=>e.length<=r.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS)).slice(0,r.BAGGAGE_MAX_NAME_VALUE_PAIRS),c=i.serializeKeyPairs(l);c.length>0&&o.set(a,r.BAGGAGE_HEADER,c)}extract(e,n,a){let o=a.get(n,r.BAGGAGE_HEADER);if(!o)return e;let s={};return 0===o.length||(o.split(r.BAGGAGE_ITEMS_SEPARATOR).forEach((e=>{let t=i.parsePairKeyValue(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),s[t.key]=e}})),0===Object.entries(s).length)?e:t.propagation.setBaggage(e,t.propagation.createBaggage(s))}fields(){return[r.BAGGAGE_HEADER]}}})),Re=E((e=>{"use strict";function t(e){return null==e||(Array.isArray(e)?function(e){let t;for(let r of e)if(null!=r){if(!t){if(n(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}(e):n(e))}function n(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.isAttributeValue=e.sanitizeAttributes=void 0,e.sanitizeAttributes=function(e){let n={};if(null==e||"object"!=typeof e)return n;for(let[r,i]of Object.entries(e))t(i)&&(Array.isArray(i)?n[r]=i.slice():n[r]=i);return n},e.isAttributeValue=t})),Oe=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loggingErrorHandler=void 0;var t=be();e.loggingErrorHandler=function(){return e=>{t.diag.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){let t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach((e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}})),Ne=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalErrorHandler=e.setGlobalErrorHandler=void 0;var t=Oe().loggingErrorHandler();e.setGlobalErrorHandler=function(e){t=e},e.globalErrorHandler=e=>{try{t(e)}catch{}}})),Ie=E((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TracesSamplerValues=void 0,(t=e.TracesSamplerValues||(e.TracesSamplerValues={})).AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})),Ae=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEnvironment=e.DEFAULT_ENVIRONMENT=void 0;var t=be(),n=Ie(),r=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT"];function i(e){return r.indexOf(e)>-1}var a=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function o(e){return a.indexOf(e)>-1}function s(e,t,n,r=-1/0,i=1/0){if(typeof n[e]<"u"){let a=Number(n[e]);isNaN(a)||(t[e]=ai?i:a)}}function l(e,t,n,r=","){let i=n[e];"string"==typeof i&&(t[e]=i.split(r).map((e=>e.trim())))}e.DEFAULT_ENVIRONMENT={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:t.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"none",OTEL_TRACES_SAMPLER:n.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:""};var c={ALL:t.DiagLogLevel.ALL,VERBOSE:t.DiagLogLevel.VERBOSE,DEBUG:t.DiagLogLevel.DEBUG,INFO:t.DiagLogLevel.INFO,WARN:t.DiagLogLevel.WARN,ERROR:t.DiagLogLevel.ERROR,NONE:t.DiagLogLevel.NONE};function d(e,t,n){let r=n[e];if("string"==typeof r){let n=c[r.toUpperCase()];null!=n&&(t[e]=n)}}e.parseEnvironment=function(t){let n={};for(let r in e.DEFAULT_ENVIRONMENT){let e=r;if("OTEL_LOG_LEVEL"===e)d(e,n,t);else if(i(e))s(e,n,t);else if(o(e))l(e,n,t);else{let r=t[e];typeof r<"u"&&null!==r&&(n[e]=String(r))}}return n}})),De=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=void 0;var t=n(2037),r=Ae();e.getEnv=function(){let e=r.parseEnvironment(process.env);return Object.assign({HOSTNAME:t.hostname()},r.DEFAULT_ENVIRONMENT,e)}})),we=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBase64=void 0,e.hexToBase64=function(e){let t=e.length,n="";for(let r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomIdGenerator=void 0,e.RandomIdGenerator=class{constructor(){this.generateTraceId=n(16),this.generateSpanId=n(8)}};var t=Buffer.allocUnsafe(16);function n(e){return function(){for(let n=0;n>>0,4*n);for(let n=0;n0);n++)n===e-1&&(t[e-1]=1);return t.toString("hex",0,e)}}})),Pe=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.otperformance=void 0;var t=n(4074);e.otperformance=t.performance})),Me=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="0.23.0"})),Le=E((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RpcGrpcStatusCodeValues=e.MessagingOperationValues=e.MessagingDestinationKindValues=e.HttpFlavorValues=e.NetTransportValues=e.FaasInvokedProviderValues=e.FaasDocumentOperationValues=e.FaasTriggerValues=e.DbCassandraConsistencyLevelValues=e.DbSystemValues=e.SemanticAttributes=void 0,e.SemanticAttributes={DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_METHOD:"rpc.jsonrpc.method",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message"},(t=e.DbSystemValues||(e.DbSystemValues={})).OTHER_SQL="other_sql",t.MSSQL="mssql",t.MYSQL="mysql",t.ORACLE="oracle",t.DB2="db2",t.POSTGRESQL="postgresql",t.REDSHIFT="redshift",t.HIVE="hive",t.CLOUDSCAPE="cloudscape",t.HSQLDB="hsqldb",t.PROGRESS="progress",t.MAXDB="maxdb",t.HANADB="hanadb",t.INGRES="ingres",t.FIRSTSQL="firstsql",t.EDB="edb",t.CACHE="cache",t.ADABAS="adabas",t.FIREBIRD="firebird",t.DERBY="derby",t.FILEMAKER="filemaker",t.INFORMIX="informix",t.INSTANTDB="instantdb",t.INTERBASE="interbase",t.MARIADB="mariadb",t.NETEZZA="netezza",t.PERVASIVE="pervasive",t.POINTBASE="pointbase",t.SQLITE="sqlite",t.SYBASE="sybase",t.TERADATA="teradata",t.VERTICA="vertica",t.H2="h2",t.COLDFUSION="coldfusion",t.CASSANDRA="cassandra",t.HBASE="hbase",t.MONGODB="mongodb",t.REDIS="redis",t.COUCHBASE="couchbase",t.COUCHDB="couchdb",t.COSMOSDB="cosmosdb",t.DYNAMODB="dynamodb",t.NEO4J="neo4j",t.GEODE="geode",t.ELASTICSEARCH="elasticsearch",t.MEMCACHED="memcached",t.COCKROACHDB="cockroachdb",function(e){e.ALL="all",e.EACH_QUORUM="each_quorum",e.QUORUM="quorum",e.LOCAL_QUORUM="local_quorum",e.ONE="one",e.TWO="two",e.THREE="three",e.LOCAL_ONE="local_one",e.ANY="any",e.SERIAL="serial",e.LOCAL_SERIAL="local_serial"}(e.DbCassandraConsistencyLevelValues||(e.DbCassandraConsistencyLevelValues={})),function(e){e.DATASOURCE="datasource",e.HTTP="http",e.PUBSUB="pubsub",e.TIMER="timer",e.OTHER="other"}(e.FaasTriggerValues||(e.FaasTriggerValues={})),function(e){e.INSERT="insert",e.EDIT="edit",e.DELETE="delete"}(e.FaasDocumentOperationValues||(e.FaasDocumentOperationValues={})),function(e){e.AWS="aws",e.AZURE="azure",e.GCP="gcp"}(e.FaasInvokedProviderValues||(e.FaasInvokedProviderValues={})),function(e){e.IP_TCP="ip_tcp",e.IP_UDP="ip_udp",e.IP="ip",e.UNIX="unix",e.PIPE="pipe",e.INPROC="inproc",e.OTHER="other"}(e.NetTransportValues||(e.NetTransportValues={})),function(e){e.HTTP_1_0="1.0",e.HTTP_1_1="1.1",e.HTTP_2_0="2.0",e.SPDY="SPDY",e.QUIC="QUIC"}(e.HttpFlavorValues||(e.HttpFlavorValues={})),function(e){e.QUEUE="queue",e.TOPIC="topic"}(e.MessagingDestinationKindValues||(e.MessagingDestinationKindValues={})),function(e){e.RECEIVE="receive",e.PROCESS="process"}(e.MessagingOperationValues||(e.MessagingOperationValues={})),function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"}(e.RpcGrpcStatusCodeValues||(e.RpcGrpcStatusCodeValues={}))})),ke=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Le(),e)})),Fe=E((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetrySdkLanguageValues=e.OsTypeValues=e.HostArchValues=e.AwsEcsLaunchtypeValues=e.CloudPlatformValues=e.CloudProviderValues=e.ResourceAttributes=void 0,e.ResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},(t=e.CloudProviderValues||(e.CloudProviderValues={})).AWS="aws",t.AZURE="azure",t.GCP="gcp",function(e){e.AWS_EC2="aws_ec2",e.AWS_ECS="aws_ecs",e.AWS_EKS="aws_eks",e.AWS_LAMBDA="aws_lambda",e.AWS_ELASTIC_BEANSTALK="aws_elastic_beanstalk",e.AZURE_VM="azure_vm",e.AZURE_CONTAINER_INSTANCES="azure_container_instances",e.AZURE_AKS="azure_aks",e.AZURE_FUNCTIONS="azure_functions",e.AZURE_APP_SERVICE="azure_app_service",e.GCP_COMPUTE_ENGINE="gcp_compute_engine",e.GCP_CLOUD_RUN="gcp_cloud_run",e.GCP_KUBERNETES_ENGINE="gcp_kubernetes_engine",e.GCP_CLOUD_FUNCTIONS="gcp_cloud_functions",e.GCP_APP_ENGINE="gcp_app_engine"}(e.CloudPlatformValues||(e.CloudPlatformValues={})),function(e){e.EC2="ec2",e.FARGATE="fargate"}(e.AwsEcsLaunchtypeValues||(e.AwsEcsLaunchtypeValues={})),function(e){e.AMD64="amd64",e.ARM32="arm32",e.ARM64="arm64",e.IA64="ia64",e.PPC32="ppc32",e.PPC64="ppc64",e.X86="x86"}(e.HostArchValues||(e.HostArchValues={})),function(e){e.WINDOWS="windows",e.LINUX="linux",e.DARWIN="darwin",e.FREEBSD="freebsd",e.NETBSD="netbsd",e.OPENBSD="openbsd",e.DRAGONFLYBSD="dragonflybsd",e.HPUX="hpux",e.AIX="aix",e.SOLARIS="solaris",e.Z_OS="z_os"}(e.OsTypeValues||(e.OsTypeValues={})),function(e){e.CPP="cpp",e.DOTNET="dotnet",e.ERLANG="erlang",e.GO="go",e.JAVA="java",e.NODEJS="nodejs",e.PHP="php",e.PYTHON="python",e.RUBY="ruby",e.WEBJS="webjs"}(e.TelemetrySdkLanguageValues||(e.TelemetrySdkLanguageValues={}))})),Ue=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Fe(),e)})),Be=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ke(),e),n(Ue(),e)})),Ge=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDK_INFO=void 0;var t=Me(),n=Be();e.SDK_INFO={[n.ResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[n.ResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[n.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.TelemetrySdkLanguageValues.NODEJS,[n.ResourceAttributes.TELEMETRY_SDK_VERSION]:t.VERSION}})),qe=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unrefTimer=void 0,e.unrefTimer=function(e){e.unref()}})),He=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(De(),e),n(we(),e),n(xe(),e),n(Pe(),e),n(Ge(),e),n(qe(),e)})),Ye=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(He(),e)})),je=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeInput=e.isTimeInputHrTime=e.hrTimeToMicroseconds=e.hrTimeToMilliseconds=e.hrTimeToNanoseconds=e.hrTimeToTimeStamp=e.hrTimeDuration=e.timeInputToHrTime=e.hrTime=void 0;var t=Ye(),n=Math.pow(10,9);function r(e){let t=e/1e3,r=Math.trunc(t);return[r,Number((t-r).toFixed(9))*n]}function i(){let e=t.otperformance.timeOrigin;if("number"!=typeof e){let n=t.otperformance;e=n.timing&&n.timing.fetchStart}return e}function a(e){let a=r(i()),o=r("number"==typeof e?e:t.otperformance.now()),s=a[0]+o[0],l=a[1]+o[1];return l>n&&(l-=n,s+=1),[s,l]}function o(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}e.hrTime=a,e.timeInputToHrTime=function(e){if(o(e))return e;if("number"==typeof e)return e{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),$e=E((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ExportResultCode=void 0,(t=e.ExportResultCode||(e.ExportResultCode={}))[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})),ze=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePropagator=void 0;var t=be();e.CompositePropagator=class{constructor(e={}){var t;this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((e=>"function"==typeof e.fields?e.fields():[])).reduce(((e,t)=>e.concat(t)),[])))}inject(e,n,r){for(let i of this._propagators)try{i.inject(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}}extract(e,n,r){return this._propagators.reduce(((e,i)=>{try{return i.extract(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return e}),e)}fields(){return this._fields.slice()}}})),We=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateValue=e.validateKey=void 0;var t="[_0-9a-z-*/]",n=new RegExp(`^(?:[a-z]${t}{0,255}|[a-z0-9]${t}{0,240}@[a-z]${t}{0,13})$`),r=/^[ -~]{0,255}[!-~]$/,i=/,|=/;e.validateKey=function(e){return n.test(e)},e.validateValue=function(e){return r.test(e)&&!i.test(e)}})),Ke=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceState=void 0;var t=We(),n=class{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>(e.push(t+"="+this.get(t)),e)),[]).join(",")}_parse(e){e.length>512||(this._internalState=e.split(",").reverse().reduce(((e,n)=>{let r=n.trim(),i=r.indexOf("=");if(-1!==i){let a=r.slice(0,i),o=r.slice(i+1,n.length);t.validateKey(a)&&t.validateValue(o)&&e.set(a,o)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new n;return e._internalState=new Map(this._internalState),e}};e.TraceState=n})),Qe=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpTraceContextPropagator=e.parseTraceParent=e.TRACE_STATE_HEADER=e.TRACE_PARENT_HEADER=void 0;var t=be(),n=ve(),r=Ke();e.TRACE_PARENT_HEADER="traceparent",e.TRACE_STATE_HEADER="tracestate";var i=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function a(e){let t=i.exec(e);return!t||"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}e.parseTraceParent=a,e.HttpTraceContextPropagator=class{inject(r,i,a){let o=t.trace.getSpanContext(r);if(!o||n.isTracingSuppressed(r)||!t.isSpanContextValid(o))return;let s=`00-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||t.TraceFlags.NONE).toString(16)}`;a.set(i,e.TRACE_PARENT_HEADER,s),o.traceState&&a.set(i,e.TRACE_STATE_HEADER,o.traceState.serialize())}extract(n,i,o){let s=o.get(i,e.TRACE_PARENT_HEADER);if(!s)return n;let l=Array.isArray(s)?s[0]:s;if("string"!=typeof l)return n;let c=a(l);if(!c)return n;c.isRemote=!0;let d=o.get(i,e.TRACE_STATE_HEADER);if(d){let e=Array.isArray(d)?d.join(","):d;c.traceState=new r.TraceState("string"==typeof e?e:void 0)}return t.trace.setSpanContext(n,c)}fields(){return[e.TRACE_PARENT_HEADER,e.TRACE_STATE_HEADER]}}})),Xe=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ze=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRPCMetadata=e.deleteRPCMetadata=e.setRPCMetadata=e.RPCType=void 0;var t=be().createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");(e.RPCType||(e.RPCType={})).HTTP="http",e.setRPCMetadata=function(e,n){return e.setValue(t,n)},e.deleteRPCMetadata=function(e){return e.deleteValue(t)},e.getRPCMetadata=function(e){return e.getValue(t)}})),Je=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOffSampler=void 0;var t=be();e.AlwaysOffSampler=class{shouldSample(){return{decision:t.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}})),et=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOnSampler=void 0;var t=be();e.AlwaysOnSampler=class{shouldSample(){return{decision:t.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}})),tt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParentBasedSampler=void 0;var t=be(),n=Ne(),r=Je(),i=et();e.ParentBasedSampler=class{constructor(e){var t,a,o,s;this._root=e.root,this._root||(n.globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new i.AlwaysOnSampler),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new i.AlwaysOnSampler,this._remoteParentNotSampled=null!==(a=e.remoteParentNotSampled)&&void 0!==a?a:new r.AlwaysOffSampler,this._localParentSampled=null!==(o=e.localParentSampled)&&void 0!==o?o:new i.AlwaysOnSampler,this._localParentNotSampled=null!==(s=e.localParentNotSampled)&&void 0!==s?s:new r.AlwaysOffSampler}shouldSample(e,n,r,i,a,o){let s=t.trace.getSpanContext(e);return s&&t.isSpanContextValid(s)?s.isRemote?s.traceFlags&t.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,a,o):this._remoteParentNotSampled.shouldSample(e,n,r,i,a,o):s.traceFlags&t.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,a,o):this._localParentNotSampled.shouldSample(e,n,r,i,a,o):this._root.shouldSample(e,n,r,i,a,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}})),nt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceIdRatioBasedSampler=void 0;var t=be();e.TraceIdRatioBasedSampler=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}shouldSample(e,n){return{decision:t.isValidTraceId(n)&&this._accumulate(n)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n>>0}return t}}})),rt=E((e=>{"use strict";function t(e,t){return"string"==typeof t?e===t:t.test(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.isUrlIgnored=e.urlMatches=void 0,e.urlMatches=t,e.isUrlIgnored=function(e,n){if(!n)return!1;for(let r of n)if(t(e,r))return!0;return!1}})),it=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWrapped=void 0,e.isWrapped=function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}})),at=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.baggageUtils=void 0,n(Ce(),e),n(Re(),e),n(Ne(),e),n(Oe(),e),n(je(),e),n(Ve(),e),n($e(),e),n(Me(),e),e.baggageUtils=ye(),n(Ye(),e),n(ze(),e),n(Qe(),e),n(Xe(),e),n(Ze(),e),n(Je(),e),n(et(),e),n(tt(),e),n(nt(),e),n(ve(),e),n(Ke(),e),n(Ae(),e),n(Ie(),e),n(rt(),e),n(it(),e),n(Me(),e)})),ot=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionEventName=void 0,e.ExceptionEventName="exception"})),st=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0;var t=be(),n=at(),r=Be(),i=ot();e.Span=class{constructor(e,r,i,a,o,s,l=[],c=n.hrTime()){this.attributes={},this.links=[],this.events=[],this.status={code:t.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=s,this.kind=o,this.links=l,this.startTime=n.timeInputToHrTime(c),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}spanContext(){return this._spanContext}setAttribute(e,r){return null==r||this._isSpanEnded()?this:0===e.length?(t.diag.warn(`Invalid attribute key: ${e}`),this):n.isAttributeValue(r)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=r),this):(t.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}addEvent(e,r,i){return this._isSpanEnded()||(this.events.length>=this._spanLimits.eventCountLimit&&(t.diag.warn("Dropping extra events."),this.events.shift()),n.isTimeInput(r)&&(typeof i>"u"&&(i=r),r=void 0),typeof i>"u"&&(i=n.hrTime()),this.events.push({name:e,attributes:r,time:n.timeInputToHrTime(i)})),this}setStatus(e){return this._isSpanEnded()||(this.status=e),this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e=n.hrTime()){this._isSpanEnded()?t.diag.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=n.timeInputToHrTime(e),this._duration=n.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0&&t.diag.warn("Inconsistent start and end time, startTime > endTime",this.startTime,this.endTime),this._spanProcessor.onEnd(this))}isRecording(){return!1===this._ended}recordException(e,a=n.hrTime()){let o={};"string"==typeof e?o[r.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?o[r.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(o[r.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(o[r.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(o[r.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),o[r.SemanticAttributes.EXCEPTION_TYPE]||o[r.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(i.ExceptionEventName,o,a):t.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}_isSpanEnded(){return this._ended&&t.diag.warn("Can not execute the operation on ended Span {traceId: %s, spanId: %s}",this._spanContext.traceId,this._spanContext.spanId),this._ended}}})),lt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildSamplerFromEnv=e.DEFAULT_CONFIG=void 0;var t=be(),n=at(),r=n.getEnv(),i=n.TracesSamplerValues.AlwaysOn;function a(e=n.getEnv()){switch(e.OTEL_TRACES_SAMPLER){case n.TracesSamplerValues.AlwaysOn:return new n.AlwaysOnSampler;case n.TracesSamplerValues.AlwaysOff:return new n.AlwaysOffSampler;case n.TracesSamplerValues.ParentBasedAlwaysOn:return new n.ParentBasedSampler({root:new n.AlwaysOnSampler});case n.TracesSamplerValues.ParentBasedAlwaysOff:return new n.ParentBasedSampler({root:new n.AlwaysOffSampler});case n.TracesSamplerValues.TraceIdRatio:return new n.TraceIdRatioBasedSampler(o(e));case n.TracesSamplerValues.ParentBasedTraceIdRatio:return new n.ParentBasedSampler({root:new n.TraceIdRatioBasedSampler(o(e))});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${e.OTEL_TRACES_SAMPLER} invalid, defaulting to ${i}".`),new n.AlwaysOnSampler}}function o(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return t.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;let n=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to 1.`),1):n<0||n>1?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to 1.`),1):n}e.DEFAULT_CONFIG={sampler:a(r),forceFlushTimeoutMillis:3e4,spanLimits:{attributeCountLimit:n.getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:n.getEnv().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:n.getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT}},e.buildSamplerFromEnv=a})),ct=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConfig=void 0;var t=lt();e.mergeConfig=function(e){let n={sampler:t.buildSamplerFromEnv()},r=Object.assign({},t.DEFAULT_CONFIG,n,e);return r.spanLimits=Object.assign({},t.DEFAULT_CONFIG.spanLimits,e.spanLimits||{}),r}})),dt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tracer=void 0;var t=be(),n=at(),r=st(),i=ct();e.Tracer=class{constructor(e,t,r){this._tracerProvider=r;let a=i.mergeConfig(t);this._sampler=a.sampler,this._spanLimits=a.spanLimits,this._idGenerator=t.idGenerator||new n.RandomIdGenerator,this.resource=r.resource,this.instrumentationLibrary=e}startSpan(e,i={},a=t.context.active()){var o,s;if(n.isTracingSuppressed(a))return t.diag.debug("Instrumentation suppressed, returning Noop Span"),t.trace.wrapSpanContext(t.INVALID_SPAN_CONTEXT);let l,c,d,u=function(e,n){if(!e.root)return t.trace.getSpanContext(n)}(i,a),p=this._idGenerator.generateSpanId();u&&t.trace.isSpanContextValid(u)?(l=u.traceId,c=u.traceState,d=u.spanId):l=this._idGenerator.generateTraceId();let _=null!==(o=i.kind)&&void 0!==o?o:t.SpanKind.INTERNAL,m=null!==(s=i.links)&&void 0!==s?s:[],g=n.sanitizeAttributes(i.attributes),h=this._sampler.shouldSample(i.root?t.trace.setSpanContext(a,t.INVALID_SPAN_CONTEXT):a,l,e,_,g,m),E={traceId:l,spanId:p,traceFlags:h.decision===t.SamplingDecision.RECORD_AND_SAMPLED?t.TraceFlags.SAMPLED:t.TraceFlags.NONE,traceState:c};if(h.decision===t.SamplingDecision.NOT_RECORD)return t.diag.debug("Recording is off, propagating context in a non-recording span"),t.trace.wrapSpanContext(E);let f=new r.Span(this,a,e,E,_,d,m,i.startTime);return f.setAttributes(Object.assign(g,h.attributes)),f}startActiveSpan(e,n,r,i){let a,o,s;if(arguments.length<2)return;2===arguments.length?s=n:3===arguments.length?(a=n,s=r):(a=n,o=r,s=i);let l=o??t.context.active(),c=this.startSpan(e,a,l),d=t.trace.setSpan(l,c);return t.context.with(d,s,void 0,c)}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}})),ut=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultServiceName=void 0,e.defaultServiceName=function(){return`unknown_service:${process.argv0}`}})),pt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectResources=void 0;var t=ft(),r=be(),i=n(3837);e.detectResources=async(e={})=>{let n=Object.assign(e),i=await Promise.all((n.detectors||[]).map((async e=>{try{let t=await e.detect(n);return r.diag.debug(`${e.constructor.name} found resource.`,t),t}catch(n){return r.diag.debug(`${e.constructor.name} failed: ${n.message}`),t.Resource.empty()}})));return a(i),i.reduce(((e,t)=>e.merge(t)),t.Resource.empty())};var a=e=>{e.forEach((e=>{if(Object.keys(e.attributes).length>0){let t=i.inspect(e.attributes,{depth:2,breakLength:1/0,sorted:!0,compact:!1});r.diag.verbose(t)}}))}})),_t=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envDetector=void 0;var t=be(),n=at(),r=Be(),i=vt();e.envDetector=new class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}async detect(e){let a={},o=n.getEnv(),s=o.OTEL_RESOURCE_ATTRIBUTES,l=o.OTEL_SERVICE_NAME;if(s)try{let e=this._parseResourceAttributes(s);Object.assign(a,e)}catch(e){t.diag.debug(`EnvDetector failed: ${e.message}`)}return l&&(a[r.ResourceAttributes.SERVICE_NAME]=l),new i.Resource(a)}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR,-1);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2!==n.length)continue;let[r,i]=n;if(r=r.trim(),i=i.trim().split('^"|"$').join(""),!this._isValidAndNotEmpty(r))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(i))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[r]=i}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isPrintableString(e)}_isPrintableString(e){for(let t=0;t="~")return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}}})),mt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processDetector=void 0;var t=be(),n=Be(),r=vt();e.processDetector=new class{async detect(e){let t={[n.ResourceAttributes.PROCESS_PID]:process.pid,[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title||"",[n.ResourceAttributes.PROCESS_COMMAND]:process.argv[1]||"",[n.ResourceAttributes.PROCESS_COMMAND_LINE]:process.argv.join(" ")||""};return this._getResourceAttributes(t,e)}_getResourceAttributes(e,i){return""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]||""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_PATH]||""===e[n.ResourceAttributes.PROCESS_COMMAND]||""===e[n.ResourceAttributes.PROCESS_COMMAND_LINE]?(t.diag.debug("ProcessDetector failed: Unable to find required process resources. "),r.Resource.empty()):new r.Resource(Object.assign({},e))}}})),gt=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(_t(),e),n(mt(),e)})),ht=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ut(),e),n(pt(),e),n(gt(),e)})),Et=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ht(),e)})),ft=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Resource=void 0;var t=Be(),n=at(),r=Et(),i=class{constructor(e){this.attributes=e}static empty(){return i.EMPTY}static default(){return new i({[t.ResourceAttributes.SERVICE_NAME]:r.defaultServiceName(),[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE],[t.ResourceAttributes.TELEMETRY_SDK_NAME]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_NAME],[t.ResourceAttributes.TELEMETRY_SDK_VERSION]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_VERSION]})}merge(e){if(!e||!Object.keys(e.attributes).length)return this;let t=Object.assign({},this.attributes,e.attributes);return new i(t)}};e.Resource=i,i.EMPTY=new i({})})),St=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),bt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),vt=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ft(),e),n(Et(),e),n(St(),e),n(bt(),e)})),Tt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSpanProcessor=void 0;var t=at();e.MultiSpanProcessor=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise((n=>{Promise.all(e).then((()=>{n()})).catch((e=>{t.globalErrorHandler(e||new Error("MultiSpanProcessor: forceFlush failed")),n()}))}))}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise(((t,n)=>{Promise.all(e).then((()=>{t()}),n)}))}}})),yt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopSpanProcessor=void 0,e.NoopSpanProcessor=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}})),Ct=E(((e,t)=>{var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",a="[object Function]",o="[object Object]",s=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[a]=c["[object Map]"]=c["[object Number]"]=c[o]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var d="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,p=d||u||Function("return this")(),_="object"==typeof e&&e&&!e.nodeType&&e,m=_&&"object"==typeof t&&t&&!t.nodeType&&t,g=m&&m.exports===_,h=g&&d.process,E=function(){try{return m&&m.require&&m.require("util").types||h&&h.binding&&h.binding("util")}catch{}}(),f=E&&E.isTypedArray;function S(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var b,v=Array.prototype,T=Function.prototype,y=Object.prototype,C=p["__core-js_shared__"],R=T.toString,O=y.hasOwnProperty,N=(b=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",I=y.toString,A=R.call(Object),D=RegExp("^"+R.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=g?p.Buffer:void 0,x=p.Symbol,P=p.Uint8Array,M=(w&&w.allocUnsafe,function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object)),L=Object.create,k=y.propertyIsEnumerable,F=v.splice,U=x?x.toStringTag:void 0,B=function(){try{var e=oe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),G=w?w.isBuffer:void 0,q=Math.max,H=Date.now,Y=oe(p,"Map"),j=oe(Object,"create"),V=function(){function e(){}return function(t){if(!fe(t))return{};if(L)return L(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function $(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},z.prototype.set=function(e,t){var n=this.__data__,r=Z(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},W.prototype.clear=function(){this.size=0,this.__data__={hash:new $,map:new(Y||z),string:new $}},W.prototype.delete=function(e){var t=ae(this,e).delete(e);return this.size-=t?1:0,t},W.prototype.get=function(e){return ae(this,e).get(e)},W.prototype.has=function(e){return ae(this,e).has(e)},W.prototype.set=function(e,t){var n=ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},K.prototype.clear=function(){this.__data__=new z,this.size=0},K.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},K.prototype.get=function(e){return this.__data__.get(e)},K.prototype.has=function(e){return this.__data__.has(e)},K.prototype.set=function(e,t){var n=this.__data__;if(n instanceof z){var r=n.__data__;if(!Y||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new W(r)}return n.set(e,t),this.size=n.size,this};var ee=function(e,t,n){for(var r=-1,i=Object(e),a=n(e),o=a.length;o--;){var s=a[++r];if(!1===t(i[s],s,i))break}return e};function te(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":U&&U in Object(e)?function(e){var t=O.call(e,U),n=e[U];try{e[U]=void 0;var r=!0}catch{}var i=I.call(e);return r&&(t?e[U]=n:delete e[U]),i}(e):function(e){return I.call(e)}(e)}function ne(e){return Se(e)&&te(e)==i}function re(e,t,n,r,i){e!==t&&ee(t,(function(a,s){if(i||(i=new K),fe(a))!function(e,t,n,r,i,a,s){var l=ce(e,n),c=ce(t,n),d=s.get(c);if(d)Q(e,n,d);else{var u=a?a(l,c,n+"",e,t,s):void 0,p=void 0===u;if(p){var _=_e(c),m=!_&&ge(c),g=!_&&!m&&be(c);u=c,_||m||g?_e(l)?u=l:function(e){return Se(e)&&me(e)}(l)?u=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ie);function ue(e,t){return e===t||e!=e&&t!=t}var pe=ne(function(){return arguments}())?ne:function(e){return Se(e)&&O.call(e,"callee")&&!k.call(e,"callee")},_e=Array.isArray;function me(e){return null!=e&&Ee(e.length)&&!he(e)}var ge=G||function(){return!1};function he(e){if(!fe(e))return!1;var t=te(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ee(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Se(e){return null!=e&&"object"==typeof e}var be=f?function(e){return function(t){return e(t)}}(f):function(e){return Se(e)&&Ee(e.length)&&!!c[te(e)]};function ve(e){return me(e)?function(e,t){var n=_e(e),r=!n&&pe(e),i=!n&&!r&&ge(e),a=!n&&!r&&!i&&be(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&function(e,t,n){if(!fe(n))return!1;var r=typeof t;return!!("number"==r?me(n)&&se(t,n.length):"string"==r&&t in n)&&ue(n[t],e)}(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessorBase=void 0;var t=be(),n=at();e.BatchSpanProcessorBase=class{constructor(e,t){this._exporter=e,this._finishedSpans=[],this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve();let r=n.getEnv();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT}forceFlush(){return this._isShutdown?this._shuttingDownPromise:this._flushAll()}onStart(e){}onEnd(e){this._isShutdown||this._addToBuffer(e)}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this.onShutdown())).then((()=>this._flushAll())).then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}_addToBuffer(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())}_flushAll(){return new Promise(((e,t)=>{let n=[];for(let e=0,t=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);e{e()})).catch(t)}))}_flushOneBatch(){return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise(((e,r)=>{let i=setTimeout((()=>{r(new Error("Timeout"))}),this._exportTimeoutMillis);t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export(this._finishedSpans.splice(0,this._maxExportBatchSize),(t=>{var a;clearTimeout(i),t.code===n.ExportResultCode.SUCCESS?e():r(null!==(a=t.error)&&void 0!==a?a:new Error("BatchSpanProcessor: span export failed"))}))}))}))}_maybeStartTimer(){void 0===this._timer&&(this._timer=setTimeout((()=>{this._flushOneBatch().then((()=>{this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())})).catch((e=>{n.globalErrorHandler(e)}))}),this._scheduledDelayMillis),n.unrefTimer(this._timer))}_clearTimer(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}})),Ot=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessor=void 0;var t=Rt(),n=class extends t.BatchSpanProcessorBase{onShutdown(){}};e.BatchSpanProcessor=n})),Nt=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ot(),e)})),It=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Nt(),e)})),At=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTracerProvider=e.ForceFlushState=void 0;var t,n,r=be(),i=at(),a=vt(),o=Ut(),s=lt(),l=Tt(),c=yt(),d=Ct(),u=It();(n=t=e.ForceFlushState||(e.ForceFlushState={}))[n.resolved=0]="resolved",n[n.timeout=1]="timeout",n[n.error=2]="error",n[n.unresolved=3]="unresolved";var p=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let n=d({},s.DEFAULT_CONFIG,e);this.resource=null!==(t=n.resource)&&void 0!==t?t:a.Resource.empty(),this.resource=a.Resource.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});let r=this._buildExporterFromEnv();if(void 0!==r){let e=new u.BatchSpanProcessor(r);this.activeSpanProcessor=e}else this.activeSpanProcessor=new c.NoopSpanProcessor}getTracer(e,t){let n=`${e}@${t||""}`;return this._tracers.has(n)||this._tracers.set(n,new o.Tracer({name:e,version:t},this._config,this)),this._tracers.get(n)}addSpanProcessor(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((e=>r.diag.error("Error while trying to shutdown current span processor",e))),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new l.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){r.trace.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&r.context.setGlobalContextManager(e.contextManager),e.propagator&&r.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map((n=>new Promise((r=>{let i,a=setTimeout((()=>{r(new Error(`Span processor did not completed within timeout period of ${e} ms`)),i=t.timeout}),e);n.forceFlush().then((()=>{clearTimeout(a),i!==t.timeout&&(i=t.resolved,r(i))})).catch((e=>{clearTimeout(a),i=t.error,r(e)}))}))));return new Promise(((e,r)=>{Promise.all(n).then((n=>{let i=n.filter((e=>e!==t.resolved));i.length>0?r(i):e()})).catch((e=>r([e])))}))}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return null===(t=p._registeredPropagators.get(e))||void 0===t?void 0:t()}_getSpanExporter(e){var t;return null===(t=p._registeredExporters.get(e))||void 0===t?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(i.getEnv().OTEL_PROPAGATORS)),t=e.map((e=>{let t=this._getPropagator(e);return t||r.diag.warn(`Propagator "${e}" requested through environment variable is unavailable.`),t})).reduce(((e,t)=>(t&&e.push(t),e)),[]);if(0!==t.length)return 1===e.length?t[0]:new i.CompositePropagator({propagators:t})}_buildExporterFromEnv(){let e=i.getEnv().OTEL_TRACES_EXPORTER;if("none"===e)return;let t=this._getSpanExporter(e);return t||r.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};e.BasicTracerProvider=p,p._registeredPropagators=new Map([["tracecontext",()=>new i.HttpTraceContextPropagator],["baggage",()=>new i.HttpBaggagePropagator]]),p._registeredExporters=new Map})),Dt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleSpanExporter=void 0;var t=at();e.ConsoleSpanExporter=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),Promise.resolve()}_exportInfo(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:t.hrTimeToMicroseconds(e.startTime),duration:t.hrTimeToMicroseconds(e.duration),attributes:e.attributes,status:e.status,events:e.events}}_sendSpans(e,n){for(let t of e)console.log(this._exportInfo(t));if(n)return n({code:t.ExportResultCode.SUCCESS})}}})),wt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemorySpanExporter=void 0;var t=at();e.InMemorySpanExporter=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,n){if(this._stopped)return n({code:t.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout((()=>n({code:t.ExportResultCode.SUCCESS})),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}})),xt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Pt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSpanProcessor=void 0;var t=be(),n=at();e.SimpleSpanProcessor=class{constructor(e){this._exporter=e,this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve()}forceFlush(){return Promise.resolve()}onStart(e){}onEnd(e){this._isShutdown||t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export([e],(e=>{var t;e.code!==n.ExportResultCode.SUCCESS&&n.globalErrorHandler(null!==(t=e.error)&&void 0!==t?t:new Error(`SimpleSpanProcessor: span export failed (status ${e})`))}))}))}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}}})),Mt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Lt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),kt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ft=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ut=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(dt(),e),n(At(),e),n(It(),e),n(Dt(),e),n(wt(),e),n(xt(),e),n(Pt(),e),n(Mt(),e),n(yt(),e),n(st(),e),n(Lt(),e),n(kt(),e),n(Ft(),e)})),Bt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.azureCoreTracing=e.AzureMonitorSymbol=void 0;var t=R();e.AzureMonitorSymbol="Azure_Monitor_Tracer";var n=!1;e.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(r){if(n)return r;try{var i=Ut(),a=be(),o=(new i.BasicTracerProvider).getTracer("applicationinsights tracer"),s=r.setTracer;r.setTracer=function(n){var r=n.startSpan;n.startSpan=function(e,n,i){var a=r.call(this,e,n,i),o=a.end;return a.end=function(){var e=o.apply(this,arguments);return t.channel.publish("azure-coretracing",a),e},a},n[e.AzureMonitorSymbol]=!0,s.call(this,n)},a.trace.getSpan(a.context.active()),r.setTracer(o),n=!0}catch{}return r}},e.enable=function(){t.channel.registerMonkeyPatch("@azure/core-tracing",e.azureCoreTracing)}})),Gt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.bunyan=void 0;var t=R();e.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var n=e.prototype._emit;return e.prototype._emit=function(e,r){var i=n.apply(this,arguments);if(!r){var a=i;a||(a=n.call(this,e,!0)),t.channel.publish("bunyan",{level:e.level,result:a})}return i},e}},e.enable=function(){t.channel.registerMonkeyPatch("bunyan",e.bunyan)}})),qt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.console=void 0;var t=R(),r=n(2781);e.console={versionSpecifier:">= 4.0.0",patch:function(e){var n=new r.Writable,i=new r.Writable;n.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n}),!0},i.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n,stderr:!0}),!0};for(var a=new e.Console(n,i),o=function(t){var n=e[t];n&&(e[t]=function(){if(a[t])try{a[t].apply(a,arguments)}catch{}return n.apply(e,arguments)})},s=0,l=["log","info","warn","error","dir","time","timeEnd","trace","assert"];s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongoCore=void 0;var t=R();e.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=n.apply(this,arguments),r=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=t.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=t.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},e.enable=function(){t.channel.registerMonkeyPatch("mongodb-core",e.mongoCore)}})),Yt=E((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n= 2.0.0 <= 3.0.5",patch:function(e){var r=e.instrument({operationIdGenerator:{next:function(){return n.channel.bindToContext((function(e){return e()}))}}}),i={};return r.on("started",(function(e){i[e.requestId]||(i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},e.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var r=e.instrument(),i={},a={};return r.on("started",(function(e){i[e.requestId]||(a[e.requestId]=n.channel.bindToContext((function(e){return e()})),i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof a[e.requestId]&&(a[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete a[e.requestId])})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof a[e.requestId]&&(a[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete a[e.requestId])})),e}},e.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=n.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=n.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e}}(e);var t=e.instrument(),r={},i={};return t.on("started",(function(e){r[e.requestId]||(i[e.requestId]=n.channel.bindToContext((function(e){return e()})),r[e.requestId]=e)})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete i[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete i[e.requestId])})),e}},e.enable=function(){n.channel.registerMonkeyPatch("mongodb",e.mongo2),n.channel.registerMonkeyPatch("mongodb",e.mongo3),n.channel.registerMonkeyPatch("mongodb",e.mongo330)}})),jt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mysql=void 0;var t=R(),r=n(1017);e.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,i){var a=function(e,n){return function(n,r){var i=e[n];i&&(e[n]=function(){for(var e=arguments.length-1,n=arguments.length-1;n>=0;--n){if("function"==typeof arguments[n]){e=n;break}if(typeof arguments[n]<"u")break}var a=arguments[e],o={result:null,startTime:null,startDate:null};"function"==typeof a&&(r?(o.startTime=process.hrtime(),o.startDate=new Date,arguments[e]=t.channel.bindToContext(r(o,a))):arguments[e]=t.channel.bindToContext(a));var s=i.apply(this,arguments);return o.result=s,s})}},o=function(e,t){return a(e.prototype)},s=n(5029)(r.dirname(i)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return o(s)(e)})),a(s)("createQuery",(function(e,n){return function(r){var i=process.hrtime(e.startTime),a=1e3*i[0]+i[1]/1e6|0;t.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:r,duration:a,time:e.startDate}),n.apply(this,arguments)}}));var l=n(3437)(r.dirname(i)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return o(l)(e)})),e}},e.enable=function(){t.channel.registerMonkeyPatch("mysql",e.mysql)}})),Vt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgresPool1=void 0;var t=R();e.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var n=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=t.channel.bindToContext(e)),n.apply(this,arguments)},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg-pool",e.postgresPool1)}})),$t=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgres7=e.postgres6=void 0;var t=R(),r=n(2361);e.postgres6={versionSpecifier:"6.*",patch:function(e,n){var i=e.Client.prototype.query,a="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,o){var s,l={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},c=process.hrtime();function d(e){e&&e[a]&&(e=e[a]);var n=t.channel.bindToContext((function(n,i){var a=process.hrtime(c);if(l.result=i&&{rowCount:i.rowCount,command:i.command},l.error=n,l.duration=Math.ceil(1e3*a[0]+a[1]/1e6),t.channel.publish("postgres",l),n){if(e)return e.apply(this,arguments);s&&s instanceof r.EventEmitter&&s.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,a,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(l.query.preparable={text:e,args:n},o=d(o)):(l.query.text=e,o?o=d(o):n=d(n)):("string"==typeof e.name?l.query.plan=e.name:e.values instanceof Array?l.query.preparable={text:e.text,args:e.values}:l.query.text=e.text,o?o=d(o):n?n=d(n):e.callback=d(e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=o,arguments.length=arguments.length>3?arguments.length:3,s=i.apply(this,arguments)},e}},e.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,n){var i=e.Client.prototype.query,a="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,o){var s,l=this,c=!!o,d={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},u=process.hrtime();function p(e){e&&e[a]&&(e=e[a]);var n=t.channel.bindToContext((function(n,i){var a=process.hrtime(u);if(d.result=i&&{rowCount:i.rowCount,command:i.command},d.error=n,d.duration=Math.ceil(1e3*a[0]+a[1]/1e6),t.channel.publish("postgres",d),n){if(e)return e.apply(this,arguments);s&&s instanceof r.EventEmitter&&s.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,a,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(d.query.preparable={text:e,args:n},o=(c="function"==typeof o)?p(o):o):(d.query.text=e,o?o=(c="function"==typeof o)?p(o):o:n=(c="function"==typeof n)?p(n):n):("string"==typeof e.name?d.query.plan=e.name:e.values instanceof Array?d.query.preparable={text:e.text,args:e.values}:d.query.text=e.text,o?(c="function"==typeof o,o=p(o)):n?n=(c="function"==typeof n)?p(n):n:(c="function"==typeof e.callback,e.callback=c?p(e.callback):e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=o,arguments.length=arguments.length>3?arguments.length:3,s=i.apply(this,arguments),c?s:s.then((function(e){return p()(void 0,e),new l._Promise((function(t,n){t(e)}))})).catch((function(e){return p()(e,void 0),new l._Promise((function(t,n){n(e)}))}))},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg",e.postgres6),t.channel.registerMonkeyPatch("pg",e.postgres7)}})),zt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.redis=void 0;var t=R();e.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var r=e.callback;if(!r||!r.pubsubBound){var i=this.address,a=process.hrtime(),o=new Date;e.callback=t.channel.bindToContext((function(n,s){var l=process.hrtime(a),c=1e3*l[0]+l[1]/1e6|0;t.channel.publish("redis",{duration:c,address:i,commandObj:e,err:n,result:s,time:o}),"function"==typeof r&&r.apply(this,arguments)})),e.callback.pubsubBound=!0}}return n.call(this,e)},e}},e.enable=function(){t.channel.registerMonkeyPatch("redis",e.redis)}})),Wt=E((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n= 6.0.0 < 9.0.0",patch:function(e){var r=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){function e(e){var r=process.hrtime(),i={query:{},database:{host:null,port:null},result:null,error:null,duration:0};return n.channel.bindToContext((function(a,o,s){var l=process.hrtime(r);i=t(t({},i),{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!a&&{rowCount:o,rows:s},query:{text:this.parametersByName.statement.value},error:a,duration:Math.ceil(1e3*l[0]+l[1]/1e6)}),n.channel.publish("tedious",i),e.call(this,a,o,s)}))}var i=arguments[0];arguments[0].callback=e(i.callback),r.apply(this,arguments)},e}},e.enable=function(){n.channel.registerMonkeyPatch("tedious",e.tedious)}})),Kt=E((e=>{"use strict";var t,n=e&&e.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,n)},function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),r=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);ir[n]?i:n);this.add(new t(e,{level:n}))}var o=e.createLogger;e.createLogger=function(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);var s=o.apply(this,arguments);s.add(new t(e,{level:n}));var l=s.configure;return s.configure=function(){l.apply(this,arguments),a.apply(this,arguments)},s};var s=e.configure;return e.configure=function(){s.apply(this,arguments),a.apply(this,arguments)},e.add(new t(e)),e}},e.winston2={versionSpecifier:"2.x",patch:function(e){var t,n=e.Logger.prototype.log,r=function(n,r,a){var o;return o=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",i.channel.publish("winston",{level:n,message:r,meta:a,levelKind:o}),r};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==r&&(this.filters=this.filters.filter((function(e){return e!==r})),this.filters.push(r)):this.filters=[r],n.apply(this,arguments)},e}},e.enable=function(){i.channel.registerMonkeyPatch("winston",e.winston2),i.channel.registerMonkeyPatch("winston",e.winston3)}})),Qt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=e.pgPool=e.pg=e.winston=e.redis=e.mysql=e.mongodb=e.mongodbCore=e.console=e.bunyan=e.azuresdk=void 0;var t=Bt();e.azuresdk=t;var n=Gt();e.bunyan=n;var r=qt();e.console=r;var i=Ht();e.mongodbCore=i;var a=Yt();e.mongodb=a;var o=jt();e.mysql=o;var s=Vt();e.pgPool=s;var l=$t();e.pg=l;var c=zt();e.redis=c;var d=Wt();e.tedious=d;var u=Kt();e.winston=u,e.enable=function(){n.enable(),r.enable(),i.enable(),a.enable(),o.enable(),l.enable(),s.enable(),c.enable(),u.enable(),t.enable(),d.enable()}})),Xt=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextPreservation=e.IsInitialized=void 0;var t=v(),n=b();e.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL;var r,i,a,o,s="DiagnosticChannel";if(e.IsInitialized){for(o in r=Qt(),i=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),a={bunyan:r.bunyan,console:r.console,mongodb:r.mongodb,mongodbCore:r.mongodbCore,mysql:r.mysql,redis:r.redis,pg:r.pg,pgPool:r.pgPool,winston:r.winston,azuresdk:r.azuresdk})-1===i.indexOf(o)&&(a[o].enable(),n.info(s,"Subscribed to "+o+" events"));i.length>0&&n.info(s,"Some modules will not be patched",i)}else n.info(s,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");e.registerContextPreservation=function(n){if(e.IsInitialized){var r=R();r.channel.addContextPreservation(n),r.channel.spanContextPropagator=t.AsyncScopeManager}}})),Zt=E(((e,t)=>{"use strict";t.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}})),Jt=E(((e,t)=>{"use strict";var r=e&&e.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n>t&255)},n=e.map((function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)})).join(""),r=(Buffer.from?Buffer.from(n,"binary"):new Buffer(n,"binary")).toString("base64");return r.substr(0,r.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i<4;i++)r+=n[15&(t=e.random32())]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var a=n[8+4*Math.random()|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+a+r.substr(16,3)+r.substr(19,12)},e.w3cSpanId=function(){return e.w3cTraceId().substring(16)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,n=n.length<2?"0"+n:n,(i>0?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var n={};for(var r in t){var i="",a=t[r],o=typeof a;if(e.isPrimitive(a))i=a.toString();else if(null===a||"undefined"===o)i="";else{if("function"===o){l.info("key: "+r+" was function; will not serialize");continue}var s=e.isArray(a)?a:e.extractObject(a);try{i=e.isPrimitive(s)?s:JSON.stringify(s)}catch(e){i=a.constructor.name.toString()+" (Error: "+e.message+")",l.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return n}l.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||0==n.length||!t)return!0;for(var r=0;r{"use strict";var n=Jt(),r=b(),i=function(){function e(){}return e.queryCorrelationId=function(t,i){var a=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(a))i(e.completedLookups[a]);else if(e.pendingLookups[a])e.pendingLookups[a].push(i);else{e.pendingLookups[a]=[i];var o=function(){if(e.pendingLookups[a]){var i={method:"GET",disableAppInsightsAutoCollection:!0};r.info(e.TAG,i);var s=n.makeRequest(t,a,i,(function(n){if(200===n.statusCode){var i="";n.setEncoding("utf-8"),n.on("data",(function(e){i+=e})),n.on("end",(function(){r.info(e.TAG,i);var t=e.correlationIdPrefix+i;e.completedLookups[a]=t,e.pendingLookups[a]&&e.pendingLookups[a].forEach((function(e){return e(t)})),delete e.pendingLookups[a]}))}else n.statusCode>=400&&n.statusCode<500?(e.completedLookups[a]=void 0,delete e.pendingLookups[a]):setTimeout(o,t.correlationIdRetryIntervalMs)}));s&&(s.on("error",(function(t){r.warn(e.TAG,t)})),s.end())}};setTimeout(o,0)}},e.cancelCorrelationIdQuery=function(t,n){var r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[r];i&&(e.pendingLookups[r]=i.filter((function(e){return e!=n})),0==e.pendingLookups[r].length&&delete e.pendingLookups[r])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+n.w3cTraceId()+"."},e.appendSuffix=function(t,r,i){if(t.length+r.lengtha)for(;a>1;--a){var o=t[a-1];if("."===o||"_"===o)break}if(a<=1)return e.generateRootId();for(r=n.randomu32().toString(16);r.length<8;)r="0"+r;return t.substring(0,a)+r+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=n.randomu32(),e}();t.exports=i})),tn=E(((e,t)=>{"use strict";var n=Jt(),r=en(),i=function(){function e(t,i){if(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.version=e.DEFAULT_VERSION,t&&"string"==typeof t)if(t.split(",").length>1)this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16);else{var a=t.trim().split("-"),o=a.length;o>=4?(this.version=a[0],this.traceId=a[1],this.spanId=a[2],this.traceFlag=a[3]):(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId()),"00"===this.version&&4!==o&&(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),"ff"===this.version&&(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=e.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.traceId=n.w3cTraceId()),e.isValidTraceId(this.traceId)||(this.traceId=n.w3cTraceId()),e.isValidSpanId(this.spanId)||(this.spanId=n.w3cTraceId().substr(0,16),this.traceId=n.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(i){this.parentId=i.slice();var s=r.getRootId(i);e.isValidTraceId(s)||(this.legacyRootId=s,s=n.w3cTraceId()),-1!==i.indexOf("|")&&(i=i.substring(1+i.substring(0,i.length-1).lastIndexOf("."),i.length-1)),this.traceId=s,this.spanId=i}else this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.formatOpenTelemetryTraceFlags=function(e){var t="0"+e.toString(16);return t.substring(t.length-2)},e.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},e.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},e.prototype.updateSpanId=function(){this.spanId=n.w3cTraceId().substr(0,16)},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}();t.exports=i})),nn=E(((e,t)=>{"use strict";var n=function(){function e(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return e.prototype.toString=function(){var e=this.fieldmap;return e&&0!=e.length?e.join(", "):null},e.validateKeyChars=function(e){var t=e.split("@");if(2==t.length){var n=t[0].trim(),r=t[1].trim(),i=Boolean(n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/)),a=Boolean(r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/));return i&&a}return 1==t.length&&Boolean(e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/))},e.prototype.parseHeader=function(t){var n=[],r={},i=t.split(",");if(i.length>32)return null;for(var a=0,o=i;a{"use strict";t.exports=function(){}})),an=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),on=E(((e,t)=>{"use strict";t.exports=function(){}})),sn=E(((e,t)=>{"use strict";t.exports=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}})),ln=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return e.call(this)||this}return r(t,e),t}(on());t.exports=i})),cn=E(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Measurement=0]="Measurement",r[r.Aggregation=1]="Aggregation",t.exports=n})),dn=E(((e,t)=>{"use strict";var n=cn();t.exports=function(){this.kind=n.Measurement}})),un=E(((e,t)=>{"use strict";t.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}})),pn=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),_n=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),mn=E(((e,t)=>{"use strict";t.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}})),gn=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return r(t,e),t}(rn());t.exports=i})),hn=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return r(t,e),t}(rn());t.exports=i})),En=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(pn());t.exports=i})),fn=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),Sn=E(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(rn());t.exports=i})),bn=E(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical",t.exports=n})),vn=E(((e,t)=>{"use strict";t.exports=function(){}})),Tn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AvailabilityData=an(),e.Base=on(),e.ContextTagKeys=sn(),e.Data=ln(),e.DataPoint=dn(),e.DataPointType=cn(),e.Domain=rn(),e.Envelope=un(),e.EventData=pn(),e.ExceptionData=_n(),e.ExceptionDetails=mn(),e.MessageData=gn(),e.MetricData=hn(),e.PageViewData=En(),e.RemoteDependencyData=fn(),e.RequestData=Sn(),e.SeverityLevel=bn(),e.StackFrame=vn()})),yn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.domainSupportsProperties=e.RemoteDependencyDataConstants=void 0;var t=Tn(),n=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();e.RemoteDependencyDataConstants=n,e.domainSupportsProperties=function(e){return"properties"in e||e instanceof t.EventData||e instanceof t.ExceptionData||e instanceof t.MessageData||e instanceof t.MetricData||e instanceof t.PageViewData||e instanceof t.RemoteDependencyData||e instanceof t.RequestData}})),Cn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Rn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),On=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Nn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),In=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),An=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Dn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),wn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),xn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Pn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Mn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ln=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),kn=E((e=>{"use strict";var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryType=e.TelemetryTypeString=e.baseTypeToTelemetryType=e.telemetryTypeToBaseType=void 0,e.telemetryTypeToBaseType=function(e){switch(e){case t.Event:return"EventData";case t.Exception:return"ExceptionData";case t.Trace:return"MessageData";case t.Metric:return"MetricData";case t.Request:return"RequestData";case t.Dependency:return"RemoteDependencyData";case t.Availability:return"AvailabilityData";case t.PageView:return"PageViewData"}},e.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return t.Event;case"ExceptionData":return t.Exception;case"MessageData":return t.Trace;case"MetricData":return t.Metric;case"RequestData":return t.Request;case"RemoteDependencyData":return t.Dependency;case"AvailabilityData":return t.Availability;case"PageViewData":return t.PageView}},e.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},(n=t=e.TelemetryType||(e.TelemetryType={}))[n.Event=0]="Event",n[n.Exception=1]="Exception",n[n.Trace=2]="Trace",n[n.Metric=3]="Metric",n[n.Request=4]="Request",n[n.Dependency=5]="Dependency",n[n.Availability=6]="Availability",n[n.PageView=7]="PageView"})),Fn=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Cn(),e),n(Rn(),e),n(On(),e),n(Nn(),e),n(In(),e),n(An(),e),n(Dn(),e),n(wn(),e),n(xn(),e),n(Pn(),e),n(Mn(),e),n(Ln(),e),n(kn(),e)})),Un=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Bn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Gn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),qn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Hn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Yn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),jn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Vn=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),$n=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Un(),e),n(Bn(),e),n(Gn(),e),n(qn(),e),n(Hn(),e),n(Yn(),e),n(jn(),e),n(Vn(),e)})),zn=E((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(yn(),e),n(Tn(),e),n(Fn(),e),n($n(),e)})),Wn=E(((e,t)=>{"use strict";var n=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var r=this.properties||{};if(t)if("string"==typeof t)r.error=t;else if(t instanceof Error)r.error=t.message;else if("object"==typeof t)for(var i in t)r[i]=t[i]&&t[i].toString&&t[i].toString();this.properties=r},e.prototype._isSuccess=function(){return 0{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=n(7310),o=zn(),s=Jt(),l=Zt(),c=Wn(),d=en(),u=nn(),p=tn(),_=function(e){function t(t,n){var r=e.call(this)||this;return t&&(r.method=t.method,r.url=r._getAbsoluteUrl(t),r.startTime=+new Date,r.socketRemoteAddress=t.socket&&t.socket.remoteAddress,r.parseHeaders(t,n),t.connection&&(r.connectionRemoteAddress=t.connection.remoteAddress,r.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),r}return i(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+a.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e&&e.time?t.time=e.time:this.startTime&&(t.time=new Date(this.startTime)),e){for(var n in e)t[n]||(t[n]=e[n]);if(e.properties)for(var n in e.properties)t.properties[n]=e.properties[n]}return t},t.prototype.getRequestTags=function(e){var n={};for(var r in e)n[r]=e[r];return n[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),n[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),n[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),n[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),n[t.keys.operationName]=this.getOperationName(e),n[t.keys.operationParentId]=this.getOperationParentId(e),n[t.keys.operationId]=this.getOperationId(e),n},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+a.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype.getTraceparent=function(){return this.traceparent},t.prototype.getTracestate=function(){return this.tracestate},t.prototype.getLegacyRootId=function(){return this.legacyRootId},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,n=a.parse(e.url),r=n.pathname,i=n.search,o=t||"https"==e.headers["x-forwarded-proto"]?"https":"http";return a.format({protocol:o,host:e.headers.host,pathname:r,search:i})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var n=e.exec(t);if(n)return n[0]},n=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!n&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(n="127.0.0.1"),n},t.prototype._getId=function(e){var n=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(s.getCookie(e,n))},t.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=s.getCorrelationContextTarget(e,l.requestContextSourceKey),e.headers){var n=e.headers[l.traceStateHeader]?e.headers[l.traceStateHeader].toString():null,r=e.headers[l.traceparentHeader]?e.headers[l.traceparentHeader].toString():null,i=e.headers[l.requestIdHeader]?e.headers[l.requestIdHeader].toString():null,a=e.headers[l.parentIdHeader]?e.headers[l.parentIdHeader].toString():null,o=e.headers[l.rootIdHeader]?e.headers[l.rootIdHeader].toString():null;this.correlationContextHeader=e.headers[l.correlationContextHeader]?e.headers[l.correlationContextHeader].toString():null,d.w3cEnabled&&(r||n)?(this.traceparent=new p(r?r.toString():null),this.tracestate=r&&n&&new u(n?n.toString():null),this.setBackCompatFromThisTraceContext()):i?d.w3cEnabled?(this.traceparent=new p(null,i),this.setBackCompatFromThisTraceContext()):(this.parentId=i,this.requestId=d.generateRequestId(this.parentId),this.operationId=d.getRootId(this.requestId)):d.w3cEnabled?(this.traceparent=new p,this.traceparent.parentId=a,this.traceparent.legacyRootId=o||a,this.setBackCompatFromThisTraceContext()):(this.parentId=a,this.requestId=d.generateRequestId(o||this.parentId),this.correlationContextHeader=null,this.operationId=d.getRootId(this.requestId)),t&&(this.requestId=t,this.operationId=d.getRootId(this.requestId))}},t.parseId=function(e){var t=e.split("|");return t.length>0?t[0]:""},t.keys=new o.ContextTagKeys,t}(c);t.exports=_})),Qn=E(((e,t)=>{var n;e=t.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],a=e.src=[],o=0,s=o++;a[s]="0|[1-9]\\d*";var l=o++;a[l]="[0-9]+";var c=o++;a[c]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=o++;a[d]="("+a[s]+")\\.("+a[s]+")\\.("+a[s]+")";var u=o++;a[u]="("+a[l]+")\\.("+a[l]+")\\.("+a[l]+")";var p=o++;a[p]="(?:"+a[s]+"|"+a[c]+")";var _=o++;a[_]="(?:"+a[l]+"|"+a[c]+")";var m=o++;a[m]="(?:-("+a[p]+"(?:\\."+a[p]+")*))";var g=o++;a[g]="(?:-?("+a[_]+"(?:\\."+a[_]+")*))";var h=o++;a[h]="[0-9A-Za-z-]+";var E=o++;a[E]="(?:\\+("+a[h]+"(?:\\."+a[h]+")*))";var f=o++,S="v?"+a[d]+a[m]+"?"+a[E]+"?";a[f]="^"+S+"$";var b="[v=\\s]*"+a[u]+a[g]+"?"+a[E]+"?",v=o++;a[v]="^"+b+"$";var T=o++;a[T]="((?:<|>)?=?)";var y=o++;a[y]=a[l]+"|x|X|\\*";var C=o++;a[C]=a[s]+"|x|X|\\*";var R=o++;a[R]="[v=\\s]*("+a[C]+")(?:\\.("+a[C]+")(?:\\.("+a[C]+")(?:"+a[m]+")?"+a[E]+"?)?)?";var O=o++;a[O]="[v=\\s]*("+a[y]+")(?:\\.("+a[y]+")(?:\\.("+a[y]+")(?:"+a[g]+")?"+a[E]+"?)?)?";var N=o++;a[N]="^"+a[T]+"\\s*"+a[R]+"$";var I=o++;a[I]="^"+a[T]+"\\s*"+a[O]+"$";var A=o++;a[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=o++;a[D]="(?:~>?)";var w=o++;a[w]="(\\s*)"+a[D]+"\\s+",i[w]=new RegExp(a[w],"g");var x=o++;a[x]="^"+a[D]+a[R]+"$";var P=o++;a[P]="^"+a[D]+a[O]+"$";var M=o++;a[M]="(?:\\^)";var L=o++;a[L]="(\\s*)"+a[M]+"\\s+",i[L]=new RegExp(a[L],"g");var k=o++;a[k]="^"+a[M]+a[R]+"$";var F=o++;a[F]="^"+a[M]+a[O]+"$";var U=o++;a[U]="^"+a[T]+"\\s*("+b+")$|^$";var B=o++;a[B]="^"+a[T]+"\\s*("+S+")$|^$";var G=o++;a[G]="(\\s*)"+a[T]+"\\s*("+b+"|"+a[R]+")",i[G]=new RegExp(a[G],"g");var q=o++;a[q]="^\\s*("+a[R]+")\\s+-\\s+("+a[R]+")\\s*$";var H=o++;a[H]="^\\s*("+a[O]+")\\s+-\\s+("+a[O]+")\\s*$";var Y,j=o++;for(a[j]="(<|>)?=?\\s*\\*",Y=0;Y<35;Y++)n(Y,a[Y]),i[Y]||(i[Y]=new RegExp(a[Y]));function V(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[v]:i[f]).test(e))return null;try{return new $(e,t)}catch{return null}}function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var a=e.trim().match(t.loose?i[v]:i[f]);if(!a)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new $(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=V(e),r=V(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var a="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==r[o])return i+o;return a},e.compareIdentifiers=W;var z=/^[0-9]+$/;function W(e,t){var n=z.test(e),r=z.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return K(e,t,n)<0}function Z(e,t,n){return 0===K(e,t,n)}function J(e,t,n){return 0!==K(e,t,n)}function ee(e,t,n){return K(e,t,n)>=0}function te(e,t,n){return K(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Z(e,n,r);case"!=":return J(e,n,r);case">":return Q(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return W(t,e)},e.major=function(e,t){return new $(e,t).major},e.minor=function(e,t){return new $(e,t).minor},e.patch=function(e,t){return new $(e,t).patch},e.compare=K,e.compareLoose=function(e,t){return K(e,t,!0)},e.rcompare=function(e,t,n){return K(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Q,e.lt=X,e.eq=Z,e.neq=J,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function ae(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ae)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new ae(e.raw,t);if(e instanceof re)return new ae(e.value,t);if(!(this instanceof ae))return new ae(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function oe(e){return!e||"x"===e.toLowerCase()||"*"===e}function se(e,t,n,r,i,a,o,s,l,c,d,u,p){return((t=oe(n)?"":oe(r)?">="+n+".0.0":oe(i)?">="+n+"."+r+".0":">="+t)+" "+(s=oe(l)?"":oe(c)?"<"+(+l+1)+".0.0":oe(d)?"<"+l+"."+(+c+1)+".0":u?"<="+l+"."+c+"."+d+"-"+u:"<="+s)).trim()}function le(e,t,r){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function ce(e,t,n){try{t=new ae(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,a,o,s,l;switch(e=new $(e,r),t=new ae(t,r),n){case">":i=Q,a=te,o=X,s=">",l=">=";break;case"<":i=X,a=ee,o=Q,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ce(e,t,r))return!1;for(var c=0;c=0.0.0")),u=u||e,p=p||e,i(e.semver,u.semver,r)?u=e:o(e.semver,p.semver,r)&&(p=e)})),u.operator===s||u.operator===l||(!p.operator||p.operator===s)&&a(e,p.semver))return!1;if(p.operator===l&&o(e,p.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[U]:i[B],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new $(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new ae(e.value,t),ce(this.value,n,t);if(""===e.operator)return n=new ae(this.value,t),ce(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||a&&o||s||l},e.Range=ae,ae.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},ae.prototype.toString=function(){return this.range},ae.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[H]:i[q];e=e.replace(r,se),n("hyphen replace",e),e=e.replace(i[G],"$1$2$3"),n("comparator trim",e,i[G]),e=(e=(e=e.replace(i[w],"$1~")).replace(i[L],"$1^")).split(/\s+/).join(" ");var a=t?i[U]:i[B],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[F]:i[k];return e.replace(r,(function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),oe(r)?s="":oe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":oe(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+"-"+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[P]:i[x];return e.replace(r,(function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),oe(r)?s="":oe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":oe(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),s=">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[I]:i[N];return e.replace(r,(function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var l=oe(i),c=l||oe(a),d=c||oe(o);return"="===r&&d&&(r=""),l?t=">"===r||"<"===r?"<0.0.0":"*":r&&d?(c&&(a=0),o=0,">"===r?(r=">=",c?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":d&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[j],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(a)}))),o.map((function(e){return new re(e,this.options)}),this)},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new ae(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},ae.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Q(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new ae(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=V(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new ae(e,n),t=new ae(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:V(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),Xn=E(((e,t)=>{"use strict";function n(e){return"function"==typeof e}var r=console.error.bind(console);function i(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function a(e){e&&e.logger&&(n(e.logger)?r=e.logger:r("new logger isn't a function, not replacing"))}function o(e,t,a){if(e&&e[t]){if(!a)return r("no wrapper function"),void r((new Error).stack);if(n(e[t])&&n(a)){var o=e[t],s=a(o,t);return i(s,"__original",o),i(s,"__unwrap",(function(){e[t]===s&&i(e,t,o)})),i(s,"__wrapped",!0),i(e,t,s),s}r("original object and wrapper must be functions")}else r("no original function "+t+" to wrap")}function s(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void r("no original to unwrap to -- has "+t+" already been unwrapped?"):(r("no function to unwrap."),void r((new Error).stack))}a.wrap=o,a.massWrap=function(e,t,n){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){o(e,t,n)}))})):r("must provide one or more functions to wrap on modules")},a.unwrap=s,a.massUnwrap=function(e,t){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t)}))})):r("must provide one or more functions to unwrap on modules")},t.exports=a})),Zn=E(((e,t)=>{"use strict";var n=Xn(),r=n.wrap,i=n.unwrap,a="wrap@before";function o(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function s(e,t){var n;return n=e._events&&e._events[t],Array.isArray(n)||(n=n?[n]:[]),n}function l(e,t){if(e){var n=e;if("function"==typeof e)n=t(e);else if(Array.isArray(e)){n=[];for(var r=0;r0&&function(e,t){for(var n=t.length,r=0;r{"use strict";var r=n(3837),i=n(9491),a=Zn(),o=n(852),s="cls@contexts",l="error@context",c=process.env.DEBUG_CLS_HOOKED,d=-1;function u(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function _(e){let t=p(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function m(...e){c&&process._rawDebug(`${r.format(...e)}`)}t.exports={getNamespace:p,createNamespace:function(e){i.ok(e,"namespace must be given a name."),c&&m(`NS-CREATING NAMESPACE (${e})`);let t=new u(e);return t.id=d,o.createHook({init(n,i,a,s){if(d=o.executionAsyncId(),t.active)t._contexts.set(n,t.active),c&&m(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${i}] (${e}) asyncId:${n} currentUid:${d} triggerId:${a} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`);else if(0===d){let a=o.triggerAsyncId(),l=t._contexts.get(a);l?(t._contexts.set(n,l),c&&m(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${n} currentUid:${d} triggerId:${a} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`)):c&&m(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${n} currentUid:${d} triggerId:${a} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`)}if(c&&"PROMISE"===i){m(r.inspect(s,{showHidden:!0}));let o=s.parentId;m(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${o} asyncId:${n} currentUid:${d} triggerId:${a} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${s}`)}},before(n){let i;if(d=o.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(d),i){if(c){let a=o.triggerAsyncId();m(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${n} currentUid:${d} triggerId:${a} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`),t._indent+=2}t.enter(i)}else if(c){let i=o.triggerAsyncId();m(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${n} currentUid:${d} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${r.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(n){let i;if(d=o.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(d),i){if(c){let a=o.triggerAsyncId();t._indent-=2,m(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${n} currentUid:${d} triggerId:${a} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}t.exit(i)}else if(c){let a=o.triggerAsyncId();t._indent-=2,m(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${n} currentUid:${d} triggerId:${a} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}},destroy(n){if(d=o.executionAsyncId(),c){let i=o.triggerAsyncId();m(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${d} asyncId:${n} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(t._contexts.get(d))}`)}t._contexts.delete(n)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:_,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){_(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:l},u.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,c&&m(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+d+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),t},u.prototype.get=function(e){if(this.active){if(c){let t=o.executionAsyncId(),n=o.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);m(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+d+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),m(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${d} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} active:${r.inspect(this.active)}`)}return this.active[e]}if(c){let t=o.currentId(),n=o.triggerAsyncId();m(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${d} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length}`)}},u.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=d,c){let t=o.executionAsyncId(),n=o.triggerAsyncId();m(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${d} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} context:${r.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},u.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(c){let e=o.triggerAsyncId(),n=o.executionAsyncId();m(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${d} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} context:${r.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[l]=t),e}finally{if(c){let e=o.triggerAsyncId(),n=o.executionAsyncId();m(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${d} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} ${r.inspect(t)}`)}this.exit(t)}},u.prototype.runAndReturn=function(e){let t;return this.run((function(n){t=e(n)})),t},u.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return c&&m("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+d+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(c&&m("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+d+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[l]=t,c&&m("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+d+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},u.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[l]=t),e}finally{n.exit(t)}}},u.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),c){let t=o.executionAsyncId(),n=o.triggerAsyncId();m(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${d} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}this._set.push(this.active),this.active=e},u.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),c){let t=o.executionAsyncId(),n=o.triggerAsyncId();m(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${d} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(c&&m("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},u.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;a(e,(function(e){!e||(e[s]||(e[s]=Object.create(null)),e[s][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[s])return e;let t=e,n=e[s];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},u.prototype.fromException=function(e){return e[l]},process.namespaces={}})),er=E(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=process.nextTick;process.nextTick=function(){if(!t.enabled)return r.apply(process,arguments);let i=new Array(arguments.length);for(let e=0;e0&&process.once("uncaughtException",(function(){e.post.call(o,s,!0),e.destroy.call(null,s)}))}e.post.call(o,s,!1),e.destroy.call(null,s)},r.apply(process,i)}}})),tr=E(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=global.Promise,i=r.prototype.then;function a(t,n,r,i){return"function"!=typeof t?i?function(t){return function(n){return e.destroy.call(null,t),n}}(r):function(t){return function(n){throw e.destroy.call(null,t),n}}(r):function(){e.pre.call(n,r);try{return t.apply(this,arguments)}finally{e.post.call(n,r,!1),e.destroy.call(null,r)}}}r.prototype.then=function(r,o){if(!t.enabled)return i.call(this,r,o);let s=new n,l=--t.counter;return e.init.call(s,l,0,null,null),i.call(this,a(r,s,l,!0),a(o,s,l,!1))}}})),nr=E(((e,t)=>{"use strict";var r=n(9512);function i(){}function a(){}function o(){}var s=new Map,l=new Map,c=new Map,d=null,u=!1;function p(e,t,n,i,a,o,s){let l=r[n],c=r[i];r[n]=function(){if(!t.enabled)return l.apply(r,arguments);let n=new Array(arguments.length);for(let e=0;e0&&process.once("uncaughtException",(function(){e.post.call(p,_,!0),o.delete(c),e.destroy.call(null,_)}))}e.post.call(p,_,!1),d=null,(s||u)&&(u=!1,o.delete(c),e.destroy.call(null,_))},c=l.apply(r,n),o.set(c,_),c},r[i]=function(t){if(d===t&&null!==t)u=!0;else if(o.has(t)){let n=o.get(t);o.delete(t),e.destroy.call(null,n)}c.apply(r,arguments)}}t.exports=function(){p(this._hooks,this._state,"setTimeout","clearTimeout",i,s,!0),p(this._hooks,this._state,"setInterval","clearInterval",a,l,!1),p(this._hooks,this._state,"setImmediate","clearImmediate",o,c,!0),global.setTimeout=r.setTimeout,global.setInterval=r.setInterval,global.setImmediate=r.setImmediate,global.clearTimeout=r.clearTimeout,global.clearInterval=r.clearInterval,global.clearImmediate=r.clearImmediate}})),rr=E(((e,t)=>{t.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen ",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}})),ir=E(((e,t)=>{"use strict";var n=process.binding("async_wrap"),r=n.Providers.TIMERWRAP,i={nextTick:er(),promise:tr(),timers:nr()},a=new Set;function o(){this.enabled=!1,this.counter=0}function s(){let e=this.initFns=[],t=this.preFns=[],n=this.postFns=[],i=this.destroyFns=[];this.init=function(t,n,i,o){if(n!==r)for(let r of e)r(t,this,n,i,o);else a.add(t)},this.pre=function(e){if(!a.has(e))for(let n of t)n(e,this)},this.post=function(e,t){if(!a.has(e))for(let r of n)r(e,this,t)},this.destroy=function(e){if(a.has(e))a.delete(e);else for(let t of i)t(e)}}function l(e,t){let n=e.indexOf(t);-1!==n&&e.splice(n,1)}function c(){this._state=new o,this._hooks=new s,this.version=rr().version,this.providers=n.Providers;for(let e of Object.keys(i))i[e].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),n.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}s.prototype.add=function(e){e.init&&this.initFns.push(e.init),e.pre&&this.preFns.push(e.pre),e.post&&this.postFns.push(e.post),e.destroy&&this.destroyFns.push(e.destroy)},s.prototype.remove=function(e){e.init&&l(this.initFns,e.init),e.pre&&l(this.preFns,e.pre),e.post&&l(this.postFns,e.post),e.destroy&&l(this.destroyFns,e.destroy)},t.exports=c,c.prototype.addHooks=function(e){this._hooks.add(e)},c.prototype.removeHooks=function(e){this._hooks.remove(e)},c.prototype.enable=function(){this._state.enabled=!0,n.enable()},c.prototype.disable=function(){this._state.enabled=!1,n.disable()}})),ar=E(((e,t)=>{t.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen ",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}})),or=E(((e,t)=>{t.exports=function(e,t){var n=[];n.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return""}catch{return""}}}(e));for(var r=0;r"}catch{i=""}}n.push(" at "+i)}return n.join("\n")}})),sr=E(((e,t)=>{var n=or();function r(){this.extend=new o,this.filter=new o,this.format=new s,this.version=ar().version}var i=!1;r.prototype.callSite=function e(t){t||(t={}),i=!0;var n={};Error.captureStackTrace(n,e);var r=n.stack;return i=!1,r=r.slice(t.slice||0),t.extend&&(r=this.extend._modify(n,r)),t.filter&&(r=this.filter._modify(n,r)),r};var a=new r;function o(){this._modifiers=[]}function s(){this._formater=n,this._previous=void 0}o.prototype._modify=function(e,t){for(var n=0,r=this._modifiers.length;n{if(global._stackChain){if(global._stackChain.version!==ar().version)throw new Error("Conflicting version of stack-chain found");t.exports=global._stackChain}else t.exports=global._stackChain=sr()})),cr=E(((e,t)=>{"use strict";var n=ir();if(global._asyncHook){if(global._asyncHook.version!==rr().version)throw new Error("Conflicting version of async-hook-jl found");t.exports=global._asyncHook}else lr().filter.attach((function(e,t){return t.filter((function(e){let t=e.getFileName();return!(t&&t.slice(0,__dirname.length)===__dirname)}))})),t.exports=global._asyncHook=new n})),dr=E(((e,t)=>{"use strict";var r=n(3837),i=n(9491),a=Zn(),o=cr(),s="cls@contexts",l="error@context",c=[];for(let e in o.providers)c[o.providers[e]]=e;var d,u,p=process.env.DEBUG_CLS_HOOKED,_=-1;function m(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function g(e){return process.namespaces[e]}function h(e){let t=g(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function E(e){process.env.DEBUG&&process._rawDebug(e)}function f(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(t.exports={getNamespace:g,createNamespace:function(e){i.ok(e,"namespace must be given a name."),p&&E("CREATING NAMESPACE "+e);let t=new m(e);return t.id=_,o.addHooks({init(n,i,a,o,s){_=n,o?(t._contexts.set(n,t._contexts.get(o)),p&&E("PARENTID: "+e+" uid:"+n+" parent:"+o+" provider:"+a)):t._contexts.set(_,t.active),p&&E("INIT "+e+" uid:"+n+" parent:"+o+" provider:"+c[a]+" active:"+r.inspect(t.active,!0))},pre(n,i){_=n;let a=t._contexts.get(n);a?(p&&E(" PRE "+e+" uid:"+n+" handle:"+f(i)+" context:"+r.inspect(a)),t.enter(a)):p&&E(" PRE MISSING CONTEXT "+e+" uid:"+n+" handle:"+f(i))},post(n,i){_=n;let a=t._contexts.get(n);a?(p&&E(" POST "+e+" uid:"+n+" handle:"+f(i)+" context:"+r.inspect(a)),t.exit(a)):p&&E(" POST MISSING CONTEXT "+e+" uid:"+n+" handle:"+f(i))},destroy(n){_=n,p&&E("DESTROY "+e+" uid:"+n+" context:"+r.inspect(t._contexts.get(_))+" active:"+r.inspect(t.active,!0)),t._contexts.delete(n)}}),process.namespaces[e]=t,t},destroyNamespace:h,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){h(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:l},m.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return p&&E(" SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+_+" active:"+r.inspect(this.active,!0)),this.active[e]=t,t},m.prototype.get=function(e){if(this.active)return p&&E(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+_+" active:"+r.inspect(this.active,!0)),this.active[e];p&&E(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+_+" active:"+r.inspect(this.active,!0))},m.prototype.createContext=function(){p&&E(" CREATING Context: "+this.name+" uid:"+_+" len:"+this._set.length+" active:"+r.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=_,p&&E(" CREATED Context: "+this.name+" uid:"+_+" len:"+this._set.length+" context:"+r.inspect(e,!0,2,!0)),e},m.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return p&&E(" BEFORE RUN: "+this.name+" uid:"+_+" len:"+this._set.length+" "+r.inspect(t)),e(t),t}catch(e){throw e&&(e[l]=t),e}finally{p&&E(" AFTER RUN: "+this.name+" uid:"+_+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t)}},m.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},m.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return p&&E(" BEFORE runPromise: "+this.name+" uid:"+_+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(p&&E(" AFTER runPromise: "+this.name+" uid:"+_+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[l]=t,p&&E(" AFTER runPromise: "+this.name+" uid:"+_+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},m.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[l]=t),e}finally{n.exit(t)}}},m.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),p&&E(" ENTER "+this.name+" uid:"+_+" len:"+this._set.length+" context: "+r.inspect(e)),this._set.push(this.active),this.active=e},m.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),p&&E(" EXIT "+this.name+" uid:"+_+" len:"+this._set.length+" context: "+r.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(p&&E("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},m.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;a(e,(function(e){!e||(e[s]||(e[s]=Object.create(null)),e[s][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[s])return e;let t=e,n=e[s];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},m.prototype.fromException=function(e){return e[l]},process.namespaces={},o._state&&!o._state.enabled&&o.enable(),p)for(u in(d=lr()).filter._modifiers)d.filter.deattach(u)})),ur=E(((e,t)=>{"use strict";var n=Qn();process&&n.gte(process.versions.node,"8.0.0")?t.exports=Jn():t.exports=dr()})),pr=E(((e,t)=>{var n;e=t.exports=$,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],a=e.src=[],o=0,s=o++;a[s]="0|[1-9]\\d*";var l=o++;a[l]="[0-9]+";var c=o++;a[c]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=o++;a[d]="("+a[s]+")\\.("+a[s]+")\\.("+a[s]+")";var u=o++;a[u]="("+a[l]+")\\.("+a[l]+")\\.("+a[l]+")";var p=o++;a[p]="(?:"+a[s]+"|"+a[c]+")";var _=o++;a[_]="(?:"+a[l]+"|"+a[c]+")";var m=o++;a[m]="(?:-("+a[p]+"(?:\\."+a[p]+")*))";var g=o++;a[g]="(?:-?("+a[_]+"(?:\\."+a[_]+")*))";var h=o++;a[h]="[0-9A-Za-z-]+";var E=o++;a[E]="(?:\\+("+a[h]+"(?:\\."+a[h]+")*))";var f=o++,S="v?"+a[d]+a[m]+"?"+a[E]+"?";a[f]="^"+S+"$";var b="[v=\\s]*"+a[u]+a[g]+"?"+a[E]+"?",v=o++;a[v]="^"+b+"$";var T=o++;a[T]="((?:<|>)?=?)";var y=o++;a[y]=a[l]+"|x|X|\\*";var C=o++;a[C]=a[s]+"|x|X|\\*";var R=o++;a[R]="[v=\\s]*("+a[C]+")(?:\\.("+a[C]+")(?:\\.("+a[C]+")(?:"+a[m]+")?"+a[E]+"?)?)?";var O=o++;a[O]="[v=\\s]*("+a[y]+")(?:\\.("+a[y]+")(?:\\.("+a[y]+")(?:"+a[g]+")?"+a[E]+"?)?)?";var N=o++;a[N]="^"+a[T]+"\\s*"+a[R]+"$";var I=o++;a[I]="^"+a[T]+"\\s*"+a[O]+"$";var A=o++;a[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=o++;a[D]="(?:~>?)";var w=o++;a[w]="(\\s*)"+a[D]+"\\s+",i[w]=new RegExp(a[w],"g");var x=o++;a[x]="^"+a[D]+a[R]+"$";var P=o++;a[P]="^"+a[D]+a[O]+"$";var M=o++;a[M]="(?:\\^)";var L=o++;a[L]="(\\s*)"+a[M]+"\\s+",i[L]=new RegExp(a[L],"g");var k=o++;a[k]="^"+a[M]+a[R]+"$";var F=o++;a[F]="^"+a[M]+a[O]+"$";var U=o++;a[U]="^"+a[T]+"\\s*("+b+")$|^$";var B=o++;a[B]="^"+a[T]+"\\s*("+S+")$|^$";var G=o++;a[G]="(\\s*)"+a[T]+"\\s*("+b+"|"+a[R]+")",i[G]=new RegExp(a[G],"g");var q=o++;a[q]="^\\s*("+a[R]+")\\s+-\\s+("+a[R]+")\\s*$";var H=o++;a[H]="^\\s*("+a[O]+")\\s+-\\s+("+a[O]+")\\s*$";var Y,j=o++;for(a[j]="(<|>)?=?\\s*\\*",Y=0;Y<35;Y++)n(Y,a[Y]),i[Y]||(i[Y]=new RegExp(a[Y]));function V(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $)return e;if("string"!=typeof e||e.length>256)return null;if(!(t.loose?i[v]:i[f]).test(e))return null;try{return new $(e,t)}catch{return null}}function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof $){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof $))return new $(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var a=e.trim().match(t.loose?i[v]:i[f]);if(!a)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new $(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=V(e),r=V(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var a="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==r[o])return i+o;return a},e.compareIdentifiers=W;var z=/^[0-9]+$/;function W(e,t){var n=z.test(e),r=z.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function X(e,t,n){return K(e,t,n)<0}function Z(e,t,n){return 0===K(e,t,n)}function J(e,t,n){return 0!==K(e,t,n)}function ee(e,t,n){return K(e,t,n)>=0}function te(e,t,n){return K(e,t,n)<=0}function ne(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Z(e,n,r);case"!=":return J(e,n,r);case">":return Q(e,n,r);case">=":return ee(e,n,r);case"<":return X(e,n,r);case"<=":return te(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function re(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof re){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof re))return new re(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return W(t,e)},e.major=function(e,t){return new $(e,t).major},e.minor=function(e,t){return new $(e,t).minor},e.patch=function(e,t){return new $(e,t).patch},e.compare=K,e.compareLoose=function(e,t){return K(e,t,!0)},e.rcompare=function(e,t,n){return K(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Q,e.lt=X,e.eq=Z,e.neq=J,e.gte=ee,e.lte=te,e.cmp=ne,e.Comparator=re;var ie={};function ae(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ae)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new ae(e.raw,t);if(e instanceof re)return new ae(e.value,t);if(!(this instanceof ae))return new ae(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function oe(e){return!e||"x"===e.toLowerCase()||"*"===e}function se(e,t,n,r,i,a,o,s,l,c,d,u,p){return((t=oe(n)?"":oe(r)?">="+n+".0.0":oe(i)?">="+n+"."+r+".0":">="+t)+" "+(s=oe(l)?"":oe(c)?"<"+(+l+1)+".0.0":oe(d)?"<"+l+"."+(+c+1)+".0":u?"<="+l+"."+c+"."+d+"-"+u:"<="+s)).trim()}function le(e,t,r){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function ce(e,t,n){try{t=new ae(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,a,o,s,l;switch(e=new $(e,r),t=new ae(t,r),n){case">":i=Q,a=te,o=X,s=">",l=">=";break;case"<":i=X,a=ee,o=Q,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ce(e,t,r))return!1;for(var c=0;c=0.0.0")),u=u||e,p=p||e,i(e.semver,u.semver,r)?u=e:o(e.semver,p.semver,r)&&(p=e)})),u.operator===s||u.operator===l||(!p.operator||p.operator===s)&&a(e,p.semver))return!1;if(p.operator===l&&o(e,p.semver))return!1}return!0}re.prototype.parse=function(e){var t=this.options.loose?i[U]:i[B],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new $(n[2],this.options.loose):this.semver=ie},re.prototype.toString=function(){return this.value},re.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new $(e,this.options)),ne(e,this.operator,this.semver,this.options))},re.prototype.intersects=function(e,t){if(!(e instanceof re))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new ae(e.value,t),ce(this.value,n,t);if(""===e.operator)return n=new ae(this.value,t),ce(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||a&&o||s||l},e.Range=ae,ae.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},ae.prototype.toString=function(){return this.range},ae.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?i[H]:i[q];e=e.replace(r,se),n("hyphen replace",e),e=e.replace(i[G],"$1$2$3"),n("comparator trim",e,i[G]),e=(e=(e=e.replace(i[w],"$1~")).replace(i[L],"$1^")).split(/\s+/).join(" ");var a=t?i[U]:i[B],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?i[F]:i[k];return e.replace(r,(function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),oe(r)?s="":oe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":oe(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+"-"+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?i[P]:i[x];return e.replace(r,(function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),oe(r)?s="":oe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":oe(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),s=">="+r+"."+i+"."+a+"-"+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?i[I]:i[N];return e.replace(r,(function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var l=oe(i),c=l||oe(a),d=c||oe(o);return"="===r&&d&&(r=""),l?t=">"===r||"<"===r?"<0.0.0":"*":r&&d?(c&&(a=0),o=0,">"===r?(r=">=",c?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":d&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(i[j],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(a)}))),o.map((function(e){return new re(e,this.options)}),this)},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new ae(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},ae.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new $(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Q(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new ae(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=V(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new ae(e,n),t=new ae(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof $)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:V(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),_r=E(((e,t)=>{var n,r,i,a,o,s=Xn().wrap,l=[],c=0,d=!1,u=[];function p(e,t){var n=e.length,r=t.length,i=[];if(0===n&&0===r)return i;for(var a=0;a0&&(l=u.pop()),a=void 0,n&&!d},r=function(e,t,n){var r=[];d=!0;for(var i=0;i0&&t[i].before(this,r[t[i].uid]);d=!1;var o=e.apply(this,arguments);for(d=!0,i=0;i0&&t[i].after(this,r[t[i].uid]);return d=!1,l=u.pop(),a=void 0,o}},s(process,"_fatalException",(function(e){return function(t){return n(t)||e(t)}}))):(o=!1,n=function(e){if(o)throw e;for(var t=!1,n=l.length,r=0;r0&&t[_].before(this,i[t[_].uid]);d=!1;try{a=e.apply(this,arguments)}catch(e){for(s=!0,_=0;_0&&t[_].after(this,i[t[_].uid]);d=!1}l=u.pop()}return a}},process.addListener("uncaughtException",n)),_.prototype.create=void 0,_.prototype.before=void 0,_.prototype.after=void 0,_.prototype.error=void 0,_.prototype.data=void 0,_.prototype.uid=0,_.prototype.flags=0,process.createAsyncListener=m,process.addAsyncListener=function(e,t){var n;n=e instanceof _?e:m(e,t);for(var r=!1,i=0;i0)return r(e,n,t);return function(e,t,n){d=!0;for(var r=0;r{"use strict";t.exports=(e,t)=>class extends e{constructor(e){var n,r;super((function(e,a){n=this,r=[function(n){return t(i,!1),e(n)},function(e){return t(i,!1),a(e)}]}));var i=this;try{e.apply(n,r)}catch(e){r[1](e)}return i}}})),gr=E((()=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var e=Xn(),t=pr(),r=e.wrap,i=e.massWrap,a=_r(),o=n(3837),s=t.gte(process.version,"6.0.0"),l=t.gte(process.version,"7.0.0"),c=t.gte(process.version,"8.0.0"),d=t.gte(process.version,"11.0.0"),u=n(1808);function p(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=a(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=a(this._handle.onconnection))}}}function _(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=a(t._originalOnread)}}l&&!u._normalizeArgs?u._normalizeArgs=function(e){if(0===e.length)return[{},null];var t=e[0],n={};"object"==typeof t&&null!==t?n=t:function(e){return"string"==typeof e&&!1===function(e){return(e=Number(e))>=0&&e}(e)}(t)?n.path=t:(n.port=t,e.length>1&&"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"!=typeof r?[n,null]:[n,r]}:!l&&!u._normalizeConnectArgs&&(u._normalizeConnectArgs=function(e){var t,n={};"object"==typeof e[0]&&null!==e[0]?n=e[0]:"string"==typeof e[0]&&!1===(t=e[0],(t=Number(t))>=0&&t)?n.path=e[0]:(n.port=e[0],"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"==typeof r?[n,r]:[n]}),"_setUpListenHandle"in u.Server.prototype?r(u.Server.prototype,"_setUpListenHandle",p):r(u.Server.prototype,"_listen2",p),r(u.Socket.prototype,"connect",(function(e){return function(){var t;(t=c&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:l?u._normalizeArgs(arguments):u._normalizeConnectArgs(arguments))[1]&&(t[1]=a(t[1]));var n=e.apply(this,t);return _(this),n}}));var m=n(3685);r(m.Agent.prototype,"addRequest",(function(e){return function(t){var n=t.onSocket;return t.onSocket=a((function(e){return _(e),n.apply(this,arguments)})),e.apply(this,arguments)}}));var g=n(2081);function h(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=a(e._handle.onread),r(e._handle,"close",D))})),e._handle&&(e._handle.onexit=a(e._handle.onexit))}g.ChildProcess?r(g.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return h(this),t}})):i(g,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return h(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var E=[];process._nextDomainTick&&E.push("_nextDomainTick"),process._tickDomainCallback&&E.push("_tickDomainCallback"),i(process,E,A),r(process,"nextTick",D);var f=["setTimeout","setInterval"];global.setImmediate&&f.push("setImmediate");var S=n(9512),b=global.setTimeout===S.setTimeout;i(S,f,D),b&&i(global,f,D);var v=n(9523);i(v,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],A),v.resolveNaptr&&r(v,"resolveNaptr",A);var T,y,C,R=n(7147);i(R,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],A),R.lchown&&r(R,"lchown",A),R.lchmod&&r(R,"lchmod",A),R.ftruncate&&r(R,"ftruncate",A);try{T=n(9796)}catch{}T&&T.Deflate&&T.Deflate.prototype&&((y=Object.getPrototypeOf(T.Deflate.prototype))._transform?r(y,"_transform",A):y.write&&y.flush&&y.end&&i(y,["write","flush","end"],A));try{C=n(6113)}catch{}C&&(O=["pbkdf2","randomBytes"],d||O.push("pseudoRandomBytes"),i(C,O,A));var O,N,I=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();function A(e){var t=function(){var t,n=arguments.length-1;if("function"==typeof arguments[n]){t=Array(arguments.length);for(var r=0;r{"use strict";var r=n(9491),i=Zn(),a="cls@contexts",o="error@context";function s(e){this.name=e,this.active=null,this._set=[],this.id=null}function l(e){return process.namespaces[e]}function c(e){var t=l(e);r.ok(t,"can't delete nonexistent namespace!"),r.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function d(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){c(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||gr(),s.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},s.prototype.get=function(e){if(this.active)return this.active[e]},s.prototype.createContext=function(){return Object.create(this.active)},s.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[o]=t),e}finally{this.exit(t)}},s.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},s.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[o]=t),e}finally{n.exit(t)}}},s.prototype.enter=function(e){r.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},s.prototype.exit=function(e){if(r.ok(e,"context must be provided for exiting"),this.active===e)return r.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);r.ok(t>=0,"context not currently entered; can't exit"),r.ok(t,"can't remove top context"),this._set.splice(t,1)},s.prototype.bindEmitter=function(e){r.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,n="context@"+this.name;i(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;var t=e,n=e[a];return Object.keys(n).forEach((function(e){var r=n[e];t=r.namespace.bind(t,r.context)})),t}))},s.prototype.fromException=function(e){return e[o]},process.namespaces||d(),t.exports={getNamespace:l,createNamespace:function(e){r.ok(e,"namespace must be given a name!");var t=new s(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,n){n&&t.enter(n)},after:function(e,n){n&&t.exit(n)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:c,reset:d}})),Er=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorrelationContextManager=void 0;var t=b(),n=Xt(),r=tn(),i=nn(),a=Kn(),o=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,n,r,i,a){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:a},customProperties:new s(r)}:null},e.spanToContextObject=function(t,n,i){var a=new r;return a.traceId=t.traceId,a.spanId=t.spanId,a.traceFlag=r.formatOpenTelemetryTraceFlags(t.traceFlags)||r.DEFAULT_TRACE_FLAG,a.parentId=n,e.generateContextObject(a.traceId,a.parentId,i,null,a)},e.runWithContext=function(t,n){var r;return e.enabled?e.session.bind(n,((r={})[e.CONTEXT_NAME]=t,r))():n()},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t,n){var r;return e.enabled?e.session.bind(t,n?((r={})[e.CONTEXT_NAME]=n,r):void 0):t},e.enable=function(t){if(!this.enabled){if(!this.isNodeVersionCompatible())return void(this.enabled=!1);e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,typeof this.cls>"u"&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=ur():this.cls=hr()),e.session=this.cls.createNamespace("AI-CLS-Session"),n.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0}},e.startOperation=function(n,o){var s=n&&n.traceContext||null,l=n&&n.traceId?n:null,c=n&&n.headers;if(l){var d=new r("00-"+l.traceId+"-"+l.spanId+"-01"),u=new i(l.traceState?l.traceState.serialize():null);return e.generateContextObject(l.traceId,"|"+l.traceId+"."+l.spanId+".","string"==typeof o?o:"",void 0,d,u)}if(s){d=new r(s.traceparent),u=new i(s.tracestate);var p="object"==typeof o?new a(o):null;return e.generateContextObject(d.traceId,d.parentId,"string"==typeof o?o:p.getOperationName({}),p&&p.getCorrelationContextHeader()||void 0,d,u)}return c?(d=new r(c.traceparent?c.traceparent.toString():null),u=new i(c.tracestate?c.tracestate.toString():null),p=new a(n),e.generateContextObject(d.traceId,d.parentId,p.getOperationName({}),p.getCorrelationContextHeader(),d,u)):(t.warn("startOperation was called with invalid arguments",arguments),null)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,r=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&n)&&r},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();e.CorrelationContextManager=o;var s=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(zr(),e),n(Wr(),e),n(Kr(),e),n(Qr(),e)})),Zr=E(((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(o,s)}l((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,d.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref()):this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer)},e.prototype.send=function(t,n){return r(this,void 0,void 0,(function(){var r,a,o,s,c=this;return i(this,(function(i){return t&&(r=this._redirectedHost||this._config.endpointUrl,a={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},o="",t.forEach((function(e){var t=c._stringify(e);"string"==typeof t&&(o+=t+"\n")})),o.length>0&&(o=o.substring(0,o.length-1)),s=Buffer.from?Buffer.from(o):new Buffer(o),l.gzip(s,(function(i,o){var l=o;i?(d.warn(i),l=s,a.headers["Content-Length"]=s.length.toString()):(a.headers["Content-Encoding"]="gzip",a.headers["Content-Length"]=o.length.toString()),d.info(e.TAG,a),a[u.disableCollectionRequestOption]=!0;var _=p.makeRequest(c._config,r,a,(function(r){r.setEncoding("utf-8");var i="";r.on("data",(function(e){i+=e})),r.on("end",(function(){if(c._numConsecutiveFailures=0,c._enableDiskRetryMode)if(200===r.statusCode)c._resendTimer||(c._resendTimer=setTimeout((function(){c._resendTimer=null,c._sendFirstFileOnDisk()}),c._resendInterval),c._resendTimer.unref());else if(c._isRetriable(r.statusCode))try{var a=JSON.parse(i),o=[];a.errors.forEach((function(e){c._isRetriable(e.statusCode)&&o.push(t[e.index])})),o.length>0&&c._storeToDisk(o)}catch{c._storeToDisk(t)}if(307===r.statusCode||308===r.statusCode)if(c._numConsecutiveRedirects++,c._numConsecutiveRedirects<10){var s=r.headers.location?r.headers.location.toString():null;s&&(c._redirectedHost=s,c.send(t,n))}else"function"==typeof n&&n("Error sending telemetry because of circular redirects.");else c._numConsecutiveRedirects=0,"function"==typeof n&&n(i),d.info(e.TAG,i),"function"==typeof c._onSuccess&&c._onSuccess(i)}))}));_.on("error",(function(r){if(c._numConsecutiveFailures++,!c._enableDiskRetryMode||c._numConsecutiveFailures>0&&c._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var i="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";c._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+c._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),d.warn(e.TAG,i,p.dumpObj(r))}else i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",d.info(e.TAG,i,p.dumpObj(r));c._onErrorHelper(r),"function"==typeof n&&(r&&n(p.dumpObj(r)),n("Error sending telemetry")),c._enableDiskRetryMode&&c._storeToDisk(t)})),_.write(l),_.end()}))),[2]}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(this._stringify(e))},e.prototype._isRetriable=function(e){return 206===e||408===e||429===e||439===e||500===e||503===e},e.prototype._runICACLS=function(t,n){var r=c.spawn(e.ICACLS_PATH,t,{windowsHide:!0});r.on("error",(function(e){return n(e)})),r.on("close",(function(e,t){return n(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))}))},e.prototype._runICACLSSync=function(t){if(!c.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var n=c.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(n.error)throw n.error;if(0!==n.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var n=c.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),r="";n.stdout.on("data",(function(e){return r+=e})),n.on("error",(function(e){return t(e,null)})),n.on("close",(function(n,i){return e.ACL_IDENTITY=r&&r.trim(),t(0===n?null:new Error("Getting ACL identity did not succeed (PS returned code "+n+")"),e.ACL_IDENTITY)}))},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(c.spawnSync){var t=c.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,n){var r=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?n(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity((function(i,a){if(i)return e.ACLED_DIRECTORIES[t]=!1,n(i);r._runICACLS(r._getACLArguments(t,a),(function(r){return e.ACLED_DIRECTORIES[t]=!r,n(r)}))}))):n(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var n=this;a.lstat(e,(function(r,i){r&&"ENOENT"===r.code?a.mkdir(e,(function(r){r&&"EEXIST"!==r.code?t(r):n._applyACLRules(e,t)})):!r&&i.isDirectory()?n._applyACLRules(e,t):t(r||new Error("Path existed but was not a directory"))}))},e.prototype._getShallowDirectorySize=function(e,t){a.readdir(e,(function(n,r){if(n)return t(n,-1);var i=null,o=0,l=0;if(0!==r.length)for(var c=0;cn._maxBytesOnDisk)d.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+i);else{var o=(new Date).getTime()+".ai.json",l=s.join(n._tempDir,o);d.info(e.TAG,"saving data to disk at: "+l),a.writeFile(l,n._stringify(t),{mode:384},(function(e){return n._onErrorHelper(e)}))}}))}))},e.prototype._storeToDiskSync=function(t){try{d.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),a.existsSync(this._tempDir)||a.mkdirSync(this._tempDir),this._applyACLRulesSync(this._tempDir);var n=this._getShallowDirectorySizeSync(this._tempDir);if(n>this._maxBytesOnDisk)return void d.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+n);var r=(new Date).getTime()+".ai.json",i=s.join(this._tempDir,r);d.info(e.TAG,"saving data before crash to disk at: "+i),a.writeFileSync(i,t,{mode:384})}catch(t){d.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var e=this;a.exists(this._tempDir,(function(t){t&&a.readdir(e._tempDir,(function(t,n){if(t)e._onErrorHelper(t);else if((n=n.filter((function(e){return s.basename(e).indexOf(".ai.json")>-1}))).length>0){var r=n[0],i=s.join(e._tempDir,r);a.readFile(i,(function(t,n){t?e._onErrorHelper(t):a.unlink(i,(function(t){if(t)e._onErrorHelper(t);else try{var r=JSON.parse(n.toString());e.send(r)}catch(e){d.warn("Failed to read persisted file",e)}}))}))}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){d.warn("Failed to serialize payload",t,e)}},e.prototype._fileCleanupTask=function(){var t=this;a.exists(this._tempDir,(function(n){n&&a.readdir(t._tempDir,(function(n,r){n?t._onErrorHelper(n):(r=r.filter((function(e){return s.basename(e).indexOf(".ai.json")>-1}))).length>0&&r.forEach((function(n){var r=new Date(parseInt(n.split(".ai.json")[0]));if(new Date(+new Date-e.FILE_RETEMPTION_PERIOD)>r){var i=s.join(t._tempDir,n);a.unlink(i,(function(e){e&&t._onErrorHelper(e)}))}}))}))}))},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===o.type(),e}();t.exports=_})),Jr=E(((e,t)=>{"use strict";var n=zn(),r=Jt(),i=Er(),a=function(){function e(){}return e.createEnvelope=function(t,i,a,o,s){var l=null;switch(i){case n.TelemetryType.Trace:l=e.createTraceData(t);break;case n.TelemetryType.Dependency:l=e.createDependencyData(t);break;case n.TelemetryType.Event:l=e.createEventData(t);break;case n.TelemetryType.Exception:l=e.createExceptionData(t);break;case n.TelemetryType.Request:l=e.createRequestData(t);break;case n.TelemetryType.Metric:l=e.createMetricData(t);break;case n.TelemetryType.Availability:l=e.createAvailabilityData(t);break;case n.TelemetryType.PageView:l=e.createPageViewData(t)}if(a&&n.domainSupportsProperties(l.baseData)){if(l&&l.baseData)if(l.baseData.properties)for(var c in a)l.baseData.properties[c]||(l.baseData.properties[c]=a[c]);else l.baseData.properties=a;l.baseData.properties=r.validateStringMap(l.baseData.properties)}var d=s&&s.instrumentationKey||"",u=new n.Envelope;return u.data=l,u.iKey=d,u.name="Microsoft.ApplicationInsights."+d.replace(/-/g,"")+"."+l.baseType.substr(0,l.baseType.length-4),u.tags=this.getTags(o,t.tagOverrides),u.time=(new Date).toISOString(),u.ver=1,u.sampleRate=s?s.samplingPercentage:100,i===n.TelemetryType.Metric&&(u.sampleRate=100),u},e.createTraceData=function(e){var t=new n.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Information:t.severityLevel=e.severity;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Trace),r.baseData=t,r},e.createDependencyData=function(e){var t=new n.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=r.w3cTraceId();var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Dependency),i.baseData=t,i},e.createEventData=function(e){var t=new n.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Event),r.baseData=t,r},e.createExceptionData=function(e){var t=new n.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var i=e.exception.stack,a=new n.ExceptionDetails;a.message=e.exception.message,a.typeName=e.exception.name,a.parsedStack=this.parseStack(i),a.hasFullStack=r.isArray(a.parsedStack)&&a.parsedStack.length>0,t.exceptions.push(a);var o=new n.Data;return o.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Exception),o.baseData=t,o},e.createRequestData=function(e){var t=new n.RequestData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=r.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Request),i.baseData=t,i},e.createMetricData=function(e){var t=new n.MetricData;t.metrics=[];var r=new n.DataPoint;r.count=isNaN(e.count)?1:e.count,r.kind=n.DataPointType.Aggregation,r.max=isNaN(e.max)?e.value:e.max,r.min=isNaN(e.min)?e.value:e.min,r.name=e.name,r.stdDev=isNaN(e.stdDev)?0:e.stdDev,r.value=e.value,t.metrics.push(r),t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new n.AvailabilityData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Availability),i.baseData=t,i},e.createPageViewData=function(e){var t=new n.PageViewData;t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.PageView),i.baseData=t,i},e.getTags=function(e,t){var n=i.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var a in e.tags)r[a]=e.tags[a];if(t)for(var a in t)r[a]=t[a];return n&&(r[e.keys.operationId]=r[e.keys.operationId]||n.operation.id,r[e.keys.operationName]=r[e.keys.operationName]||n.operation.name,r[e.keys.operationParentId]=r[e.keys.operationParentId]||n.operation.parentId),r},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,a=0;a<=n.length;a++){var s=n[a];if(o.regex.test(s)){var l=new o(n[a],r++);i+=l.sizeInBytes,t.push(l)}}if(i>32768)for(var c=0,d=t.length-1,u=0,p=c,_=d;c32768){var m=_-p+1;t.splice(p,m);break}p=c,_=d,c++,d--}}return t},e}(),o=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="",this.assembly=r.trim(t);var i=t.match(e.regex);i&&i.length>=5&&(this.method=r.trim(i[2])||this.method,this.fileName=r.trim(i[4])||"",this.line=parseInt(i[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();t.exports=a})),ei=E(((e,t)=>{"use strict";var r=n(7310),i=jr(),a=Ir(),o=zn(),s=$r(),l=Xr(),c=Er(),d=Zr(),u=Jt(),p=b(),_=Jr(),m=function(){function e(e){this._telemetryProcessors=[],this._enableAzureProperties=!1;var t=new i(e);this.config=t,this.context=new a,this.commonProperties={};var n=new d(this.config);this.channel=new s((function(){return t.disableAppInsights}),(function(){return t.maxBatchSize}),(function(){return t.maxBatchIntervalMs}),n)}return e.prototype.trackAvailability=function(e){this.track(e,o.TelemetryType.Availability)},e.prototype.trackPageView=function(e){this.track(e,o.TelemetryType.PageView)},e.prototype.trackTrace=function(e){this.track(e,o.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,o.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!u.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,o.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,o.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,o.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=r.parse(e.data).host),this.track(e,o.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&o.telemetryTypeToBaseType(t)){var n=_.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString()),this._enableAzureProperties&&l.azureRoleEnvironmentTelemetryProcessor(n,this.context);var r=this.runTelemetryProcessors(n,e.contextObjects);r=r&&l.samplingTelemetryProcessor(n,{correlationContext:c.CorrelationContextManager.getCurrentContext()}),l.preAggregatedMetricsTelemetryProcessor(n,this.context),r&&(l.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),this.channel.send(n))}else p.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.setAutoPopulateAzureProperties=function(e){this._enableAzureProperties=e},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var n=!0,r=this._telemetryProcessors.length;if(0===r)return n;(t=t||{}).correlationContext=c.CorrelationContextManager.getCurrentContext();for(var i=0;i{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=ei(),a=Ur(),o=kr(),s=b(),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?a.trackRequestSync(this,e):s.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&s.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?a.trackRequest(this,e):s.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?o.trackRequest(this,e):s.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(i);t.exports=l})),ni=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ri=E((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.Configuration=e.wrapWithCorrelationContext=e.startOperation=e.getCorrelationContext=e.start=e.setup=e.liveMetricsClient=e.defaultClient=e.DistributedTracingModes=void 0;var t,n,r=Er(),i=vr(),a=Tr(),o=Cr(),s=Nr(),l=Fr(),c=kr(),d=Ur(),u=en(),p=b(),_=Hr(),m=Vr();e.TelemetryClient=ti(),e.Contracts=zn(),e.azureFunctionsTypes=ni(),(n=t=e.DistributedTracingModes||(e.DistributedTracingModes={}))[n.AI=0]="AI",n[n.AI_AND_W3C=1]="AI_AND_W3C";var g,h,E,f,S,v,T,y,C,R,O,N=!0,I=!1,A=!0,D=!0,w=!0,x=!1,P=!0,M=!0,L=!0,k=!0,F=!1,U=!0,B=void 0,G=void 0,q=!1;function H(){return e.defaultClient?(q=!0,E.enable(N,I),f.enable(A),S.enable(D),v.enable(w),T.enable(x,e.defaultClient.config),y.enable(U,h),C.useAutoCorrelation(k,g),C.enable(P),R.enable(M),e.liveMetricsClient&&F&&e.liveMetricsClient.enable(F)):p.warn("Start cannot be called before setup"),Y}e.setup=function(t){return e.defaultClient?p.info("The default client is already setup"):(e.defaultClient=new e.TelemetryClient(t),E=new i(e.defaultClient),f=new a(e.defaultClient),S=new o(e.defaultClient),v=new s(e.defaultClient),T=new l(e.defaultClient),C=new d(e.defaultClient),R=new c(e.defaultClient),y||(y=new m.AutoCollectNativePerformance(e.defaultClient))),e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(L,B,G),Y},e.start=H,e.getCorrelationContext=function(){return k?r.CorrelationContextManager.getCurrentContext():null},e.startOperation=function(e,t){return r.CorrelationContextManager.startOperation(e,t)},e.wrapWithCorrelationContext=function(e,t){return r.CorrelationContextManager.wrapCallback(e,t)};var Y=function(){function n(){}return n.setDistributedTracingMode=function(e){return u.w3cEnabled=e===t.AI_AND_W3C,n},n.setAutoCollectConsole=function(e,t){return void 0===t&&(t=!1),N=e,I=t,q&&E.enable(e,t),n},n.setAutoCollectExceptions=function(e){return A=e,q&&f.enable(e),n},n.setAutoCollectPerformance=function(e,t){void 0===t&&(t=!0),D=e;var r=m.AutoCollectNativePerformance.parseEnabled(t);return U=r.isEnabled,h=r.disabledMetrics,q&&(S.enable(e),y.enable(r.isEnabled,r.disabledMetrics)),n},n.setAutoCollectPreAggregatedMetrics=function(e){return w=e,q&&v.enable(e),n},n.setAutoCollectHeartbeat=function(t){return x=t,q&&T.enable(t,e.defaultClient.config),n},n.setAutoCollectRequests=function(e){return P=e,q&&C.enable(e),n},n.setAutoCollectDependencies=function(e){return M=e,q&&R.enable(e),n},n.setAutoDependencyCorrelation=function(e,t){return k=e,g=t,q&&C.useAutoCorrelation(e,t),n},n.setUseDiskRetryCaching=function(t,r,i){return L=t,B=r,G=i,e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(t,r,i),n},n.setInternalLogging=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!0),p.enableDebug=e,p.disableWarnings=!t,n},n.setSendLiveMetrics=function(t){return void 0===t&&(t=!1),e.defaultClient?(!e.liveMetricsClient&&t?(e.liveMetricsClient=new _(e.defaultClient.config,null),O=new o(e.liveMetricsClient,1e3,!0),e.liveMetricsClient.addCollector(O),e.defaultClient.quickPulseClient=e.liveMetricsClient):e.liveMetricsClient&&e.liveMetricsClient.enable(t),F=t,n):(p.warn("Live metrics client cannot be setup without the default client"),n)},n.start=H,n}();e.Configuration=Y,e.dispose=function(){u.w3cEnabled=!0,e.defaultClient=null,q=!1,E&&E.dispose(),f&&f.dispose(),S&&S.dispose(),v&&v.dispose(),T&&T.dispose(),y&&y.dispose(),C&&C.dispose(),R&&R.dispose(),e.liveMetricsClient&&(e.liveMetricsClient.enable(!1),F=!1,e.liveMetricsClient=void 0)}})),ii={};((e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(ii,{default:()=>ci}),e.exports=(r=ii,f(a({},"__esModule",{value:!0}),r));var ai=S(n(2037)),oi=S(n(9496)),si=S(n(5687)),li=class{constructor(e){this.vscodeAPI=e}getTelemetryLevel(){try{let e=this.vscodeAPI.env.telemetryConfiguration;return e.isUsageEnabled&&e.isErrorsEnabled&&e.isCrashEnabled?"on":e.isErrorsEnabled&&e.isCrashEnabled?"error":"off"}catch{return void 0!==this.vscodeAPI.env.isTelemetryEnabled?this.vscodeAPI.env.isTelemetryEnabled?"on":"off":this.vscodeAPI.workspace.getConfiguration("telemetry").get("enableTelemetry")?"on":"off"}}static applyReplacements(e,t){for(let n of Object.keys(e))for(let r of t)r.lookup.test(n)&&(void 0!==r.replacementString?e[n]=r.replacementString:delete e[n])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getInstance(e){return li._instance||(li._instance=new li(e)),li._instance}},ci=class extends class{constructor(e,t,n,r,i,a){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=n,this.osShim=r,this.vscodeAPI=i,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!a,this.updateUserOptStatus(),void 0!==i.env.onDidChangeTelemetryEnabled?(this.disposables.push(i.env.onDidChangeTelemetryEnabled((()=>this.updateUserOptStatus()))),this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))):this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))}updateUserOptStatus(){let e=li.getInstance(this.vscodeAPI).getTelemetryLevel();this.userOptIn="on"===e,this.errorOptIn="error"===e||this.userOptIn,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach((n=>{0===e.indexOf(`${n}`)&&(t=n)})),t}get extension(){return void 0===this._extension&&(this._extension=this.vscodeAPI.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let n={};for(let r in e)n[r]=t(r,e[r]);return n}shouldSendErrorTelemetry(){return!(!1===this.errorOptIn||this.firstParty&&this.vscodeAPI.env.remoteName&&"other"===this.cleanRemoteName(this.vscodeAPI.env.remoteName))}getCommonProperties(){let e={};if(e["common.os"]=this.osShim.platform,e["common.nodeArch"]=this.osShim.architecture,e["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,this.vscodeAPI&&this.vscodeAPI.env){switch(e["common.vscodemachineid"]=this.vscodeAPI.env.machineId,e["common.vscodesessionid"]=this.vscodeAPI.env.sessionId,e["common.vscodeversion"]=this.vscodeAPI.version,e["common.isnewappinstall"]=this.vscodeAPI.env.isNewAppInstall?this.vscodeAPI.env.isNewAppInstall.toString():"false",e["common.product"]=this.vscodeAPI.env.appHost,this.vscodeAPI.env.uiKind){case this.vscodeAPI.UIKind.Web:e["common.uikind"]="web";break;case this.vscodeAPI.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(this.vscodeAPI.env.remoteName)}return e}anonymizeFilePaths(e,t){let n;if(null==e)return"";let r=[];""!==this.vscodeAPI.env.appRoot&&r.push(new RegExp(this.vscodeAPI.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let i=e;if(t){let t=[];for(let i of r)for(;(n=i.exec(e))&&n;)t.push([n.index,i.lastIndex]);let a=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,o=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,s=0;for(i="";(n=o.exec(e))&&n;)n[0]&&!a.test(n[0])&&t.every((([e,t])=>n.index=t))&&(i+=e.substring(s,n.index)+"",s=o.lastIndex);s":i.test(r)?t[n]="":a.test(r)?t[n]="":t[n]=r}return t}get telemetryLevel(){switch(li.getInstance(this.vscodeAPI).getTelemetryLevel()){case"on":return"all";case"error":return"error";case"off":return"off"}}internalSendTelemetryEvent(e,t,n,r,i){if((this.userOptIn||i)&&""!==e){if(t=g(g({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!0,!1)}sendRawTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!1,!1)}sendDangerousTelemetryEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryEvent(e,t,n,r,!0)}internalSendTelemetryErrorEvent(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&""!==e){if(t=g(g({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryErrorEvent(e,t,n){this.internalSendTelemetryErrorEvent(e,t,n,!0,!1)}sendDangerousTelemetryErrorEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryErrorEvent(e,t,n,r,!0)}internalSendTelemetryException(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&e){if(t=g(g({},t),this.getCommonProperties()),r){let n=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));e.stack&&(e.stack=this.anonymizeFilePaths(e.stack,this.firstParty)),t=this.removePropertiesWithPossibleUserInfo(n)}t=t??{},n=n??{},this.telemetryAppender.logException(e,{properties:t,measurements:n})}}sendTelemetryException(e,t,n){this.internalSendTelemetryException(e,t,n,!0,!1)}sendDangerousTelemetryException(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryException(e,t,n,r,!0)}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map((e=>e.dispose())))}}{constructor(e,t,r,i,a){let o=e=>(async(e,t)=>{let n;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";let t=await Promise.resolve().then((()=>S(ri())));t.defaultClient?(n=new t.TelemetryClient(e),n.channel.setUseDiskRetryCaching(!0)):(t.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),n=t.defaultClient),oi&&oi.env&&(n.context.tags[n.context.keys.userId]=oi.env.machineId,n.context.tags[n.context.keys.sessionId]=oi.env.sessionId,n.context.tags[n.context.keys.cloudRole]=oi.env.appName,n.context.tags[n.context.keys.cloudRoleInstance]=oi.env.appName),e&&0===e.indexOf("AIF-")&&(n.config.endpointUrl="https://mobile.events.data.microsoft.com/collect/v1")}catch(e){return Promise.reject("Failed to initialize app insights!\n"+e.message)}return null!=t&&t.length&&function(e,t){e.addTelemetryProcessor((e=>(Array.isArray(e.tags)?e.tags.forEach((e=>li.applyReplacements(e,t))):e.tags&&li.applyReplacements(e.tags,t),e.data.baseData&&li.applyReplacements(e.data.baseData,t),!0)))}(n,t),{logEvent:(e,t)=>{try{null==n||n.trackEvent({name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{try{null==n||n.trackException({exception:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log exception to app insights!\n"+e.message)}},flush:async()=>{try{null==n||n.flush()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,a);li.shouldUseOneDataSystemSDK(r)&&(o=e=>(async(e,t,r)=>{let i=await(async(e,t,r)=>{let i=await Promise.all([n.e(939),n.e(164)]).then(n.bind(n,7164)),a=await Promise.all([n.e(939),n.e(391)]).then(n.bind(n,3391)),o=new i.AppInsightsCore,s=new a.PostChannel,l={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[s]]};if(r){l.extensionConfig={};let e={alwaysUseXhrOverride:!0,httpXHROverride:r};l.extensionConfig[s.identifier]=e}let c=t.workspace.getConfiguration("telemetry").get("internalTesting");return o.initialize(l,[]),o.addTelemetryInitializer((e=>{!c||(e.ext=e.ext??{},e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)})),o})(e,t,r);return{logEvent:(e,t)=>{try{null==i||i.track({name:e,baseData:{name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{throw new Error("1DS SDK does not support logging exceptions, please use logEvent for exception tracking")},flush:async()=>{try{null==i||i.unload()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,oi,{sendPOST:(e,t)=>{let n={method:"POST",headers:h(g({},e.headers),{"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)})};try{let r=si.request(e.urlString,n,(e=>{e.on("data",(function(n){t(e.statusCode??200,e.headers,n.toString())})),e.on("error",(function(){t(0,{})}))}));r.write(e.data),r.end()}catch{t(0,{})}}}));let s=new class{constructor(e,t){this._instantiationStatus=0,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):2!==this._instantiationStatus&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):2!==this._instantiationStatus&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await this._telemetryClient.flush(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach((({eventName:e,data:t})=>this.logEvent(e,t))),this._eventQueue=[],this._exceptionQueue.forEach((({exception:e,data:t})=>this.logException(e,t))),this._exceptionQueue=[]}instantiateAppender(){0===this._instantiationStatus&&(this._instantiationStatus=1,this._clientFactory(this._key).then((e=>{this._telemetryClient=e,this._instantiationStatus=2,this._flushQueues()})).catch((e=>{console.error(e),this._instantiationStatus=2})))}}(r,o);r&&(0===r.indexOf("AIF-")||li.shouldUseOneDataSystemSDK(r))&&(i=!0),super(e,t,s,{release:ai.release(),platform:ai.platform(),architecture:ai.arch()},oi,i)}}},5029:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=5029,e.exports=t},3437:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=3437,e.exports=t},9669:(e,t,n)=>{e.exports=n(1609)},7970:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),a=n(4097),o=n(5327),s=n(3685),l=n(5687),c=n(938).http,d=n(938).https,u=n(7310),p=n(9796),_=n(7288).version,m=n(5061),g=n(481),h=n(7874),E=n(5263),f=/https:?/;function S(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,S(e,t,e.href)}}e.exports=function(e){return new Promise((function(t,n){var b;function v(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}var T=function(e){v(),t(e)},y=!1,C=function(e){v(),y=!0,n(e)},R=e.data,O=e.headers,N={};if(Object.keys(O).forEach((function(e){N[e.toLowerCase()]=e})),"user-agent"in N?O[N["user-agent"]]||delete O[N["user-agent"]]:O["User-Agent"]="axios/"+_,R&&!r.isStream(R)){if(Buffer.isBuffer(R));else if(r.isArrayBuffer(R))R=Buffer.from(new Uint8Array(R));else{if(!r.isString(R))return C(m("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));R=Buffer.from(R,"utf-8")}if(e.maxBodyLength>-1&&R.length>e.maxBodyLength)return C(m("Request body larger than maxBodyLength limit",e));N["content-length"]||(O["Content-Length"]=R.length)}var I=void 0;e.auth&&(I=(e.auth.username||"")+":"+(e.auth.password||""));var A=a(e.baseURL,e.url),D=u.parse(A),w=D.protocol||"http:";if(!I&&D.auth){var x=D.auth.split(":");I=(x[0]||"")+":"+(x[1]||"")}I&&N.authorization&&delete O[N.authorization];var P=f.test(w),M=P?e.httpsAgent:e.httpAgent;try{o(D.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){var L=new Error(t.message);L.config=e,L.url=e.url,L.exists=!0,C(L)}var k={path:o(D.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:O,agent:M,agents:{http:e.httpAgent,https:e.httpsAgent},auth:I};e.socketPath?k.socketPath=e.socketPath:(k.hostname=D.hostname,k.port=D.port);var F,U=e.proxy;if(!U&&!1!==U){var B=w.slice(0,-1)+"_proxy",G=process.env[B]||process.env[B.toUpperCase()];if(G){var q=u.parse(G),H=process.env.no_proxy||process.env.NO_PROXY,Y=!0;if(H&&(Y=!H.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&D.hostname.substr(D.hostname.length-e.length)===e||D.hostname===e)}))),Y&&(U={host:q.hostname,port:q.port,protocol:q.protocol},q.auth)){var j=q.auth.split(":");U.auth={username:j[0],password:j[1]}}}}U&&(k.headers.host=D.hostname+(D.port?":"+D.port:""),S(k,U,w+"//"+D.hostname+(D.port?":"+D.port:"")+k.path));var V=P&&(!U||f.test(U.protocol));e.transport?F=e.transport:0===e.maxRedirects?F=V?l:s:(e.maxRedirects&&(k.maxRedirects=e.maxRedirects),F=V?d:c),e.maxBodyLength>-1&&(k.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(k.insecureHTTPParser=e.insecureHTTPParser);var $=F.request(k,(function(t){if(!$.aborted){var n=t,a=t.req||$;if(204!==t.statusCode&&"HEAD"!==a.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(p.createUnzip()),delete t.headers["content-encoding"]}var o={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:a};if("stream"===e.responseType)o.data=n,i(T,C,o);else{var s=[],l=0;n.on("data",(function(t){s.push(t),l+=t.length,e.maxContentLength>-1&&l>e.maxContentLength&&(y=!0,n.destroy(),C(m("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,a)))})),n.on("aborted",(function(){y||(n.destroy(),C(m("error request aborted",e,"ERR_REQUEST_ABORTED",a)))})),n.on("error",(function(t){$.aborted||C(g(t,e,null,a))})),n.on("end",(function(){try{var t=1===s.length?s[0]:Buffer.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=r.stripBOM(t))),o.data=t}catch(t){C(g(t,e,t.code,o.request,o))}i(T,C,o)}))}}}));if($.on("error",(function(t){$.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||C(g(t,e,null,$))})),$.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){var z=parseInt(e.timeout,10);if(isNaN(z))return void C(m("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",$));$.setTimeout(z,(function(){$.abort();var t;t=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";var n=e.transitional||h;C(m(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",$))}))}(e.cancelToken||e.signal)&&(b=function(e){$.aborted||($.abort(),C(!e||e&&e.type?new E("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),r.isStream(R)?R.on("error",(function(t){C(g(t,e,null,$))})).pipe($):$.end(R)}))}},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),a=n(4372),o=n(5327),s=n(4097),l=n(4109),c=n(7985),d=n(5061),u=n(7874),p=n(5263);e.exports=function(e){return new Promise((function(t,n){var _,m=e.data,g=e.headers,h=e.responseType;function E(){e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_)}r.isFormData(m)&&delete g["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var S=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(S+":"+b)}var v=s(e.baseURL,e.url);function T(){if(f){var r="getAllResponseHeaders"in f?l(f.getAllResponseHeaders()):null,a={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f};i((function(e){t(e),E()}),(function(e){n(e),E()}),a),f=null}}if(f.open(e.method.toUpperCase(),o(v,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,"onloadend"in f?f.onloadend=T:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(T)},f.onabort=function(){f&&(n(d("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){n(d("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(d(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||c(v))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;y&&(g[e.xsrfHeaderName]=y)}"setRequestHeader"in f&&r.forEach(g,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:f.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),h&&"json"!==h&&(f.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(_=function(e){f&&(n(!e||e&&e.type?new p("canceled"):e),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_))),m||(m=null),f.send(m)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),a=n(321),o=n(7185),s=function e(t){var n=new a(t),s=i(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(o(t,n))},s}(n(5546));s.Axios=a,s.Cancel=n(5263),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(6268),e.exports=s,e.exports.default=s},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),a=n(782),o=n(3572),s=n(7185),l=n(4875),c=l.validators;function d(e){this.defaults=e,this.interceptors={request:new a,response:new a}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var a,d=[];if(this.interceptors.response.forEach((function(e){d.push(e.fulfilled,e.rejected)})),!i){var u=[o,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(d),a=Promise.resolve(t);u.length;)a=a.then(u.shift(),u.shift());return a}for(var p=t;r.length;){var _=r.shift(),m=r.shift();try{p=_(p)}catch(e){m(e);break}}try{a=o(p)}catch(e){return Promise.reject(e)}for(;d.length;)a=a.then(d.shift(),d.shift());return a},d.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){d.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=d},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,a){var o=new Error(e);return r(o,t,n,i,a)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),a=n(6502),o=n(5546),s=n(5263);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,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}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function o(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||a,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5546);e.exports=function(e,t,n){var a=this||i;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},5546:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),a=n(481),o=n(7874),s={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,d={transitional:o,adapter:("undefined"!=typeof XMLHttpRequest?c=n(5448):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c=n(7970)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}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, */*"}}};r.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){d.headers[e]=r.merge(s)})),e.exports=d},7874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.26.1"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["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"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,o){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],o=t[a];if(o){var s=e[a],l=void 0===s||o(s,a,e);if(!0!==l)throw new TypeError("option "+a+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:i}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function a(e){return Array.isArray(e)}function o(e){return void 0===e}function s(e){return"[object ArrayBuffer]"===i.call(e)}function l(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var a=r(e,t,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+e.length,a[1]),post:i.slice(a[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,a,o,s,l=n.indexOf(e),c=n.indexOf(t,l+1),d=l;if(l>=0&&c>0){if(e===t)return[l,c];for(r=[],a=n.length;d>=0&&!s;)d==l?(r.push(d),l=n.indexOf(e,d+1)):1==r.length?s=[r.pop(),c]:((i=r.pop())=0?l:c;r.length&&(s=[a,o])}return s}e.exports=t,t.range=r},1227:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2447)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(1227):e.exports=n(39)},39:(e,t,n)=>{const r=n(6224),i=n(3837);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(2130);e&&(e.stderr||e).level>=2&&(t.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(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(2447)(t);const{formatters:a}=e.exports;a.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},a.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},2261:(e,t,n)=>{var r;e.exports=function(){if(!r){try{r=n(5158)("follow-redirects")}catch(e){}"function"!=typeof r&&(r=function(){})}r.apply(null,arguments)}},938:(e,t,n)=>{var r=n(7310),i=r.URL,a=n(3685),o=n(5687),s=n(2781).Writable,l=n(9491),c=n(2261),d=["abort","aborted","connect","error","socket","timeout"],u=Object.create(null);d.forEach((function(e){u[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var p=T("ERR_INVALID_URL","Invalid URL",TypeError),_=T("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=T("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),g=T("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),h=T("ERR_STREAM_WRITE_AFTER_END","write after end");function E(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function f(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(a){var o=a+":",s=n[o]=e[a],d=t[a]=Object.create(s);Object.defineProperties(d,{request:{value:function(e,a,s){if(C(e)){var d;try{d=b(new i(e))}catch(t){d=r.parse(e)}if(!C(d.protocol))throw new p({input:e});e=d}else i&&e instanceof i?e=b(e):(s=a,a=e,e={protocol:o});return R(a)&&(s=a,a=null),(a=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,a)).nativeProtocols=n,C(a.host)||C(a.hostname)||(a.hostname="::1"),l.equal(a.protocol,o,"protocol mismatch"),c("options",a),new E(a,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=d.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function S(){}function b(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function v(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function T(e,t,n){function r(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r}function y(e){for(var t of d)e.removeListener(t,u[t]);e.on("error",S),e.abort()}function C(e){return"string"==typeof e||e instanceof String}function R(e){return"function"==typeof e}E.prototype=Object.create(s.prototype),E.prototype.abort=function(){y(this._currentRequest),this.emit("abort")},E.prototype.write=function(e,t,n){if(this._ending)throw new h;if(!(C(e)||"object"==typeof(r=e)&&"length"in r))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;R(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new g),this.abort()):n&&n()},E.prototype.end=function(e,t,n){if(R(e)?(n=e,e=t=null):R(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},E.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},E.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},E.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),a()}),e),r(t)}function a(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",a),n.removeListener("error",a),n.removeListener("response",a),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",a),this.on("error",a),this.on("response",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){E.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(E.prototype,e,{get:function(){return this._currentRequest[e]}})})),E.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},E.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var a of(i._redirectable=this,d))i.on(a,u[a]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,l=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(o=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(y(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new m);else{var i,a=this._options.beforeRedirect;a&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],v(/^content-/i,this._options.headers));var s,d=v(/^host$/i,this._options.headers),u=r.parse(this._currentUrl),p=d||u.host,g=/^\w+:/.test(n)?this._currentUrl:r.format(Object.assign(u,{host:p}));try{s=r.resolve(g,n)}catch(e){return void this.emit("error",new _({cause:e}))}c("redirecting to",s),this._isRedirect=!0;var h=r.parse(s);if(Object.assign(this._options,h),(h.protocol!==u.protocol&&"https:"!==h.protocol||h.host!==p&&!function(e,t){l(C(e)&&C(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(h.host,p))&&v(/^(?:authorization|cookie)$/i,this._options.headers),R(a)){var E={headers:e.headers,statusCode:t},f={url:g,method:o,headers:i};try{a(this._options,E,f)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new _({cause:e}))}}},e.exports=f({http:a,https:o}),e.exports.wrap=f},6560:e=>{"use strict";e.exports=(e,t)=>{t=t||process.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r{"use strict";const r=n(4411),i=Symbol("max"),a=Symbol("length"),o=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),d=Symbol("noDisposeOnSet"),u=Symbol("lruList"),p=Symbol("cache"),_=Symbol("updateAgeOnGet"),m=()=>1,g=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(h(e,t)){if(f(e,r),!e[s])return}else n&&(e[_]&&(r.value.now=Date.now()),e[u].unshiftNode(r));return t.value}},h=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},E=e=>{if(e[a]>e[i])for(let t=e[u].tail;e[a]>e[i]&&null!==t;){const n=t.prev;f(e,t),t=n}},f=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[a]-=n.length,e[p].delete(n.key),e[u].removeNode(t)}};class S{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const b=(e,t,n,r)=>{let i=n.value;h(e,i)&&(f(e,n),e[s]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||m;if(this[o]="function"!=typeof t?m:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[d]=e.noDisposeOnSet||!1,this[_]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,E(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,E(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=m),e!==this[o]&&(this[o]=e,this[a]=0,this[u].forEach((e=>{e.length=this[o](e.value,e.key),this[a]+=e.length}))),E(this)}get lengthCalculator(){return this[o]}get length(){return this[a]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let n=this[u].tail;null!==n;){const r=n.prev;b(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[u].head;null!==n;){const r=n.next;b(this,e,n,t),n=r}}keys(){return this[u].toArray().map((e=>e.key))}values(){return this[u].toArray().map((e=>e.value))}reset(){this[c]&&this[u]&&this[u].length&&this[u].forEach((e=>this[c](e.key,e.value))),this[p]=new Map,this[u]=new r,this[a]=0}dump(){return this[u].map((e=>!h(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[u]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[o](t,e);if(this[p].has(e)){if(s>this[i])return f(this,this[p].get(e)),!1;const o=this[p].get(e).value;return this[c]&&(this[d]||this[c](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[a]+=s-o.length,o.length=s,this.get(e),E(this),!0}const _=new S(e,t,s,r,n);return _.length>this[i]?(this[c]&&this[c](e,t),!1):(this[a]+=_.length,this[u].unshift(_),this[p].set(e,this[u].head),E(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!h(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[u].tail;return e?(f(this,e),e.value):null}del(e){f(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach(((e,t)=>g(this,t,!1)))}}},7824:e=>{var t=1e3,n=60*t,r=60*n,i=24*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,o){o=o||{};var s,l,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var o=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===c&&isFinite(e))return o.long?(s=e,(l=Math.abs(s))>=i?a(s,l,i,"day"):l>=r?a(s,l,r,"hour"):l>=n?a(s,l,n,"minute"):l>=t?a(s,l,t,"second"):s+" ms"):function(e){var a=Math.abs(e);return a>=i?Math.round(e/i)+"d":a>=r?Math.round(e/r)+"h":a>=n?Math.round(e/n)+"m":a>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},2130:(e,t,n)=>{"use strict";const r=n(2037),i=n(6560),a=process.env;let o;function s(e){const t=function(e){if(!1===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in a))||"codeship"===a.CI_NAME?1:t;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:(a.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}i("no-color")||i("no-colors")||i("color=false")?o=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=!0),"FORCE_COLOR"in a&&(o=0===a.FORCE_COLOR.length||0!==parseInt(a.FORCE_COLOR,10)),e.exports={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}},4802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6363);t.ExperimentationService=r.ExperimentationService},6363:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4067),i=n(4234),a=n(5975);class o extends a.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],null!=e.refetchInterval?e.refetchInterval:0,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new r.TasApiFeatureProvider(new i.AxiosHttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}}t.ExperimentationService=o,o.REFRESH_RATE_IN_MINUTES=30},5975:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3663),i=n(3334);class a extends r.ExperimentationServiceBase{constructor(e,t,n,r,a,o,s){if(super(e,r,a,o,s),this.telemetry=e,this.filterProviders=t,this.refreshRateMs=n,this.assignmentContextTelemetryPropertyName=r,this.telemetryEventName=a,this.storageKey=o,this.storage=s,n<1e3&&0!==n)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.");n>0&&(this.pollingService=new i.PollingService(n),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 t=await super.getFeaturesAsync(e);return this.pollingService.StartPolling(),t}return await super.getFeaturesAsync(e)}}t.ExperimentationServiceAutoPolling=a},3663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7002);t.ExperimentationServiceBase=class{constructor(e,t,n,i,a){this.telemetry=e,this.assignmentContextTelemetryPropertyName=t,this.telemetryEventName=n,this.storageKey=i,this.storage=a,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(a=new r.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise(((e,t)=>{this.resolveInitialFetchPromise=e}))}get features(){return this._features}set features(e){this._features=e,this.telemetry&&this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext)}async getFeaturesAsync(e=!1){if(null!=this.fetchPromise){try{await this.fetchPromise}catch(e){}return this.features}if(!this.featureProviders||0===this.featureProviders.length)return Promise.resolve({features:[],assignmentContext:"",configs:[]});try{this.fetchPromise=Promise.all(this.featureProviders.map((async e=>await e.getFeatures())));const t=await this.fetchPromise;this.updateFeatures(t,e)}catch(e){}return this.fetchPromise=void 0,this.resolveInitialFetchPromise&&(this.resolveInitialFetchPromise(),this.resolveInitialFetchPromise=void 0),this.features}updateFeatures(e,t=!1){let n={features:[],assignmentContext:"",configs:[]};for(let t of e){for(let e of t.features)n.features.includes(e)||n.features.push(e);for(let e of t.configs){const t=n.configs.find((t=>t.Id===e.Id));t?t.Parameters=Object.assign(Object.assign({},t.Parameters),e.Parameters):n.configs.push(e)}n.assignmentContext+=t.assignmentContext}!t&&this.featuresConsumed||(this.features=n),this.storage&&this.storage.setValue(this.storageKey,n)}async loadCachedFeatureData(){let e;this.storage&&(e=await this.storage.getValue(this.storageKey),void 0!==e&&void 0===e.configs&&(e.configs=[])),0===this.features.features.length&&(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){const t=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(e),t.features.includes(e)}getTreatmentVariable(e,t){var n;return this.featuresConsumed=!0,this.PostEventToTelemetry(`${e}.${t}`),null===(n=this.features.configs.find((t=>t.Id===e)))||void 0===n?void 0:n.Parameters[t]}async getTreatmentVariableAsync(e,t,n){if(n){const n=this.featuresConsumed,r=this.getTreatmentVariable(e,t);if(void 0!==r)return r;this.featuresConsumed=n}return await this.getFeaturesAsync(!0),this.getTreatmentVariable(e,t)}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(null!=e&&null!=this.featureProviders)for(let t of e)this.featureProviders.push(t)}}},69:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseFeatureProvider=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}}},4e3:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(69);class i extends r.BaseFeatureProvider{constructor(e,t){super(e),this.telemetry=e,this.filterProviders=t,this.cachedTelemetryEvents=[]}getFilters(){let e=new Map;for(let t of this.filterProviders){let n=t.getFilters();for(let t of n.keys()){let r=n.get(t);e.set(t,r)}}return e}PostEventToTelemetry(e){if(this.cachedTelemetryEvents.includes(e))return;const t=JSON.stringify(e);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",t]])),this.cachedTelemetryEvents.push(e)}}t.FilteredFeatureProvider=i},4067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4e3);t.TASAPI_FETCHERROR_EVENTNAME="call-tas-error";const i="ErrorType";class a extends r.FilteredFeatureProvider{constructor(e,t,n){super(t,n),this.httpClient=e,this.telemetry=t,this.filterProviders=n}async fetch(){let e,n=this.getFilters(),r={};for(let e of n.keys()){const t=n.get(e);r[e]=t}try{e=await this.httpClient.get({headers:r})}catch(e){const n=e,r=new Map;n.response?r.set(i,"ServerError"):n.request?r.set(i,"NoResponse"):r.set(i,"GenericError"),this.telemetry.postEvent(t.TASAPI_FETCHERROR_EVENTNAME,r)}if(!e)throw Error(t.TASAPI_FETCHERROR_EVENTNAME);n.keys.length>0&&this.PostEventToTelemetry(r);let a=e.data,o=a.Configs,s=[];for(let e of o)if(e.Parameters)for(let t of Object.keys(e.Parameters)){const n=t+(e.Parameters[t]?"":"cf");s.includes(n)||s.push(n)}return{features:s,assignmentContext:a.AssignmentContext,configs:o}}}t.TasApiFeatureProvider=a},4234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9669);t.AxiosHttpClient=class{constructor(e){this.endpoint=e}get(e){return r.default.get(this.endpoint,Object.assign(Object.assign({},e),{proxy:!1}))}}},7002:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryKeyValueStorage=class{constructor(){this.storage=new Map}async getValue(e,t){return this.storage.has(e)?await Promise.resolve(this.storage.get(e)):await Promise.resolve(t||void 0)}setValue(e,t){this.storage.set(e,t)}}},3334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingService=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(),null!=this.onTick&&(e&&this.onTick().then((()=>{})).catch((()=>{})),this.intervalHandle=setInterval((async()=>{await this.onTick()}),this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}}},3870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const r=n(839);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(6184);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const a=n(3911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return a.Disposable}});const o=n(7135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=n(3881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const l=n(8211);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return l.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return l.SharedArrayReceiverStrategy}});const c=n(6525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const d=n(6654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return d.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return d.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return d.WriteableStreamMessageWriter}});const u=n(5530);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return u.AbstractMessageBuffer}});const p=n(1343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return p.MessageStrategy}});const _=n(147);t.RAL=_.default},3881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(147),i=n(7574),a=n(7135);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o=t.CancellationToken||(t.CancellationToken={}));const s=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class l{constructor(){this._isCancelled=!1}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?s:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=o.None}}},1343:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(147),i=n(7574),a=n(839),o=n(6184),s=n(7135),l=n(3881);var c,d,u,p,_,m,g,h,E,f,S,b,v,T,y,C,R,O;!function(e){e.type=new a.NotificationType("$/cancelRequest")}(c||(c={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(d=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new a.NotificationType("$/progress")}(u||(u={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(p||(p={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(_=t.Trace||(t.Trace={})),(O=t.TraceValues||(t.TraceValues={})).Off="off",O.Messages="messages",O.Compact="compact",O.Verbose="verbose",function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(_=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new a.NotificationType("$/setTrace")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new a.NotificationType("$/logTrace")}(h=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(E=t.ConnectionErrors||(t.ConnectionErrors={}));class N extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,N.prototype)}}t.ConnectionError=N,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(f=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(S=t.IdCancellationReceiverStrategy||(t.IdCancellationReceiverStrategy={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(b=t.RequestCancellationReceiverStrategy||(t.RequestCancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new l.CancellationTokenSource}),e.is=function(e){return S.is(e)||b.is(e)}}(v=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(c.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(T=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:v.Message,sender:T.Message}),e.is=function(e){const t=e;return t&&v.is(t.receiver)&&T.is(t.sender)}}(y=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&i.func(t.handleMessage)}}(C=t.MessageStrategy||(t.MessageStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(y.is(t.cancellationStrategy)||f.is(t.connectionStrategy)||C.is(t.messageStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(R||(R={})),t.createMessageConnection=function(e,n,f,b){const v=void 0!==f?f:t.NullLogger;let T=0,O=0,I=0;const A="2.0";let D;const w=new Map;let x;const P=new Map,M=new Map;let L,k,F=new o.LinkedMap,U=new Map,B=new Set,G=new Map,q=_.Off,H=m.Text,Y=R.New;const j=new s.Emitter,V=new s.Emitter,$=new s.Emitter,z=new s.Emitter,W=new s.Emitter,K=b&&b.cancellationStrategy?b.cancellationStrategy:y.Message;function Q(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function X(e){}function Z(){return Y===R.Listening}function J(){return Y===R.Closed}function ee(){return Y===R.Disposed}function te(){Y!==R.New&&Y!==R.Listening||(Y=R.Closed,V.fire(void 0))}function ne(){L||0===F.size||(L=(0,r.default)().timer.setImmediate((()=>{L=void 0,function(){if(0===F.size)return;const e=F.shift();try{const t=b?.messageStrategy;C.is(t)?t.handleMessage(e,re):re(e)}finally{ne()}}()})))}function re(e){a.Message.isRequest(e)?function(e){if(ee())return;function t(t,r,i){const o={jsonrpc:A,id:e.id};t instanceof a.ResponseError?o.error=t.toJson():o.result=void 0===t?null:t,oe(o,r,i),n.write(o).catch((()=>v.error("Sending response failed.")))}function r(t,r,i){const a={jsonrpc:A,id:e.id,error:t.toJson()};oe(a,r,i),n.write(a).catch((()=>v.error("Sending response failed.")))}!function(e){if(q!==_.Off&&k)if(H===m.Text){let t;q!==_.Verbose&&q!==_.Compact||!e.params||(t=`Params: ${ae(e.params)}\n\n`),k.log(`Received request '${e.method} - (${e.id})'.`,t)}else le("receive-request",e)}(e);const o=w.get(e.method);let s,l;o&&(s=o.type,l=o.handler);const c=Date.now();if(l||D){const o=e.id??String(Date.now()),d=S.is(K.receiver)?K.receiver.createCancellationTokenSource(o):K.receiver.createCancellationTokenSource(e);null!==e.id&&B.has(e.id)&&d.cancel(),null!==e.id&&G.set(o,d);try{let u;if(l)if(void 0===e.params){if(void 0!==s&&0!==s.numberOfParams)return void r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${e.method} defines ${s.numberOfParams} params but received none.`),e.method,c);u=l(d.token)}else if(Array.isArray(e.params)){if(void 0!==s&&s.parameterStructures===a.ParameterStructures.byName)return void r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,c);u=l(...e.params,d.token)}else{if(void 0!==s&&s.parameterStructures===a.ParameterStructures.byPosition)return void r(new a.ResponseError(a.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,c);u=l(e.params,d.token)}else D&&(u=D(e.method,e.params,d.token));const p=u;u?p.then?p.then((n=>{G.delete(o),t(n,e.method,c)}),(t=>{G.delete(o),t instanceof a.ResponseError?r(t,e.method,c):t&&i.string(t.message)?r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)})):(G.delete(o),t(u,e.method,c)):(G.delete(o),function(t,r,i){void 0===t&&(t=null);const a={jsonrpc:A,id:e.id,result:t};oe(a,r,i),n.write(a).catch((()=>v.error("Sending response failed.")))}(u,e.method,c))}catch(n){G.delete(o),n instanceof a.ResponseError?t(n,e.method,c):n&&i.string(n.message)?r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,c):r(new a.ResponseError(a.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else r(new a.ResponseError(a.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}(e):a.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===c.type.method){const t=e.params.id;return B.delete(t),void se(e)}{const r=P.get(e.method);r&&(n=r.handler,t=r.type)}if(n||x)try{if(se(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==a.ParameterStructures.byName&&v.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===u.type.method&&2===r.length&&d.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===a.ParameterStructures.byName&&v.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&v.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===a.ParameterStructures.byPosition&&v.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else x&&x(e.method,e.params)}catch(t){t.message?v.error(`Notification handler '${e.method}' failed with message: ${t.message}`):v.error(`Notification handler '${e.method}' failed unexpectedly.`)}else $.fire(e)}(e):a.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?v.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):v.error("Received response message without id. No further error information provided.");else{const t=e.id,n=U.get(t);if(function(e,t){if(q!==_.Off&&k)if(H===m.Text){let n;if(q!==_.Verbose&&q!==_.Compact||(e.error&&e.error.data?n=`Error data: ${ae(e.error.data)}\n\n`:e.result?n=`Result: ${ae(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";k.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else k.log(`Received response ${e.id} without active response promise.`,n)}else le("receive-response",e)}(e,n),void 0!==n){U.delete(t);try{if(e.error){const t=e.error;n.reject(new a.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?v.error(`Response handler '${n.method}' failed with message: ${e.message}`):v.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void v.error("Received empty message.");v.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,n=U.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError((function(e){j.fire([e,void 0,void 0])})),n.onClose(te),n.onError((function(e){j.fire(e)}));const ie=e=>{try{if(a.Message.isNotification(e)&&e.method===c.type.method){const t=e.params.id,r=Q(t),i=F.get(r);if(a.Message.isRequest(i)){const a=b?.connectionStrategy,o=a&&a.cancelUndispatched?a.cancelUndispatched(i,X):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return F.delete(r),G.delete(t),o.id=i.id,oe(o,e.method,Date.now()),void n.write(o).catch((()=>v.error("Sending response for canceled message failed.")))}const o=G.get(t);if(void 0!==o)return o.cancel(),void se(e);B.add(t)}!function(e,t){var n;a.Message.isRequest(t)?e.set(Q(t.id),t):a.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++I).toString():"res-"+n.toString(),t):e.set("not-"+(++O).toString(),t)}(F,e)}finally{ne()}};function ae(e){if(null!=e)switch(q){case _.Verbose:return JSON.stringify(e,null,4);case _.Compact:return JSON.stringify(e);default:return}}function oe(e,t,n){if(q!==_.Off&&k)if(H===m.Text){let r;q!==_.Verbose&&q!==_.Compact||(e.error&&e.error.data?r=`Error data: ${ae(e.error.data)}\n\n`:e.result?r=`Result: ${ae(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),k.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else le("send-response",e)}function se(e){if(q!==_.Off&&k&&e.method!==h.type.method)if(H===m.Text){let t;q!==_.Verbose&&q!==_.Compact||(t=e.params?`Params: ${ae(e.params)}\n\n`:"No parameters provided.\n\n"),k.log(`Received notification '${e.method}'.`,t)}else le("receive-notification",e)}function le(e,t){if(!k||q===_.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};k.log(n)}function ce(){if(J())throw new N(E.Closed,"Connection is closed.");if(ee())throw new N(E.Disposed,"Connection is disposed.")}function de(e){return void 0===e?null:e}function ue(e){return null===e?void 0:e}function pe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function _e(e,t){switch(e){case a.ParameterStructures.auto:return pe(t)?ue(t):[de(t)];case a.ParameterStructures.byName:if(!pe(t))throw new Error("Received parameters by name but param is not an object literal.");return ue(t);case a.ParameterStructures.byPosition:return[de(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function me(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=_e(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,o;if(ce(),i.string(e)){r=e;const n=t[0];let i=0,s=a.ParameterStructures.auto;a.ParameterStructures.is(n)&&(i=1,s=n);let l=t.length;const c=l-i;switch(c){case 0:o=void 0;break;case 1:o=_e(s,t[i]);break;default:if(s===a.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);o=t.slice(i,l).map((e=>de(e)))}}else{const n=t;r=e.method,o=me(e,n)}const s={jsonrpc:A,method:r,params:o};return function(e){if(q!==_.Off&&k)if(H===m.Text){let t;q!==_.Verbose&&q!==_.Compact||(t=e.params?`Params: ${ae(e.params)}\n\n`:"No parameters provided.\n\n"),k.log(`Sending notification '${e.method}'.`,t)}else le("send-notification",e)}(s),n.write(s).catch((e=>{throw v.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return ce(),i.func(e)?x=e:t&&(i.string(e)?(n=e,P.set(e,{type:void 0,handler:t})):(n=e.method,P.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?P.delete(n):x=void 0}}},onProgress:(e,t,n)=>{if(M.has(t))throw new Error(`Progress handler for token ${t} already registered`);return M.set(t,n),{dispose:()=>{M.delete(t)}}},sendProgress:(e,t,n)=>ge.sendNotification(u.type,{token:t,value:n}),onUnhandledProgress:z.event,sendRequest:(e,...t)=>{let r,o,s;if(ce(),function(){if(!Z())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let c=0,d=a.ParameterStructures.auto;a.ParameterStructures.is(n)&&(c=1,d=n);let u=t.length;l.CancellationToken.is(i)&&(u-=1,s=i);const p=u-c;switch(p){case 0:o=void 0;break;case 1:o=_e(d,t[c]);break;default:if(d===a.ParameterStructures.byName)throw new Error(`Received ${p} parameters for 'by Name' request parameter structure.`);o=t.slice(c,u).map((e=>de(e)))}}else{const n=t;r=e.method,o=me(e,n);const i=e.numberOfParams;s=l.CancellationToken.is(n[i])?n[i]:void 0}const c=T++;let d;s&&(d=s.onCancellationRequested((()=>{const e=K.sender.sendCancellation(ge,c);return void 0===e?(v.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):e.catch((()=>{v.log(`Sending cancellation messages for id ${c} failed`)}))})));const u={jsonrpc:A,id:c,method:r,params:o};return function(e){if(q!==_.Off&&k)if(H===m.Text){let t;q!==_.Verbose&&q!==_.Compact||!e.params||(t=`Params: ${ae(e.params)}\n\n`),k.log(`Sending request '${e.method} - (${e.id})'.`,t)}else le("send-request",e)}(u),"function"==typeof K.sender.enableCancellation&&K.sender.enableCancellation(u),new Promise((async(e,t)=>{const i={method:r,timerStart:Date.now(),resolve:t=>{e(t),K.sender.cleanup(c),d?.dispose()},reject:e=>{t(e),K.sender.cleanup(c),d?.dispose()}};try{await n.write(u),U.set(c,i)}catch(e){throw v.error("Sending request failed."),i.reject(new a.ResponseError(a.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{ce();let n=null;return p.is(e)?(n=void 0,D=e):i.string(e)?(n=null,void 0!==t&&(n=e,w.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,w.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?w.delete(n):D=void 0)}}},hasPendingResponse:()=>U.size>0,trace:async(e,t,n)=>{let r=!1,a=m.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,a=n.traceFormat||m.Text)),q=e,H=a,k=q===_.Off?void 0:t,!r||J()||ee()||await ge.sendNotification(g.type,{value:_.toString(e)})},onError:j.event,onClose:V.event,onUnhandledNotification:$.event,onDispose:W.event,end:()=>{n.end()},dispose:()=>{if(ee())return;Y=R.Disposed,W.fire(void 0);const t=new a.ResponseError(a.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of U.values())e.reject(t);U=new Map,G=new Map,B=new Set,F=new o.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{ce(),function(){if(Z())throw new N(E.AlreadyListening,"Connection is already listening")}(),Y=R.Listening,e.listen(ie)},inspect:()=>{(0,r.default)().console.log("inspect")}};return ge.onNotification(h.type,(e=>{if(q===_.Off||!k)return;const t=q===_.Verbose||q===_.Compact;k.log(e.message,t?e.verbose:void 0)})),ge.onNotification(u.type,(e=>{const t=M.get(e.token);t?t(e.value):z.fire(e)})),ge}},3911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},7135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a,a._noop=function(){}},7574:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},6184:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r=t.Touch||(t.Touch={}));class i{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i,t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5530:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,i=0;e:for(;nthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},6525:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(147),i=n(7574),a=n(7135),o=n(142);var s;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)};class l{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter,this.partialMessageEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=l,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let a;const o=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(a=e.contentTypeDecoder,o.set(a.name,a)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)o.set(t.name,t)}return void 0===a&&(a=(0,r.default)().applicationJson.decoder,o.set(a.name,a)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}}(s||(s={})),t.ReadableStreamMessageReader=class extends l{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new o.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error("Header must provide a Content-Length property."));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error("Content-Length value must be a number."));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},6654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(147),i=n(7574),a=n(142),o=n(7135);var s;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)};class l{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=l,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(s||(s={})),t.WriteableStreamMessageWriter=class extends l{constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new a.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},839:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(7574);var i,a;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=o;class s{constructor(e){this.kind=e}static is(e){return e===s.auto||e===s.byName||e===s.byPosition}toString(){return this.kind}}t.ParameterStructures=s,s.auto=new s("auto"),s.byPosition=new s("byPosition"),s.byName=new s("byName");class l{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return s.auto}}t.AbstractMessageSignature=l,t.RequestType0=class extends l{constructor(e){super(e,0)}},t.RequestType=class extends l{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends l{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends l{constructor(e){super(e,2)}},t.RequestType3=class extends l{constructor(e){super(e,3)}},t.RequestType4=class extends l{constructor(e){super(e,4)}},t.RequestType5=class extends l{constructor(e){super(e,5)}},t.RequestType6=class extends l{constructor(e){super(e,6)}},t.RequestType7=class extends l{constructor(e){super(e,7)}},t.RequestType8=class extends l{constructor(e){super(e,8)}},t.RequestType9=class extends l{constructor(e){super(e,9)}},t.NotificationType=class extends l{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends l{constructor(e){super(e,0)}},t.NotificationType1=class extends l{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends l{constructor(e){super(e,2)}},t.NotificationType3=class extends l{constructor(e){super(e,3)}},t.NotificationType4=class extends l{constructor(e){super(e,4)}},t.NotificationType5=class extends l{constructor(e){super(e,5)}},t.NotificationType6=class extends l{constructor(e){super(e,6)}},t.NotificationType7=class extends l{constructor(e){super(e,7)}},t.NotificationType8=class extends l{constructor(e){super(e,8)}},t.NotificationType9=class extends l{constructor(e){super(e,9)}},(a=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},a.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},a.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},147:(e,t)=>{"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(147);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},8211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(3881);var i;!function(e){e.Continue=0,e.Cancelled=1}(i||(i={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class a{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class o{constructor(e){this.token=new a(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new o(t)}}},4389:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const a=n(3034);a.default.install();const o=n(1017),s=n(2037),l=n(6113),c=n(1808),d=n(3870);i(n(3870),t);class u extends d.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),d.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=u;class p extends d.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=p;class _ extends d.AbstractMessageReader{constructor(e){super(),this.onData=new d.Emitter,e.on("close",(()=>this.fireClose)),e.on("error",(e=>this.fireError(e))),e.on("message",(e=>{this.onData.fire(e)}))}listen(e){return this.onData.event(e)}}t.PortMessageReader=_;class m extends d.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",(()=>this.fireClose())),e.on("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.PortMessageWriter=m;class g extends d.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,a.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=g;class h extends d.WriteableStreamMessageWriter{constructor(e,t){super((0,a.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=h;class E extends d.ReadableStreamMessageReader{constructor(e,t){super((0,a.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=E;class f extends d.WriteableStreamMessageWriter{constructor(e,t){super((0,a.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=f;const S=process.env.XDG_RUNTIME_DIR,b=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=(0,l.randomBytes)(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=S?o.join(S,`vscode-ipc-${e}.sock`):o.join(s.tmpdir(),`vscode-${e}.sock`);const n=b.get(process.platform);return void 0!==n&&t.length>n&&(0,a.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((i,a)=>{let o=(0,c.createServer)((e=>{o.close(),n([new g(e,t),new h(e,t)])}));o.on("error",a),o.listen(e,(()=>{o.removeListener("error",a),i({onConnected:()=>r})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,c.createConnection)(e);return[new g(n,t),new h(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((i,a)=>{const o=(0,c.createServer)((e=>{o.close(),n([new g(e,t),new h(e,t)])}));o.on("error",a),o.listen(e,"127.0.0.1",(()=>{o.removeListener("error",a),i({onConnected:()=>r})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,c.createConnection)(e,"127.0.0.1");return[new g(n,t),new h(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=d.NullLogger);const i=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new E(e):e,a=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new f(t):t;return d.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,d.createMessageConnection)(i,a,n,r)}},3034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3837),i=n(3870);class a extends i.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new r.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class o{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),i.Disposable.create((()=>this.stream.off("data",e)))}}class s{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,r)=>{const i=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,i):this.stream.write(e,i)}))}end(){this.stream.end()}}const l=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new r.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new o(e),asWritableStream:e=>new s(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function c(){return l}!function(e){e.install=function(){i.RAL.install(l)}}(c||(c={})),t.default=c},5028:(e,t,n)=>{"use strict";e.exports=n(4389)},5734:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticPullMode=t.vsdiag=void 0,i(n(273),t),i(n(8909),t);var a=n(2570);Object.defineProperty(t,"vsdiag",{enumerable:!0,get:function(){return a.vsdiag}}),Object.defineProperty(t,"DiagnosticPullMode",{enumerable:!0,get:function(){return a.DiagnosticPullMode}}),i(n(4384),t)},5578:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o{constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){const r=this.client,a=this.middleware,o=(e,t,n)=>{const a=r.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return r.sendRequest(i.CallHierarchyPrepareRequest.type,a,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asCallHierarchyItems(e,n)),(e=>r.handleFailedRequest(i.CallHierarchyPrepareRequest.type,n,e,null)))};return a.prepareCallHierarchy?a.prepareCallHierarchy(e,t,n,o):o(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,r=this.middleware,a=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyIncomingCallsRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t)),(e=>n.handleFailedRequest(i.CallHierarchyIncomingCallsRequest.type,t,e,null)))};return r.provideCallHierarchyIncomingCalls?r.provideCallHierarchyIncomingCalls(e,t,a):a(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,r=this.middleware,a=(e,t)=>{const r={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(i.CallHierarchyOutgoingCallsRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t)),(e=>n.handleFailedRequest(i.CallHierarchyOutgoingCallsRequest.type,t,e,null)))};return r.provideCallHierarchyOutgoingCalls?r.provideCallHierarchyOutgoingCalls(e,t,a):a(e,t)}}class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,a.ensure)((0,a.ensure)(t,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.callHierarchyProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=this._client,n=new o(t);return[r.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.CallHierarchyFeature=s},4384:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.BaseLanguageClient=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const r=n(9496),i=n(273),a=n(71),o=n(8785),s=n(9763),l=n(4904),c=n(1980),d=n(8071),u=n(8909),p=n(2570),_=n(203),m=n(6495),g=n(743),h=n(1435),E=n(6782),f=n(122),S=n(2908),b=n(9959),v=n(2483),T=n(3051),y=n(8480),C=n(9474),R=n(7711),O=n(6426),N=n(6458),I=n(3471),A=n(4849),D=n(5338),w=n(8880),x=n(9889),P=n(328),M=n(5941),L=n(6454),k=n(707),F=n(750),U=n(3603),B=n(5578),G=n(9957),q=n(7606),H=n(3483),Y=n(4175),j=n(5098),V=n(6190);var $,z,W,K,Q,X,Z;!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}($=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(z=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(W=t.CloseAction||(t.CloseAction={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(K=t.State||(t.State={})),(Z=t.SuspendMode||(t.SuspendMode={})).off="off",Z.on="on";class J{constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:z.Continue}:{action:z.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:W.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:W.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:W.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(Q||(Q={})),(t.MessageTransports||(t.MessageTransports={})).is=function(e){return e&&i.MessageReader.is(e.reader)&&i.MessageWriter.is(e.writer)};class ee{constructor(e,t,n){this._traceFormat=i.TraceFormat.Text,this._diagnosticQueue=new Map,this._diagnosticQueueState={state:"idle"},this._features=[],this._dynamicFeatures=new Map,this.workspaceEditLock=new l.Semaphore(1),this._id=e,this._name=t;const r={isTrusted:!1,supportHtml:!1};void 0!==(n=n||{}).markdown&&(r.isTrusted=!0===n.markdown.isTrusted,r.supportHtml=!0===n.markdown.supportHtml),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??$.Error,stdioEncoding:n.stdioEncoding??"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler??this.createDefaultErrorHandler(n.connectionOptions?.maxRestartCount),middleware:n.middleware??{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:r,diagnosticPullOptions:n.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:n.notebookDocumentOptions??{}},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Q.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._diagnostics=void 0,this._pendingOpenNotifications=new Set,this._pendingChangeSemaphore=new l.Semaphore(1),this._pendingChangeDelayer=new l.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new l.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new i.Emitter,this._stateChangeEmitter=new i.Emitter,this._trace=i.Trace.Off,this._tracer={log:(e,t)=>{s.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=a.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=o.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=r.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case Q.Starting:return K.Starting;case Q.Running:return K.Running;default:return K.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Q.StartFailed||this.$state===Q.Stopping||this.$state===Q.Stopped)return Promise.reject(new i.ResponseError(i.ErrorCodes.ConnectionInactive,"Client is not running"));const n=await this.$start();return this._didChangeTextDocumentFeature.syncKind===i.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(n),n.sendRequest(e,...t)}onRequest(e,t){const n="string"==typeof e?e:e.method;this._requestHandlers.set(n,t);const r=this.activeConnection();let i;return void 0!==r?(this._requestDisposables.set(n,r.onRequest(e,t)),i={dispose:()=>{const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),i={dispose:()=>{this._pendingRequestHandlers.delete(n);const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}),{dispose:()=>{this._requestHandlers.delete(n),i.dispose()}}}async sendNotification(e,t){if(this.$state===Q.StartFailed||this.$state===Q.Stopping||this.$state===Q.Stopped)return Promise.reject(new i.ResponseError(i.ErrorCodes.ConnectionInactive,"Client is not running"));const n=this._didChangeTextDocumentFeature.syncKind===i.TextDocumentSyncKind.Full;let r;n&&"string"!=typeof e&&e.method===i.DidOpenTextDocumentNotification.method&&(r=t?.textDocument.uri,this._pendingOpenNotifications.add(r));const a=await this.$start();return n&&await this.sendPendingFullTextDocumentChanges(a),void 0!==r&&this._pendingOpenNotifications.delete(r),a.sendNotification(e,t)}onNotification(e,t){const n="string"==typeof e?e:e.method;this._notificationHandlers.set(n,t);const r=this.activeConnection();let i;return void 0!==r?(this._notificationDisposables.set(n,r.onNotification(e,t)),i={dispose:()=>{const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),i={dispose:()=>{this._pendingNotificationHandlers.delete(n);const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}),{dispose:()=>{this._notificationHandlers.delete(n),i.dispose()}}}async sendProgress(e,t,n){if(this.$state===Q.StartFailed||this.$state===Q.Stopping||this.$state===Q.Stopped)return Promise.reject(new i.ResponseError(i.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}onProgress(e,t,n){this._progressHandlers.set(t,{type:e,handler:n});const r=this.activeConnection();let a;const o=this._clientOptions.middleware?.handleWorkDoneProgress,s=i.WorkDoneProgress.is(e)&&void 0!==o?e=>{o(t,e,(()=>n(e)))}:n;return void 0!==r?(this._progressDisposables.set(t,r.onProgress(e,t,s)),a={dispose:()=>{const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:n}),a={dispose:()=>{this._pendingProgressHandlers.delete(t);const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),a.dispose()}}}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new J(this,e??4)}async setTrace(e){this._trace=e;const t=this.activeConnection();void 0!==t&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof i.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?s.string(e.stack)?e.stack:e.message:s.string(e)?e:e.toString()}info(e,t,n=!0){this.outputChannel.appendLine(`[Info - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=$.Info&&this.showNotificationMessage(i.MessageType.Info,e)}warn(e,t,n=!0){this.outputChannel.appendLine(`[Warn - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=$.Warn&&this.showNotificationMessage(i.MessageType.Warning,e)}error(e,t,n=!0){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),null!=t&&this.outputChannel.appendLine(this.data2String(t)),("force"===n||n&&this._clientOptions.revealOutputChannelOn<=$.Error)&&this.showNotificationMessage(i.MessageType.Error,e)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===i.MessageType.Error?r.window.showErrorMessage:e===i.MessageType.Warning?r.window.showWarningMessage:r.window.showInformationMessage)(t,"Go to output").then((e=>{void 0!==e&&this.outputChannel.show(!0)}))}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===Q.Initial||this.$state===Q.Stopping||this.$state===Q.Stopped}needsStop(){return this.$state===Q.Starting||this.$state===Q.Running}activeConnection(){return this.$state===Q.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===Q.Running}async start(){if("disposing"===this._disposed||"disposed"===this._disposed)throw new Error("Client got disposed and can't be restarted.");if(this.$state===Q.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(void 0!==this._onStart)return this._onStart;const[e,t,n]=this.createOnStartPromise();this._onStart=e,void 0===this._diagnostics&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?r.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):r.languages.createDiagnosticCollection());for(const[e,t]of this._notificationHandlers)this._pendingNotificationHandlers.has(e)||this._pendingNotificationHandlers.set(e,t);for(const[e,t]of this._requestHandlers)this._pendingRequestHandlers.has(e)||this._pendingRequestHandlers.set(e,t);for(const[e,t]of this._progressHandlers)this._pendingProgressHandlers.has(e)||this._pendingProgressHandlers.set(e,t);this.$state=Q.Starting;try{const e=await this.createConnection();e.onNotification(i.LogMessageNotification.type,(e=>{switch(e.type){case i.MessageType.Error:this.error(e.message,void 0,!1);break;case i.MessageType.Warning:this.warn(e.message,void 0,!1);break;case i.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}})),e.onNotification(i.ShowMessageNotification.type,(e=>{switch(e.type){case i.MessageType.Error:r.window.showErrorMessage(e.message);break;case i.MessageType.Warning:r.window.showWarningMessage(e.message);break;case i.MessageType.Info:default:r.window.showInformationMessage(e.message)}})),e.onRequest(i.ShowMessageRequest.type,(e=>{let t;switch(e.type){case i.MessageType.Error:t=r.window.showErrorMessage;break;case i.MessageType.Warning:t=r.window.showWarningMessage;break;case i.MessageType.Info:default:t=r.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)})),e.onNotification(i.TelemetryEventNotification.type,(e=>{this._telemetryEmitter.fire(e)})),e.onRequest(i.ShowDocumentRequest.type,(async e=>{const t=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await r.env.openExternal(t)};{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await r.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!1}}},n=this._clientOptions.middleware.window?.showDocument;return void 0!==n?n(e,t):t(e)})),e.listen(),await this.initialize(e),t()}catch(e){this.$state=Q.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,e,"force"),n(e)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise(((n,r)=>{e=n,t=r})),e,t]}async initialize(e){this.refreshTrace(e,!1);const t=this._clientOptions.initializationOptions,[n,a]=void 0!==this._clientOptions.workspaceFolder?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],o={processId:null,clientInfo:{name:r.env.appName,version:r.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(r.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:s.func(t)?t():t,trace:i.Trace.toString(this._trace),workspaceFolders:a};if(this.fillInitializeParams(o),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,o);{const t=c.generateUuid(),n=new d.ProgressPart(e,t);o.workDoneToken=t;try{const t=await this.doInitialize(e,o);return n.done(),t}catch(e){throw n.cancel(),e}}}async doInitialize(e,t){try{const n=await e.initialize(t);if(void 0!==n.capabilities.positionEncoding&&n.capabilities.positionEncoding!==i.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);let r;this._initializeResult=n,this.$state=Q.Running,s.number(n.capabilities.textDocumentSync)?r=n.capabilities.textDocumentSync===i.TextDocumentSyncKind.None?{openClose:!1,change:i.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:n.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==n.capabilities.textDocumentSync&&null!==n.capabilities.textDocumentSync&&(r=n.capabilities.textDocumentSync),this._capabilities=Object.assign({},n.capabilities,{resolvedTextDocumentSync:r}),e.onNotification(i.PublishDiagnosticsNotification.type,(e=>this.handleDiagnostics(e))),e.onRequest(i.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(i.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(i.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e)));for(const[t,n]of this._pendingNotificationHandlers)this._notificationDisposables.set(t,e.onNotification(t,n));this._pendingNotificationHandlers.clear();for(const[t,n]of this._pendingRequestHandlers)this._requestDisposables.set(t,e.onRequest(t,n));this._pendingRequestHandlers.clear();for(const[t,n]of this._pendingProgressHandlers)this._progressDisposables.set(t,e.onProgress(n.type,t,n.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(i.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),n}catch(t){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):this.stop():t instanceof i.ResponseError&&t.data&&t.data.retry?r.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((t=>{t&&"retry"===t.id?this.initialize(e):this.stop()})):(t&&t.message&&r.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){let e=r.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown("stop",e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t){if(this.$state===Q.Stopped||this.$state===Q.Initial)return;if(this.$state===Q.Stopping){if(void 0!==this._onStop)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}const n=this.activeConnection();if(void 0===n||this.$state!==Q.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Q.Stopping,this.cleanUp(e);const r=new Promise((e=>{(0,i.RAL)().timer.setTimeout(e,t)})),a=(async e=>(await e.shutdown(),await e.exit(),e))(n);return this._onStop=Promise.race([r,a]).then((e=>{if(void 0===e)throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out");e.end(),e.dispose()}),(e=>{throw this.error("Stopping server failed",e,!1),e})).finally((()=>{this.$state=Q.Stopped,"stop"===e&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()}))}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();const t=this._listeners.splice(0,this._listeners.length);for(const e of t)e.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(const e of Array.from(this._features.entries()).map((e=>e[1])).reverse())e.dispose();"stop"===e&&void 0!==this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0),void 0!==this._idleInterval&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){void 0!==this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){const t=this;async function n(e){return t._fileEvents.push(e),t._fileEventDelayer.trigger((async()=>{await t.sendNotification(i.DidChangeWatchedFilesNotification.type,{changes:t._fileEvents}),t._fileEvents=[]}))}const r=this.clientOptions.middleware?.workspace;(r?.didChangeWatchedFile?r.didChangeWatchedFile(e,n):n(e)).catch((e=>{t.error("Notify file events failed.",e)}))}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock((async()=>{try{const t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._pendingOpenNotifications);if(0===t.length)return;for(const n of t){const t=this.code2ProtocolConverter.asChangeTextDocumentParams(n);await e.sendNotification(i.DidChangeTextDocumentNotification.type,t),this._didChangeTextDocumentFeature.notificationSent(n,i.DidChangeTextDocumentNotification.type,t)}}catch(e){throw this.error("Sending pending changes failed",e,!1),e}}))}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger((async()=>{const e=this.activeConnection();void 0!==e?await this.sendPendingFullTextDocumentChanges(e):this.triggerPendingChangeDelivery()})).catch((e=>this.error("Delivering pending changes failed",e,!1)))}handleDiagnostics(e){if(!this._diagnostics)return;const t=e.uri;"busy"===this._diagnosticQueueState.state&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,i.RAL)().timer.setImmediate((()=>{this.workDiagnosticQueue()}))}workDiagnosticQueue(){if("busy"===this._diagnosticQueueState.state)return;const e=this._diagnosticQueue.entries().next();if(!0===e.done)return;const[t,n]=e.value;this._diagnosticQueue.delete(t);const i=new r.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(n,i.token).then((e=>{if(!i.token.isCancellationRequested){const n=this._p2c.asUri(t),r=this.clientOptions.middleware;r.handleDiagnostics?r.handleDiagnostics(n,e,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(n,e)}})).finally((()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()}))}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return r.env.language}async $start(){if(this.$state===Q.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();const e=this.activeConnection();if(void 0===e)throw new Error("Starting server failed");return e}async createConnection(){const e=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=function(e,t,n,r,a){const o=new te,l=(0,i.createProtocolConnection)(e,t,o,a);return l.onError((e=>{n(e[0],e[1],e[2])})),l.onClose(r),{listen:()=>l.listen(),sendRequest:l.sendRequest,onRequest:l.onRequest,hasPendingResponse:l.hasPendingResponse,sendNotification:l.sendNotification,onNotification:l.onNotification,onProgress:l.onProgress,sendProgress:l.sendProgress,trace:(e,t,n)=>{const r={sendNotification:!1,traceFormat:i.TraceFormat.Text};return void 0===n?l.trace(e,t,r):(s.boolean(n),l.trace(e,t,n))},initialize:e=>l.sendRequest(i.InitializeRequest.type,e),shutdown:()=>l.sendRequest(i.ShutdownRequest.type,void 0),exit:()=>l.sendNotification(i.ExitNotification.type),end:()=>l.end(),dispose:()=>l.dispose()}}(e.reader,e.writer,((e,t,n)=>{this.handleConnectionError(e,t,n).catch((e=>this.error("Handling connection error failed",e)))}),(()=>{this.handleConnectionClosed().catch((e=>this.error("Handling connection close failed",e)))}),this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===Q.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:W.DoNotRestart};if(this.$state!==Q.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===W.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,!0!==e.handled&&"force"),this.cleanUp("stop"),this.$state===Q.Starting?this.$state=Q.StartFailed:this.$state=Q.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===W.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",!e.handled),this.cleanUp("restart"),this.$state=Q.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch((e=>this.error("Restarting server failed",e,"force"))))}async handleConnectionError(e,t,n){const r=await this._clientOptions.errorHandler.error(e,t,n);r.action===z.Shutdown&&(this.error(r.message??`Client ${this._name}: connection to server is erroring. Shutting down server.`,void 0,!0!==r.handled&&"force"),this.stop().catch((e=>{this.error("Stopping server failed",e,!1)})))}hookConfigurationChanged(e){this._listeners.push(r.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)})))}refreshTrace(e,t=!1){const n=r.workspace.getConfiguration(this._id);let a=i.Trace.Off,o=i.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?a=i.Trace.fromString(e):(a=i.Trace.fromString(n.get("trace.server.verbosity","off")),o=i.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=a,this._traceFormat=o,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch((e=>{this.error("Updating trace failed with error",e,!1)}))}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=s.array(n)?n:[n],t&&this._dynamicFeatures.get(i.DidChangeWatchedFilesNotification.type.method).registerRaw(c.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),u.DynamicFeature.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){const t=this.getFeature(i.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof _.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){const e=new Map;this.registerFeature(new m.ConfigurationFeature(this)),this.registerFeature(new g.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this._didChangeTextDocumentFeature=new g.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded((()=>{this.triggerPendingChangeDelivery()})),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new g.WillSaveFeature(this)),this.registerFeature(new g.WillSaveWaitUntilFeature(this)),this.registerFeature(new g.DidSaveTextDocumentFeature(this)),this.registerFeature(new g.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new D.FileSystemWatcherFeature(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new h.CompletionItemFeature(this)),this.registerFeature(new E.HoverFeature(this)),this.registerFeature(new S.SignatureHelpFeature(this)),this.registerFeature(new f.DefinitionFeature(this)),this.registerFeature(new y.ReferencesFeature(this)),this.registerFeature(new b.DocumentHighlightFeature(this)),this.registerFeature(new v.DocumentSymbolFeature(this)),this.registerFeature(new T.WorkspaceSymbolFeature(this)),this.registerFeature(new C.CodeActionFeature(this)),this.registerFeature(new R.CodeLensFeature(this)),this.registerFeature(new O.DocumentFormattingFeature(this)),this.registerFeature(new O.DocumentRangeFormattingFeature(this)),this.registerFeature(new O.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new N.RenameFeature(this)),this.registerFeature(new I.DocumentLinkFeature(this)),this.registerFeature(new A.ExecuteCommandFeature(this)),this.registerFeature(new m.SyncConfigurationFeature(this)),this.registerFeature(new P.TypeDefinitionFeature(this)),this.registerFeature(new x.ImplementationFeature(this)),this.registerFeature(new w.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new M.WorkspaceFoldersFeature(this)),this.registerFeature(new L.FoldingRangeFeature(this)),this.registerFeature(new k.DeclarationFeature(this)),this.registerFeature(new F.SelectionRangeFeature(this)),this.registerFeature(new U.ProgressFeature(this)),this.registerFeature(new B.CallHierarchyFeature(this)),this.registerFeature(new G.SemanticTokensFeature(this)),this.registerFeature(new H.LinkedEditingFeature(this)),this.registerFeature(new q.DidCreateFilesFeature(this)),this.registerFeature(new q.DidRenameFilesFeature(this)),this.registerFeature(new q.DidDeleteFilesFeature(this)),this.registerFeature(new q.WillCreateFilesFeature(this)),this.registerFeature(new q.WillRenameFilesFeature(this)),this.registerFeature(new q.WillDeleteFilesFeature(this)),this.registerFeature(new Y.TypeHierarchyFeature(this)),this.registerFeature(new j.InlineValueFeature(this)),this.registerFeature(new V.InlayHintsFeature(this)),this.registerFeature(new p.DiagnosticFeature(this)),this.registerFeature(new _.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(X.createAll(this))}fillInitializeParams(e){for(let t of this._features)s.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,u.ensure)(e,"workspace").applyEdit=!0;const t=(0,u.ensure)((0,u.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[i.ResourceOperationKind.Create,i.ResourceOperationKind.Rename,i.ResourceOperationKind.Delete],t.failureHandling=i.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[i.DiagnosticTag.Unnecessary,i.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const r=(0,u.ensure)(e,"window");(0,u.ensure)(r,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,u.ensure)(r,"showDocument").support=!0;const a=(0,u.ensure)(e,"general");a.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(ee.RequestsToCancelOnContentModified)},a.regularExpressions={engine:"ECMAScript",version:"ES2020"},a.markdown={parser:"marked",version:"1.1.0"},a.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(a.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)s.func(e.preInitialize)&&e.preInitialize(this._capabilities,t);for(const e of this._features)e.initialize(this._capabilities,t)}async handleRegistrationRequest(e){if(this.isRunning())for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const n=t.registerOptions??{};n.documentSelector=n.documentSelector??this._clientOptions.documentSelector;const r={id:t.id,registerOptions:n};try{e.register(r)}catch(e){return Promise.reject(e)}}else for(const t of e.registrations)this._ignoredRegistrations.add(t.id)}async handleUnregistrationRequest(e){for(let t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;const e=this._dynamicFeatures.get(t.method);if(!e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}}async handleApplyWorkspaceEdit(e){const t=e.edit,n=await this.workspaceEditLock.lock((()=>this._p2c.asWorkspaceEdit(t))),a=new Map;r.workspace.textDocuments.forEach((e=>a.set(e.uri.toString(),e)));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(i.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=this._p2c.asUri(e.textDocument.uri).toString(),n=a.get(t);if(n&&n.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):s.asPromise(r.workspace.applyEdit(n).then((e=>({applied:e}))))}handleFailedRequest(e,t,n,a,o=!0){if(n instanceof i.ResponseError){if(n.code===i.ErrorCodes.PendingResponseRejected||n.code===i.ErrorCodes.ConnectionInactive)return a;if(n.code===i.LSPErrorCodes.RequestCancelled||n.code===i.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested)return a;throw void 0!==n.data?new u.LSPCancellationError(n.data):new r.CancellationError}if(n.code===i.LSPErrorCodes.ContentModified){if(ee.RequestsToCancelOnContentModified.has(e.method)||ee.CancellableResolveCalls.has(e.method))throw new r.CancellationError;return a}}throw this.error(`Request ${e.method} failed.`,n,o),n}}t.BaseLanguageClient=ee,ee.RequestsToCancelOnContentModified=new Set([i.SemanticTokensRequest.method,i.SemanticTokensRangeRequest.method,i.SemanticTokensDeltaRequest.method]),ee.CancellableResolveCalls=new Set([i.CompletionResolveRequest.method,i.CodeLensResolveRequest.method,i.CodeActionResolveRequest.method,i.InlayHintResolveRequest.method,i.DocumentLinkResolveRequest.method,i.WorkspaceSymbolResolveRequest.method]);class te{error(e){(0,i.RAL)().console.error(e)}warn(e){(0,i.RAL)().console.warn(e)}info(e){(0,i.RAL)().console.info(e)}log(e){(0,i.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[]}}(X=t.ProposedFeatures||(t.ProposedFeatures={}))},9474:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const r=n(9496),i=n(273),a=n(1980),o=n(8909);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[i.CodeActionKind.Empty,i.CodeActionKind.QuickFix,i.CodeActionKind.Refactor,i.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorRewrite,i.CodeActionKind.Source,i.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!1}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:a.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideCodeActions:(e,t,n,r)=>{const a=this._client,o=async(e,t,n,r)=>{const o={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(e),range:a.code2ProtocolConverter.asRange(t),context:await a.code2ProtocolConverter.asCodeActionContext(n,r)};return a.sendRequest(i.CodeActionRequest.type,o,r).then((e=>r.isCancellationRequested||null==e?null:a.protocol2CodeConverter.asCodeActionResult(e,r)),(e=>a.handleFailedRequest(i.CodeActionRequest.type,r,e,null)))},s=a.middleware;return s.provideCodeActions?s.provideCodeActions(e,t,n,r,o):o(e,t,n,r)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,r=this._client.middleware,a=async(e,t)=>n.sendRequest(i.CodeActionResolveRequest.type,await n.code2ProtocolConverter.asCodeAction(e,t),t).then((r=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeAction(r,t)),(r=>n.handleFailedRequest(i.CodeActionResolveRequest.type,t,r,e)));return r.resolveCodeAction?r.resolveCodeAction(e,t,a):a(e,t)}:void 0};return[r.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),n]}}t.CodeActionFeature=s},71:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const r=n(9496),i=n(273),a=n(9763),o=n(4904),s=n(1807),l=n(583),c=n(8705),d=n(6434),u=n(5316),p=n(8714),_=n(1365),m=n(3912),g=n(1065);var h;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(h||(h={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function E(e){return{uri:t(e.uri)}}function f(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function S(e){switch(e){case r.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case r.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case r.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function b(e){switch(e){case r.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case r.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function v(e){switch(e){case r.SignatureHelpTriggerKind.Invoke:return i.SignatureHelpTriggerKind.Invoked;case r.SignatureHelpTriggerKind.TriggerCharacter:return i.SignatureHelpTriggerKind.TriggerCharacter;case r.SignatureHelpTriggerKind.ContentChange:return i.SignatureHelpTriggerKind.ContentChange}}function T(e){return{label:e.label}}function y(e){return{label:e.label,parameters:(t=e.parameters,t.map(T))};var t}function C(e){return{line:e.line,character:e.character}}function R(e){return null==e?e:{line:e.line>i.uinteger.MAX_VALUE?i.uinteger.MAX_VALUE:e.line,character:e.character>i.uinteger.MAX_VALUE?i.uinteger.MAX_VALUE:e.character}}function O(e){return null==e?e:{start:R(e.start),end:R(e.end)}}function N(e){return null==e?e:i.Location.create(n(e.uri),O(e.range))}function I(e){switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function A(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function D(e){return{message:e.message,location:N(e.location)}}function w(e){const t=i.Diagnostic.create(O(e.range),e.message),r=e instanceof u.ProtocolDiagnostic?e:void 0;void 0!==r&&void 0!==r.data&&(t.data=r.data);const o=function(e){if(null!=e)return a.number(e)||a.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return u.DiagnosticCode.is(o)?void 0!==r&&r.hasDiagnosticCode?t.code=o:(t.code=o.value,t.codeDescription={href:o.target}):t.code=o,a.number(e.severity)&&(t.severity=I(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=A(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(D)),e.source&&(t.source=e.source),t}function x(e,t){return null==e?e:o.map(e,w,t)}function P(e){if(e===r.CompletionItemTag.Deprecated)return i.CompletionItemTag.Deprecated}function M(e){return{range:O(e.range),newText:e.newText}}function L(e){return null==e?e:e.map(M)}function k(e){return e<=r.SymbolKind.TypeParameter?e+1:i.SymbolKind.Property}function F(e){return e}function U(e){return e.map(F)}function B(e){let t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}function G(e){const t=i.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=N(e.location)),void 0!==e.command&&(t.command=B(e.command)),void 0!==e.tooltip&&(t.tooltip=q(e.tooltip)),t}function q(e){return"string"==typeof e?e:{kind:i.MarkupKind.Markdown,value:e.value}}return{asUri:n,asTextDocumentIdentifier:E,asTextDocumentItem:f,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:f(e)}},asChangeTextDocumentParams:function(e,n,r){if(function(e){const t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){const t=e;return!!t.document&&!!t.contentChanges}(e)){const i=r;return{textDocument:{uri:t(n),version:i},contentChanges:e.contentChanges.map((e=>{const t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:E(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:E(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:E(e.document),reason:S(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asDidRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asDidDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asWillDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asTextDocumentPositionParams:function(e,t){return{textDocument:E(e),position:C(t)}},asCompletionParams:function(e,t,n){return{textDocument:E(e),position:C(t),context:{triggerKind:b(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:E(e),position:C(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:v(n.triggerKind),activeSignatureHelp:(r=n.activeSignatureHelp,void 0===r?r:{signatures:(i=r.signatures,i.map(y)),activeSignature:r.activeSignature,activeParameter:r.activeParameter})}};var r,i},asWorkerPosition:C,asRange:O,asPosition:R,asPositions:function(e,t){return o.map(e,R,t)},asLocation:N,asDiagnosticSeverity:I,asDiagnosticTag:A,asDiagnostic:w,asDiagnostics:x,asCompletionItem:function(e,t=!1){let n,o;a.string(e.label)?n=e.label:(n=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(o={detail:e.label.detail,description:e.label.description}));let l={label:n};void 0!==o&&(l.labelDetails=o);let c=e instanceof s.default?e:void 0;var d,u;e.detail&&(l.detail=e.detail),e.documentation&&(c&&"$string"!==c.documentationFormat?l.documentation=function(e,t){switch(e){case"$string":return t;case i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(c.documentationFormat,e.documentation):l.documentation=e.documentation),e.filterText&&(l.filterText=e.filterText),function(e,t){let n,a,o=i.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,a=t.textEdit.range):t.insertText instanceof r.SnippetString?(o=i.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(a=t.range),e.insertTextFormat=o,t.fromEdit&&void 0!==n&&void 0!==a?e.textEdit=function(e,t){return h.is(t)?i.InsertReplaceEdit.create(e,O(t.inserting),O(t.replacing)):{newText:e,range:O(t)}}(n,a):e.insertText=n}(l,e),a.number(e.kind)&&(l.kind=(d=e.kind,void 0!==(u=c&&c.originalItemKind)?u:d+1)),e.sortText&&(l.sortText=e.sortText),e.additionalTextEdits&&(l.additionalTextEdits=L(e.additionalTextEdits)),e.commitCharacters&&(l.commitCharacters=e.commitCharacters.slice()),e.command&&(l.command=B(e.command)),!0!==e.preselect&&!1!==e.preselect||(l.preselect=e.preselect);const p=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=P(n);void 0!==e&&t.push(e)}return t}(e.tags);if(c){if(void 0!==c.data&&(l.data=c.data),!0===c.deprecated||!1===c.deprecated){if(!0===c.deprecated&&void 0!==p&&p.length>0){const e=p.indexOf(r.CompletionItemTag.Deprecated);-1!==e&&p.splice(e,1)}l.deprecated=c.deprecated}void 0!==c.insertTextMode&&(l.insertTextMode=c.insertTextMode)}return void 0!==p&&p.length>0&&(l.tags=p),void 0===l.insertTextMode&&!0===e.keepWhitespace&&(l.insertTextMode=i.InsertTextMode.adjustIndentation),l},asTextEdit:M,asSymbolKind:k,asSymbolTag:F,asSymbolTags:U,asReferenceParams:function(e,t,n){return{textDocument:E(e),position:C(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:async function(e,t){let n=i.CodeAction.create(e.title);if(e instanceof d.default&&void 0!==e.data&&(n.data=e.data),void 0!==e.kind&&(n.kind=function(e){if(null!=e)return e.value}(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=await x(e.diagnostics,t)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(n.command=B(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n},asCodeActionContext:async function(e,t){if(null==e)return e;let n;return e.only&&a.string(e.only.value)&&(n=[e.only.value]),i.CodeActionContext.create(await x(e.diagnostics,t),n,function(e){switch(e){case r.CodeActionTriggerKind.Invoke:return i.CodeActionTriggerKind.Invoked;case r.CodeActionTriggerKind.Automatic:return i.CodeActionTriggerKind.Automatic;default:return}}(e.triggerKind))},asInlineValueContext:function(e){return null==e?e:i.InlineValueContext.create(e.frameId,O(e.stoppedLocation))},asCommand:B,asCodeLens:function(e){let t=i.CodeLens.create(O(e.range));return e.command&&(t.command=B(e.command)),e instanceof l.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:E(e)}},asCodeLensParams:function(e){return{textDocument:E(e)}},asDocumentLink:function(e){let t=i.DocumentLink.create(O(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let r=e instanceof c.default?e:void 0;return r&&r.data&&(t.data=r.data),t},asDocumentLinkParams:function(e){return{textDocument:E(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:k(e.kind),uri:n(e.uri),range:O(e.range),selectionRange:O(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=U(e.tags)),e instanceof p.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:k(e.kind),uri:n(e.uri),range:O(e.range),selectionRange:O(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=U(e.tags)),e instanceof _.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(G),n=i.InlayHint.create(R(e.position),t);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=L(e.textEdits)),void 0!==e.tooltip&&(n.tooltip=q(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),e instanceof g.default&&void 0!==e.data&&(n.data=e.data),n},asWorkspaceSymbol:function(e){const n=e instanceof m.default?{name:e.name,kind:k(e.kind),location:e.hasRange?N(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:k(e.kind),location:N(e.location)};return void 0!==e.tags&&(n.tags=U(e.tags)),""!==e.containerName&&(n.containerName=e.containerName),n}}}},7711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const r=n(9496),i=n(273),a=n(1980),o=n(8909);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.CodeLensRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"codeLens").dynamicRegistration=!0,(0,o.ensure)((0,o.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.CodeLensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()}));const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:a.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n=new r.EventEmitter,a={onDidChangeCodeLenses:n.event,provideCodeLenses:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCodeLenses(e,t)),(e=>n.handleFailedRequest(i.CodeLensRequest.type,t,e,null))),a=n.middleware;return a.provideCodeLenses?a.provideCodeLenses(e,t,r):r(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then((r=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeLens(r)),(r=>n.handleFailedRequest(i.CodeLensResolveRequest.type,t,r,e))),a=n.middleware;return a.resolveCodeLens?a.resolveCodeLens(e,t,r):r(e,t)}:void 0};return[r.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),a),{provider:a,onDidChangeCodeLensEmitter:n}]}}t.CodeLensFeature=s},8880:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentColorRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.colorProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideColorPresentations:(e,t,n)=>{const r=this._client,a=(e,t,n)=>{const a={color:e,textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:r.code2ProtocolConverter.asRange(t.range)};return r.sendRequest(i.ColorPresentationRequest.type,a,n).then((e=>n.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,n)),(e=>r.handleFailedRequest(i.ColorPresentationRequest.type,n,e,null)))},o=r.middleware;return o.provideColorPresentations?o.provideColorPresentations(e,t,n,a):a(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,r=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(i.DocumentColorRequest.type,r,t).then((e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t)),(e=>n.handleFailedRequest(i.DocumentColorRequest.type,t,e,null)))},a=n.middleware;return a.provideDocumentColors?a.provideDocumentColors(e,t,r):r(e,t)}};return[r.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.ColorProviderFeature=o},1435:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980),s=[i.CompletionItemKind.Text,i.CompletionItemKind.Method,i.CompletionItemKind.Function,i.CompletionItemKind.Constructor,i.CompletionItemKind.Field,i.CompletionItemKind.Variable,i.CompletionItemKind.Class,i.CompletionItemKind.Interface,i.CompletionItemKind.Module,i.CompletionItemKind.Property,i.CompletionItemKind.Unit,i.CompletionItemKind.Value,i.CompletionItemKind.Enum,i.CompletionItemKind.Keyword,i.CompletionItemKind.Snippet,i.CompletionItemKind.Color,i.CompletionItemKind.File,i.CompletionItemKind.Reference,i.CompletionItemKind.Folder,i.CompletionItemKind.EnumMember,i.CompletionItemKind.Constant,i.CompletionItemKind.Struct,i.CompletionItemKind.Event,i.CompletionItemKind.Operator,i.CompletionItemKind.TypeParameter];class l extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[i.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[i.InsertTextMode.asIs,i.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=i.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:s},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode"]}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const n=e.triggerCharacters??[],a=e.allCommitCharacters,o=e.documentSelector,s={provideCompletionItems:(e,t,n,r)=>{const o=this._client,s=this._client.middleware,l=(e,t,n,r)=>o.sendRequest(i.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),r).then((e=>r.isCancellationRequested?null:o.protocol2CodeConverter.asCompletionResult(e,a,r)),(e=>o.handleFailedRequest(i.CompletionRequest.type,r,e,null)));return s.provideCompletionItem?s.provideCompletionItem(e,t,r,n,l):l(e,t,r,n)},resolveCompletionItem:e.resolveProvider?(e,n)=>{const r=this._client,a=this._client.middleware,o=(e,n)=>r.sendRequest(i.CompletionResolveRequest.type,r.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asCompletionItem(e)),(t=>r.handleFailedRequest(i.CompletionResolveRequest.type,n,t,e)));return a.resolveCompletionItem?a.resolveCompletionItem(e,n,o):o(e,n)}:void 0};return[r.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(o),s,...n),s]}}t.CompletionItemFeature=l},6495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.toJSONObject=t.ConfigurationFeature=void 0;const r=n(9496),i=n(273),a=n(9763),o=n(1980),s=n(8909);function l(e){if(e){if(Array.isArray(e))return e.map(l);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=l(e[n]));return t}}return e}t.ConfigurationFeature=class{constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(i.ConfigurationRequest.type,((t,n)=>{let r=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},i=e.middleware.workspace;return i&&i.configuration?i.configuration(t,n,r):r(t)}))}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(-1===i)n=l(r.workspace.getConfiguration(void 0,e).get(t));else{let a=r.workspace.getConfiguration(t.substr(0,i),e);a&&(n=l(a.get(t.substr(i+1))))}}else{let t=r.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=l(t.get(e)))}return void 0===n&&(n=null),n}dispose(){}},t.toJSONObject=l,t.SyncConfigurationFeature=class{constructor(e){this._client=e,this.isDisposed=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return i.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:o.generateUuid(),registerOptions:{section:e}})}register(e){let t=r.workspace.onDidChangeConfiguration((t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)}));this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(const e of this._listeners.values())e.dispose();this._listeners.clear(),this.isDisposed=!0}onDidChangeConfiguration(e,t){if(this.isDisposed)return;let n;if(n=a.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;const r=async e=>void 0===e?this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)});let o=this._client.middleware.workspace?.didChangeConfiguration;(o?o(n,r):r(n)).catch((e=>{this._client.error(`Sending notification ${i.DidChangeConfigurationNotification.type.method} failed`,e)}))}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e=0?r.workspace.getConfiguration(o.substr(0,s),n).get(o.substr(s+1)):r.workspace.getConfiguration(void 0,n).get(o),c){let n=e[a].split(".");t(i,n)[n[n.length-1]]=l(c)}}return i}}},707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.declarationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDeclaration:(e,t,n)=>{const r=this._client,a=(e,t,n)=>r.sendRequest(i.DeclarationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDeclarationResult(e,n)),(e=>r.handleFailedRequest(i.DeclarationRequest.type,n,e,null))),o=r.middleware;return o.provideDeclaration?o.provideDeclaration(e,t,n,a):a(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DeclarationFeature=o},122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDefinition:(e,t,n)=>{const r=this._client,a=(e,t,n)=>r.sendRequest(i.DefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>r.handleFailedRequest(i.DefinitionRequest.type,n,e,null))),o=r.middleware;return o.provideDefinition?o.provideDefinition(e,t,n,a):a(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=s},2570:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const r=n(3415),i=n(9496),a=n(273),o=n(1980),s=n(8909);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c,d,u,p,_;!function(e){let t;!function(e){e.full="full",e.unChanged="unChanged"}(t=e.DocumentDiagnosticReportKind||(e.DocumentDiagnosticReportKind={}))}(c=t.vsdiag||(t.vsdiag={})),function(e){e.onType="onType",e.onSave="onSave"}(d=t.DiagnosticPullMode||(t.DiagnosticPullMode={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(u||(u={}));class m{constructor(){this.open=new Set,this._onOpen=new i.EventEmitter,this._onClose=new i.EventEmitter,m.fillTabResources(this.open);void 0!==i.window.tabGroups.onDidChangeTabs?this.disposable=i.window.tabGroups.onDidChangeTabs((e=>{if(0===e.closed.length&&0===e.opened.length)return;const t=this.open,n=new Set;m.fillTabResources(n);const r=new Set,a=new Set(n);for(const e of t.values())n.has(e)?a.delete(e):r.add(e);if(this.open=n,r.size>0){const e=new Set;for(const t of r)e.add(i.Uri.parse(t));this._onClose.fire(e)}if(a.size>0){const e=new Set;for(const t of a)e.add(i.Uri.parse(t));this._onOpen.fire(e)}})):this.disposable={dispose:()=>{}}}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposable.dispose()}isActive(e){return e instanceof i.Uri?i.window.activeTextEditor?.document.uri===e:i.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof i.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){const e=new Set;return m.fillTabResources(new Set,e),e}static fillTabResources(e,t){const n=e??new Set;for(const e of i.window.tabGroups.all)for(const r of e.tabs){const e=r.input;let a;e instanceof i.TabInputText?a=e.uri:e instanceof i.TabInputTextDiff&&(a=e.modified),void 0===a||n.has(a.toString())||(n.add(a.toString()),void 0!==t&&t.add(a))}}}!function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(p||(p={})),function(e){e.asKey=function(e){return e instanceof i.Uri?e.toString():e.uri.toString()}}(_||(_={}));class g{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){const r=e===p.document?this.documentPullStates:this.workspacePullStates,[a,o,s]=t instanceof i.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version];let l=r.get(a);return void 0===l&&(l={document:o,pulledVersion:s,resultId:void 0},r.set(a,l)),l}update(e,t,n,r){const a=e===p.document?this.documentPullStates:this.workspacePullStates,[o,s,l,c]=t instanceof i.Uri?[t.toString(),t,n,r]:[t.uri.toString(),t.uri,t.version,n];let d=a.get(o);void 0===d?(d={document:s,pulledVersion:l,resultId:c},a.set(o,d)):(d.pulledVersion=l,d.resultId=c)}unTrack(e,t){const n=_.asKey(t);(e===p.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){const n=_.asKey(t);return(e===p.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){const n=_.asKey(t);return(e===p.document?this.documentPullStates:this.workspacePullStates).get(n)?.resultId}getAllResultIds(){const e=[];for(let[t,n]of this.workspacePullStates)this.documentPullStates.has(t)&&(n=this.documentPullStates.get(t)),void 0!==n.resultId&&e.push({uri:t,value:n.resultId});return e}}class h{constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new i.EventEmitter,this.provider=this.createProvider(),this.diagnostics=i.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new g,this.workspaceErrorCounter=0}knows(e,t){const n=t instanceof i.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(n.toString())}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;const n=e instanceof i.Uri?e:e.uri;this.pullAsync(e).then((()=>{t&&t()}),(e=>{this.client.error(`Document pull failed for text document ${n.toString()}`,e,!1)}))}async pullAsync(e,t){if(this.isDisposed)return;const n=e instanceof i.Uri,r=n?e:e.uri,o=r.toString();t=n?t:e.version;const l=this.openRequests.get(o),d=n?this.documentStates.track(p.document,e,t):this.documentStates.track(p.document,e);if(void 0===l){const n=new i.CancellationTokenSource;let l,_;this.openRequests.set(o,{state:u.active,document:e,version:t,tokenSource:n});try{l=await this.provider.provideDiagnostics(e,d.resultId,n.token)??{kind:c.DocumentDiagnosticReportKind.full,items:[]}}catch(t){if(t instanceof s.LSPCancellationError&&a.DiagnosticServerCancellationData.is(t.data)&&!1===t.data.retriggerRequest&&(_={state:u.outDated,document:e}),!(void 0===_&&t instanceof i.CancellationError))throw t;_={state:u.reschedule,document:e}}if(_=_??this.openRequests.get(o),void 0===_)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${o}`),void this.diagnostics.delete(r);if(this.openRequests.delete(o),!this.tabs.isVisible(e))return void this.documentStates.unTrack(p.document,e);if(_.state===u.outDated)return;void 0!==l&&(l.kind===c.DocumentDiagnosticReportKind.full&&this.diagnostics.set(r,l.items),d.pulledVersion=t,d.resultId=l.resultId),_.state===u.reschedule&&this.pull(e)}else l.state===u.active?(l.tokenSource.cancel(),this.openRequests.set(o,{state:u.reschedule,document:l.document})):l.state===u.outDated&&this.openRequests.set(o,{state:u.reschedule,document:l.document})}forgetDocument(e){const t=e instanceof i.Uri?e:e.uri,n=t.toString(),r=this.openRequests.get(n);this.options.workspaceDiagnostics?void 0!==r?this.openRequests.set(n,{state:u.reschedule,document:e}):this.pull(e,(()=>{this.forget(p.document,e)})):(void 0!==r&&(r.state===u.active&&r.tokenSource.cancel(),this.openRequests.set(n,{state:u.outDated,document:e})),this.diagnostics.delete(t),this.forget(p.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then((()=>{this.workspaceTimeout=(0,a.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3)}),(e=>{e instanceof s.LSPCancellationError||a.DiagnosticServerCancellationData.is(e.data)||(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,a.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3))}))}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;void 0!==this.workspaceCancellation&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new i.CancellationTokenSource;const e=this.documentStates.getAllResultIds().map((e=>({uri:this.client.protocol2CodeConverter.asUri(e.uri),value:e.value})));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,(e=>{if(e&&!this.isDisposed)for(const t of e.items)t.kind===c.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(p.document,t.uri)||this.diagnostics.set(t.uri,t.items)),this.documentStates.update(p.workspace,t.uri,t.version??void 0,t.resultId)}))}createProvider(){const e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(e,t,n)=>{const r=(e,t,n)=>{const r={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof i.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(a.DocumentDiagnosticRequest.type,r,n).then((async e=>null==e||this.isDisposed||n.isCancellationRequested?{kind:c.DocumentDiagnosticReportKind.full,items:[]}:e.kind===a.DocumentDiagnosticReportKind.Full?{kind:c.DocumentDiagnosticReportKind.full,resultId:e.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,n)}:{kind:c.DocumentDiagnosticReportKind.unChanged,resultId:e.resultId}),(e=>this.client.handleFailedRequest(a.DocumentDiagnosticRequest.type,n,e,{kind:c.DocumentDiagnosticReportKind.full,items:[]}))):{kind:c.DocumentDiagnosticReportKind.full,items:[]}},o=this.client.middleware;return o.provideDiagnostics?o.provideDiagnostics(e,t,n,r):r(e,t,n)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(e,t,n)=>{const r=async e=>e.kind===a.DocumentDiagnosticReportKind.Full?{kind:c.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,t)}:{kind:c.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version},i=e=>{const t=[];for(const n of e)t.push({uri:this.client.code2ProtocolConverter.asUri(n.uri),value:n.value});return t},s=(e,t)=>{const s=(0,o.generateUuid)(),l=this.client.onProgress(a.WorkspaceDiagnosticRequest.partialResult,s,(async e=>{if(null==e)return void n(null);const t={items:[]};for(const n of e.items)try{t.items.push(await r(n))}catch(e){this.client.error("Converting workspace diagnostics failed.",e)}n(t)})),c={identifier:this.options.identifier,previousResultIds:i(e),partialResultToken:s};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(a.WorkspaceDiagnosticRequest.type,c,t).then((async e=>{if(t.isCancellationRequested)return{items:[]};const i={items:[]};for(const t of e.items)i.items.push(await r(t));return l.dispose(),n(i),{items:[]}}),(e=>(l.dispose(),this.client.handleFailedRequest(a.DocumentDiagnosticRequest.type,t,e,{items:[]})))):{items:[]}},l=this.client.middleware;return l.provideWorkspaceDiagnostics?l.provideWorkspaceDiagnostics(e,t,n,s):s(e,t)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(const[e,t]of this.openRequests)t.state===u.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:u.outDated,document:t.document});this.diagnostics.dispose()}}class E{constructor(e){this.diagnosticRequestor=e,this.documents=new a.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=_.asKey(e);this.documents.has(t)||(this.documents.set(t,e,a.Touch.Last),this.trigger())}remove(e){const t=_.asKey(e);this.documents.delete(t),0===this.documents.size?this.stop():t===this.endDocumentKey()&&(this.endDocument=this.documents.last)}trigger(){!0!==this.isDisposed&&(void 0===this.intervalHandle?(this.endDocument=this.documents.last,this.intervalHandle=(0,a.RAL)().timer.setInterval((()=>{const e=this.documents.first;if(void 0!==e){const t=_.asKey(e);this.diagnosticRequestor.pull(e),this.documents.set(t,e,a.Touch.Last),t===this.endDocumentKey()&&this.stop()}}),200)):this.endDocument=this.documents.last)}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear()}stop(){this.intervalHandle?.dispose(),this.intervalHandle=void 0,this.endDocument=void 0}endDocumentKey(){return void 0!==this.endDocument?_.asKey(this.endDocument):void 0}}class f{constructor(e,t,n){const o=e.clientOptions.diagnosticPullOptions??{onChange:!0,onSave:!1},s=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),l=[],c=e=>e instanceof i.Uri?(e=>{const t=n.documentSelector;if(void 0!==o.match)return o.match(t,e);for(const n of t)if(a.TextDocumentFilter.is(n)){if("string"==typeof n)return!1;if(void 0!==n.language&&"*"!==n.language)return!1;if(void 0!==n.scheme&&"*"!==n.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==n.pattern){const t=new r.Minimatch(n.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(e.fsPath))return!1}}return!0})(e):i.languages.match(s,e)>0&&t.isVisible(e),u=e=>e instanceof i.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new h(e,t,n),this.backgroundScheduler=new E(this.diagnosticRequestor);const _=e=>{c(e)&&n.interFileDependencies&&!u(e)&&this.backgroundScheduler.add(e)};this.activeTextDocument=i.window.activeTextEditor?.document,i.window.onDidChangeActiveTextEditor((e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&_(t),void 0!==this.activeTextDocument&&this.backgroundScheduler.remove(this.activeTextDocument)}));const m=e.getFeature(a.DidOpenTextDocumentNotification.method);l.push(m.onNotificationSent((e=>{const t=e.textDocument;this.diagnosticRequestor.knows(p.document,t)||c(t)&&this.diagnosticRequestor.pull(t,(()=>{_(t)}))}))),t.onOpen((e=>{for(const t of e){if(this.diagnosticRequestor.knows(p.document,t))continue;const e=t.toString();let n;for(const t of i.workspace.textDocuments)if(e===t.uri.toString()){n=t;break}void 0!==n&&c(n)?this.diagnosticRequestor.pull(n,(()=>{_(n)})):c(t)&&this.diagnosticRequestor.pull(t,(()=>{_(t)}))}}));const g=new Set;for(const e of i.workspace.textDocuments)c(e)&&(this.diagnosticRequestor.pull(e,(()=>{_(e)})),g.add(e.uri.toString()));if(!0===o.onTabs)for(const e of t.getTabResources())!g.has(e.toString())&&c(e)&&this.diagnosticRequestor.pull(e,(()=>{_(e)}));if(!0===o.onChange){const t=e.getFeature(a.DidChangeTextDocumentNotification.method);l.push(t.onNotificationSent((async e=>{const t=e.textDocument;void 0!==o.filter&&o.filter(t,d.onType)||!this.diagnosticRequestor.knows(p.document,t)||this.diagnosticRequestor.pull(t,(()=>{this.backgroundScheduler.trigger()}))})))}if(!0===o.onSave){const t=e.getFeature(a.DidSaveTextDocumentNotification.method);l.push(t.onNotificationSent((e=>{const t=e.textDocument;void 0!==o.filter&&o.filter(t,d.onSave)||!this.diagnosticRequestor.knows(p.document,t)||this.diagnosticRequestor.pull(e.textDocument,(()=>{this.backgroundScheduler.trigger()}))})))}const f=e.getFeature(a.DidCloseTextDocumentNotification.method);l.push(f.onNotificationSent((e=>{this.cleanUpDocument(e.textDocument)}))),t.onClose((e=>{for(const t of e)this.cleanUpDocument(t)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event((()=>{for(const e of i.workspace.textDocuments)c(e)&&this.diagnosticRequestor.pull(e)})),!0===n.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==n.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=i.Disposable.from(...l,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}cleanUpDocument(e){this.diagnosticRequestor.knows(p.document,e)&&(this.diagnosticRequestor.forgetDocument(e),this.backgroundScheduler.remove(e))}}class S extends s.TextDocumentLanguageFeature{constructor(e){super(e,a.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=l(l(e,"textDocument"),"diagnostic");t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,l(l(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(a.DiagnosticRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}));let[n,r]=this.getRegistration(t,e.diagnosticProvider);n&&r&&this.register({id:n,registerOptions:r})}dispose(){void 0!==this.tabs&&(this.tabs.dispose(),this.tabs=void 0),super.dispose()}registerLanguageProvider(e){void 0===this.tabs&&(this.tabs=new m);const t=new f(this._client,this.tabs,e);return[t.disposable,t]}}t.DiagnosticFeature=S},9959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentHighlights:(e,t,n)=>{const r=this._client,a=(e,t,n)=>r.sendRequest(i.DocumentHighlightRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDocumentHighlights(e,n)),(e=>r.handleFailedRequest(i.DocumentHighlightRequest.type,n,e,null))),o=r.middleware;return o.provideDocumentHighlights?o.provideDocumentHighlights(e,t,n,a):a(e,t,n)}};return[r.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentHighlightFeature=s},3471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentLinks:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentLinks(e,t)),(e=>n.handleFailedRequest(i.DocumentLinkRequest.type,t,e,null))),a=n.middleware;return a.provideDocumentLinks?a.provideDocumentLinks(e,t,r):r(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let r=(e,t)=>n.sendRequest(i.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then((r=>t.isCancellationRequested?e:n.protocol2CodeConverter.asDocumentLink(r)),(r=>n.handleFailedRequest(i.DocumentLinkResolveRequest.type,t,r,e)));const a=n.middleware;return a.resolveDocumentLink?a.resolveDocumentLink(e,t,r):r(e,t)}:void 0};return[r.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentLinkFeature=s},2483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);t.SupportedSymbolKinds=[i.SymbolKind.File,i.SymbolKind.Module,i.SymbolKind.Namespace,i.SymbolKind.Package,i.SymbolKind.Class,i.SymbolKind.Method,i.SymbolKind.Property,i.SymbolKind.Field,i.SymbolKind.Constructor,i.SymbolKind.Enum,i.SymbolKind.Interface,i.SymbolKind.Function,i.SymbolKind.Variable,i.SymbolKind.Constant,i.SymbolKind.String,i.SymbolKind.Number,i.SymbolKind.Boolean,i.SymbolKind.Array,i.SymbolKind.Object,i.SymbolKind.Key,i.SymbolKind.Null,i.SymbolKind.EnumMember,i.SymbolKind.Struct,i.SymbolKind.Event,i.SymbolKind.Operator,i.SymbolKind.TypeParameter],t.SupportedSymbolTags=[i.SymbolTag.Deprecated];class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentSymbolRequest.type)}fillClientCapabilities(e){let n=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"documentSymbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:t.SupportedSymbolKinds},n.hierarchicalDocumentSymbolSupport=!0,n.tagSupport={valueSet:t.SupportedSymbolTags},n.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentSymbols:(e,t)=>{const n=this._client,r=async(e,t)=>{try{const r=await n.sendRequest(i.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t);if(t.isCancellationRequested||null==r)return null;if(0===r.length)return[];{const e=r[0];return i.DocumentSymbol.is(e)?await n.protocol2CodeConverter.asDocumentSymbols(r,t):await n.protocol2CodeConverter.asSymbolInformations(r,t)}}catch(e){return n.handleFailedRequest(i.DocumentSymbolRequest.type,t,e,null)}},a=n.middleware;return a.provideDocumentSymbols?a.provideDocumentSymbols(e,t,r):r(e,t)}},a=void 0!==e.label?{label:e.label}:void 0;return[r.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,a),n]}}t.DocumentSymbolFeature=s},4849:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const r=n(9496),i=n(273),a=n(1980),o=n(8909);t.ExecuteCommandFeature=class{constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return i.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:a.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.middleware,a=(e,n)=>{let r={command:e,arguments:n};return t.sendRequest(i.ExecuteCommandRequest.type,r).then(void 0,(e=>t.handleFailedRequest(i.ExecuteCommandRequest.type,void 0,e,void 0)))};if(e.registerOptions.commands){const t=[];for(const i of e.registerOptions.commands)t.push(r.commands.registerCommand(i,((...e)=>n.executeCommand?n.executeCommand(i,e,a):a(i,e))));this._commands.set(e.id,t)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}dispose(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}},8909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.ensure=t.LSPCancellationError=void 0;const r=n(9496),i=n(273),a=n(9763),o=n(1980);class s extends r.CancellationError{constructor(e){super(),this.data=e}}t.LSPCancellationError=s,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},(t.StaticFeature||(t.StaticFeature={})).is=function(e){const t=e;return null!=t&&a.func(t.fillClientCapabilities)&&a.func(t.initialize)&&a.func(t.getState)&&a.func(t.dispose)&&(void 0===t.fillInitializeParams||a.func(t.fillInitializeParams))},(t.DynamicFeature||(t.DynamicFeature={})).is=function(e){const t=e;return null!=t&&a.func(t.fillClientCapabilities)&&a.func(t.initialize)&&a.func(t.getState)&&a.func(t.dispose)&&(void 0===t.fillInitializeParams||a.func(t.fillInitializeParams))&&a.func(t.register)&&a.func(t.unregister)&&void 0!==t.registrationType};class l{constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const n of e){t++;for(const e of r.workspace.textDocuments)if(r.languages.match(n,e)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}const n=t>0;return{kind:"document",id:this.registrationType.method,registrations:n,matches:!1}}}t.DynamicDocumentFeature=l,t.TextDocumentEventFeature=class extends l{constructor(e,t,n,i,a,o,s){super(e),this._event=t,this._type=n,this._middleware=i,this._createParams=a,this._textDocument=o,this._selectorFilter=s,this._selectors=new Map,this._onNotificationSent=new r.EventEmitter}static textDocumentFilter(e,t){for(const n of e)if(r.languages.match(n,t)>0)return!0;return!1}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event((e=>{this.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed.`,e)}))}))),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){const t=async e=>{const t=this._createParams(e);await this._client.sendNotification(this._type,t),this.notificationSent(this.getTextDocument(e),this._type,t)};if(this.matches(e)){const n=this._middleware();return n?n(e,(e=>t(e))):t(e)}}matches(e){return!this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))&&(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._onNotificationSent.dispose(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(r.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends l{constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(const e of this._registrations.values()){const t=e.data.registerOptions.documentSelector;null!==t&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(i.TextDocumentRegistrationOptions.is(t)){const n=i.StaticRegistrationOptions.hasId(t)?t.id:o.generateUuid(),r=t.documentSelector??e;if(r)return[n,Object.assign({},t,{documentSelector:r})]}else if(a.boolean(t)&&!0===t||i.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];const n=a.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[o.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return a.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&r.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(n),e)>0)return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}},t.WorkspaceFeature=class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}},7606:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const r=n(9496),i=n(3415),a=n(273),o=n(1980);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function l(e,t,n){e[t]=n}class c{constructor(e,t,n,r,i){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=r,this._serverCapability=i,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=s(s(e,"workspace"),"fileOperations");l(t,"dynamicRegistration",!0),l(t,this._clientCapability,!0)}initialize(e){const t=e.workspace?.fileOperations,n=void 0!==t?t[this._serverCapability]:void 0;if(void 0!==n?.filters)try{this.register({id:o.generateUuid(),registerOptions:{filters:n.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map((e=>{const t=new i.Minimatch(e.pattern.glob,c.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}}));this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return c.getFileType(e)}async filter(e,t){const n=await Promise.all(e.files.map((async e=>{const n=t(e),i=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(i)){if(void 0===t.kind)return!0;const e=await this.getFileType(n);if(void 0===e)return this._client.error(`Failed to determine file type for ${n.toString()}.`),!0;if(e===r.FileType.File&&t.kind===a.FileOperationPatternKind.file||e===r.FileType.Directory&&t.kind===a.FileOperationPatternKind.folder)return!0}else if(t.kind===a.FileOperationPatternKind.folder&&await c.getFileType(n)===r.FileType.Directory&&t.matcher.match(`${i}/`))return!0;return!1}))),i=e.files.filter(((e,t)=>n[t]));return{...e,files:i}}static async getFileType(e){try{return(await r.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){if(void 0!==e)return!0===e.ignoreCase?{nocase:!0}:void 0}}class d extends c{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i),this._notificationType=n,this._accessUri=a,this._createParams=o}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>this._client.sendNotification(this._notificationType,this._createParams(e));return this.doSend(t,e)}}}class u extends d{constructor(){super(...arguments),this._fsPathFileTypes=new Map}async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const n=await c.getFileType(e);return n&&this._fsPathFileTypes.set(t,n),n}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),0===this.filterSize()&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}dispose(){super.dispose(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}}t.DidCreateFilesFeature=class extends d{constructor(e){super(e,r.workspace.onDidCreateFiles,a.DidCreateFilesNotification.type,"didCreate","didCreate",(e=>e),e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.didCreateFiles?n.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends u{constructor(e){super(e,r.workspace.onDidRenameFiles,a.DidRenameFilesNotification.type,"didRename","didRename",(e=>e.oldUri),e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=r.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,(e=>e.oldUri)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didRenameFiles?n.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends u{constructor(e){super(e,r.workspace.onDidDeleteFiles,a.DidDeleteFilesNotification.type,"didDelete","didDelete",(e=>e),e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=r.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,(e=>e)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didDeleteFiles?n.didDeleteFiles(e,t):t(e)}};class p extends c{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i),this._requestType=n,this._accessUri=a,this._createParams=o}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e),e.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends p{constructor(e){super(e,r.workspace.onWillCreateFiles,a.WillCreateFilesRequest.type,"willCreate","willCreate",(e=>e),e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willCreateFiles?n.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends p{constructor(e){super(e,r.workspace.onWillRenameFiles,a.WillRenameFilesRequest.type,"willRename","willRename",(e=>e.oldUri),e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willRenameFiles?n.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends p{constructor(e){super(e,r.workspace.onWillDeleteFiles,a.WillDeleteFilesRequest.type,"willDelete","willDelete",(e=>e),e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willDeleteFiles?n.willDeleteFiles(e,t):t(e)}}},5338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const r=n(9496),i=n(273),a=n(8909);t.FileSystemWatcherFeature=class{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return i.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,a.ensure)((0,a.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;const t=[];for(const n of e.registerOptions.watchers){const e=this._client.protocol2CodeConverter.asGlobPattern(n.globPattern);if(void 0===e)continue;let a=!0,o=!0,s=!0;void 0!==n.kind&&null!==n.kind&&(a=0!=(n.kind&i.WatchKind.Create),o=0!=(n.kind&i.WatchKind.Change),s=0!=(n.kind&i.WatchKind.Delete));const l=r.workspace.createFileSystemWatcher(e,!a,!o,!s);this.hookListeners(l,a,o,s,t),t.push(l)}this._watchers.set(e.id,t)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,r,a){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Created})),null,a),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Changed})),null,a),r&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Deleted})),null,a)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}},6454:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[i.FoldingRangeKind.Comment,i.FoldingRangeKind.Imports,i.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1}}initialize(e,t){let[n,r]=this.getRegistration(t,e.foldingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideFoldingRanges:(e,t,n)=>{const r=this._client,a=(e,t,n)=>{const a={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e)};return r.sendRequest(i.FoldingRangeRequest.type,a,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asFoldingRanges(e,n)),(e=>r.handleFailedRequest(i.FoldingRangeRequest.type,n,e,null)))},o=r.middleware;return o.provideFoldingRanges?o.provideFoldingRanges(e,t,n,a):a(e,0,n)}};return[r.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.FoldingRangeFeature=o},6426:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const r=n(9496),i=n(273),a=n(1980),o=n(8909);var s;!function(e){e.fromConfiguration=function(e){const t=r.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(s||(s={}));class l extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:a.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentFormattingEdits:(e,t,n)=>{const r=this._client,a=(e,t,n)=>{const a={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),options:r.code2ProtocolConverter.asFormattingOptions(t,s.fromConfiguration(e))};return r.sendRequest(i.DocumentFormattingRequest.type,a,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,n)),(e=>r.handleFailedRequest(i.DocumentFormattingRequest.type,n,e,null)))},o=r.middleware;return o.provideDocumentFormattingEdits?o.provideDocumentFormattingEdits(e,t,n,a):a(e,t,n)}};return[r.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentFormattingFeature=l;class c extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:a.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(e,t,n,r)=>{const a=this._client,o=(e,t,n,r)=>{const o={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(e),range:a.code2ProtocolConverter.asRange(t),options:a.code2ProtocolConverter.asFormattingOptions(n,s.fromConfiguration(e))};return a.sendRequest(i.DocumentRangeFormattingRequest.type,o,r).then((e=>r.isCancellationRequested?null:a.protocol2CodeConverter.asTextEdits(e,r)),(e=>a.handleFailedRequest(i.DocumentRangeFormattingRequest.type,r,e,null)))},l=a.middleware;return l.provideDocumentRangeFormattingEdits?l.provideDocumentRangeFormattingEdits(e,t,n,r,o):o(e,t,n,r)}};return[r.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentRangeFormattingFeature=c;class d extends o.TextDocumentLanguageFeature{constructor(e){super(e,i.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:a.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideOnTypeFormattingEdits:(e,t,n,r,a)=>{const o=this._client,l=(e,t,n,r,a)=>{let l={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),ch:n,options:o.code2ProtocolConverter.asFormattingOptions(r,s.fromConfiguration(e))};return o.sendRequest(i.DocumentOnTypeFormattingRequest.type,l,a).then((e=>a.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,a)),(e=>o.handleFailedRequest(i.DocumentOnTypeFormattingRequest.type,a,e,null)))},c=o.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,n,r,a,l):l(e,t,n,r,a)}},a=e.moreTriggerCharacter||[];return[r.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...a),n]}}t.DocumentOnTypeFormattingFeature=d},6782:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.HoverRequest.type)}fillClientCapabilities(e){const t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[i.MarkupKind.Markdown,i.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideHover:(e,t,n)=>{const r=this._client,a=(e,t,n)=>r.sendRequest(i.HoverRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asHover(e)),(e=>r.handleFailedRequest(i.HoverRequest.type,n,e,null))),o=r.middleware;return o.provideHover?o.provideHover(e,t,n,a):a(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=s},9889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.implementationProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideImplementation:(e,t,n)=>{const r=this._client,a=(e,t,n)=>r.sendRequest(i.ImplementationRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>r.handleFailedRequest(i.ImplementationRequest.type,n,e,null))),o=r.middleware;return o.provideImplementation?o.provideImplementation(e,t,n,a):a(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ImplementationFeature=o},6190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,a.ensure)((0,a.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.InlayHintRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlayHints.fire()}));const[n,r]=this.getRegistration(t,e.inlayHintProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n=new r.EventEmitter,a={onDidChangeInlayHints:n.event,provideInlayHints:(e,t,n)=>{const r=this._client,a=async(e,t,n)=>{const a={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t)};try{const e=await r.sendRequest(i.InlayHintRequest.type,a,n);return n.isCancellationRequested?null:r.protocol2CodeConverter.asInlayHints(e,n)}catch(e){return r.handleFailedRequest(i.InlayHintRequest.type,n,e,null)}},o=r.middleware;return o.provideInlayHints?o.provideInlayHints(e,t,n,a):a(e,t,n)}};return a.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const n=this._client,r=async(e,t)=>{try{const r=await n.sendRequest(i.InlayHintResolveRequest.type,n.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const a=n.protocol2CodeConverter.asInlayHint(r,t);return t.isCancellationRequested?null:a}catch(e){return n.handleFailedRequest(i.InlayHintResolveRequest.type,t,e,null)}},a=n.middleware;return a.resolveInlayHint?a.resolveInlayHint(e,t,r):r(e,t)}:void 0,[this.registerProvider(t,a),{provider:a,onDidChangeInlayHints:n}]}registerProvider(e,t){return r.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=o},5098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.InlineValueRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,a.ensure)((0,a.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.InlineValueRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlineValues.fire()}));const[n,r]=this.getRegistration(t,e.inlineValueProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n=new r.EventEmitter,a={onDidChangeInlineValues:n.event,provideInlineValues:(e,t,n,r)=>{const a=this._client,o=(e,t,n,r)=>{const o={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(e),range:a.code2ProtocolConverter.asRange(t),context:a.code2ProtocolConverter.asInlineValueContext(n)};return a.sendRequest(i.InlineValueRequest.type,o,r).then((e=>r.isCancellationRequested?null:a.protocol2CodeConverter.asInlineValues(e,r)),(e=>a.handleFailedRequest(i.InlineValueRequest.type,r,e,null)))},s=a.middleware;return s.provideInlineValues?s.provideInlineValues(e,t,n,r,o):o(e,t,n,r)}};return[this.registerProvider(t,a),{provider:a,onDidChangeInlineValues:n}]}registerProvider(e,t){return r.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=o},3483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideLinkedEditingRanges:(e,t,n)=>{const r=this._client,a=(e,t,n)=>r.sendRequest(i.LinkedEditingRangeRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asLinkedEditingRanges(e,n)),(e=>r.handleFailedRequest(i.LinkedEditingRangeRequest.type,n,e,null))),o=r.middleware;return o.provideLinkedEditingRange?o.provideLinkedEditingRange(e,t,n,a):a(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=o},203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const r=n(9496),i=n(3415),a=n(273),o=n(1980),s=n(9763);function l(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c,d,u,p,_;!function(e){let t;!function(t){function n(e,t){return e.map((e=>o(e,t)))}function i(e){return l(new Set,e)}function o(e,t){const n=a.NotebookCell.create(function(e){switch(e){case r.NotebookCellKind.Markup:return a.NotebookCellKind.Markup;case r.NotebookCellKind.Code:return a.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(n.metadata=i(e.metadata)),void 0!==e.executionSummary&&s.number(e.executionSummary.executionOrder)&&s.boolean(e.executionSummary.success)&&(n.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),n}function l(e,t){if(e.has(t))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(t)){const n=[];for(const r of t)if(null!==r&&"object"==typeof r||Array.isArray(r))n.push(l(e,r));else{if(r instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");n.push(r)}return n}{const n=Object.keys(t),r=Object.create(null);for(const i of n){const n=t[i];if(null!==n&&"object"==typeof n||Array.isArray(n))r[i]=l(e,n);else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");r[i]=n}}return r}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,r){const o=a.NotebookDocument.create(r.asUri(e.uri),e.notebookType,e.version,n(t,r));return Object.keys(e.metadata).length>0&&(o.metadata=i(e.metadata)),o},t.asNotebookCells=n,t.asMetadata=i,t.asNotebookCell=o,t.asTextContentChange=function(e,t){const n=t.asChangeTextDocumentParams(e,e.document.uri,e.document.version);return{document:n.textDocument,changes:n.contentChanges}},t.asNotebookDocumentChangeEvent=function(t,n){const r=Object.create(null);if(t.metadata&&(r.metadata=e.c2p.asMetadata(t.metadata)),void 0!==t.cells){const i=Object.create(null),a=t.cells;a.structure&&(i.structure={array:{start:a.structure.array.start,deleteCount:a.structure.array.deleteCount,cells:void 0!==a.structure.array.cells?a.structure.array.cells.map((t=>e.c2p.asNotebookCell(t,n))):void 0},didOpen:void 0!==a.structure.didOpen?a.structure.didOpen.map((e=>n.asOpenTextDocumentParams(e.document).textDocument)):void 0,didClose:void 0!==a.structure.didClose?a.structure.didClose.map((e=>n.asCloseTextDocumentParams(e.document).textDocument)):void 0}),void 0!==a.data&&(i.data=a.data.map((t=>e.c2p.asNotebookCell(t,n)))),void 0!==a.textContent&&(i.textContent=a.textContent.map((t=>e.c2p.asTextContentChange(t,n)))),Object.keys(i).length>0&&(r.cells=i)}return r}}(t=e.c2p||(e.c2p={}))}(c||(c={})),function(e){function t(e,t,r=!0){return!(e.kind!==t.kind||e.document.uri.toString()!==t.document.uri.toString()||e.document.languageId!==t.document.languageId||!function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.executionOrder===t.executionOrder&&e.success===t.success&&function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.startTime===t.startTime&&e.endTime===t.endTime)}(e.timing,t.timing))}(e.executionSummary,t.executionSummary))&&(!r||r&&n(e.metadata,t.metadata))}function n(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const i=Array.isArray(e),a=Array.isArray(t);if(i!==a)return!1;if(i&&a){if(e.length!==t.length)return!1;for(let r=0;r=0&&l>=0&&t(e[s],n[l],r);)s--,l--;const c=s+1-o,d=o===l+1?void 0:n.slice(o,l+1);return void 0!==d?{start:o,deleteCount:c,cells:d}:{start:o,deleteCount:c}}return oe.document.uri.toString())))}}}(_||(_={}));class m{constructor(e,t){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(p.asDocumentSelector(t)),r.workspace.onDidOpenNotebookDocument((e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)}),void 0,this.disposables);for(const e of r.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);r.workspace.onDidChangeNotebookDocument((e=>this.didChangeNotebookDocument(e)),void 0,this.disposables),!0===this.options.save&&r.workspace.onDidSaveNotebookDocument((e=>this.didSave(e)),void 0,this.disposables),r.workspace.onDidCloseNotebookDocument((e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())}),void 0,this.disposables)}getState(){for(const e of r.workspace.notebookDocuments)if(void 0!==this.getMatchingCells(e))return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){return r.languages.match(this.selector,e)>0}didOpenNotebookCellTextDocument(e,t){if(0===r.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const n=this.notebookSyncInfo.get(e.uri.toString()),i=this.cellMatches(e,t);if(void 0!==n){const r=n.uris.has(t.document.uri.toString());if(i&&r||!i&&!r)return;if(i){const t=this.getMatchingCells(e);if(void 0!==t){const r=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==r&&this.doSendChange(r,t).catch((()=>{}))}}}else i&&this.doSendOpen(e,[t]).catch((()=>{}))}didChangeNotebookCellTextDocument(e,t){0!==r.languages.match(this.selector,t.document)&&this.doSendChange({notebook:e,cells:{textContent:[t]}},void 0).catch((()=>{}))}didCloseNotebookCellTextDocument(e,t){const n=this.notebookSyncInfo.get(e.uri.toString());if(void 0===n)return;const r=t.document.uri,i=n.cells.findIndex((e=>e.document.uri.toString()===r.toString()));if(-1!==i)if(0===i&&1===n.cells.length)this.doSendClose(e,n.cells).catch((()=>{}));else{const t=n.cells.slice(),r=t.splice(i,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:i,deleteCount:1},didClose:r}}},t).catch((()=>{}))}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t=this.getMatchingCells(e),n=this.notebookSyncInfo.get(e.uri.toString())){if(void 0!==n)if(void 0!==t){const r=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==r&&this.doSendChange(r,t).catch((()=>{}))}else this.doSendClose(e,[]).catch((()=>{}));else{if(void 0===t)return;this.doSendOpen(e,t).catch((()=>{}))}}didChangeNotebookDocument(e){const t=e.notebook,n=this.notebookSyncInfo.get(t.uri.toString());if(void 0===n){if(0===e.contentChanges.length)return;const r=this.getMatchingCells(t);if(void 0===r)return;this.didOpen(t,r,n)}else{const r=this.getMatchingCells(t);if(void 0===r)return void this.didClose(t,n);const i=this.asNotebookDocumentChangeEvent(e.notebook,e,n,r);void 0!==i&&this.doSendChange(i,r).catch((()=>{}))}}didSave(e){void 0!==this.notebookSyncInfo.get(e.uri.toString())&&this.doSendSave(e).catch((()=>{}))}didClose(e,t=this.notebookSyncInfo.get(e.uri.toString())){if(void 0===t)return;const n=e.getCells().filter((e=>t.uris.has(e.document.uri.toString())));this.doSendClose(e,n).catch((()=>{}))}async sendDidOpenNotebookDocument(e){const t=this.getMatchingCells(e);if(void 0!==t)return this.doSendOpen(e,t)}async doSendOpen(e,t){const n=async(e,t)=>{const n=c.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),r=t.map((e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document)));try{await this.client.sendNotification(a.DidOpenNotebookDocumentNotification.type,{notebookDocument:n,cellTextDocuments:r})}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},r=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),_.create(t)),void 0!==r?.didOpen?r.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){return this.doSendChange(e,void 0)}async doSendChange(e,t=this.getMatchingCells(e.notebook)){const n=async e=>{try{await this.client.sendNotification(a.DidChangeNotebookDocumentNotification.type,{notebookDocument:c.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:c.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)})}catch(e){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",e),e}},r=this.client.middleware?.notebooks;return void 0!==e.cells?.structure&&this.notebookSyncInfo.set(e.notebook.uri.toString(),_.create(t??[])),void 0!==r?.didChange?r?.didChange(e,n):n(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){const t=async e=>{try{await this.client.sendNotification(a.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}})}catch(e){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return void 0!==n?.didSave?n.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){return this.doSendClose(e,this.getMatchingCells(e)??[])}async doSendClose(e,t){const n=async(e,t)=>{try{await this.client.sendNotification(a.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map((e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document)))})}catch(e){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",e),e}},r=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),void 0!==r?.didClose?r.didClose(e,t,n):n(e,t)}asNotebookDocumentChangeEvent(e,t,n,r){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const i={notebook:e};let a;if(void 0!==t?.metadata&&(i.metadata=c.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];a=new Set(r.map((e=>e.document.uri.toString())));for(const n of t.cellChanges)!a.has(n.cell.document.uri.toString())||void 0===n.executionSummary&&void 0===n.metadata||e.push(n.cell);e.length>0&&(i.cells=i.cells??{},i.cells.data=e)}if((void 0!==t?.contentChanges&&t.contentChanges.length>0||void 0===t)&&void 0!==n&&void 0!==r){const e=n.cells,t=r,a=d.computeDiff(e,t,!1);let o,s;if(void 0!==a){o=void 0===a.cells?new Map:new Map(a.cells.map((e=>[e.document.uri.toString(),e]))),s=0===a.deleteCount?new Map:new Map(e.slice(a.start,a.start+a.deleteCount).map((e=>[e.document.uri.toString(),e])));for(const e of Array.from(s.keys()))o.has(e)&&(s.delete(e),o.delete(e));i.cells=i.cells??{};const t=[],n=[];if(o.size>0||s.size>0){for(const e of o.values())t.push(e);for(const e of s.values())n.push(e)}i.cells.structure={array:a,didOpen:t,didClose:n}}}return Object.keys(i).length>1?i:void 0}getMatchingCells(e,t=e.getCells()){if(void 0!==this.options.notebookSelector)for(const n of this.options.notebookSelector)if(void 0===n.notebook||u.matchNotebook(n.notebook,e)){const r=this.filterCells(e,t,n.cells);return 0===r.length?void 0:r}}cellMatches(e,t){const n=this.getMatchingCells(e,[t]);return void 0!==n&&n[0]===t}filterCells(e,t,n){const r=void 0!==n?t.filter((e=>{const t=e.document.languageId;return n.some((e=>"*"===e.language||t===e.language))})):t;return"function"==typeof this.client.clientOptions.notebookDocumentOptions?.filterCells?this.client.clientOptions.notebookDocumentOptions.filterCells(e,r):r}}class g{constructor(e){this.client=e,this.registrations=new Map,this.registrationType=a.NotebookDocumentSyncRegistrationType.type,r.workspace.onDidOpenTextDocument((e=>{if(e.uri.scheme!==g.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof m&&e.didOpenNotebookCellTextDocument(t,n)})),r.workspace.onDidChangeTextDocument((e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==g.CellScheme)return;const[n]=this.findNotebookDocumentAndCell(t);if(void 0!==n)for(const t of this.registrations.values())t instanceof m&&t.didChangeNotebookCellTextDocument(n,e)})),r.workspace.onDidCloseTextDocument((e=>{if(e.uri.scheme!==g.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof m&&e.didCloseNotebookCellTextDocument(t,n)}))}getState(){if(0===this.registrations.size)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(const e of this.registrations.values()){const t=e.getState();if("document"===t.kind&&!0===t.registrations&&!0===t.matches)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}fillClientCapabilities(e){const t=l(l(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(p.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const n=t.id??o.generateUuid();this.register({id:n,registerOptions:t})}register(e){const t=new m(this.client,e.registerOptions);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);t&&t.dispose()}dispose(){for(const e of this.registrations.values())e.dispose();this.registrations.clear()}handles(e){if(e.uri.scheme!==g.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&r.languages.match(this.dedicatedChannel,e)>0)return!0;for(const t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(const t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){const t=e.uri.toString();for(const e of r.workspace.notebookDocuments)for(const n of e.getCells())if(n.document.uri.toString()===t)return[e,n];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=g,g.CellScheme="vscode-notebook-cell"},3603:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const r=n(273),i=n(8071);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:r.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(r.WorkDoneProgressCreateRequest.type,(e=>{this.activeParts.add(new i.ProgressPart(this._client,e.token,t))}))}dispose(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},8071:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const r=n(9496),i=n(273),a=n(9763);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(i.WorkDoneProgress.type,this._token,(e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}}))}begin(e){this._infinite=void 0===e.percentage,void 0!==this._lspProgressDisposable&&r.window.withProgress({location:r.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},(async(t,n)=>{if(void 0!==this._lspProgressDisposable)return this._progress=t,this._cancellationToken=n,this._tokenDisposable=this._cancellationToken.onCancellationRequested((()=>{this._client.sendNotification(i.WorkDoneProgressCancelNotification.type,{token:this._token})})),this.report(e),new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}))}report(e){if(this._infinite&&a.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(a.number(e.percentage)){const t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._reported+=n,void 0!==this._progress&&this._progress.report({message:e.message,increment:n})}}cancel(){this.cleanup(),void 0!==this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),void 0!==this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){void 0!==this._lspProgressDisposable&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),void 0!==this._tokenDisposable&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}}},8714:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.CallHierarchyItem{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,a),void 0!==o&&(this.data=o)}}t.default=i},6434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=i},583:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.CodeLens{constructor(e){super(e)}}t.default=i},1807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.CompletionItem{constructor(e){super(e)}}t.default=i},8785:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const r=n(9496),i=n(273),a=n(9763),o=n(4904),s=n(1807),l=n(583),c=n(8705),d=n(6434),u=n(5316),p=n(8714),_=n(1365),m=n(3912),g=n(1065),h=n(273);var E;!function(e){e.is=function(e){let t=e;return t&&a.string(t.language)&&a.string(t.value)}}(E||(E={})),t.createConverter=function(e,t,n){const f=e||(e=>r.Uri.parse(e));function S(e){return f(e)}function b(e){let t=new u.ProtocolDiagnostic(y(e.range),e.message,R(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)i.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:S(e.codeDescription.href)}:t.code=e.code;else if(u.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const n=e.code;t.code={value:n.value,target:S(n.target)}}return e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){const t=new Array(e.length);for(let n=0;n0?t:void 0}(e.tags)),t}function v(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function T(e){return e?new r.Position(e.line,e.character):void 0}function y(e){return e?new r.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function C(e,t){return o.map(e,(e=>new r.Range(e.start.line,e.start.character,e.end.line,e.end.character)),t)}function R(e){if(null==e)return r.DiagnosticSeverity.Error;switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}return r.DiagnosticSeverity.Error}function O(e){if(a.string(e))return e;switch(e.kind){case i.MarkupKind.Markdown:return N(e.value);case i.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function N(e){let a;if(void 0===e||"string"==typeof e)a=new r.MarkdownString(e);else switch(e.kind){case i.MarkupKind.Markdown:a=new r.MarkdownString(e.value);break;case i.MarkupKind.PlainText:a=new r.MarkdownString,a.appendText(e.value);break;default:a=new r.MarkdownString,a.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return a.isTrusted=t,a.supportHtml=n,a}function I(e){if(e===i.CompletionItemTag.Deprecated)return r.CompletionItemTag.Deprecated}function A(e,t,n,o,l,c){const d=function(e){if(null==e)return[];const t=[];for(const n of e){const e=I(n);void 0!==e&&t.push(e)}return t}(e.tags),u=function(e){return i.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),p=new s.default(u);e.detail&&(p.detail=e.detail),e.documentation&&(p.documentation=O(e.documentation),p.documentationFormat=a.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(p.filterText=e.filterText);const _=function(e,t,n){const a=e.insertTextFormat??n;if(void 0!==e.textEdit||void 0!==t){const[n,s]=void 0!==e.textEdit?(o=e.textEdit,i.InsertReplaceEdit.is(o)?[{inserting:y(o.insert),replacing:y(o.replace)},o.newText]:[y(o.range),o.newText]):[t,e.textEditText??e.label];return a===i.InsertTextFormat.Snippet?{text:new r.SnippetString(s),range:n,fromEdit:!0}:{text:s,range:n,fromEdit:!0}}return e.insertText?a===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var o}(e,n,l);if(_&&(p.insertText=_.text,p.range=_.range,p.fromEdit=_.fromEdit),a.number(e.kind)){let[t,n]=(m=e.kind,i.CompletionItemKind.Text<=m&&m<=i.CompletionItemKind.TypeParameter?[m-1,void 0]:[r.CompletionItemKind.Text,m]);p.kind=t,n&&(p.originalItemKind=n)}var m;e.sortText&&(p.sortText=e.sortText),e.additionalTextEdits&&(p.additionalTextEdits=x(e.additionalTextEdits));const g=void 0!==e.commitCharacters?a.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t;g&&(p.commitCharacters=g.slice()),e.command&&(p.command=W(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(p.deprecated=e.deprecated,!0===e.deprecated&&d.push(r.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(p.preselect=e.preselect);const h=e.data??c;void 0!==h&&(p.data=h),d.length>0&&(p.tags=d);const E=e.insertTextMode??o;return void 0!==E&&(p.insertTextMode=E,E===i.InsertTextMode.asIs&&(p.keepWhitespace=!0)),p}function D(e){if(e)return new r.TextEdit(y(e.range),e.newText)}async function w(e,t){if(e)return o.map(e,D,t)}function x(e){if(!e)return;const t=new Array(e.length);for(let n=0;n0){let n=[];for(let t of e.children)n.push($(t));t.children=n}return t}function z(e,t){e.tags=j(t.tags),t.deprecated&&(e.tags?e.tags.includes(r.SymbolTag.Deprecated)||(e.tags=e.tags.concat(r.SymbolTag.Deprecated)):e.tags=[r.SymbolTag.Deprecated])}function W(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const K=new Map;function Q(e){if(null==e)return;let t=K.get(e);if(t)return t;let n=e.split(".");t=r.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}async function X(e,t){if(null==e)return;let n=new d.default(e.title,e.data);return void 0!==e.kind&&(n.kind=Q(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=function(e){const t=new Array(e.length);for(let n=0;n{const t=function(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}(r[e]);n.set(e,t)}),t)}const a=e=>void 0===e?void 0:n.get(e),s=new r.WorkspaceEdit;if(e.documentChanges){const n=e.documentChanges;await o.forEach(n,(e=>{if(i.CreateFile.is(e))s.createFile(f(e.uri),e.options,a(e.annotationId));else if(i.RenameFile.is(e))s.renameFile(f(e.oldUri),f(e.newUri),e.options,a(e.annotationId));else if(i.DeleteFile.is(e))s.deleteFile(f(e.uri),e.options,a(e.annotationId));else{if(!i.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=f(e.textDocument.uri);for(const n of e.edits)i.AnnotatedTextEdit.is(n)?s.replace(t,y(n.range),n.newText,a(n.annotationId)):s.replace(t,y(n.range),n.newText)}}}),t)}else if(e.changes){const n=e.changes;await o.forEach(Object.keys(n),(e=>{s.set(f(e),x(n[e]))}),t)}return s}function ee(e){let t=y(e.range),n=e.target?S(e.target):void 0,r=new c.default(t,n);return void 0!==e.tooltip&&(r.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(r.data=e.data),r}function te(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}function ne(e){return new r.ColorInformation(y(e.range),te(e.color))}function re(e){let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=x(e.additionalTextEdits),e.textEdit&&(t.textEdit=D(e.textEdit)),t}function ie(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}function ae(e){return new r.FoldingRange(e.startLine,e.endLine,ie(e.kind))}function oe(e){return new r.SelectionRange(y(e.range),e.parent?oe(e.parent):void 0)}function se(e){return i.InlineValueText.is(e)?new r.InlineValueText(y(e.range),e.text):i.InlineValueVariableLookup.is(e)?new r.InlineValueVariableLookup(y(e.range),e.variableName,e.caseSensitiveLookup):new r.InlineValueEvaluatableExpression(y(e.range),e.expression)}async function le(e,t){const n="string"==typeof e.label?e.label:await o.map(e.label,ce,t),r=new g.default(T(e.position),n);return void 0!==e.kind&&(r.kind=e.kind),void 0!==e.textEdits&&(r.textEdits=await w(e.textEdits,t)),void 0!==e.tooltip&&(r.tooltip=de(e.tooltip)),void 0!==e.paddingLeft&&(r.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(r.paddingRight=e.paddingRight),void 0!==e.data&&(r.data=e.data),r}function ce(e){const t=new r.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=F(e.location)),void 0!==e.tooltip&&(t.tooltip=de(e.tooltip)),void 0!==e.command&&(t.command=W(e.command)),t}function de(e){return"string"==typeof e?e:N(e)}function ue(e){if(null===e)return;const t=new p.default(H(e.kind),e.name,e.detail||"",S(e.uri),y(e.range),y(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=j(e.tags)),t}async function pe(e,t){return new r.CallHierarchyIncomingCall(ue(e.from),await C(e.fromRanges,t))}async function _e(e,t){return new r.CallHierarchyOutgoingCall(ue(e.to),await C(e.fromRanges,t))}function me(e){return new r.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function ge(e){if(null===e)return;let t=new _.default(H(e.kind),e.name,e.detail||"",S(e.uri),y(e.range),y(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=j(e.tags)),t}return K.set(i.CodeActionKind.Empty,r.CodeActionKind.Empty),K.set(i.CodeActionKind.QuickFix,r.CodeActionKind.QuickFix),K.set(i.CodeActionKind.Refactor,r.CodeActionKind.Refactor),K.set(i.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorExtract),K.set(i.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorInline),K.set(i.CodeActionKind.RefactorRewrite,r.CodeActionKind.RefactorRewrite),K.set(i.CodeActionKind.Source,r.CodeActionKind.Source),K.set(i.CodeActionKind.SourceOrganizeImports,r.CodeActionKind.SourceOrganizeImports),{asUri:S,asDocumentSelector:function(e){const t=[];for(const n of e)if("string"==typeof n)t.push(n);else if(h.NotebookCellTextDocumentFilter.is(n))if("string"==typeof n.notebook)t.push({notebookType:n.notebook,language:n.language});else{const e=n.notebook.notebookType??"*";t.push({notebookType:e,scheme:n.notebook.scheme,pattern:n.notebook.pattern,language:n.language})}else h.TextDocumentFilter.is(n)&&t.push({language:n.language,scheme:n.scheme,pattern:n.pattern});return t},asDiagnostics:async function(e,t){return o.map(e,b,t)},asDiagnostic:b,asRange:y,asRanges:C,asPosition:T,asDiagnosticSeverity:R,asDiagnosticTag:v,asHover:function(e){if(e)return new r.Hover(function(e){if(a.string(e))return N(e);if(E.is(e))return N().appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=N();E.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}return N(e)}(e.contents),y(e.range))},asCompletionResult:async function(e,t,n){if(!e)return;if(Array.isArray(e))return o.map(e,(e=>A(e,t)),n);const a=e,{defaultRange:s,commitCharacters:l}=function(e,t){const n=e.itemDefaults?.editRange,r=e.itemDefaults?.commitCharacters??t;return i.Range.is(n)?{defaultRange:y(n),commitCharacters:r}:void 0!==n?{defaultRange:{inserting:y(n.insert),replacing:y(n.replace)},commitCharacters:r}:{defaultRange:void 0,commitCharacters:r}}(a,t),c=await o.map(a.items,(e=>A(e,l,s,a.itemDefaults?.insertTextMode,a.itemDefaults?.insertTextFormat,a.itemDefaults?.data)),n);return new r.CompletionList(c,a.isIncomplete)},asCompletionItem:A,asTextEdit:D,asTextEdits:w,asSignatureHelp:async function(e,t){if(!e)return;let n=new r.SignatureHelp;return a.number(e.activeSignature)?n.activeSignature=e.activeSignature:n.activeSignature=0,a.number(e.activeParameter)?n.activeParameter=e.activeParameter:n.activeParameter=0,e.signatures&&(n.signatures=await P(e.signatures,t)),n},asSignatureInformations:P,asSignatureInformation:M,asParameterInformations:L,asParameterInformation:k,asDeclarationResult:async function(e,t){if(e)return B(e,t)},asDefinitionResult:async function(e,t){if(e)return B(e,t)},asLocation:F,asReferences:async function(e,t){if(e)return o.map(e,F,t)},asDocumentHighlights:async function(e,t){if(e)return o.map(e,G,t)},asDocumentHighlight:G,asDocumentHighlightKind:q,asSymbolKind:H,asSymbolTag:Y,asSymbolTags:j,asSymbolInformations:async function(e,t){if(e)return o.map(e,V,t)},asSymbolInformation:V,asDocumentSymbols:async function(e,t){if(null!=e)return o.map(e,$,t)},asDocumentSymbol:$,asCommand:W,asCommands:async function(e,t){if(e)return o.map(e,W,t)},asCodeAction:X,asCodeActionKind:Q,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>Q(e)))},asCodeActionResult:function(e,t){return o.mapAsync(e,(async e=>i.Command.is(e)?W(e):X(e,t)),t)},asCodeLens:Z,asCodeLenses:async function(e,t){if(e)return o.map(e,Z,t)},asWorkspaceEdit:J,asDocumentLink:ee,asDocumentLinks:async function(e,t){if(e)return o.map(e,ee,t)},asFoldingRangeKind:ie,asFoldingRange:ae,asFoldingRanges:async function(e,t){if(e)return o.map(e,ae,t)},asColor:te,asColorInformation:ne,asColorInformations:async function(e,t){if(e)return o.map(e,ne,t)},asColorPresentation:re,asColorPresentations:async function(e,t){if(e)return o.map(e,re,t)},asSelectionRange:oe,asSelectionRanges:async function(e,t){return Array.isArray(e)?o.map(e,oe,t):[]},asInlineValue:se,asInlineValues:async function(e,t){return Array.isArray(e)?o.map(e,se,t):[]},asInlayHint:le,asInlayHints:async function(e,t){if(Array.isArray(e))return o.mapAsync(e,le,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new r.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:me,asSemanticTokensEdits:async function(e,t){if(null!=e)return new r.SemanticTokensEdits(e.edits.map(me),e.resultId)},asCallHierarchyItem:ue,asCallHierarchyItems:async function(e,t){if(null!==e)return o.map(e,ue,t)},asCallHierarchyIncomingCall:pe,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return o.mapAsync(e,pe,t)},asCallHierarchyOutgoingCall:_e,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return o.mapAsync(e,_e,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new r.LinkedEditingRanges(await C(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:ge,asTypeHierarchyItems:async function(e,t){if(null!==e)return o.map(e,ge,t)},asGlobPattern:function(e){if(a.string(e))return e;if(i.RelativePattern.is(e)){if(i.URI.is(e.baseUri))return new r.RelativePattern(S(e.baseUri),e.pattern);if(i.WorkspaceFolder.is(e.baseUri)){const t=r.workspace.getWorkspaceFolder(S(e.baseUri.uri));return void 0!==t?new r.RelativePattern(t,e.pattern):void 0}}}}}},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const r=n(9496),i=n(9763);(t.DiagnosticCode||(t.DiagnosticCode={})).is=function(e){const t=e;return null!=t&&(i.number(t.value)||i.string(t.value))&&i.string(t.target)};class a extends r.Diagnostic{constructor(e,t,n,r){super(e,t,n),this.data=r,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=a},8705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.DocumentLink{constructor(e,t){super(e,t)}}t.default=i},1065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.InlayHint{constructor(e,t,n){super(e,t,n)}}t.default=i},1365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.TypeHierarchyItem{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,a),void 0!==o&&(this.data=o)}}t.default=i},3912:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9496);class i extends r.SymbolInformation{constructor(e,t,n,i,a){const o=!(i instanceof r.Uri);super(e,t,n,o?i:new r.Location(i,new r.Range(0,0,0,0))),this.hasRange=o,void 0!==a&&(this.data=a)}}t.default=i},8480:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.ReferencesRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideReferences:(e,t,n,r)=>{const a=this._client,o=(e,t,n,r)=>a.sendRequest(i.ReferencesRequest.type,a.code2ProtocolConverter.asReferenceParams(e,t,n),r).then((e=>r.isCancellationRequested?null:a.protocol2CodeConverter.asReferences(e,r)),(e=>a.handleFailedRequest(i.ReferencesRequest.type,r,e,null))),s=a.middleware;return s.provideReferences?s.provideReferences(e,t,n,r,o):o(e,t,n,r)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=s},6458:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const r=n(9496),i=n(273),a=n(1980),o=n(9763),s=n(8909);class l extends s.TextDocumentLanguageFeature{constructor(e){super(e,i.RenameRequest.type)}fillClientCapabilities(e){let t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=i.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(o.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:a.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t=e.documentSelector,n={provideRenameEdits:(e,t,n,r)=>{const a=this._client,o=(e,t,n,r)=>{let o={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(e),position:a.code2ProtocolConverter.asPosition(t),newName:n};return a.sendRequest(i.RenameRequest.type,o,r).then((e=>r.isCancellationRequested?null:a.protocol2CodeConverter.asWorkspaceEdit(e,r)),(e=>a.handleFailedRequest(i.RenameRequest.type,r,e,null,!1)))},s=a.middleware;return s.provideRenameEdits?s.provideRenameEdits(e,t,n,r,o):o(e,t,n,r)},prepareRename:e.prepareProvider?(e,t,n)=>{const r=this._client,a=(e,t,n)=>{let a={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t)};return r.sendRequest(i.PrepareRenameRequest.type,a,n).then((e=>n.isCancellationRequested?null:i.Range.is(e)?r.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&i.Range.is(e.range)?{range:r.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed."))),(e=>{throw"string"==typeof e.message?new Error(e.message):new Error("The element can't be renamed.")}))},o=r.middleware;return o.prepareRename?o.prepareRename(e,t,n,a):a(e,t,n)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&o.boolean(t.defaultBehavior)}}t.RenameFeature=l},750:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.selectionRangeProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideSelectionRanges:(e,t,n)=>{const r=this._client,a=async(e,t,n)=>{const a={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:await r.code2ProtocolConverter.asPositions(t,n)};return r.sendRequest(i.SelectionRangeRequest.type,a,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asSelectionRanges(e,n)),(e=>r.handleFailedRequest(i.SelectionRangeRequest.type,n,e,null)))},o=r.middleware;return o.provideSelectionRanges?o.provideSelectionRanges(e,t,n,a):a(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.SelectionRangeFeature=o},9957:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(9763);class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[i.SemanticTokenTypes.namespace,i.SemanticTokenTypes.type,i.SemanticTokenTypes.class,i.SemanticTokenTypes.enum,i.SemanticTokenTypes.interface,i.SemanticTokenTypes.struct,i.SemanticTokenTypes.typeParameter,i.SemanticTokenTypes.parameter,i.SemanticTokenTypes.variable,i.SemanticTokenTypes.property,i.SemanticTokenTypes.enumMember,i.SemanticTokenTypes.event,i.SemanticTokenTypes.function,i.SemanticTokenTypes.method,i.SemanticTokenTypes.macro,i.SemanticTokenTypes.keyword,i.SemanticTokenTypes.modifier,i.SemanticTokenTypes.comment,i.SemanticTokenTypes.string,i.SemanticTokenTypes.number,i.SemanticTokenTypes.regexp,i.SemanticTokenTypes.operator,i.SemanticTokenTypes.decorator],t.tokenModifiers=[i.SemanticTokenModifiers.declaration,i.SemanticTokenModifiers.definition,i.SemanticTokenModifiers.readonly,i.SemanticTokenModifiers.static,i.SemanticTokenModifiers.deprecated,i.SemanticTokenModifiers.abstract,i.SemanticTokenModifiers.async,i.SemanticTokenModifiers.modification,i.SemanticTokenModifiers.documentation,i.SemanticTokenModifiers.defaultLibrary],t.formats=[i.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,a.ensure)((0,a.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(i.SemanticTokensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()}));const[n,r]=this.getRegistration(t,e.semanticTokensProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n=o.boolean(e.full)?e.full:void 0!==e.full,a=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,s=new r.EventEmitter,l=n?{onDidChangeSemanticTokens:s.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,r=n.middleware,a=(e,t)=>{const r={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(i.SemanticTokensRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,t)),(e=>n.handleFailedRequest(i.SemanticTokensRequest.type,t,e,null)))};return r.provideDocumentSemanticTokens?r.provideDocumentSemanticTokens(e,t,a):a(e,t)},provideDocumentSemanticTokensEdits:a?(e,t,n)=>{const r=this._client,a=r.middleware,o=(e,t,n)=>{const a={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return r.sendRequest(i.SemanticTokensDeltaRequest.type,a,n).then((async e=>n.isCancellationRequested?null:i.SemanticTokens.is(e)?await r.protocol2CodeConverter.asSemanticTokens(e,n):await r.protocol2CodeConverter.asSemanticTokensEdits(e,n)),(e=>r.handleFailedRequest(i.SemanticTokensDeltaRequest.type,n,e,null)))};return a.provideDocumentSemanticTokensEdits?a.provideDocumentSemanticTokensEdits(e,t,n,o):o(e,t,n)}:void 0}:void 0,c=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const r=this._client,a=r.middleware,o=(e,t,n)=>{const a={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t)};return r.sendRequest(i.SemanticTokensRangeRequest.type,a,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asSemanticTokens(e,n)),(e=>r.handleFailedRequest(i.SemanticTokensRangeRequest.type,n,e,null)))};return a.provideDocumentRangeSemanticTokens?a.provideDocumentRangeSemanticTokens(e,t,n,o):o(e,t,n)}}:void 0,d=[],u=this._client,p=u.protocol2CodeConverter.asSemanticTokensLegend(e.legend),_=u.protocol2CodeConverter.asDocumentSelector(t);return void 0!==l&&d.push(r.languages.registerDocumentSemanticTokensProvider(_,l,p)),void 0!==c&&d.push(r.languages.registerDocumentRangeSemanticTokensProvider(_,c,p)),[new r.Disposable((()=>d.forEach((e=>e.dispose())))),{range:c,full:l,onDidChangeSemanticTokensEmitter:s}]}}t.SemanticTokensFeature=s},2908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,r)=>{const a=this._client,o=(e,t,n,r)=>a.sendRequest(i.SignatureHelpRequest.type,a.code2ProtocolConverter.asSignatureHelpParams(e,t,n),r).then((e=>r.isCancellationRequested?null:a.protocol2CodeConverter.asSignatureHelp(e,r)),(e=>a.handleFailedRequest(i.SignatureHelpRequest.type,r,e,null))),s=a.middleware;return s.provideSignatureHelp?s.provideSignatureHelp(e,t,r,n,o):o(e,t,r,n)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){const n=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(void 0===e.retriggerCharacters){const i=e.triggerCharacters||[];return r.languages.registerSignatureHelpProvider(n,t,...i)}{const i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return r.languages.registerSignatureHelpProvider(n,t,i)}}}t.SignatureHelpFeature=s},743:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(1980);class s extends a.TextDocumentEventFeature{constructor(e,t){super(e,r.workspace.onDidOpenTextDocument,i.DidOpenTextDocumentNotification.type,(()=>e.middleware.didOpen),(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),(e=>e),a.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:o.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return i.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);r.workspace.textDocuments.forEach((e=>{const n=e.uri.toString();if(!this._syncedDocuments.has(n)&&r.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const t=this._client.middleware,r=e=>this._client.sendNotification(this._type,this._createParams(e));(t.didOpen?t.didOpen(e,r):r(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._syncedDocuments.set(n,e)}}))}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,n)}}t.DidOpenTextDocumentFeature=s;class l extends a.TextDocumentEventFeature{constructor(e,t,n){super(e,r.workspace.onDidCloseTextDocument,i.DidCloseTextDocumentNotification.type,(()=>e.middleware.didClose),(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),(e=>e),a.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=n}get registrationType(){return i.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:o.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,n)}unregister(e){const t=this._selectors.get(e);super.unregister(e);const n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(r.languages.match(t,e)>0&&!this._selectorFilter(n,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){let t=this._client.middleware,n=e=>this._client.sendNotification(this._type,this._createParams(e));this._syncedDocuments.delete(e.uri.toString()),(t.didClose?t.didClose(e,n):n(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}))}}))}}t.DidCloseTextDocumentFeature=l;class c extends a.DynamicDocumentFeature{constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new r.EventEmitter,this._onPendingChangeAdded=new r.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=i.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return i.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==i.TextDocumentSyncKind.None&&this.register({id:o.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(const e of this._changeData.values())yield e.documentSelector}async callback(e){if(0===e.contentChanges.length)return;const t=e.document.uri,n=e.document.version,a=[];for(const o of this._changeData.values())if(r.languages.match(o.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const r=this._client.middleware;if(o.syncKind===i.TextDocumentSyncKind.Incremental){const o=async e=>{const r=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e,t,n);await this._client.sendNotification(i.DidChangeTextDocumentNotification.type,r),this.notificationSent(e.document,i.DidChangeTextDocumentNotification.type,r)};a.push(r.didChange?r.didChange(e,(e=>o(e))):o(e))}else if(o.syncKind===i.TextDocumentSyncKind.Full){const t=async e=>{const t=e.document.uri.toString();this._pendingTextDocumentChanges.set(t,e.document),this._onPendingChangeAdded.fire()};a.push(r.didChange?r.didChange(e,(e=>t(e))):t(e))}}return Promise.all(a).then(void 0,(e=>{throw this._client.error(`Sending document notification ${i.DidChangeTextDocumentNotification.type.method} failed`,e),e}))}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){if(this._changeData.delete(e),0===this._changeData.size)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=i.TextDocumentSyncKind.None;else{this._syncKind=i.TextDocumentSyncKind.None;for(const e of this._changeData.values())if(this.updateSyncKind(e.syncKind),this._syncKind===i.TextDocumentSyncKind.Full)break}}dispose(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=i.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(0===this._pendingTextDocumentChanges.size)return[];let t;if(0===e.size)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(const n of this._pendingTextDocumentChanges)e.has(n[0])||(t.push(n[1]),this._pendingTextDocumentChanges.delete(n[0]))}return t}getProvider(e){for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}updateSyncKind(e){if(this._syncKind!==i.TextDocumentSyncKind.Full)switch(e){case i.TextDocumentSyncKind.Full:this._syncKind=e;break;case i.TextDocumentSyncKind.Incremental:this._syncKind===i.TextDocumentSyncKind.None&&(this._syncKind=i.TextDocumentSyncKind.Incremental)}}}t.DidChangeTextDocumentFeature=c;class d extends a.TextDocumentEventFeature{constructor(e){super(e,r.workspace.onWillSaveTextDocument,i.WillSaveTextDocumentNotification.type,(()=>e.middleware.willSave),(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),(e=>e.document),((e,t)=>a.TextDocumentEventFeature.textDocumentFilter(e,t.document)))}get registrationType(){return i.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:o.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}}t.WillSaveFeature=d;class u extends a.DynamicDocumentFeature{constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return i.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:o.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(a.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,n=e=>this._client.sendRequest(i.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((async e=>{let t=await this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}t.WillSaveWaitUntilFeature=u;class p extends a.TextDocumentEventFeature{constructor(e){super(e,r.workspace.onDidSaveTextDocument,i.DidSaveTextDocumentNotification.type,(()=>e.middleware.didSave),(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),(e=>e),a.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return i.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:o.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}}t.DidSaveTextDocumentFeature=p},328:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,r]=this.getRegistration(t,e.typeDefinitionProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=e.documentSelector,n={provideTypeDefinition:(e,t,n)=>{const r=this._client,a=(e,t,n)=>r.sendRequest(i.TypeDefinitionRequest.type,r.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>r.handleFailedRequest(i.TypeDefinitionRequest.type,n,e,null))),o=r.middleware;return o.provideTypeDefinition?o.provideTypeDefinition(e,t,n,a):a(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return r.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.TypeDefinitionFeature=o},4175:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(9496),i=n(273),a=n(8909);class o{constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){const r=this.client,a=this.middleware,o=(e,t,n)=>{const a=r.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return r.sendRequest(i.TypeHierarchyPrepareRequest.type,a,n).then((e=>n.isCancellationRequested?null:r.protocol2CodeConverter.asTypeHierarchyItems(e,n)),(e=>r.handleFailedRequest(i.TypeHierarchyPrepareRequest.type,n,e,null)))};return a.prepareTypeHierarchy?a.prepareTypeHierarchy(e,t,n,o):o(e,t,n)}provideTypeHierarchySupertypes(e,t){const n=this.client,r=this.middleware,a=(e,t)=>{const r={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(i.TypeHierarchySupertypesRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(i.TypeHierarchySupertypesRequest.type,t,e,null)))};return r.provideTypeHierarchySupertypes?r.provideTypeHierarchySupertypes(e,t,a):a(e,t)}provideTypeHierarchySubtypes(e,t){const n=this.client,r=this.middleware,a=(e,t)=>{const r={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(i.TypeHierarchySubtypesRequest.type,r,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(i.TypeHierarchySubtypesRequest.type,t,e,null)))};return r.provideTypeHierarchySubtypes?r.provideTypeHierarchySubtypes(e,t,a):a(e,t)}}class s extends a.TextDocumentLanguageFeature{constructor(e){super(e,i.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"textDocument"),"typeHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,r]=this.getRegistration(t,e.typeHierarchyProvider);n&&r&&this.register({id:n,registerOptions:r})}registerLanguageProvider(e){const t=this._client,n=new o(t);return[r.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.TypeHierarchyFeature=s},4904:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=t.mapAsync=t.map=t.clearTestMode=t.setTestMode=t.Semaphore=t.Delayer=void 0;const r=n(273);t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=(0,r.RAL)().timer.setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(this.timeout.dispose(),this.timeout=void 0)}},t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.RAL)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};let i=!1;t.setTestMode=function(){i=!0},t.clearTestMode=function(){i=!1};class a{constructor(e=15){this.yieldAfter=!0===i?Math.max(e,2):Math.max(e,15),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){const e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=2*this.total}}return!1}}t.map=async function(e,t,n,i){if(0===e.length)return[];const o=new Array(e.length),s=new a(i?.yieldAfter);function l(n){s.start();for(let r=n;r{(0,r.RAL)().timer.setImmediate((()=>{e(l(c))}))}));return o},t.mapAsync=async function(e,t,n,i){if(0===e.length)return[];const o=new Array(e.length),s=new a(i?.yieldAfter);async function l(r){s.start();for(let a=r;a{(0,r.RAL)().timer.setImmediate((()=>{e(l(c))}))}));return o},t.forEach=async function(e,t,n,i){if(0===e.length)return;const o=new a(i?.yieldAfter);function s(n){o.start();for(let r=n;r{(0,r.RAL)().timer.setImmediate((()=>{e(s(l))}))}))}},9763:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function i(e){return Array.isArray(e)}function a(e){return e&&r(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=a,t.asPromise=function(e){return e instanceof Promise?e:a(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}},1980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function i(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=i;const a=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function o(e){return a.test(e)}t.isUUID=o,t.parse=function(e){if(!o(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return i().asHex()}},5941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const r=n(1980),i=n(9496),a=n(273);function o(e,t){if(null!=e)return e[t]}function s(e,t){return e.filter((e=>t.indexOf(e)<0))}t.arrayDiff=s,t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return a.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=i.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(a.WorkspaceFoldersRequest.type,(e=>{const n=()=>{const e=i.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},r=t.middleware.workspace;return r&&r.workspaceFolders?r.workspaceFolders(e,n):n()}));const n=o(o(o(e,"workspace"),"workspaceFolders"),"changeNotifications");let s;"string"==typeof n?s=n:!0===n&&(s=r.generateUuid()),s&&this.register({id:s,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const n=s(this._initialFolders,e),r=s(e,this._initialFolders);(r.length>0||n.length>0)&&(t=this.doSendEvent(r,n))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));void 0!==t&&t.catch((e=>{this._client.error(`Sending notification ${a.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}doSendEvent(e,t){let n={event:{added:e.map((e=>this.asProtocol(e))),removed:t.map((e=>this.asProtocol(e)))}};return this._client.sendNotification(a.DidChangeWorkspaceFoldersNotification.type,n)}register(e){let t=e.id,n=this._client,r=i.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>this.doSendEvent(e.added,e.removed),r=n.middleware.workspace;(r&&r.didChangeWorkspaceFolders?r.didChangeWorkspaceFolders(e,t):t(e)).catch((e=>{this._client.error(`Sending notification ${a.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}));this._listeners.set(t,r),this.sendInitialEvent(i.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},3051:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const r=n(9496),i=n(273),a=n(8909),o=n(2483),s=n(1980);class l extends a.WorkspaceFeature{constructor(e){super(e,i.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:o.SupportedSymbolKinds},t.tagSupport={valueSet:o.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:s.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.WorkspaceSymbolRequest.type,{query:e},t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformations(e,t)),(e=>n.handleFailedRequest(i.WorkspaceSymbolRequest.type,t,e,null))),a=n.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(e,t,r):r(e,t)},resolveWorkspaceSymbol:!0===e.resolveProvider?(e,t)=>{const n=this._client,r=(e,t)=>n.sendRequest(i.WorkspaceSymbolResolveRequest.type,n.code2ProtocolConverter.asWorkspaceSymbol(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformation(e)),(e=>n.handleFailedRequest(i.WorkspaceSymbolResolveRequest.type,t,e,null))),a=n.middleware;return a.resolveWorkspaceSymbol?a.resolveWorkspaceSymbol(e,t,r):r(e,t)}:void 0};return[r.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=l},2850:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMonitor=t.LanguageClient=t.TransportKind=void 0;const a=n(2081),o=n(7147),s=n(1017),l=n(9496),c=n(9763),d=n(4384),u=n(794),p=n(3408),_=n(7376),m=n(9681);i(n(3408),t),i(n(5734),t);var g,h,E,f,S,b;!function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(g=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){const t=e;return t&&t.kind===g.socket&&c.number(t.port)}}(h||(h={})),function(e){e.is=function(e){return c.string(e.command)}}(E||(E={})),function(e){e.is=function(e){return c.string(e.module)}}(f||(f={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(S||(S={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(b||(b={}));class v extends d.BaseLanguageClient{constructor(e,t,n,r,i){let a,o,s,l,d;c.string(t)?(a=e,o=t,s=n,l=r,d=!!i):(a=e.toLowerCase(),o=e,s=t,l=n,d=r),void 0===d&&(d=!1),super(a,o,l),this._serverOptions=s,this._forceDebug=d,this._isInDebugMode=d;try{this.checkVersion()}catch(e){throw c.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){const e=_(l.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${l.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!m(e,"^1.67.0"))throw new Error(`The language client requires VS Code version ^1.67.0 but received version ${l.version}`)}get isInDebugMode(){return this._isInDebugMode}async restart(){await this.stop(),this.isInDebugMode?(await new Promise((e=>setTimeout(e,1e3))),await this.start()):await this.start()}stop(e=2e3){return super.stop(e).finally((()=>{if(this._serverProcess){const e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}}))}checkProcessDied(e){e&&void 0!==e.pid&&setTimeout((()=>{try{void 0!==e.pid&&(process.kill(e.pid,0),(0,u.terminate)(e))}catch(e){}}),2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),null===e.processId&&(e.processId=process.pid)}createMessageTransports(e){function t(e,t){if(!e&&!t)return;const n=Object.create(null);return Object.keys(process.env).forEach((e=>n[e]=process.env[e])),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach((t=>n[t]=e[t])),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],r=["--debug","--debug-brk","--inspect","--inspect-brk"];function i(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}const o=this._serverOptions;if(c.func(o))return o().then((t=>{if(d.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(S.is(t))return this._isDetached=!!t.detached,{reader:new p.StreamMessageReader(t.reader),writer:new p.StreamMessageWriter(t.writer)};{let n;return b.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),{reader:new p.StreamMessageReader(n.stdout),writer:new p.StreamMessageWriter(n.stdin)}}}));let s,l=o;return l.run||l.debug?this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some((e=>n.some((t=>e.startsWith(t)))||r.some((t=>e===t))))}()?(s=l.debug,this._isInDebugMode=!0):(s=l.run,this._isInDebugMode=!1):s=o,this._getServerWorkingDir(s.options).then((n=>{if(f.is(s)&&s.module){let r=s,o=r.transport||g.stdio;if(!r.runtime){let s;return new Promise(((l,d)=>{const u=(r.args&&r.args.slice())??[];o===g.ipc?u.push("--node-ipc"):o===g.stdio?u.push("--stdio"):o===g.pipe?(s=(0,p.generateRandomPipeName)(),u.push(`--pipe=${s}`)):h.isSocket(o)&&u.push(`--socket=${o.port}`),u.push(`--clientProcessId=${process.pid.toString()}`);const _=r.options??Object.create(null);if(_.env=t(_.env,!0),_.execArgv=_.execArgv||[],_.cwd=n,_.silent=!0,o===g.ipc||o===g.stdio){const t=a.fork(r.module,u||[],_);i(t),this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),o===g.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),l({reader:new p.IPCMessageReader(this._serverProcess),writer:new p.IPCMessageWriter(this._serverProcess)})):l({reader:new p.StreamMessageReader(t.stdout),writer:new p.StreamMessageWriter(t.stdin)})}else o===g.pipe?(0,p.createClientPipeTransport)(s).then((t=>{const n=a.fork(r.module,u||[],_);i(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{l({reader:e[0],writer:e[1]})}),d)}),d):h.isSocket(o)&&(0,p.createClientSocketTransport)(o.port).then((t=>{const n=a.fork(r.module,u||[],_);i(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{l({reader:e[0],writer:e[1]})}),d)}),d)}))}{const i=[],s=r.options??Object.create(null);s.execArgv&&s.execArgv.forEach((e=>i.push(e))),i.push(r.module),r.args&&r.args.forEach((e=>i.push(e)));const l=Object.create(null);l.cwd=n,l.env=t(s.env,!1);const d=this._getRuntimePath(r.runtime,n);let u;if(o===g.ipc?(l.stdio=[null,null,null,"ipc"],i.push("--node-ipc")):o===g.stdio?i.push("--stdio"):o===g.pipe?(u=(0,p.generateRandomPipeName)(),i.push(`--pipe=${u}`)):h.isSocket(o)&&i.push(`--socket=${o.port}`),i.push(`--clientProcessId=${process.pid.toString()}`),o===g.ipc||o===g.stdio){const t=a.spawn(d,i,l);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),o===g.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),Promise.resolve({reader:new p.IPCMessageReader(t),writer:new p.IPCMessageWriter(t)})):Promise.resolve({reader:new p.StreamMessageReader(t.stdout),writer:new p.StreamMessageWriter(t.stdin)})):T(t,`Launching server using runtime ${d} failed.`)}if(o===g.pipe)return(0,p.createClientPipeTransport)(u).then((t=>{const n=a.spawn(d,i,l);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(n,`Launching server using runtime ${d} failed.`)}));if(h.isSocket(o))return(0,p.createClientSocketTransport)(o.port).then((t=>{const n=a.spawn(d,i,l);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(n,`Launching server using runtime ${d} failed.`)}))}}else if(E.is(s)&&s.command){const t=s,r=void 0!==s.args?s.args.slice(0):[];let i;const o=s.transport;if(o===g.stdio)r.push("--stdio");else if(o===g.pipe)i=(0,p.generateRandomPipeName)(),r.push(`--pipe=${i}`);else if(h.isSocket(o))r.push(`--socket=${o.port}`);else if(o===g.ipc)throw new Error("Transport kind ipc is not support for command executable");const l=Object.assign({},t.options);if(l.cwd=l.cwd||n,void 0===o||o===g.stdio){const n=a.spawn(t.command,r,l);return n&&n.pid?(n.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),this._serverProcess=n,this._isDetached=!!l.detached,Promise.resolve({reader:new p.StreamMessageReader(n.stdout),writer:new p.StreamMessageWriter(n.stdin)})):T(n,`Launching server using command ${t.command} failed.`)}if(o===g.pipe)return(0,p.createClientPipeTransport)(i).then((n=>{const i=a.spawn(t.command,r,l);return i&&i.pid?(this._serverProcess=i,this._isDetached=!!l.detached,i.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(i,`Launching server using command ${t.command} failed.`)}));if(h.isSocket(o))return(0,p.createClientSocketTransport)(o.port).then((n=>{const i=a.spawn(t.command,r,l);return i&&i.pid?(this._serverProcess=i,this._isDetached=!!l.detached,i.stderr.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(c.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(i,`Launching server using command ${t.command} failed.`)}))}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(o,null,4)))}))}_getRuntimePath(e,t){if(s.isAbsolute(e))return e;const n=this._mainGetRootPath();if(void 0!==n){const t=s.join(n,e);if(o.existsSync(t))return t}if(void 0!==t){const n=s.join(t,e);if(o.existsSync(n))return n}return e}_mainGetRootPath(){let e=l.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise((e=>{o.lstat(t,((n,r)=>{e(!n&&r.isDirectory()?t:void 0)}))})):Promise.resolve(void 0)}}function T(e,t){return null===e?Promise.reject(t):new Promise(((n,r)=>{e.on("error",(e=>{r(`${t} ${e}`)})),setImmediate((()=>r(t)))}))}t.LanguageClient=v,t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return l.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new l.Disposable((()=>{this._client.needsStop()&&this._client.stop()}))}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,r=n?l.workspace.getConfiguration(t).get(n,!1):l.workspace.getConfiguration(t);r&&this._client.needsStart()?this._client.start().catch((e=>this._client.error("Start failed after configuration change",e,"force"))):!r&&this._client.needsStop()&&this._client.stop().catch((e=>this._client.error("Stop failed after configuration change",e,"force")))}}},794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.terminate=void 0;const r=n(2081),i=n(1017),a="win32"===process.platform,o="darwin"===process.platform,s="linux"===process.platform;t.terminate=function(e,t){if(a)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),r.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!s&&!o)return e.kill("SIGKILL"),!0;try{var n=(0,i.join)(__dirname,"terminateProcess.sh");return!r.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},2847:(e,t,n)=>{"use strict";e.exports=n(2850)},7256:(e,t,n)=>{var r=n(5623);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),h(function(e){return e.split("\\\\").join(i).split("\\{").join(a).split("\\}").join(o).split("\\,").join(s).split("\\.").join(l)}(e),!0).map(d)):[]};var i="\0SLASH"+Math.random()+"\0",a="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function d(e){return e.split(i).join("\\").split(a).join("{").split(o).join("}").split(s).join(",").split(l).join(".")}function u(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var i=n.pre,a=n.body,o=n.post,s=i.split(",");s[s.length-1]+="{"+a+"}";var l=u(o);return o.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function p(e){return"{"+e+"}"}function _(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function g(e,t){return e>=t}function h(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var a=i.pre,s=i.post.length?h(i.post,!1):[""];if(/\$$/.test(i.pre))for(var l=0;l=0;if(!v&&!T)return i.post.match(/,.*\}/)?h(e=i.pre+"{"+i.body+o+i.post):[e];if(v)E=i.body.split(/\.\./);else if(1===(E=u(i.body)).length&&1===(E=h(E[0],!1).map(p)).length)return s.map((function(e){return i.pre+E[0]+e}));if(v){var y=c(E[0]),C=c(E[1]),R=Math.max(E[0].length,E[1].length),O=3==E.length?Math.abs(c(E[2])):1,N=m;C0){var x=new Array(w+1).join("0");D=A<0?"-"+x+D.slice(1):x+D}}f.push(D)}}else{f=[];for(var P=0;P{const t="object"==typeof process&&process&&"win32"===process.platform;e.exports=t?{sep:"\\"}:{sep:"/"}},3415:(e,t,n)=>{const r=e.exports=(e,t,n={})=>(h(t),!(!n.nocomment&&"#"===t.charAt(0))&&new f(t,n).match(e));e.exports=r;const i=n(8717);r.sep=i.sep;const a=Symbol("globstar **");r.GLOBSTAR=a;const o=n(7256),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},l="[^/]",c="[^/]*?",d=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),u=d("().*{}+?[]^$\\!"),p=d("[.("),_=/\/+/;r.filter=(e,t={})=>(n,i,a)=>r(n,e,t);const m=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};r.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return r;const t=r,n=(n,r,i)=>t(n,r,m(e,i));return(n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,m(e,n))}}).defaults=n=>t.defaults(m(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,m(e,r)),n.defaults=n=>t.defaults(m(e,n)),n.makeRe=(n,r)=>t.makeRe(n,m(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,m(e,r)),n.match=(n,r,i)=>t.match(n,r,m(e,i)),n},r.braceExpand=(e,t)=>g(e,t);const g=(e,t={})=>(h(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:o(e)),h=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},E=Symbol("subparse");r.makeRe=(e,t)=>new f(e,t||{}).makeRe(),r.match=(e,t,n={})=>{const r=new f(t,n);return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};class f{constructor(e,t){h(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(_))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r>> no match, partial?",e,p,t,_),p!==s))}if("string"==typeof d?(c=u===d,this.debug("string match",d,u,c)):(c=u.match(d),this.debug("pattern match",d,u,c)),!c)return!1}if(i===s&&o===l)return!0;if(i===s)return n;if(o===l)return i===s-1&&""===e[i];throw new Error("wtf?")}braceExpand(){return g(this.pattern,this.options)}parse(e,t){h(e);const n=this.options;if("**"===e){if(!n.noglobstar)return a;e="*"}if(""===e)return"";let r="",i=!1,o=!1;const d=[],_=[];let m,g,f,S,b=!1,v=-1,T=-1,y="."===e.charAt(0),C=n.dot||y;const R=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",O=()=>{if(m){switch(m){case"*":r+=c,i=!0;break;case"?":r+=l,i=!0;break;default:r+="\\"+m}this.debug("clearStateChar %j %j",m,r),m=!1}};for(let t,a=0;a(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,f,r);const t="*"===f.type?c:"?"===f.type?l:"\\"+f.type;i=!0,r=r.slice(0,f.reStart)+t+"\\("+e}O(),o&&(r+="\\\\");const N=p[r.charAt(0)];for(let e=_.length-1;e>-1;e--){const n=_[e],i=r.slice(0,n.reStart),a=r.slice(n.reStart,n.reEnd-8);let o=r.slice(n.reEnd);const s=r.slice(n.reEnd-8,n.reEnd)+o,l=i.split(")").length,c=i.split("(").length-l;let d=o;for(let e=0;ee.replace(/\\(.)/g,"$1"))(e);const I=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+r+"$",I),{_glob:e,_src:r})}catch(e){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"";let i=e.map((e=>(e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===a?a:e._src)).reduce(((e,t)=>(e[e.length-1]===a&&t===a||e.push(t),e)),[]),e.forEach(((t,r)=>{t===a&&e[r-1]!==a&&(0===r?e.length>1?e[r+1]="(?:\\/|"+n+"\\/)?"+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+="(?:\\/|"+n+")?":(e[r-1]+="(?:\\/|\\/"+n+"\\/)"+e[r+1],e[r+1]=a))})),e.filter((e=>e!==a)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==i.sep&&(e=e.split(i.sep).join("/")),e=e.split(_),this.debug(this.pattern,"split",e);const r=this.set;let a;this.debug(this.pattern,"set",r);for(let t=e.length-1;t>=0&&(a=e[t],!a);t--);for(let i=0;i{const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=a(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new d(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new u(e.value,t).test(this.value):""===e.operator?""===e.value||new u(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=i;const a=n(9157),{safeRe:o,t:s}=n(1466),l=n(475),c=n(6583),d=n(5351),u=n(9971)},9971:(e,t,n)=>{class r{constructor(e,t){if(t=a(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&E(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,n=i.get(t);if(n)return n;const r=this.options.loose,a=r?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];e=e.replace(a,A(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[d.COMPARATORTRIM],u),s("comparator trim",e),e=e.replace(c[d.TILDETRIM],p),s("tilde trim",e),e=e.replace(c[d.CARETTRIM],_),s("caret trim",e);let l=e.split(" ").map((e=>S(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));r&&(l=l.filter((e=>(s("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE]))))),s("range list",l);const E=new Map,f=l.map((e=>new o(e,this.options)));for(const e of f){if(h(e))return[e];E.set(e.value,e)}E.size>1&&E.has("")&&E.delete("");const b=[...E.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>f(n,t)&&e.set.some((e=>f(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,E=e=>""===e.value,f=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},S=(e,t)=>(s("comp",e,t),e=y(e,t),s("caret",e),e=v(e,t),s("tildes",e),e=R(e,t),s("xrange",e),e=N(e,t),s("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>T(e,t))).join(" "),T=(e,t)=>{const n=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(n,((t,n,r,i,a)=>{let o;return s("tilde",e,t,n,r,i,a),b(n)?o="":b(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:b(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,s("tilde return",o),o}))},y=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{s("caret",e,t);const n=t.loose?c[d.CARETLOOSE]:c[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,o)=>{let l;return s("caret",e,t,n,i,a,o),b(n)?l="":b(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:b(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(s("replaceCaret pr",o),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(s("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),s("caret return",l),l}))},R=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(n,((n,r,i,a,o,l)=>{s("xRange",e,n,r,i,a,o,l);const c=b(i),d=c||b(a),u=d||b(o),p=u;return"="===r&&p&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(d&&(a=0),o=0,">"===r?(r=">=",d?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",d?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${o}${l}`):d?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),s("xRange return",n),n}))},N=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),I=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),A=e=>(t,n,r,i,a,o,s,l,c,d,u,p,_)=>`${n=b(r)?"":b(i)?`>=${r}.0.0${e?"-0":""}`:b(a)?`>=${r}.${i}.0${e?"-0":""}`:o?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=b(c)?"":b(d)?`<${+c+1}.0.0-0`:b(u)?`<${c}.${+d+1}.0-0`:p?`<=${c}.${d}.${u}-${p}`:e?`<${c}.${d}.${+u+1}-0`:`<=${l}`}`.trim(),D=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},5351:(e,t,n)=>{const r=n(6583),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=n(7138),{safeRe:o,t:s}=n(1466),l=n(9157),{compareIdentifiers:c}=n(4089);class d{constructor(e,t){if(t=l(t),e instanceof d){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?o[s.LOOSE]:o[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=d},475:(e,t,n)=>{const r=n(5695),i=n(1012),a=n(9525),o=n(8578),s=n(3614),l=n(160);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return i(e,n,c);case">":return a(e,n,c);case">=":return o(e,n,c);case"<":return s(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},9144:(e,t,n)=>{const r=n(5351);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},5695:(e,t,n)=>{const r=n(9144);e.exports=(e,t,n)=>0===r(e,t,n)},9525:(e,t,n)=>{const r=n(9144);e.exports=(e,t,n)=>r(e,t,n)>0},8578:(e,t,n)=>{const r=n(9144);e.exports=(e,t,n)=>r(e,t,n)>=0},3614:(e,t,n)=>{const r=n(9144);e.exports=(e,t,n)=>r(e,t,n)<0},160:(e,t,n)=>{const r=n(9144);e.exports=(e,t,n)=>r(e,t,n)<=0},1012:(e,t,n)=>{const r=n(9144);e.exports=(e,t,n)=>0!==r(e,t,n)},7376:(e,t,n)=>{const r=n(5351);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},9681:(e,t,n)=>{const r=n(9971);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},7138:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},6583:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},4089:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:en(t,e)}},9157:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},1466:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:a}=n(7138),o=n(6583),s=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],d=t.t={};let u=0;const p=[["\\s",1],["\\d",a],["[a-zA-Z0-9-]",i]],_=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=u++;o(e,i,t),d[e]=i,c[i]=t,s[i]=new RegExp(t,n?"g":void 0),l[i]=new RegExp(r,n?"g":void 0)};_("NUMERICIDENTIFIER","0|[1-9]\\d*"),_("NUMERICIDENTIFIERLOOSE","\\d+"),_("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),_("MAINVERSION",`(${c[d.NUMERICIDENTIFIER]})\\.(${c[d.NUMERICIDENTIFIER]})\\.(${c[d.NUMERICIDENTIFIER]})`),_("MAINVERSIONLOOSE",`(${c[d.NUMERICIDENTIFIERLOOSE]})\\.(${c[d.NUMERICIDENTIFIERLOOSE]})\\.(${c[d.NUMERICIDENTIFIERLOOSE]})`),_("PRERELEASEIDENTIFIER",`(?:${c[d.NUMERICIDENTIFIER]}|${c[d.NONNUMERICIDENTIFIER]})`),_("PRERELEASEIDENTIFIERLOOSE",`(?:${c[d.NUMERICIDENTIFIERLOOSE]}|${c[d.NONNUMERICIDENTIFIER]})`),_("PRERELEASE",`(?:-(${c[d.PRERELEASEIDENTIFIER]}(?:\\.${c[d.PRERELEASEIDENTIFIER]})*))`),_("PRERELEASELOOSE",`(?:-?(${c[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[d.PRERELEASEIDENTIFIERLOOSE]})*))`),_("BUILDIDENTIFIER","[a-zA-Z0-9-]+"),_("BUILD",`(?:\\+(${c[d.BUILDIDENTIFIER]}(?:\\.${c[d.BUILDIDENTIFIER]})*))`),_("FULLPLAIN",`v?${c[d.MAINVERSION]}${c[d.PRERELEASE]}?${c[d.BUILD]}?`),_("FULL",`^${c[d.FULLPLAIN]}$`),_("LOOSEPLAIN",`[v=\\s]*${c[d.MAINVERSIONLOOSE]}${c[d.PRERELEASELOOSE]}?${c[d.BUILD]}?`),_("LOOSE",`^${c[d.LOOSEPLAIN]}$`),_("GTLT","((?:<|>)?=?)"),_("XRANGEIDENTIFIERLOOSE",`${c[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_("XRANGEIDENTIFIER",`${c[d.NUMERICIDENTIFIER]}|x|X|\\*`),_("XRANGEPLAIN",`[v=\\s]*(${c[d.XRANGEIDENTIFIER]})(?:\\.(${c[d.XRANGEIDENTIFIER]})(?:\\.(${c[d.XRANGEIDENTIFIER]})(?:${c[d.PRERELEASE]})?${c[d.BUILD]}?)?)?`),_("XRANGEPLAINLOOSE",`[v=\\s]*(${c[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[d.XRANGEIDENTIFIERLOOSE]})(?:${c[d.PRERELEASELOOSE]})?${c[d.BUILD]}?)?)?`),_("XRANGE",`^${c[d.GTLT]}\\s*${c[d.XRANGEPLAIN]}$`),_("XRANGELOOSE",`^${c[d.GTLT]}\\s*${c[d.XRANGEPLAINLOOSE]}$`),_("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),_("COERCERTL",c[d.COERCE],!0),_("LONETILDE","(?:~>?)"),_("TILDETRIM",`(\\s*)${c[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",_("TILDE",`^${c[d.LONETILDE]}${c[d.XRANGEPLAIN]}$`),_("TILDELOOSE",`^${c[d.LONETILDE]}${c[d.XRANGEPLAINLOOSE]}$`),_("LONECARET","(?:\\^)"),_("CARETTRIM",`(\\s*)${c[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",_("CARET",`^${c[d.LONECARET]}${c[d.XRANGEPLAIN]}$`),_("CARETLOOSE",`^${c[d.LONECARET]}${c[d.XRANGEPLAINLOOSE]}$`),_("COMPARATORLOOSE",`^${c[d.GTLT]}\\s*(${c[d.LOOSEPLAIN]})$|^$`),_("COMPARATOR",`^${c[d.GTLT]}\\s*(${c[d.FULLPLAIN]})$|^$`),_("COMPARATORTRIM",`(\\s*)${c[d.GTLT]}\\s*(${c[d.LOOSEPLAIN]}|${c[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",_("HYPHENRANGE",`^\\s*(${c[d.XRANGEPLAIN]})\\s+-\\s+(${c[d.XRANGEPLAIN]})\\s*$`),_("HYPHENRANGELOOSE",`^\\s*(${c[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[d.XRANGEPLAINLOOSE]})\\s*$`),_("STAR","(<|>)?=?\\s*\\*"),_("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),_("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},1661:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(4389),t),i(n(1674),t),i(n(6140),t),i(n(542),t);var a,o=n(3767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}}),(a=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800},3767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(4389);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},6140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(4389);var i;(i=t.MessageDirection||(t.MessageDirection={})).clientToServer="clientToServer",i.serverToClient="serverToClient",i.both="both",t.RegistrationType=class{constructor(e){this.method=e}};class a extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=a;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class l extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=l},2918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(6140);var i,a,o;(o=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(a=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolRequestType(a.method),(i=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},9891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(6140);var i,a;(a=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolRequestType(a.method),(i=t.ColorPresentationRequest||(t.ColorPresentationRequest={})).method="textDocument/colorPresentation",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},5934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(6140);var i;(i=t.ConfigurationRequest||(t.ConfigurationRequest={})).method="workspace/configuration",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType(i.method)},764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(6140);var i;(i=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},9824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(4389),i=n(9533),a=n(6140);var o,s,l,c;(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})).is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)},(c=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})).Full="full",c.Unchanged="unchanged",(l=t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})).method="textDocument/diagnostic",l.messageDirection=a.MessageDirection.clientToServer,l.type=new a.ProtocolRequestType(l.method),l.partialResult=new r.ProgressType,(s=t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})).method="workspace/diagnostic",s.messageDirection=a.MessageDirection.clientToServer,s.type=new a.ProtocolRequestType(s.method),s.partialResult=new r.ProgressType,(o=t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={})).method="workspace/diagnostic/refresh",o.messageDirection=a.MessageDirection.serverToClient,o.type=new a.ProtocolRequestType0(o.method)},7846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(6140);var i,a,o,s,l,c,d;(d=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",d.folder="folder",(c=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",c.messageDirection=r.MessageDirection.clientToServer,c.type=new r.ProtocolRequestType(c.method),(l=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",l.messageDirection=r.MessageDirection.clientToServer,l.type=new r.ProtocolNotificationType(l.method),(s=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolRequestType(s.method),(o=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method),(a=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolNotificationType(a.method),(i=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},3394:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const r=n(6140);var i;(i=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},2122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(6140);var i;(i=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},9999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(6140);var i,a,o;(o=t.InlayHintRequest||(t.InlayHintRequest={})).method="textDocument/inlayHint",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(a=t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})).method="inlayHint/resolve",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolRequestType(a.method),(i=t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={})).method="workspace/inlayHint/refresh",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType0(i.method)},5246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(6140);var i,a;(a=t.InlineValueRequest||(t.InlineValueRequest={})).method="textDocument/inlineValue",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolRequestType(a.method),(i=t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={})).method="workspace/inlineValue/refresh",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType0(i.method)},542:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=void 0;const r=n(6140),i=n(1674),a=n(9533),o=n(2122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const s=n(1589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const l=n(8744);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return l.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return l.DidChangeWorkspaceFoldersNotification}});const c=n(5934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const d=n(9891);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return d.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return d.ColorPresentationRequest}});const u=n(3394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}});const p=n(764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return p.DeclarationRequest}});const _=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return _.SelectionRangeRequest}});const m=n(1862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return m.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return m.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return m.WorkDoneProgressCancelNotification}});const g=n(2918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return g.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return g.CallHierarchyPrepareRequest}});const h=n(9434);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return h.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return h.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return h.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return h.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return h.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return h.SemanticTokensRegistrationType}});const E=n(5726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return E.ShowDocumentRequest}});const f=n(6305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return f.LinkedEditingRangeRequest}});const S=n(7846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return S.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return S.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return S.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return S.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return S.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return S.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return S.WillDeleteFilesRequest}});const b=n(3443);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return b.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return b.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return b.MonikerRequest}});const v=n(3693);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return v.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return v.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return v.TypeHierarchySupertypesRequest}});const T=n(5246);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return T.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return T.InlineValueRefreshRequest}});const y=n(9999);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return y.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return y.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return y.InlayHintRefreshRequest}});const C=n(9824);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});const R=n(7169);var O,N,I,A,D,w,x,P,M,L,k,F,U,B,G,q,H,Y,j,V,$,z,W,K,Q,X,Z,J,ee,te,ne,re,ie,ae,oe,se,le,ce,de,ue,pe,_e,me,ge,he,Ee,fe,Se,be,ve,Te,ye,Ce,Re,Oe,Ne,Ie,Ae,De;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return R.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return R.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return R.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return R.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return R.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return R.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return R.DidCloseNotebookDocumentNotification}}),function(e){e.is=function(e){const t=e;return a.string(t.language)||a.string(t.scheme)||a.string(t.pattern)}}(O=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function(e){const t=e;return a.objectLiteral(t)&&(a.string(t.notebookType)||a.string(t.scheme)||a.string(t.pattern))}}(N=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function(e){const t=e;return a.objectLiteral(t)&&(a.string(t.notebook)||N.is(t.notebook))&&(void 0===t.language||a.string(t.language))}}(I=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!a.string(t)&&!O.is(t)&&!I.is(t))return!1;return!0}}(A=t.DocumentSelector||(t.DocumentSelector={})),(De=t.RegistrationRequest||(t.RegistrationRequest={})).method="client/registerCapability",De.messageDirection=r.MessageDirection.serverToClient,De.type=new r.ProtocolRequestType(De.method),(Ae=t.UnregistrationRequest||(t.UnregistrationRequest={})).method="client/unregisterCapability",Ae.messageDirection=r.MessageDirection.serverToClient,Ae.type=new r.ProtocolRequestType(Ae.method),(Ie=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",Ie.Rename="rename",Ie.Delete="delete",(Ne=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",Ne.Transactional="transactional",Ne.TextOnlyTransactional="textOnlyTransactional",Ne.Undo="undo",(Oe=t.PositionEncodingKind||(t.PositionEncodingKind={})).UTF8="utf-8",Oe.UTF16="utf-16",Oe.UTF32="utf-32",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&a.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||A.is(t.documentSelector))},(Re=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return a.objectLiteral(t)&&(void 0===t.workDoneProgress||a.boolean(t.workDoneProgress))},Re.hasWorkDoneProgress=function(e){const t=e;return t&&a.boolean(t.workDoneProgress)},(Ce=t.InitializeRequest||(t.InitializeRequest={})).method="initialize",Ce.messageDirection=r.MessageDirection.clientToServer,Ce.type=new r.ProtocolRequestType(Ce.method),(t.InitializeErrorCodes||(t.InitializeErrorCodes={})).unknownProtocolVersion=1,(ye=t.InitializedNotification||(t.InitializedNotification={})).method="initialized",ye.messageDirection=r.MessageDirection.clientToServer,ye.type=new r.ProtocolNotificationType(ye.method),(Te=t.ShutdownRequest||(t.ShutdownRequest={})).method="shutdown",Te.messageDirection=r.MessageDirection.clientToServer,Te.type=new r.ProtocolRequestType0(Te.method),(ve=t.ExitNotification||(t.ExitNotification={})).method="exit",ve.messageDirection=r.MessageDirection.clientToServer,ve.type=new r.ProtocolNotificationType0(ve.method),(be=t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).method="workspace/didChangeConfiguration",be.messageDirection=r.MessageDirection.clientToServer,be.type=new r.ProtocolNotificationType(be.method),(Se=t.MessageType||(t.MessageType={})).Error=1,Se.Warning=2,Se.Info=3,Se.Log=4,(fe=t.ShowMessageNotification||(t.ShowMessageNotification={})).method="window/showMessage",fe.messageDirection=r.MessageDirection.serverToClient,fe.type=new r.ProtocolNotificationType(fe.method),(Ee=t.ShowMessageRequest||(t.ShowMessageRequest={})).method="window/showMessageRequest",Ee.messageDirection=r.MessageDirection.serverToClient,Ee.type=new r.ProtocolRequestType(Ee.method),(he=t.LogMessageNotification||(t.LogMessageNotification={})).method="window/logMessage",he.messageDirection=r.MessageDirection.serverToClient,he.type=new r.ProtocolNotificationType(he.method),(ge=t.TelemetryEventNotification||(t.TelemetryEventNotification={})).method="telemetry/event",ge.messageDirection=r.MessageDirection.serverToClient,ge.type=new r.ProtocolNotificationType(ge.method),(me=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,me.Full=1,me.Incremental=2,(_e=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",_e.messageDirection=r.MessageDirection.clientToServer,_e.type=new r.ProtocolNotificationType(_e.method),(pe=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},pe.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(ue=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",ue.messageDirection=r.MessageDirection.clientToServer,ue.type=new r.ProtocolNotificationType(ue.method),(de=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",de.messageDirection=r.MessageDirection.clientToServer,de.type=new r.ProtocolNotificationType(de.method),(ce=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",ce.messageDirection=r.MessageDirection.clientToServer,ce.type=new r.ProtocolNotificationType(ce.method),(le=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,le.AfterDelay=2,le.FocusOut=3,(se=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",se.messageDirection=r.MessageDirection.clientToServer,se.type=new r.ProtocolNotificationType(se.method),(oe=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",oe.messageDirection=r.MessageDirection.clientToServer,oe.type=new r.ProtocolRequestType(oe.method),(ae=t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).method="workspace/didChangeWatchedFiles",ae.messageDirection=r.MessageDirection.clientToServer,ae.type=new r.ProtocolNotificationType(ae.method),(ie=t.FileChangeType||(t.FileChangeType={})).Created=1,ie.Changed=2,ie.Deleted=3,(t.RelativePattern||(t.RelativePattern={})).is=function(e){const t=e;return a.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&a.string(t.pattern)},(re=t.WatchKind||(t.WatchKind={})).Create=1,re.Change=2,re.Delete=4,(ne=t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).method="textDocument/publishDiagnostics",ne.messageDirection=r.MessageDirection.serverToClient,ne.type=new r.ProtocolNotificationType(ne.method),(te=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,te.TriggerCharacter=2,te.TriggerForIncompleteCompletions=3,(ee=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",ee.messageDirection=r.MessageDirection.clientToServer,ee.type=new r.ProtocolRequestType(ee.method),(J=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",J.messageDirection=r.MessageDirection.clientToServer,J.type=new r.ProtocolRequestType(J.method),(Z=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",Z.messageDirection=r.MessageDirection.clientToServer,Z.type=new r.ProtocolRequestType(Z.method),(X=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,X.TriggerCharacter=2,X.ContentChange=3,(Q=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",Q.messageDirection=r.MessageDirection.clientToServer,Q.type=new r.ProtocolRequestType(Q.method),(K=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",K.messageDirection=r.MessageDirection.clientToServer,K.type=new r.ProtocolRequestType(K.method),(W=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",W.messageDirection=r.MessageDirection.clientToServer,W.type=new r.ProtocolRequestType(W.method),(z=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",z.messageDirection=r.MessageDirection.clientToServer,z.type=new r.ProtocolRequestType(z.method),($=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",$.messageDirection=r.MessageDirection.clientToServer,$.type=new r.ProtocolRequestType($.method),(V=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",V.messageDirection=r.MessageDirection.clientToServer,V.type=new r.ProtocolRequestType(V.method),(j=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",j.messageDirection=r.MessageDirection.clientToServer,j.type=new r.ProtocolRequestType(j.method),(Y=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",Y.messageDirection=r.MessageDirection.clientToServer,Y.type=new r.ProtocolRequestType(Y.method),(H=t.WorkspaceSymbolResolveRequest||(t.WorkspaceSymbolResolveRequest={})).method="workspaceSymbol/resolve",H.messageDirection=r.MessageDirection.clientToServer,H.type=new r.ProtocolRequestType(H.method),(q=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",q.messageDirection=r.MessageDirection.clientToServer,q.type=new r.ProtocolRequestType(q.method),(G=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",G.messageDirection=r.MessageDirection.clientToServer,G.type=new r.ProtocolRequestType(G.method),(B=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",B.messageDirection=r.MessageDirection.serverToClient,B.type=new r.ProtocolRequestType0(B.method),(U=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",U.messageDirection=r.MessageDirection.clientToServer,U.type=new r.ProtocolRequestType(U.method),(F=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",F.messageDirection=r.MessageDirection.clientToServer,F.type=new r.ProtocolRequestType(F.method),(k=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",k.messageDirection=r.MessageDirection.clientToServer,k.type=new r.ProtocolRequestType(k.method),(L=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",L.messageDirection=r.MessageDirection.clientToServer,L.type=new r.ProtocolRequestType(L.method),(M=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",M.messageDirection=r.MessageDirection.clientToServer,M.type=new r.ProtocolRequestType(M.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(P=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",P.messageDirection=r.MessageDirection.clientToServer,P.type=new r.ProtocolRequestType(P.method),(x=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",x.messageDirection=r.MessageDirection.clientToServer,x.type=new r.ProtocolRequestType(x.method),(w=t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).method="workspace/executeCommand",w.messageDirection=r.MessageDirection.clientToServer,w.type=new r.ProtocolRequestType(w.method),(D=t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).method="workspace/applyEdit",D.messageDirection=r.MessageDirection.serverToClient,D.type=new r.ProtocolRequestType("workspace/applyEdit")},6305:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(6140);var i;(i=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},3443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(6140);var i,a,o;(o=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",o.project="project",o.group="group",o.scheme="scheme",o.global="global",(a=t.MonikerKind||(t.MonikerKind={})).$import="import",a.$export="export",a.local="local",(i=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},7169:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(1674),i=n(9533),a=n(6140);var o,s,l,c,d,u,p,_,m,g;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(o=t.NotebookCellKind||(t.NotebookCellKind={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(s=t.ExecutionSummary||(t.ExecutionSummary={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),a=Array.isArray(n);if(r!==a)return!1;if(r&&a){if(e.length!==n.length)return!1;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(4389),i=n(6140);var a,o,s;(s=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new r.ProgressType,s.is=function(e){return e===s.type},(o=t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).method="window/workDoneProgress/create",o.messageDirection=i.MessageDirection.serverToClient,o.type=new i.ProtocolRequestType(o.method),(a=t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).method="window/workDoneProgress/cancel",a.messageDirection=i.MessageDirection.clientToServer,a.type=new i.ProtocolNotificationType(a.method)},5206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(6140);var i;(i=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},9434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(6140);var i,a,o,s,l;(t.TokenFormat||(t.TokenFormat={})).Relative="relative",function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(i=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),(l=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",l.messageDirection=r.MessageDirection.clientToServer,l.type=new r.ProtocolRequestType(l.method),l.registrationMethod=i.method,(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolRequestType(s.method),s.registrationMethod=i.method,(o=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),o.registrationMethod=i.method,(a=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",a.messageDirection=r.MessageDirection.serverToClient,a.type=new r.ProtocolRequestType0(a.method)},5726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(6140);var i;(i=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType(i.method)},1589:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(6140);var i;(i=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},3693:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(6140);var i,a,o;(o=t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})).method="textDocument/prepareTypeHierarchy",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(a=t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})).method="typeHierarchy/supertypes",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolRequestType(a.method),(i=t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={})).method="typeHierarchy/subtypes",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},8744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(6140);var i,a;(a=t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).method="workspace/workspaceFolders",a.messageDirection=r.MessageDirection.serverToClient,a.type=new r.ProtocolRequestType0(a.method),(i=t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).method="workspace/didChangeWorkspaceFolders",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolNotificationType(i.method)},9533:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},273:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const a=n(5028);i(n(5028),t),i(n(1661),t),t.createProtocolConnection=function(e,t,n,r){return(0,a.createMessageConnection)(e,t,n,r)}},3408:(e,t,n)=>{"use strict";e.exports=n(273)},1674:(e,t,n)=>{"use strict";var r,i,a,o,s,l,c,d,u,p,_,m,g,h,E,f,S,b,v,T,y,C,R,O,N,I,A,D;n.r(t),n.d(t,{AnnotatedTextEdit:()=>R,ChangeAnnotation:()=>y,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>ae,CodeActionContext:()=>ie,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeDescription:()=>S,CodeLens:()=>oe,Color:()=>u,ColorInformation:()=>p,ColorPresentation:()=>_,Command:()=>v,CompletionItem:()=>Y,CompletionItemKind:()=>F,CompletionItemLabelDetails:()=>H,CompletionItemTag:()=>B,CompletionList:()=>j,CreateFile:()=>N,DeleteFile:()=>A,Diagnostic:()=>b,DiagnosticRelatedInformation:()=>h,DiagnosticSeverity:()=>E,DiagnosticTag:()=>f,DocumentHighlight:()=>Q,DocumentHighlightKind:()=>K,DocumentLink:()=>le,DocumentSymbol:()=>te,DocumentUri:()=>r,EOL:()=>Re,FoldingRange:()=>g,FoldingRangeKind:()=>m,FormattingOptions:()=>se,Hover:()=>$,InlayHint:()=>Se,InlayHintKind:()=>Ee,InlayHintLabelPart:()=>fe,InlineValueContext:()=>he,InlineValueEvaluatableExpression:()=>ge,InlineValueText:()=>_e,InlineValueVariableLookup:()=>me,InsertReplaceEdit:()=>G,InsertTextFormat:()=>U,InsertTextMode:()=>q,Location:()=>c,LocationLink:()=>d,MarkedString:()=>V,MarkupContent:()=>k,MarkupKind:()=>L,OptionalVersionedTextDocumentIdentifier:()=>P,ParameterInformation:()=>z,Position:()=>s,Range:()=>l,RenameFile:()=>I,SelectionRange:()=>ce,SemanticTokenModifiers:()=>ue,SemanticTokenTypes:()=>de,SemanticTokens:()=>pe,SignatureInformation:()=>W,SymbolInformation:()=>J,SymbolKind:()=>X,SymbolTag:()=>Z,TextDocument:()=>Ce,TextDocumentEdit:()=>O,TextDocumentIdentifier:()=>w,TextDocumentItem:()=>M,TextEdit:()=>T,URI:()=>i,VersionedTextDocumentIdentifier:()=>x,WorkspaceChange:()=>ye,WorkspaceEdit:()=>D,WorkspaceFolder:()=>be,WorkspaceSymbol:()=>ee,integer:()=>a,uinteger:()=>o}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(a||(a={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=o.MAX_VALUE),t===Number.MAX_VALUE&&(t=o.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.line)&&Oe.uinteger(t.character)}}(s||(s={})),function(e){e.create=function(e,t,n,r){if(Oe.uinteger(e)&&Oe.uinteger(t)&&Oe.uinteger(n)&&Oe.uinteger(r))return{start:s.create(e,t),end:s.create(n,r)};if(s.is(e)&&s.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&s.is(t.start)&&s.is(t.end)}}(l||(l={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&l.is(t.range)&&(Oe.string(t.uri)||Oe.undefined(t.uri))}}(c||(c={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&l.is(t.targetRange)&&Oe.string(t.targetUri)&&l.is(t.targetSelectionRange)&&(l.is(t.originSelectionRange)||Oe.undefined(t.originSelectionRange))}}(d||(d={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&Oe.numberRange(t.red,0,1)&&Oe.numberRange(t.green,0,1)&&Oe.numberRange(t.blue,0,1)&&Oe.numberRange(t.alpha,0,1)}}(u||(u={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&l.is(t.range)&&u.is(t.color)}}(p||(p={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.undefined(t.textEdit)||T.is(t))&&(Oe.undefined(t.additionalTextEdits)||Oe.typedArray(t.additionalTextEdits,T.is))}}(_||(_={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(m||(m={})),function(e){e.create=function(e,t,n,r,i,a){var o={startLine:e,endLine:t};return Oe.defined(n)&&(o.startCharacter=n),Oe.defined(r)&&(o.endCharacter=r),Oe.defined(i)&&(o.kind=i),Oe.defined(a)&&(o.collapsedText=a),o},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.startLine)&&Oe.uinteger(t.startLine)&&(Oe.undefined(t.startCharacter)||Oe.uinteger(t.startCharacter))&&(Oe.undefined(t.endCharacter)||Oe.uinteger(t.endCharacter))&&(Oe.undefined(t.kind)||Oe.string(t.kind))}}(g||(g={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Oe.defined(t)&&c.is(t.location)&&Oe.string(t.message)}}(h||(h={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(E||(E={})),function(e){e.Unnecessary=1,e.Deprecated=2}(f||(f={})),function(e){e.is=function(e){var t=e;return Oe.objectLiteral(t)&&Oe.string(t.href)}}(S||(S={})),function(e){e.create=function(e,t,n,r,i,a){var o={range:e,message:t};return Oe.defined(n)&&(o.severity=n),Oe.defined(r)&&(o.code=r),Oe.defined(i)&&(o.source=i),Oe.defined(a)&&(o.relatedInformation=a),o},e.is=function(e){var t,n=e;return Oe.defined(n)&&l.is(n.range)&&Oe.string(n.message)&&(Oe.number(n.severity)||Oe.undefined(n.severity))&&(Oe.integer(n.code)||Oe.string(n.code)||Oe.undefined(n.code))&&(Oe.undefined(n.codeDescription)||Oe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Oe.string(n.source)||Oe.undefined(n.source))&&(Oe.undefined(n.relatedInformation)||Oe.typedArray(n.relatedInformation,h.is))}}(b||(b={})),function(e){e.create=function(e,t){for(var n=[],r=2;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return Oe.defined(t)&&Oe.string(t.title)&&Oe.string(t.command)}}(v||(v={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&Oe.string(t.newText)&&l.is(t.range)}}(T||(T={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Oe.string(t.description)||void 0===t.description)}}(y||(y={})),function(e){e.is=function(e){var t=e;return Oe.string(t)}}(C||(C={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return T.is(t)&&(y.is(t.annotationId)||C.is(t.annotationId))}}(R||(R={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Oe.defined(t)&&P.is(t.textDocument)&&Array.isArray(t.edits)}}(O||(O={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(N||(N={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Oe.string(t.oldUri)&&Oe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(I||(I={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Oe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Oe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(A||(A={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Oe.string(e.kind)?N.is(e)||I.is(e)||A.is(e):O.is(e)})))}}(D||(D={}));var w,x,P,M,L,k,F,U,B,G,q,H,Y,j,V,$,z,W,K,Q,X,Z,J,ee,te,ne,re,ie,ae,oe,se,le,ce,de,ue,pe,_e,me,ge,he,Ee,fe,Se,be,ve=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=T.insert(e,t):C.is(n)?(i=n,r=R.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=R.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=T.replace(e,t):C.is(n)?(i=n,r=R.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=R.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=T.del(e):C.is(t)?(r=t,n=R.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=R.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Te=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(C.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ye=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Te(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(O.is(e)){var n=new ve(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new ve(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(P.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new ve(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new ve(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Te,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,a;if(y.is(t)||C.is(t)?r=t:n=t,void 0===r?i=N.create(e,n):(a=C.is(r)?r:this._changeAnnotations.manage(r),i=N.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,a,o;if(y.is(n)||C.is(n)?i=n:r=n,void 0===i?a=I.create(e,t,r):(o=C.is(i)?i:this._changeAnnotations.manage(i),a=I.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),void 0!==o)return o},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,a;if(y.is(t)||C.is(t)?r=t:n=t,void 0===r?i=A.create(e,n):(a=C.is(r)?r:this._changeAnnotations.manage(r),i=A.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Oe.defined(t)&&Oe.string(t.uri)}}(w||(w={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.integer(t.version)}}(x||(x={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Oe.defined(t)&&Oe.string(t.uri)&&(null===t.version||Oe.integer(t.version))}}(P||(P={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.string(t.languageId)&&Oe.integer(t.version)&&Oe.string(t.text)}}(M||(M={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(L||(L={})),function(e){e.is=function(e){var t=e;return Oe.objectLiteral(e)&&L.is(t.kind)&&Oe.string(t.value)}}(k||(k={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}(U||(U={})),function(e){e.Deprecated=1}(B||(B={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Oe.string(t.newText)&&l.is(t.insert)&&l.is(t.replace)}}(G||(G={})),function(e){e.asIs=1,e.adjustIndentation=2}(q||(q={})),function(e){e.is=function(e){var t=e;return t&&(Oe.string(t.detail)||void 0===t.detail)&&(Oe.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.create=function(e){return{label:e}}}(Y||(Y={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(j||(j={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Oe.string(t)||Oe.objectLiteral(t)&&Oe.string(t.language)&&Oe.string(t.value)}}(V||(V={})),function(e){e.is=function(e){var t=e;return!!t&&Oe.objectLiteral(t)&&(k.is(t.contents)||V.is(t.contents)||Oe.typedArray(t.contents,V.is))&&(void 0===e.range||l.is(e.range))}}($||($={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(z||(z={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;o--){var s=i[o],l=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=a))throw new Error("Overlapping edit");r=r.substring(0,l)+s.newText+r.substring(c,r.length),a=l}return r}}(Ce||(Ce={}));var Oe,Ne=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return s.create(0,e);for(;ne?r=i:n=i+1}var a=n-1;return s.create(a,e-t[a])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CommandId=void 0,(n=t.CommandId||(t.CommandId={})).ShowCallSummaryDocument="gaia_hover.show_call_summary_document",n.SubmitFeedback="gaia_feedback.submit_feedback",n.CopyExample="gaia.copyExample"},5678:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTextInRange=t.highlightLineDecorationType=t.getTargetPopulation=t.isInsider=t.isInternal=void 0;const r=n(9496),i=n(9035);function a(){return(process.env.USERDNSDOMAIN?process.env.USERDNSDOMAIN.toLowerCase():"").endsWith("microsoft.com")}t.isInternal=a,t.isInsider=function(){return r.env.appName.indexOf("Insider")>0},t.getTargetPopulation=function(){return a()?i.TargetPopulation.Internal:i.TargetPopulation.Public},t.highlightLineDecorationType=r.window.createTextEditorDecorationType({backgroundColor:"rgba(153, 216, 247, 0.35)"}),t.getTextInRange=function(e,t){const n="\n";t.replace("\r\n",n),t.replace("\r",n);const r=t.split(n);let i=0,a=0;for(let t=0;te.end.line));t++);return t.substring(i,a)}},9338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=t.ApiExamplesConfig=void 0;const r=n(9496),i=n(8870),a="intellicodeApiExamples";class o{static get Instance(){return o.singleton||(o.singleton=new o),o.singleton}isApiExamplesEnabled(){const e=r.workspace.getConfiguration(a,null).get("python.enabled"),t=r.workspace.getConfiguration(a,null).get("typescript.enabled");return!0===e||!0===t}isEnabledForLanguage(e){switch(e){case i.SupportedLanguages.JAVASCRIPT:case i.SupportedLanguages.TYPESCRIPT:case i.SupportedLanguages.TYPESCRIPTREACT:case i.SupportedLanguages.JAVASCRIPTREACT:return this.isApiExamplesJsTsEnabled();case i.SupportedLanguages.PYTHON:return this.isApiExamplesPythonEnabled();default:return!1}}isApiExamplesPythonEnabled(){return!0===r.workspace.getConfiguration(a,null).get("python.enabled")}isApiExamplesJsTsEnabled(){return!0===r.workspace.getConfiguration(a,null).get("typescript.enabled")}}t.ApiExamplesConfig=o;const s=o.Instance;t.Instance=s},3608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeedbackManager=void 0;const r=n(8870);t.FeedbackManager=class{constructor(e,t){this.globalStorage=e,this.languageClient=t}async sendFeedback(e,t,n,i,a){const o=`gaia.feedback.${e}`;let s=this.globalStorage.get(o);if(s){if(s.includes(t))return!1}else s=[];s.push(t),await this.globalStorage.update(o,s);const l={callSignature:i,feedback:t,exampleId:e,languageId:n,sessionId:a};return await this.languageClient.sendNotification(r.Notifications.SubmitFeedback,l),!0}}},3275:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GaiaResultsHtmlBuilder=void 0;const r=n(8128),i=n(9496),a=n(5678),o=n(3403),s=n(1688),l=n(8870),c=o.loadMessageBundle(n(1017).join(__dirname,"client\\gaia-results\\gaiaResultsHtmlBuilder.ts")),d=c(0,null),u=c(1,null),p=c(2,null),_=c(3,null),m=c(4,null),g=c(5,null),h=c(6,null),E=c(7,null),f=c(8,null),S=c(9,null),b=c(10,null),v=c(11,null),T=c(12,null),y=c(13,null),C=c(14,null),R=c(15,null),O=c(16,null),N=c(17,null),I=c(18,null),A=c(19,null);t.GaiaResultsHtmlBuilder=class{constructor(e,t){this.viewHelper=e,this.intelliPasteService=t,e||(this.viewHelper=new s.ResultsViewDataHelper)}buildHtml(e,t,n,r){const i=[],{usages:a,derivedCount:o,call_signature:s}=e,l=`https://aka.ms/ApiExamplesSurvey?origin=results&version=${n}&language=${t}`,d=this.viewHelper.wrapCodeSignature(s),u=this.viewHelper.sanitizeCodeSignature(s);let p;p=`

${h} ${d}

\n`,i.push(`
\n
\n
★ ${_}
\n \n
\n
${c(20,null,o.toLocaleString())}
\n ${p}\n
`);const E=r.getCurrentPagination();return i.push(this.buildUsageExamplesFull(a,r.currentPage,E,s,t,r.hasPrev,r.hasNext,r.usageToggle)),i.push("
"),i.join("\n")}buildUsageExamplesFull(e,t,n,r,i,a,o,s){const l=e[t-1],c=[],d=this.buildUsageExamplesPage(l,n,r,i),u=!a&&!o,p=e.filter((e=>e.name===l.name))[0],_=this.viewHelper.trimSignature(p.name),m=s?"codicon-chevron-up":"codicon-chevron-down";c.push(`
\n
\n

${A}:

\n
\n
\n
\n \n

${_}

`),c.push(`\n \n \n
\n
`);const g=s?"unfolded":"folded";c.push(`
\n
    `);for(const t of e){const e=this.viewHelper.trimSignature(t.name),n=t.usageId.split("_"),r=n[n.length-1];t.name===l.name?c.push(`
  • ${r}) ${e}

  • `):c.push(`
  • ${r}) ${e}

  • `)}return c.push("
\n
"),c.push('
'),c.push(`\n
\n ${d}\n
\n
`),c.join("\n")}buildUsageExamplesPage(e,t,n,r){const i=[],a=1===t.currentPage,o=t.currentPage===t.totalPages,s=c(21,null,t.currentPage,t.totalPages);i.push(`
\n
\n \n ${s} \n \n
\n
`);let l=35;for(let a=t.pageStartIndex;a<=t.pageEndIndex;a++){const t=e.examples[a],o=this.viewHelper.buildUris(t.example_id,n,r);i.push(this.getExampleHtml(t,r,o,{git_url:this.viewHelper.getGithubDevUri(t.git_url),content:this.viewHelper.getGithubShortName(t.git_url)},d,u,l)),l+=10}return i.join("\n")}getExampleHtml(e,t,n,o,s,c,d=30){var u,_;const m=e.example_source,g=new i.Position(e.start_position[0],e.start_position[1]),h=new i.Position(e.end_position[0],e.end_position[1]),E=(0,a.getTextInRange)(new i.Range(g,h),m),f=(0,l.normalizeLanguage)(t),S=r.default.highlight(m,{language:f,ignoreIllegals:!0}),b=r.default.highlight(E,{language:f,ignoreIllegals:!0}),v=S.value.replace(b.value,`${b.value}`),T=[];return T.push(`
\n
\n
\n
\n
\n \n \n \n \n \n `),(null===(u=this.intelliPasteService)||void 0===u?void 0:u.isActive)&&(null===(_=this.intelliPasteService)||void 0===_?void 0:_.checkLanguageAvailability(t))&&T.push(`\n \n `),T.push(`
\n
\n
\n
${v}
\n
\n \n
`),T.join("\n")}}},5259:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationData=t.ResultsViewState=t.GaiaWebViewContentUtil=t.GaiaResultsViewManager=void 0;const r=n(9496),i=n(3403),a=n(5590),o=n(2715),s=n(3275),l=n(8375),c=i.loadMessageBundle(n(1017).join(__dirname,"client\\gaia-results\\gaiaResultsViewManager.ts"))(0,null);t.GaiaResultsViewManager=class{constructor(e,t,n,r,i,a){this.version=e,this.extensionUri=t,this.gaiaClient=n,this.htmlBuilder=r,this.contentUtil=i,this.cachedViews=new Map,this.cachedStates=new Map,this.contentUtil||(this.contentUtil=new d),this.htmlBuilder||(this.htmlBuilder=new s.GaiaResultsHtmlBuilder),this.mediaPath="dist/gaia-results",a&&(this.mediaPath=a)}async showResults(e,t){const n=`${e}_${t}`;if(this.cachedViews.has(n)){const e=this.cachedViews.get(n);if(e)return void e.reveal()}const r=this.gaiaClient.getCachedResult(e,t);if(!r)throw Error("Could not get code search result with the provided arguments.");const i=this.mapUsageResults(r,e);let a=this.cachedStates.get(n);a||(a=this.getDefaultState(i),this.cachedStates.set(n,a));const s=this.createWebview(t),c=this.provideHtmlContent(s,this.extensionUri);s.webview.html=c,this.cachedViews.set(n,s),s.onDidDispose((()=>{this.cachedViews.delete(n)}));const d=new Set;s.webview.onDidReceiveMessage((n=>{switch(n.type){case l.WebViewMessageType.Load:const r=this.htmlBuilder.buildHtml(i,e,this.version,a);return void s.webview.postMessage({type:l.WebViewMessageType.Update,html:r});case l.WebViewMessageType.NextPage:const c=this.updateUsagePageAndBuildHtml(i,a,n.usageId,t,e,(e=>e.next()));return s.webview.postMessage({type:l.WebViewMessageType.UpdateUsageExamplesPage,html:c,usageId:n.usageId}),void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.EXAMPLE_PAGINATION_NEXT,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t});case l.WebViewMessageType.PrevPage:const u=this.updateUsagePageAndBuildHtml(i,a,n.usageId,t,e,(e=>e.prev()));return s.webview.postMessage({type:l.WebViewMessageType.UpdateUsageExamplesPage,html:u,usageId:n.usageId}),void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.EXAMPLE_PAGINATION_PREVIOUS,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t});case l.WebViewMessageType.NextUsage:a.nextUsage();const p=this.htmlBuilder.buildHtml(i,e,this.version,a);return s.webview.postMessage({type:l.WebViewMessageType.Update,html:p}),void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.USAGE_PAGINATION_NEXT,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t});case l.WebViewMessageType.PrevUsage:a.prevUsage();const _=this.htmlBuilder.buildHtml(i,e,this.version,a);return s.webview.postMessage({type:l.WebViewMessageType.Update,html:_}),void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.USAGE_PAGINATION_PREV,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t});case l.WebViewMessageType.ToggleDropdown:return a.toggleUsages(),void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.USAGE_FILTER_TOGGLE,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t});case l.WebViewMessageType.UsageSelect:a.setSelectedIndex(parseInt(n.usageIndex));const m=this.htmlBuilder.buildHtml(i,e,this.version,a);return s.webview.postMessage({type:l.WebViewMessageType.Update,html:m}),void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.USAGE_FILTER_SELECTED,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t,[o.TelemetryPropertyNames.USAGE_SIGNATURE]:n.usageSignature,[o.TelemetryPropertyNames.USAGE_ID]:a.currentUsageId});case l.WebViewMessageType.ScrollToBottom:if(!a)return;if(!n.usageSignature)return;const g=a.currentUsageId;if(d.has(g))return;return d.add(g),void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.RESULTS_VIEW_SCROLL_TO_BOTTOM,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t,[o.TelemetryPropertyNames.USAGE_SIGNATURE]:n.usageSignature,[o.TelemetryPropertyNames.RESULTS_VIEW_PAGE]:`${a.currentPage}`});case l.WebViewMessageType.GitHubLinkClicked:return void o.Instance.sendTelemetryEvent(o.TelemetryEventNames.EXAMPLE_GITHUB_LINK_CLICKED,{[o.TelemetryPropertyNames.LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t,[o.TelemetryPropertyNames.EXAMPLE_ID]:n.exampleId});case l.WebViewMessageType.KeyboardCopy:return void(n.exampleId&&o.Instance.sendTelemetryEvent(o.TelemetryEventNames.EXAMPLES_CLIPBOARD_COPY,{[o.TelemetryPropertyNames.CALL_LANGUAGE]:e,[o.TelemetryPropertyNames.BASIC_CALL_SIGNATURE]:t,[o.TelemetryPropertyNames.EXAMPLE_ID]:n.exampleId,[o.TelemetryPropertyNames.CTRLC_COPY]:"true"}))}})),s.reveal()}updateUsagePageAndBuildHtml(e,t,n,r,i,a){var o;const s=e.usages.find((e=>e.usageId==n));if(!s)throw Error(`Usage with id '${n}' could not be retrieved.`);const l=null==t?void 0:t.pagination.get(s.usageId);if(!l)throw Error(`No pagination data was found for usage with id: '${n}'`);a(l);const c=null===(o=this.htmlBuilder)||void 0===o?void 0:o.buildUsageExamplesPage(s,l,r,i);if(!c)throw Error(`Could not build HTML for selected usage with id: '${n}'`);return c}mapUsageResults(e,t){const n=e.full_call_summary,r=e.frequencies,i=[];let a=0;for(const r of n.keys()){const o=this.getFrequency(e.frequencies[a]);a++;const s=n.get(r);i.push({name:r,frecuency:o,examples:s,usageId:`${e.call_signature}_${t}_${a}`})}return{usages:i,derivedCount:parseInt(r[0].split(",")[1]),call_signature:e.call_signature,languageId:t}}getFrequency(e){const t=e.indexOf(",");return 100*parseFloat(e.slice(0,t))/parseFloat(e.slice(t+1,e.length))}getDefaultState(e){const t=new Map;let n=1;const r=[];for(const i of e.usages){const a=new p(i.examples.length,3),o=`${e.call_signature}_${e.languageId}_${n}`;t.set(o,a),r.push(o),n++}return new u(t,r)}createWebview(e){return r.window.createWebviewPanel("gaia.results",`${c} ${e}`,{viewColumn:r.ViewColumn.Beside,preserveFocus:!1},{enableCommandUris:!0,enableFindWidget:!0,enableScripts:!0,enableForms:!1,retainContextWhenHidden:!1})}provideHtmlContent(e,t){const n=e.webview.asWebviewUri(r.Uri.joinPath(t,this.mediaPath,"gaia-results.css")),i=e.webview.asWebviewUri(r.Uri.joinPath(t,this.mediaPath,"codicon.css")),o=e.webview.asWebviewUri(r.Uri.joinPath(t,this.mediaPath,"gaia-results.js")),s=e.webview.asWebviewUri(r.Uri.joinPath(t,this.mediaPath,"toolkit.min.js")),l=this.contentUtil.getNonce();a.Instance.info(`Setting css path to: ${i.fsPath}`);const c=r.workspace.getConfiguration("markdown");return`\n \n IntelliCode API Usage Examples Results View\n \n \n \n \n \n \n