diff --git a/dist/agent.js b/dist/agent.js index 52c3c66..43b7b1f 100644 --- a/dist/agent.js +++ b/dist/agent.js @@ -1,3 +1,3 @@ /*! For license information please see agent.js.LICENSE.txt */ -(()=>{var __webpack_modules__={39593:(e,t,n)=>{"use strict";const r=n(34411),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1,m=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(_(e,r),!e[a])return}else n&&(e[h]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},y=e=>{if(e[o]>e[i])for(let t=e[p].tail;e[o]>e[i]&&null!==t;){const n=t.prev;_(e,t),t=n}},_=(e,t)=>{if(t){const n=t.value;e[l]&&e[l](n.key,n.value),e[o]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}};class v{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;g(e,i)&&(_(e,n),e[a]||(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||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[l]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[h]=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,y(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,y(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[o]=0,this[p].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),y(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;b(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;b(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[l]&&this[p]&&this[p].length&&this[p].forEach((e=>this[l](e.key,e.value))),this[d]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[c])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,a=this[s](t,e);if(this[d].has(e)){if(a>this[i])return _(this,this[d].get(e)),!1;const s=this[d].get(e).value;return this[l]&&(this[u]||this[l](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),y(this),!0}const h=new v(e,t,a,r,n);return h.length>this[i]?(this[l]&&this[l](e,t),!1):(this[o]+=h.length,this[p].unshift(h),this[d].set(e,this[p].head),y(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[p].tail;return e?(_(this,e),e.value):null}del(e){_(this,this[d].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[d].forEach(((e,t)=>m(this,t,!1)))}}},22257:(e,t,n)=>{const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),l("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,l("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.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 u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(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 p(e.value,t).test(this.value):""===e.operator?""===e.value||new p(this.value,t).test(e.semver):!((t=o(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("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=i;const o=n(12893),{safeRe:s,t:a}=n(55765),c=n(7539),l=n(74225),u=n(26376),p=n(66902)},66902:(e,t,n)=>{class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof s)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))).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=>!g(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&&y(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&&f)|(this.options.loose&&m))+":"+e,n=i.get(t);if(n)return n;const r=this.options.loose,o=r?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(o,A(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],p),a("comparator trim",e),e=e.replace(l[u.TILDETRIM],d),a("tilde trim",e),e=e.replace(l[u.CARETTRIM],h),a("caret trim",e);let c=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>k(e,this.options)));r&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(l[u.COMPARATORLOOSE]))))),a("range list",c);const y=new Map,_=c.map((e=>new s(e,this.options)));for(const e of _){if(g(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const b=[...y.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=>_(n,t)&&e.set.some((e=>_(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 c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,y=e=>""===e.value,_=(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},v=(e,t)=>(a("comp",e,t),e=w(e,t),a("caret",e),e=T(e,t),a("tildes",e),e=x(e,t),a("xrange",e),e=I(e,t),a("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,T=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const n=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(n,((t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),b(n)?s="":b(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:b(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{a("caret",e,t);const n=t.loose?l[u.CARETLOOSE]:l[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,s)=>{let c;return a("caret",e,t,n,i,o,s),b(n)?c="":b(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:b(o)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",c),c}))},x=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(n,((n,r,i,o,s,c)=>{a("xRange",e,n,r,i,o,s,c);const l=b(i),u=l||b(o),p=u||b(s),d=p;return"="===r&&d&&(r=""),c=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),"<"===r&&(c="-0"),n=`${r+i}.${o}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),a("xRange return",n),n}))},I=(e,t)=>(a("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),k=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),A=e=>(t,n,r,i,o,s,a,c,l,u,p,d,h)=>`${n=b(r)?"":b(i)?`>=${r}.0.0${e?"-0":""}`:b(o)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=b(l)?"":b(u)?`<${+l+1}.0.0-0`:b(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:`<=${c}`}`.trim(),P=(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}},26376:(e,t,n)=>{const r=n(74225),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=n(83295),{safeRe:s,t:a}=n(55765),c=n(12893),{compareIdentifiers:l}=n(86742);class u{constructor(e,t){if(t=c(t),e instanceof u){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?s[a.LOOSE]:s[a.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>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||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===l(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=u},13507:(e,t,n)=>{const r=n(33959);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},7539:(e,t,n)=>{const r=n(58718),i=n(81194),o=n(71312),s=n(25903),a=n(21544),c=n(12056);e.exports=(e,t,n,l)=>{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,l);case"!=":return i(e,n,l);case">":return o(e,n,l);case">=":return s(e,n,l);case"<":return a(e,n,l);case"<=":return c(e,n,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},99038:(e,t,n)=>{const r=n(26376),i=n(33959),{safeRe:o,t:s}=n(55765);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},88880:(e,t,n)=>{const r=n(26376);e.exports=(e,t,n)=>{const i=new r(e,n),o=new r(t,n);return i.compare(o)||i.compareBuild(o)}},27880:(e,t,n)=>{const r=n(46269);e.exports=(e,t)=>r(e,t,!0)},46269:(e,t,n)=>{const r=n(26376);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},62378:(e,t,n)=>{const r=n(33959);e.exports=(e,t)=>{const n=r(e,null,!0),i=r(t,null,!0),o=n.compare(i);if(0===o)return null;const s=o>0,a=s?n:i,c=s?i:n,l=!!a.prerelease.length;if(c.prerelease.length&&!l)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const u=l?"pre":"";return n.major!==i.major?u+"major":n.minor!==i.minor?u+"minor":n.patch!==i.patch?u+"patch":"prerelease"}},58718:(e,t,n)=>{const r=n(46269);e.exports=(e,t,n)=>0===r(e,t,n)},71312:(e,t,n)=>{const r=n(46269);e.exports=(e,t,n)=>r(e,t,n)>0},25903:(e,t,n)=>{const r=n(46269);e.exports=(e,t,n)=>r(e,t,n)>=0},20253:(e,t,n)=>{const r=n(26376);e.exports=(e,t,n,i,o)=>{"string"==typeof n&&(o=i,i=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,i,o).version}catch(e){return null}}},21544:(e,t,n)=>{const r=n(46269);e.exports=(e,t,n)=>r(e,t,n)<0},12056:(e,t,n)=>{const r=n(46269);e.exports=(e,t,n)=>r(e,t,n)<=0},38679:(e,t,n)=>{const r=n(26376);e.exports=(e,t)=>new r(e,t).major},87789:(e,t,n)=>{const r=n(26376);e.exports=(e,t)=>new r(e,t).minor},81194:(e,t,n)=>{const r=n(46269);e.exports=(e,t,n)=>0!==r(e,t,n)},33959:(e,t,n)=>{const r=n(26376);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}}},52358:(e,t,n)=>{const r=n(26376);e.exports=(e,t)=>new r(e,t).patch},57559:(e,t,n)=>{const r=n(33959);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},79795:(e,t,n)=>{const r=n(46269);e.exports=(e,t,n)=>r(t,e,n)},63657:(e,t,n)=>{const r=n(88880);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},45712:(e,t,n)=>{const r=n(66902);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},21100:(e,t,n)=>{const r=n(88880);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},76397:(e,t,n)=>{const r=n(33959);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},81249:(e,t,n)=>{const r=n(55765),i=n(83295),o=n(26376),s=n(86742),a=n(33959),c=n(76397),l=n(13507),u=n(20253),p=n(62378),d=n(38679),h=n(87789),f=n(52358),m=n(57559),g=n(46269),y=n(79795),_=n(27880),v=n(88880),b=n(21100),T=n(63657),E=n(71312),w=n(21544),S=n(58718),x=n(81194),C=n(25903),I=n(12056),k=n(7539),A=n(99038),P=n(22257),R=n(66902),N=n(45712),O=n(51042),M=n(85775),D=n(71657),L=n(95316),F=n(89042),B=n(6826),j=n(97606),U=n(50032),q=n(82937),H=n(17908),$=n(50799);e.exports={parse:a,valid:c,clean:l,inc:u,diff:p,major:d,minor:h,patch:f,prerelease:m,compare:g,rcompare:y,compareLoose:_,compareBuild:v,sort:b,rsort:T,gt:E,lt:w,eq:S,neq:x,gte:C,lte:I,cmp:k,coerce:A,Comparator:P,Range:R,satisfies:N,toComparators:O,maxSatisfying:M,minSatisfying:D,minVersion:L,validRange:F,outside:B,gtr:j,ltr:U,intersects:q,simplifyRange:H,subset:$,SemVer:o,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},83295: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}},74225: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},86742: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)}},12893:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},55765:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i}=n(83295),o=n(74225),s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[p,i]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of d)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=u++;o(e,i,t),l[e]=i,c[i]=t,s[i]=new RegExp(t,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),h("FULL",`^${c[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),h("LOOSE",`^${c[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),h("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),h("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),h("COERCERTL",c[l.COERCE],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},97606:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,">",n)},82937:(e,t,n)=>{const r=n(66902);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},50032:(e,t,n)=>{const r=n(6826);e.exports=(e,t,n)=>r(e,t,"<",n)},85775:(e,t,n)=>{const r=n(26376),i=n(66902);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},71657:(e,t,n)=>{const r=n(26376),i=n(66902);e.exports=(e,t,n)=>{let o=null,s=null,a=null;try{a=new i(t,n)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new r(o,n)))})),o}},95316:(e,t,n)=>{const r=n(26376),i=n(66902),o=n(71312);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||n&&!o(n,s)||(n=s)}return n&&e.test(n)?n:null}},6826:(e,t,n)=>{const r=n(26376),i=n(22257),{ANY:o}=i,s=n(66902),a=n(45712),c=n(71312),l=n(21544),u=n(12056),p=n(25903);e.exports=(e,t,n,d)=>{let h,f,m,g,y;switch(e=new r(e,d),t=new s(t,d),n){case">":h=c,f=u,m=l,g=">",y=">=";break;case"<":h=l,f=p,m=c,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))return!1;for(let n=0;n{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,h(e.semver,s.semver,d)?s=e:m(e.semver,a.semver,d)&&(a=e)})),s.operator===g||s.operator===y)return!1;if((!a.operator||a.operator===g)&&f(e,a.semver))return!1;if(a.operator===y&&m(e,a.semver))return!1}return!0}},17908:(e,t,n)=>{const r=n(45712),i=n(46269);e.exports=(e,t,n)=>{const o=[];let s=null,a=null;const c=e.sort(((e,t)=>i(e,t,n)));for(const e of c)r(e,t,n)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const l=[];for(const[e,t]of o)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const u=l.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length{const r=n(66902),i=n(22257),{ANY:o}=i,s=n(45712),a=n(46269),c=[new i(">=0.0.0-0")],l=[new i(">=0.0.0")],u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?c:l}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=l}const r=new Set;let i,u,h,f,m,g,y;for(const t of e)">"===t.operator||">="===t.operator?i=p(i,t,n):"<"===t.operator||"<="===t.operator?u=d(u,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&u){if(h=a(i.semver,u.semver,n),h>0)return null;if(0===h&&(">="!==i.operator||"<="!==u.operator))return null}for(const e of r){if(i&&!s(e,String(i),n))return null;if(u&&!s(e,String(u),n))return null;for(const r of t)if(!s(e,String(r),n))return!1;return!0}let _=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver,v=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;_&&1===_.prerelease.length&&"<"===u.operator&&0===_.prerelease[0]&&(_=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,i)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(f=p(i,e,n),f===e&&f!==i)return!1}else if(">="===i.operator&&!s(i.semver,String(e),n))return!1;if(u)if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),"<"===e.operator||"<="===e.operator){if(m=d(u,e,n),m===e&&m!==u)return!1}else if("<="===u.operator&&!s(u.semver,String(e),n))return!1;if(!e.operator&&(u||i)&&0!==h)return!1}return!(i&&g&&!u&&0!==h||u&&y&&!i&&0!==h||v||_)},p=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,n)=>{if(!e)return t;const r=a(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},51042:(e,t,n)=>{const r=n(66902);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},89042:(e,t,n)=>{const r=n(66902);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},23870:(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(20839);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(96184);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 o=n(83911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return o.Disposable}});const s=n(27135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(13881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(98211);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const l=n(56525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const u=n(96654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const p=n(75530);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return p.AbstractMessageBuffer}});const d=n(61343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return d.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return d.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return d.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return d.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return d.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return d.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return d.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return d.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return d.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return d.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return d.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return d.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return d.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return d.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return d.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return d.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return d.MessageStrategy}});const h=n(30147);t.RAL=h.default},13881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(30147),i=n(67574),o=n(27135);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{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?a:(this._emitter||(this._emitter=new o.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 c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},61343:(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(30147),i=n(67574),o=n(20839),s=n(96184),a=n(27135),c=n(13881);var l,u,p,d,h,f,m,g,y,_,v,b,T,E,w,S,x,C;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(u=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new o.NotificationType("$/progress")}(p||(p={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(d||(d={})),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"}(h=t.Trace||(t.Trace={})),(C=t.TraceValues||(t.TraceValues={})).Off="off",C.Messages="messages",C.Compact="compact",C.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"}}}(h=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}}(f=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(m=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(g=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(y=t.ConnectionErrors||(t.ConnectionErrors={}));class I extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,I.prototype)}}t.ConnectionError=I,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(_=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))}}(v=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 c.CancellationTokenSource}),e.is=function(e){return v.is(e)||b.is(e)}}(T=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(l.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(E=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:T.Message,sender:E.Message}),e.is=function(e){const t=e;return t&&T.is(t.receiver)&&E.is(t.sender)}}(w=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&i.func(t.handleMessage)}}(S=t.MessageStrategy||(t.MessageStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(w.is(t.cancellationStrategy)||_.is(t.connectionStrategy)||S.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"}(x||(x={})),t.createMessageConnection=function(e,n,_,b){const T=void 0!==_?_:t.NullLogger;let E=0,C=0,k=0;const A="2.0";let P;const R=new Map;let N;const O=new Map,M=new Map;let D,L,F=new s.LinkedMap,B=new Map,j=new Set,U=new Map,q=h.Off,H=f.Text,$=x.New;const V=new a.Emitter,z=new a.Emitter,W=new a.Emitter,G=new a.Emitter,K=new a.Emitter,X=b&&b.cancellationStrategy?b.cancellationStrategy:w.Message;function Y(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 Z(e){}function Q(){return $===x.Listening}function J(){return $===x.Closed}function ee(){return $===x.Disposed}function te(){$!==x.New&&$!==x.Listening||($=x.Closed,z.fire(void 0))}function ne(){D||0===F.size||(D=(0,r.default)().timer.setImmediate((()=>{D=void 0,function(){if(0===F.size)return;const e=F.shift();try{const t=b?.messageStrategy;S.is(t)?t.handleMessage(e,re):re(e)}finally{ne()}}()})))}function re(e){o.Message.isRequest(e)?function(e){if(ee())return;function t(t,r,i){const s={jsonrpc:A,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,se(s,r,i),n.write(s).catch((()=>T.error("Sending response failed.")))}function r(t,r,i){const o={jsonrpc:A,id:e.id,error:t.toJson()};se(o,r,i),n.write(o).catch((()=>T.error("Sending response failed.")))}!function(e){if(q!==h.Off&&L)if(H===f.Text){let t;q!==h.Verbose&&q!==h.Compact||!e.params||(t=`Params: ${oe(e.params)}\n\n`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const s=R.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const l=Date.now();if(c||P){const s=e.id??String(Date.now()),u=v.is(X.receiver)?X.receiver.createCancellationTokenSource(s):X.receiver.createCancellationTokenSource(e);null!==e.id&&j.has(e.id)&&u.cancel(),null!==e.id&&U.set(s,u);try{let p;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,l);p=c(u.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);p=c(...e.params,u.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);p=c(e.params,u.token)}else P&&(p=P(e.method,e.params,u.token));const d=p;p?d.then?d.then((n=>{U.delete(s),t(n,e.method,l)}),(t=>{U.delete(s),t instanceof o.ResponseError?r(t,e.method,l):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)})):(U.delete(s),t(p,e.method,l)):(U.delete(s),function(t,r,i){void 0===t&&(t=null);const o={jsonrpc:A,id:e.id,result:t};se(o,r,i),n.write(o).catch((()=>T.error("Sending response failed.")))}(p,e.method,l))}catch(n){U.delete(s),n instanceof o.ResponseError?t(n,e.method,l):n&&i.string(n.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,l):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):o.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===l.type.method){const t=e.params.id;return j.delete(t),void ae(e)}{const r=O.get(e.method);r&&(n=r.handler,t=r.type)}if(n||N)try{if(ae(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&T.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===p.type.method&&2===r.length&&u.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&T.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&T.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&T.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else N&&N(e.method,e.params)}catch(t){t.message?T.error(`Notification handler '${e.method}' failed with message: ${t.message}`):T.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):o.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?T.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):T.error("Received response message without id. No further error information provided.");else{const t=e.id,n=B.get(t);if(function(e,t){if(q!==h.Off&&L)if(H===f.Text){let n;if(q!==h.Verbose&&q!==h.Compact||(e.error&&e.error.data?n=`Error data: ${oe(e.error.data)}\n\n`:e.result?n=`Result: ${oe(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}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else L.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,n),void 0!==n){B.delete(t);try{if(e.error){const t=e.error;n.reject(new o.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?T.error(`Response handler '${n.method}' failed with message: ${e.message}`):T.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void T.error("Received empty message.");T.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=B.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){V.fire([e,void 0,void 0])})),n.onClose(te),n.onError((function(e){V.fire(e)}));const ie=e=>{try{if(o.Message.isNotification(e)&&e.method===l.type.method){const t=e.params.id,r=Y(t),i=F.get(r);if(o.Message.isRequest(i)){const o=b?.connectionStrategy,s=o&&o.cancelUndispatched?o.cancelUndispatched(i,Z):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return F.delete(r),U.delete(t),s.id=i.id,se(s,e.method,Date.now()),void n.write(s).catch((()=>T.error("Sending response for canceled message failed.")))}const s=U.get(t);if(void 0!==s)return s.cancel(),void ae(e);j.add(t)}!function(e,t){var n;o.Message.isRequest(t)?e.set(Y(t.id),t):o.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++k).toString():"res-"+n.toString(),t):e.set("not-"+(++C).toString(),t)}(F,e)}finally{ne()}};function oe(e){if(null!=e)switch(q){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function se(e,t,n){if(q!==h.Off&&L)if(H===f.Text){let r;q!==h.Verbose&&q!==h.Compact||(e.error&&e.error.data?r=`Error data: ${oe(e.error.data)}\n\n`:e.result?r=`Result: ${oe(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else ce("send-response",e)}function ae(e){if(q!==h.Off&&L&&e.method!==g.type.method)if(H===f.Text){let t;q!==h.Verbose&&q!==h.Compact||(t=e.params?`Params: ${oe(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!L||q===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(n)}function le(){if(J())throw new I(y.Closed,"Connection is closed.");if(ee())throw new I(y.Disposed,"Connection is disposed.")}function ue(e){return void 0===e?null:e}function pe(e){return null===e?void 0:e}function de(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function he(e,t){switch(e){case o.ParameterStructures.auto:return de(t)?pe(t):[ue(t)];case o.ParameterStructures.byName:if(!de(t))throw new Error("Received parameters by name but param is not an object literal.");return pe(t);case o.ParameterStructures.byPosition:return[ue(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function fe(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=he(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,s;if(le(),i.string(e)){r=e;const n=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const l=c-i;switch(l){case 0:s=void 0;break;case 1:s=he(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map((e=>ue(e)))}}else{const n=t;r=e.method,s=fe(e,n)}const a={jsonrpc:A,method:r,params:s};return function(e){if(q!==h.Off&&L)if(H===f.Text){let t;q!==h.Verbose&&q!==h.Compact||(t=e.params?`Params: ${oe(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),n.write(a).catch((e=>{throw T.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return le(),i.func(e)?N=e:t&&(i.string(e)?(n=e,O.set(e,{type:void 0,handler:t})):(n=e.method,O.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?O.delete(n):N=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)=>me.sendNotification(p.type,{token:t,value:n}),onUnhandledProgress:G.event,sendRequest:(e,...t)=>{let r,s,a;if(le(),function(){if(!Q())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let l=0,u=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(l=1,u=n);let p=t.length;c.CancellationToken.is(i)&&(p-=1,a=i);const d=p-l;switch(d){case 0:s=void 0;break;case 1:s=he(u,t[l]);break;default:if(u===o.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);s=t.slice(l,p).map((e=>ue(e)))}}else{const n=t;r=e.method,s=fe(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const l=E++;let u;a&&(u=a.onCancellationRequested((()=>{const e=X.sender.sendCancellation(me,l);return void 0===e?(T.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch((()=>{T.log(`Sending cancellation messages for id ${l} failed`)}))})));const p={jsonrpc:A,id:l,method:r,params:s};return function(e){if(q!==h.Off&&L)if(H===f.Text){let t;q!==h.Verbose&&q!==h.Compact||!e.params||(t=`Params: ${oe(e.params)}\n\n`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(p),"function"==typeof X.sender.enableCancellation&&X.sender.enableCancellation(p),new Promise((async(e,t)=>{const i={method:r,timerStart:Date.now(),resolve:t=>{e(t),X.sender.cleanup(l),u?.dispose()},reject:e=>{t(e),X.sender.cleanup(l),u?.dispose()}};try{await n.write(p),B.set(l,i)}catch(e){throw T.error("Sending request failed."),i.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{le();let n=null;return d.is(e)?(n=void 0,P=e):i.string(e)?(n=null,void 0!==t&&(n=e,R.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,R.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?R.delete(n):P=void 0)}}},hasPendingResponse:()=>B.size>0,trace:async(e,t,n)=>{let r=!1,o=f.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||f.Text)),q=e,H=o,L=q===h.Off?void 0:t,!r||J()||ee()||await me.sendNotification(m.type,{value:h.toString(e)})},onError:V.event,onClose:z.event,onUnhandledNotification:W.event,onDispose:K.event,end:()=>{n.end()},dispose:()=>{if(ee())return;$=x.Disposed,K.fire(void 0);const t=new o.ResponseError(o.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of B.values())e.reject(t);B=new Map,U=new Map,j=new Set,F=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{le(),function(){if(Q())throw new I(y.AlreadyListening,"Connection is already listening")}(),$=x.Listening,e.listen(ie)},inspect:()=>{(0,r.default)().console.log("inspect")}};return me.onNotification(g.type,(e=>{if(q===h.Off||!L)return;const t=q===h.Verbose||q===h.Compact;L.log(e.message,t?e.verbose:void 0)})),me.onNotification(p.type,(e=>{const t=M.get(e.token);t?t(e.value):G.fire(e)})),me}},83911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},27135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(30147);!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=o._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=o,o._noop=function(){}},67574:(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)))}},96184:(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))}}},75530:(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}}},56525:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(30147),i=n(67574),o=n(27135),s=n(80142);var a;(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 c{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.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=c,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let o;const s=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&&(o=e.contentTypeDecoder,s.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===o&&(o=(0,r.default)().applicationJson.decoder,s.set(o.name,o)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:o,contentTypeDecoders:s}}}(a||(a={})),t.ReadableStreamMessageReader=class extends c{constructor(e,t){super(),this.readable=e,this.options=a.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.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))}}},96654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(30147),i=n(67574),o=n(80142),s=n(27135);var a;(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 c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.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=c,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}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.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()}}},20839:(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(67574);var i,o;!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 s extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},(o=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},o.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},o.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)}},30147:(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},80142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(30147);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()}}}},98211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(13881);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 o{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 s{constructor(e){this.token=new o(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new s(t)}}},74389: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 o=n(23034);o.default.install();const s=n(71017),a=n(22037),c=n(6113),l=n(41808),u=n(23870);i(n(23870),t);class p extends u.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),u.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=p;class d extends u.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=d;class h extends u.AbstractMessageReader{constructor(e){super(),this.onData=new u.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=h;class f extends u.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=f;class m extends u.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,o.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=m;class g extends u.WriteableStreamMessageWriter{constructor(e,t){super((0,o.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=g;class y extends u.ReadableStreamMessageReader{constructor(e,t){super((0,o.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=y;class _ extends u.WriteableStreamMessageWriter{constructor(e,t){super((0,o.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=_;const v=process.env.XDG_RUNTIME_DIR,b=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=(0,c.randomBytes)(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=v?s.join(v,`vscode-ipc-${e}.sock`):s.join(a.tmpdir(),`vscode-${e}.sock`);const n=b.get(process.platform);return void 0!==n&&t.length>n&&(0,o.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,o)=>{let s=(0,l.createServer)((e=>{s.close(),n([new m(e,t),new g(e,t)])}));s.on("error",o),s.listen(e,(()=>{s.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e);return[new m(n,t),new g(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((i,o)=>{const s=(0,l.createServer)((e=>{s.close(),n([new m(e,t),new g(e,t)])}));s.on("error",o),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e,"127.0.0.1");return[new m(n,t),new g(n,t)]},t.createMessageConnection=function(e,t,n,r){n||(n=u.NullLogger);const i=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new y(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new _(t):t;return u.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,u.createMessageConnection)(i,o,n,r)}},23034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(73837),i=n(23870);class o extends i.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return o.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)}}o.emptyBuffer=Buffer.allocUnsafe(0);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)))}onData(e){return this.stream.on("data",e),i.Disposable.create((()=>this.stream.off("data",e)))}}class a{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 c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(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 s(e),asWritableStream:e=>new a(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 l(){return c}!function(e){e.install=function(){i.RAL.install(c)}}(l||(l={})),t.default=l},95028:(e,t,n)=>{"use strict";e.exports=n(74389)},51661: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(74389),t),i(n(91674),t),i(n(66140),t),i(n(10542),t);var o,s=n(73767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),(o=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,o.RequestFailed=-32803,o.ServerCancelled=-32802,o.ContentModified=-32801,o.RequestCancelled=-32800,o.lspReservedErrorRangeEnd=-32800},73767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(74389);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},66140:(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(74389);var i;(i=t.MessageDirection||(t.MessageDirection={})).clientToServer="clientToServer",i.serverToClient="serverToClient",i.both="both",t.RegistrationType=class{constructor(e){this.method=e}};class o extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=o;class s extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=c},82918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(66140);var i,o,s;(s=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolRequestType(s.method),(o=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(i=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},79891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(66140);var i,o;(o=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(i=t.ColorPresentationRequest||(t.ColorPresentationRequest={})).method="textDocument/colorPresentation",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},85934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(66140);var i;(i=t.ConfigurationRequest||(t.ConfigurationRequest={})).method="workspace/configuration",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType(i.method)},40764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(66140);var i;(i=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},79824:(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(74389),i=n(69533),o=n(66140);var s,a,c,l;(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})).is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)},(l=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})).Full="full",l.Unchanged="unchanged",(c=t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})).method="textDocument/diagnostic",c.messageDirection=o.MessageDirection.clientToServer,c.type=new o.ProtocolRequestType(c.method),c.partialResult=new r.ProgressType,(a=t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})).method="workspace/diagnostic",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolRequestType(a.method),a.partialResult=new r.ProgressType,(s=t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={})).method="workspace/diagnostic/refresh",s.messageDirection=o.MessageDirection.serverToClient,s.type=new o.ProtocolRequestType0(s.method)},37846:(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(66140);var i,o,s,a,c,l,u;(u=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",u.folder="folder",(l=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",l.messageDirection=r.MessageDirection.clientToServer,l.type=new r.ProtocolRequestType(l.method),(c=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",c.messageDirection=r.MessageDirection.clientToServer,c.type=new r.ProtocolNotificationType(c.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolRequestType(a.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolNotificationType(s.method),(o=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method),(i=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},13394:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const r=n(66140);var i;(i=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},82122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(66140);var i;(i=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},29999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(66140);var i,o,s;(s=t.InlayHintRequest||(t.InlayHintRequest={})).method="textDocument/inlayHint",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolRequestType(s.method),(o=t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})).method="inlayHint/resolve",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(i=t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={})).method="workspace/inlayHint/refresh",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType0(i.method)},55246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(66140);var i,o;(o=t.InlineValueRequest||(t.InlineValueRequest={})).method="textDocument/inlineValue",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(i=t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={})).method="workspace/inlineValue/refresh",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType0(i.method)},10542:(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(66140),i=n(91674),o=n(69533),s=n(82122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(71589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(98744);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const l=n(85934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return l.ConfigurationRequest}});const u=n(79891);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const p=n(13394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return p.FoldingRangeRequest}});const d=n(40764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const h=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const f=n(21862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});const m=n(82918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(39434);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(75726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const _=n(26305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return _.LinkedEditingRangeRequest}});const v=n(37846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const b=n(73443);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 T=n(83693);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return T.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return T.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return T.TypeHierarchySupertypesRequest}});const E=n(55246);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return E.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return E.InlineValueRefreshRequest}});const w=n(29999);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return w.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return w.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return w.InlayHintRefreshRequest}});const S=n(79824);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});const x=n(47169);var C,I,k,A,P,R,N,O,M,D,L,F,B,j,U,q,H,$,V,z,W,G,K,X,Y,Z,Q,J,ee,te,ne,re,ie,oe,se,ae,ce,le,ue,pe,de,he,fe,me,ge,ye,_e,ve,be,Te,Ee,we,Se,xe,Ce,Ie,ke,Ae,Pe;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return x.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return x.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return x.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return x.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return x.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return x.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidCloseNotebookDocumentNotification}}),function(e){e.is=function(e){const t=e;return o.string(t.language)||o.string(t.scheme)||o.string(t.pattern)}}(C=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(o.string(t.notebookType)||o.string(t.scheme)||o.string(t.pattern))}}(I=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(o.string(t.notebook)||I.is(t.notebook))&&(void 0===t.language||o.string(t.language))}}(k=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!o.string(t)&&!C.is(t)&&!k.is(t))return!1;return!0}}(A=t.DocumentSelector||(t.DocumentSelector={})),(Pe=t.RegistrationRequest||(t.RegistrationRequest={})).method="client/registerCapability",Pe.messageDirection=r.MessageDirection.serverToClient,Pe.type=new r.ProtocolRequestType(Pe.method),(Ae=t.UnregistrationRequest||(t.UnregistrationRequest={})).method="client/unregisterCapability",Ae.messageDirection=r.MessageDirection.serverToClient,Ae.type=new r.ProtocolRequestType(Ae.method),(ke=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",ke.Rename="rename",ke.Delete="delete",(Ie=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",Ie.Transactional="transactional",Ie.TextOnlyTransactional="textOnlyTransactional",Ie.Undo="undo",(Ce=t.PositionEncodingKind||(t.PositionEncodingKind={})).UTF8="utf-8",Ce.UTF16="utf-16",Ce.UTF32="utf-32",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&o.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))},(xe=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return o.objectLiteral(t)&&(void 0===t.workDoneProgress||o.boolean(t.workDoneProgress))},xe.hasWorkDoneProgress=function(e){const t=e;return t&&o.boolean(t.workDoneProgress)},(Se=t.InitializeRequest||(t.InitializeRequest={})).method="initialize",Se.messageDirection=r.MessageDirection.clientToServer,Se.type=new r.ProtocolRequestType(Se.method),(t.InitializeErrorCodes||(t.InitializeErrorCodes={})).unknownProtocolVersion=1,(we=t.InitializedNotification||(t.InitializedNotification={})).method="initialized",we.messageDirection=r.MessageDirection.clientToServer,we.type=new r.ProtocolNotificationType(we.method),(Ee=t.ShutdownRequest||(t.ShutdownRequest={})).method="shutdown",Ee.messageDirection=r.MessageDirection.clientToServer,Ee.type=new r.ProtocolRequestType0(Ee.method),(Te=t.ExitNotification||(t.ExitNotification={})).method="exit",Te.messageDirection=r.MessageDirection.clientToServer,Te.type=new r.ProtocolNotificationType0(Te.method),(be=t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).method="workspace/didChangeConfiguration",be.messageDirection=r.MessageDirection.clientToServer,be.type=new r.ProtocolNotificationType(be.method),(ve=t.MessageType||(t.MessageType={})).Error=1,ve.Warning=2,ve.Info=3,ve.Log=4,(_e=t.ShowMessageNotification||(t.ShowMessageNotification={})).method="window/showMessage",_e.messageDirection=r.MessageDirection.serverToClient,_e.type=new r.ProtocolNotificationType(_e.method),(ye=t.ShowMessageRequest||(t.ShowMessageRequest={})).method="window/showMessageRequest",ye.messageDirection=r.MessageDirection.serverToClient,ye.type=new r.ProtocolRequestType(ye.method),(ge=t.LogMessageNotification||(t.LogMessageNotification={})).method="window/logMessage",ge.messageDirection=r.MessageDirection.serverToClient,ge.type=new r.ProtocolNotificationType(ge.method),(me=t.TelemetryEventNotification||(t.TelemetryEventNotification={})).method="telemetry/event",me.messageDirection=r.MessageDirection.serverToClient,me.type=new r.ProtocolNotificationType(me.method),(fe=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,fe.Full=1,fe.Incremental=2,(he=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",he.messageDirection=r.MessageDirection.clientToServer,he.type=new r.ProtocolNotificationType(he.method),(de=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)},de.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(pe=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",pe.messageDirection=r.MessageDirection.clientToServer,pe.type=new r.ProtocolNotificationType(pe.method),(ue=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",ue.messageDirection=r.MessageDirection.clientToServer,ue.type=new r.ProtocolNotificationType(ue.method),(le=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",le.messageDirection=r.MessageDirection.clientToServer,le.type=new r.ProtocolNotificationType(le.method),(ce=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,ce.AfterDelay=2,ce.FocusOut=3,(ae=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",ae.messageDirection=r.MessageDirection.clientToServer,ae.type=new r.ProtocolNotificationType(ae.method),(se=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",se.messageDirection=r.MessageDirection.clientToServer,se.type=new r.ProtocolRequestType(se.method),(oe=t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).method="workspace/didChangeWatchedFiles",oe.messageDirection=r.MessageDirection.clientToServer,oe.type=new r.ProtocolNotificationType(oe.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 o.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&o.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),(Q=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",Q.messageDirection=r.MessageDirection.clientToServer,Q.type=new r.ProtocolRequestType(Q.method),(Z=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,Z.TriggerCharacter=2,Z.ContentChange=3,(Y=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",Y.messageDirection=r.MessageDirection.clientToServer,Y.type=new r.ProtocolRequestType(Y.method),(X=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",X.messageDirection=r.MessageDirection.clientToServer,X.type=new r.ProtocolRequestType(X.method),(K=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",K.messageDirection=r.MessageDirection.clientToServer,K.type=new r.ProtocolRequestType(K.method),(G=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",G.messageDirection=r.MessageDirection.clientToServer,G.type=new r.ProtocolRequestType(G.method),(W=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",W.messageDirection=r.MessageDirection.clientToServer,W.type=new r.ProtocolRequestType(W.method),(z=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",z.messageDirection=r.MessageDirection.clientToServer,z.type=new r.ProtocolRequestType(z.method),(V=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",V.messageDirection=r.MessageDirection.clientToServer,V.type=new r.ProtocolRequestType(V.method),($=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",$.messageDirection=r.MessageDirection.clientToServer,$.type=new r.ProtocolRequestType($.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),(U=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",U.messageDirection=r.MessageDirection.clientToServer,U.type=new r.ProtocolRequestType(U.method),(j=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",j.messageDirection=r.MessageDirection.serverToClient,j.type=new r.ProtocolRequestType0(j.method),(B=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",B.messageDirection=r.MessageDirection.clientToServer,B.type=new r.ProtocolRequestType(B.method),(F=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",F.messageDirection=r.MessageDirection.clientToServer,F.type=new r.ProtocolRequestType(F.method),(L=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",L.messageDirection=r.MessageDirection.clientToServer,L.type=new r.ProtocolRequestType(L.method),(D=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",D.messageDirection=r.MessageDirection.clientToServer,D.type=new r.ProtocolRequestType(D.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,(O=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",O.messageDirection=r.MessageDirection.clientToServer,O.type=new r.ProtocolRequestType(O.method),(N=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",N.messageDirection=r.MessageDirection.clientToServer,N.type=new r.ProtocolRequestType(N.method),(R=t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).method="workspace/executeCommand",R.messageDirection=r.MessageDirection.clientToServer,R.type=new r.ProtocolRequestType(R.method),(P=t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).method="workspace/applyEdit",P.messageDirection=r.MessageDirection.serverToClient,P.type=new r.ProtocolRequestType("workspace/applyEdit")},26305:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(66140);var i;(i=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},73443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(66140);var i,o,s;(s=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global",(o=t.MonikerKind||(t.MonikerKind={})).$import="import",o.$export="export",o.local="local",(i=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},47169:(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(91674),i=n(69533),o=n(66140);var s,a,c,l,u,p,d,h,f,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s=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}}(a=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),o=Array.isArray(n);if(r!==o)return!1;if(r&&o){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(74389),i=n(66140);var o,s,a;(a=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new r.ProgressType,a.is=function(e){return e===a.type},(s=t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).method="window/workDoneProgress/create",s.messageDirection=i.MessageDirection.serverToClient,s.type=new i.ProtocolRequestType(s.method),(o=t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).method="window/workDoneProgress/cancel",o.messageDirection=i.MessageDirection.clientToServer,o.type=new i.ProtocolNotificationType(o.method)},5206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(66140);var i;(i=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},39434:(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(66140);var i,o,s,a,c;(t.TokenFormat||(t.TokenFormat={})).Relative="relative",function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(i=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),(c=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",c.messageDirection=r.MessageDirection.clientToServer,c.type=new r.ProtocolRequestType(c.method),c.registrationMethod=i.method,(a=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",a.messageDirection=r.MessageDirection.clientToServer,a.type=new r.ProtocolRequestType(a.method),a.registrationMethod=i.method,(s=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolRequestType(s.method),s.registrationMethod=i.method,(o=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType0(o.method)},75726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(66140);var i;(i=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",i.messageDirection=r.MessageDirection.serverToClient,i.type=new r.ProtocolRequestType(i.method)},71589:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(66140);var i;(i=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},83693:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(66140);var i,o,s;(s=t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})).method="textDocument/prepareTypeHierarchy",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolRequestType(s.method),(o=t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})).method="typeHierarchy/supertypes",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolRequestType(o.method),(i=t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={})).method="typeHierarchy/subtypes",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolRequestType(i.method)},98744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(66140);var i,o;(o=t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).method="workspace/workspaceFolders",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType0(o.method),(i=t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).method="workspace/didChangeWorkspaceFolders",i.messageDirection=r.MessageDirection.clientToServer,i.type=new r.ProtocolNotificationType(i.method)},69533:(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}},40273: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 o=n(95028);i(n(95028),t),i(n(51661),t),t.createProtocolConnection=function(e,t,n,r){return(0,o.createMessageConnection)(e,t,n,r)}},96560:(e,t,n)=>{"use strict";e.exports=n(40273)},96813:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TextDocument:()=>r});var r,i=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;ie?r=i:n=i+1}var o=n-1;return{line:o,character:e-t[o]}},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+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function l(e){var t=c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new o(e,t,n,r)},e.update=function(e,t,n){if(e instanceof o)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),r=0,i=[],o=0,a=s(t.map(l),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));or&&i.push(n.substring(r,u)),c.newText.length&&i.push(c.newText),r=e.offsetAt(c.range.end)}return i.push(n.substr(r)),i.join("")}}(r||(r={}))},91674:(e,t,n)=>{"use strict";var r,i,o,s,a,c,l,u,p,d,h,f,m,g,y,_,v,b,T,E,w,S,x,C,I,k,A,P;n.r(t),n.d(t,{AnnotatedTextEdit:()=>x,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>oe,CodeActionContext:()=>ie,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeDescription:()=>v,CodeLens:()=>se,Color:()=>p,ColorInformation:()=>d,ColorPresentation:()=>h,Command:()=>T,CompletionItem:()=>$,CompletionItemKind:()=>F,CompletionItemLabelDetails:()=>H,CompletionItemTag:()=>j,CompletionList:()=>V,CreateFile:()=>I,DeleteFile:()=>A,Diagnostic:()=>b,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>_,DocumentHighlight:()=>Y,DocumentHighlightKind:()=>X,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>r,EOL:()=>xe,FoldingRange:()=>m,FoldingRangeKind:()=>f,FormattingOptions:()=>ae,Hover:()=>W,InlayHint:()=>ve,InlayHintKind:()=>ye,InlayHintLabelPart:()=>_e,InlineValueContext:()=>ge,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>he,InlineValueVariableLookup:()=>fe,InsertReplaceEdit:()=>U,InsertTextFormat:()=>B,InsertTextMode:()=>q,Location:()=>l,LocationLink:()=>u,MarkedString:()=>z,MarkupContent:()=>L,MarkupKind:()=>D,OptionalVersionedTextDocumentIdentifier:()=>O,ParameterInformation:()=>G,Position:()=>a,Range:()=>c,RenameFile:()=>k,SelectionRange:()=>le,SemanticTokenModifiers:()=>pe,SemanticTokenTypes:()=>ue,SemanticTokens:()=>de,SignatureInformation:()=>K,SymbolInformation:()=>J,SymbolKind:()=>Z,SymbolTag:()=>Q,TextDocument:()=>Se,TextDocumentEdit:()=>C,TextDocumentIdentifier:()=>R,TextDocumentItem:()=>M,TextEdit:()=>E,URI:()=>i,VersionedTextDocumentIdentifier:()=>N,WorkspaceChange:()=>we,WorkspaceEdit:()=>P,WorkspaceFolder:()=>be,WorkspaceSymbol:()=>ee,integer:()=>o,uinteger:()=>s}),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}}(o||(o={})),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}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return Ce.objectLiteral(t)&&Ce.uinteger(t.line)&&Ce.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(Ce.uinteger(e)&&Ce.uinteger(t)&&Ce.uinteger(n)&&Ce.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.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 Ce.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Ce.objectLiteral(t)&&c.is(t.range)&&(Ce.string(t.uri)||Ce.undefined(t.uri))}}(l||(l={})),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 Ce.objectLiteral(t)&&c.is(t.targetRange)&&Ce.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Ce.undefined(t.originSelectionRange))}}(u||(u={})),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 Ce.objectLiteral(t)&&Ce.numberRange(t.red,0,1)&&Ce.numberRange(t.green,0,1)&&Ce.numberRange(t.blue,0,1)&&Ce.numberRange(t.alpha,0,1)}}(p||(p={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Ce.objectLiteral(t)&&c.is(t.range)&&p.is(t.color)}}(d||(d={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Ce.objectLiteral(t)&&Ce.string(t.label)&&(Ce.undefined(t.textEdit)||E.is(t))&&(Ce.undefined(t.additionalTextEdits)||Ce.typedArray(t.additionalTextEdits,E.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,n,r,i,o){var s={startLine:e,endLine:t};return Ce.defined(n)&&(s.startCharacter=n),Ce.defined(r)&&(s.endCharacter=r),Ce.defined(i)&&(s.kind=i),Ce.defined(o)&&(s.collapsedText=o),s},e.is=function(e){var t=e;return Ce.objectLiteral(t)&&Ce.uinteger(t.startLine)&&Ce.uinteger(t.startLine)&&(Ce.undefined(t.startCharacter)||Ce.uinteger(t.startCharacter))&&(Ce.undefined(t.endCharacter)||Ce.uinteger(t.endCharacter))&&(Ce.undefined(t.kind)||Ce.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Ce.defined(t)&&l.is(t.location)&&Ce.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(_||(_={})),function(e){e.is=function(e){var t=e;return Ce.objectLiteral(t)&&Ce.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,r,i,o){var s={range:e,message:t};return Ce.defined(n)&&(s.severity=n),Ce.defined(r)&&(s.code=r),Ce.defined(i)&&(s.source=i),Ce.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,n=e;return Ce.defined(n)&&c.is(n.range)&&Ce.string(n.message)&&(Ce.number(n.severity)||Ce.undefined(n.severity))&&(Ce.integer(n.code)||Ce.string(n.code)||Ce.undefined(n.code))&&(Ce.undefined(n.codeDescription)||Ce.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ce.string(n.source)||Ce.undefined(n.source))&&(Ce.undefined(n.relatedInformation)||Ce.typedArray(n.relatedInformation,g.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 Ce.defined(t)&&Ce.string(t.title)&&Ce.string(t.command)}}(T||(T={})),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 Ce.objectLiteral(t)&&Ce.string(t.newText)&&c.is(t.range)}}(E||(E={})),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 Ce.objectLiteral(t)&&Ce.string(t.label)&&(Ce.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ce.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){var t=e;return Ce.string(t)}}(S||(S={})),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 E.is(t)&&(w.is(t.annotationId)||S.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Ce.defined(t)&&O.is(t.textDocument)&&Array.isArray(t.edits)}}(C||(C={})),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&&Ce.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ce.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ce.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(I||(I={})),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&&Ce.string(t.oldUri)&&Ce.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ce.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ce.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(k||(k={})),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&&Ce.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ce.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ce.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.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 Ce.string(e.kind)?I.is(e)||k.is(e)||A.is(e):C.is(e)})))}}(P||(P={}));var R,N,O,M,D,L,F,B,j,U,q,H,$,V,z,W,G,K,X,Y,Z,Q,J,ee,te,ne,re,ie,oe,se,ae,ce,le,ue,pe,de,he,fe,me,ge,ye,_e,ve,be,Te=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=E.insert(e,t):S.is(n)?(i=n,r=x.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=x.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=E.replace(e,t):S.is(n)?(i=n,r=x.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=x.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=E.del(e):S.is(t)?(r=t,n=x.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=x.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}(),Ee=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(S.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}(),we=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ee(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(C.is(e)){var n=new Te(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Te(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(O.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 Te(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 Te(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Ee,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,o;if(w.is(t)||S.is(t)?r=t:n=t,void 0===r?i=I.create(e,n):(o=S.is(r)?r:this._changeAnnotations.manage(r),i=I.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},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,o,s;if(w.is(n)||S.is(n)?i=n:r=n,void 0===i?o=k.create(e,t,r):(s=S.is(i)?i:this._changeAnnotations.manage(i),o=k.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},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,o;if(w.is(t)||S.is(t)?r=t:n=t,void 0===r?i=A.create(e,n):(o=S.is(r)?r:this._changeAnnotations.manage(r),i=A.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Ce.defined(t)&&Ce.string(t.uri)}}(R||(R={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ce.defined(t)&&Ce.string(t.uri)&&Ce.integer(t.version)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ce.defined(t)&&Ce.string(t.uri)&&(null===t.version||Ce.integer(t.version))}}(O||(O={})),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 Ce.defined(t)&&Ce.string(t.uri)&&Ce.string(t.languageId)&&Ce.integer(t.version)&&Ce.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}}(D||(D={})),function(e){e.is=function(e){var t=e;return Ce.objectLiteral(e)&&D.is(t.kind)&&Ce.string(t.value)}}(L||(L={})),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}(B||(B={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Ce.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(U||(U={})),function(e){e.asIs=1,e.adjustIndentation=2}(q||(q={})),function(e){e.is=function(e){var t=e;return t&&(Ce.string(t.detail)||void 0===t.detail)&&(Ce.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.create=function(e){return{label:e}}}($||($={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(V||(V={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Ce.string(t)||Ce.objectLiteral(t)&&Ce.string(t.language)&&Ce.string(t.value)}}(z||(z={})),function(e){e.is=function(e){var t=e;return!!t&&Ce.objectLiteral(t)&&(L.is(t.contents)||z.is(t.contents)||Ce.typedArray(t.contents,z.is))&&(void 0===e.range||c.is(e.range))}}(W||(W={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(G||(G={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;s--){var a=i[s],c=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=o))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(l,r.length),o=c}return r}}(Se||(Se={}));var Ce,Ie=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 a.create(0,e);for(;ne?r=i:n=i+1}var o=n-1;return a.create(o,e-t[o])},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";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(40273);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=r.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=r.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},52507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const r=n(40273),i=n(40289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?i.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(r.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},6634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const r=n(40273);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(r.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(r.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(r.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.WorkspaceDiagnosticRequest.partialResult,t))))}}}},50828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const r=n(40273);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(r.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){return this.connection.onNotification(r.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){return this.connection.onNotification(r.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(r.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(r.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(r.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},46507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const r=n(40273);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(r.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(r.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(r.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},58970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(40273);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(r.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(r.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},22776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const r=n(40273);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(r.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const r=n(40273);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=r.MonikerRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},29748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const r=n(40273),i=n(38382);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(r.DidOpenNotebookDocumentNotification.type,(t=>{e(t)})),onDidChangeNotebookDocument:e=>this.connection.onNotification(r.DidChangeNotebookDocumentNotification.type,(t=>{e(t)})),onDidSaveNotebookDocument:e=>this.connection.onNotification(r.DidSaveNotebookDocumentNotification.type,(t=>{e(t)})),onDidCloseNotebookDocument:e=>this.connection.onNotification(r.DidCloseNotebookDocumentNotification.type,(t=>{e(t)}))}}};class o{onDidOpenTextDocument(e){return this.openHandler=e,r.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,r.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,r.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return o.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return o.NULL_DISPOSE}onDidSaveTextDocument(){return o.NULL_DISPOSE}}o.NULL_DISPOSE=Object.freeze({dispose:()=>{}}),t.NotebookDocuments=class{constructor(e){e instanceof i.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new i.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new r.Emitter,this._onDidChange=new r.Emitter,this._onDidSave=new r.Emitter,this._onDidClose=new r.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new o,n=[];return n.push(this.cellTextDocuments.listen(t)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument((e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const r=n.metadata;let i=!1;const o=e.change;void 0!==o.metadata&&(i=!0,n.metadata=o.metadata);const s=[],a=[],c=[],l=[];if(void 0!==o.cells){const e=o.cells;if(void 0!==e.structure){const r=e.structure.array;if(n.cells.splice(r.start,r.deleteCount,...void 0!==r.cells?r.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)t.closeTextDocument({textDocument:n}),a.push(n.uri)}if(void 0!==e.data){const t=new Map(e.data.map((e=>[e.document,e])));for(let e=0;e<=n.cells.length;e++){const r=t.get(n.cells[e].document);if(void 0!==r){const i=n.cells.splice(e,1,r);if(c.push({old:i[0],new:r}),t.delete(r.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),l.push(n.document.uri)}this.updateCellMap(n);const u={notebookDocument:n};i&&(u.metadata={old:r,new:n.metadata});const p=[];for(const e of s)p.push(this.getNotebookCell(e));const d=[];for(const e of a)d.push(this.getNotebookCell(e));const h=[];for(const e of l)h.push(this.getNotebookCell(e));(p.length>0||d.length>0||c.length>0||h.length>0)&&(u.cells={added:p,removed:d,changed:{data:c,textContent:h}}),void 0===u.metadata&&void 0===u.cells||this._onDidChange.fire(u)}))),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}}))),r.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},42731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const r=n(40273),i=n(37560);class o{constructor(e,t){this._connection=e,this._token=t,o.Instances.set(this._token,this)}begin(e,t,n,i){let o={kind:"begin",title:e,percentage:t,message:n,cancellable:i};this._connection.sendProgress(r.WorkDoneProgress.type,this._token,o)}report(e,t){let n={kind:"report"};"number"==typeof e?(n.percentage=e,void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(r.WorkDoneProgress.type,this._token,n)}done(){o.Instances.delete(this._token),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,{kind:"end"})}}o.Instances=new Map;class s extends o{constructor(e,t){super(e,t),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{constructor(){super(),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var l;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const n=t.workDoneToken;return delete t.workDoneToken,new o(e,n)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(r.WorkDoneProgressCancelNotification.type,(e=>{let t=o.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,i.generateUuid)();return this.connection.sendRequest(r.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new r.ProgressType}(l||(l={}));class u{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(l.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new u(e,n)}},59817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const r=n(40273);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(r.SemanticTokensRefreshRequest.type),on:e=>{const t=r.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=r.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=r.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};class i{constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let n=0;for(;n=n&&i>=n&&this.originalSequence[r]===this.modifiedSequence[i];)r--,i--;(r0&&(o-=this._prevLine,0===o&&(s-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new i(this._prevData,this._data).computeDiff()}:this.build()}}},49891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;const r=n(40273),i=n(40289),o=n(37560),s=n(42731),a=n(52507),c=n(91836),l=n(47985),u=n(59817),p=n(85421),d=n(50828),h=n(22776),f=n(64606),m=n(58970),g=n(46507),y=n(6634),_=n(29748),v=n(8120);function b(e){if(null!==e)return e}t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class T{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(r.MessageType.Error,e)}warn(e){this.send(r.MessageType.Warning,e)}info(e){this.send(r.MessageType.Info,e)}log(e){this.send(r.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(r.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,r.RAL)().console.error("Sending log message failed")}))}}const E=(0,p.ShowDocumentFeature)((0,s.ProgressFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){let n={type:r.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(b)}showWarningMessage(e,...t){let n={type:r.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(b)}showInformationMessage(e,...t){let n={type:r.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(b)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new w};class w{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=i.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const r=o.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new S(void 0,[])};class S{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(r.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=i.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;let o={unregisterations:[n]};return this._connection.sendRequest(r.UnregistrationRequest.type,o).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class x{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof w?this.registerMany(e):e instanceof S?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const s=i.string(t)?t:t.method,a=o.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(r.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=i.string(e)?e:e.method,s=o.generateUuid();let a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(r.RegistrationRequest.type,a).then((e=>r.Disposable.create((()=>{this.unregisterSingle(s,n).catch((()=>{this.connection.console.info(`Un-registering capability with id ${s} failed.`)}))}))),(e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e))))}unregisterSingle(e,t){let n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(r.UnregistrationRequest.type,n).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(r.RegistrationRequest.type,t).then((()=>new S(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const C=(0,d.FileOperationsFeature)((0,c.WorkspaceFoldersFeature)((0,a.ConfigurationFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(r.ApplyWorkspaceEditRequest.type,t)}})));class I{constructor(){this._trace=r.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==r.Trace.Off&&this.connection.sendNotification(r.LogTraceNotification.type,{message:e,verbose:this._trace===r.Trace.Verbose?t:void 0}).catch((()=>{}))}}class k{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(r.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class A{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=A;const P=(0,v.MonikerFeature)((0,y.DiagnosticFeature)((0,g.InlayHintFeature)((0,m.InlineValueFeature)((0,f.TypeHierarchyFeature)((0,h.LinkedEditingRangeFeature)((0,u.SemanticTokensFeature)((0,l.CallHierarchyFeature)(A))))))));class R{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=R;const N=(0,_.NotebookSyncFeature)(R);function O(e,t){return function(n){return t(e(n))}}function M(e,t){return function(n){return t(e(n))}}function D(e,t){return function(n){return t(e(n))}}function L(e,t){return function(n){return t(e(n))}}function F(e,t){return function(n){return t(e(n))}}function B(e,t){return function(n){return t(e(n))}}function j(e,t){return function(n){return t(e(n))}}function U(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=O,t.combineTelemetryFeatures=M,t.combineTracerFeatures=D,t.combineClientFeatures=L,t.combineWindowFeatures=F,t.combineWorkspaceFeatures=B,t.combineLanguagesFeatures=j,t.combineNotebooksFeatures=U,t.combineFeatures=function(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:n(e.console,t.console,O),tracer:n(e.tracer,t.tracer,D),telemetry:n(e.telemetry,t.telemetry,M),client:n(e.client,t.client,L),window:n(e.window,t.window,F),workspace:n(e.workspace,t.workspace,B),languages:n(e.languages,t.languages,j),notebooks:n(e.notebooks,t.notebooks,U)}},t.createConnection=function(e,t,n){const o=n&&n.console?new(n.console(T)):new T,a=e(o);o.rawAttach(a);const c=n&&n.tracer?new(n.tracer(I)):new I,l=n&&n.telemetry?new(n.telemetry(k)):new k,u=n&&n.client?new(n.client(x)):new x,p=n&&n.window?new(n.window(E)):new E,d=n&&n.workspace?new(n.workspace(C)):new C,h=n&&n.languages?new(n.languages(P)):new P,f=n&&n.notebooks?new(n.notebooks(N)):new N,m=[o,c,l,u,p,d,h,f];function g(e){return e instanceof Promise?e:i.thenable(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}let y,_,v,b={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(i.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=i.string(e)?e:e.method;return 1===arguments.length?a.sendNotification(n):a.sendNotification(n,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>(_=e,{dispose:()=>{_=void 0}}),onInitialized:e=>a.onNotification(r.InitializedNotification.type,e),onShutdown:e=>(y=e,{dispose:()=>{y=void 0}}),onExit:e=>(v=e,{dispose:()=>{v=void 0}}),get console(){return o},get telemetry(){return l},get tracer(){return c},get client(){return u},get window(){return p},get workspace(){return d},get languages(){return h},get notebooks(){return f},onDidChangeConfiguration:e=>a.onNotification(r.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(r.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(r.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(r.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(r.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(r.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(r.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(r.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(r.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(r.HoverRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onCompletion:e=>a.onRequest(r.CompletionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCompletionResolve:e=>a.onRequest(r.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(r.SignatureHelpRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDeclaration:e=>a.onRequest(r.DeclarationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDefinition:e=>a.onRequest(r.DefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onTypeDefinition:e=>a.onRequest(r.TypeDefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onImplementation:e=>a.onRequest(r.ImplementationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onReferences:e=>a.onRequest(r.ReferencesRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentHighlight:e=>a.onRequest(r.DocumentHighlightRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentSymbol:e=>a.onRequest(r.DocumentSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbol:e=>a.onRequest(r.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbolResolve:e=>a.onRequest(r.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>a.onRequest(r.CodeActionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeActionResolve:e=>a.onRequest(r.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(r.CodeLensRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeLensResolve:e=>a.onRequest(r.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(r.DocumentFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(r.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(r.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(r.RenameRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onPrepareRename:e=>a.onRequest(r.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(r.DocumentLinkRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentLinkResolve:e=>a.onRequest(r.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(r.DocumentColorRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onColorPresentation:e=>a.onRequest(r.ColorPresentationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onFoldingRanges:e=>a.onRequest(r.FoldingRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onSelectionRanges:e=>a.onRequest(r.SelectionRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onExecuteCommand:e=>a.onRequest(r.ExecuteCommandRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),dispose:()=>a.dispose()};for(let e of m)e.attach(b);return a.onRequest(r.InitializeRequest.type,(e=>{t.initialize(e),i.string(e.trace)&&(c.trace=r.Trace.fromString(e.trace));for(let t of m)t.initialize(e.capabilities);if(_)return g(_(e,(new r.CancellationTokenSource).token,(0,s.attachWorkDone)(a,e),void 0)).then((e=>{if(e instanceof r.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=i.number(b.__textDocumentSync)?b.__textDocumentSync:r.TextDocumentSyncKind.None:i.number(n.textDocumentSync)||i.number(n.textDocumentSync.change)||(n.textDocumentSync.change=i.number(b.__textDocumentSync)?b.__textDocumentSync:r.TextDocumentSyncKind.None);for(let e of m)e.fillServerCapabilities(n);return t}));{let e={capabilities:{textDocumentSync:r.TextDocumentSyncKind.None}};for(let t of m)t.fillServerCapabilities(e.capabilities);return e}})),a.onRequest(r.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,y?y((new r.CancellationTokenSource).token):void 0))),a.onNotification(r.ExitNotification.type,(()=>{try{v&&v()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(r.SetTraceNotification.type,(e=>{c.trace=r.Trace.fromString(e.value)})),b}},85421:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const r=n(40273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(r.ShowDocumentRequest.type,e)}}},38382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const r=n(40273);t.TextDocuments=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new r.Emitter,this._onDidOpen=new r.Emitter,this._onDidClose=new r.Emitter,this._onDidSave=new r.Emitter,this._onWillSave=new r.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=r.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument((e=>{const t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);const r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:r}=t;if(null==r)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let i=this._syncedDocuments.get(t.uri);void 0!==i&&(i=this._configuration.update(i,n,r),this._syncedDocuments.set(t.uri,i),this._onDidChangeContent.fire(Object.freeze({document:i})))}))),t.push(e.onDidCloseTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))}))),t.push(e.onWillSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}))),t.push(e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let n=this._syncedDocuments.get(e.textDocument.uri);return void 0!==n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]}))),t.push(e.onDidSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),r.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},64606:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(40273);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=r.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=r.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},40289:(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)}Object.defineProperty(t,"__esModule",{value:!0}),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=function(e){return e&&r(e.then)}},37560:(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 o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return i().asHex()}},91836:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const r=n(40273);t.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new r.Emitter,this.connection.onNotification(r.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(r.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(r.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},87613:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const r=n(57310),i=n(71017),o=n(57147),s=n(32081);function a(){return"win32"===process.platform}function c(e,t,n,r){const a="NODE_PATH",c=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise(((l,u)=>{let p=process.env,d=Object.create(null);Object.keys(p).forEach((e=>d[e]=p[e])),t&&o.existsSync(t)&&(d[a]?d[a]=t+i.delimiter+d[a]:d[a]=t,r&&r(`NODE_PATH value is: ${d[a]}`)),d.ELECTRON_RUN_AS_NODE="1";try{let t=(0,s.fork)("",[],{cwd:n,env:d,execArgv:["-e",c]});if(void 0===t.pid)return void u(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{u(e)})),t.on("message",(n=>{"r"===n.c&&(t.send({c:"e"}),n.s?l(n.r):u(new Error(`Failed to resolve module: ${e}`)))}));let r={c:"rs",a:e};t.send(r)}catch(e){u(e)}}))}function l(e){let t="npm";const n=Object.create(null);Object.keys(process.env).forEach((e=>n[e]=process.env[e])),n.NO_UPDATE_NOTIFIER="true";const r={encoding:"utf8",env:n};a()&&(t="npm.cmd",r.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let n=(0,s.spawnSync)(t,["config","get","prefix"],r).stdout;if(!n)return void(e&&e("'npm config get prefix' didn't return a value."));let c=n.trim();return e&&e(`'npm config get prefix' value is: ${c}`),c.length>0?a()?i.join(c,"node_modules"):i.join(c,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",o)}}var u;t.uriToFilePath=function(e){let t=r.parse(e);if("file:"!==t.protocol||!t.path)return;let n=t.path.split("/");for(var o=0,s=n.length;o1){let e=n[0],t=n[1];0===e.length&&t.length>1&&":"===t[1]&&n.shift()}return i.normalize(n.join("/"))},t.resolve=c,t.resolveGlobalNodePath=l,t.resolveGlobalYarnPath=function(e){let t="yarn",n={encoding:"utf8"};a()&&(t="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let o=(0,s.spawnSync)(t,["global","dir","--json"],n),a=o.stdout;if(!a)return void(e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr)));let c=a.trim().split(/\r?\n/);for(let e of c)try{let t=JSON.parse(e);if("log"===t.type)return i.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",r)}},function(e){let t;function n(){return void 0!==t||(t=!("win32"===process.platform||o.existsSync(__filename.toUpperCase())&&o.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=n,e.isParent=function(e,t){return n()?0===i.normalize(t).indexOf(i.normalize(e)):0===i.normalize(t).toLowerCase().indexOf(i.normalize(e).toLowerCase())}}(u=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function(e,t,n,r){return n?(i.isAbsolute(n)||(n=i.join(e,n)),c(t,n,n,r).then((e=>u.isParent(n,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(n=>c(t,l(r),e,r)))):c(t,l(r),e,r)}},35809: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.createConnection=t.Files=void 0;const o=n(40289),s=n(49891),a=n(87613),c=n(96560);var l;i(n(96560),t),i(n(76265),t),(l=t.Files||(t.Files={})).uriToFilePath=a.uriToFilePath,l.resolveGlobalNodePath=a.resolveGlobalNodePath,l.resolveGlobalYarnPath=a.resolveGlobalYarnPath,l.resolve=a.resolve,l.resolveModulePath=a.resolveModulePath;let u,p=!1;!function(){const e="--clientProcessId";function t(e){try{let t=parseInt(e);isNaN(t)||(u=setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(p?0:1)}}),3e3))}catch(e){}}for(let n=2;n{const t=e.processId;o.number(t)&&void 0===u&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(p?0:1)}}),3e3)},get shutdownReceived(){return p},set shutdownReceived(e){p=e},exit:e=>{process.exit(e)}};t.createConnection=function(e,t,n,r){let i,a,l,u;return void 0!==e&&"features"===e.__brand&&(i=e,e=t,t=n,n=r),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?u=e:(a=e,l=t,u=n),function(e,t,n,r){if(!e&&!t&&process.argv.length>2){let n,r,o=process.argv.slice(2);for(let s=0;s{process.exit(p?0:1)})),t.on("close",(()=>{process.exit(p?0:1)}))}return(0,s.createConnection)((r=>(0,c.createProtocolConnection)(e,t,r,n)),d,r)}(a,l,u,i)}},68212:(e,t,n)=>{"use strict";e.exports=n(35809)},49602:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},34411:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r{"use strict";n.r(t),n.d(t,{TextDocument:()=>i});class r{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(let t of e)if(r.isIncremental(t)){const e=a(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let c=this._lineOffsets;const l=s(t.text,!1,n);if(o-i===l.length)for(let e=0,t=l.length;ee?r=i:n=i+1}let i=n-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function c(e){const t=a(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,i){return new r(e,t,n,i)},e.update=function(e,t,n){if(e instanceof r)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let n=e.getText(),r=o(t.map(c),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=0;const s=[];for(const t of r){let r=e.offsetAt(t.range.start);if(ri&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")}}(i||(i={}))},39941:e=>{const t="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n="function"==typeof AbortController?AbortController:class{constructor(){this.signal=new o}abort(){this.signal.dispatchEvent("abort")}},r="function"==typeof AbortSignal,i="function"==typeof n.AbortSignal,o=r?AbortSignal:i?n.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach((e=>e(t)),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter((e=>e!==t)))}},s=new Set,a=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;u(n)&&p(n,`${e} option`,`options.${t}`,g)},c=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(u(n)){const{prototype:r}=g,{get:i}=Object.getOwnPropertyDescriptor(r,e);p(n,`${e} method`,`cache.${t}()`,i)}},l=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},u=e=>!s.has(e),p=(e,t,n,r)=>{s.add(e),l(`The ${t} is deprecated. Please use ${n} instead.`,"DeprecationWarning",e,r)},d=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),h=e=>d(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?f:null:null;class f extends Array{constructor(e){super(e),this.fill(0)}}class m{constructor(e){if(0===e)return[];const t=h(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class g{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:p,dispose:f,disposeAfter:y,noDisposeOnSet:_,noUpdateTTL:v,maxSize:b=0,sizeCalculation:T,fetchMethod:E,fetchContext:w,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:x}=e,{length:C,maxAge:I,stale:k}=e instanceof g?{}:e;if(0!==t&&!d(t))throw new TypeError("max option must be a nonnegative integer");const A=t?h(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=b,this.sizeCalculation=T||C,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=E||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=w,!this.fetchMethod&&void 0!==w)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new A(t),this.prev=new A(t),this.head=0,this.tail=0,this.free=new m(t),this.initialFill=1,this.size=0,"function"==typeof f&&(this.dispose=f),"function"==typeof y?(this.disposeAfter=y,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!_,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!S,0!==this.maxSize){if(!d(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!p||!!k,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=d(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||I||0,this.ttl){if(!d(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";u(e)&&(s.add(e),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,g))}k&&a("stale","allowStale"),I&&a("maxAge","ttl"),C&&a("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new f(this.max),this.starts=new f(this.max),this.setItemTTL=(e,n,r=t.now())=>{if(this.starts[e]=0!==n?r:0,this.ttls[e]=n,0!==n&&this.ttlAutopurge){const t=setTimeout((()=>{this.isStale(e)&&this.delete(this.keyList[e])}),n+1);t.unref&&t.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?t.now():0};let e=0;const n=()=>{const n=t.now();if(this.ttlResolution>0){e=n;const t=setTimeout((()=>e=0),this.ttlResolution);t.unref&&t.unref()}return n};this.getRemainingTTL=t=>{const r=this.keyMap.get(t);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(e||n())},this.isStale=t=>0!==this.ttls[t]&&0!==this.starts[t]&&(e||n())-this.starts[t]>this.ttls[t]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new f(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(!d(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!d(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{this.sizes[e]=t;const n=this.maxSize-this.sizes[e];for(;this.calculatedSize>n;)this.evict(!0);this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return c("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const n of this.indexes({allowStale:!0})){const r=this.keyList[n],i=this.valList[n],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[n];const e=t.now()-this.starts[n];o.start=Math.floor(Date.now()-e)}this.sizes&&(o.size=this.sizes[n]),e.unshift([r,o])}return e}load(e){this.clear();for(const[n,r]of e){if(r.start){const e=Date.now()-r.start;r.start=t.now()-e}this.set(n,r.value,r)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxSize&&o>this.maxSize)return this;let c=0===this.size?void 0:this.keyMap.get(e);if(void 0===c)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=t,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o),a=!1;else{const n=this.valList[c];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(c),this.valList[c]=t,this.addItemSize(c,o)),this.moveToTail(c)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(c,n,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,r,i){const o=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(o))return o;const s=new n,a={signal:s.signal,options:r,context:i},c=new Promise((t=>t(this.fetchMethod(e,o,a)))).then((t=>(s.signal.aborted||this.set(e,t,a.options),t)),(n=>{if(this.valList[t]===c&&(r.noDeleteOnFetchRejection&&void 0!==c.__staleWhileFetching?this.valList[t]=c.__staleWhileFetching:this.delete(e)),c.__returned===c)throw n}));return c.__abortController=s,c.__staleWhileFetching=o,c.__returned=null,void 0===t?(this.set(e,c,a.options),t=this.keyMap.get(e)):this.valList[t]=c,c}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,fetchContext:u=this.fetchContext,forceRefresh:p=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const d={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:c,noDeleteOnFetchRejection:l};let h=this.keyMap.get(e);if(void 0===h){const t=this.backgroundFetch(e,h,d,u);return t.__returned=t}{const r=this.valList[h];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!p&&!this.isStale(h))return this.moveToTail(h),n&&this.updateItemAge(h),r;const i=this.backgroundFetch(e,h,d,u);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return c("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return c("reset","clear"),this.clear}get length(){return((e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(u(n)){const{prototype:t}=g,{get:r}=Object.getOwnPropertyDescriptor(t,e);p(n,`${e} property`,"cache.size",r)}})("length"),this.size}static get AbortController(){return n}static get AbortSignal(){return o}}e.exports=g},86029:(e,t,n)=>{"use strict";const{randomBytes:r}=n(6113),{Readable:i}=n(12781),o=e=>"object"==typeof e&&0===["arrayBuffer","stream","text","slice","constructor"].map((t=>typeof e[t])).filter((e=>"function"!==e)).length&&"string"==typeof e.type&&"number"==typeof e.size&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),s=e=>`--${e}--\r\n\r\n`,a=(e,t,n)=>{let r="";return r+=`--${e}\r\n`,r+=`Content-Disposition: form-data; name="${t}"`,o(n)&&(r+=`; filename="${n.name}"\r\n`,r+=`Content-Type: ${n.type||"application/octet-stream"}`),`${r}\r\n\r\n`};e.exports={isFormData:e=>null!=e&&"object"==typeof e&&0===["append","delete","get","getAll","has","set","keys","values","entries","constructor"].map((t=>typeof e[t])).filter((e=>"function"!==e)).length&&"FormData"===e[Symbol.toStringTag],FormDataSerializer:class{constructor(e){this.fd=e,this.boundary=r(8).toString("hex")}length(){return void 0===this._length&&(this._length=((e,t)=>{let n=0;for(const[r,i]of e)n+=Buffer.byteLength(a(t,r,i)),n+=o(i)?i.size:Buffer.byteLength(String(i)),n+=Buffer.byteLength("\r\n");return n+=Buffer.byteLength(s(t)),n})(this.fd,this.boundary)),this._length}contentType(){return`multipart/form-data; boundary=${this.boundary}`}stream(){return i.from(async function*(e,t){for(const[n,r]of e)yield a(t,n,r),o(r)?yield*r.stream():yield r,yield"\r\n";yield s(t)}(this.fd,this.boundary))}}}},45591:(e,t,n)=>{"use strict";const{constants:{MAX_LENGTH:r}}=n(14300),{pipeline:i,PassThrough:o}=n(12781),{promisify:s}=n(73837),{createGunzip:a,createInflate:c,createBrotliDecompress:l,constants:{Z_SYNC_FLUSH:u}}=n(59796),p=n(41241)("helix-fetch:utils"),d=s(i),h=(e,t)=>{if(Buffer.isBuffer(e))return e.length;switch(typeof e){case"string":return 2*e.length;case"boolean":return 4;case"number":return 8;case"symbol":return Symbol.keyFor(e)?2*Symbol.keyFor(e).length:2*(e.toString().length-8);case"object":return Array.isArray(e)?f(e,t):m(e,t);default:return 0}},f=(e,t)=>(t.add(e),e.map((e=>t.has(e)?0:h(e,t))).reduce(((e,t)=>e+t),0)),m=(e,t)=>{if(null==e)return 0;t.add(e);let n=0;const r=[];for(const t in e)r.push(t);return r.push(...Object.getOwnPropertySymbols(e)),r.forEach((r=>{if(n+=h(r,t),"object"==typeof e[r]&&null!==e[r]){if(t.has(e[r]))return;t.add(e[r])}n+=h(e[r],t)})),n};e.exports={decodeStream:(e,t,n,r)=>{if(!((e,t)=>204!==e&&304!==e&&0!=+t["content-length"]&&/^\s*(?:(x-)?deflate|(x-)?gzip|br)\s*$/.test(t["content-encoding"]))(e,t))return n;const o=e=>{e&&(p(`encountered error while decoding stream: ${e}`),r(e))};switch(t["content-encoding"].trim()){case"gzip":case"x-gzip":return i(n,a({flush:u,finishFlush:u}),o);case"deflate":case"x-deflate":return i(n,c(),o);case"br":return i(n,l(),o);default:return n}},isPlainObject:e=>{if(!e||"object"!=typeof e)return!1;if("[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},sizeof:e=>h(e,new WeakSet),streamToBuffer:async e=>{const t=new o;let n=0;const i=[];return t.on("data",(e=>{if(n+e.length>r)throw new Error("Buffer.constants.MAX_SIZE exceeded");i.push(e),n+=e.length})),await d(e,t),Buffer.concat(i,n)}}},75899:e=>{"use strict";class t extends Error{get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={RequestAbortedError:t}},84751:(e,t,n)=>{"use strict";const r=n(13685),i=n(95687),{Readable:o}=n(12781),s=n(41241)("helix-fetch:h1"),{RequestAbortedError:a}=n(75899),{decodeStream:c}=n(45591);e.exports={request:async(e,t,n)=>{const{request:l}="https:"===t.protocol?i:r,u=((e,t)=>{const{h1:n,options:{h1:o,rejectUnauthorized:s}}=e;return"https:"===t?n.httpsAgent?n.httpsAgent:o||"boolean"==typeof s?(n.httpsAgent=new i.Agent("boolean"==typeof s?{...o||{},rejectUnauthorized:s}:o),n.httpsAgent):void 0:n.httpAgent?n.httpAgent:o?(n.httpAgent=new r.Agent(o),n.httpAgent):void 0})(e,t.protocol),p={...n,agent:u},{socket:d,body:h}=p;return d&&(delete p.socket,d.assigned||(d.assigned=!0,u?p.agent=new Proxy(u,{get:(e,t)=>"createConnection"!==t||d.inUse?e[t]:(e,t)=>{s(`agent reusing socket #${d.id} (${d.servername})`),d.inUse=!0,t(null,d)}}):p.createConnection=(e,t)=>{s(`reusing socket #${d.id} (${d.servername})`),d.inUse=!0,t(null,d)})),new Promise(((e,n)=>{let r;s(`${p.method} ${t.href}`);const{signal:i}=p,u=()=>{i.removeEventListener("abort",u),d&&!d.inUse&&(s(`discarding redundant socket used for ALPN: #${d.id} ${d.servername}`),d.destroy()),n(new a),r&&r.abort()};if(i){if(i.aborted)return void n(new a);i.addEventListener("abort",u)}r=l(t,p),r.once("response",(t=>{i&&i.removeEventListener("abort",u),d&&!d.inUse&&(s(`discarding redundant socket used for ALPN: #${d.id} ${d.servername}`),d.destroy()),e(((e,t,n)=>{const{statusCode:r,statusMessage:i,httpVersion:o,httpVersionMajor:s,httpVersionMinor:a,headers:l}=e,u=t?c(r,l,e,n):e;return{statusCode:r,statusText:i,httpVersion:o,httpVersionMajor:s,httpVersionMinor:a,headers:l,readable:u,decoded:!(!t||u===e)}})(t,p.decode,n))})),r.once("error",(e=>{i&&i.removeEventListener("abort",u),d&&!d.inUse&&(s(`discarding redundant socket used for ALPN: #${d.id} ${d.servername}`),d.destroy()),r.aborted||(s(`${p.method} ${t.href} failed with: ${e.message}`),r.abort(),n(e))})),h instanceof o?h.pipe(r):(h&&r.write(h),r.end())}))},setupContext:e=>{e.h1={}},resetContext:async({h1:e})=>{e.httpAgent&&(s("resetContext: destroying httpAgent"),e.httpAgent.destroy(),delete e.httpAgent),e.httpsAgent&&(s("resetContext: destroying httpsAgent"),e.httpsAgent.destroy(),delete e.httpsAgent)}}},57652:(e,t,n)=>{"use strict";const{connect:r,constants:i}=n(85158),{Readable:o}=n(12781),s=n(41241)("helix-fetch:h2"),{RequestAbortedError:a}=n(75899),{decodeStream:c}=n(45591),{NGHTTP2_CANCEL:l}=i,u=3e5,p=5e3,d=(e,t,n,r=(()=>{}))=>{const i={...e},o=i[":status"];delete i[":status"];const s=n?c(o,e,t,r):t;return{statusCode:o,statusText:"",httpVersion:"2.0",httpVersionMajor:2,httpVersionMinor:0,headers:i,readable:s,decoded:!(!n||s===t)}};e.exports={request:async(e,t,n)=>{const{origin:i,pathname:c,search:h,hash:f}=t,m=`${c}${h}${f}`,{options:{h2:g={}},h2:{sessionCache:y}}=e,{idleSessionTimeout:_=u,pushPromiseHandler:v,pushHandler:b}=g,T={...n},{method:E,headers:w,socket:S,body:x,decode:C}=T;return S&&delete T.socket,w.host&&(w[":authority"]=w.host,delete w.host),new Promise(((n,c)=>{let u,h=y[i];if(!h||h.closed||h.destroyed){const t=!(!1===e.options.rejectUnauthorized||!1===g.rejectUnauthorized),n={...g,rejectUnauthorized:t};S&&!S.inUse&&(n.createConnection=()=>(s(`reusing socket #${S.id} (${S.servername})`),S.inUse=!0,S));const o=!(!v&&!b);h=r(i,{...n,settings:{enablePush:o}}),h.setMaxListeners(1e3),h.setTimeout(_,(()=>{s(`closing session ${i} after ${_} ms of inactivity`),h.close()})),h.once("connect",(()=>{s(`session ${i} established`),s(`caching session ${i}`),y[i]=h})),h.on("localSettings",(e=>{s(`session ${i} localSettings: ${JSON.stringify(e)}`)})),h.on("remoteSettings",(e=>{s(`session ${i} remoteSettings: ${JSON.stringify(e)}`)})),h.once("close",(()=>{s(`session ${i} closed`),y[i]===h&&(s(`discarding cached session ${i}`),delete y[i])})),h.once("error",(e=>{s(`session ${i} encountered error: ${e}`),y[i]===h&&(s(`discarding cached session ${i}`),delete y[i])})),h.on("frameError",((e,t,n)=>{s(`session ${i} encountered frameError: type: ${e}, code: ${t}, id: ${n}`)})),h.once("goaway",((e,t,n)=>{s(`session ${i} received GOAWAY frame: errorCode: ${e}, lastStreamID: ${t}, opaqueData: ${n?n.toString():void 0}`)})),h.on("stream",((t,n,r)=>{((e,t,n,r,i,o)=>{const{options:{h2:{pushPromiseHandler:a,pushHandler:c,pushedStreamIdleTimeout:u=p}}}=e,h=i[":path"],f=`${t}${h}`;s(`received PUSH_PROMISE: ${f}, stream #${r.id}, headers: ${JSON.stringify(i)}, flags: ${o}`),a&&a(f,i,(()=>{r.close(l)})),r.on("push",((e,o)=>{s(`received push headers for ${t}${h}, stream #${r.id}, headers: ${JSON.stringify(e)}, flags: ${o}`),r.setTimeout(u,(()=>{s(`closing pushed stream #${r.id} after ${u} ms of inactivity`),r.close(l)})),c&&c(f,i,d(e,r,n))})),r.on("aborted",(()=>{s(`pushed stream #${r.id} aborted`)})),r.on("error",(e=>{s(`pushed stream #${r.id} encountered error: ${e}`)})),r.on("frameError",((e,t,n)=>{s(`pushed stream #${r.id} encountered frameError: type: ${e}, code: ${t}, id: ${n}`)}))})(e,i,C,t,n,r)}))}else S&&S.id!==h.socket.id&&!S.inUse&&(s(`discarding redundant socket used for ALPN: #${S.id} ${S.servername}`),S.destroy());s(`${E} ${t.host}${m}`);const{signal:f}=T,I=()=>{f.removeEventListener("abort",I),c(new a),u&&u.close(l)};if(f){if(f.aborted)return void c(new a);f.addEventListener("abort",I)}const k=e=>{s(`session ${i} encountered error during ${T.method} ${t.href}: ${e}`),c(e)};h.once("error",k),u=h.request({":method":E,":path":m,...w}),u.once("response",(e=>{h.off("error",k),f&&f.removeEventListener("abort",I),n(d(e,u,T.decode,c))})),u.once("error",(e=>{h.off("error",k),f&&f.removeEventListener("abort",I),u.rstCode!==l&&(s(`${T.method} ${t.href} failed with: ${e.message}`),u.close(l),c(e))})),u.once("frameError",((e,n,r)=>{h.off("error",k),s(`encountered frameError during ${T.method} ${t.href}: type: ${e}, code: ${n}, id: ${r}`)})),u.on("push",((e,t)=>{s(`received 'push' event: headers: ${JSON.stringify(e)}, flags: ${t}`)})),x instanceof o?x.pipe(u):(x&&u.write(x),u.end())}))},setupContext:e=>{e.h2={sessionCache:{}}},resetContext:async({h2:e})=>Promise.all(Object.values(e.sessionCache).map((e=>new Promise((t=>{e.on("close",t),s(`resetContext: destroying session (socket #${e.socket&&e.socket.id}, ${e.socket&&e.socket.servername})`),e.destroy()})))))}},44673:(e,t,n)=>{"use strict";const r=n(41241)("helix-fetch:core"),{request:i,setupContext:o,resetContext:s,RequestAbortedError:a,ALPN_HTTP2:c,ALPN_HTTP2C:l,ALPN_HTTP1_1:u,ALPN_HTTP1_0:p}=n(56633);class d{constructor(e){this.options={...e||{}},o(this)}api(){return{request:async(e,t)=>this.request(e,t),context:(e={})=>new d(e).api(),setCA:e=>this.setCA(e),reset:async()=>this.reset(),RequestAbortedError:a,ALPN_HTTP2:c,ALPN_HTTP2C:l,ALPN_HTTP1_1:u,ALPN_HTTP1_0:p}}async request(e,t){return i(this,e,t)}setCA(e){this.options.ca=e}async reset(){return r("resetting context"),s(this)}}e.exports=(new d).api()},93430:(e,t,n)=>{"use strict";const{EventEmitter:r}=n(82361);e.exports=()=>{const e={},t=new r;return t.setMaxListeners(0),{acquire:n=>new Promise((r=>{if(!e[n])return e[n]=!0,void r();const i=o=>{e[n]||(e[n]=!0,t.removeListener(n,i),r(o))};t.on(n,i)})),release:(n,r)=>{Reflect.deleteProperty(e,n),setImmediate((()=>t.emit(n,r)))}}}},56633:(e,t,n)=>{"use strict";const{Readable:r}=n(12781),i=n(24404),{types:{isAnyArrayBuffer:o}}=n(73837),s=n(39941),a=n(41241)("helix-fetch:core"),{RequestAbortedError:c}=n(75899),l=n(84751),u=n(57652),p=n(93430),{isPlainObject:d}=n(45591),{isFormData:h,FormDataSerializer:f}=n(86029),{version:m}=n(93180),g="h2",y="h2c",_="http/1.0",v="http/1.1",b=100,T=36e5,E=[g,v,_],w=`helix-fetch/${m}`,S={method:"GET",compress:!0,decode:!0};let x=0;const C=p(),I=(e,t)=>new Promise(((n,r)=>{const{signal:o}=t;let s;const l=()=>{o.removeEventListener("abort",l);const e=new c;r(e),s&&s.destroy(e)};if(o){if(o.aborted)return void r(new c);o.addEventListener("abort",l)}const u=+e.port||443,p=t=>{o&&o.removeEventListener("abort",l),t instanceof c||(a(`connecting to ${e.hostname}:${u} failed with: ${t.message}`),r(t))};s=i.connect(u,e.hostname,t),s.once("secureConnect",(()=>{o&&o.removeEventListener("abort",l),s.off("error",p),x+=1,s.id=x,s.secureConnecting=!1,a(`established TLS connection: #${s.id} (${s.servername})`),n(s)})),s.once("error",p)}));e.exports={request:async(e,t,n)=>{const i=new URL(t),s={...S,...n||{}};let c;if("string"==typeof s.method&&(s.method=s.method.toUpperCase()),s.headers=(e=>{const t={};return Object.keys(e).forEach((n=>{t[n.toLowerCase()]=e[n]})),t})(s.headers||{}),void 0===s.headers.host&&(s.headers.host=i.host),e.userAgent&&void 0===s.headers["user-agent"]&&(s.headers["user-agent"]=e.userAgent),s.body instanceof URLSearchParams)c="application/x-www-form-urlencoded; charset=utf-8",s.body=s.body.toString();else if(h(s.body)){const e=new f(s.body);c=e.contentType(),s.body=e.stream(),void 0===s.headers["transfer-encoding"]&&void 0===s.headers["content-length"]&&(s.headers["content-length"]=String(e.length()))}else"string"==typeof s.body||s.body instanceof String?c="text/plain; charset=utf-8":d(s.body)?(s.body=JSON.stringify(s.body),c="application/json"):o(s.body)&&(s.body=Buffer.from(s.body));void 0===s.headers["content-type"]&&void 0!==c&&(s.headers["content-type"]=c),null!=s.body&&(s.body instanceof r||("string"==typeof s.body||s.body instanceof String||Buffer.isBuffer(s.body)||(s.body=String(s.body)),void 0===s.headers["transfer-encoding"]&&void 0===s.headers["content-length"]&&(s.headers["content-length"]=String(Buffer.isBuffer(s.body)?s.body.length:Buffer.byteLength(s.body,"utf-8"))))),void 0===s.headers.accept&&(s.headers.accept="*/*"),null==s.body&&["POST","PUT"].includes(s.method)&&(s.headers["content-length"]="0"),s.compress&&void 0===s.headers["accept-encoding"]&&(s.headers["accept-encoding"]="gzip,deflate,br");const{signal:p}=s,{protocol:m,socket:b=null}=e.socketFactory?await(async(e,t,n,r)=>{const i="https:"===t.protocol;let o;o=t.port?t.port:i?443:80;const s={...n,host:t.host,port:o},a=await e(s);if(i){const e={...s,ALPNProtocols:r};e.socket=a,e.servername=s.host;const n=await I(t,e);return{protocol:n.alpnProtocol||v,socket:n}}return{protocol:a.alpnProtocol||v,socket:a}})(e.socketFactory,i,s,e.alpnProtocols):await(async(e,t,n)=>{const r=`${t.protocol}//${t.host}`;let i=e.alpnCache.get(r);if(i)return{protocol:i};switch(t.protocol){case"http:":return i=v,e.alpnCache.set(r,i),{protocol:i};case"http2:":return i=y,e.alpnCache.set(r,i),{protocol:i};case"https:":break;default:throw new TypeError(`unsupported protocol: ${t.protocol}`)}const{options:{rejectUnauthorized:o,h1:s={},h2:a={}}}=e,c=!(!1===o||!1===s.rejectUnauthorized||!1===a.rejectUnauthorized),l={servername:t.hostname,ALPNProtocols:e.alpnProtocols,signal:n,rejectUnauthorized:c};e.options.ca&&(l.ca=e.options.ca);const u=await(async(e,t)=>{let n=await C.acquire(e.origin);try{return n||(n=await I(e,t)),n}finally{C.release(e.origin,n)}})(t,l);return i=u.alpnProtocol,i||(i=v),e.alpnCache.set(r,i),{protocol:i,socket:u}})(e,i,p);switch(a(`${i.host} -> ${m}`),m){case g:try{return await u.request(e,i,b?{...s,socket:b}:s)}catch(t){const{code:n,message:r}=t;throw"ERR_HTTP2_ERROR"===n&&"Protocol error"===r&&e.alpnCache.delete(`${i.protocol}//${i.host}`),t}case y:return u.request(e,new URL(`http://${i.host}${i.pathname}${i.hash}${i.search}`),b?{...s,socket:b}:s);case _:case v:return l.request(e,i,b?{...s,socket:b}:s);default:throw new TypeError(`unsupported protocol: ${m}`)}},setupContext:e=>{const{options:{alpnProtocols:t=E,alpnCacheTTL:n=T,alpnCacheSize:r=b,userAgent:i=w,socketFactory:o}}=e;e.alpnProtocols=t,e.alpnCache=new s({max:r,ttl:n}),e.userAgent=i,e.socketFactory=o,l.setupContext(e),u.setupContext(e)},resetContext:async e=>(e.alpnCache.clear(),Promise.all([l.resetContext(e),u.resetContext(e)])),RequestAbortedError:c,ALPN_HTTP2:g,ALPN_HTTP2C:y,ALPN_HTTP1_1:v,ALPN_HTTP1_0:_}},64346:(e,t,n)=>{"use strict";const{EventEmitter:r}=n(82361),i=Symbol("AbortSignal internals");class o{constructor(){this[i]={eventEmitter:new r,onabort:null,aborted:!1}}get aborted(){return this[i].aborted}get onabort(){return this[i].onabort}set onabort(e){this[i].onabort=e}get[Symbol.toStringTag](){return this.constructor.name}removeEventListener(e,t){this[i].eventEmitter.removeListener(e,t)}addEventListener(e,t){this[i].eventEmitter.on(e,t)}dispatchEvent(e){const t={type:e,target:this},n=`on${e}`;"function"==typeof this[i][n]&&this[n](t),this[i].eventEmitter.emit(e,t)}fire(){this[i].aborted=!0,this.dispatchEvent("abort")}}Object.defineProperties(o.prototype,{addEventListener:{enumerable:!0},removeEventListener:{enumerable:!0},dispatchEvent:{enumerable:!0},aborted:{enumerable:!0},onabort:{enumerable:!0}});class s extends o{constructor(e){if(!Number.isInteger(e))throw new TypeError("Expected an integer, got "+typeof e);super(),this[i].timerId=setTimeout((()=>{this.fire()}),e)}clear(){clearTimeout(this[i].timerId)}}Object.defineProperties(s.prototype,{clear:{enumerable:!0}});const a=Symbol("AbortController internals");class c{constructor(){this[a]={signal:new o}}get signal(){return this[a].signal}get[Symbol.toStringTag](){return this.constructor.name}abort(){this[a].signal.aborted||this[a].signal.fire()}}Object.defineProperties(c.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),e.exports={AbortController:c,AbortSignal:o,TimeoutSignal:s}},54214:(e,t,n)=>{"use strict";const{PassThrough:r,Readable:i}=n(12781),{types:{isAnyArrayBuffer:o}}=n(73837),{FetchError:s,FetchBaseError:a}=n(2501),{streamToBuffer:c}=n(45591),l=Buffer.alloc(0),u=Symbol("Body internals"),p=async e=>{if(e[u].disturbed)throw new TypeError("Already read");if(e[u].error)throw new TypeError(`Stream had error: ${e[u].error.message}`);e[u].disturbed=!0;const{stream:t}=e[u];return null===t?l:c(t)};class d{constructor(e){let t;t=null==e?null:e instanceof URLSearchParams?i.from(e.toString()):e instanceof i?e:Buffer.isBuffer(e)?i.from(e):o(e)?i.from(Buffer.from(e)):"string"==typeof e||e instanceof String?i.from(e):i.from(String(e)),this[u]={stream:t,disturbed:!1,error:null},e instanceof i&&t.on("error",(e=>{const t=e instanceof a?e:new s(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,"system",e);this[u].error=t}))}get body(){return this[u].stream}get bodyUsed(){return this[u].disturbed}async buffer(){return p(this)}async arrayBuffer(){return(e=await this.buffer()).buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);var e}async text(){return(await p(this)).toString()}async json(){return JSON.parse(await this.text())}}Object.defineProperties(d.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),e.exports={Body:d,cloneStream:e=>{if(e[u].disturbed)throw new TypeError("Cannot clone: already read");const{stream:t}=e[u];let n=t;if(t instanceof i){n=new r;const i=new r;t.pipe(n),t.pipe(i),e[u].stream=i}return n},guessContentType:e=>null===e?null:"string"==typeof e?"text/plain; charset=utf-8":e instanceof URLSearchParams?"application/x-www-form-urlencoded; charset=utf-8":Buffer.isBuffer(e)||o(e)||e instanceof i?null:"text/plain; charset=utf-8"}},98941:(e,t,n)=>{"use strict";const{Readable:r}=n(12781),{Headers:i}=n(48226),{Response:o}=n(28327),s=Symbol("CacheableResponse internals");class a extends o{constructor(e,t){super(e,t);const n=new i(t.headers);this[s]={headers:n,bufferedBody:e}}get headers(){return this[s].headers}set headers(e){if(!(e instanceof i))throw new TypeError("instance of Headers expected");this[s].headers=e}get body(){return r.from(this[s].bufferedBody)}get bodyUsed(){return!1}async buffer(){return this[s].bufferedBody}async arrayBuffer(){return(e=this[s].bufferedBody).buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);var e}async text(){return this[s].bufferedBody.toString()}async json(){return JSON.parse(await this.text())}clone(){const{url:e,status:t,statusText:n,headers:r,httpVersion:i,decoded:o,counter:c}=this;return new a(this[s].bufferedBody,{url:e,status:t,statusText:n,headers:r,httpVersion:i,decoded:o,counter:c})}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={cacheableResponse:async e=>{const t=await e.buffer(),{url:n,status:r,statusText:i,headers:o,httpVersion:s,decoded:c,counter:l}=e;return new a(t,{url:n,status:r,statusText:i,headers:o,httpVersion:s,decoded:c,counter:l})}}},2501:e=>{"use strict";class t extends Error{constructor(e,t){super(e),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={FetchBaseError:t,FetchError:class extends t{constructor(e,t,n){super(e,t),n&&(this.code=n.code,this.errno=n.errno,this.erroredSysCall=n.syscall)}},AbortError:class extends t{constructor(e,t="aborted"){super(e,t)}}}},48226:(e,t,n)=>{"use strict";const{validateHeaderName:r,validateHeaderValue:i}=n(13685),{isPlainObject:o}=n(45591),s=Symbol("Headers internals"),a=e=>{const t="string"!=typeof e?String(e):e;if("function"==typeof r)r(t);else if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){const e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}return t.toLowerCase()},c=(e,t)=>{const n="string"!=typeof e?String(e):e;if("function"==typeof i)i(t,n);else if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(n)){const e=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_CHAR"}),e}return n};class l{constructor(e={}){if(this[s]={map:new Map},e instanceof l)e.forEach(((e,t)=>{this.append(t,e)}));else if(Array.isArray(e))e.forEach((([e,t])=>{this.append(e,t)}));else if(o(e))for(const[t,n]of Object.entries(e))this.append(t,n)}set(e,t){this[s].map.set(a(e),c(t,e))}has(e){return this[s].map.has(a(e))}get(e){const t=this[s].map.get(a(e));return void 0===t?null:t}append(e,t){const n=a(e),r=c(t,e),i=this[s].map.get(n);this[s].map.set(n,i?`${i}, ${r}`:r)}delete(e){this[s].map.delete(a(e))}forEach(e,t){for(const n of this.keys())e.call(t,this.get(n),n)}keys(){return Array.from(this[s].map.keys()).sort()}*values(){for(const e of this.keys())yield this.get(e)}*entries(){for(const e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return this.constructor.name}plain(){return Object.fromEntries(this[s].map)}}Object.defineProperties(l.prototype,["append","delete","entries","forEach","get","has","keys","set","values"].reduce(((e,t)=>(e[t]={enumerable:!0},e)),{})),e.exports={Headers:l}},14735:(e,t,n)=>{"use strict";const{EventEmitter:r}=n(82361),{Readable:i}=n(12781),o=n(41241)("helix-fetch"),s=n(39941),{Body:a}=n(54214),{Headers:c}=n(48226),{Request:l}=n(93505),{Response:u}=n(28327),{FetchBaseError:p,FetchError:d,AbortError:h}=n(2501),{AbortController:f,AbortSignal:m,TimeoutSignal:g}=n(64346),y=n(7619),{cacheableResponse:_}=n(98941),{sizeof:v}=n(45591),{isFormData:b}=n(86029),{context:T,RequestAbortedError:E}=n(44673),w=["GET","HEAD"],S="push",x=async(e,t,n)=>{const{request:r}=e.context,o=t instanceof l&&void 0===n?t:new l(t,n),{method:s,body:a,signal:p,compress:f,decode:m,follow:g,redirect:y,init:{body:_}}=o;let v;if(p&&p.aborted){const e=new h("The operation was aborted.");throw o.init.body instanceof i&&o.init.body.destroy(e),e}try{v=await r(o.url,{...n,method:s,headers:o.headers.plain(),body:!_||_ instanceof i||b(_)?a:_,compress:f,decode:m,follow:g,redirect:y,signal:p})}catch(e){if(_ instanceof i&&_.destroy(e),e instanceof TypeError)throw e;if(e instanceof E)throw new h("The operation was aborted.");throw new d(e.message,"system",e)}const T=()=>{p.removeEventListener("abort",T);const e=new h("The operation was aborted.");o.init.body instanceof i&&o.init.body.destroy(e),v.readable.emit("error",e)};p&&p.addEventListener("abort",T);const{statusCode:w,statusText:S,httpVersion:C,headers:I,readable:k,decoded:A}=v;if([301,302,303,307,308].includes(w)){const{location:t}=I,n=null==t?null:new URL(t,o.url);switch(o.redirect){case"manual":break;case"error":throw p&&p.removeEventListener("abort",T),new d(`uri requested responds with a redirect, redirect mode is set to 'error': ${o.url}`,"no-redirect");case"follow":{if(null===n)break;if(o.counter>=o.follow)throw p&&p.removeEventListener("abort",T),new d(`maximum redirect reached at: ${o.url}`,"max-redirect");const t={headers:new c(o.headers),follow:o.follow,compress:o.compress,decode:o.decode,counter:o.counter+1,method:o.method,body:o.body,signal:o.signal};if(303!==w&&o.body&&o.init.body instanceof i)throw p&&p.removeEventListener("abort",T),new d("Cannot follow redirect with body being a readable stream","unsupported-redirect");return 303!==w&&(301!==w&&302!==w||"POST"!==o.method)||(t.method="GET",t.body=void 0,t.headers.delete("content-length")),p&&p.removeEventListener("abort",T),x(e,new l(n,t))}}}return p&&(k.once("end",(()=>{p.removeEventListener("abort",T)})),k.once("error",(()=>{p.removeEventListener("abort",T)}))),new u(k,{url:o.url,status:w,statusText:S,headers:I,httpVersion:C,decoded:A,counter:o.counter})},C=async(e,t,n)=>{if(0===e.options.maxCacheSize)return n;if(!w.includes(t.method))return n;const r=new y(t,n,{shared:!1});if(r.storable()){const i=await _(n);return e.cache.set(t.url,{policy:r,response:i},r.timeToLive()),i}return n},I=(e,t={})=>{const n=new URL(e);if("object"!=typeof t||Array.isArray(t))throw new TypeError("qs: object expected");return Object.entries(t).forEach((([e,t])=>{Array.isArray(t)?t.forEach((t=>n.searchParams.append(e,t))):n.searchParams.append(e,t)})),n.href},k=e=>new g(e);class A{constructor(e){this.options={...e};const{maxCacheSize:t}=this.options;let n="number"==typeof t&&t>=0?t:104857600,i=500;0===n&&(n=1,i=1),this.cache=new s({max:i,maxSize:n,sizeCalculation:({response:e},t)=>v(e)}),this.eventEmitter=new r,this.options.h2=this.options.h2||{},void 0===this.options.h2.enablePush&&(this.options.h2.enablePush=!0);const{enablePush:o}=this.options.h2;o&&(this.options.h2.pushPromiseHandler=(e,t,n)=>{const r={...t};Object.keys(r).filter((e=>e.startsWith(":"))).forEach((e=>delete r[e])),this.pushPromiseHandler(e,r,n)},this.options.h2.pushHandler=(e,t,n)=>{const r={...t};Object.keys(r).filter((e=>e.startsWith(":"))).forEach((e=>delete r[e]));const{statusCode:i,statusText:o,httpVersion:s,headers:a,readable:c,decoded:l}=n;this.pushHandler(e,r,new u(c,{url:e,status:i,statusText:o,headers:a,httpVersion:s,decoded:l}))}),this.context=T(this.options)}api(){return{fetch:async(e,t)=>this.fetch(e,t),Body:a,Headers:c,Request:l,Response:u,AbortController:f,AbortSignal:m,FetchBaseError:p,FetchError:d,AbortError:h,context:(e={})=>new A(e).api(),setCA:e=>this.setCA(e),noCache:(e={})=>new A({...e,maxCacheSize:0}).api(),h1:(e={})=>new A({...e,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),keepAlive:(e={})=>new A({...e,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),h1NoCache:(e={})=>new A({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),keepAliveNoCache:(e={})=>new A({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),reset:async()=>this.context.reset(),onPush:e=>this.onPush(e),offPush:e=>this.offPush(e),createUrl:I,timeoutSignal:k,clearCache:()=>this.clearCache(),cacheStats:()=>this.cacheStats(),ALPN_HTTP2:this.context.ALPN_HTTP2,ALPN_HTTP2C:this.context.ALPN_HTTP2C,ALPN_HTTP1_1:this.context.ALPN_HTTP1_1,ALPN_HTTP1_0:this.context.ALPN_HTTP1_0}}async fetch(e,t){return(async(e,t,n)=>{const r=new l(t,n);if(0!==e.options.maxCacheSize&&w.includes(r.method)&&!["no-store","reload"].includes(r.cache)){const{policy:t,response:n}=e.cache.get(r.url)||{};if(t&&t.satisfiesWithoutRevalidation(r)){n.headers=new c(t.responseHeaders(n));const e=n.clone();return e.fromCache=!0,e}}const i=await x(e,r);return"no-store"!==r.cache?C(e,r,i):i})(this,e,t)}setCA(e){this.options.ca=e,this.context.setCA(e)}onPush(e){return this.eventEmitter.on(S,e)}offPush(e){return this.eventEmitter.off(S,e)}clearCache(){this.cache.clear()}cacheStats(){return{size:this.cache.calculatedSize,count:this.cache.size}}pushPromiseHandler(e,t,n){o(`received server push promise: ${e}, headers: ${JSON.stringify(t)}`);const r=new l(e,{headers:t}),{policy:i}=this.cache.get(e)||{};i&&i.satisfiesWithoutRevalidation(r)&&(o(`already cached, reject push promise: ${e}, headers: ${JSON.stringify(t)}`),n())}async pushHandler(e,t,n){o(`caching resource pushed by server: ${e}, reqHeaders: ${JSON.stringify(t)}, status: ${n.status}, respHeaders: ${JSON.stringify(n.headers)}`);const r=await C(this,new l(e,{headers:t}),n);this.eventEmitter.emit(S,e,r)}}e.exports=(new A).api()},7619:(e,t,n)=>{"use strict";const r=n(13573),{Headers:i}=n(48226),o=e=>({url:e.url,method:e.method,headers:e.headers.plain()}),s=e=>({status:e.status,headers:e.headers.plain()});e.exports=class{constructor(e,t,n){this.policy=new r(o(e),s(t),n)}storable(){return this.policy.storable()}satisfiesWithoutRevalidation(e){return this.policy.satisfiesWithoutRevalidation(o(e))}responseHeaders(e){return new i(this.policy.responseHeaders(s(e)))}timeToLive(){return this.policy.timeToLive()}}},93505:(e,t,n)=>{"use strict";const{AbortSignal:r}=n(64346),{Body:i,cloneStream:o,guessContentType:s}=n(54214),{Headers:a}=n(48226),{isPlainObject:c}=n(45591),{isFormData:l,FormDataSerializer:u}=n(86029),p=Symbol("Request internals");class d extends i{constructor(e,t={}){const n=e instanceof d?e:null,i=n?new URL(n.url):new URL(e);let h=t.method||n&&n.method||"GET";if(h=h.toUpperCase(),(null!=t.body||n&&null!==n.body)&&["GET","HEAD"].includes(h))throw new TypeError("Request with GET/HEAD method cannot have body");let f=t.body||(n&&n.body?o(n):null);const m=new a(t.headers||n&&n.headers||{});if(l(f)&&!m.has("content-type")){const e=new u(f);f=e.stream(),m.set("content-type",e.contentType()),m.has("transfer-encoding")||m.has("content-length")||m.set("content-length",e.length())}if(!m.has("content-type"))if(c(f))f=JSON.stringify(f),m.set("content-type","application/json");else{const e=s(f);e&&m.set("content-type",e)}super(f);let g=n?n.signal:null;if("signal"in t&&(g=t.signal),g&&!(g instanceof r))throw new TypeError("signal needs to be an instance of AbortSignal");const y=t.redirect||n&&n.redirect||"follow";if(!["follow","error","manual"].includes(y))throw new TypeError(`'${y}' is not a valid redirect option`);const _=t.cache||n&&n.cache||"default";if(!["default","no-store","reload","no-cache","force-cache","only-if-cached"].includes(_))throw new TypeError(`'${_}' is not a valid cache option`);this[p]={init:{...t},method:h,redirect:y,cache:_,headers:m,parsedURL:i,signal:g},void 0===t.follow?n&&void 0!==n.follow?this.follow=n.follow:this.follow=20:this.follow=t.follow,this.counter=t.counter||n&&n.counter||0,void 0===t.compress?n&&void 0!==n.compress?this.compress=n.compress:this.compress=!0:this.compress=t.compress,void 0===t.decode?n&&void 0!==n.decode?this.decode=n.decode:this.decode=!0:this.decode=t.decode}get method(){return this[p].method}get url(){return this[p].parsedURL.toString()}get headers(){return this[p].headers}get redirect(){return this[p].redirect}get cache(){return this[p].cache}get signal(){return this[p].signal}clone(){return new d(this)}get init(){return this[p].init}get[Symbol.toStringTag](){return this.constructor.name}}Object.defineProperties(d.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},cache:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),e.exports={Request:d}},28327:(e,t,n)=>{"use strict";const{Body:r,cloneStream:i,guessContentType:o}=n(54214),{Headers:s}=n(48226),{isPlainObject:a}=n(45591),{isFormData:c,FormDataSerializer:l}=n(86029),u=Symbol("Response internals");class p extends r{constructor(e=null,t={}){const n=new s(t.headers);let r=e;if(c(r)&&!n.has("content-type")){const e=new l(r);r=e.stream(),n.set("content-type",e.contentType()),n.has("transfer-encoding")||n.has("content-length")||n.set("content-length",e.length())}if(null!==r&&!n.has("content-type"))if(a(r))r=JSON.stringify(r),n.set("content-type","application/json");else{const e=o(r);e&&n.set("content-type",e)}super(r),this[u]={url:t.url,status:t.status||200,statusText:t.statusText||"",headers:n,httpVersion:t.httpVersion,decoded:t.decoded,counter:t.counter}}get url(){return this[u].url||""}get status(){return this[u].status}get statusText(){return this[u].statusText}get ok(){return this[u].status>=200&&this[u].status<300}get redirected(){return this[u].counter>0}get headers(){return this[u].headers}get httpVersion(){return this[u].httpVersion}get decoded(){return this[u].decoded}static redirect(e,t=302){if(![301,302,303,307,308].includes(t))throw new RangeError("Invalid status code");return new p(null,{headers:{location:new URL(e).toString()},status:t})}clone(){if(this.bodyUsed)throw new TypeError("Cannot clone: already read");return new p(i(this),{...this[u]})}get[Symbol.toStringTag](){return this.constructor.name}}Object.defineProperties(p.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),e.exports={Response:p}},98606:(e,t,n)=>{"use strict";e.exports=n(14735)},15389:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RestError:()=>He,bearerTokenAuthenticationPolicy:()=>It,bearerTokenAuthenticationPolicyName:()=>xt,createDefaultHttpClient:()=>st,createEmptyPipeline:()=>o,createHttpHeaders:()=>Je,createPipelineFromOptions:()=>We,createPipelineRequest:()=>yt,decompressResponsePolicy:()=>Y,decompressResponsePolicyName:()=>X,defaultRetryPolicy:()=>de,exponentialRetryPolicy:()=>vt,exponentialRetryPolicyName:()=>_t,formDataPolicy:()=>ge,formDataPolicyName:()=>me,getDefaultProxySettings:()=>Ce,isRestError:()=>$e,logPolicy:()=>j,logPolicyName:()=>B,ndJsonPolicy:()=>At,ndJsonPolicyName:()=>kt,proxyPolicy:()=>ke,proxyPolicyName:()=>Te,redirectPolicy:()=>H,redirectPolicyName:()=>U,retryPolicy:()=>pe,setClientRequestIdPolicy:()=>Pe,setClientRequestIdPolicyName:()=>Ae,systemErrorRetryPolicy:()=>Tt,systemErrorRetryPolicyName:()=>bt,throttlingRetryPolicy:()=>wt,throttlingRetryPolicyName:()=>Et,tlsPolicy:()=>Ne,tlsPolicyName:()=>Re,tracingPolicy:()=>ze,tracingPolicyName:()=>Ve,userAgentPolicy:()=>K,userAgentPolicyName:()=>G});const r=new Set(["Deserialize","Serialize","Retry","Sign"]);class i{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!r.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!r.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new i(this._policies)}static create(){return new i}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),i=n("None"),o=n("Deserialize"),s=n("Retry"),a=n("Sign"),c=[r,i,o,s,a];function l(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?o:"Sign"===e?a:i}for(const e of this._policies){const n=e.policy,r=e.options,i=n.name;if(t.has(i))throw new Error("Duplicate policy names not allowed in pipeline");const o={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(o.afterPhase=l(r.afterPhase),o.afterPhase.hasAfterPolicies=!0),t.set(i,o),l(r.phase).policies.add(o)}for(const e of this._policies){const{policy:n,options:r}=e,i=n.name,o=t.get(i);if(!o)throw new Error(`Missing node for policy ${i}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(o.dependsOn.add(n),n.dependants.add(o))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(o),o.dependants.add(n))}}function u(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function p(){for(const e of c){if(u(e),e.policies.size>0&&e!==i)return void(i.hasRun||u(i));e.hasAfterPolicies&&u(i)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(p(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}function o(){return i.create()}var s=n(73837),a=n.n(s),c=n(22037);const l="undefined"!=typeof process&&process.env&&process.env.DEBUG||void 0;let u,p=[],d=[];const h=[];l&&m(l);const f=Object.assign((e=>y(e)),{enable:m,enabled:g,disable:function(){const e=u||"";return m(""),e},log:function(e,...t){process.stderr.write(`${a().format(e,...t)}${c.EOL}`)}});function m(e){u=e,p=[],d=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?d.push(new RegExp(`^${e.substr(1)}$`)):p.push(new RegExp(`^${e}$`));for(const e of h)e.enabled=g(e.namespace)}function g(e){if(e.endsWith("*"))return!0;for(const t of d)if(t.test(e))return!1;for(const t of p)if(t.test(e))return!0;return!1}function y(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:g(e),destroy:_,log:f.log,namespace:e,extend:v});return h.push(t),t}function _(){const e=h.indexOf(this);return e>=0&&(h.splice(e,1),!0)}function v(e){const t=y(`${this.namespace}:${e}`);return t.log=this.log,t}const b=f,T=new Set,E="undefined"!=typeof process&&process.env&&process.env.AZURE_LOG_LEVEL||void 0;let w;const S=b("azure");S.log=(...e)=>{b.log(...e)};const x=["verbose","info","warning","error"];E&&(R(E)?function(e){if(e&&!R(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${x.join(",")}`);w=e;const t=[];for(const e of T)P(e)&&t.push(e.namespace);b.enable(t.join(","))}(E):console.error(`AZURE_LOG_LEVEL set to unknown log level '${E}'; logging is not enabled. Acceptable values: ${x.join(", ")}.`));const C={verbose:400,info:300,warning:200,error:100};function I(e){const t=S.extend(e);return k(S,t),{error:A(t,"error"),warning:A(t,"warning"),info:A(t,"info"),verbose:A(t,"verbose")}}function k(e,t){t.log=(...t)=>{e.log(...t)}}function A(e,t){const n=Object.assign(e.extend(t),{level:t});if(k(e,n),P(n)){const e=b.disable();b.enable(e+","+n.namespace)}return T.add(n),n}function P(e){return!!(w&&C[e.level]<=C[w])}function R(e){return x.includes(e)}const N=I("core-rest-pipeline");function O(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}const M="REDACTED",D=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],L=["api-version"];class F{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=D.concat(e),t=L.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||O(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=M;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=M;return t}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,M);return t.toString()}}const B="logPolicy";function j(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:N.info,r=new F({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:B,async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const i=await t(e);return n(`Response status code: ${i.status}`),n(`Headers: ${r.sanitize(i.headers)}`),i}}}const U="redirectPolicy",q=["GET","HEAD"];function H(e={}){const{maxRetries:t=20}=e;return{name:U,async sendRequest(e,n){const r=await n(e);return $(n,r,t)}}}async function $(e,t,n,r=0){const{request:i,status:o,headers:s}=t,a=s.get("location");if(a&&(300===o||301===o&&q.includes(i.method)||302===o&&q.includes(i.method)||303===o&&"POST"===i.method||307===o)&&r(e.headers.has(W)||e.headers.set(W,t),n(e))}}const X="decompressResponsePolicy";function Y(){return{name:X,sendRequest:async(e,t)=>("HEAD"!==e.method&&e.headers.set("Accept-Encoding","gzip,deflate"),t(e))}}const Z=new WeakMap,Q=new WeakMap;class J{constructor(){this.onabort=null,Z.set(this,[]),Q.set(this,!1)}get aborted(){if(!Q.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Q.get(this)}static get none(){return new J}addEventListener(e,t){if(!Z.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Z.get(this).push(t)}removeEventListener(e,t){if(!Z.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");const n=Z.get(this),r=n.indexOf(t);r>-1&&n.splice(r,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function ee(e){if(e.aborted)return;e.onabort&&e.onabort.call(e);const t=Z.get(e);t&&t.slice().forEach((t=>{t.call(e,{type:"abort"})})),Q.set(e,!0)}class te extends Error{constructor(e){super(e),this.name="AbortError"}}class ne{constructor(e){if(this._signal=new J,e){Array.isArray(e)||(e=arguments);for(const t of e)t.aborted?this.abort():t.addEventListener("abort",(()=>{this.abort()}))}}get signal(){return this._signal}abort(){ee(this._signal)}static timeout(e){const t=new J,n=setTimeout(ee,e,t);return"function"==typeof n.unref&&n.unref(),t}}function re(e,t,n){return new Promise(((r,i)=>{let o,s;const a=()=>i(new te((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(o&&clearTimeout(o),c(),a()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return a();o=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function ie(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const oe="Retry-After",se=["retry-after-ms","x-ms-retry-after-ms",oe];function ae(e){if(e&&[429,503].includes(e.status))try{for(const t of se){const n=ie(e,t);if(0===n||n)return n*(t===oe?1e3:1)}const t=e.headers.get(oe);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function ce(){return{name:"throttlingRetryStrategy",retry({response:e}){const t=ae(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}}}function le(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,i=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;let o=r;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:r}){const s=!!(p=r)&&("ETIMEDOUT"===p.code||"ESOCKETTIMEDOUT"===p.code||"ECONNREFUSED"===p.code||"ECONNRESET"===p.code||"ENOENT"===p.code),a=s&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),l=c&&e.ignoreHttpStatusCodes,u=n&&(function(e){return Number.isFinite(ae(e))}(n)||!c);var p;if(u||l||a)return{skipStrategy:!0};if(r&&!s&&!c)return{errorToThrow:r};const d=o*Math.pow(2,t),h=Math.min(i,d);var f,m;return o=h/2+(f=0,m=h/2,f=Math.ceil(f),m=Math.floor(m),Math.floor(Math.random()*(m-f+1))+f),{retryAfterInMs:o}}}}const ue=I("core-rest-pipeline retryPolicy");function pe(e,t={maxRetries:3}){const n=t.logger||ue;return{name:"retryPolicy",async sendRequest(r,i){var o,s;let a,c,l=-1;e:for(;;){l+=1,a=void 0,c=void 0;try{n.info(`Retry ${l}: Attempting to send request`,r.requestId),a=await i(r),n.info(`Retry ${l}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${l}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;a=c.response}if(null===(o=r.abortSignal)||void 0===o?void 0:o.aborted)throw n.error(`Retry ${l}: Request aborted.`),new te;if(l>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${l}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(a)return a;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${l}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||ue;e.info(`Retry ${l}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:l,response:a,responseError:c});if(n.skipStrategy){e.info(`Retry ${l}: Skipped.`);continue t}const{errorToThrow:i,retryAfterInMs:o,redirectTo:s}=n;if(i)throw e.error(`Retry ${l}: Retry strategy ${t.name} throws error:`,i),i;if(o||0===o){e.info(`Retry ${l}: Retry strategy ${t.name} retries after ${o}`),await re(o,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${l}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(a)return n.info("None of the retry strategies could work with the received response. Returning it."),a}}}}function de(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:pe([ce(),le(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}var he=n(54347),fe=n.n(he);const me="formDataPolicy";function ge(){return{name:me,async sendRequest(e,t){if(e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?(e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData),e.formData=void 0):await async function(e,t){const n=new(fe());for(const t of Object.keys(e)){const r=e[t];if(Array.isArray(r))for(const e of r)n.append(t,e);else n.append(t,r)}t.body=n,t.formData=void 0;const r=t.headers.get("Content-Type");r&&-1!==r.indexOf("multipart/form-data")&&t.headers.set("Content-Type",`multipart/form-data; boundary=${n.getBoundary()}`);try{const e=await new Promise(((e,t)=>{n.getLength(((n,r)=>{n?t(n):e(r)}))}));t.headers.set("Content-Length",e)}catch(e){}}(e.formData,e)}return t(e)}}}var ye;const _e="undefined"!=typeof process&&Boolean(process.version)&&Boolean(null===(ye=process.versions)||void 0===ye?void 0:ye.node);var ve=n(72331),be=n(65188);const Te="proxyPolicy",Ee=[];let we=!1;const Se=new Map;function xe(e){return process.env[e]?process.env[e]:process.env[e.toLowerCase()]?process.env[e.toLowerCase()]:void 0}function Ce(e){if(!e&&!(e=function(){if(!process)return;const e=xe("HTTPS_PROXY"),t=xe("ALL_PROXY"),n=xe("HTTP_PROXY");return e||t||n}()))return;const t=new URL(e);return{host:(t.protocol?t.protocol+"//":"")+t.hostname,port:Number.parseInt(t.port||"80"),username:t.username,password:t.password}}function Ie(e,{headers:t,tlsSettings:n}){let r;try{r=new URL(e.host)}catch(t){throw new Error(`Expecting a valid host string in proxy settings, but found "${e.host}".`)}n&&N.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");const i={hostname:r.hostname,port:e.port,protocol:r.protocol,headers:t.toJSON()};return e.username&&e.password?i.auth=`${e.username}:${e.password}`:e.username&&(i.auth=`${e.username}`),i}function ke(e=Ce(),t){we||Ee.push(...function(){const e=xe("NO_PROXY");return we=!0,e?e.split(",").map((e=>e.trim())).filter((e=>e.length)):[]}());const n={};return{name:Te,async sendRequest(r,i){var o;return r.proxySettings||function(e,t,n){if(0===t.length)return!1;const r=new URL(e).hostname;if(null==n?void 0:n.has(r))return n.get(r);let i=!1;for(const e of t)"."===e[0]?(r.endsWith(e)||r.length===e.length-1&&r===e.slice(1))&&(i=!0):r===e&&(i=!0);return null==n||n.set(r,i),i}(r.url,null!==(o=null==t?void 0:t.customNoProxyList)&&void 0!==o?o:Ee,(null==t?void 0:t.customNoProxyList)?void 0:Se)||(r.proxySettings=e),r.proxySettings&&function(e,t){if(e.agent)return;const n="https:"!==new URL(e.url).protocol,r=e.proxySettings;if(r)if(n){if(!t.httpProxyAgent){const n=Ie(r,e);t.httpProxyAgent=new be.HttpProxyAgent(n)}e.agent=t.httpProxyAgent}else{if(!t.httpsProxyAgent){const n=Ie(r,e);t.httpsProxyAgent=new ve.HttpsProxyAgent(n)}e.agent=t.httpsProxyAgent}}(r,n),i(r)}}}const Ae="setClientRequestIdPolicy";function Pe(e="x-ms-client-request-id"){return{name:Ae,sendRequest:async(t,n)=>(t.headers.has(e)||t.headers.set(e,t.requestId),n(t))}}const Re="tlsPolicy";function Ne(e){return{name:Re,sendRequest:async(t,n)=>(t.tlsSettings||(t.tlsSettings=e),n(t))}}const Oe={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Me(e={}){let t=new De(e.parentContext);return e.span&&(t=t.setValue(Oe.span,e.span)),e.namespace&&(t=t.setValue(Oe.namespace,e.namespace)),t}class De{constructor(e){this._contextMap=e instanceof De?new Map(e._contextMap):new Map}setValue(e,t){const n=new De(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new De(this);return t._contextMap.delete(e),t}}let Le;function Fe(){return Le||(Le={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}},tracingContext:Me({parentContext:t.tracingContext})}),withContext:(e,t,...n)=>t(...n)}),Le}function Be(e){if(O(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function je(e){if(Be(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}const Ue=s.inspect.custom,qe=new F;class He extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,this.request=t.request,this.response=t.response,Object.setPrototypeOf(this,He.prototype)}[Ue](){return`RestError: ${this.message} \n ${qe.sanitize(this)}`}}function $e(e){return e instanceof He||Be(e)&&"RestError"===e.name}He.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",He.PARSE_ERROR="PARSE_ERROR";const Ve="tracingPolicy";function ze(e={}){const t=z(e.userAgentPrefix),n=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function i(e,i,o){var s;const a=Fe().startSpan(e,Object.assign(Object.assign({},o),{packageName:n,packageVersion:r,tracingContext:null===(s=null==i?void 0:i.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=a.tracingContext;const l=a.span;return c.getValue(Oe.namespace)||(c=c.setValue(Oe.namespace,t)),l.setAttribute("az.namespace",c.getValue(Oe.namespace)),{span:l,updatedOptions:Object.assign({},i,{tracingOptions:Object.assign(Object.assign({},null==i?void 0:i.tracingOptions),{tracingContext:c})})}}function o(e,t,...n){return Fe().withContext(e,t,...n)}return{startSpan:i,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:a}=i(e,t,r);try{const e=await o(a.tracingOptions.tracingContext,(()=>Promise.resolve(n(a,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:o,parseTraceparentHeader:function(e){return Fe().parseTraceparentHeader(e)},createRequestHeaders:function(e){return Fe().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:V})}catch(e){return void N.warning(`Error when creating the TracingClient: ${je(e)}`)}}();return{name:Ve,async sendRequest(e,r){var i,o;if(!n||!(null===(i=e.tracingOptions)||void 0===i?void 0:i.tracingContext))return r(e);const{span:s,tracingContext:a}=null!==(o=function(e,t,n){try{const{span:r,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":t.method,"http.url":t.url,requestId:t.requestId}});if(!r.isRecording())return void r.end();n&&r.setAttribute("http.user_agent",n);const o=e.createRequestHeaders(i.tracingOptions.tracingContext);for(const[e,n]of Object.entries(o))t.headers.set(e,n);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(e){return void N.warning(`Skipping creating a tracing span due to an error: ${je(e)}`)}}(n,e,t))&&void 0!==o?o:{};if(!s||!a)return r(e);try{const t=await n.withContext(a,r,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),e.setStatus({status:"success"}),e.end()}catch(e){N.warning(`Skipping tracing span processing due to an error: ${je(e)}`)}}(s,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Be(t)?t:void 0}),$e(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){N.warning(`Skipping tracing span processing due to an error: ${je(e)}`)}}(s,e),e}}}}function We(e){const t=o();return _e&&(e.tlsOptions&&t.addPolicy(Ne(e.tlsOptions)),t.addPolicy(ke(e.proxyOptions)),t.addPolicy(Y())),t.addPolicy(ge()),t.addPolicy(K(e.userAgentOptions)),t.addPolicy(Pe()),t.addPolicy(de(e.retryOptions),{phase:"Retry"}),t.addPolicy(ze(e.userAgentOptions),{afterPhase:"Retry"}),_e&&t.addPolicy(H(e.redirectOptions),{afterPhase:"Retry"}),t.addPolicy(j(e.loggingOptions),{afterPhase:"Sign"}),t}var Ge=n(13685),Ke=n(95687),Xe=n(59796),Ye=n(12781);function Ze(e){return e.toLowerCase()}class Qe{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Ze(e),{name:e,value:String(t)})}get(e){var t;return null===(t=this._headersMap.get(Ze(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Ze(e))}delete(e){this._headersMap.delete(Ze(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function Je(e){return new Qe(e)}const et={};function tt(e){return e&&"function"==typeof e.pipe}function nt(e){return new Promise((t=>{e.on("close",t),e.on("end",t),e.on("error",t)}))}function rt(e){return e&&"number"==typeof e.byteLength}class it extends Ye.Transform{constructor(e){super(),this.loadedBytes=0,this.progressCallback=e}_transform(e,t,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(e){n(e)}}}class ot{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(e){var t,n,r;const i=new ne;let o;if(e.abortSignal){if(e.abortSignal.aborted)throw new te("The operation was aborted.");o=e=>{"abort"===e.type&&i.abort()},e.abortSignal.addEventListener("abort",o)}e.timeout>0&&setTimeout((()=>{i.abort()}),e.timeout);const s=e.headers.get("Accept-Encoding"),a=(null==s?void 0:s.includes("gzip"))||(null==s?void 0:s.includes("deflate"));let c,l="function"==typeof e.body?e.body():e.body;if(l&&!e.headers.has("Content-Length")){const t=function(e){return e?Buffer.isBuffer(e)?e.length:tt(e)?null:rt(e)?e.byteLength:"string"==typeof e?Buffer.from(e).length:null:0}(l);null!==t&&e.headers.set("Content-Length",t)}try{if(l&&e.onUploadProgress){const t=e.onUploadProgress,n=new it(t);n.on("error",(e=>{N.error("Error in upload progress",e)})),tt(l)?l.pipe(n):n.end(l),l=n}const s=await this.makeRequest(e,i,l),p=function(e){const t=Je();for(const n of Object.keys(e.headers)){const r=e.headers[n];Array.isArray(r)?r.length>0&&t.set(n,r[0]):r&&t.set(n,r)}return t}(s),d={status:null!==(t=s.statusCode)&&void 0!==t?t:0,headers:p,request:e};if("HEAD"===e.method)return s.resume(),d;c=a?function(e,t){const n=t.get("Content-Encoding");if("gzip"===n){const t=Xe.createGunzip();return e.pipe(t),t}if("deflate"===n){const t=Xe.createInflate();return e.pipe(t),t}return e}(s,p):s;const h=e.onDownloadProgress;if(h){const e=new it(h);e.on("error",(e=>{N.error("Error in download progress",e)})),c.pipe(e),c=e}return(null===(n=e.streamResponseStatusCodes)||void 0===n?void 0:n.has(Number.POSITIVE_INFINITY))||(null===(r=e.streamResponseStatusCodes)||void 0===r?void 0:r.has(d.status))?d.readableStreamBody=c:d.bodyAsText=await(u=c,new Promise(((e,t)=>{const n=[];u.on("data",(e=>{Buffer.isBuffer(e)?n.push(e):n.push(Buffer.from(e))})),u.on("end",(()=>{e(Buffer.concat(n).toString("utf8"))})),u.on("error",(e=>{e&&"AbortError"===(null==e?void 0:e.name)?t(e):t(new He(`Error reading response as text: ${e.message}`,{code:He.PARSE_ERROR}))}))}))),d}finally{if(e.abortSignal&&o){let t=Promise.resolve();tt(l)&&(t=nt(l));let n=Promise.resolve();tt(c)&&(n=nt(c)),Promise.all([t,n]).then((()=>{var t;o&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",o))})).catch((e=>{N.warning("Error when cleaning up abortListener on httpRequest",e)}))}}var u}makeRequest(e,t,n){var r;const i=new URL(e.url),o="https:"!==i.protocol;if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);const s={agent:null!==(r=e.agent)&&void 0!==r?r:this.getOrCreateAgent(e,o),hostname:i.hostname,path:`${i.pathname}${i.search}`,port:i.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0})};return new Promise(((r,i)=>{const a=o?Ge.request(s,r):Ke.request(s,r);a.once("error",(t=>{var n;i(new He(t.message,{code:null!==(n=t.code)&&void 0!==n?n:He.REQUEST_SEND_ERROR,request:e}))})),t.signal.addEventListener("abort",(()=>{const e=new te("The operation was aborted.");a.destroy(e),i(e)})),n&&tt(n)?n.pipe(a):n?"string"==typeof n||Buffer.isBuffer(n)?a.end(n):rt(n)?a.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(N.error("Unrecognized body type",n),i(new He("Unrecognized body type"))):a.end()}))}getOrCreateAgent(e,t){var n;const r=e.disableKeepAlive;if(t)return r?Ge.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Ge.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(r&&!e.tlsSettings)return Ke.globalAgent;const t=null!==(n=e.tlsSettings)&&void 0!==n?n:et;let i=this.cachedHttpsAgents.get(t);return i&&i.options.keepAlive===!r||(N.info("No cached TLS Agent exist, creating a new Agent"),i=new Ke.Agent(Object.assign({keepAlive:!r},t)),this.cachedHttpsAgents.set(t,i)),i}}}function st(){return new ot}var at=n(6113),ct=n.n(at);const lt=new Uint8Array(256);let ut=lt.length;function pt(){return ut>lt.length-16&&(ct().randomFillSync(lt),ut=0),lt.slice(ut,ut+=16)}const dt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ht=[];for(let e=0;e<256;++e)ht.push((e+256).toString(16).substr(1));const ft=function(e,t=0){const n=(ht[e[t+0]]+ht[e[t+1]]+ht[e[t+2]]+ht[e[t+3]]+"-"+ht[e[t+4]]+ht[e[t+5]]+"-"+ht[e[t+6]]+ht[e[t+7]]+"-"+ht[e[t+8]]+ht[e[t+9]]+"-"+ht[e[t+10]]+ht[e[t+11]]+ht[e[t+12]]+ht[e[t+13]]+ht[e[t+14]]+ht[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&dt.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},mt=function(e,t,n){const r=(e=e||{}).random||(e.rng||pt)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return ft(r)};class gt{constructor(e){var t,n,r,i,o,s,a;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:Je(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.formData=e.formData,this.disableKeepAlive=null!==(i=e.disableKeepAlive)&&void 0!==i&&i,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(o=e.withCredentials)&&void 0!==o&&o,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||mt(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(a=e.enableBrowserStreams)&&void 0!==a&&a}}function yt(e){return new gt(e)}const _t="exponentialRetryPolicy";function vt(e={}){var t;return pe([le(Object.assign(Object.assign({},e),{ignoreSystemErrors:!0}))],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3})}const bt="systemErrorRetryPolicy";function Tt(e={}){var t;return{name:bt,sendRequest:pe([le(Object.assign(Object.assign({},e),{ignoreHttpStatusCodes:!0}))],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}const Et="throttlingRetryPolicy";function wt(e={}){var t;return{name:Et,sendRequest:pe([ce()],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}const St={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};const xt="bearerTokenAuthenticationPolicy";async function Ct(e){const{scopes:t,getAccessToken:n,request:r}=e,i={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},o=await n(t,i);o&&e.request.headers.set("Authorization",`Bearer ${o.token}`)}function It(e){var t;const{credential:n,scopes:r,challengeCallbacks:i}=e,o=e.logger||N,s=Object.assign({authorizeRequest:null!==(t=null==i?void 0:i.authorizeRequest)&&void 0!==t?t:Ct,authorizeRequestOnChallenge:null==i?void 0:i.authorizeRequestOnChallenge},i),a=n?function(e,t){let n,r=null,i=null;const o=Object.assign(Object.assign({},St),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMse.getToken(t,a)),o.retryIntervalInMs,null!==(c=null==i?void 0:i.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,i=e,n=a.tenantId,i))).catch((e=>{throw r=null,i=null,n=void 0,e}))),r}return async(e,t)=>n!==t.tenantId||Boolean(t.claims)||s.mustRefresh?a(e,t):(s.shouldRefresh&&a(e,t),i)}(n):()=>Promise.resolve(null);return{name:xt,async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,i;await s.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:e,getAccessToken:a,logger:o});try{n=await t(e)}catch(e){i=e,n=e.response}if(s.authorizeRequestOnChallenge&&401===(null==n?void 0:n.status)&&function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(n)&&await s.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:e,response:n,getAccessToken:a,logger:o}))return t(e);if(i)throw i;return n}}}const kt="ndJsonPolicy";function At(){return{name:kt,async sendRequest(e,t){if("string"==typeof e.body&&e.body.startsWith("[")){const t=JSON.parse(e.body);Array.isArray(t)&&(e.body=t.map((e=>JSON.stringify(e)+"\n")).join(""))}return t(e)}}}},42348:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:n}={}){return new Promise(((r,i)=>{function o(){null==n||n.removeEventListener("abort",o),e.removeListener(t,s),e.removeListener("error",a)}function s(...e){o(),r(e)}function a(e){o(),i(e)}null==n||n.addEventListener("abort",o),e.on(t,s),e.on("error",a)}))}},62484:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(41808)),s=i(n(24404)),a=i(n(57310)),c=i(n(41241)),l=i(n(42348)),u=n(47475),p=(0,c.default)("http-proxy-agent");class d extends u.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");p("Creating new HttpProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this,i=a.default.parse(e.path);let c;if(i.protocol||(i.protocol="http:"),i.hostname||(i.hostname=t.hostname||t.host||null),null==i.port&&(t.port,1)&&(i.port=String(t.port)),"80"===i.port&&(i.port=""),e.path=a.default.format(i),n.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`),r?(p("Creating `tls.Socket`: %o",n),c=s.default.connect(n)):(p("Creating `net.Socket`: %o",n),c=o.default.connect(n)),e._header){let t,n;p("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(p("Patching connection write() output buffer with updated header"),t=e.output[0],n=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(n),p("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(p("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,n=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(n),p("Output buffer: %o",e.outputData[0].data))}return yield(0,l.default)(c,"connect"),c}))}}t.default=d},65188:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(62484));function i(e){return new r.default(e)}!function(e){e.HttpProxyAgent=r.default,e.prototype=r.default.prototype}(i||(i={})),e.exports=i},23716:(e,t,n)=>{"use strict";n.r(t),n.d(t,{webSnippet:()=>r});var r='!function(T,l,y){var S=T.location,k="script",D="instrumentationKey",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&&(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&&S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&&(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;a{"use strict";n.d(t,{c:()=>h});var r=n(67037),i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},o=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},u=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i{"use strict";n.d(t,{G:()=>l});var r=n(77511),i=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}(n),!1))}var s=n(70339),a=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},c=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i=r?i.bind(t):function(){}}return es.n.ALL&&(e=s.n.ALL),t=t||{},{error:n("error",s.n.ERROR),warn:n("warn",s.n.WARN),info:n("info",s.n.INFO),debug:n("debug",s.n.DEBUG),verbose:n("verbose",s.n.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:s.n.INFO,e);if(l&&!n.suppressOverrideMessage){var p=null!==(a=(new Error).stack)&&void 0!==a?a:"";l.warn("Current logger will be overwritten from "+p),u.warn("Current logger will overwrite one already registered from "+p)}return(0,r.TG)("diag",u,t,!0)},t.disable=function(){(0,r.J_)("diag",t)},t.createComponentLogger=function(e){return new i(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}()},2554:(e,t,n)=>{"use strict";n.d(t,{u:()=>l,H:()=>c});var r=n(51724),i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=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){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}(e,2);return[t[0],t[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,r=[],o=0;o{"use strict";n.d(t,{D:()=>r});var r=n(6318).c.getInstance()},67037:(e,t,n)=>{"use strict";function r(e){return Symbol.for(e)}n.d(t,{I:()=>i,Y:()=>r});var i=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}}},70667:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});var r=n(51724).G.instance()},70339:(e,t,n)=>{"use strict";var r;n.d(t,{n:()=>r}),function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(r||(r={}))},60311:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DiagConsoleLogger:()=>c,DiagLogLevel:()=>l.n,INVALID_SPANID:()=>H.fQ,INVALID_SPAN_CONTEXT:()=>H.Rr,INVALID_TRACEID:()=>H.AE,ProxyTracer:()=>A.T,ProxyTracerProvider:()=>P.K,ROOT_CONTEXT:()=>s.I,SamplingDecision:()=>R.U,SpanKind:()=>N.M,SpanStatusCode:()=>O.Q,TraceFlags:()=>M.r,ValueType:()=>i,baggageEntryMetadataFromString:()=>o.u,context:()=>$.D,createContextKey:()=>s.Y,createNoopMeter:()=>I,createTraceState:()=>U,default:()=>Q,defaultTextMapGetter:()=>k.r,defaultTextMapSetter:()=>k.M,diag:()=>V.K,isSpanContextValid:()=>q.BM,isValidSpanId:()=>q.Lc,isValidTraceId:()=>q.jN,metrics:()=>X,propagation:()=>Y.u,trace:()=>Z.g});var r,i,o=n(2554),s=n(67037),a=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],c=function(){function e(e){return function(){for(var t=[],n=0;n512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var i=n.slice(0,r),o=n.slice(r+1,t.length);(function(e){return L.test(e)})(i)&&function(e){return F.test(e)&&!B.test(e)}(o)&&e.set(i,o)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();function U(e){return new j(e)}var q=n(43267),H=n(5529),$=n(43419),V=n(70667),z=new(function(){function e(){}return e.prototype.getMeter=function(e,t,n){return b},e}()),W=n(77511),G=n(51724),K="metrics",X=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return(0,W.TG)(K,e,G.G.instance())},e.prototype.getMeterProvider=function(){return(0,W.Rd)(K)||z},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){(0,W.J_)(K,G.G.instance())},e}().getInstance(),Y=n(41384),Z=n(68235);const Q={context:$.D,diag:V.K,metrics:X,propagation:Y.u,trace:Z.g}},77511:(e,t,n)=>{"use strict";n.d(t,{Rd:()=>p,TG:()=>u,J_:()=>d});var r="object"==typeof globalThis?globalThis:global,i="1.4.1",o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,s=function(e){var t=new Set([e]),n=new Set,r=e.match(o);if(!r)return function(){return!1};var i=+r[1],s=+r[2],a=+r[3];if(null!=r[4])return function(t){return t===e};function c(e){return n.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match(o);if(!r)return c(e);var u=+r[1],p=+r[2],d=+r[3];return null!=r[4]||i!==u?c(e):0===i?s===p&&a<=d?l(e):c(e):s<=p?l(e):c(e)}}(i),a=i.split(".")[0],c=Symbol.for("opentelemetry.js.api."+a),l=r;function u(e,t,n,r){var o;void 0===r&&(r=!1);var s=l[c]=null!==(o=l[c])&&void 0!==o?o:{version:i};if(!r&&s[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}return s.version!==i?(a=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+e+" does not match previously registered API v"+i),n.error(a.stack||a.message),!1):(s[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+i+"."),!0)}function p(e){var t,n,r=null===(t=l[c])||void 0===t?void 0:t.version;if(r&&s(r))return null===(n=l[c])||void 0===n?void 0:n[e]}function d(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+i+".");var n=l[c];n&&delete n[e]}},41384:(e,t,n)=>{"use strict";n.d(t,{u:()=>y});var r=n(77511),i=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),o=n(1521),s=n(6318),a=(0,n(67037).Y)("OpenTelemetry Baggage Key");function c(e){return e.getValue(a)||void 0}function l(){return c(s.c.getInstance().active())}function u(e,t){return e.setValue(a,t)}function p(e){return e.deleteValue(a)}var d=n(2554),h=n(51724),f="propagation",m=new i,g=function(){function e(){this.createBaggage=d.H,this.getBaggage=c,this.getActiveBaggage=l,this.setBaggage=u,this.deleteBaggage=p}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return(0,r.TG)(f,e,h.G.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=o.M),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=o.r),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){(0,r.J_)(f,h.G.instance())},e.prototype._getGlobalPropagator=function(){return(0,r.Rd)(f)||m},e}(),y=g.getInstance()},1521:(e,t,n)=>{"use strict";n.d(t,{M:()=>i,r:()=>r});var r={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},i={set:function(e,t,n){null!=e&&(e[t]=n)}}},68235:(e,t,n)=>{"use strict";n.d(t,{g:()=>l});var r=n(77511),i=n(6541),o=n(43267),s=n(20748),a=n(51724),c="trace",l=function(){function e(){this._proxyTracerProvider=new i.K,this.wrapSpanContext=o.kw,this.isSpanContextValid=o.BM,this.deleteSpan=s.TW,this.getSpan=s.Br,this.getActiveSpan=s.HN,this.getSpanContext=s.A3,this.setSpan=s.WZ,this.setSpanContext=s.G3}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=(0,r.TG)(c,this._proxyTracerProvider,a.G.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return(0,r.Rd)(c)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){(0,r.J_)(c,a.G.instance()),this._proxyTracerProvider=new i.K},e}().getInstance()},55575:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(5529),i=function(){function e(e){void 0===e&&(e=r.Rr),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}()},98730:(e,t,n)=>{"use strict";n.d(t,{E:()=>c});var r=n(6318),i=n(20748),o=n(55575),s=n(43267),a=r.c.getInstance(),c=function(){function e(){}return e.prototype.startSpan=function(e,t,n){if(void 0===n&&(n=a.active()),Boolean(null==t?void 0:t.root))return new o.s;var r,c=n&&(0,i.A3)(n);return"object"==typeof(r=c)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&(0,s.BM)(c)?new o.s(c):new o.s},e.prototype.startActiveSpan=function(e,t,n,r){var o,s,c;if(!(arguments.length<2)){2===arguments.length?c=t:3===arguments.length?(o=t,c=n):(o=t,s=n,c=r);var l=null!=s?s:a.active(),u=this.startSpan(e,o,l),p=(0,i.WZ)(l,u);return a.with(p,c,void 0,u)}},e}()},75403:(e,t,n)=>{"use strict";n.d(t,{T:()=>i});var r=new(n(98730).E),i=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}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,this.options);return e?(this._delegate=e,this._delegate):r},e}()},6541:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var r=n(75403),i=n(98730),o=new(function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new i.E},e}()),s=function(){function e(){}return e.prototype.getTracer=function(e,t,n){var i;return null!==(i=this.getDelegateTracer(e,t,n))&&void 0!==i?i:new r.T(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:o},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(e,t,n)},e}()},87504:(e,t,n)=>{"use strict";var r;n.d(t,{U:()=>r}),function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(r||(r={}))},20748:(e,t,n)=>{"use strict";n.d(t,{A3:()=>d,Br:()=>a,G3:()=>p,HN:()=>c,TW:()=>u,WZ:()=>l});var r=n(67037),i=n(55575),o=n(6318),s=(0,r.Y)("OpenTelemetry Context Key SPAN");function a(e){return e.getValue(s)||void 0}function c(){return a(o.c.getInstance().active())}function l(e,t){return e.setValue(s,t)}function u(e){return e.deleteValue(s)}function p(e,t){return l(e,new i.s(t))}function d(e){var t;return null===(t=a(e))||void 0===t?void 0:t.spanContext()}},5529:(e,t,n)=>{"use strict";n.d(t,{AE:()=>o,Rr:()=>s,fQ:()=>i});var r=n(81680),i="0000000000000000",o="00000000000000000000000000000000",s={traceId:o,spanId:i,traceFlags:r.r.NONE}},8716:(e,t,n)=>{"use strict";var r;n.d(t,{M:()=>r}),function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(r||(r={}))},43267:(e,t,n)=>{"use strict";n.d(t,{BM:()=>l,Lc:()=>c,jN:()=>a,kw:()=>u});var r=n(5529),i=n(55575),o=/^([0-9a-f]{32})$/i,s=/^[0-9a-f]{16}$/i;function a(e){return o.test(e)&&e!==r.AE}function c(e){return s.test(e)&&e!==r.fQ}function l(e){return a(e.traceId)&&c(e.spanId)}function u(e){return new i.s(e)}},62527:(e,t,n)=>{"use strict";var r;n.d(t,{Q:()=>r}),function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(r||(r={}))},81680:(e,t,n)=>{"use strict";var r;n.d(t,{r:()=>r}),function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(r||(r={}))},21180:(e,t,n)=>{"use strict";var r;n.d(t,{I:()=>r}),function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(r||(r={}))},73618:(e,t,n)=>{"use strict";n.d(t,{Cx:()=>a,H3:()=>l,Vo:()=>r,WM:()=>s,bO:()=>i,bU:()=>o,ef:()=>c});var r="=",i=";",o=",",s="baggage",a=180,c=4096,l=8192},71016:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var r=n(41384),i=n(64235),o=n(73618),s=n(49002),a=function(){function e(){}return e.prototype.inject=function(e,t,n){var a=r.u.getBaggage(e);if(a&&!(0,i.Ll)(e)){var c=(0,s.getKeyPairs)(a).filter((function(e){return e.length<=o.ef})).slice(0,o.Cx),l=(0,s.serializeKeyPairs)(c);l.length>0&&n.set(t,o.WM,l)}},e.prototype.extract=function(e,t,n){var i=n.get(t,o.WM),a=Array.isArray(i)?i.join(o.bU):i;if(!a)return e;var c={};return 0===a.length?e:(a.split(o.bU).forEach((function(e){var t=(0,s.parsePairKeyValue)(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),c[t.key]=n}})),0===Object.entries(c).length?e:r.u.setBaggage(e,r.u.createBaggage(c)))},e.prototype.fields=function(){return[o.WM]},e}()},49002:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getKeyPairs:()=>s,parseKeyPairsIntoRecord:()=>c,parsePairKeyValue:()=>a,serializeKeyPairs:()=>o});var r=n(2554),i=n(73618);function o(e){return e.reduce((function(e,t){var n=""+e+(""!==e?i.bU:"")+t;return n.length>i.H3?e:n}),"")}function s(e){return e.getAllEntries().map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}(e,2),n=t[0],r=t[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=i.bO+r.metadata.toString()),o}))}function a(e){var t=e.split(i.bO);if(!(t.length<=0)){var n=t.shift();if(n){var o=n.split(i.Vo);if(2===o.length){var s,a=decodeURIComponent(o[0].trim()),c=decodeURIComponent(o[1].trim());return t.length>0&&(s=(0,r.u)(t.join(i.bO))),{key:a,value:c,metadata:s}}}}}function c(e){return"string"!=typeof e||0===e.length?{}:e.split(i.bU).map((function(e){return a(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,e}),{})}},96541:(e,t,n)=>{"use strict";n.d(t,{Do:()=>c,FT:()=>s,sy:()=>a});var r=n(70667),i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};function s(e){var t,n,s={};if("object"!=typeof e||null==e)return s;try{for(var l=i(Object.entries(e)),u=l.next();!u.done;u=l.next()){var p=o(u.value,2),d=p[0],h=p[1];a(d)?c(h)?Array.isArray(h)?s[d]=h.slice():s[d]=h:r.K.warn("Invalid attribute value set for key: "+d):r.K.warn("Invalid attribute key: "+d)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return s}function a(e){return"string"==typeof e&&e.length>0}function c(e){return null==e||(Array.isArray(e)?function(e){var t,n,r;try{for(var o=i(e),s=o.next();!s.done;s=o.next()){var a=s.value;if(null!=a){if(!r){if(l(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!0}(e):l(e))}function l(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}},47491:(e,t,n)=>{"use strict";n.d(t,{L:()=>o,c:()=>i});var r=(0,n(3942).x)();function i(e){r=e}function o(e){try{r(e)}catch(e){}}},3942:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});var r=n(70667);function i(){return function(e){r.K.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},n=e;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var r=n[e];r&&(t[e]=String(r))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}},91357:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>m,J3:()=>u,Jt:()=>c,KO:()=>h,PW:()=>d,U:()=>a,Us:()=>p,X_:()=>g,aE:()=>l,i5:()=>s,ji:()=>f,vF:()=>y});var r=n(80456),i=Math.pow(10,6),o=Math.pow(10,9);function s(e){var t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*i)]}function a(){var e=r.t.timeOrigin;if("number"!=typeof e){var t=r.t;e=t.timing&&t.timing.fetchStart}return e}function c(e){return y(s(a()),s("number"==typeof e?e:r.t.now()))}function l(e){if(m(e))return e;if("number"==typeof e)return e=o&&(n[1]-=o,n[0]+=1),n}},47497:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlwaysOffSampler:()=>O,AlwaysOnSampler:()=>M,AnchoredClock:()=>i,BindOnceFuture:()=>Z.q,CompositePropagator:()=>x.Y,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>H.qG,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>H.KR,DEFAULT_ENVIRONMENT:()=>H.J9,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>H.Ys,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>H.VH,ExportResultCode:()=>l.I,ParentBasedSampler:()=>B,RPCType:()=>T,RandomIdGenerator:()=>_,SDK_INFO:()=>w.m,TRACE_PARENT_HEADER:()=>C.FX,TRACE_STATE_HEADER:()=>C.C3,TimeoutError:()=>W,TraceIdRatioBasedSampler:()=>j,TraceState:()=>q.n,TracesSamplerValues:()=>V.J,VERSION:()=>u.q,W3CBaggagePropagator:()=>r.a,W3CTraceContextPropagator:()=>C.jf,_globalThis:()=>h,addHrTimes:()=>c.vF,baggageUtils:()=>p,callWithTimeout:()=>G,deleteRPCMetadata:()=>A,getEnv:()=>d.d,getEnvWithoutDefaults:()=>H.vU,getRPCMetadata:()=>P,getTimeOrigin:()=>c.U,globalErrorHandler:()=>s.L,hexToBase64:()=>y,hrTime:()=>c.Jt,hrTimeDuration:()=>c.J3,hrTimeToMicroseconds:()=>c.ji,hrTimeToMilliseconds:()=>c.KO,hrTimeToNanoseconds:()=>c.PW,hrTimeToTimeStamp:()=>c.Us,internal:()=>J,isAttributeKey:()=>o.sy,isAttributeValue:()=>o.Do,isTimeInput:()=>c.X_,isTimeInputHrTime:()=>c.Dt,isTracingSuppressed:()=>U.Ll,isUrlIgnored:()=>X,isWrapped:()=>Y,loggingErrorHandler:()=>a.x,merge:()=>$.T,millisToHrTime:()=>c.i5,otperformance:()=>E.t,parseEnvironment:()=>H.Ds,parseTraceParent:()=>C.j_,sanitizeAttributes:()=>o.FT,setGlobalErrorHandler:()=>s.c,setRPCMetadata:()=>k,suppressTracing:()=>U.hE,timeInputToHrTime:()=>c.aE,unrefTimer:()=>S.g,unsuppressTracing:()=>U.yy,urlMatches:()=>K});var r=n(71016),i=function(){function e(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}return e.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},e}(),o=n(96541),s=n(47491),a=n(3942),c=n(91357),l=n(21180),u=n(18111),p=n(49002),d=n(41006),h="object"==typeof globalThis?globalThis:global;function f(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}var m=Buffer.alloc(8),g=Buffer.alloc(16);function y(e){var t;t=16===e.length?m:32===e.length?g:Buffer.alloc(e.length/2);for(var n=0,r=0;r>>0,4*t);for(t=0;t0);t++)t===e-1&&(v[e-1]=1);return v.toString("hex",0,e)}}var T,E=n(80456),w=n(14398),S=n(88243),x=n(68380),C=n(13096),I=(0,n(67037).Y)("OpenTelemetry SDK Context Key RPC_METADATA");function k(e,t){return e.setValue(I,t)}function A(e){return e.deleteValue(I)}function P(e){return e.getValue(I)}!function(e){e.HTTP="http"}(T||(T={}));var R,N=n(87504),O=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:N.U.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),M=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:N.U.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),D=n(68235),L=n(43267),F=n(81680),B=function(){function e(e){var t,n,r,i;this._root=e.root,this._root||((0,s.L)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new M),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new M,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new O,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new M,this._localParentNotSampled=null!==(i=e.localParentNotSampled)&&void 0!==i?i:new O}return e.prototype.shouldSample=function(e,t,n,r,i,o){var s=D.g.getSpanContext(e);return s&&(0,L.BM)(s)?s.isRemote?s.traceFlags&F.r.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,o):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,o):s.traceFlags&F.r.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,o):this._localParentNotSampled.shouldSample(e,t,n,r,i,o):this._root.shouldSample(e,t,n,r,i,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),j=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:(0,L.jN)(t)&&this._accumulate(t)=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n>>0}return t},e}(),U=n(64235),q=n(60658),H=n(22026),$=n(81929),V=n(88483),z=(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])},R(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),W=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return z(t,e),t}(Error);function G(e,t){var n,r=new Promise((function(e,r){n=setTimeout((function(){r(new W("Operation timed out."))}),t)}));return Promise.race([e,r]).then((function(e){return clearTimeout(n),e}),(function(e){throw clearTimeout(n),e}))}function K(e,t){return"string"==typeof t?e===t:!!e.match(t)}function X(e,t){var n,r;if(!t)return!1;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=i.next();!o.done;o=i.next())if(K(e,o.value))return!0}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}function Y(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}var Z=n(62663),Q=n(43419),J={_export:function(e,t){return new Promise((function(n){Q.D.with((0,U.hE)(Q.D.active()),(function(){e.export(t,(function(e){n(e)}))}))}))}}},41006:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var r=n(22037),i=n(22026);function o(){var e=(0,i.Ds)(process.env);return Object.assign({HOSTNAME:r.hostname()},i.J9,e)}},80456:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});var r=require("perf_hooks").performance},14398:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r,i=n(18111),o=n(65844),s=((r={})[o.R9.TELEMETRY_SDK_NAME]="opentelemetry",r[o.R9.PROCESS_RUNTIME_NAME]="node",r[o.R9.TELEMETRY_SDK_LANGUAGE]=o.Te.NODEJS,r[o.R9.TELEMETRY_SDK_VERSION]=i.q,r)},88243:(e,t,n)=>{"use strict";function r(e){e.unref()}n.d(t,{g:()=>r})},68380:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});var r=n(70667),i=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}return e.prototype.inject=function(e,t,n){var i,o;try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),a=s.next();!a.done;a=s.next()){var c=a.value;try{c.inject(e,t,n)}catch(e){r.K.warn("Failed to inject with "+c.constructor.name+". Err: "+e.message)}}}catch(e){i={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}},e.prototype.extract=function(e,t,n){return this._propagators.reduce((function(e,i){try{return i.extract(e,t,n)}catch(e){r.K.warn("Failed to inject with "+i.constructor.name+". Err: "+e.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}()},60658:(e,t,n)=>{"use strict";n.d(t,{n:()=>a});var r="[_0-9a-z-*/]",i=new RegExp("^(?:[a-z]"+r+"{0,255}|[a-z0-9]"+r+"{0,240}@[a-z]"+r+"{0,13})$"),o=/^[ -~]{0,255}[!-~]$/,s=/,|=/,a=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var a=n.slice(0,r),c=n.slice(r+1,t.length);(function(e){return i.test(e)})(a)&&function(e){return o.test(e)&&!s.test(e)}(c)&&e.set(a,c)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}()},13096:(e,t,n)=>{"use strict";n.d(t,{C3:()=>l,FX:()=>c,j_:()=>p,jf:()=>d});var r=n(68235),i=n(43267),o=n(81680),s=n(64235),a=n(60658),c="traceparent",l="tracestate",u=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function p(e){var t=u.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}var d=function(){function e(){}return e.prototype.inject=function(e,t,n){var a=r.g.getSpanContext(e);if(a&&!(0,s.Ll)(e)&&(0,i.BM)(a)){var u="00-"+a.traceId+"-"+a.spanId+"-0"+Number(a.traceFlags||o.r.NONE).toString(16);n.set(t,c,u),a.traceState&&n.set(t,l,a.traceState.serialize())}},e.prototype.extract=function(e,t,n){var i=n.get(t,c);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if("string"!=typeof o)return e;var s=p(o);if(!s)return e;s.isRemote=!0;var u=n.get(t,l);if(u){var d=Array.isArray(u)?u.join(","):u;s.traceState=new a.n("string"==typeof d?d:void 0)}return r.g.setSpanContext(e,s)},e.prototype.fields=function(){return[c,l]},e}()},64235:(e,t,n)=>{"use strict";n.d(t,{Ll:()=>s,hE:()=>i,yy:()=>o});var r=(0,n(67037).Y)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function i(e){return e.setValue(r,!0)}function o(e){return e.deleteValue(r)}function s(e){return!0===e.getValue(r)}},62663:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var r=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},o=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i{"use strict";n.d(t,{qG:()=>h,KR:()=>d,J9:()=>g,Ys:()=>f,VH:()=>m,vU:()=>w,Ds:()=>E});var r=n(70339),i=n(88483),o="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},s=["OTEL_SDK_DISABLED"];function a(e){return s.indexOf(e)>-1}var c=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function l(e){return c.indexOf(e)>-1}var u=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function p(e){return u.indexOf(e)>-1}var d=1/0,h=128,f=128,m=128,g={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:r.n.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:d,OTEL_ATTRIBUTE_COUNT_LIMIT:h,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:d,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:h,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:d,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:h,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:f,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:m,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:i.J.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function y(e,t,n){if(void 0!==n[e]){var r=String(n[e]);t[e]="true"===r.toLowerCase()}}function _(e,t,n,r,i){if(void 0===r&&(r=-1/0),void 0===i&&(i=1/0),void 0!==n[e]){var o=Number(n[e]);isNaN(o)||(t[e]=oi?i:o)}}function v(e,t,n,r){void 0===r&&(r=",");var i=n[e];"string"==typeof i&&(t[e]=i.split(r).map((function(e){return e.trim()})))}var b={ALL:r.n.ALL,VERBOSE:r.n.VERBOSE,DEBUG:r.n.DEBUG,INFO:r.n.INFO,WARN:r.n.WARN,ERROR:r.n.ERROR,NONE:r.n.NONE};function T(e,t,n){var r=n[e];if("string"==typeof r){var i=b[r.toUpperCase()];null!=i&&(t[e]=i)}}function E(e){var t={};for(var n in g){var r=n;if("OTEL_LOG_LEVEL"===r)T(r,t,e);else if(a(r))y(r,t,e);else if(l(r))_(r,t,e);else if(p(r))v(r,t,e);else{var i=e[r];null!=i&&(t[r]=String(i))}}return t}function w(){return"undefined"!=typeof process&&process&&process.env?E(process.env):E(o)}},81929:(e,t,n)=>{"use strict";n.d(t,{T:()=>h});var r,i,o=Function.prototype.toString,s=o.call(Object),a=(r=Object.getPrototypeOf,i=Object,function(e){return r(i(e))}),c=Object.prototype,l=c.hasOwnProperty,u=Symbol?Symbol.toStringTag:void 0,p=c.toString;function d(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=l.call(e,u),n=e[u],r=!1;try{e[u]=void 0,r=!0}catch(e){}var i=p.call(e);return r&&(t?e[u]=n:delete e[u]),i}(e):function(e){return p.call(e)}(e)}(e))return!1;var t=a(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&o.call(n)===s}function h(){for(var e=[],t=0;t0;)n=m(n,e.shift(),0,r);return n}function f(e){return y(e)?e.slice():e}function m(e,t,n,r){var i;if(void 0===n&&(n=0),!(n>20)){if(n++,b(e)||b(t)||_(t))i=f(t);else if(y(e)){if(i=e.slice(),y(t))for(var o=0,s=t.length;o{"use strict";var r;n.d(t,{J:()=>r}),function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(r||(r={}))},18111:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});var r="1.12.0"},29555:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AlwaysOffSampler:()=>T,AlwaysOnSampler:()=>E,BasicTracerProvider:()=>re,BatchSpanProcessor:()=>ne,ConsoleSpanExporter:()=>ie,ForceFlushState:()=>F,InMemorySpanExporter:()=>oe,NoopSpanProcessor:()=>Y,ParentBasedSampler:()=>x,RandomIdGenerator:()=>O,SamplingDecision:()=>r,SimpleSpanProcessor:()=>ae,Span:()=>_,TraceIdRatioBasedSampler:()=>C,Tracer:()=>B});var r,i=n(43419),o=n(68235),s=n(70667),a=n(5529),c=n(8716),l=n(87504),u=n(81680),p=n(64235),d=n(96541),h=n(62527),f=n(80456),m=n(91357),g=n(38543),y=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},_=function(){function e(e,t,n,r,i,o,s,a,c){void 0===s&&(s=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:h.Q.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=o,this.kind=i,this.links=s;var l=Date.now();this._performanceStartTime=f.t.now(),this._performanceOffset=l-(this._performanceStartTime+(0,m.U)()),this._startTimeProvided=null!=a,this.startTime=this._getTime(null!=a?a:l),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(s.K.warn("Invalid attribute key: "+e),this):(0,d.Do)(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(s.K.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,n;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),i=r.next();!i.done;i=r.next()){var o=y(i.value,2),s=o[0],a=o[1];this.setAttribute(s,a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return s.K.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(s.K.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,m.X_)(t)&&((0,m.X_)(n)||(n=t),t=void 0);var r=(0,d.FT)(t);return this.events.push({name:e,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?s.K.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(e),this._duration=(0,m.J3)(this.startTime,this.endTime),this._duration[0]<0&&(s.K.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this))},e.prototype._getTime=function(e){if("number"==typeof e&&e=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n>>0}return t},e}(),I=(0,v.d)(),k=b.J.AlwaysOn;function A(){return{sampler:P(I),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,v.d)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,v.d)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,v.d)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,v.d)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,v.d)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,v.d)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,v.d)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,v.d)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function P(e){switch(void 0===e&&(e=(0,v.d)()),e.OTEL_TRACES_SAMPLER){case b.J.AlwaysOn:return new E;case b.J.AlwaysOff:return new T;case b.J.ParentBasedAlwaysOn:return new x({root:new E});case b.J.ParentBasedAlwaysOff:return new x({root:new T});case b.J.TraceIdRatio:return new C(R(e));case b.J.ParentBasedTraceIdRatio:return new x({root:new C(R(e))});default:return s.K.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+k+'".'),new E}}function R(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return s.K.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(s.K.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(s.K.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}var N=n(22026),O=function(){this.generateTraceId=D(16),this.generateSpanId=D(8)},M=Buffer.allocUnsafe(16);function D(e){return function(){for(var t=0;t>>0,4*t);for(t=0;t0);t++)t===e-1&&(M[e-1]=1);return M.toString("hex",0,e)}}var L,F,B=function(){function e(e,t,n){this._tracerProvider=n;var r,i,o,s,a=(r=t,i={sampler:P()},o=A(),(s=Object.assign({},o,i,r)).generalLimits=Object.assign({},o.generalLimits,r.generalLimits||{}),s.spanLimits=Object.assign({},o.spanLimits,r.spanLimits||{}),s);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=t.idGenerator||new O,this.resource=n.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,n){var r,h,f;void 0===t&&(t={}),void 0===n&&(n=i.D.active()),t.root&&(n=o.g.deleteSpan(n));var m=o.g.getSpan(n);if((0,p.Ll)(n))return s.K.debug("Instrumentation suppressed, returning Noop Span"),o.g.wrapSpanContext(a.Rr);var g,y,v,b=null==m?void 0:m.spanContext(),T=this._idGenerator.generateSpanId();b&&o.g.isSpanContextValid(b)?(g=b.traceId,y=b.traceState,v=b.spanId):g=this._idGenerator.generateTraceId();var E=null!==(r=t.kind)&&void 0!==r?r:c.M.INTERNAL,w=(null!==(h=t.links)&&void 0!==h?h:[]).map((function(e){return{context:e.context,attributes:(0,d.FT)(e.attributes)}})),S=(0,d.FT)(t.attributes),x=this._sampler.shouldSample(n,g,e,E,S,w);y=null!==(f=x.traceState)&&void 0!==f?f:y;var C={traceId:g,spanId:T,traceFlags:x.decision===l.U.RECORD_AND_SAMPLED?u.r.SAMPLED:u.r.NONE,traceState:y};if(x.decision===l.U.NOT_RECORD)return s.K.debug("Recording is off, propagating context in a non-recording span"),o.g.wrapSpanContext(C);var I=new _(this,n,e,C,E,v,w,t.startTime),k=(0,d.FT)(Object.assign(S,x.attributes));return I.setAttributes(k),I},e.prototype.startActiveSpan=function(e,t,n,r){var s,a,c;if(!(arguments.length<2)){2===arguments.length?c=t:3===arguments.length?(s=t,c=n):(s=t,a=n,c=r);var l=null!=a?a:i.D.active(),u=this.startSpan(e,s,l),p=o.g.setSpan(l,u);return i.D.with(p,c,void 0,u)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),j=n(41384),U=n(81929),q=n(68380),H=n(13096),$=n(71016),V=n(65844),z=n(14398),W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}(e,2),o=i[0],s=i[1];return W(W(W(W({},r._syncAttributes),o),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),s)}));return new e(i,o)},e.EMPTY=new e({}),e}(),K=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},X=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,n=[];try{for(var r=K(this._spanProcessors),i=r.next();!i.done;i=r.next()){var o=i.value;n.push(o.forceFlush())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(n).then((function(){e()})).catch((function(t){(0,S.L)(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var n,r;try{for(var i=K(this._spanProcessors),o=i.next();!o.done;o=i.next())o.value.onStart(e,t)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(e){var t,n;try{for(var r=K(this._spanProcessors),i=r.next();!i.done;i=r.next())i.value.onEnd(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,n=[];try{for(var r=K(this._spanProcessors),i=r.next();!i.done;i=r.next()){var o=i.value;n.push(o.shutdown())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(n).then((function(){e()}),t)}))},e}(),Y=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),Z=n(62663),Q=n(21180),J=n(88243),ee=function(){function e(e,t){this._exporter=e,this._finishedSpans=[],this._droppedSpansCount=0;var n=(0,v.d)();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Z.q(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(s.K.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||0!=(e.spanContext().traceFlags&u.r.SAMPLED)&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&s.K.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(s.K.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var r=[],i=0,o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);i0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(e){(0,S.L)(e)}))}),this._scheduledDelayMillis),(0,J.g)(this._timer))},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),te=(L=function(e,t){return L=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])},L(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}L(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return te(t,e),t.prototype.onShutdown=function(){},t}(ee);!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(F||(F={}));var re=function(){function e(e){var t;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=(0,U.T)({},A(),function(e){var t,n,r,i,o,s,a,c,l,u,p,d,h=Object.assign({},e.spanLimits),f=(0,N.vU)();return h.attributeCountLimit=null!==(s=null!==(o=null!==(i=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(r=e.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==i?i:f.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==o?o:f.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==s?s:N.qG,h.attributeValueLengthLimit=null!==(d=null!==(p=null!==(u=null!==(c=null===(a=e.spanLimits)||void 0===a?void 0:a.attributeValueLengthLimit)&&void 0!==c?c:null===(l=e.generalLimits)||void 0===l?void 0:l.attributeValueLengthLimit)&&void 0!==u?u:f.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:f.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:N.KR,Object.assign({},e,{spanLimits:h})}(e));this.resource=null!==(t=n.resource)&&void 0!==t?t:G.empty(),this.resource=G.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var i=new ne(r);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Y}return e.prototype.getTracer=function(e,t,n){var r=e+"@"+(t||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new B({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return s.K.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new X(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),o.g.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&i.D.setGlobalContextManager(e.contextManager),e.propagator&&j.u.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var r,i=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+e+" ms")),r=F.timeout}),e);t.forceFlush().then((function(){clearTimeout(i),r!==F.timeout&&(r=F.resolved,n(r))})).catch((function(e){clearTimeout(i),r=F.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var r=t.filter((function(e){return e!==F.resolved}));r.length>0?n(r):e()})).catch((function(e){return n([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set((0,v.d)().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||s.K.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new q.Y({propagators:n})},e.prototype._buildExporterFromEnv=function(){var e=(0,v.d)().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||s.K.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new H.jf}],["baggage",function(){return new $.a}]]),e._registeredExporters=new Map,e}(),ie=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),Promise.resolve()},e.prototype._exportInfo=function(e){var t;return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:null===(t=e.spanContext().traceState)||void 0===t?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,m.ji)(e.startTime),duration:(0,m.ji)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var n,r;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var s=o.value;console.dir(this._exportInfo(s),{depth:3})}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}if(t)return t({code:Q.I.SUCCESS})},e}(),oe=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var n;if(this._stopped)return t({code:Q.I.FAILED,error:new Error("Exporter has been stopped")});(n=this._finishedSpans).push.apply(n,function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}(e),!1)),setTimeout((function(){return t({code:Q.I.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),se=n(47497),ae=function(){function e(e){this._exporter=e,this._shutdownOnce=new Z.q(this._shutdown,this),this._unresolvedExports=new Set}return e.prototype.forceFlush=function(){return e=this,t=void 0,r=function(){return function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";n.r(t),n.d(t,{AwsEcsLaunchtypeValues:()=>i._t,CloudPlatformValues:()=>i.CY,CloudProviderValues:()=>i.LH,DbCassandraConsistencyLevelValues:()=>r.xM,DbSystemValues:()=>r.fL,FaasDocumentOperationValues:()=>r.ZI,FaasInvokedProviderValues:()=>r.o0,FaasTriggerValues:()=>r.iD,HostArchValues:()=>i.IV,HttpFlavorValues:()=>r.Yi,MessageTypeValues:()=>r._J,MessagingDestinationKindValues:()=>r.y8,MessagingOperationValues:()=>r.jU,NetHostConnectionSubtypeValues:()=>r.oP,NetHostConnectionTypeValues:()=>r.ZM,NetTransportValues:()=>r.Di,OsTypeValues:()=>i.er,RpcGrpcStatusCodeValues:()=>r.yG,SemanticAttributes:()=>r.og,SemanticResourceAttributes:()=>i.R9,TelemetrySdkLanguageValues:()=>i.Te});var r=n(38543),i=n(65844)},65844:(e,t,n)=>{"use strict";n.d(t,{CY:()=>o,IV:()=>a,LH:()=>i,R9:()=>r,Te:()=>l,_t:()=>s,er:()=>c});var r={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"},i={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},o={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"},s={EC2:"ec2",FARGATE:"fargate"},a={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"},c={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"},l={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}},38543:(e,t,n)=>{"use strict";n.d(t,{Di:()=>l,Yi:()=>d,ZI:()=>a,ZM:()=>u,_J:()=>g,fL:()=>i,iD:()=>s,jU:()=>f,o0:()=>c,oP:()=>p,og:()=>r,xM:()=>o,y8:()=>h,yG:()=>m});var r={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"},i={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"},o={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"},s={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"},a={INSERT:"insert",EDIT:"edit",DELETE:"delete"},c={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},l={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"},u={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"},p={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"},d={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"},h={QUEUE:"queue",TOPIC:"topic"},f={RECEIVE:"receive",PROCESS:"process"},m={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16},g={SENT:"SENT",RECEIVED:"RECEIVED"}},11240:(e,t,n)=>{const r=n(95687),i=n(60325);if("darwin"!==process.platform)e.exports.all=()=>[],e.exports.each=()=>{};else{const t=n(32081),o=/(?=-----BEGIN\sCERTIFICATE-----)/g,s="/System/Library/Keychains/SystemRootCertificates.keychain",a=["find-certificate","-a","-p"],c=t.spawnSync("/usr/bin/security",a).stdout.toString().split(o),l=t.spawnSync("/usr/bin/security",a.concat(s)).stdout.toString().split(o);r.globalAgent.options.ca=r.globalAgent.options.ca||[];const u=r.globalAgent.options.ca,p=c.concat(l);p.filter((function(e,t,n){return n.indexOf(e)===t})).forEach((e=>u.push(e))),e.exports.der2=i.validFormats,e.exports.all=function(e){return p.map(i.transform(e)).filter((e=>e))},e.exports.each=function(e,t){return"function"==typeof e&&(t=e,e=void 0),p.map(i.transform(e)).filter((e=>e)).forEach(t)}}},60325:(e,t,n)=>{const r=n(35758),i=n(84821);var o=e.exports.validFormats={der:0,pem:1,txt:2,asn1:3};function s(e){const t=r.pki.pemToDer(e),n=r.asn1,i=n.fromDer(t.data.toString("binary")).value[0].value,o=i[0],s=o.tagClass===n.Class.CONTEXT_SPECIFIC&&0===o.type&&o.constructed,a=i.slice(s);return{serial:a[0],issuer:a[2],valid:a[3],subject:a[4]}}e.exports.transform=function(e){return function(t){try{switch(e){case o.der:return r.pki.pemToDer(t);case o.pem:return t;case o.txt:return function(e){const t=s(e),n=new Date,r=t.subject.value.map((e=>e.value[0].value[1].value)).join("/"),o=t.valid.value.map((e=>e.value)).join(" - "),a=n.toTimeString().replace(/\s*\(.*\)\s*/,"");return[`Subject\t${r}`,`Valid\t${o}`,`Saved\t${n.toLocaleDateString()} ${a} by ${i.name}@${i.version}`,String(e)].join("\n")}(t);case o.asn1:return s(t);default:return r.pki.certificateFromPem(t)}}catch(e){return}}}},53454:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeCompiler=t.TypeCompilerTypeGuardError=t.TypeCompilerDereferenceError=t.TypeCompilerUnknownTypeError=t.TypeCheck=void 0;const r=n(2100),i=n(892),o=n(99026),s=n(98050),a=n(34162);class c{constructor(e,t,n,r){this.schema=e,this.references=t,this.checkFunc=n,this.code=r}Code(){return this.code}Errors(e){return o.Errors(this.schema,this.references,e)}Check(e){return this.checkFunc(e)}}var l,u,p,d;t.TypeCheck=c,function(e){e.DollarSign=function(e){return 36===e},e.IsUnderscore=function(e){return 95===e},e.IsAlpha=function(e){return e>=65&&e<=90||e>=97&&e<=122},e.IsNumeric=function(e){return e>=48&&e<=57}}(l||(l={})),function(e){e.Encode=function(e,t){return function(e){if(function(e){return 0!==e.length&&l.IsNumeric(e.charCodeAt(0))}(e))return!1;for(let t=0;t= ${e.minItems}`),a.IsNumber(e.maxItems)&&(yield`${n}.length <= ${e.maxItems}`);const s=d(e.items,t,"value");if(yield`${n}.every((${r}) => ${s})`,i.TypeGuard.TSchema(e.contains)||a.IsNumber(e.minContains)||a.IsNumber(e.maxContains)){const s=`const count = ${n}.reduce((${o}, ${r}) => ${d(i.TypeGuard.TSchema(e.contains)?e.contains:i.Type.Never(),t,"value")} ? acc + 1 : acc, 0)`,c=["(count > 0)",...a.IsNumber(e.minContains)?[`(count >= ${e.minContains})`]:[],...a.IsNumber(e.maxContains)?[`(count <= ${e.maxContains})`]:[]].join(" && ");yield`((${r}) => { ${s}; return ${c}})(${n})`}if(!0===e.uniqueItems){const e="const set = new Set(); for(const element of value) { const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true }";yield`((${r}) => { ${e} )(${n})`}}(b,m,c);case"AsyncIterator":return yield*function*(e,t,n){yield`(typeof value === 'object' && Symbol.asyncIterator in ${n})`}(0,0,c);case"BigInt":return yield*function*(e,t,n){yield`(typeof ${n} === 'bigint')`,a.IsBigInt(e.multipleOf)&&(yield`(${n} % BigInt(${e.multipleOf})) === 0`),a.IsBigInt(e.exclusiveMinimum)&&(yield`${n} > BigInt(${e.exclusiveMinimum})`),a.IsBigInt(e.exclusiveMaximum)&&(yield`${n} < BigInt(${e.exclusiveMaximum})`),a.IsBigInt(e.minimum)&&(yield`${n} >= BigInt(${e.minimum})`),a.IsBigInt(e.maximum)&&(yield`${n} <= BigInt(${e.maximum})`)}(b,0,c);case"Boolean":return yield*function*(e,t,n){yield`(typeof ${n} === 'boolean')`}(0,0,c);case"Constructor":return yield*function*(e,t,n){yield*o(e.returns,t,`${n}.prototype`)}(b,m,c);case"Date":return yield*function*(e,t,n){yield`(${n} instanceof Date) && Number.isFinite(${n}.getTime())`,a.IsNumber(e.exclusiveMinimumTimestamp)&&(yield`${n}.getTime() > ${e.exclusiveMinimumTimestamp}`),a.IsNumber(e.exclusiveMaximumTimestamp)&&(yield`${n}.getTime() < ${e.exclusiveMaximumTimestamp}`),a.IsNumber(e.minimumTimestamp)&&(yield`${n}.getTime() >= ${e.minimumTimestamp}`),a.IsNumber(e.maximumTimestamp)&&(yield`${n}.getTime() <= ${e.maximumTimestamp}`)}(b,0,c);case"Function":return yield*function*(e,t,n){yield`(typeof ${n} === 'function')`}(0,0,c);case"Integer":return yield*function*(e,t,n){yield`(typeof ${n} === 'number' && Number.isInteger(${n}))`,a.IsNumber(e.multipleOf)&&(yield`(${n} % ${e.multipleOf}) === 0`),a.IsNumber(e.exclusiveMinimum)&&(yield`${n} > ${e.exclusiveMinimum}`),a.IsNumber(e.exclusiveMaximum)&&(yield`${n} < ${e.exclusiveMaximum}`),a.IsNumber(e.minimum)&&(yield`${n} >= ${e.minimum}`),a.IsNumber(e.maximum)&&(yield`${n} <= ${e.maximum}`)}(b,0,c);case"Intersect":return yield*function*(e,t,n){const r=e.allOf.map((e=>d(e,t,n))).join(" && ");if(!1===e.unevaluatedProperties){const t=y(`${new RegExp(i.KeyResolver.ResolvePattern(e))};`),o=`Object.getOwnPropertyNames(${n}).every(key => ${t}.test(key))`;yield`(${r} && ${o})`}else if(i.TypeGuard.TSchema(e.unevaluatedProperties)){const o=y(`${new RegExp(i.KeyResolver.ResolvePattern(e))};`),s=`Object.getOwnPropertyNames(${n}).every(key => ${o}.test(key) || ${d(e.unevaluatedProperties,t,`${n}[key]`)})`;yield`(${r} && ${s})`}else yield`(${r})`}(b,m,c);case"Iterator":return yield*function*(e,t,n){yield`(typeof value === 'object' && Symbol.iterator in ${n})`}(0,0,c);case"Literal":return yield*function*(e,t,n){"number"==typeof e.const||"boolean"==typeof e.const?yield`(${n} === ${e.const})`:yield`(${n} === '${e.const}')`}(b,0,c);case"Never":return yield*function*(e,t,n){yield"false"}();case"Not":return yield*function*(e,t,n){const r=d(e.not,t,n);yield`(!${r})`}(b,m,c);case"Null":return yield*function*(e,t,n){yield`(${n} === null)`}(0,0,c);case"Number":return yield*function*(e,t,n){yield function(e){return r.TypeSystem.AllowNaN?`typeof ${e} === 'number'`:`(typeof ${e} === 'number' && Number.isFinite(${e}))`}(n),a.IsNumber(e.multipleOf)&&(yield`(${n} % ${e.multipleOf}) === 0`),a.IsNumber(e.exclusiveMinimum)&&(yield`${n} > ${e.exclusiveMinimum}`),a.IsNumber(e.exclusiveMaximum)&&(yield`${n} < ${e.exclusiveMaximum}`),a.IsNumber(e.minimum)&&(yield`${n} >= ${e.minimum}`),a.IsNumber(e.maximum)&&(yield`${n} <= ${e.maximum}`)}(b,0,c);case"Object":return yield*function*(e,s,c){yield function(e){return r.TypeSystem.AllowArrayObjects?`(typeof ${e} === 'object' && ${e} !== null)`:`(typeof ${e} === 'object' && ${e} !== null && !Array.isArray(${e}))`}(c),a.IsNumber(e.minProperties)&&(yield`Object.getOwnPropertyNames(${c}).length >= ${e.minProperties}`),a.IsNumber(e.maxProperties)&&(yield`Object.getOwnPropertyNames(${c}).length <= ${e.maxProperties}`);const l=Object.getOwnPropertyNames(e.properties);for(const r of l){const a=u.Encode(c,r),l=e.properties[r];if(e.required&&e.required.includes(r))yield*o(l,s,a),(i.ExtendsUndefined.Check(l)||t(l))&&(yield`('${r}' in ${c})`);else{const e=d(l,s,a);yield n(c,r,e)}}if(!1===e.additionalProperties)if(e.required&&e.required.length===l.length)yield`Object.getOwnPropertyNames(${c}).length === ${l.length}`;else{const e=`[${l.map((e=>`'${e}'`)).join(", ")}]`;yield`Object.getOwnPropertyNames(${c}).every(key => ${e}.includes(key))`}if("object"==typeof e.additionalProperties){const t=d(e.additionalProperties,s,`${c}[key]`),n=`[${l.map((e=>`'${e}'`)).join(", ")}]`;yield`(Object.getOwnPropertyNames(${c}).every(key => ${n}.includes(key) || ${t}))`}}(b,m,c);case"Promise":return yield*function*(e,t,n){yield`(typeof value === 'object' && typeof ${n}.then === 'function')`}(0,0,c);case"Record":return yield*function*(e,t,n){yield function(e){return r.TypeSystem.AllowArrayObjects?`(typeof ${e} === 'object' && ${e} !== null && !(${e} instanceof Date) && !(${e} instanceof Uint8Array))`:`(typeof ${e} === 'object' && ${e} !== null && !Array.isArray(${e}) && !(${e} instanceof Date) && !(${e} instanceof Uint8Array))`}(n),a.IsNumber(e.minProperties)&&(yield`Object.getOwnPropertyNames(${n}).length >= ${e.minProperties}`),a.IsNumber(e.maxProperties)&&(yield`Object.getOwnPropertyNames(${n}).length <= ${e.maxProperties}`);const[o,s]=Object.entries(e.patternProperties)[0],c=`(${y(`new RegExp(/${o}/)`)}.test(key) ? ${d(s,t,"value")} : ${i.TypeGuard.TSchema(e.additionalProperties)?d(e.additionalProperties,t,n):!1===e.additionalProperties?"false":"true"})`;yield`(Object.entries(${n}).every(([key, value]) => ${c}))`}(b,m,c);case"Ref":return yield*function*(e,t,n){const r=t.findIndex((t=>t.$id===e.$ref));if(-1===r)throw new f(e);const i=t[r];if(l.functions.has(e.$ref))return yield`${g(e.$ref)}(${n})`;yield*o(i,t,n)}(b,m,c);case"String":return yield*function*(e,t,n){if(yield`(typeof ${n} === 'string')`,a.IsNumber(e.minLength)&&(yield`${n}.length >= ${e.minLength}`),a.IsNumber(e.maxLength)&&(yield`${n}.length <= ${e.maxLength}`),void 0!==e.pattern){const t=y(`${new RegExp(e.pattern)};`);yield`${t}.test(${n})`}void 0!==e.format&&(yield`format('${e.format}', ${n})`)}(b,0,c);case"Symbol":return yield*function*(e,t,n){yield`(typeof ${n} === 'symbol')`}(0,0,c);case"TemplateLiteral":return yield*function*(e,t,n){yield`(typeof ${n} === 'string')`;const r=y(`${new RegExp(e.pattern)};`);yield`${r}.test(${n})`}(b,0,c);case"This":return yield*function*(e,t,n){const r=g(e.$ref);yield`${r}(${n})`}(b,0,c);case"Tuple":return yield*function*(e,t,n){if(yield`Array.isArray(${n})`,void 0===e.items)return yield`${n}.length === 0`;yield`(${n}.length === ${e.maxItems})`;for(let r=0;rd(e,t,n)));yield`(${r.join(" || ")})`}(b,m,c);case"Uint8Array":return yield*function*(e,t,n){yield`${n} instanceof Uint8Array`,a.IsNumber(e.maxByteLength)&&(yield`(${n}.length <= ${e.maxByteLength})`),a.IsNumber(e.minByteLength)&&(yield`(${n}.length >= ${e.minByteLength})`)}(b,0,c);case"Void":return yield*function*(e,t,n){yield function(e){return r.TypeSystem.AllowVoidNull?`(${e} === undefined || ${e} === null)`:`${e} === undefined`}(n)}(0,0,c);default:if(!i.TypeRegistry.Has(b[i.Kind]))throw new h(e);return yield*function*(e,t,n){yield`kind('${e[i.Kind]}', ${n})`}(b,0,c)}}const l={language:"javascript",functions:new Map,variables:new Map};function d(e,t,n,r=!0){return`(${[...o(e,t,n,r)].join(" && ")})`}function g(e){return`check_${p.Encode(e)}`}function y(e){const t=`local_${l.variables.size}`;return l.variables.set(t,`const ${t} = ${e}`),t}function _(e,t,n,r,i=!0){const[s,a]=["\n",e=>"".padStart(e," ")],c=v("value","any"),l=b("boolean"),u=[...o(t,n,r,i)].map((e=>`${a(4)}${e}`)).join(` &&${s}`);return`function ${e}(${c})${l} {${s}${a(2)}return (${s}${u}${s}${a(2)})\n}`}function v(e,t){return`${e}${"typescript"===l.language?`: ${t}`:""}`}function b(e){return"typescript"===l.language?`: ${e}`:""}function T(...e){const t={language:"javascript"},[n,r,o]=2===e.length&&a.IsArray(e[1])?[e[0],e[1],t]:2!==e.length||a.IsArray(e[1])?3===e.length?[e[0],e[1],e[2]]:1===e.length?[e[0],[],t]:[null,[],t]:[e[0],[],e[1]];if(l.language=o.language,l.variables.clear(),l.functions.clear(),!i.TypeGuard.TSchema(n))throw new m(n);for(const e of r)if(!i.TypeGuard.TSchema(e))throw new m(e);return function(e,t,n){const r=_("check",e,t,"value"),i=v("value","any"),o=b("boolean"),s=[...l.functions.values()];return[...l.variables.values(),...s,a.IsString(e.$id)?`return function check(${i})${o} {\n return ${g(e.$id)}(value)\n}`:`return ${r}`].join("\n")}(n,r)}e.Code=T,e.Compile=function(e,t=[]){const n=T(e,t,{language:"javascript"}),r=globalThis.Function("kind","format","hash",n)((function(t,n){return!!i.TypeRegistry.Has(t)&&i.TypeRegistry.Get(t)(e,n)}),(function(e,t){return!!i.FormatRegistry.Has(e)&&i.FormatRegistry.Get(e)(t)}),(function(e){return s.Hash(e)}));return new c(e,t,r,n)}}(d||(t.TypeCompiler=d={}))},68736: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.ValueErrorType=void 0;var o=n(99026);Object.defineProperty(t,"ValueErrorType",{enumerable:!0,get:function(){return o.ValueErrorType}}),i(n(53454),t)},11287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Errors=t.ValueErrorsDereferenceError=t.ValueErrorsUnknownTypeError=t.ValueErrorIterator=t.ValueErrorType=void 0;const r=n(2100),i=n(892),o=n(98050),s=n(34162);var a;!function(e){e[e.Array=0]="Array",e[e.ArrayMinItems=1]="ArrayMinItems",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayContains=3]="ArrayContains",e[e.ArrayMinContains=4]="ArrayMinContains",e[e.ArrayMaxContains=5]="ArrayMaxContains",e[e.ArrayUniqueItems=6]="ArrayUniqueItems",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigInt=8]="BigInt",e[e.BigIntMultipleOf=9]="BigIntMultipleOf",e[e.BigIntExclusiveMinimum=10]="BigIntExclusiveMinimum",e[e.BigIntExclusiveMaximum=11]="BigIntExclusiveMaximum",e[e.BigIntMinimum=12]="BigIntMinimum",e[e.BigIntMaximum=13]="BigIntMaximum",e[e.Boolean=14]="Boolean",e[e.Date=15]="Date",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateExclusiveMaximumTimestamp=17]="DateExclusiveMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMaximumTimestamp=19]="DateMaximumTimestamp",e[e.Function=20]="Function",e[e.Integer=21]="Integer",e[e.IntegerMultipleOf=22]="IntegerMultipleOf",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerExclusiveMaximum=24]="IntegerExclusiveMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMaximum=26]="IntegerMaximum",e[e.Intersect=27]="Intersect",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Iterator=29]="Iterator",e[e.Literal=30]="Literal",e[e.Never=31]="Never",e[e.Not=32]="Not",e[e.Null=33]="Null",e[e.Number=34]="Number",e[e.NumberMultipleOf=35]="NumberMultipleOf",e[e.NumberExclusiveMinimum=36]="NumberExclusiveMinimum",e[e.NumberExclusiveMaximum=37]="NumberExclusiveMaximum",e[e.NumberMinimum=38]="NumberMinimum",e[e.NumberMaximum=39]="NumberMaximum",e[e.Object=40]="Object",e[e.ObjectMinProperties=41]="ObjectMinProperties",e[e.ObjectMaxProperties=42]="ObjectMaxProperties",e[e.ObjectAdditionalProperties=43]="ObjectAdditionalProperties",e[e.ObjectRequiredProperties=44]="ObjectRequiredProperties",e[e.Promise=45]="Promise",e[e.RecordKeyNumeric=46]="RecordKeyNumeric",e[e.RecordKeyString=47]="RecordKeyString",e[e.String=48]="String",e[e.StringMinLength=49]="StringMinLength",e[e.StringMaxLength=50]="StringMaxLength",e[e.StringPattern=51]="StringPattern",e[e.StringFormatUnknown=52]="StringFormatUnknown",e[e.StringFormat=53]="StringFormat",e[e.Symbol=54]="Symbol",e[e.TupleZeroLength=55]="TupleZeroLength",e[e.TupleLength=56]="TupleLength",e[e.Undefined=57]="Undefined",e[e.Union=58]="Union",e[e.Uint8Array=59]="Uint8Array",e[e.Uint8ArrayMinByteLength=60]="Uint8ArrayMinByteLength",e[e.Uint8ArrayMaxByteLength=61]="Uint8ArrayMaxByteLength",e[e.Void=62]="Void",e[e.Kind=63]="Kind"}(a||(t.ValueErrorType=a={}));class c{constructor(e){this.iterator=e}[Symbol.iterator](){return this.iterator}First(){const e=this.iterator.next();return e.done?void 0:e.value}}t.ValueErrorIterator=c;class l extends Error{constructor(e){super("ValueErrors: Unknown type"),this.schema=e}}t.ValueErrorsUnknownTypeError=l;class u extends Error{constructor(e){super(`ValueErrors: Unable to dereference type with $id '${e.$ref}'`),this.schema=e}}function p(e){return void 0!==e}function d(e,t){return r.TypeSystem.ExactOptionalPropertyTypes?t in e:void 0!==e[t]}function h(e){const t=s.IsObject(e);return r.TypeSystem.AllowArrayObjects?t:t&&!s.IsArray(e)}function f(e){const t=s.IsNumber(e);return r.TypeSystem.AllowNaN?t:t&&Number.isFinite(e)}function*m(e,t,n,c){const g=p(e.$id)?[...t,e]:t,y=e;switch(y[i.Kind]){case"Any":case"Unknown":return yield*function*(e,t,n,r){}();case"Array":return yield*function*(e,t,n,r){if(!s.IsArray(r))return yield{type:a.Array,schema:e,path:n,value:r,message:"Expected array"};!p(e.minItems)||r.length>=e.minItems||(yield{type:a.ArrayMinItems,schema:e,path:n,value:r,message:`Expected array length to be greater or equal to ${e.minItems}`}),!p(e.maxItems)||r.length<=e.maxItems||(yield{type:a.ArrayMinItems,schema:e,path:n,value:r,message:`Expected array length to be less or equal to ${e.maxItems}`});for(let i=0;i!0===m(c,t,`${n}${i}`,r).next().done?e+1:e),0);0===l&&(yield{type:a.ArrayContains,schema:e,path:n,value:r,message:"Expected array to contain at least one matching type"}),s.IsNumber(e.minContains)&&le.maxContains&&(yield{type:a.ArrayMaxContains,schema:e,path:n,value:r,message:`Expected array to contain no more than ${e.maxContains} matching types`})}(y,g,n,c);case"AsyncIterator":return yield*function*(e,t,n,r){s.IsAsyncIterator(r)||(yield{type:a.AsyncIterator,schema:e,path:n,value:r,message:"Expected value to be an async iterator"})}(y,0,n,c);case"BigInt":return yield*function*(e,t,n,r){if(!s.IsBigInt(r))return yield{type:a.BigInt,schema:e,path:n,value:r,message:"Expected bigint"};p(e.multipleOf)&&r%e.multipleOf!==BigInt(0)&&(yield{type:a.BigIntMultipleOf,schema:e,path:n,value:r,message:`Expected bigint to be a multiple of ${e.multipleOf}`}),!p(e.exclusiveMinimum)||r>e.exclusiveMinimum||(yield{type:a.BigIntExclusiveMinimum,schema:e,path:n,value:r,message:`Expected bigint to be greater than ${e.exclusiveMinimum}`}),!p(e.exclusiveMaximum)||r=e.minimum||(yield{type:a.BigIntMinimum,schema:e,path:n,value:r,message:`Expected bigint to be greater or equal to ${e.minimum}`}),!p(e.maximum)||r<=e.maximum||(yield{type:a.BigIntMaximum,schema:e,path:n,value:r,message:`Expected bigint to be less or equal to ${e.maximum}`})}(y,0,n,c);case"Boolean":return yield*function*(e,t,n,r){if(!s.IsBoolean(r))return yield{type:a.Boolean,schema:e,path:n,value:r,message:"Expected boolean"}}(y,0,n,c);case"Constructor":return yield*function*(e,t,n,r){yield*m(e.returns,t,n,r.prototype)}(y,g,n,c);case"Date":return yield*function*(e,t,n,r){return s.IsDate(r)?isFinite(r.getTime())?(!p(e.exclusiveMinimumTimestamp)||r.getTime()>e.exclusiveMinimumTimestamp||(yield{type:a.DateExclusiveMinimumTimestamp,schema:e,path:n,value:r,message:`Expected Date timestamp to be greater than ${e.exclusiveMinimum}`}),!p(e.exclusiveMaximumTimestamp)||r.getTime()=e.minimumTimestamp||(yield{type:a.DateMinimumTimestamp,schema:e,path:n,value:r,message:`Expected Date timestamp to be greater or equal to ${e.minimum}`}),void(!p(e.maximumTimestamp)||r.getTime()<=e.maximumTimestamp||(yield{type:a.DateMaximumTimestamp,schema:e,path:n,value:r,message:`Expected Date timestamp to be less or equal to ${e.maximum}`}))):yield{type:a.Date,schema:e,path:n,value:r,message:"Invalid Date"}:yield{type:a.Date,schema:e,path:n,value:r,message:"Expected Date object"}}(y,0,n,c);case"Function":return yield*function*(e,t,n,r){if(!s.IsFunction(r))return yield{type:a.Function,schema:e,path:n,value:r,message:"Expected function"}}(y,0,n,c);case"Integer":return yield*function*(e,t,n,r){if(!s.IsInteger(r))return yield{type:a.Integer,schema:e,path:n,value:r,message:"Expected integer"};p(e.multipleOf)&&r%e.multipleOf!=0&&(yield{type:a.IntegerMultipleOf,schema:e,path:n,value:r,message:`Expected integer to be a multiple of ${e.multipleOf}`}),!p(e.exclusiveMinimum)||r>e.exclusiveMinimum||(yield{type:a.IntegerExclusiveMinimum,schema:e,path:n,value:r,message:`Expected integer to be greater than ${e.exclusiveMinimum}`}),!p(e.exclusiveMaximum)||r=e.minimum||(yield{type:a.IntegerMinimum,schema:e,path:n,value:r,message:`Expected integer to be greater or equal to ${e.minimum}`}),!p(e.maximum)||r<=e.maximum||(yield{type:a.IntegerMaximum,schema:e,path:n,value:r,message:`Expected integer to be less or equal to ${e.maximum}`})}(y,0,n,c);case"Intersect":return yield*function*(e,t,n,r){for(const i of e.allOf){const o=m(i,t,n,r).next();if(!o.done)return yield o.value,void(yield{type:a.Intersect,schema:e,path:n,value:r,message:"Expected all sub schemas to be valid"})}if(!1===e.unevaluatedProperties){const t=new RegExp(i.KeyResolver.ResolvePattern(e));for(const i of Object.getOwnPropertyNames(r))t.test(i)||(yield{type:a.IntersectUnevaluatedProperties,schema:e,path:`${n}/${i}`,value:r,message:"Unexpected property"})}if("object"==typeof e.unevaluatedProperties){const o=new RegExp(i.KeyResolver.ResolvePattern(e));for(const i of Object.getOwnPropertyNames(r))if(!o.test(i)){const o=m(e.unevaluatedProperties,t,`${n}/${i}`,r[i]).next();if(!o.done)return yield o.value,void(yield{type:a.IntersectUnevaluatedProperties,schema:e,path:`${n}/${i}`,value:r,message:"Invalid additional property"})}}}(y,g,n,c);case"Iterator":return yield*function*(e,t,n,r){h(r)&&Symbol.iterator in r||(yield{type:a.Iterator,schema:e,path:n,value:r,message:"Expected value to be an iterator"})}(y,0,n,c);case"Literal":return yield*function*(e,t,n,r){if(r!==e.const){const t="string"==typeof e.const?`'${e.const}'`:e.const;return yield{type:a.Literal,schema:e,path:n,value:r,message:`Expected ${t}`}}}(y,0,n,c);case"Never":return yield*function*(e,t,n,r){yield{type:a.Never,schema:e,path:n,value:r,message:"Value cannot be validated"}}(y,0,n,c);case"Not":return yield*function*(e,t,n,r){!0===m(e.not,t,n,r).next().done&&(yield{type:a.Not,schema:e,path:n,value:r,message:"Value should not validate"})}(y,g,n,c);case"Null":return yield*function*(e,t,n,r){if(!s.IsNull(r))return yield{type:a.Null,schema:e,path:n,value:r,message:"Expected null"}}(y,0,n,c);case"Number":return yield*function*(e,t,n,r){if(!f(r))return yield{type:a.Number,schema:e,path:n,value:r,message:"Expected number"};p(e.multipleOf)&&r%e.multipleOf!=0&&(yield{type:a.NumberMultipleOf,schema:e,path:n,value:r,message:`Expected number to be a multiple of ${e.multipleOf}`}),!p(e.exclusiveMinimum)||r>e.exclusiveMinimum||(yield{type:a.NumberExclusiveMinimum,schema:e,path:n,value:r,message:`Expected number to be greater than ${e.exclusiveMinimum}`}),!p(e.exclusiveMaximum)||r=e.minimum||(yield{type:a.NumberMinimum,schema:e,path:n,value:r,message:`Expected number to be greater or equal to ${e.minimum}`}),!p(e.maximum)||r<=e.maximum||(yield{type:a.NumberMaximum,schema:e,path:n,value:r,message:`Expected number to be less or equal to ${e.maximum}`})}(y,0,n,c);case"Object":return yield*function*(e,t,n,r){if(!h(r))return yield{type:a.Object,schema:e,path:n,value:r,message:"Expected object"};!p(e.minProperties)||Object.getOwnPropertyNames(r).length>=e.minProperties||(yield{type:a.ObjectMinProperties,schema:e,path:n,value:r,message:`Expected object to have at least ${e.minProperties} properties`}),!p(e.maxProperties)||Object.getOwnPropertyNames(r).length<=e.maxProperties||(yield{type:a.ObjectMaxProperties,schema:e,path:n,value:r,message:`Expected object to have no more than ${e.maxProperties} properties`});const o=Array.isArray(e.required)?e.required:[],s=Object.getOwnPropertyNames(e.properties),c=Object.getOwnPropertyNames(r);for(const o of s){const s=e.properties[o];e.required&&e.required.includes(o)?(yield*m(s,t,`${n}/${o}`,r[o]),i.ExtendsUndefined.Check(e)&&!(o in r)&&(yield{type:a.ObjectRequiredProperties,schema:s,path:`${n}/${o}`,value:void 0,message:"Expected required property"})):d(r,o)&&(yield*m(s,t,`${n}/${o}`,r[o]))}for(const t of o)c.includes(t)||(yield{type:a.ObjectRequiredProperties,schema:e.properties[t],path:`${n}/${t}`,value:void 0,message:"Expected required property"});if(!1===e.additionalProperties)for(const t of c)s.includes(t)||(yield{type:a.ObjectAdditionalProperties,schema:e,path:`${n}/${t}`,value:r[t],message:"Unexpected property"});if("object"==typeof e.additionalProperties)for(const i of c)s.includes(i)||(yield*m(e.additionalProperties,t,`${n}/${i}`,r[i]))}(y,g,n,c);case"Promise":return yield*function*(e,t,n,r){s.IsPromise(r)||(yield{type:a.Promise,schema:e,path:n,value:r,message:"Expected Promise"})}(y,0,n,c);case"Record":return yield*function*(e,t,n,r){if(!function(e){return h(e)&&!(e instanceof Date)&&!(e instanceof Uint8Array)}(r))return yield{type:a.Object,schema:e,path:n,value:r,message:"Expected record object"};!p(e.minProperties)||Object.getOwnPropertyNames(r).length>=e.minProperties||(yield{type:a.ObjectMinProperties,schema:e,path:n,value:r,message:`Expected object to have at least ${e.minProperties} properties`}),!p(e.maxProperties)||Object.getOwnPropertyNames(r).length<=e.maxProperties||(yield{type:a.ObjectMaxProperties,schema:e,path:n,value:r,message:`Expected object to have no more than ${e.maxProperties} properties`});const[i,o]=Object.entries(e.patternProperties)[0],s=new RegExp(i);for(const[i,c]of Object.entries(r))if(s.test(i))yield*m(o,t,`${n}/${i}`,c);else if("object"==typeof e.additionalProperties&&(yield*m(e.additionalProperties,t,`${n}/${i}`,c)),!1===e.additionalProperties){const t=`${n}/${i}`,r=`Unexpected property '${t}'`;return yield{type:a.ObjectAdditionalProperties,schema:e,path:t,value:c,message:r}}}(y,g,n,c);case"Ref":return yield*function*(e,t,n,r){const i=t.findIndex((t=>t.$id===e.$ref));if(-1===i)throw new u(e);const o=t[i];yield*m(o,t,n,r)}(y,g,n,c);case"String":return yield*function*(e,t,n,r){if(!s.IsString(r))return yield{type:a.String,schema:e,path:n,value:r,message:"Expected string"};!p(e.minLength)||r.length>=e.minLength||(yield{type:a.StringMinLength,schema:e,path:n,value:r,message:`Expected string length greater or equal to ${e.minLength}`}),!p(e.maxLength)||r.length<=e.maxLength||(yield{type:a.StringMaxLength,schema:e,path:n,value:r,message:`Expected string length less or equal to ${e.maxLength}`}),s.IsString(e.pattern)&&(new RegExp(e.pattern).test(r)||(yield{type:a.StringPattern,schema:e,path:n,value:r,message:`Expected string to match pattern ${e.pattern}`})),s.IsString(e.format)&&(i.FormatRegistry.Has(e.format)?i.FormatRegistry.Get(e.format)(r)||(yield{type:a.StringFormat,schema:e,path:n,value:r,message:`Expected string to match format '${e.format}'`}):yield{type:a.StringFormatUnknown,schema:e,path:n,value:r,message:`Unknown string format '${e.format}'`})}(y,0,n,c);case"Symbol":return yield*function*(e,t,n,r){if(!s.IsSymbol(r))return yield{type:a.Symbol,schema:e,path:n,value:r,message:"Expected symbol"}}(y,0,n,c);case"TemplateLiteral":return yield*function*(e,t,n,r){if(!s.IsString(r))return yield{type:a.String,schema:e,path:n,value:r,message:"Expected string"};new RegExp(e.pattern).test(r)||(yield{type:a.StringPattern,schema:e,path:n,value:r,message:`Expected string to match pattern ${e.pattern}`})}(y,0,n,c);case"This":return yield*function*(e,t,n,r){const i=t.findIndex((t=>t.$id===e.$ref));if(-1===i)throw new u(e);const o=t[i];yield*m(o,t,n,r)}(y,g,n,c);case"Tuple":return yield*function*(e,t,n,r){if(!s.IsArray(r))return yield{type:a.Array,schema:e,path:n,value:r,message:"Expected Array"};if(void 0===e.items&&0!==r.length)return yield{type:a.TupleZeroLength,schema:e,path:n,value:r,message:"Expected tuple to have 0 elements"};if(r.length!==e.maxItems&&(yield{type:a.TupleLength,schema:e,path:n,value:r,message:`Expected tuple to have ${e.maxItems} elements`}),e.items)for(let i=0;i0&&(yield{type:a.Union,schema:e,path:n,value:r,message:"Expected value of union"});for(const e of i)yield e}(y,g,n,c);case"Uint8Array":return yield*function*(e,t,n,r){if(!s.IsUint8Array(r))return yield{type:a.Uint8Array,schema:e,path:n,value:r,message:"Expected Uint8Array"};!p(e.maxByteLength)||r.length<=e.maxByteLength||(yield{type:a.Uint8ArrayMaxByteLength,schema:e,path:n,value:r,message:`Expected Uint8Array to have a byte length less or equal to ${e.maxByteLength}`}),!p(e.minByteLength)||r.length>=e.minByteLength||(yield{type:a.Uint8ArrayMinByteLength,schema:e,path:n,value:r,message:`Expected Uint8Array to have a byte length greater or equal to ${e.maxByteLength}`})}(y,0,n,c);case"Void":return yield*function*(e,t,n,i){if(!function(e){const t=s.IsUndefined(e);return r.TypeSystem.AllowVoidNull?t||null===e:t}(i))return yield{type:a.Void,schema:e,path:n,value:i,message:"Expected void"}}(y,0,n,c);default:if(!i.TypeRegistry.Has(y[i.Kind]))throw new l(e);return yield*function*(e,t,n,r){if(!i.TypeRegistry.Get(e[i.Kind])(e,r))return yield{type:a.Kind,schema:e,path:n,value:r,message:`Expected kind ${e[i.Kind]}`}}(y,0,n,c)}}t.ValueErrorsDereferenceError=u,t.Errors=function(...e){const t=3===e.length?m(e[0],e[1],"",e[2]):m(e[0],[],"",e[1]);return new c(t)}},99026: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}),i(n(11287),t)},2100: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}),i(n(83655),t)},83655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeSystem=t.TypeSystemDuplicateFormat=t.TypeSystemDuplicateTypeKind=void 0;const r=n(892);class i extends Error{constructor(e){super(`Duplicate type kind '${e}' detected`)}}t.TypeSystemDuplicateTypeKind=i;class o extends Error{constructor(e){super(`Duplicate string format '${e}' detected`)}}var s;t.TypeSystemDuplicateFormat=o,function(e){e.ExactOptionalPropertyTypes=!1,e.AllowArrayObjects=!1,e.AllowNaN=!1,e.AllowVoidNull=!1,e.Type=function(e,t){if(r.TypeRegistry.Has(e))throw new i(e);return r.TypeRegistry.Set(e,t),(t={})=>r.Type.Unsafe({...t,[r.Kind]:e})},e.Format=function(e,t){if(r.FormatRegistry.Has(e))throw new o(e);return r.FormatRegistry.Set(e,t),e}}(s||(t.TypeSystem=s={}))},892:(e,t)=>{"use strict";var n,r,i,o,s,a,c,l,u,p,d,h,f,m,g,y,_,v,b;Object.defineProperty(t,"__esModule",{value:!0}),t.Type=t.StandardType=t.ExtendedTypeBuilder=t.StandardTypeBuilder=t.TypeBuilder=t.TemplateLiteralDslParser=t.TemplateLiteralGenerator=t.TemplateLiteralFinite=t.TemplateLiteralParser=t.TemplateLiteralParserError=t.TemplateLiteralResolver=t.TemplateLiteralPattern=t.UnionResolver=t.KeyArrayResolver=t.KeyResolver=t.ObjectMap=t.IndexedAccessor=t.TypeClone=t.TypeExtends=t.TypeExtendsResult=t.ExtendsUndefined=t.TypeGuard=t.TypeGuardUnknownTypeError=t.ValueGuard=t.FormatRegistry=t.TypeRegistry=t.PatternStringExact=t.PatternNumberExact=t.PatternBooleanExact=t.PatternString=t.PatternNumber=t.PatternBoolean=t.Kind=t.Hint=t.Optional=t.Readonly=void 0,t.Readonly=Symbol.for("TypeBox.Readonly"),t.Optional=Symbol.for("TypeBox.Optional"),t.Hint=Symbol.for("TypeBox.Hint"),t.Kind=Symbol.for("TypeBox.Kind"),t.PatternBoolean="(true|false)",t.PatternNumber="(0|[1-9][0-9]*)",t.PatternString="(.*)",t.PatternBooleanExact=`^${t.PatternBoolean}$`,t.PatternNumberExact=`^${t.PatternNumber}$`,t.PatternStringExact=`^${t.PatternString}$`,function(e){const t=new Map;e.Entries=function(){return new Map(t)},e.Clear=function(){return t.clear()},e.Delete=function(e){return t.delete(e)},e.Has=function(e){return t.has(e)},e.Set=function(e,n){t.set(e,n)},e.Get=function(e){return t.get(e)}}(n||(t.TypeRegistry=n={})),function(e){const t=new Map;e.Entries=function(){return new Map(t)},e.Clear=function(){return t.clear()},e.Delete=function(e){return t.delete(e)},e.Has=function(e){return t.has(e)},e.Set=function(e,n){t.set(e,n)},e.Get=function(e){return t.get(e)}}(r||(t.FormatRegistry=r={})),function(e){e.IsObject=function(e){return"object"==typeof e&&null!==e},e.IsArray=function(e){return Array.isArray(e)},e.IsBoolean=function(e){return"boolean"==typeof e},e.IsNull=function(e){return null===e},e.IsUndefined=function(e){return void 0===e},e.IsBigInt=function(e){return"bigint"==typeof e},e.IsNumber=function(e){return"number"==typeof e},e.IsString=function(e){return"string"==typeof e}}(i||(t.ValueGuard=i={}));class T extends Error{constructor(e){super("TypeGuard: Unknown type"),this.schema=e}}t.TypeGuardUnknownTypeError=T,function(e){function r(e){try{return new RegExp(e),!0}catch{return!1}}function o(e){if(!i.IsString(e))return!1;for(let t=0;t=7&&n<=13||27===n||127===n)return!1}return!0}function s(e){return l(e)||G(e)}function a(e){return i.IsUndefined(e)||i.IsBigInt(e)}function c(e){return i.IsUndefined(e)||i.IsNumber(e)}function l(e){return i.IsUndefined(e)||i.IsBoolean(e)}function u(e){return i.IsUndefined(e)||i.IsString(e)}function p(e){return i.IsUndefined(e)||G(e)}function d(e){return w(e,"Any")&&u(e.$id)}function h(e){return w(e,"Array")&&"array"===e.type&&u(e.$id)&&G(e.items)&&c(e.minItems)&&c(e.maxItems)&&l(e.uniqueItems)&&p(e.contains)&&c(e.minContains)&&c(e.maxContains)}function f(e){return w(e,"AsyncIterator")&&"AsyncIterator"===e.type&&u(e.$id)&&G(e.items)}function m(e){return w(e,"BigInt")&&"bigint"===e.type&&u(e.$id)&&a(e.multipleOf)&&a(e.minimum)&&a(e.maximum)&&a(e.exclusiveMinimum)&&a(e.exclusiveMaximum)}function g(e){return w(e,"Boolean")&&"boolean"===e.type&&u(e.$id)}function y(e){if(!(w(e,"Constructor")&&"constructor"===e.type&&u(e.$id)&&i.IsArray(e.parameters)&&G(e.returns)))return!1;for(const t of e.parameters)if(!G(t))return!1;return!0}function _(e){return w(e,"Date")&&"Date"===e.type&&u(e.$id)&&c(e.minimumTimestamp)&&c(e.maximumTimestamp)&&c(e.exclusiveMinimumTimestamp)&&c(e.exclusiveMaximumTimestamp)}function v(e){if(!(w(e,"Function")&&"function"===e.type&&u(e.$id)&&i.IsArray(e.parameters)&&G(e.returns)))return!1;for(const t of e.parameters)if(!G(t))return!1;return!0}function b(e){return w(e,"Integer")&&"integer"===e.type&&u(e.$id)&&c(e.multipleOf)&&c(e.minimum)&&c(e.maximum)&&c(e.exclusiveMinimum)&&c(e.exclusiveMaximum)}function T(e){if(!(w(e,"Intersect")&&i.IsArray(e.allOf)&&u(e.type)&&(l(e.unevaluatedProperties)||p(e.unevaluatedProperties))&&u(e.$id)))return!1;if("type"in e&&"object"!==e.type)return!1;for(const t of e.allOf)if(!G(t))return!1;return!0}function E(e){return w(e,"Iterator")&&"Iterator"===e.type&&u(e.$id)&&G(e.items)}function w(e,n){return S(e)&&e[t.Kind]===n}function S(e){return i.IsObject(e)&&t.Kind in e&&i.IsString(e[t.Kind])}function x(e){return I(e)&&i.IsString(e.const)}function C(e){return I(e)&&i.IsNumber(e.const)}function I(e){return w(e,"Literal")&&u(e.$id)&&(i.IsBoolean(e.const)||i.IsNumber(e.const)||i.IsString(e.const))}function k(e){return w(e,"Never")&&i.IsObject(e.not)&&0===Object.getOwnPropertyNames(e.not).length}function A(e){return w(e,"Not")&&G(e.not)}function P(e){return w(e,"Null")&&"null"===e.type&&u(e.$id)}function R(e){return w(e,"Number")&&"number"===e.type&&u(e.$id)&&c(e.multipleOf)&&c(e.minimum)&&c(e.maximum)&&c(e.exclusiveMinimum)&&c(e.exclusiveMaximum)}function N(e){if(!(w(e,"Object")&&"object"===e.type&&u(e.$id)&&i.IsObject(e.properties)&&s(e.additionalProperties)&&c(e.minProperties)&&c(e.maxProperties)))return!1;for(const[t,n]of Object.entries(e.properties)){if(!o(t))return!1;if(!G(n))return!1}return!0}function O(e){return w(e,"Promise")&&"Promise"===e.type&&u(e.$id)&&G(e.item)}function M(e){if(!(w(e,"Record")&&"object"===e.type&&u(e.$id)&&s(e.additionalProperties)&&i.IsObject(e.patternProperties)))return!1;const t=Object.getOwnPropertyNames(e.patternProperties);return 1===t.length&&!!r(t[0])&&!!G(e.patternProperties[t[0]])}function D(e){return w(e,"Ref")&&u(e.$id)&&i.IsString(e.$ref)}function L(e){return w(e,"String")&&"string"===e.type&&u(e.$id)&&c(e.minLength)&&c(e.maxLength)&&(t=e.pattern,i.IsUndefined(t)||i.IsString(t)&&o(t)&&r(t))&&function(e){return i.IsUndefined(e)||i.IsString(e)&&o(e)}(e.format);var t}function F(e){return w(e,"Symbol")&&"symbol"===e.type&&u(e.$id)}function B(e){return w(e,"TemplateLiteral")&&"string"===e.type&&i.IsString(e.pattern)&&"^"===e.pattern[0]&&"$"===e.pattern[e.pattern.length-1]}function j(e){return w(e,"This")&&u(e.$id)&&i.IsString(e.$ref)}function U(e){if(!(w(e,"Tuple")&&"array"===e.type&&u(e.$id)&&i.IsNumber(e.minItems)&&i.IsNumber(e.maxItems)&&e.minItems===e.maxItems))return!1;if(i.IsUndefined(e.items)&&i.IsUndefined(e.additionalItems)&&0===e.minItems)return!0;if(!i.IsArray(e.items))return!1;for(const t of e.items)if(!G(t))return!1;return!0}function q(e){return w(e,"Undefined")&&"undefined"===e.type&&u(e.$id)}function H(e){if(!(w(e,"Union")&&i.IsArray(e.anyOf)&&u(e.$id)))return!1;for(const t of e.anyOf)if(!G(t))return!1;return!0}function $(e){return w(e,"Uint8Array")&&"Uint8Array"===e.type&&u(e.$id)&&c(e.minByteLength)&&c(e.maxByteLength)}function V(e){return w(e,"Unknown")&&u(e.$id)}function z(e){return w(e,"Unsafe")}function W(e){return w(e,"Void")&&"void"===e.type&&u(e.$id)}function G(e){return i.IsObject(e)&&(d(e)||h(e)||g(e)||m(e)||f(e)||y(e)||_(e)||v(e)||b(e)||T(e)||E(e)||I(e)||k(e)||A(e)||P(e)||R(e)||N(e)||O(e)||M(e)||D(e)||L(e)||F(e)||B(e)||j(e)||U(e)||q(e)||H(e)||$(e)||V(e)||z(e)||W(e)||S(e)&&n.Has(e[t.Kind]))}e.TAny=d,e.TArray=h,e.TAsyncIterator=f,e.TBigInt=m,e.TBoolean=g,e.TConstructor=y,e.TDate=_,e.TFunction=v,e.TInteger=b,e.TIntersect=T,e.TIterator=E,e.TKindOf=w,e.TKind=S,e.TLiteralString=x,e.TLiteralNumber=C,e.TLiteralBoolean=function(e){return I(e)&&i.IsBoolean(e.const)},e.TLiteral=I,e.TNever=k,e.TNot=A,e.TNull=P,e.TNumber=R,e.TObject=N,e.TPromise=O,e.TRecord=M,e.TRef=D,e.TString=L,e.TSymbol=F,e.TTemplateLiteral=B,e.TThis=j,e.TTuple=U,e.TUndefined=q,e.TUnionLiteral=function(e){return H(e)&&e.anyOf.every((e=>x(e)||C(e)))},e.TUnion=H,e.TUint8Array=$,e.TUnknown=V,e.TUnsafe=z,e.TVoid=W,e.TReadonly=function(e){return i.IsObject(e)&&"Readonly"===e[t.Readonly]},e.TOptional=function(e){return i.IsObject(e)&&"Optional"===e[t.Optional]},e.TSchema=G}(o||(t.TypeGuard=o={})),function(e){e.Check=function e(n){return"Undefined"===n[t.Kind]||("Not"===n[t.Kind]?!e(n.not):"Intersect"===n[t.Kind]?n.allOf.every((t=>e(t))):"Union"===n[t.Kind]&&n.anyOf.some((t=>e(t))))}}(s||(t.ExtendsUndefined=s={})),function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"}(a||(t.TypeExtendsResult=a={})),function(e){function n(e){return e===a.False?a.False:a.True}function r(e){return o.TNever(e)||o.TIntersect(e)||o.TUnion(e)||o.TUnknown(e)||o.TAny(e)}function s(e,t){if(o.TNever(t))return d();if(o.TIntersect(t))return p(e,t);if(o.TUnion(t))return k(e,t);if(o.TUnknown(t))return A();if(o.TAny(t))return c();throw Error("TypeExtends: StructuralRight")}function c(e,t){return a.True}function l(e,t){return o.TLiteral(e)&&i.IsBoolean(e.const)||o.TBoolean(e)?a.True:a.False}function u(e,t){return o.TLiteral(e)&&i.IsNumber(e.const)||o.TNumber(e)||o.TInteger(e)?a.True:a.False}function p(e,t){return t.allOf.every((t=>P(e,t)===a.True))?a.True:a.False}function d(e,t){return a.False}function h(e){let[n,r]=[e,0];for(;o.TNot(n);)n=n.not,r+=1;return r%2==0?n:t.Type.Unknown()}function f(e,t){return o.TLiteralNumber(e)||o.TNumber(e)||o.TInteger(e)?a.True:a.False}function m(e,t){return Object.getOwnPropertyNames(e.properties).length===t}function y(e){return T(e)}function _(e){return m(e,0)||m(e,1)&&"description"in e.properties&&o.TUnion(e.properties.description)&&2===e.properties.description.anyOf.length&&(o.TString(e.properties.description.anyOf[0])&&o.TUndefined(e.properties.description.anyOf[1])||o.TString(e.properties.description.anyOf[1])&&o.TUndefined(e.properties.description.anyOf[0]))}function v(e){return m(e,0)}function b(e){return m(e,0)}function T(e){const r=t.Type.Number();return m(e,0)||m(e,1)&&"length"in e.properties&&n(P(e.properties.length,r))===a.True}function E(e,t){return P(e,t)===a.False||o.TOptional(e)&&!o.TOptional(t)?a.False:a.True}function w(e,r){return o.TUnknown(e)?a.False:o.TAny(e)?a.Union:o.TNever(e)||o.TLiteralString(e)&&y(r)||o.TLiteralNumber(e)&&v(r)||o.TLiteralBoolean(e)&&b(r)||o.TSymbol(e)&&_(r)||o.TBigInt(e)&&m(r,0)||o.TString(e)&&y(r)||o.TSymbol(e)&&_(r)||o.TNumber(e)&&v(r)||o.TInteger(e)&&v(r)||o.TBoolean(e)&&b(r)||o.TUint8Array(e)&&T(r)||o.TDate(e)&&function(e){return m(e,0)}(r)||o.TConstructor(e)&&function(e){return m(e,0)}(r)||o.TFunction(e)&&function(e){const r=t.Type.Number();return m(e,0)||m(e,1)&&"length"in e.properties&&n(P(e.properties.length,r))===a.True}(r)?a.True:o.TRecord(e)&&o.TString(S(e))?"Record"===r[t.Hint]?a.True:a.False:o.TRecord(e)&&o.TNumber(S(e))&&m(r,0)?a.True:a.False}function S(e){if(t.PatternNumberExact in e.patternProperties)return t.Type.Number();if(t.PatternStringExact in e.patternProperties)return t.Type.String();throw Error("TypeExtends: Cannot get record key")}function x(e){if(t.PatternNumberExact in e.patternProperties)return e.patternProperties[t.PatternNumberExact];if(t.PatternStringExact in e.patternProperties)return e.patternProperties[t.PatternStringExact];throw Error("TypeExtends: Cannot get record value")}function C(e,t){const r=S(t),i=x(t);if(o.TLiteralString(e)&&o.TNumber(r)&&n(P(e,i))===a.True)return a.True;if(o.TUint8Array(e)&&o.TNumber(r))return P(e,i);if(o.TString(e)&&o.TNumber(r))return P(e,i);if(o.TArray(e)&&o.TNumber(r))return P(e,i);if(o.TObject(e)){for(const t of Object.getOwnPropertyNames(e.properties))if(E(i,e.properties[t])===a.False)return a.False;return a.True}return a.False}function I(e,t){return o.TLiteral(e)&&i.IsString(e.const)||o.TString(e)?a.True:a.False}function k(e,t){return t.anyOf.some((t=>P(e,t)===a.True))?a.True:a.False}function A(e,t){return a.True}function P(e,y){if(o.TTemplateLiteral(e)||o.TTemplateLiteral(y))return function(e,t){if(o.TTemplateLiteral(e))return P(g.Resolve(e),t);if(o.TTemplateLiteral(t))return P(e,g.Resolve(t));throw new Error("TypeExtends: Invalid fallthrough for TemplateLiteral")}(e,y);if(o.TNot(e)||o.TNot(y))return function(e,t){if(o.TNot(e))return P(h(e),t);if(o.TNot(t))return P(e,h(t));throw new Error("TypeExtends: Invalid fallthrough for Not")}(e,y);if(o.TAny(e))return function(e,t){return o.TIntersect(t)?p(e,t):o.TUnion(t)&&t.anyOf.some((e=>o.TAny(e)||o.TUnknown(e)))?a.True:o.TUnion(t)?a.Union:o.TUnknown(t)||o.TAny(t)?a.True:a.Union}(e,y);if(o.TArray(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)&&T(t)?a.True:o.TArray(t)?n(P(e.items,t.items)):a.False}(e,y);if(o.TBigInt(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TBigInt(t)?a.True:a.False}(e,y);if(o.TBoolean(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TBoolean(t)?a.True:a.False}(e,y);if(o.TAsyncIterator(e))return function(e,t){return r(t)?s(e,t):o.TAsyncIterator(t)?n(P(e.items,t.items)):a.False}(e,y);if(o.TConstructor(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TConstructor(t)?e.parameters.length>t.parameters.length?a.False:e.parameters.every(((e,r)=>n(P(t.parameters[r],e))===a.True))?n(P(e.returns,t.returns)):a.False:a.False}(e,y);if(o.TDate(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TDate(t)?a.True:a.False}(e,y);if(o.TFunction(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TFunction(t)?e.parameters.length>t.parameters.length?a.False:e.parameters.every(((e,r)=>n(P(t.parameters[r],e))===a.True))?n(P(e.returns,t.returns)):a.False:a.False}(e,y);if(o.TInteger(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TInteger(t)||o.TNumber(t)?a.True:a.False}(e,y);if(o.TIntersect(e))return function(e,t){return e.allOf.some((e=>P(e,t)===a.True))?a.True:a.False}(e,y);if(o.TIterator(e))return function(e,t){return r(t)?s(e,t):o.TIterator(t)?n(P(e.items,t.items)):a.False}(e,y);if(o.TLiteral(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TString(t)?I(e):o.TNumber(t)?f(e):o.TInteger(t)?u(e):o.TBoolean(t)?l(e):o.TLiteral(t)&&t.const===e.const?a.True:a.False}(e,y);if(o.TNever(e))return a.True;if(o.TNull(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TNull(t)?a.True:a.False}(e,y);if(o.TNumber(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TInteger(t)||o.TNumber(t)?a.True:a.False}(e,y);if(o.TObject(e))return function(e,t){if(r(t))return s(e,t);if(o.TRecord(t))return C(e,t);if(!o.TObject(t))return a.False;for(const n of Object.getOwnPropertyNames(t.properties)){if(!(n in e.properties))return a.False;if(E(e.properties[n],t.properties[n])===a.False)return a.False}return a.True}(e,y);if(o.TRecord(e))return function(e,t){const n=x(e);return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?P(n,x(t)):a.False}(e,y);if(o.TString(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TString(t)?a.True:a.False}(e,y);if(o.TSymbol(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TSymbol(t)?a.True:a.False}(e,y);if(o.TTuple(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)&&T(t)||o.TArray(t)&&function(e,t){return o.TArray(t)&&void 0!==e.items&&e.items.every((e=>P(e,t.items)===a.True))}(e,t)?a.True:o.TTuple(t)?i.IsUndefined(e.items)&&!i.IsUndefined(t.items)||!i.IsUndefined(e.items)&&i.IsUndefined(t.items)?a.False:i.IsUndefined(e.items)&&!i.IsUndefined(t.items)||e.items.every(((e,n)=>P(e,t.items[n])===a.True))?a.True:a.False:a.False}(e,y);if(o.TPromise(e))return function(e,i){return r(i)?s(e,i):o.TObject(i)&&function(e){const r=t.Type.Function([t.Type.Any()],t.Type.Any());return m(e,0)||m(e,1)&&"then"in e.properties&&n(P(e.properties.then,r))===a.True}(i)?a.True:o.TPromise(i)?n(P(e.item,i.item)):a.False}(e,y);if(o.TUint8Array(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TUint8Array(t)?a.True:a.False}(e,y);if(o.TUndefined(e))return function(e,t){return r(t)?s(e,t):o.TObject(t)?w(e,t):o.TRecord(t)?C(e,t):o.TVoid(t)?function(e,t){return o.TUndefined(e)||o.TUndefined(e)?a.True:a.False}(e):o.TUndefined(t)?a.True:a.False}(e,y);if(o.TUnion(e))return function(e,t){return e.anyOf.every((e=>P(e,t)===a.True))?a.True:a.False}(e,y);if(o.TUnknown(e))return function(e,t){return o.TNever(t)?d():o.TIntersect(t)?p(e,t):o.TUnion(t)?k(e,t):o.TAny(t)?c():o.TString(t)?I(e):o.TNumber(t)?f(e):o.TInteger(t)?u(e):o.TBoolean(t)?l(e):o.TArray(t)?function(e,t){return o.TUnknown(e)?a.False:o.TAny(e)?a.Union:o.TNever(e)?a.True:a.False}(e):o.TTuple(t)?function(e,t){return o.TNever(e)?a.True:o.TUnknown(e)?a.False:o.TAny(e)?a.Union:a.False}(e):o.TObject(t)?w(e,t):o.TUnknown(t)?a.True:a.False}(e,y);if(o.TVoid(e))return function(e,t){return o.TIntersect(t)?p(e,t):o.TUnion(t)?k(e,t):o.TUnknown(t)?A():o.TAny(t)?c():o.TObject(t)?w(e,t):o.TVoid(t)?a.True:a.False}(e,y);throw Error(`TypeExtends: Unknown left type operand '${e[t.Kind]}'`)}e.Extends=function(e,t){return P(e,t)}}(c||(t.TypeExtends=c={})),function(e){function t(e){return i.IsArray(e)?function(e){return e.map((e=>t(e)))}(e):i.IsObject(e)?function(e){return{...Object.getOwnPropertyNames(e).reduce(((n,r)=>({...n,[r]:t(e[r])})),{}),...Object.getOwnPropertySymbols(e).reduce(((n,r)=>({...n,[r]:t(e[r])})),{})}}(e):e}e.Clone=function(e,n={}){return{...t(e),...n}}}(l||(t.TypeClone=l={})),function(e){function n(e){return e.map((e=>{const{[t.Optional]:n,...r}=l.Clone(e);return r}))}function r(e){return"Intersect"===e[t.Kind]?function(e){const r=function(e){return e.every((e=>o.TOptional(e)))}(e.allOf);return r?t.Type.Optional(t.Type.Intersect(n(e.allOf))):e}(e):"Union"===e[t.Kind]?function(e){const r=function(e){return e.some((e=>o.TOptional(e)))}(e.anyOf);return r?t.Type.Optional(t.Type.Union(n(e.anyOf))):e}(e):e}function s(e,n){return"Intersect"===e[t.Kind]?function(e,n){const i=e.allOf.reduce(((e,r)=>{const i=s(r,n);return"Never"===i[t.Kind]?e:[...e,i]}),[]);return r(t.Type.Intersect(i))}(e,n):"Union"===e[t.Kind]?function(e,n){const i=e.anyOf.map((e=>s(e,n)));return r(t.Type.Union(i))}(e,n):"Object"===e[t.Kind]?function(e,n){const r=e.properties[n];return i.IsUndefined(r)?t.Type.Never():t.Type.Union([r])}(e,n):"Tuple"===e[t.Kind]?function(e,n){const r=e.items;if(i.IsUndefined(r))return t.Type.Never();const o=r[n];return i.IsUndefined(o)?t.Type.Never():o}(e,n):t.Type.Never()}e.Resolve=function(e,n,i={}){const o=n.map((t=>s(e,t.toString())));return r(t.Type.Union(o,i))}}(u||(t.IndexedAccessor=u={})),function(e){function n(e,r){return"Intersect"===e[t.Kind]?function(e,r){return t.Type.Intersect(e.allOf.map((e=>n(e,r))),{...e})}(e,r):"Union"===e[t.Kind]?function(e,r){return t.Type.Union(e.anyOf.map((e=>n(e,r))),{...e})}(e,r):"Object"===e[t.Kind]?function(e,t){return t(e)}(e,r):e}e.Map=function(e,t,r){return{...n(l.Clone(e),t),...r}}}(p||(t.ObjectMap=p={})),function(e){function t(e,n){return o.TIntersect(e)?function(e,n){return e.allOf.reduce(((e,r)=>[...e,...t(r,n)]),[])}(e,n):o.TUnion(e)?function(e,n){const r=e.anyOf.map((e=>t(e,n)));return[...r.reduce(((e,t)=>t.map((t=>r.every((e=>e.includes(t)))?e.add(t):e))[0]),new Set)]}(e,n):o.TObject(e)?function(e,t){return Object.getOwnPropertyNames(e.properties)}(e):o.TRecord(e)?function(e,t){return t.includePatterns?Object.getOwnPropertyNames(e.patternProperties):[]}(e,n):[]}function n(e,n){return[...new Set(t(e,n))]}e.ResolveKeys=n,e.ResolvePattern=function(e){return`^(${n(e,{includePatterns:!0}).map((e=>`(${function(e){return"^"===e[0]&&"$"===e[e.length-1]?e.slice(1,e.length-1):e}(e)})`)).join("|")})$`}}(d||(t.KeyResolver=d={})),function(e){e.Resolve=function(e){if(Array.isArray(e))return e;if(o.TUnionLiteral(e))return e.anyOf.map((e=>e.const.toString()));if(o.TLiteral(e))return[e.const];if(o.TTemplateLiteral(e)){const t=y.ParseExact(e.pattern);if(!_.Check(t))throw Error("KeyArrayResolver: Cannot resolve keys from infinite template expression");return[...v.Generate(t)]}return[]}}(h||(t.KeyArrayResolver=h={})),function(e){function*n(e){for(const r of e.anyOf)"Union"===r[t.Kind]?yield*n(r):yield r}e.Resolve=function(e){return t.Type.Union([...n(e)],{...e})}}(f||(t.UnionResolver=f={})),function(e){function n(e,r){if(o.TTemplateLiteral(e))return e.pattern.slice(1,e.pattern.length-1);if(o.TUnion(e))return`(${e.anyOf.map((e=>n(e,r))).join("|")})`;if(o.TNumber(e))return`${r}${t.PatternNumber}`;if(o.TInteger(e))return`${r}${t.PatternNumber}`;if(o.TBigInt(e))return`${r}${t.PatternNumber}`;if(o.TString(e))return`${r}${t.PatternString}`;if(o.TLiteral(e))return`${r}${i=e.const.toString(),i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`;if(o.TBoolean(e))return`${r}${t.PatternBoolean}`;throw o.TNever(e)?Error("TemplateLiteralPattern: TemplateLiteral cannot operate on types of TNever"):Error(`TemplateLiteralPattern: Unexpected Kind '${e[t.Kind]}'`);var i}e.Create=function(e){return`^${e.map((e=>n(e,""))).join("")}$`}}(m||(t.TemplateLiteralPattern=m={})),function(e){e.Resolve=function(e){const n=y.ParseExact(e.pattern);if(!_.Check(n))return t.Type.String();const r=[...v.Generate(n)].map((e=>t.Type.Literal(e)));return t.Type.Union(r)}}(g||(t.TemplateLiteralResolver=g={}));class E extends Error{constructor(e){super(e)}}t.TemplateLiteralParserError=E,function(e){function t(e,t,n){return e[t]===n&&92!==e.charCodeAt(t-1)}function n(e,n){return t(e,n,"(")}function r(e,n){return t(e,n,")")}function i(e,n){return t(e,n,"|")}function o(e){return function(e){if(!n(e,0)||!r(e,e.length-1))return!1;let t=0;for(let i=0;i0&&a.push(o(t)),s=c+1}const c=e.slice(s);return c.length>0&&a.push(o(c)),0===a.length?{type:"const",const:""}:1===a.length?a[0]:{type:"or",expr:a}}(e):function(e){for(let t=0;t0&&s.push(o(a)),r=n-1}return 0===s.length?{type:"const",const:""}:1===s.length?s[0]:{type:"and",expr:s}}(e):{type:"const",const:e}}e.Parse=o,e.ParseExact=function(e){return o(e.slice(1,e.length-1))}}(y||(t.TemplateLiteralParser=y={})),function(e){e.Check=function e(t){if(function(e){return"or"===e.type&&2===e.expr.length&&"const"===e.expr[0].type&&"true"===e.expr[0].const&&"const"===e.expr[1].type&&"false"===e.expr[1].const}(t))return!0;if(function(e){return"or"===e.type&&2===e.expr.length&&"const"===e.expr[0].type&&"0"===e.expr[0].const&&"const"===e.expr[1].type&&"[1-9][0-9]*"===e.expr[1].const}(t)||function(e){return"const"===e.type&&".*"===e.const}(t))return!1;if("and"===t.type)return t.expr.every((t=>e(t)));if("or"===t.type)return t.expr.every((t=>e(t)));if("const"===t.type)return!0;throw Error("TemplateLiteralFinite: Unknown expression type")}}(_||(t.TemplateLiteralFinite=_={})),function(e){function*t(e){if(1===e.length)return yield*e[0];for(const n of e[0])for(const r of t(e.slice(1)))yield`${n}${r}`}function*n(e){return yield*t(e.expr.map((e=>[...r(e)])))}function*r(e){if("and"===e.type)return yield*n(e);if("or"===e.type)return yield*function*(e){for(const t of e.expr)yield*r(t)}(e);if("const"===e.type)return yield*function*(e){return yield e.const}(e);throw Error("TemplateLiteralGenerator: Unknown expression")}e.Generate=r}(v||(t.TemplateLiteralGenerator=v={})),function(e){function*n(e){const n=e.trim().replace(/"|'/g,"");if("boolean"===n)return yield t.Type.Boolean();if("number"===n)return yield t.Type.Number();if("bigint"===n)return yield t.Type.BigInt();if("string"===n)return yield t.Type.String();const r=n.split("|").map((e=>t.Type.Literal(e.trim())));return yield 0===r.length?t.Type.Never():1===r.length?r[0]:t.Type.Union(r)}function*r(e){if("{"!==e[1]){const n=t.Type.Literal("$"),r=i(e.slice(1));return yield*[n,...r]}for(let t=2;t({...e,[n]:t.Type.Index(r,[n])})),{});return t.Type.Object(i,n)}Enum(e,n={}){const r=Object.getOwnPropertyNames(e).filter((e=>isNaN(e))).map((t=>e[t])).map((e=>i.IsString(e)?{[t.Kind]:"Literal",type:"string",const:e}:{[t.Kind]:"Literal",type:"number",const:e}));return this.Create({...n,[t.Kind]:"Union",anyOf:r})}Extends(e,t,n,r,i={}){switch(c.Extends(e,t)){case a.Union:return this.Union([l.Clone(n,i),l.Clone(r,i)]);case a.True:return l.Clone(n,i);case a.False:return l.Clone(r,i)}}Exclude(e,t,n={}){if(o.TTemplateLiteral(e))return this.Exclude(g.Resolve(e),t,n);if(o.TTemplateLiteral(t))return this.Exclude(e,g.Resolve(t),n);if(o.TUnion(e)){const r=e.anyOf.filter((e=>c.Extends(e,t)===a.False));return 1===r.length?l.Clone(r[0],n):this.Union(r,n)}return c.Extends(e,t)!==a.False?this.Never(n):l.Clone(e,n)}Extract(e,t,n={}){if(o.TTemplateLiteral(e))return this.Extract(g.Resolve(e),t,n);if(o.TTemplateLiteral(t))return this.Extract(e,g.Resolve(t),n);if(o.TUnion(e)){const r=e.anyOf.filter((e=>c.Extends(e,t)!==a.False));return 1===r.length?l.Clone(r[0],n):this.Union(r,n)}return c.Extends(e,t)!==a.False?l.Clone(e,n):this.Never(n)}Index(e,t,n={}){if(o.TArray(e)&&o.TNumber(t))return l.Clone(e.items,n);if(o.TTuple(e)&&o.TNumber(t)){const t=(i.IsUndefined(e.items)?[]:e.items).map((e=>l.Clone(e)));return this.Union(t,n)}{const r=h.Resolve(t),i=l.Clone(e);return u.Resolve(i,r,n)}}Integer(e={}){return this.Create({...e,[t.Kind]:"Integer",type:"integer"})}Intersect(e,n={}){if(0===e.length)return t.Type.Never();if(1===e.length)return l.Clone(e[0],n);const r=e.every((e=>o.TObject(e))),i=e.map((e=>l.Clone(e))),s=o.TSchema(n.unevaluatedProperties)?{unevaluatedProperties:l.Clone(n.unevaluatedProperties)}:{};return!1===n.unevaluatedProperties||o.TSchema(n.unevaluatedProperties)||r?this.Create({...n,...s,[t.Kind]:"Intersect",type:"object",allOf:i}):this.Create({...n,...s,[t.Kind]:"Intersect",allOf:i})}KeyOf(e,n={}){if(o.TRecord(e)){const r=Object.getOwnPropertyNames(e.patternProperties)[0];if(r===t.PatternNumberExact)return this.Number(n);if(r===t.PatternStringExact)return this.String(n);throw Error("StandardTypeBuilder: Unable to resolve key type from Record key pattern")}if(o.TTuple(e)){const r=(i.IsUndefined(e.items)?[]:e.items).map(((e,n)=>t.Type.Literal(n)));return this.Union(r,n)}if(o.TArray(e))return this.Number(n);{const t=d.ResolveKeys(e,{includePatterns:!1});if(0===t.length)return this.Never(n);const r=t.map((e=>this.Literal(e)));return this.Union(r,n)}}Literal(e,n={}){return this.Create({...n,[t.Kind]:"Literal",const:e,type:typeof e})}Lowercase(e,n={}){return t.Type.Literal(e.const.toLowerCase(),n)}Never(e={}){return this.Create({...e,[t.Kind]:"Never",not:{}})}Not(e,n){return this.Create({...n,[t.Kind]:"Not",not:l.Clone(e)})}Null(e={}){return this.Create({...e,[t.Kind]:"Null",type:"null"})}Number(e={}){return this.Create({...e,[t.Kind]:"Number",type:"number"})}Object(e,n={}){const r=Object.getOwnPropertyNames(e),i=r.filter((t=>o.TOptional(e[t]))),s=r.filter((e=>!i.includes(e))),a=o.TSchema(n.additionalProperties)?{additionalProperties:l.Clone(n.additionalProperties)}:{},c=r.reduce(((t,n)=>({...t,[n]:l.Clone(e[n])})),{});return s.length>0?this.Create({...n,...a,[t.Kind]:"Object",type:"object",properties:c,required:s}):this.Create({...n,...a,[t.Kind]:"Object",type:"object",properties:c})}Omit(e,t,n={}){const r=h.Resolve(t);return p.Map(l.Clone(e),(e=>{i.IsArray(e.required)&&(e.required=e.required.filter((e=>!r.includes(e))),0===e.required.length&&delete e.required);for(const t of Object.getOwnPropertyNames(e.properties))r.includes(t)&&delete e.properties[t];return this.Create(e)}),n)}Partial(e,t={}){return p.Map(e,(e=>{const t=Object.getOwnPropertyNames(e.properties).reduce(((t,n)=>({...t,[n]:this.Optional(e.properties[n])})),{});return this.Object(t,this.Discard(e,"required"))}),t)}Pick(e,t,n={}){const r=h.Resolve(t);return p.Map(l.Clone(e),(e=>{i.IsArray(e.required)&&(e.required=e.required.filter((e=>r.includes(e))),0===e.required.length&&delete e.required);for(const t of Object.getOwnPropertyNames(e.properties))r.includes(t)||delete e.properties[t];return this.Create(e)}),n)}Record(e,n,r={}){if(o.TTemplateLiteral(e)){const i=y.ParseExact(e.pattern);return _.Check(i)?this.Object([...v.Generate(i)].reduce(((e,t)=>({...e,[t]:l.Clone(n)})),{}),r):this.Create({...r,[t.Kind]:"Record",type:"object",patternProperties:{[e.pattern]:l.Clone(n)}})}if(o.TUnion(e)){const i=f.Resolve(e);if(o.TUnionLiteral(i)){const e=i.anyOf.reduce(((e,t)=>({...e,[t.const]:l.Clone(n)})),{});return this.Object(e,{...r,[t.Hint]:"Record"})}throw Error("StandardTypeBuilder: Record key of type union contains non-literal types")}if(o.TLiteral(e)){if(i.IsString(e.const)||i.IsNumber(e.const))return this.Object({[e.const]:l.Clone(n)},r);throw Error("StandardTypeBuilder: Record key of type literal is not of type string or number")}if(o.TInteger(e)||o.TNumber(e))return this.Create({...r,[t.Kind]:"Record",type:"object",patternProperties:{[t.PatternNumberExact]:l.Clone(n)}});if(o.TString(e)){const o=i.IsUndefined(e.pattern)?t.PatternStringExact:e.pattern;return this.Create({...r,[t.Kind]:"Record",type:"object",patternProperties:{[o]:l.Clone(n)}})}throw Error("StandardTypeBuilder: Record key is an invalid type")}Recursive(e,n={}){i.IsUndefined(n.$id)&&(n.$id="T"+w++);const r=e({[t.Kind]:"This",$ref:`${n.$id}`});return r.$id=n.$id,this.Create({...n,[t.Hint]:"Recursive",...r})}Ref(e,n={}){if(i.IsString(e))return this.Create({...n,[t.Kind]:"Ref",$ref:e});if(i.IsUndefined(e.$id))throw Error("StandardTypeBuilder.Ref: Target type must specify an $id");return this.Create({...n,[t.Kind]:"Ref",$ref:e.$id})}Required(e,n={}){return p.Map(e,(e=>{const n=Object.getOwnPropertyNames(e.properties).reduce(((n,r)=>({...n,[r]:this.Discard(e.properties[r],t.Optional)})),{});return this.Object(n,e)}),n)}Rest(e){return o.TTuple(e)?i.IsUndefined(e.items)?[]:e.items.map((e=>l.Clone(e))):[l.Clone(e)]}String(e={}){return this.Create({...e,[t.Kind]:"String",type:"string"})}TemplateLiteral(e,n={}){const r=i.IsString(e)?m.Create(b.Parse(e)):m.Create(e);return this.Create({...n,[t.Kind]:"TemplateLiteral",type:"string",pattern:r})}Tuple(e,n={}){const[r,i,o]=[!1,e.length,e.length],s=e.map((e=>l.Clone(e))),a=e.length>0?{...n,[t.Kind]:"Tuple",type:"array",items:s,additionalItems:r,minItems:i,maxItems:o}:{...n,[t.Kind]:"Tuple",type:"array",minItems:i,maxItems:o};return this.Create(a)}Uncapitalize(e,n={}){const[r,i]=[e.const.slice(0,1),e.const.slice(1)];return t.Type.Literal(`${r.toLocaleLowerCase()}${i}`,n)}Union(e,n={}){if(o.TTemplateLiteral(e))return g.Resolve(e);{const r=e;if(0===r.length)return this.Never(n);if(1===r.length)return this.Create(l.Clone(r[0],n));const i=r.map((e=>l.Clone(e)));return this.Create({...n,[t.Kind]:"Union",anyOf:i})}}Unknown(e={}){return this.Create({...e,[t.Kind]:"Unknown"})}Unsafe(e={}){return this.Create({...e,[t.Kind]:e[t.Kind]||"Unsafe"})}Uppercase(e,n={}){return t.Type.Literal(e.const.toUpperCase(),n)}}t.StandardTypeBuilder=x;class C extends x{AsyncIterator(e,n={}){return this.Create({...n,[t.Kind]:"AsyncIterator",type:"AsyncIterator",items:l.Clone(e)})}Awaited(e,n={}){const r=e=>{if(0===e.length)return e;const[t,...n]=e;return[this.Awaited(t),...r(n)]};return o.TIntersect(e)?t.Type.Intersect(r(e.allOf)):o.TUnion(e)?t.Type.Union(r(e.anyOf)):o.TPromise(e)?this.Awaited(e.item):l.Clone(e,n)}BigInt(e={}){return this.Create({...e,[t.Kind]:"BigInt",type:"bigint"})}ConstructorParameters(e,t={}){return this.Tuple([...e.parameters],{...t})}Constructor(e,n,r){const i=l.Clone(n),o=e.map((e=>l.Clone(e)));return this.Create({...r,[t.Kind]:"Constructor",type:"constructor",parameters:o,returns:i})}Date(e={}){return this.Create({...e,[t.Kind]:"Date",type:"Date"})}Function(e,n,r){const i=l.Clone(n,{}),o=e.map((e=>l.Clone(e)));return this.Create({...r,[t.Kind]:"Function",type:"function",parameters:o,returns:i})}InstanceType(e,t={}){return l.Clone(e.returns,t)}Iterator(e,n={}){return this.Create({...n,[t.Kind]:"Iterator",type:"Iterator",items:l.Clone(e)})}Parameters(e,t={}){return this.Tuple(e.parameters,{...t})}Promise(e,n={}){return this.Create({...n,[t.Kind]:"Promise",type:"Promise",item:l.Clone(e)})}RegExp(e,n={}){const r=i.IsString(e)?e:e.source;return this.Create({...n,[t.Kind]:"String",type:"string",pattern:r})}RegEx(e,t={}){return this.RegExp(e,t)}ReturnType(e,t={}){return l.Clone(e.returns,t)}Symbol(e){return this.Create({...e,[t.Kind]:"Symbol",type:"symbol"})}Undefined(e={}){return this.Create({...e,[t.Kind]:"Undefined",type:"undefined"})}Uint8Array(e={}){return this.Create({...e,[t.Kind]:"Uint8Array",type:"Uint8Array"})}Void(e={}){return this.Create({...e,[t.Kind]:"Void",type:"void"})}}t.ExtendedTypeBuilder=C,t.StandardType=new x,t.Type=new C},34162:(e,t)=>{"use strict";function n(e){return null!==e&&"object"==typeof e}function r(e){return void 0===e}function i(e){return null===e}function o(e){return"boolean"==typeof e}function s(e){return"number"==typeof e}function a(e){return"bigint"==typeof e}function c(e){return"string"==typeof e}function l(e){return"function"==typeof e}function u(e){return"symbol"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t.IsValueType=t.IsSymbol=t.IsFunction=t.IsString=t.IsBigInt=t.IsInteger=t.IsNumber=t.IsBoolean=t.IsNull=t.IsUndefined=t.IsArray=t.IsObject=t.IsPlainObject=t.HasPropertyKey=t.IsDate=t.IsUint8Array=t.IsPromise=t.IsTypedArray=t.IsIterator=t.IsAsyncIterator=void 0,t.IsAsyncIterator=function(e){return n(e)&&Symbol.asyncIterator in e},t.IsIterator=function(e){return n(e)&&Symbol.iterator in e},t.IsTypedArray=function(e){return ArrayBuffer.isView(e)},t.IsPromise=function(e){return e instanceof Promise},t.IsUint8Array=function(e){return e instanceof Uint8Array},t.IsDate=function(e){return e instanceof Date},t.HasPropertyKey=function(e,t){return t in e},t.IsPlainObject=function(e){return n(e)&&l(e.constructor)&&"Object"===e.constructor.name},t.IsObject=n,t.IsArray=function(e){return Array.isArray(e)&&!ArrayBuffer.isView(e)},t.IsUndefined=r,t.IsNull=i,t.IsBoolean=o,t.IsNumber=s,t.IsInteger=function(e){return s(e)&&Number.isInteger(e)},t.IsBigInt=a,t.IsString=c,t.IsFunction=l,t.IsSymbol=u,t.IsValueType=function(e){return a(e)||o(e)||i(e)||s(e)||c(e)||u(e)||r(e)}},98050:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=t.ByteMarker=t.ValueHashError=void 0;const r=n(34162);class i extends Error{constructor(e){super("Hash: Unable to hash value"),this.value=e}}var o;t.ValueHashError=i,function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"}(o||(t.ByteMarker=o={}));let s=BigInt("14695981039346656037");const[a,c]=[BigInt("1099511628211"),BigInt("2")**BigInt("64")],l=Array.from({length:256}).map(((e,t)=>BigInt(t))),u=new Float64Array(1),p=new DataView(u.buffer),d=new Uint8Array(u.buffer);function h(e){if(r.IsArray(e))return function(e){f(o.Array);for(const t of e)h(t)}(e);if(r.IsBoolean(e))return function(e){f(o.Boolean),f(e?1:0)}(e);if(r.IsBigInt(e))return function(e){f(o.BigInt),p.setBigInt64(0,e);for(const e of d)f(e)}(e);if(r.IsDate(e))return function(e){f(o.Date),h(e.getTime())}(e);if(!r.IsNull(e)){if(r.IsNumber(e))return function(e){f(o.Number),p.setFloat64(0,e);for(const e of d)f(e)}(e);if(r.IsPlainObject(e))return function(e){f(o.Object);for(const t of globalThis.Object.keys(e).sort())h(t),h(e[t])}(e);if(r.IsString(e))return function(e){f(o.String);for(let t=0;t-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function l(e,t){return new l.Agent(e,t)}!function(e){class t extends i.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,i=null;const o=n.timeout||this.timeout,l=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},u=()=>{i=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",l(e)},p=e=>{r||(null!==i&&(clearTimeout(i),i=null),l(e))},d=t=>{if(r)return;if(null!=i&&(clearTimeout(i),i=null),o=t,Boolean(o)&&"function"==typeof o.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var o;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);l(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(i=setTimeout(u,o)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(d,p)}catch(e){Promise.reject(e).catch(p)}}else l(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(l||(l={})),e.exports=l},59577:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,i)=>{e.call(this,t,n,((e,t)=>{e?i(e):r(t)}))}))}}},97656:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";var r=n(1767),i=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){r.IsInitialized&&(n(72469).wp(e&&t,this._client),n(23805).wp(e,this._client),n(27916).wp(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();e.exports=i},6751:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationContextManager=void 0;var r=n(12010),i=n(1767),o=n(23452),s=n(48410),a=n(55128),c=n(77649),l=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,o){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new u(r)}:null},e.spanToContextObject=function(t,n,r){var i=new o;return i.traceId=t.traceId,i.spanId=t.spanId,i.traceFlag=o.formatOpenTelemetryTraceFlags(t.traceFlags)||o.DEFAULT_TRACE_FLAG,i.parentId=n,e.generateContextObject(i.traceId,i.parentId,r,null,i)},e.runWithContext=function(t,n){var i;if(e.enabled)try{return e.session.bind(n,((i={})[e.CONTEXT_NAME]=t,i))()}catch(e){r.warn("Error binding to session context",c.dumpObj(e))}return n()},e.wrapEmitter=function(t){if(e.enabled)try{e.session.bindEmitter(t)}catch(e){r.warn("Error binding to session context",c.dumpObj(e))}},e.wrapCallback=function(t,n){var i;if(e.enabled)try{return e.session.bind(t,n?((i={})[e.CONTEXT_NAME]=n,i):void 0)}catch(e){r.warn("Error binding to session context",c.dumpObj(e))}return t},e.enable=function(t){this.enabled||(this.isNodeVersionCompatible()?(e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=n(19172):this.cls=n(92611)),e.session=this.cls.createNamespace("AI-CLS-Session"),i.registerContextPreservation((function(t){try{return e.session.bind(t)}catch(e){r.warn("Error binding to session context",c.dumpObj(e))}}))),this.enabled=!0):this.enabled=!1)},e.startOperation=function(t,n){var i=t&&t.traceContext||null,c=t&&t.spanContext?t:null,l=t&&t.traceId?t:null,u=t&&t.headers;if(c)return this.spanToContextObject(c.spanContext(),c.parentSpanId,c.name);if(l)return this.spanToContextObject(l,"|"+l.traceId+"."+l.spanId+".","string"==typeof n?n:"");var p="string"==typeof n?n:"";if(i){var d=null,h=null;if(p=i.attributes.OperationName||p,n){var f=n;f.headers&&(f.headers.traceparent?d=new o(f.headers.traceparent):f.headers["request-id"]&&(d=new o(null,f.headers["request-id"])),f.headers.tracestate&&(h=new s(f.headers.tracestate)))}d||(d=new o(i.traceparent)),h||(h=new s(i.tracestate));var m=void 0;return"object"==typeof n&&(m=(g=new a(n)).getCorrelationContextHeader(),p=g.getOperationName({})),e.generateContextObject(d.traceId,d.parentId,p,m,d,h)}if(u){d=new o(u.traceparent?u.traceparent.toString():null),h=new s(u.tracestate?u.tracestate.toString():null);var g=new a(t);return e.generateContextObject(d.traceId,d.parentId,g.getOperationName({}),g.getCorrelationContextHeader(),d,h)}return r.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}();t.CorrelationContextManager=l;var u=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;t0&&e.forEach((function(e){var n=e.name;if(void 0!==n){var r=e.value;switch(typeof r){case"function":case"object":break;case"string":t+=" "+n+': "'+r+'",\r\n';break;default:t+=" "+n+": "+r+",\r\n"}}}))}catch(e){this._isEnabled=!1,s.info("Parse client web instrumentation error. Web Instrumentation is disabled")}return t},e.prototype._initialize=function(){this._isInitialized=!0;var t=r.createServer,n=i.createServer,o=this._isEnabled;r.createServer=function(n){var r=n;return r&&(n=function(t,n){var i=n.write,c="GET"==t.method;n.write=function(t,r,l){try{if(o&&c){var u=a.getContentEncodingFromHeaders(n),p=void 0;if("string"==typeof r&&(p=r),null==u)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,void 0,p));else if(u.length){var d=u[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,d)}}}catch(e){s.warn("Inject snippet error: "+e)}return i.apply(n,arguments)};var l=n.end;return n.end=function(t,r,i){if(o&&c)try{if(o&&c){var u=a.getContentEncodingFromHeaders(n),p=void 0;if("string"==typeof r&&(p=r),null==u)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,void 0,p));else if(u.length){var d=u[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,d)}}}catch(e){s.warn("Inject snipet error: "+e)}return l.apply(n,arguments)},r(t,n)}),t(n)},i.createServer=function(t,r){var i=r;if(i)return r=function(t,n){var r="GET"==t.method,c=n.write,l=n.end;return n.write=function(t,i,l){try{if(o&&r){var u=a.getContentEncodingFromHeaders(n),p=void 0;if("string"==typeof i&&(p=i),null==u)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=this.InjectWebSnippet(n,t,void 0,p));else if(u.length){var d=u[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,d)}}}catch(e){s.warn("Inject snippet error: "+e)}return c.apply(n,arguments)},n.end=function(t,i,c){try{if(o&&r){var u=a.getContentEncodingFromHeaders(n),p=void 0;if("string"==typeof i&&(p=i),null==u)e.INSTANCE.ValidateInjection(n,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,void 0,p));else if(u.length){var d=u[0];arguments[0]=e.INSTANCE.InjectWebSnippet(n,t,d)}}}catch(e){s.warn("Inject snippet error: "+e)}return l.apply(n,arguments)},i(t,n)},n(t,r)}},e.prototype.ValidateInjection=function(t,n){try{if(!t||!n||200!=t.statusCode)return!1;if(!a.isContentTypeHeaderHtml(t))return!1;var r=n.slice().toString();if(r.indexOf("")>=0&&r.indexOf("")>=0&&r.indexOf(e._aiUrl)<0&&r.indexOf(e._aiDeprecatedUrl)<0)return!0}catch(e){s.info("validate injections error: "+e)}return!1},e.prototype.InjectWebSnippet=function(t,n,r,i){try{if(r)t.removeHeader("Content-Length"),n=this._getInjectedCompressBuffer(t,n,r),t.setHeader("Content-Length",n.length);else{var o=n.toString(),c=o.indexOf("");if(c<0)return n;var l=a.insertSnippetByIndex(c,o,e._snippet);if("string"==typeof n)t.removeHeader("Content-Length"),n=l,t.setHeader("Content-Length",Buffer.byteLength(n));else if(Buffer.isBuffer(n)){var u=i||"utf8";if(a.isBufferType(n,u)){t.removeHeader("Content-Length");var p=Buffer.from(l).toString(u);n=Buffer.from(p,u),t.setHeader("Content-Length",n.length)}}}}catch(e){s.warn("Failed to inject web snippet and change content-lenght headers. Exception:"+e)}return n},e.prototype._getInjectedCompressBuffer=function(e,t,n){try{switch(n){case a.contentEncodingMethod.GZIP:var r=o.gunzipSync(t);if(this.ValidateInjection(e,r)){var i=this.InjectWebSnippet(e,r);t=o.gzipSync(i)}break;case a.contentEncodingMethod.DEFLATE:var c=o.inflateSync(t);if(this.ValidateInjection(e,c)){var l=this.InjectWebSnippet(e,c);t=o.deflateSync(l)}break;case a.contentEncodingMethod.BR:var u=a.getBrotliDecompressSync(o),p=a.getBrotliCompressSync(o);if(u&&p){var d=u(t);this.ValidateInjection(e,d)&&(t=p(this.InjectWebSnippet(e,d)));break}}}catch(e){s.info("get web injection compress buffer error: "+e)}return t},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e}();e.exports=d},51148:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spanToTelemetryContract=void 0;var r=n(57310),i=n(60311),o=n(82204),s=n(85315),a=n(51148),c=n(77649);function l(e){if(e.attributes[o.SemanticAttributes.HTTP_METHOD]){var t=e.attributes[o.SemanticAttributes.HTTP_URL];if(t)return String(t);var n=e.attributes[o.SemanticAttributes.HTTP_SCHEME],r=e.attributes[o.SemanticAttributes.HTTP_TARGET];if(n&&r){var i=e.attributes[o.SemanticAttributes.HTTP_HOST];if(i)return n+"://"+i+r;var s=e.attributes[o.SemanticAttributes.NET_PEER_PORT];if(s){var a=e.attributes[o.SemanticAttributes.NET_PEER_NAME];if(a)return n+"://"+a+":"+s+r;var c=e.attributes[o.SemanticAttributes.NET_PEER_IP];if(c)return n+"://"+c+":"+s+r}}}return""}function u(e){var t=e.attributes[o.SemanticAttributes.PEER_SERVICE],n=e.attributes[o.SemanticAttributes.HTTP_HOST],r=e.attributes[o.SemanticAttributes.HTTP_URL],i=e.attributes[o.SemanticAttributes.NET_PEER_NAME],s=e.attributes[o.SemanticAttributes.NET_PEER_IP];return t?String(t):n?String(n):r?String(r):i?String(i):s?String(s):""}t.spanToTelemetryContract=function(e){var t;switch(e.kind){case i.SpanKind.CLIENT:case i.SpanKind.PRODUCER:case i.SpanKind.INTERNAL:t=function(e){var t={name:e.name,success:e.status.code!=i.SpanStatusCode.ERROR,resultCode:"0",duration:0,data:"",dependencyTypeName:""};e.kind===i.SpanKind.PRODUCER&&(t.dependencyTypeName=s.DependencyTypeName.QueueMessage),e.kind===i.SpanKind.INTERNAL&&e.parentSpanId&&(t.dependencyTypeName=s.DependencyTypeName.InProc);var n=e.attributes[o.SemanticAttributes.HTTP_METHOD],a=e.attributes[o.SemanticAttributes.DB_SYSTEM],c=e.attributes[o.SemanticAttributes.RPC_SYSTEM];if(n){t.dependencyTypeName=s.DependencyTypeName.Http;var p=e.attributes[o.SemanticAttributes.HTTP_URL];if(p){var d="";try{d=new r.URL(String(p)).pathname}catch(e){}t.name=n+" "+d}t.data=l(e);var h=e.attributes[o.SemanticAttributes.HTTP_STATUS_CODE];if(h&&(t.resultCode=String(h)),v=u(e)){try{var f=new RegExp(/(https?)(:\/\/.*)(:\d+)(\S*)/).exec(v);if(null!=f){var m=f[1],g=f[3];("https"==m&&":443"==g||"http"==m&&":80"==g)&&(v=f[1]+f[2]+f[4])}}catch(e){}t.target=""+v}}else if(a){String(a)===o.DbSystemValues.MYSQL?t.dependencyTypeName="mysql":String(a)===o.DbSystemValues.POSTGRESQL?t.dependencyTypeName="postgresql":String(a)===o.DbSystemValues.MONGODB?t.dependencyTypeName="mongodb":String(a)===o.DbSystemValues.REDIS?t.dependencyTypeName="redis":function(e){return e===o.DbSystemValues.DB2||e===o.DbSystemValues.DERBY||e===o.DbSystemValues.MARIADB||e===o.DbSystemValues.MSSQL||e===o.DbSystemValues.ORACLE||e===o.DbSystemValues.SQLITE||e===o.DbSystemValues.OTHER_SQL||e===o.DbSystemValues.HSQLDB||e===o.DbSystemValues.H2}(String(a))?t.dependencyTypeName="SQL":t.dependencyTypeName=String(a);var y=e.attributes[o.SemanticAttributes.DB_STATEMENT],_=e.attributes[o.SemanticAttributes.DB_OPERATION];y?t.data=String(y):_&&(t.data=String(_));var v=u(e),b=e.attributes[o.SemanticAttributes.DB_NAME];t.target=v?b?v+"|"+b:""+v:b?""+b:""+a}else if(c){t.dependencyTypeName=s.DependencyTypeName.Grpc;var T=e.attributes[o.SemanticAttributes.RPC_GRPC_STATUS_CODE];T&&(t.resultCode=String(T)),(v=u(e))?t.target=""+v:c&&(t.target=String(c))}return t}(e);break;case i.SpanKind.SERVER:case i.SpanKind.CONSUMER:t=function(e){var t={name:e.name,success:e.status.code!=i.SpanStatusCode.ERROR,resultCode:"0",duration:0,url:"",source:void 0},n=e.attributes[o.SemanticAttributes.HTTP_METHOD],s=e.attributes[o.SemanticAttributes.RPC_GRPC_STATUS_CODE];if(n){if(e.kind==i.SpanKind.SERVER){var a=e.attributes[o.SemanticAttributes.HTTP_ROUTE],c=e.attributes[o.SemanticAttributes.HTTP_URL];if(a)t.name=n+" "+a;else if(c)try{var u=new r.URL(String(c));t.name=n+" "+u.pathname}catch(e){}}t.url=l(e);var p=e.attributes[o.SemanticAttributes.HTTP_STATUS_CODE];p&&(t.resultCode=String(p))}else s&&(t.resultCode=String(s));return t}(e)}var n=""+(e.spanContext?e.spanContext():e.context()).spanId,p=Math.round(1e3*e.duration[0]+e.duration[1]/1e6);return t.id=n,t.duration=p,t.properties=function(e){for(var t={},n=0,r=Object.keys(e.attributes);n0&&(t["_MS.links"]=c.stringify(o)),t}(e),e.attributes[s.AzNamespace]&&(e.kind===i.SpanKind.INTERNAL&&(t.dependencyTypeName=s.DependencyTypeName.InProc+" | "+e.attributes[s.AzNamespace]),e.attributes[s.AzNamespace]===s.MicrosoftEventHub&&a.parseEventHubSpan(e,t)),t}},24364:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var r=n(60311),i=n(85315),o=n(66932),s=n(62450),a=n(97656),c=[];t.qP=function(e){try{var t=e.data,n=s.spanToTelemetryContract(t);a.AsyncScopeManager.with(t,(function(){c.forEach((function(e){t.kind===r.SpanKind.SERVER||t.kind===r.SpanKind.CONSUMER?e.trackRequest(n):t.kind!==r.SpanKind.CLIENT&&t.kind!==r.SpanKind.INTERNAL&&t.kind!==r.SpanKind.PRODUCER||e.trackDependency(n)}))}))}catch(e){}},t.wp=function(e,n){if(e){if(c.find((function(e){return e==n})))return;0===c.length&&o.channel.subscribe("azure-coretracing",t.qP,o.trueFilter,(function(e,t){var r=n.getStatsbeat();r&&r.addInstrumentation(i.StatsbeatInstrumentation.AZURE_CORE_TRACING)})),c.push(n)}else 0===(c=c.filter((function(e){return e!=n}))).length&&o.channel.unsubscribe("azure-coretracing",t.qP)}},23805:(e,t,n)=>{"use strict";t.wp=void 0;var r=n(85512),i=n(85315),o=n(66932),s=[],a={10:r.SeverityLevel.Verbose,20:r.SeverityLevel.Verbose,30:r.SeverityLevel.Information,40:r.SeverityLevel.Warning,50:r.SeverityLevel.Error,60:r.SeverityLevel.Critical},c=function(e){var t=e.data.result,n=a[e.data.level];s.forEach((function(e){try{var r=JSON.parse(t);if(r.err){var i=new Error(r.err.message);return i.name=r.err.name,i.stack=r.err.stack,e.config.enableLoggerErrorToTrace?void e.trackTrace({message:t,severity:n}):void e.trackException({exception:i})}}catch(e){}e.trackTrace({message:t,severity:n})}))};t.wp=function(e,t){if(e){if(s.find((function(e){return e==t})))return;0===s.length&&o.channel.subscribe("bunyan",c,o.trueFilter,(function(e,n){var r=t.getStatsbeat();r&&r.addInstrumentation(i.StatsbeatInstrumentation.BUNYAN)})),s.push(t)}else 0===(s=s.filter((function(e){return e!=t}))).length&&o.channel.unsubscribe("bunyan",c)}},72469:(e,t,n)=>{"use strict";t.wp=void 0;var r=n(85512),i=n(85315),o=n(66932),s=[],a=function(e){var t=e.data.message;s.forEach((function(n){t instanceof Error&&!n.config.enableLoggerErrorToTrace?n.trackException({exception:t}):t instanceof Error?n.trackTrace({message:t.toString(),severity:e.data.stderr?r.SeverityLevel.Error:r.SeverityLevel.Information}):(t.lastIndexOf("\n")==t.length-1&&(t=t.substring(0,t.length-1)),n.trackTrace({message:t,severity:e.data.stderr?r.SeverityLevel.Warning:r.SeverityLevel.Information}))}))};t.wp=function(e,t){if(e){if(s.find((function(e){return e==t})))return;0===s.length&&o.channel.subscribe("console",a,o.trueFilter,(function(e,n){var r=t.getStatsbeat();r&&r.addInstrumentation(i.StatsbeatInstrumentation.CONSOLE)})),s.push(t)}else 0===(s=s.filter((function(e){return e!=t}))).length&&o.channel.unsubscribe("console",a)}},1767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerContextPreservation=t.IsInitialized=void 0;var r=n(12010),i=n(38286);t.IsInitialized=!i.JsonConfig.getInstance().noDiagnosticChannel;var o="DiagnosticChannel";if(t.IsInitialized){var s=n(6315),a=i.JsonConfig.getInstance().noPatchModules.split(","),c={bunyan:s.bunyan,console:s.console,mongodb:s.mongodb,mongodbCore:s.mongodbCore,mysql:s.mysql,redis:s.redis,pg:s.pg,pgPool:s.pgPool,winston:s.winston,azuresdk:s.azuresdk};for(var l in c)-1===a.indexOf(l)&&(c[l].enable(),r.info(o,"Subscribed to "+l+" events"));a.length>0&&r.info(o,"Some modules will not be patched",a)}else r.info(o,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");t.registerContextPreservation=function(e){t.IsInitialized&&n(66932).channel.addContextPreservation(e)}},45452:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var r=n(85315),i=n(66932),o=[];t.qP=function(e){"ismaster"!==e.data.event.commandName&&o.forEach((function(t){var n=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:n,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",time:e.data.startedData.time,dependencyTypeName:"mongodb"})}))},t.wp=function(e,n){if(e){if(o.find((function(e){return e==n})))return;0===o.length&&i.channel.subscribe("mongodb",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(r.StatsbeatInstrumentation.MONGODB)})),o.push(n)}else 0===(o=o.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("mongodb",t.qP)}},62953:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var r=n(85315),i=n(66932),o=[];t.qP=function(e){o.forEach((function(t){var n=e.data.query||{},r=n.sql||"Unknown query",i=!e.data.err,o=(n._connection||{}).config||{},s=o.socketPath?o.socketPath:(o.host||"localhost")+":"+o.port;t.trackDependency({target:s,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"mysql"})}))},t.wp=function(e,n){if(e){if(o.find((function(e){return e==n})))return;0===o.length&&i.channel.subscribe("mysql",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(r.StatsbeatInstrumentation.MYSQL)})),o.push(n)}else 0===(o=o.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("mysql",t.qP)}},18998:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var r=n(85315),i=n(66932),o=[];t.qP=function(e){o.forEach((function(t){var n=e.data.query,r=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!e.data.error,o=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:o,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"postgres"})}))},t.wp=function(e,n){if(e){if(o.find((function(e){return e==n})))return;0===o.length&&i.channel.subscribe("postgres",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(r.StatsbeatInstrumentation.POSTGRES)})),o.push(n)}else 0===(o=o.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("postgres",t.qP)}},39215:(e,t,n)=>{"use strict";t.wp=t.qP=void 0;var r=n(85315),i=n(66932),o=[];t.qP=function(e){o.forEach((function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",time:e.data.time,dependencyTypeName:"redis"})}))},t.wp=function(e,n){if(e){if(o.find((function(e){return e==n})))return;0===o.length&&i.channel.subscribe("redis",t.qP,i.trueFilter,(function(e,t){var i=n.getStatsbeat();i&&i.addInstrumentation(r.StatsbeatInstrumentation.REDIS)})),o.push(n)}else 0===(o=o.filter((function(e){return e!=n}))).length&&i.channel.unsubscribe("redis",t.qP)}},27916:(e,t,n)=>{"use strict";t.wp=void 0;var r=n(85315),i=n(85512),o=n(66932),s=[],a={syslog:function(e){var t={emerg:i.SeverityLevel.Critical,alert:i.SeverityLevel.Critical,crit:i.SeverityLevel.Critical,error:i.SeverityLevel.Error,warning:i.SeverityLevel.Warning,notice:i.SeverityLevel.Information,info:i.SeverityLevel.Information,debug:i.SeverityLevel.Verbose};return void 0===t[e]?i.SeverityLevel.Information:t[e]},npm:function(e){var t={error:i.SeverityLevel.Error,warn:i.SeverityLevel.Warning,info:i.SeverityLevel.Information,verbose:i.SeverityLevel.Verbose,debug:i.SeverityLevel.Verbose,silly:i.SeverityLevel.Verbose};return void 0===t[e]?i.SeverityLevel.Information:t[e]},unknown:function(e){return i.SeverityLevel.Information}},c=function(e){var t=e.data.message,n=a[e.data.levelKind](e.data.level);s.forEach((function(r){t instanceof Error&&!r.config.enableLoggerErrorToTrace?r.trackException({exception:t,properties:e.data.meta}):t instanceof Error?r.trackTrace({message:t.toString(),severity:n,properties:e.data.meta}):r.trackTrace({message:t,severity:n,properties:e.data.meta})}))};t.wp=function(e,t){if(e){if(s.find((function(e){return e==t})))return;0===s.length&&o.channel.subscribe("winston",c,o.trueFilter,(function(e,n){var i=t.getStatsbeat();i&&i.addInstrumentation(r.StatsbeatInstrumentation.WINSTON)})),s.push(t)}else 0===(s=s.filter((function(e){return e!=t}))).length&&o.channel.unsubscribe("winston",c)}},85315:(e,t)=>{"use strict";var n,r,i,o,s,a,c,l;Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_INSTRUMENTATION_DEPRECATED_SOURCE=t.WEB_INSTRUMENTATION_DEFAULT_SOURCE=t.TIME_SINCE_ENQUEUED=t.ENQUEUED_TIME=t.MessageBusDestination=t.MicrosoftEventHub=t.AzNamespace=t.StatsbeatNetworkCategory=t.StatsbeatFeatureType=t.StatsbeatInstrumentation=t.StatsbeatFeature=t.StatsbeatCounter=t.StatsbeatAttach=t.StatsbeatResourceProvider=t.StatsbeatTelemetryName=t.HeartBeatMetricName=t.DependencyTypeName=t.TelemetryTypeStringToQuickPulseDocumentType=t.TelemetryTypeStringToQuickPulseType=t.QuickPulseType=t.QuickPulseDocumentType=t.PerformanceToQuickPulseCounter=t.MetricId=t.PerformanceCounter=t.QuickPulseCounter=t.DEFAULT_LIVEMETRICS_HOST=t.DEFAULT_LIVEMETRICS_ENDPOINT=t.DEFAULT_BREEZE_ENDPOINT=t.APPLICATION_INSIGHTS_SDK_VERSION=void 0,t.APPLICATION_INSIGHTS_SDK_VERSION="2.6.0",t.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",function(e){e.COMMITTED_BYTES="\\Memory\\Committed Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",e.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",e.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",e.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",e.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",e.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",e.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"}(r=t.QuickPulseCounter||(t.QuickPulseCounter={})),function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(i=t.PerformanceCounter||(t.PerformanceCounter={})),(l=t.MetricId||(t.MetricId={})).REQUESTS_DURATION="requests/duration",l.DEPENDENCIES_DURATION="dependencies/duration",l.EXCEPTIONS_COUNT="exceptions/count",l.TRACES_COUNT="traces/count",t.PerformanceToQuickPulseCounter=((n={})[i.PROCESSOR_TIME]=r.PROCESSOR_TIME,n[i.REQUEST_RATE]=r.REQUEST_RATE,n[i.REQUEST_DURATION]=r.REQUEST_DURATION,n[r.COMMITTED_BYTES]=r.COMMITTED_BYTES,n[r.REQUEST_FAILURE_RATE]=r.REQUEST_FAILURE_RATE,n[r.DEPENDENCY_RATE]=r.DEPENDENCY_RATE,n[r.DEPENDENCY_FAILURE_RATE]=r.DEPENDENCY_FAILURE_RATE,n[r.DEPENDENCY_DURATION]=r.DEPENDENCY_DURATION,n[r.EXCEPTION_RATE]=r.EXCEPTION_RATE,n),t.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"},t.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"},t.TelemetryTypeStringToQuickPulseType={EventData:t.QuickPulseType.Event,ExceptionData:t.QuickPulseType.Exception,MessageData:t.QuickPulseType.Trace,MetricData:t.QuickPulseType.Metric,RequestData:t.QuickPulseType.Request,RemoteDependencyData:t.QuickPulseType.Dependency,AvailabilityData:t.QuickPulseType.Availability,PageViewData:t.QuickPulseType.PageView},t.TelemetryTypeStringToQuickPulseDocumentType={EventData:t.QuickPulseDocumentType.Event,ExceptionData:t.QuickPulseDocumentType.Exception,MessageData:t.QuickPulseDocumentType.Trace,MetricData:t.QuickPulseDocumentType.Metric,RequestData:t.QuickPulseDocumentType.Request,RemoteDependencyData:t.QuickPulseDocumentType.Dependency,AvailabilityData:t.QuickPulseDocumentType.Availability,PageViewData:t.QuickPulseDocumentType.PageView},t.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc",Sql:"SQL",QueueMessage:"Queue Message"},t.HeartBeatMetricName="HeartbeatState",t.StatsbeatTelemetryName="Statsbeat",t.StatsbeatResourceProvider={appsvc:"appsvc",functions:"functions",vm:"vm",unknown:"unknown"},t.StatsbeatAttach={codeless:"codeless",sdk:"sdk"},t.StatsbeatCounter={REQUEST_SUCCESS:"Request Success Count",REQUEST_FAILURE:"Request Failure Count",REQUEST_DURATION:"Request Duration",RETRY_COUNT:"Retry Count",THROTTLE_COUNT:"Throttle Count",EXCEPTION_COUNT:"Exception Count",ATTACH:"Attach",FEATURE:"Feature"},(c=t.StatsbeatFeature||(t.StatsbeatFeature={}))[c.NONE=0]="NONE",c[c.DISK_RETRY=1]="DISK_RETRY",c[c.AAD_HANDLING=2]="AAD_HANDLING",c[c.WEB_SNIPPET=4]="WEB_SNIPPET",(a=t.StatsbeatInstrumentation||(t.StatsbeatInstrumentation={}))[a.NONE=0]="NONE",a[a.AZURE_CORE_TRACING=1]="AZURE_CORE_TRACING",a[a.MONGODB=2]="MONGODB",a[a.MYSQL=4]="MYSQL",a[a.REDIS=8]="REDIS",a[a.POSTGRES=16]="POSTGRES",a[a.BUNYAN=32]="BUNYAN",a[a.WINSTON=64]="WINSTON",a[a.CONSOLE=128]="CONSOLE",(s=t.StatsbeatFeatureType||(t.StatsbeatFeatureType={}))[s.Feature=0]="Feature",s[s.Instrumentation=1]="Instrumentation",(o=t.StatsbeatNetworkCategory||(t.StatsbeatNetworkCategory={}))[o.Breeze=0]="Breeze",o[o.Quickpulse=1]="Quickpulse",t.AzNamespace="az.namespace",t.MicrosoftEventHub="Microsoft.EventHub",t.MessageBusDestination="message_bus.destination",t.ENQUEUED_TIME="enqueuedTime",t.TIME_SINCE_ENQUEUED="timeSinceEnqueued",t.WEB_INSTRUMENTATION_DEFAULT_SOURCE="https://js.monitor.azure.com/scripts/b/ai",t.WEB_INSTRUMENTATION_DEPRECATED_SOURCE="https://az416426.vo.msecnd.net/scripts/b/ai"},12436:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.domainSupportsProperties=t.RemoteDependencyDataConstants=void 0;var r=n(93809),i=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();t.RemoteDependencyDataConstants=i,t.domainSupportsProperties=function(e){return"properties"in e||e instanceof r.EventData||e instanceof r.ExceptionData||e instanceof r.MessageData||e instanceof r.MetricData||e instanceof r.PageViewData||e instanceof r.RemoteDependencyData||e instanceof r.RequestData}},48517:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(48707));e.exports=o},88915:e=>{"use strict";e.exports=function(){}},61886:e=>{"use strict";e.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"}},97878:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){return e.call(this)||this}return i(t,e),t}(n(88915));e.exports=o},946:(e,t,n)=>{"use strict";var r=n(14964);e.exports=function(){this.kind=r.Measurement}},14964:e=>{"use strict";var t;!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(t||(t={})),e.exports=t},48707:e=>{"use strict";e.exports=function(){}},6441:e=>{"use strict";e.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}},43139:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(48707));e.exports=o},46157:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return i(t,e),t}(n(48707));e.exports=o},49668:e=>{"use strict";e.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}},85397:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return i(t,e),t}(n(48707));e.exports=o},17059:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return i(t,e),t}(n(48707));e.exports=o},39731:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(43139));e.exports=o},5520:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return i(t,e),t}(n(48707));e.exports=o},43739:function(e,t,n){"use strict";var r,i=this&&this.__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])},r(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)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(n(48707));e.exports=o},70595:e=>{"use strict";var t;!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(t||(t={})),e.exports=t},33076:e=>{"use strict";e.exports=function(){}},93809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvailabilityData=n(48517),t.Base=n(88915),t.ContextTagKeys=n(61886),t.Data=n(97878),t.DataPoint=n(946),t.DataPointType=n(14964),t.Domain=n(48707),t.Envelope=n(6441),t.EventData=n(43139),t.ExceptionData=n(46157),t.ExceptionDetails=n(49668),t.MessageData=n(85397),t.MetricData=n(17059),t.PageViewData=n(39731),t.RemoteDependencyData=n(5520),t.RequestData=n(43739),t.SeverityLevel=n(70595),t.StackFrame=n(33076)},22494:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12139:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},21036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1830:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15327:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},38983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},59390:function(e,t,n){"use strict";var r=this&&this.__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]}),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}),i(n(38983),t),i(n(21036),t),i(n(12139),t),i(n(95610),t),i(n(15327),t),i(n(22494),t),i(n(60476),t),i(n(1830),t)},43025:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},20132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},81505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},83103:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},40421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},83454:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},53991:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},47586:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},99571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},24806:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95263:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryType=t.TelemetryTypeString=t.baseTypeToTelemetryType=t.telemetryTypeToBaseType=void 0,t.telemetryTypeToBaseType=function(e){switch(e){case n.Event:return"EventData";case n.Exception:return"ExceptionData";case n.Trace:return"MessageData";case n.Metric:return"MetricData";case n.Request:return"RequestData";case n.Dependency:return"RemoteDependencyData";case n.Availability:return"AvailabilityData";case n.PageView:return"PageViewData"}},t.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return n.Event;case"ExceptionData":return n.Exception;case"MessageData":return n.Trace;case"MetricData":return n.Metric;case"RequestData":return n.Request;case"RemoteDependencyData":return n.Dependency;case"AvailabilityData":return n.Availability;case"PageViewData":return n.PageView}},t.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},function(e){e[e.Event=0]="Event",e[e.Exception=1]="Exception",e[e.Trace=2]="Trace",e[e.Metric=3]="Metric",e[e.Request=4]="Request",e[e.Dependency=5]="Dependency",e[e.Availability=6]="Availability",e[e.PageView=7]="PageView"}(n=t.TelemetryType||(t.TelemetryType={}))},14269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10234:function(e,t,n){"use strict";var r=this&&this.__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]}),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}),i(n(20132),t),i(n(81505),t),i(n(83103),t),i(n(40421),t),i(n(99571),t),i(n(14269),t),i(n(24806),t),i(n(83454),t),i(n(53991),t),i(n(43025),t),i(n(47586),t),i(n(37772),t),i(n(95263),t)},85512:function(e,t,n){"use strict";var r=this&&this.__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]}),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}),i(n(12436),t),i(n(93809),t),i(n(10234),t),i(n(59390),t)},71204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregatedMetricCounter=void 0;t.AggregatedMetricCounter=function(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}},32339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreaggregatedMetricPropertyNames=void 0,t.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}},58731:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AzureVirtualMachine=void 0;var r=n(12010),i=n(77649),o=n(29816),s=function(){function e(){}return e.getAzureComputeMetadata=function(t,n){var s,a=this,c={},l=((s={method:"GET"})[o.disableCollectionRequestOption]=!0,s.headers={Metadata:"True"},s),u=i.makeRequest(t,"http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01&format=json",l,(function(t){if(200===t.statusCode){c.isVM=!0;var i="";t.on("data",(function(e){i+=e})),t.on("end",(function(){try{var t=JSON.parse(i);c.id=t.vmId||"",c.subscriptionId=t.subscriptionId||"",c.osType=t.osType||""}catch(t){r.info(e.TAG,t)}n(c)}))}else n(c)}),!1,!1);u&&(setTimeout((function(){a._requestTimedOut=!0,u.abort()}),e.HTTP_TIMEOUT),u.on("error",(function(t){a._requestTimedOut&&t&&(t.name="telemetry timeout",t.message="telemetry request timed out"),t&&t.message&&t.message.indexOf("UNREACH")>-1?c.isVM=!1:r.info(e.TAG,t),n(c)})),u.end())},e.HTTP_TIMEOUT=2500,e.TAG="AzureVirtualMachine",e}();t.AzureVirtualMachine=s},4240:(e,t,n)=>{"use strict";var r=n(12010),i=n(77649),o=function(){function e(e,t,n,r){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=n,this._sender=r}return e.prototype.setUseDiskRetryCaching=function(e,t,n){this._sender.setDiskRetryMode(e,t,n)},e.prototype.send=function(e){var t=this;this._isDisabled()||(e?(this._buffer.push(e),this._buffer.length>=this._getBatchSize()?this.triggerSend(!1):!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout((function(){t._timeoutHandle=null,t.triggerSend(!1)}),this._getBatchIntervalMs()))):r.warn("Cannot send null/undefined telemetry"))},e.prototype.triggerSend=function(e,t){var n=this._buffer.length<1;n||(e||i.isNodeExit?(this._sender.saveOnCrash(this._buffer),"function"==typeof t&&t("data saved on crash")):this._sender.send(this._buffer,t)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&"function"==typeof t&&t("no data to send")},e}();e.exports=o},12049:(e,t,n)=>{"use strict";var r=n(26590),i=n(42495),o=n(12010),s=n(85315),a=n(57310),c=n(38286),l=function(){function e(t){this._endpointBase=s.DEFAULT_BREEZE_ENDPOINT,this._mergeConfig();var n=this._connectionString,r=i.parse(t),o=i.parse(n),c=!r.instrumentationkey&&Object.keys(r).length>0?null:t,l=this._instrumentationKey;this.instrumentationKey=r.instrumentationkey||c||o.instrumentationkey||l;var u=""+(this.endpointUrl||r.ingestionendpoint||o.ingestionendpoint||this._endpointBase);u.endsWith("/")&&(u=u.slice(0,-1)),this.endpointUrl=u+"/v2.1/track",this.maxBatchSize=this.maxBatchSize||250,this.maxBatchIntervalMs=this.maxBatchIntervalMs||15e3,this.disableAppInsights=this.disableAppInsights||!1,this.samplingPercentage=this.samplingPercentage||100,this.correlationIdRetryIntervalMs=this.correlationIdRetryIntervalMs||3e4,this.enableWebInstrumentation=this.enableWebInstrumentation||this.enableAutoWebSnippetInjection||!1,this.webInstrumentationConfig=this.webInstrumentationConfig||null,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.correlationHeaderExcludedDomains=this.correlationHeaderExcludedDomains||["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.ignoreLegacyHeaders=this.ignoreLegacyHeaders||!1,this.profileQueryEndpoint=r.ingestionendpoint||o.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this._endpointBase,this.quickPulseHost=this.quickPulseHost||r.liveendpoint||o.liveendpoint||process.env[e.ENV_quickPulseHost]||s.DEFAULT_LIVEMETRICS_HOST,this.webInstrumentationConnectionString=this.webInstrumentationConnectionString||this._webInstrumentationConnectionString||"",this.webSnippetConnectionString=this.webInstrumentationConnectionString,this.quickPulseHost.match(/^https?:\/\//)&&(this.quickPulseHost=new a.URL(this.quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){this._profileQueryEndpoint=e,this.correlationId=r.correlationIdPrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instrumentationKey",{get:function(){return this._instrumentationKey},set:function(t){e._validateInstrumentationKey(t)||o.warn("An invalid instrumentation key was provided. There may be resulting telemetry loss",this.instrumentationKey),this._instrumentationKey=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"webSnippetConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"webInstrumentationConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),e.prototype._mergeConfig=function(){var e=c.JsonConfig.getInstance();this._connectionString=e.connectionString,this._instrumentationKey=e.instrumentationKey,this.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains,this.correlationIdRetryIntervalMs=e.correlationIdRetryIntervalMs,this.disableAllExtendedMetrics=e.disableAllExtendedMetrics,this.disableAppInsights=e.disableAppInsights,this.disableStatsbeat=e.disableStatsbeat,this.distributedTracingMode=e.distributedTracingMode,this.enableAutoCollectConsole=e.enableAutoCollectConsole,this.enableLoggerErrorToTrace=e.enableLoggerErrorToTrace,this.enableAutoCollectDependencies=e.enableAutoCollectDependencies,this.enableAutoCollectIncomingRequestAzureFunctions=e.enableAutoCollectIncomingRequestAzureFunctions,this.enableAutoCollectExceptions=e.enableAutoCollectExceptions,this.enableAutoCollectExtendedMetrics=e.enableAutoCollectExtendedMetrics,this.enableAutoCollectExternalLoggers=e.enableAutoCollectExternalLoggers,this.enableAutoCollectHeartbeat=e.enableAutoCollectHeartbeat,this.enableAutoCollectPerformance=e.enableAutoCollectPerformance,this.enableAutoCollectPreAggregatedMetrics=e.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectRequests=e.enableAutoCollectRequests,this.enableAutoDependencyCorrelation=e.enableAutoDependencyCorrelation,this.enableInternalDebugLogging=e.enableInternalDebugLogging,this.enableInternalWarningLogging=e.enableInternalWarningLogging,this.enableResendInterval=e.enableResendInterval,this.enableMaxBytesOnDisk=e.enableMaxBytesOnDisk,this.enableSendLiveMetrics=e.enableSendLiveMetrics,this.enableUseAsyncHooks=e.enableUseAsyncHooks,this.enableUseDiskRetryCaching=e.enableUseDiskRetryCaching,this.endpointUrl=e.endpointUrl,this.extendedMetricDisablers=e.extendedMetricDisablers,this.ignoreLegacyHeaders=e.ignoreLegacyHeaders,this.maxBatchIntervalMs=e.maxBatchIntervalMs,this.maxBatchSize=e.maxBatchSize,this.proxyHttpUrl=e.proxyHttpUrl,this.proxyHttpsUrl=e.proxyHttpsUrl,this.quickPulseHost=e.quickPulseHost,this.samplingPercentage=e.samplingPercentage,this.enableWebInstrumentation=e.enableWebInstrumentation,this._webInstrumentationConnectionString=e.webInstrumentationConnectionString,this.webInstrumentationConfig=e.webInstrumentationConfig,this.webInstrumentationSrc=e.webInstrumentationSrc},e._validateInstrumentationKey=function(e){return new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e}();e.exports=l},42495:(e,t,n)=>{"use strict";var r=n(85315),i=function(){function e(){}return e.parse=function(t){if(!t)return{};var n=t.split(e._FIELDS_SEPARATOR).reduce((function(t,n){var r=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===r.length){var i=r[0].toLowerCase(),o=r[1];t[i]=o}return t}),{});if(Object.keys(n).length>0){if(n.endpointsuffix){var i=n.location?n.location+".":"";n.ingestionendpoint=n.ingestionendpoint||"https://"+i+"dc."+n.endpointsuffix,n.liveendpoint=n.liveendpoint||"https://"+i+"live."+n.endpointsuffix}n.ingestionendpoint=n.ingestionendpoint||r.DEFAULT_BREEZE_ENDPOINT,n.liveendpoint=n.liveendpoint||r.DEFAULT_LIVEMETRICS_ENDPOINT}return n},e.isIkeyValid=function(e){return!(!e||""==e)&&new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();e.exports=i},82028:(e,t,n)=>{"use strict";var r=n(22037),i=n(57147),o=n(71017),s=n(85512),a=n(85315),c=n(12010),l=function(){function e(e){this.keys=new s.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||o.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.appVersion[t]=n.version)}catch(e){c.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){var t=r&&r.hostname(),n=e.DefaultRoleName;process.env.WEBSITE_SITE_NAME&&(n=process.env.WEBSITE_SITE_NAME),process.env.WEBSITE_INSTANCE_ID&&(t=process.env.WEBSITE_INSTANCE_ID),this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=t,this.tags[this.keys.deviceOSVersion]=r&&r.type()+" "+r.release(),this.tags[this.keys.cloudRole]=n,this.tags["ai.device.osArchitecture"]=r&&r.arch(),this.tags["ai.device.osPlatform"]=r&&r.platform()},e.prototype._loadInternalContext=function(){e.sdkVersion=a.APPLICATION_INSIGHTS_SDK_VERSION,this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();e.exports=l},26590:(e,t,n)=>{"use strict";var r=n(77649),i=function(){function e(){}return e.queryCorrelationId=function(e,t){},e.cancelCorrelationIdQuery=function(e,t){},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"|"+r.w3cTraceId()+"."},e.appendSuffix=function(t,n,i){if(t.length+n.lengtho)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(n=r.randomu32().toString(16);n.length<8;)n="0"+n;return t.substring(0,o)+n+"#"},e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.HTTP_TIMEOUT=2500,e.requestIdMaxLength=1024,e.currentRootId=r.randomu32(),e}();e.exports=i},74532:(e,t,n)=>{"use strict";var r=n(85512),i=n(77649),o=n(6751),s=n(12010),a=function(){function e(){}return e.createEnvelope=function(t,n,o,s,a){var c=null;switch(n){case r.TelemetryType.Trace:c=e.createTraceData(t);break;case r.TelemetryType.Dependency:c=e.createDependencyData(t);break;case r.TelemetryType.Event:c=e.createEventData(t);break;case r.TelemetryType.Exception:c=e.createExceptionData(t);break;case r.TelemetryType.Request:c=e.createRequestData(t);break;case r.TelemetryType.Metric:c=e.createMetricData(t);break;case r.TelemetryType.Availability:c=e.createAvailabilityData(t);break;case r.TelemetryType.PageView:c=e.createPageViewData(t)}if(c&&c.baseData&&r.domainSupportsProperties(c.baseData)){if(o)if(c.baseData.properties)for(var l in o)c.baseData.properties[l]||(c.baseData.properties[l]=o[l]);else c.baseData.properties=o;e.addAzureFunctionsCorrelationProperties(c.baseData.properties),c.baseData.properties&&(c.baseData.properties=i.validateStringMap(c.baseData.properties))}var u=a&&a.instrumentationKey||"",p=new r.Envelope;return p.data=c,p.iKey=u,p.name="Microsoft.ApplicationInsights."+u.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),p.tags=this.getTags(s,t.tagOverrides),p.time=(new Date).toISOString(),p.ver=1,p.sampleRate=a?a.samplingPercentage:100,n===r.TelemetryType.Metric&&(p.sampleRate=100),p},e.addAzureFunctionsCorrelationProperties=function(e){var t=o.CorrelationContextManager.getCurrentContext();if(t&&t.customProperties&&t.customProperties.getProperty instanceof Function){e=e||{};var n=t.customProperties.getProperty("InvocationId");n&&(e.InvocationId=n),(n=t.customProperties.getProperty("ProcessId"))&&(e.ProcessId=n),(n=t.customProperties.getProperty("LogLevel"))&&(e.LogLevel=n),(n=t.customProperties.getProperty("Category"))&&(e.Category=n),(n=t.customProperties.getProperty("HostInstanceId"))&&(e.HostInstanceId=n),(n=t.customProperties.getProperty("AzFuncLiveLogsSessionId"))&&(e.AzFuncLiveLogsSessionId=n)}},e.truncateProperties=function(e){if(e.properties)try{for(var t={},n=Object.keys(e.properties),r=Object.values(e.properties),o=0;o0,o.exceptions.push(a);var c=new r.Data;return c.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Exception),c.baseData=o,c},e.createRequestData=function(e){var t,n,o,s,a=new r.RequestData;e.id?a.id=e.id:a.id=i.w3cTraceId(),a.name=null===(t=e.name)||void 0===t?void 0:t.substring(0,1024),a.url=null===(n=e.url)||void 0===n?void 0:n.substring(0,2048),a.source=null===(o=e.source)||void 0===o?void 0:o.substring(0,1024),a.duration=i.msToTimeSpan(e.duration),a.responseCode=null===(s=e.resultCode?e.resultCode.toString():"0")||void 0===s?void 0:s.substring(0,1024),a.success=e.success,a.properties=this.truncateProperties(e),a.measurements=e.measurements;var c=new r.Data;return c.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Request),c.baseData=a,c},e.createMetricData=function(e){var t,n=new r.MetricData;n.metrics=[];var i=new r.DataPoint;i.count=isNaN(e.count)?1:e.count,i.kind=r.DataPointType.Aggregation,i.max=isNaN(e.max)?e.value:e.max,i.min=isNaN(e.min)?e.value:e.min,i.name=null===(t=e.name)||void 0===t?void 0:t.substring(0,1024),i.stdDev=isNaN(e.stdDev)?0:e.stdDev,i.value=e.value,i.ns=e.namespace,n.metrics.push(i),n.properties=this.truncateProperties(e);var o=new r.Data;return o.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Metric),o.baseData=n,o},e.createAvailabilityData=function(e){var t,n,o=new r.AvailabilityData;e.id?o.id=e.id:o.id=i.w3cTraceId(),o.name=null===(t=e.name)||void 0===t?void 0:t.substring(0,1024),o.duration=i.msToTimeSpan(e.duration),o.success=e.success,o.runLocation=e.runLocation,o.message=null===(n=e.message)||void 0===n?void 0:n.substring(0,8192),o.measurements=e.measurements,o.properties=this.truncateProperties(e);var s=new r.Data;return s.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Availability),s.baseData=o,s},e.createPageViewData=function(e){var t,n,o=new r.PageViewData;o.name=null===(t=e.name)||void 0===t?void 0:t.substring(0,1024),o.duration=i.msToTimeSpan(e.duration),o.url=null===(n=e.url)||void 0===n?void 0:n.substring(0,2048),o.measurements=e.measurements,o.properties=this.truncateProperties(e);var s=new r.Data;return s.baseType=r.telemetryTypeToBaseType(r.TelemetryType.PageView),s.baseData=o,s},e.getTags=function(e,t){var n=o.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var i in e.tags)r[i]=e.tags[i];if(t)for(var i in t)r[i]=t[i];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,o=0;o<=n.length;o++){var s=n[o];if(c.regex.test(s)){var a=new c(n[o],r++);i+=a.sizeInBytes,t.push(a)}}if(i>32768)for(var l=0,u=t.length-1,p=0,d=l,h=u;l32768){var f=h-d+1;t.splice(d,f);break}d=l,h=u,l++,u--}}return t},e}(),c=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="",this.assembly=i.trim(t);var r=t.match(e.regex);r&&r.length>=5&&(this.method=i.trim(r[2])||this.method,this.fileName=i.trim(r[4])||"",this.line=parseInt(r[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}();e.exports=a},4147:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55052:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]this.maxSizeBytes?[4,this._createBackupFile(t)]:[3,14];case 13:return i.sent(),[3,16];case 14:return[4,l.appendFileAsync(this._fileFullPath,t)];case 15:i.sent(),i.label=16;case 16:return[3,18];case 17:return o=i.sent(),console.log(this.TAG,"Failed to create backup file: "+(o&&o.message)),[3,18];case 18:return[2]}}))}))},e.prototype._createBackupFile=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,4,5]),[4,l.readFileAsync(this._fileFullPath)];case 1:return t=i.sent(),n=c.join(this._tempDir,(new Date).getTime()+"."+this._logFileName),[4,l.writeFileAsync(n,t)];case 2:return i.sent(),[3,5];case 3:return r=i.sent(),console.log("Failed to generate backup log file",r),[3,5];case 4:return l.writeFileAsync(this._fileFullPath,e),[7];case 5:return[2]}}))}))},e.prototype._fileCleanupTask=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o,s=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,l.readdirAsync(this._tempDir)];case 1:(e=(e=i.sent()).filter((function(e){return c.basename(e).indexOf(s._backUpNameFormat)>-1}))).sort((function(e,t){var n=new Date(parseInt(e.split(s._backUpNameFormat)[0])),r=new Date(parseInt(t.split(s._backUpNameFormat)[0]));return n=r?1:void 0})),t=e.length,n=0,i.label=2;case 2:return n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonConfig=void 0;var r=n(57147),i=n(71017),o=n(12010),s="APPSETTING_",a="APPINSIGHTS_INSTRUMENTATIONKEY",c="APPINSIGHTS_INSTRUMENTATION_KEY",l=function(){function e(){this.connectionString=process.env.APPLICATIONINSIGHTS_CONNECTION_STRING,this.instrumentationKey=process.env[a]||process.env[s+a]||process.env[c]||process.env[s+c],!this.connectionString&&this.instrumentationKey&&o.warn("APPINSIGHTS_INSTRUMENTATIONKEY is in path of deprecation, please use APPLICATIONINSIGHTS_CONNECTION_STRING env variable to setup the SDK."),this.disableAllExtendedMetrics=!!process.env.APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS,this.extendedMetricDisablers=process.env.APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC,this.proxyHttpUrl=process.env.http_proxy,this.proxyHttpsUrl=process.env.https_proxy,this.noDiagnosticChannel=!!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL,this.disableStatsbeat=!!process.env.APPLICATION_INSIGHTS_NO_STATSBEAT,this.noHttpAgentKeepAlive=!!process.env.APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE,this.noPatchModules=process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"",this.enableWebInstrumentation=!!process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED||!!process.env.APPLICATIONINSIGHTS_WEB_SNIPPET_ENABLED,this.webInstrumentationSrc=process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE||"",this.webInstrumentationConnectionString=process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING||process.env.APPLICATIONINSIGHTS_WEB_SNIPPET_CONNECTION_STRING||"",this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.webSnippetConnectionString=this.webInstrumentationConnectionString,this._loadJsonFile()}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype._loadJsonFile=function(){var e=i.join(__dirname,"../../"),t=i.join(e,"applicationinsights.json"),n=process.env.APPLICATIONINSIGHTS_CONFIGURATION_FILE;n&&(t=i.isAbsolute(n)?n:i.join(e,n));try{var s=JSON.parse(r.readFileSync(t,"utf8"));null!=s.disableStatsbeat&&(this.disableStatsbeat=s.disableStatsbeat),null!=s.disableAllExtendedMetrics&&(this.disableAllExtendedMetrics=s.disableStatsbeat),null!=s.noDiagnosticChannel&&(this.noDiagnosticChannel=s.noDiagnosticChannel),null!=s.noHttpAgentKeepAlive&&(this.noHttpAgentKeepAlive=s.noHttpAgentKeepAlive),null!=s.connectionString&&(this.connectionString=s.connectionString),null!=s.extendedMetricDisablers&&(this.extendedMetricDisablers=s.extendedMetricDisablers),null!=s.noDiagnosticChannel&&(this.noDiagnosticChannel=s.noDiagnosticChannel),null!=s.proxyHttpUrl&&(this.proxyHttpUrl=s.proxyHttpUrl),null!=s.proxyHttpsUrl&&(this.proxyHttpsUrl=s.proxyHttpsUrl),null!=s.proxyHttpsUrl&&(this.proxyHttpsUrl=s.proxyHttpsUrl),null!=s.noPatchModules&&(this.noPatchModules=s.noPatchModules),null!=s.enableAutoWebSnippetInjection&&(this.enableWebInstrumentation=s.enableAutoWebSnippetInjection,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),null!=s.enableWebInstrumentation&&(this.enableWebInstrumentation=s.enableWebInstrumentation,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),null!=s.webSnippetConnectionString&&(this.webInstrumentationConnectionString=s.webSnippetConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),null!=s.webInstrumentationConnectionString&&(this.webInstrumentationConnectionString=s.webInstrumentationConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),null!=s.webInstrumentationConfig&&(this.webInstrumentationConfig=s.webInstrumentationConfig),null!=s.webInstrumentationSrc&&(this.webInstrumentationSrc=s.webInstrumentationSrc),null!=s.enableLoggerErrorToTrace&&(this.enableLoggerErrorToTrace=s.enableLoggerErrorToTrace),this.endpointUrl=s.endpointUrl,this.maxBatchSize=s.maxBatchSize,this.maxBatchIntervalMs=s.maxBatchIntervalMs,this.disableAppInsights=s.disableAppInsights,this.samplingPercentage=s.samplingPercentage,this.correlationIdRetryIntervalMs=s.correlationIdRetryIntervalMs,this.correlationHeaderExcludedDomains=s.correlationHeaderExcludedDomains,this.ignoreLegacyHeaders=s.ignoreLegacyHeaders,this.distributedTracingMode=s.distributedTracingMode,this.enableAutoCollectExternalLoggers=s.enableAutoCollectExternalLoggers,this.enableAutoCollectConsole=s.enableAutoCollectConsole,this.enableLoggerErrorToTrace=s.enableLoggerErrorToTrace,this.enableAutoCollectExceptions=s.enableAutoCollectExceptions,this.enableAutoCollectPerformance=s.enableAutoCollectPerformance,this.enableAutoCollectExtendedMetrics=s.enableAutoCollectExtendedMetrics,this.enableAutoCollectPreAggregatedMetrics=s.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectHeartbeat=s.enableAutoCollectHeartbeat,this.enableAutoCollectRequests=s.enableAutoCollectRequests,this.enableAutoCollectDependencies=s.enableAutoCollectDependencies,this.enableAutoDependencyCorrelation=s.enableAutoDependencyCorrelation,this.enableAutoCollectIncomingRequestAzureFunctions=s.enableAutoCollectIncomingRequestAzureFunctions,this.enableUseAsyncHooks=s.enableUseAsyncHooks,this.enableUseDiskRetryCaching=s.enableUseDiskRetryCaching,this.enableResendInterval=s.enableResendInterval,this.enableMaxBytesOnDisk=s.enableMaxBytesOnDisk,this.enableInternalDebugLogging=s.enableInternalDebugLogging,this.enableInternalWarningLogging=s.enableInternalWarningLogging,this.enableSendLiveMetrics=s.enableSendLiveMetrics,this.quickPulseHost=s.quickPulseHost}catch(e){o.info("Missing or invalid JSON config file: ",e)}},e}();t.JsonConfig=l},12010:(e,t,n)=>{"use strict";var r=n(55052),i=function(){function e(){}return e.info=function(e){for(var t=[],n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getResourceProvider=t.getOsPrefix=t.isFunctionApp=t.isWebApp=t.isLinux=t.isWindows=void 0,t.isWindows=function(){return"win32"===process.platform},t.isLinux=function(){return"linux"===process.platform},t.isWebApp=function(){return!!process.env.WEBSITE_SITE_NAME},t.isFunctionApp=function(){return!!process.env.FUNCTIONS_WORKER_RUNTIME},t.getOsPrefix=function(){return t.isWindows()?"w":t.isLinux()?"l":"u"},t.getResourceProvider=function(){return t.isWebApp()?"a":t.isFunctionApp()?"f":"u"}},56405:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?t:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:r.tags[r.keys.internalSdkVersion],StreamId:l,MachineName:o,Instance:s,RoleName:a}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case o.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case o.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case o.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case o.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case o.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.name;return r(r({},n),{Name:i})},e.createQuickPulseTraceDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.severityLevel||0;return r(r({},n),{Message:t.data.baseData.message,SeverityLevel:o.SeverityLevel[i]})},e.createQuickPulseExceptionDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.exceptions,o="",s="",a="";return i&&i.length>0&&(i[0].parsedStack&&i[0].parsedStack.length>0?i[0].parsedStack.forEach((function(e){o+=e.assembly+"\n"})):i[0].stack&&i[0].stack.length>0&&(o=i[0].stack),s=i[0].message,a=i[0].typeName),r(r({},n),{Exception:o,ExceptionMessage:s,ExceptionType:a})},e.createQuickPulseRequestDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Success:i.success,Duration:i.duration,ResponseCode:i.responseCode,OperationName:i.name})},e.createQuickPulseDependencyDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Target:i.target,Success:i.success,Duration:i.duration,ResultCode:i.resultCode,CommandName:i.data,OperationName:n.OperationId,DependencyTypeName:i.type})},e.createQuickPulseDocument=function(t){var n,r;return t.data.baseType?(r=s.TelemetryTypeStringToQuickPulseType[t.data.baseType],n=s.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):c.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:n,__type:r,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],n=e.data.baseData.measurements||{};for(var r in n)if(n.hasOwnProperty(r)){var i={key:r,value:n[r]};t.push(i)}var o=e.data.baseData.properties||{};for(var r in o)o.hasOwnProperty(r)&&(i={key:r,value:o[r]},t.push(i));return t},e.keys=new o.ContextTagKeys,e}();e.exports=u},53629:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?n:this._config.quickPulseHost,b.method="POST",b.path="/QuickPulseService.svc/"+f+"?ikey="+this._config.instrumentationKey,b.headers=((T={Expect:"100-continue"})["x-ms-qps-transmission-time"]=c.getTransmissionTime(),T["Content-Type"]="application/json",T["Content-Length"]=Buffer.byteLength(r),T),g=b,m&&m.length>0&&m.forEach((function(e){return g.headers[e.name]=e.value})),"post"!==f)return[3,4];if(!(y=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,y.addAuthorizationHeader(g)];case 2:return i.sent(),[3,4];case 3:return _=i.sent(),a.info(e.TAG,"Failed to get AAD bearer token for the Application. Error:",_),[2];case 4:return this._config.httpsAgent?g.agent=this._config.httpsAgent:g.agent=l.tlsRestrictedAgent,(v=o.request(g,(function(e){if(200==e.statusCode){var t="true"===e.headers["x-ms-qps-subscribed"],n=null;try{n=e.headers[d]?new u.URL(e.headers[d].toString()).host:null}catch(e){E._onError("Failed to parse redirect header from QuickPulse: "+l.dumpObj(e))}var r=e.headers[p]?parseInt(e.headers[p].toString()):null;E._consecutiveErrors=0,h(t,e,n,r)}else E._onError("StatusCode:"+e.statusCode+" StatusMessage:"+e.statusMessage),h()}))).on("error",(function(e){E._onError(e),h()})),v.write(r),v.end(),[2]}}))}))},e.prototype._onError=function(t){this._consecutiveErrors++;var n="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN==0?(n="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",a.warn(e.TAG,n,t)):a.info(e.TAG,n,t)},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();e.exports=h},80639:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this._pollingIntervalHint:e.PING_INTERVAL,o=this._isCollectingData?e.POST_INTERVAL:r,this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,o=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(o=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),o),this._handle.unref(),[2]}}))}))},e.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},e.prototype._post=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return t.sent(),[2]}}))}))},e.prototype._quickPulseDone=function(e,t,n,r){null!=e?(this._isCollectingData!==e&&(o.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,n&&n.length>0&&(this._redirectedHost=n,o.info("Redirecting endpoint to: ",n)),r&&r>0&&(this._pollingIntervalHint=r),t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();e.exports=u},68982:e=>{"use strict";e.exports={getTransmissionTime:function(){return 1e4*(Date.now()+621355968e5)}}},76357:e=>{"use strict";e.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"}},90589:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!m.FileAccessControl.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,this._logWarn("Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?(this._statsbeat&&this._statsbeat.addFeature(l.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref())):(this._statsbeat&&this._statsbeat.removeFeature(l.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer))},e.prototype.send=function(t,n){return r(this,void 0,void 0,(function(){var r,o,s,a,p,f,m,y,_=this;return i(this,(function(i){switch(i.label){case 0:if(!t)return[3,5];if(r=this._redirectedHost||this._config.endpointUrl,o=new h.URL(r).hostname,s={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},!(a=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null))return[3,4];this._statsbeat&&this._statsbeat.addFeature(l.StatsbeatFeature.AAD_HANDLING),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,a.addAuthorizationHeader(s)];case 2:return i.sent(),[3,4];case 3:return p=i.sent(),f="Failed to get AAD bearer token for the Application.",this._enableDiskRetryMode&&(f+="This batch of telemetry items will be retried. ",this._storeToDisk(t)),f+="Error:"+p.toString(),this._logWarn(f),"function"==typeof n&&n(f),[2];case 4:m="",t.forEach((function(e){var t=d.stringify(e);"string"==typeof t&&(m+=t+"\n")})),m.length>0&&(m=m.substring(0,m.length-1)),y=Buffer.from?Buffer.from(m):new Buffer(m),c.gzip(y,(function(i,a){var c=a;i?(_._logWarn(d.dumpObj(i)),c=y,s.headers["Content-Length"]=y.length.toString()):(s.headers["Content-Encoding"]="gzip",s.headers["Content-Length"]=a.length.toString()),_._logInfo(d.dumpObj(s)),s[u.disableCollectionRequestOption]=!0;var p=+new Date,h=d.makeRequest(_._config,r,s,(function(e){e.setEncoding("utf-8");var r="";e.on("data",(function(e){r+=e})),e.on("end",(function(){var i=+new Date-p;if(_._numConsecutiveFailures=0,_._isStatsbeatSender&&!_._statsbeatHasReachedIngestionAtLeastOnce&&(g.includes(e.statusCode)?_._statsbeatHasReachedIngestionAtLeastOnce=!0:_._statsbeatFailedToIngest()),_._statsbeat&&(402==e.statusCode||439==e.statusCode?_._statsbeat.countThrottle(l.StatsbeatNetworkCategory.Breeze,o,e.statusCode):_._statsbeat.countRequest(l.StatsbeatNetworkCategory.Breeze,o,i,200===e.statusCode,e.statusCode)),_._enableDiskRetryMode)if(200===e.statusCode)_._resendTimer||(_._resendTimer=setTimeout((function(){_._resendTimer=null,_._sendFirstFileOnDisk()}),_._resendInterval),_._resendTimer.unref());else if(_._isRetriable(e.statusCode))try{_._statsbeat&&_._statsbeat.countRetry(l.StatsbeatNetworkCategory.Breeze,o,e.statusCode);var s=JSON.parse(r),a=[];s.errors&&(s.errors.forEach((function(e){429!=e.statusCode&&500!=e.statusCode&&503!=e.statusCode||a.push(t[e.index])})),a.length>0&&_._storeToDisk(a))}catch(e){_._storeToDisk(t)}if(307===e.statusCode||308===e.statusCode)if(_._numConsecutiveRedirects++,_._numConsecutiveRedirects<10){var c=e.headers.location?e.headers.location.toString():null;c&&(_._redirectedHost=c,_.send(t,n))}else _._statsbeat&&_._statsbeat.countException(l.StatsbeatNetworkCategory.Breeze,o,{name:"Circular Redirect",message:"Error sending telemetry because of circular redirects."}),"function"==typeof n&&n("Error sending telemetry because of circular redirects.");else _._numConsecutiveRedirects=0,"function"==typeof n&&n(r),_._logInfo(r),"function"==typeof _._onSuccess&&_._onSuccess(r)}))}));h.setTimeout(e.HTTP_TIMEOUT,(function(){_._requestTimedOut=!0,h.abort()})),h.on("error",(function(r){if(_._isStatsbeatSender&&!_._statsbeatHasReachedIngestionAtLeastOnce&&_._statsbeatFailedToIngest(),_._numConsecutiveFailures++,_._statsbeat&&_._statsbeat.countException(l.StatsbeatNetworkCategory.Breeze,o,r),!_._enableDiskRetryMode||_._numConsecutiveFailures>0&&_._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:";_._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+_._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),_._logWarn(i,d.dumpObj(r))}else i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",_._logInfo(i,d.dumpObj(r));_._onErrorHelper(r),"function"==typeof n&&(r?(_._requestTimedOut&&(r.name="telemetry timeout",r.message="telemetry request timed out"),n(d.dumpObj(r))):n("Error sending telemetry")),_._enableDiskRetryMode&&_._storeToDisk(t)})),h.write(c),h.end()})),i.label=5;case 5:return[2]}}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(d.stringify(e))},e.prototype._isRetriable=function(e){return 206===e||401===e||403===e||408===e||429===e||500===e||502===e||503===e||504===e},e.prototype._logInfo=function(t){for(var n=[],r=1;r=3&&this._shutdownStatsbeat())},e.prototype._storeToDisk=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,s,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this._logInfo("Checking existence of data storage directory: "+this._tempDir),[4,p.confirmDirExists(this._tempDir)];case 1:return i.sent(),[3,3];case 2:return t=i.sent(),this._logWarn("Failed to create folder to put telemetry: "+d.dumpObj(t)),this._onErrorHelper(t),[2];case 3:return i.trys.push([3,5,,6]),[4,m.FileAccessControl.applyACLRules(this._tempDir)];case 4:return i.sent(),[3,6];case 5:return n=i.sent(),this._logWarn("Failed to apply file access control to folder: "+d.dumpObj(n)),this._onErrorHelper(n),[2];case 6:return i.trys.push([6,8,,9]),[4,p.getShallowDirectorySize(this._tempDir)];case 7:return(r=i.sent())>this._maxBytesOnDisk?(this._logWarn("Not saving data due to max size limit being met. Directory size in bytes is: "+r),[2]):[3,9];case 8:return o=i.sent(),this._logWarn("Failed to read directory for retriable telemetry: "+d.dumpObj(o)),this._onErrorHelper(o),[2];case 9:return i.trys.push([9,11,,12]),s=(new Date).getTime()+".ai.json",c=a.join(this._tempDir,s),this._logInfo("saving data to disk at: "+c),[4,p.writeFileAsync(c,d.stringify(e),{mode:384})];case 10:return i.sent(),[3,12];case 11:return l=i.sent(),this._logWarn("Failed to persist telemetry to disk: "+d.dumpObj(l)),this._onErrorHelper(l),[2];case 12:return[2]}}))}))},e.prototype._storeToDiskSync=function(e){try{this._logInfo("Checking existence of data storage directory: "+this._tempDir),o.existsSync(this._tempDir)||o.mkdirSync(this._tempDir),m.FileAccessControl.applyACLRulesSync(this._tempDir);var t=p.getShallowDirectorySizeSync(this._tempDir);if(t>this._maxBytesOnDisk)return void this._logInfo("Not saving data due to max size limit being met. Directory size in bytes is: "+t);var n=(new Date).getTime()+".ai.json",r=a.join(this._tempDir,n);this._logInfo("saving data before crash to disk at: "+r),o.writeFileSync(r,e,{mode:384})}catch(e){this._logWarn("Error while saving data to disk: "+d.dumpObj(e)),this._onErrorHelper(e)}},e.prototype._sendFirstFileOnDisk=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,p.readdirAsync(this._tempDir)];case 1:return(e=(e=i.sent()).filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0?(t=e[0],n=a.join(this._tempDir,t),[4,p.readFileAsync(n)]):[3,5];case 2:return r=i.sent(),[4,p.unlinkAsync(n)];case 3:return i.sent(),o=JSON.parse(r.toString()),[4,this.send(o)];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:return s=i.sent(),this._onErrorHelper(s),[3,7];case 7:return[2]}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._fileCleanupTask=function(){return r(this,void 0,void 0,(function(){var t,n,r,o,s,c=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,p.readdirAsync(this._tempDir)];case 1:if(!((t=(t=i.sent()).filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0))return[3,5];n=0,i.label=2;case 2:return nr?(o=a.join(this._tempDir,t[n]),[4,p.unlinkAsync(o).catch((function(e){c._onErrorHelper(e)}))]):[3,4]):[3,5];case 3:i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[3,7];case 6:return"ENOENT"!=(s=i.sent()).code&&this._onErrorHelper(s),[3,7];case 7:return[2]}}))}))},e.TAG="Sender",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.HTTP_TIMEOUT=2e4,e}();e.exports=y},54814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContentTypeHeaderHtml=t.insertSnippetByIndex=t.getContentEncodingFromHeaders=t.isSupportedContentEncoding=t.findBufferEncodingType=t.isBufferType=t.getBrotliDecompressSync=t.getBrotliDecompressAsync=t.getBrotliCompressSync=t.getBrotliCompressAsync=t.inflateAsync=t.deflateAsync=t.gunzipAsync=t.gzipAsync=t.isBrotliSupperted=t.bufferEncodingTypes=t.contentEncodingMethod=void 0;var r,i=n(59796),o=n(73837);!function(e){e.GZIP="gzip",e.DEFLATE="deflate",e.BR="br"}(r=t.contentEncodingMethod||(t.contentEncodingMethod={})),t.bufferEncodingTypes=["utf8","utf16le","latin1","base64","hex","ascii","binary","ucs2"],t.isBrotliSupperted=function(){var e=process.versions.node.split(".")[0];return parseInt(e)>=10},t.gzipAsync=o.promisify(i.gzip),t.gunzipAsync=o.promisify(i.gunzip),t.deflateAsync=o.promisify(i.deflate),t.inflateAsync=o.promisify(i.inflate),t.getBrotliCompressAsync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliCompress?o.promisify(e.brotliCompress):null},t.getBrotliCompressSync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliCompressSync?e.brotliCompressSync:null},t.getBrotliDecompressAsync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliDecompress?o.promisify(e.brotliDecompress):null},t.getBrotliDecompressSync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliDecompressSync?e.brotliDecompressSync:null},t.isBufferType=function(e,t){var n=t||"utf8",r=!1;return Buffer.isEncoding(n)&&(r=Buffer.from(e.toString(n),n).toJSON().data.toString()===e.toJSON().data.toString()),r},t.findBufferEncodingType=function(e){var n=null;for(var r in t.bufferEncodingTypes){var i=t.bufferEncodingTypes[r];if(Buffer.isEncoding(i)&&t.isBufferType(e,i)){n=i;break}}return n},t.isSupportedContentEncoding=function(e){var t=null;switch(e){case"gzip":t=r.GZIP;break;case"br":t=r.BR;break;case"deflate":t=r.DEFLATE}return t},t.getContentEncodingFromHeaders=function(e){var n=[],r=e.getHeader("Content-Encoding");if(!r)return null;if("string"==typeof r){var i=t.isSupportedContentEncoding(r);i&&n.push(i)}return n},t.insertSnippetByIndex=function(e,t,n){return e<0?null:t.substring(0,e)+'