UNPKG

code-server

Version:

Run VS Code on a remote server.

67 lines • 484 kB
"use strict";var nF=Object.create;var _v=Object.defineProperty;var iF=Object.getOwnPropertyDescriptor;var oF=Object.getOwnPropertyNames;var sF=Object.getPrototypeOf,aF=Object.prototype.hasOwnProperty;var E=(r,e,t)=>()=>{if(t)throw t[0];try{return r&&(e=r(r=0)),e}catch(n){throw t=[n],n}};var le=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},Be=(r,e)=>{for(var t in e)_v(r,t,{get:e[t],enumerable:!0})},ex=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of oF(e))!aF.call(r,i)&&i!==t&&_v(r,i,{get:()=>e[i],enumerable:!(n=iF(e,i))||n.enumerable});return r};var U=(r,e,t)=>(t=r!=null?nF(sF(r)):{},ex(e||!r||!r.__esModule?_v(t,"default",{value:r,enumerable:!0}):t,r)),Hd=r=>ex(_v({},"__esModule",{value:!0}),r);var Kl,$o,eo,Pi,Bl,Kd,LS=E(()=>{Kl="function",$o="object",eo="undefined",Pi="prototype",Bl=Object,Kd=Bl[Pi]});function Gt(r,e){return r||e}function gt(r,e){return r?.[e]}function Ae(r,e){try{return{v:r.apply(this,e)}}catch(t){return{e:t}}}function TF(r,e,t){var n=Ae(r,t);return n.e?e:n.v}function Iv(r){return function(e){return typeof e===r}}function dx(r){var e="[object "+r+"]";return function(t){return!!(t&&Nv(t)===e)}}function Nv(r){return Jd[$d].call(r)}function ZS(r,e){return typeof r===e}function Fe(r){return typeof r===fc||r===fc}function bF(r){return r===Mr}function z(r){return r===Mt||Fe(r)}function xi(r){return r===Mt||r===Mr}function fx(r){return!!r||r!==Mr}function EF(r){return!FS&&(FS=["string","number","boolean",fc,"symbol","bigint"]),r!==zd&&FS.indexOf(r)!==-1}function Ut(r){return!r&&z(r)?!1:!!r&&typeof r===zd}function un(r){return!!(r&&r.then&&Ee(r.then))}function e_(r){return!r||!Di(r)}function Di(r){return!(!r||TF(function(){return!(r&&0+r)},!r))}function t_(){}function CF(){return[]}function PF(){return!1}function fe(r,e){var t=JS,n=Jd[$d][tr](r);n===xF&&(r={stack:er(r.stack),message:er(r.message),name:er(r.name)});try{t=JSON.stringify(r,Mt,e?typeof e=="number"?e:4:Mr),t=(t?t.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):Mt)||er(r)}catch(i){t=" - "+fe(i,e)}return n+": "+t}function Wt(r){throw new Error(r)}function Zr(r){throw new TypeError(r)}function wv(r){xi(r)&&Zr("Cannot convert undefined or null to object")}function px(r){Oe(r)||Zr("'"+fe(r)+"' is not a string")}function hr(r,e){return!!r&&Jd.hasOwnProperty[tr](r,e)}function IF(r,e){return wv(r),hr(r,e)||!!DF(r,e)}function NF(r){return r===Gd||r===Wd||r===Ur}function me(r,e,t){if(r&&(Ut(r)||Ee(r))){for(var n in r)if(ii(r,n)&&e[tr](xi(t)?r:t,n,r[n])===-1)break}}function V(r,e,t){if(r)for(var n=r[vc]>>>0,i=0;i<n&&!(i in r&&e[tr](xi(t)?r:t,r[i],i,r)===-1);i++);}function zl(r,e,t){var n=e?e[r]:Mt;return function(i){var o=(i?i[r]:Mt)||n;if(o||t){var s=arguments;return(o||t).apply(i,o?to[tr](s,1):s)}Zr('"'+er(r)+'" not defined for '+fe(i))}}function RF(r,e,t){var n=e?e[r]:Mt;return function(i){var o=n;if(o||t){var s=arguments;return(o||t).apply(i,o?to[tr](s,1):s)}Zr('"'+er(r)+'" not defined for '+fe(i))}}function wF(r){return function(e){return e[r]}}function AF(r,e){var t,n=Ir.getOwnPropertyDescriptor;return!xi(r)&&n&&(t=Ae(n,[r,e]).v||Mt),!t&&!xi(r)&&(t=Ae(function(){for(var i in r)if(i==e)return{enumerable:hr(r,i)}}).v),t&&t.enumerable||!1}function vx(r){var e={};if(e[Tv.c]=!0,e[Tv.e]=!0,r.l){e.get=function(){return r.l.v};var t=kF(r.l,"v");t&&t.set&&(e.set=function(n){r.l.v=n})}return me(r,function(n,i){e[Tv[n]]=bF(i)?e[Tv[n]]:i}),e}function n_(r,e,t,n,i,o){var s={e:o,c:i};return t&&(s.g=t),n&&(s.s=n),Sn(r,e,vx(s))}function Qe(r,e,t){return Sn(r,e,vx(t))}function mx(r,e,t,n,i){var o={};return me(r,function(s,a){Pv(o,s,e?a:s),Pv(o,a,t?a:s)}),n?n(o):o}function Pv(r,e,t,n){Sn(r,e,{value:t,enumerable:!0,writable:!1})}function hx(r){return r}function FF(r){return wv(r),r[Gd]||Mt}function yx(r,e){if((de(r)||Ut(r)||Ee(r))&&!LF(r)){for(var t=0;t<e.length;t++)if(e[t]===r)return r;e.push(r),me(r,function(n,i){yx(i,e)}),oi(r)}return r}function no(r){return gx?yx(r,[]):r}function Sx(r){return mx(r,1,0,oi)}function MF(r){return mx(r,0,0,oi)}function UF(r){var e={};return me(r,function(t,n){Pv(e,t,n[1]),Pv(e,n[0],n[1])}),oi(e)}function _x(r){return UF(r)}function bx(){var r;return typeof globalThis!==fc&&(r=globalThis),!r&&typeof self!==fc&&(r=self),!r&&typeof window!==fc&&(r=window),!r&&typeof global!==fc&&(r=global),r}function Av(){if(!MS){var r=Ae(bx).v||{};MS=r[nx]=r[nx]||{}}return MS}function VF(r,e,t){return wv(r),t<0?JS:(e=e||0,e<0&&(e=YF(e+r[vc],0)),Fe(t)?ix(r,e):ix(r,e,e+t))}function hc(r,e){return yr(r,0,e)}function jF(r,e){return r&&(Ae(function(){r[tx]=!0,r[rx]=e}),Ae(Qe,[r,tx,{v:!0,w:!1,e:!1}]),Ae(Qe,[r,rx,{v:e,w:!1,e:!1}])),r}function qF(r,e){var t=null;function n(){}if(xi(r))t={};else{var i=typeof r;i!==zd&&i!==Dv&&Zr("Prototype must be an Object or function: "+fe(r)),n[Ur]=r,Ae(function(){n[Gd]=r}),t=new n}return e&&Ae(r_,[t,e]),t}function Yt(){return(Date.now||HF)()}function HF(){return new Date().getTime()}function pc(r,e,t){return r.apply(e,t)}function Ks(){ar=Av()}function o_(r,e){var t={};return!ar&&Ks(),t.b=ar.lzy,Sn(t,"v",{configurable:!0,get:function(){var n=pc(r,null,e);return ar.lzy||Sn(t,"v",{value:n}),t.b=ar.lzy,n}}),t}function zF(){if(!US){var r=Av();US=r.gblSym=r.gblSym||{k:{},s:{}}}return US}function s_(r){var e="_"+WF+++"_"+BF.v,t=XS+"("+r+")";function n(o,s){Qe(i,o,{v:s,e:!1,w:!1})}var i=Ii(null);return n("description",er(r)),n($d,function(){return t+GF+e}),n("valueOf",function(){return i}),n("v",t),n("_uid",e),jF(i,"symbol")}function $F(r){var e=zF();if(!ii(e.k,r)){var t=s_(r),n=Vr(e.s).length;t[ox]=function(){return n+"_"+t[$d]()},e.k[r]=t,e.s[t[ox]()]=er(r)}return e.k[r]}function JF(r){!bv&&(bv={});var e,t=Tx[r];return t&&(e=bv[t]=bv[t]||s_(XS+"."+t)),e}function _n(r){return Sn({toJSON:function(){return r}},"v",{value:r})}function Xd(r,e){var t;return function(){return!ar&&Ks(),(!t||ar.lzy)&&(t=_n(Ae(r,e).v)),t.v}}function dn(r){return!ar&&Ks(),(!Bd||r===!1||ar.lzy)&&(Bd=_n(Ae(bx).v||Mt)),Bd.v}function Pe(r,e){var t;if(!Bd||e===!1?t=dn(e):t=Bd.v,t&&t[r])return t[r];if(r===Ex)try{return window}catch{}return Mt}function yc(){return!!zt()}function Jl(){return!!cr()}function Qd(){return!!Sr()}function a_(){return!!Ov()}function kv(){return Gl=_n(Ae(Pe,[XS]).v),Gl}function XF(r){var e=(ar.lzy?0:Gl)||kv();return e.v?e.v[r]:Mr}function Px(){return!!QF()}function QF(){return!ar&&Ks(),((ar.lzy?0:Gl)||kv()).v}function Zd(r,e){var t=Tx[r];!ar&&Ks();var n=(ar.lzy?0:Gl)||kv();return n.v?n.v[t||r]:e?Mr:JF(r)}function Xl(r,e){!ar&&Ks();var t=(ar.lzy?0:Gl)||kv();return t.v?t.v(r):e?Mt:s_(r)}function Lv(r){return!ar&&Ks(),YS=(ar.lzy?0:YS)||_n(Ae(XF,["for"]).v),(YS.v||$F)(r)}function xv(r){return!!r&&Ee(r.next)}function c_(r){return!xi(r)&&Ee(r[Zd(3)])}function Fv(r,e,t){if(r&&(xv(r)||(!Ev&&(Ev=_n(Zd(3))),r=r[Ev.v]?r[Ev.v]():Mt),xv(r))){var n=Mr,i=Mr;try{for(var o=0;!(i=r.next()).done&&e[tr](xi(t)?r:t,i.value,o,r)!==-1;)o++}catch(s){n={e:s},r.throw&&(i=Mt,r.throw(n))}finally{try{i&&!i.done&&r.return&&r.return(i)}finally{if(n)throw n.e}}}}function Ni(r,e){return!Fe(e)&&r&&(de(e)?pc(r.push,r,e):xv(e)||c_(e)?Fv(e,function(t){r.push(t)}):r.push(e)),r}function Ql(r,e,t){return((r?r.slice:Mt)||to).apply(r,to[tr](arguments,1))}function ZF(r,e,t){return Ze(r,e,t)!==-1}function eM(r,e){var t;return!VS&&(VS=_n((t={},t[Gd]=[],t instanceof Array))),VS.v?r[Gd]=e:me(e,function(n,i){return r[n]=i}),r}function tM(r,e,t){Ae(Qe,[e,Cv,{v:r,c:!0,e:!1}]),e=xx(e,t);function n(){this[Wd]=e,Ae(Qe,[this,Cv,{v:r,c:!0,e:!1}])}return e[Ur]=t===Mt?Ii(t):(n[Ur]=t[Ur],new n),e}function sx(r,e){e&&(r[Cv]=e)}function u_(r,e,t,n){var i=t||Error,o=i[Ur][Cv],s=Error.captureStackTrace;return tM(r,function(){var a=this,c=arguments;try{Ae(sx,[i,r]);var l=pc(i,a,n?n(c):to[tr](c))||a;if(l!==a){var u=$S(a);u!==$S(l)&&xx(l,u)}return s&&s(l,a[Wd]),e&&e(l,c),l}finally{Ae(sx,[i,o])}},i)}function nM(r){return function(t){return wv(t),t=er(t),t&&(t=rM(t,r,JS)),t}}function sM(r,e,t){if(r!==Mt&&r!==Mr){for(var n in r)if(ii(r,n)&&e[tr](xi(t)?r:t,n,r[n])===-1)return;V(oM(r),function(i){if(OF(r,i)&&e[tr](xi(t)?r:t,i,r[i])===-1)return-1})}}function aM(r,e,t){sM(r,function(n,i){if(!NF(n))return e[tr](xi(t)?r:t,n,i)},t)}function jr(r){if(!r||typeof r!==zd)return!1;HS||(HS=Jl()?cr():!0);var e=!1;if(r!==HS){qS||(jS=Function[Ur][$d],qS=jS[tr](Ir));try{var t=$S(r);e=!t,e||(hr(t,Wd)&&(t=t[Wd]),e=!!(t&&typeof t===Dv&&jS[tr](t)===qS))}catch{}}return e}function cM(r,e){e&&r.push(e)}function Bt(r,e){e&&e[Ur]}function lM(){var r=[Jd,Jo,Wl,uF,fF,vF,gF,yF,_F];return Ae(Pe,["Map"]).v,Ae(Pe,["Set"]).v,Ae(Pe,["WeakMap"]).v,Ae(Pe,["WeakSet"]).v,Ae(Pe,["Promise"]).v,Ae(Pe,["Symbol"]).v,Ae(Pe,["ArrayBuffer"]).v,Ae(Pe,["SharedArrayBuffer"]).v,Ae(Pe,["DataView"]).v,Ae(Pe,["Int8Array"]).v,Ae(Pe,["Uint8Array"]).v,Ae(Pe,["Uint8ClampedArray"]).v,Ae(Pe,["Int16Array"]).v,Ae(Pe,["Uint16Array"]).v,Ae(Pe,["Int32Array"]).v,Ae(Pe,["Uint32Array"]).v,Ae(Pe,["Float32Array"]).v,Ae(Pe,["Float64Array"]).v,Ae(Pe,["BigInt64Array"]).v,Ae(Pe,["BigUint64Array"]).v,Ae(Pe,["WeakRef"]).v,Ae(Pe,["FinalizationRegistry"]).v,r}function uM(r){return KS||(KS=_n(lM())),Ze(KS.v,r)>=0}function dM(r){return r.value&&Nx(r),!0}function fM(r,e,t,n){var i;return V(r,function(o){if(o.k===e)return i=o,-1}),i||(i={k:e,v:e},r.push(i),n(i)),i.v}function d_(r,e,t,n){var i=t.handler,o=t.path?n?t.path.concat(n):t.path:[],s={handler:t.handler,src:t.src,path:o},a=typeof e,c=!1,l=e===Mt;l||(e&&a===zd?c=jr(e):l=EF(a));var u={type:a,isPrim:l,isPlain:c,value:e,result:e,path:o,origin:t.src,copy:function(d,f){return d_(r,d,f?s:t,f)},copyTo:function(d,f){return Ix(r,d,f,s)}};return u.isPrim?i&&i[tr](t,u)?u.result:e:fM(r,e,o,function(d){Qe(u,"result",{g:function(){return d.v},s:function(m){d.v=m}});for(var f=0,v=i;!(v||(f<ax.length?ax[f++]:dM))[tr](t,u);)v=Mt})}function Ix(r,e,t,n){return uM(t)||aM(t,function(i,o){e[i]=d_(r,o,n,i)}),e}function pM(r,e,t){var n={handler:t,src:e,path:[]};return Ix([],r,e,n)}function vM(r,e){var t={handler:e,src:r};return d_([],r,t)}function mM(r){var e=r.value;if(de(e)){var t=r.result=[];return t.length=e.length,r.copyTo(t,e),!0}return!1}function gM(r){var e=r.value;return Rv(e)?(r.result=new Date(e.getTime()),!0):!1}function hM(r){return r.type===Dv}function Nx(r){var e=r.value;if(e&&r.isPlain){var t=r.result={};return r.copyTo(t,e),!0}return!1}function yM(r,e){return V(e,function(t){pM(r,t)}),r}function f_(r,e,t,n,i,o,s){return yM(vM(r)||{},to[tr](arguments))}function Bs(){return!ar&&Ks(),(!BS||ar.lzy)&&(BS=_n(Ae(Pe,["performance"]).v)),BS.v}function tf(){var r=Bs();return r&&r.now?r.now():Yt()}function SM(r,e,t){px(r);var n=Oe(e)?e:er(e),i=!Fe(t)&&t<r[vc]?t:r[vc];return yr(r,i-n[vc],i)===n}function _M(r,e,t){px(r);var n=Oe(e)?e:er(e),i=t>0?t:0;return yr(r,i,i+n[vc])===n}function bM(r,e,t){var n=!0,i=r?e(Mt):Mt,o;function s(){return n=!1,i&&i[WS]&&i[WS](),o}function a(){i&&t(i),i=Mt}function c(){return i=e(i),n||s(),o}function l(u){!u&&i&&a(),u&&!i&&c()}return o={cancel:a,refresh:c},o[zS]=function(){return i&&i[zS]?i[zS]():n},o[GS]=function(){return n=!0,i&&i[GS]&&i[GS](),o},o[WS]=s,o=Sn(o,TM,{get:function(){return!!i},set:l}),{h:o,dn:function(){i=Mt}}}function PM(r){var e=Ee(r)?r:EM;if(!e){var t=Av().tmOut||[];de(t)&&t.length>0&&Ee(t[0])&&(e=t[0])}return e||setTimeout}function xM(r){var e=Ee(r)?r:CM;if(!e){var t=Av().tmOut||[];de(t)&&t.length>1&&Ee(t[1])&&(e=t[1])}return e||clearTimeout}function p_(r,e,t){var n=de(e),i=n?e.length:0,o=PM(i>0?e[0]:n?Mr:e),s=xM(i>1?e[1]:Mr),a=t[0];t[0]=function(){c.dn(),pc(a,Mr,to[tr](arguments))};var c=bM(r,function(l){if(l){if(l.refresh)return l.refresh(),l;pc(s,Mr,[l])}return pc(o,Mr,t)},function(l){pc(s,Mr,[l])});return c.h}function jn(r,e){return p_(!0,Mr,to[tr](arguments))}function Rx(r,e,t){return p_(!0,r,to[tr](arguments,1))}function wx(r,e){return p_(!1,Mr,to[tr](arguments))}var Mr,Mt,JS,Dv,zd,Ur,Gd,fc,Wd,XS,vc,Cv,tr,$d,QS,cF,Ir,Jd,cx,Jo,lx,ux,Wl,to,lF,uF,dF,fF,pF,vF,mF,gF,hF,yF,SF,_F,tx,rx,FS,Oe,Ee,de,Rv,Yr,ro,mc,er,xF,DF,ii,gc,OF,kF,Tv,Sn,r_,LF,gx,$l,Vr,oi,i_,$S,Tx,nx,MS,YF,ix,yr,io,Ii,ar,KF,BF,ox,GF,US,WF,bv,Ex,Bd,zt,cr,Sr,Ov,Cx,Gl,YS,Ev,Ze,Xo,l_,Zl,ef,VS,xx,rM,iM,nt,Dx,oM,jS,qS,HS,KS,ax,BS,Tn,Sc,eu,GS,WS,zS,TM,EM,CM,Ne=E(()=>{Mr=void 0,Mt=null,JS="",Dv="function",zd="object",Ur="prototype",Gd="__proto__",fc="undefined",Wd="constructor",XS="Symbol",vc="length",Cv="name",tr="call",$d="toString",QS="getOwnPropertyDescriptor",cF="getOwnPropertySymbols",Ir=Gt(Object),Jd=gt(Ir,Ur),cx=Gt(String),Jo=gt(cx,Ur),lx=Gt(Math),ux=Gt(Array),Wl=gt(ux,Ur),to=gt(Wl,"slice"),lF=Gt(Number),uF=gt(lF,Ur),dF=Gt(Function),fF=gt(dF,Ur),pF=Gt(Date),vF=gt(pF,Ur),mF=Gt(RegExp),gF=gt(mF,Ur),hF=Gt(Boolean),yF=gt(hF,Ur),SF=Gt(Error),_F=gt(SF,Ur),tx="_polyfill",rx="__nw21$polytype__";Oe=Iv("string"),Ee=Iv(Dv);de=gt(ux,"isArray"),Rv=dx("Date"),Yr=Iv("number"),ro=Iv("boolean"),mc=dx("Error");er=Gt(cx),xF="[object Error]";DF=Gt(gt(Ir,QS),t_),ii=Gt(gt(Ir,"hasOwn"),IF);gc=zl;OF=RF("propertyIsEnumerable",Jd,AF),kF=Gt(gt(Ir,QS),t_),Tv={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};Sn=gt(Ir,"defineProperty"),r_=gt(Ir,"defineProperties");LF=Gt(gt(Ir,"isFrozen"),PF),gx=gt(Ir,"freeze");$l=gt(Ir,"assign"),Vr=gt(Ir,"keys");oi=Gt(gx,hx),i_=Gt(gt(Ir,"seal"),hx),$S=Gt(gt(Ir,"getPrototypeOf"),FF);Tx=MF({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),nx="__tsUtils$gblCfg";YF=gt(lx,"max"),ix=gc("slice",Jo),yr=gc("substring",Jo),io=zl("substr",Jo,VF);Ii=Gt(gt(Ir,"create"),qF);KF=gt(lx,"random"),BF=o_(function(){for(var r=Yt().toString(36).slice(2);r.length<16;)r+=KF().toString(36).slice(2);return r=r.substring(0,16),r}),ox="_urid",GF="$nw21sym",WF=0;Ex="window";zt=Xd(Pe,["document"]);cr=Xd(Pe,[Ex]);Sr=Xd(Pe,["navigator"]);Ov=Xd(Pe,["history"]),Cx=Xd(function(){return!!Ae(function(){return process&&(process.versions||{}).node}).v});Ze=gc("indexOf",Wl),Xo=gc("map",Wl);l_=zl("includes",Wl,ZF),Zl=wF(vc),ef=gc("reduce",Wl),xx=Gt(gt(Ir,"setPrototypeOf"),eM);rM=gc("replace",Jo);iM=nM(/^\s+|(?=\s)\s+$/g),nt=zl("trim",Jo,iM),Dx=Gt(gt(Ir,QS),t_),oM=Gt(gt(Ir,cF),CF);ax=[mM,Nx,hM,gM];Tn=gc("indexOf",Jo),Sc=zl("endsWith",Jo,SM);eu=zl("startsWith",Jo,_M);GS="ref",WS="unref",zS="hasRef",TM="enabled"});function bn(r,e){typeof e!==Kl&&e!==null&&Zr("Class extends value "+String(e)+" is not a constructor or null"),v_(r,e);function t(){this.constructor=r}r[Pi]=e===null?Ii(e):(t[Pi]=e[Pi],new t)}function Mv(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r}var ZK,eB,Ax,IM,si,v_,Ox=E(()=>{Ne();LS();ZK=(dn()||{}).Symbol,eB=(dn()||{}).Reflect,Ax="hasOwnProperty",IM=function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Kd[Ax].call(e,i)&&(r[i]=e[i])}return r},si=$l||IM,v_=function(r,e){return v_=Bl.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n[Ax](i)&&(t[i]=n[i])},v_(r,e)}});var kx=E(()=>{});var En=E(()=>{LS();Ox();kx();Ne()});function jv(r){return r&&(r===b_[Qo]||r===Array[Qo])}function E_(r){return jv(r)||r===Function[Qo]}function _c(r){var e;if(r){if(nf)return nf(r);var t=r[T_]||r[Qo]||(r[qv]?r[qv][Qo]:null);e=r[Yv]||t,hr(r,Yv)||(delete r[m_],e=r[Yv]=r[m_]||r[Yv],r[m_]=t)}return e}function Bv(r,e){var t=[];if(Mx)t=Mx(r);else for(var n in r)typeof n=="string"&&hr(r,n)&&t.push(n);if(t&&t.length>0)for(var i=0;i<t.length;i++)e(t[i])}function C_(r,e,t){return e!==qv&&typeof r[e]===Hv&&(t||hr(r,e))&&e!==T_&&e!==Qo}function Gv(r){Zr("DynamicProto: "+r)}function RM(r){var e=Ii(null);return Bv(r,function(t){!e[t]&&C_(r,t,!1)&&(e[t]=r[t])}),e}function P_(r,e){for(var t=r.length-1;t>=0;t--)if(r[t]===e)return!0;return!1}function wM(r,e,t,n){function i(c,l,u){var d=l[u];if(d[h_]&&n){var f=c[Kv]||{};f[rf]!==!1&&(d=(f[l[tu]]||{})[u]||d)}return function(){return d.apply(c,arguments)}}var o=Ii(null);Bv(t,function(c){o[c]=i(e,t,c)});for(var s=_c(r),a=[];s&&!E_(s)&&!P_(a,s);)Bv(s,function(c){!o[c]&&C_(s,c,!nf)&&(o[c]=i(e,s,c))}),a.push(s),s=_c(s);return o}function AM(r,e,t,n){var i=null;if(r&&hr(t,tu)){var o=r[Kv]||Ii(null);if(i=(o[t[tu]]||Ii(null))[e],i||Gv("Missing ["+e+"] "+Hv),!i[y_]&&o[rf]!==!1){for(var s=!hr(r,e),a=_c(r),c=[];s&&a&&!E_(a)&&!P_(c,a);){var l=a[e];if(l){s=l===n;break}c.push(a),a=_c(a)}try{s&&(r[e]=i),i[y_]=1}catch{o[rf]=!1}}}return i}function OM(r,e,t){var n=e[r];return n===t&&(n=_c(e)[r]),typeof n!==Hv&&Gv("["+r+"] is not a "+Hv),n}function kM(r,e,t,n,i){function o(c,l){var u=function(){var d=AM(this,l,c,u)||OM(l,c,u);return d.apply(this,arguments)};return u[h_]=1,u}if(!jv(r)){var s=t[Kv]=t[Kv]||Ii(null);if(!jv(s)){var a=s[e]=s[e]||Ii(null);s[rf]!==!1&&(s[rf]=!!i),jv(a)||Bv(t,function(c){C_(t,c,!1)&&t[c]!==n[c]&&(a[c]=t[c],delete t[c],(!hr(r,c)||r[c]&&!r[c][h_])&&(r[c]=o(r,c)))})}}}function LM(r,e){if(nf){for(var t=[],n=_c(e);n&&!E_(n)&&!P_(t,n);){if(n===r)return!0;t.push(n),n=_c(n)}return!1}return!0}function g_(r,e){return hr(r,Qo)?r.name||e||Lx:((r||{})[qv]||{}).name||e||Lx}function Ke(r,e,t,n){hr(r,Qo)||Gv("theClass is an invalid class definition.");var i=r[Qo];LM(i,e)||Gv("["+g_(r)+"] not in hierarchy of ["+g_(e)+"]");var o=null;hr(i,tu)?o=i[tu]:(o=NM+g_(r,"_")+"$"+__.n,__.n++,i[tu]=o);var s=Ke[Yx],a=!!s[Vv];a&&n&&n[Vv]!==void 0&&(a=!!n[Vv]);var c=RM(e),l=wM(i,e,c,a);t(e,l);var u=!!nf&&!!s[S_];u&&n&&(u=!!n[S_]),kM(i,o,e,c,u!==!1)}var Uv,qv,Qo,Hv,Kv,h_,tu,NM,y_,rf,Yx,Lx,T_,Yv,Fx,m_,Vv,S_,b_,nf,Mx,Ux,__,Nr=E(()=>{Ne();qv="constructor",Qo="prototype",Hv="function",Kv="_dynInstFuncs",h_="_isDynProxy",tu="_dynClass",NM="_dynCls$",y_="_dynInstChk",rf=y_,Yx="_dfOpts",Lx="_unknown_",T_="__proto__",Yv="_dyn"+T_,Fx="__dynProto$Gbl",m_="_dynInstProto",Vv="useBaseInst",S_="setInstFuncs",b_=Object,nf=b_.getPrototypeOf,Mx=b_.getOwnPropertyNames,Ux=dn(),__=Ux[Fx]||(Ux[Fx]={o:(Uv={},Uv[S_]=!0,Uv[Vv]=!0,Uv),n:1e3});Ke[Yx]=__.o});var x_,Vx=E(()=>{"use strict";x_=100});var $t,D_,of=E(()=>{Ne();$t=Sx,D_=_x});var Ri,FM,jx=E(()=>{of();Ri=$t({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}),FM=$t({Unknown:0,NonRetryableStatus:1,CleanStorage:2,MaxInStorageTimeExceeded:3})});var qn,I_=E(()=>{of();qn=$t({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2})});var Cn,Gs,se,Tc,bc,ru,Zo,wi,Ai,ht,Ws,Me,oo,Wv,es,ts,so,nu,iu,Pn,N_,zv,Ec,sf,zs,Rr,ou,$s,_r,$v,R_,Js,w_,xn,af,Cc,Jv,ao,Hn,su,co,Oi,Dn,Xs,Pc,Kn,Qs,Xv,cf,ai,Qv,ki,A_,In,lf,xc,O_,k_,uf,Zs,Dc,Li,Zv,L_,au,F_,em,Ic,M_,cu,lu,ea,tm,lt=E(()=>{Cn="toLowerCase",Gs="blkVal",se="length",Tc="rdOnly",bc="notify",ru="warnToConsole",Zo="throwInternal",wi="setDf",Ai="watch",ht="logger",Ws="apply",Me="push",oo="splice",Wv="hdlr",es="cancel",ts="initialize",so="identifier",nu="removeNotificationListener",iu="addNotificationListener",Pn="isInitialized",N_="instrumentationKey",zv="INACTIVE",Ec="value",sf="getNotifyMgr",zs="getPlugin",Rr="name",ou="iKey",$s="time",_r="processNext",$v="getProcessTelContext",R_="pollInternalLogs",Js="enabled",w_="stopPollingInternalLogs",xn="unload",af="onComplete",Cc="version",Jv="loggingLevelConsole",ao="createNew",Hn="teardown",su="messageId",co="message",Oi="isAsync",Dn="diagLog",Xs="_doTeardown",Pc="update",Kn="getNext",Qs="setNextPlugin",Xv="protocol",cf="userAgent",ai="split",Qv="nodeType",ki="replace",A_="logInternalMessage",In="type",lf="handler",xc="status",O_="getResponseHeader",k_="getAllResponseHeaders",uf="isChildEvt",Zs="data",Dc="getCtx",Li="setCtx",Zv="complete",L_="itemsReceived",au="urlString",F_="sendPOST",em="headers",Ic="timeout",M_="setRequestHeader",cu="traceId",lu="spanId",ea="traceFlags",tm="getAttribute"});function qx(r,e){U_||(U_=u_("AggregationError",function(n,i){i[se]>1&&(n.errors=i[1])}));var t=r||"One or more errors occurred.";throw V(e,function(n,i){t+=`
`.concat(i," > ").concat(fe(n))}),new U_(t,e||[])}var U_,Hx=E(()=>{Ne();lt()});function Bn(r,e){return Wx(r,function(t){return e?e({status:"fulfilled",rejected:!1,value:t}):t},function(t){return e?e({status:G_,rejected:!0,reason:t}):t})}function Wx(r,e,t,n){var i=r;try{if(un(r))(e||t)&&(i=r.then(e,t));else try{e&&(i=e(r))}catch(o){if(t)i=t(o);else throw o}}finally{n&&MM(i,n)}return i}function MM(r,e){var t=r;return e&&(un(r)?r.finally?t=r.finally(e):t=r.then(function(n){return e(),n},function(n){throw e(),n}):e()),t}function UM(r,e,t,n){Y_=Y_||{toString:function(){return"[[PromiseState]]"}},V_=V_||{toString:function(){return"[[PromiseResult]]"}},j_=j_||{toString:function(){return"[[PromiseIsHandled]]"}};var i={};i[Y_]={get:e},i[V_]={get:t},i[j_]={get:n},r_(r,i)}function YM(r){var e;return r&&r.createEvent&&(e=r.createEvent("Event")),!!e&&e.initEvent}function VM(r,e,t,n){var i=zt();!rm&&(rm=_n(!!Ae(YM,[i]).v));var o=rm.v?i.createEvent("Event"):n?new Event(e):{};if(t&&t(o),rm.v&&o.initEvent(e,!1,!0),o&&r[Bx])r[Bx](o);else{var s=r["on"+e];if(s)s(o);else{var a=Pe("console");a&&(a.error||a.log)(e,fe(o))}}}function Gx(r){return Ee(r)?r.toString():fe(r)}function Jx(r,e,t){var n=Ql(arguments,3),i=0,o=!1,s,a=[],c=qM++,l=df.length>0?df[df.length-1]:void 0,u=!1,d=null,f;function v(k,j){try{df.push(c),u=!0,d&&d.cancel(),d=null;var H=r(function(oe,$){a.push(function(){try{var G=i===2?k:j,re=Fe(G)?s:Ee(G)?G(s):G;un(re)?re.then(oe,$):G?oe(re):i===3?$(re):oe(re)}catch(Q){$(Q)}}),o&&N()},n);return H}finally{df.pop()}}function m(k){return v(void 0,k)}function S(k){var j=k,H=k;return Ee(k)&&(j=function(oe){return k&&k(),oe},H=function(oe){throw k&&k(),oe}),v(j,H)}function y(){return zx[i]}function N(){if(a.length>0){var k=a.slice();a=[],u=!0,d&&d.cancel(),d=null,e(k)}}function C(k,j){return function(H){if(i===j){if(k===2&&un(H)){i=1,H.then(C(2,1),C(3,1));return}i=k,o=!0,s=H,N(),!u&&k===3&&!d&&(d=jn(_,HM))}}}function _(){if(!u)if(u=!0,Cx())process.emit($x,s,f);else{var k=cr()||dn();!q_&&(q_=_n(Ae(Pe,[nm+"RejectionEvent"]).v)),VM(k,jM,function(j){return Qe(j,"promise",{g:function(){return f}}),j.reason=s,j},!!q_.v)}}f={then:v,catch:m,finally:S},Sn(f,"state",{get:y}),Kx&&UM(f,y,function(){return Nv(s)},function(){return u}),Px()&&(f[Zd(11)]="IPromise");function A(){return"IPromise"+(Kx?"["+c+(Fe(l)?"":":"+l)+"]":"")+" "+y()+(o?" - "+Gx(s):"")}return f.toString=A,(function(){Ee(t)||Zr(nm+": executor is not a function - "+Gx(t));var j=C(3,0);try{t.call(f,C(2,0),j)}catch(H){j(H)}})(),f}function KM(r){return function(e){var t=Ql(arguments,1);return r(function(n,i){try{var o=[],s=1;Fv(e,function(a,c){a&&(s++,Wx(a,function(l){o[c]=l,--s===0&&n(o)},i))}),s--,s===0&&n(o)}catch(a){i(a)}},t)}}function BM(r){return _n(function(e){var t=Ql(arguments,1);return r(function(n,i){var o=[],s=1;function a(c,l){s++,Bn(c,function(u){u.rejected?o[l]={status:G_,reason:u.reason}:o[l]={status:"fulfilled",value:u.value},--s===0&&n(o)})}try{de(e)?V(e,a):c_(e)?Fv(e,a):Zr("Input is not an iterable"),s--,s===0&&n(o)}catch(c){i(c)}},t)})}function Xx(r){V(r,function(e){try{e()}catch{}})}function GM(r){var e=Yr(r)?r:0;return function(t){jn(function(){Xx(t)},e)}}function Qx(r,e){return Jx(Qx,GM(e),r,e)}function WM(r,e){!H_&&(H_=_n(Ae(Pe,[nm]).v||null));var t=H_.v;if(!t)return Qx(r);Ee(r)||Zr(nm+": executor is not a function - "+fe(r));var n=0;function i(){return zx[n]}var o=new t(function(s,a){function c(u){n=2,s(u)}function l(u){n=3,a(u)}r(c,l)});return Sn(o,"state",{get:i}),o}function ff(r){return Jx(ff,Xx,r)}function Zx(r,e){return!K_&&(K_=BM(ff)),K_.v(r,e)}function ci(r,e){return!B_&&(B_=_n(WM)),B_.v.call(this,r,e)}var nm,G_,Y_,V_,j_,Kx,zx,Bx,rm,$x,jM,df,qM,HM,q_,H_,K_,B_,eD,MB,Nc=E(()=>{Ne();nm="Promise",G_="rejected";Kx=!1;zx=["pending","resolving","resolved",G_],Bx="dispatchEvent";$x="unhandledRejection",jM=$x.toLowerCase(),df=[],qM=0,HM=10;eD=KM(ci),MB=Zd(11)});var Gn,Re,ta,Vt,im,pf,rs,Rc,Nn,wc,uu,ra,du,lo,om,sm,am,fu,cm,lm,tD,lr=E(()=>{Gn=void 0,Re="",ta="channels",Vt="core",im="createPerfMgr",pf="disabled",rs="extensionConfig",Rc="extensions",Nn="processTelemetry",wc="priority",uu="eventsSent",ra="eventsDiscarded",du="eventsSendRequest",lo="perfEvent",om="offlineEventsStored",sm="offlineBatchSent",am="offlineBatchDrop",fu="getPerfMgr",cm="domain",lm="path",tD="Not dynamic - "});function li(r){return!z(r)}function Ac(r){var e=r;return e&&Oe(e)&&(e=e[ki]($M,function(t,n){return n.toUpperCase()}),e=e[ki](JM,"_"),e=e[ki](XM,function(t,n){return"_"+n})),e}function rr(r,e){return r&&e?Tn(r,e)!==-1:!1}function Wn(r){return r&&r.toISOString()||""}function _t(r){return mc(r)?r[Rr]:Re}function ui(r,e,t,n,i){var o=t;return r&&(o=r[e],o!==t&&(!i||i(o))&&(!n||n(t))&&(o=t,r[e]=o)),o}function vf(r,e,t){var n;return r?(n=r[e],!n&&z(n)&&(n=Fe(t)?{}:t,r[e]=n)):n=Fe(t)?{}:t,n}function nD(r,e){var t=null,n=null;return Ee(r)?t=r:n=r,function(){var i=arguments;if(t&&(n=t()),n)return n[e][Ws](n,i)}}function W_(r,e,t){if(r&&e&&Ut(r)&&Ut(e)){var n=function(o){if(Oe(o)){var s=e[o];Ee(s)?(!t||t(o,!0,e,r))&&(r[o]=nD(e,o)):(!t||t(o,!1,e,r))&&(ii(r,o)&&delete r[o],Qe(r,o,{g:function(){return e[o]},s:function(a){e[o]=a}}))}};for(var i in e)n(i)}return r}function ns(r,e,t,n,i){r&&e&&t&&(i!==!1||Fe(r[e]))&&(r[e]=nD(t,n))}function zn(r,e,t,n){return r&&e&&Ut(r)&&de(t)&&V(t,function(i){Oe(i)&&ns(r,i,e,i,n)}),r}function z_(r){return(function(){function e(){var t=this;r&&me(r,function(n,i){t[n]=i})}return e})()}function Rn(r){return r&&$l&&(r=Bl($l({},r))),r}function um(r,e,t,n,i,o){var s=arguments,a=s[0]||{},c=s[se],l=!1,u=1;for(c>0&&ro(a)&&(l=a,a=s[u]||{},u++),Ut(a)||(a={});u<c;u++){var d=s[u],f=de(d),v=Ut(d);for(var m in d){var S=f&&m in d||v&&ii(d,m);if(S){var y=d[m],N=void 0;if(l&&y&&((N=de(y))||jr(y))){var C=a[m];N?de(C)||(C=[]):jr(C)||(C={}),y=um(l,C,y)}y!==void 0&&(a[m]=y)}}}return a}function Fi(r){try{return r.responseText}catch{}return null}function Oc(r,e){return r?"XDomainRequest,Response:"+Fi(r)||"":e}function is(r,e){return r?"XMLHttpRequest,Status:"+r[xc]+",Response:"+Fi(r)||r.response||"":e}function os(r,e){return e&&(Yr(e)?r=[e].concat(r):de(e)&&(r=e.concat(r))),r}function $_(r,e,t,n,i,o){n===void 0&&(n=!1),i===void 0&&(i=!1);function s(c,l,u){try{c[l]=u}catch{}}var a=new XMLHttpRequest;return n&&s(a,QM,n),t&&s(a,rD,t),a.open(r,e,!i),t&&s(a,rD,t),!i&&o&&s(a,ZM,o),a}function dm(r){var e={};if(Oe(r)){var t=nt(r)[ai](/[\r\n]+/);V(t,function(n){if(n){var i=n.indexOf(": ");if(i!==-1){var o=nt(n.substring(0,i))[Cn](),s=nt(n.substring(i+1));e[o]=s}else e[nt(n)]=1}})}return e}function pu(r,e,t){if(!r[t]&&e&&e[O_]){var n=e[O_](t);n&&(r[t]=nt(n))}return r}function ss(r,e){var t={};return r[k_]?t=dm(r[k_]()):e&&(t=pu(t,r,r1),t=pu(t,r,e1),t=pu(t,r,t1)),t}var zM,$M,JM,XM,KB,QM,rD,ZM,e1,t1,r1,uo=E(()=>{En();Ne();lt();lr();zM="getPrototypeOf",$M=/-([a-z])/g,JM=/([^\w\d_$])/g,XM=/^(\d+[\w\d_$])/,KB=Object[zM];QM="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",rD="withCredentials",ZM="timeout";e1="kill-duration",t1="kill-duration-seconds",r1="time-delta-millis"});function aD(r,e){var t=!1;if(r){try{if(t=e in r,!t){var n=r[Pi];n&&(t=e in n)}}catch{}if(!t)try{var i=new r;t=!Fe(i[e])}catch{}}return t}function tT(r){sD=r}function kc(r){if(r&&sD){var e=Pe("__mockLocation");if(e)return e}return typeof location===$o&&location?location:Pe(i1)}function mf(){return typeof console!==eo?console:Pe(o1)}function fo(){return!!(typeof JSON===$o&&JSON||Pe(iD)!==null)}function qr(){return fo()?JSON||Pe(iD):null}function gf(){return Pe(s1)}function hf(){return Pe(a1)}function na(){var r=Sr();return r&&r.product?r.product===c1:!1}function ia(){var r=Sr();if(r&&(r[cf]!==X_||J_===null)){X_=r[cf];var e=(X_||Re)[Cn]();J_=rr(e,Z_)||rr(e,eT)}return J_}function yf(r){if(r===void 0&&(r=null),!r){var e=Sr()||{};r=e?(e.userAgent||Re)[Cn]():Re}var t=(r||Re)[Cn]();if(rr(t,Z_)){var n=zt()||{};return Math.max(parseInt(t[ai](Z_)[1]),n[n1]||0)}else if(rr(t,eT)){var i=parseInt(t[ai](eT)[1]);if(i)return i+4}return null}function wn(r){return(Q_===null||r===!1)&&(Q_=Qd()&&!!Sr().sendBeacon),Q_}function as(r){var e=!1;try{e=!!Pe("fetch");var t=Pe("Request");e&&r&&t&&(e=aD(t,"keepalive"))}catch{}return e}function Sf(){return vu===null&&(vu=typeof XDomainRequest!==eo,vu&&mu()&&(vu=vu&&!aD(Pe(oD),"withCredentials"))),vu}function mu(){var r=!1;try{var e=Pe(oD);r=!!e}catch{}return r}function cD(r,e){if(r)for(var t=0;t<r[se];t++){var n=r[t];if(n[Rr]&&n[Rr]===e)return n}return{}}function rT(r){var e=zt();return e&&r?cD(e.querySelectorAll("meta"),r).content:null}function nT(r){var e,t=Bs();if(t){var n=t.getEntriesByType("navigation")||[];e=cD((n[se]>0?n[0]:{}).serverTiming,r).description}return e}var n1,i1,o1,iD,s1,a1,c1,Z_,eT,oD,J_,X_,sD,vu,Q_,oa=E(()=>{"use strict";En();Ne();lt();uo();lr();n1="documentMode",i1="location",o1="console",iD="JSON",s1="crypto",a1="msCrypto",c1="ReactNative",Z_="msie",eT="trident/",oD="XMLHttpRequest",J_=null,X_=null,sD=!1,vu=null,Q_=null});function l1(r){r<0&&(r>>>=0),_f=uD+r&sa,Tf=dD-r&sa,fD=!0}function u1(){try{var r=Yt()&2147483647;l1((Math.random()*lD^r)+r)}catch{}}function bf(r){return r>0?Math.floor(cs()/sa*(r+1))>>>0:0}function cs(r){var e=0,t=gf()||hf();return t&&t.getRandomValues&&(e=t.getRandomValues(new Uint32Array(1))[0]&sa),e===0&&ia()&&(fD||u1(),e=pD()&sa),e===0&&(e=Math.floor(lD*Math.random()|0)),r||(e>>>=0),e}function pD(r){Tf=36969*(Tf&65535)+(Tf>>16)&sa,_f=18e3*(_f&65535)+(_f>>16)&sa;var e=(Tf<<16)+(_f&65535)>>>0&sa|0;return r||(e>>>=0),e}function Ef(r){r===void 0&&(r=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=cs()>>>0,n=0,i=Re;i[se]<r;)n++,i+=e.charAt(t&63),t>>>=6,n===5&&(t=(cs()<<2&4294967295|t&3)>>>0,n=0);return i}var lD,sa,uD,dD,fD,_f,Tf,fm=E(()=>{Ne();lt();oa();lr();lD=4294967296,sa=4294967295,uD=123456789,dD=987654321,fD=!1,_f=uD,Tf=dD});function mD(r){return r[Qv]===1||r[Qv]===9||!+r[Qv]}function p1(r,e){var t=e[r.id];if(!t){t={};try{mD(e)&&Qe(e,r.id,{e:!1,v:t})}catch{}}return t}function Hr(r,e){return e===void 0&&(e=!1),Ac(r+f1+++(e?"."+vD:Re)+d1)}function pm(r){var e={id:Hr("_aiData-"+(r||Re)+"."+vD),accept:function(t){return mD(t)},get:function(t,n,i,o){var s=t[e.id];return s?s[Ac(n)]:(o&&(s=p1(e,t),s[Ac(n)]=i),i)},kill:function(t,n){if(t&&t[n])try{delete t[n]}catch{}}};return e}var vD,d1,f1,gu=E(()=>{Ne();lt();uo();lr();fm();vD="3.3.4",d1="."+Ef(6),f1=0});function vm(r){return r&&Ut(r)&&(r.isVal||r.fb||ii(r,"v")||ii(r,"mrg")||ii(r,"ref")||r.set)}function gD(r,e,t){var n,i=t.dfVal||fx;if(e&&t.fb){var o=t.fb;de(o)||(o=[o]);for(var s=0;s<o[se];s++){var a=o[s],c=e[a];if(i(c)?n=c:r&&(c=r.cfg[a],i(c)&&(n=c),r.set(r.cfg,er(a),c)),i(n))break}}return!i(n)&&i(t.v)&&(n=t.v),n}function iT(r,e,t){var n=t;if(t&&vm(t)&&(n=gD(r,e,t)),n){vm(n)&&(n=iT(r,e,n));var i;de(n)?(i=[],i[se]=n[se]):jr(n)&&(i={}),i&&(me(n,function(o,s){s&&vm(s)&&(s=iT(r,e,s)),i[o]=s}),n=i)}return n}function Cf(r,e,t,n){var i,o,s,a=n,c,l,u,d;vm(a)?(i=a.isVal,o=a.set,u=a[Tc],d=a[Gs],c=a.mrg,l=a.ref,!l&&Fe(l)&&(l=!!c),s=gD(r,e,a)):s=n,d&&r[Gs](e,t);var f,v=!0,m=e[t];(m||!z(m))&&(f=m,v=!1,i&&f!==s&&!i(f)&&(f=s,v=!0),o&&(f=o(f,s,e),v=f===s)),v?s?f=iT(r,e,s):f=s:(jr(f)||de(s))&&c&&s&&(jr(s)||de(s))&&me(s,function(S,y){Cf(r,f,S,y)}),r.set(e,t,f),l&&r.ref(e,t),u&&r[Tc](e,t)}var oT=E(()=>{Ne();lt()});function sT(r){if(r){var e;if(de(r)?(e=[],e[se]=r[se]):jr(r)&&(e={}),e)return me(r,function(t,n){e[t]=sT(n)}),e}return r}function Pf(r){if(r){var e=r[po]||r;if(e.cfg&&(e.cfg===r||e.cfg[po]===e))return e}return null}function xf(r){if(r&&(jr(r)||de(r)))try{r[hD]=!0}catch{}return r}function aT(r){if(r)try{r[yD]=!0}catch{}return r}function mm(r,e,t){var n=!1;return t&&!r[e.blkVal]&&(n=t[yD],!n&&!t[hD]&&(n=jr(t)||de(t))),n}function gm(r){Zr("InvalidAccess:"+r)}var po,hD,yD,hm=E(()=>{Ne();lt();po=Lv("[[ai_dynCfg_1]]"),hD=Lv("[[ai_blkDynCfg_1]]"),yD=Lv("[[ai_frcDynCfg_1]]")});function m1(r,e,t){de(e)&&V(v1,function(n){var i=e[n];e[n]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=i[Ws](this,o);return Df(r,e,t,"Patching"),a}})}function ym(r,e){var t=Dx(r,e);return t&&t.get}function g1(r,e,t,n){var i={n:t,h:[],trk:function(l){l&&l.fn&&(Ze(i.h,l)===-1&&i.h[Me](l),r.trk(l,i))},clr:function(l){var u=Ze(i.h,l);u!==-1&&i.h[oo](u,1)}},o=!0,s=!1;function a(){o&&(s=s||mm(a,r,n),n&&!n[po]&&s&&(n=Df(r,n,t,"Converting")),o=!1);var l=r.act;return l&&i.trk(l),n}a[r.prop]={chng:function(){r.add(i)}};function c(l){if(n!==l){a[r.ro]&&!r.upd&&gm("["+t+"] is read-only:"+fe(e)),o&&(s=s||mm(a,r,n),o=!1);var u=s&&a[r.rf];if(s)if(u){me(n,function(f){n[f]=l?l[f]:Gn});try{me(l,function(f,v){If(r,n,f,v)}),l=n}catch(f){hu((r.hdlr||{})[ht],t,"Assigning",f),s=!1}}else n&&n[po]&&me(n,function(f){var v=ym(n,f);if(v){var m=v[r.prop];m&&m.chng()}});if(l!==n){var d=l&&mm(a,r,l);!u&&d&&(l=Df(r,l,t,"Converting")),n=l,s=d}r.add(i)}}Qe(e,i.n,{g:a,s:c})}function If(r,e,t,n){if(e){var i=ym(e,t),o=i&&!!i[r.prop];o?e[t]=n:g1(r,e,t,n)}return e}function Sm(r,e,t,n){if(e){var i=ym(e,t),o=i&&!!i[r.prop],s=n&&n[0],a=n&&n[1],c=n&&n[2];if(!o){if(c)try{xf(e)}catch(l){hu((r.hdlr||{})[ht],t,"Blocking",l)}try{If(r,e,t,e[t]),i=ym(e,t)}catch(l){hu((r.hdlr||{})[ht],t,"State",l)}}s&&(i[r.rf]=s),a&&(i[r.ro]=a),c&&(i[r.blkVal]=!0)}return e}function Df(r,e,t,n){try{me(e,function(i,o){If(r,e,i,o)}),e[po]||(Sn(e,po,{get:function(){return r[Wv]}}),m1(r,e,t))}catch(i){hu((r.hdlr||{})[ht],t,n,i)}return e}var v1,hu,SD=E(()=>{Ne();lr();lt();hm();v1=["push","pop","shift","unshift","splice"],hu=function(r,e,t,n){r&&r[Zo](3,108,"".concat(t," [").concat(e,"] failed - ")+fe(n))}});function _D(r){var e,t=Xl(Nf+"get"+r.uid+Rf),n=Xl(Nf+"ro"+r.uid+Rf),i=Xl(Nf+"rf"+r.uid+Rf),o=Xl(Nf+"blkVal"+r.uid+Rf),s=Xl(Nf+"dtl"+r.uid+Rf),a=null,c=null,l;function u(m,S){var y=l.act;try{l.act=m,m&&m[s]&&(V(m[s],function(C){C.clr(m)}),m[s]=[]),S({cfg:r.cfg,set:r.set.bind(r),setDf:r[wi].bind(r),ref:r.ref.bind(r),rdOnly:r[Tc].bind(r)})}catch(C){var N=r[ht];throw N&&N[Zo](1,107,fe(C)),C}finally{l.act=y||null}}function d(){if(a){var m=a;a=null,c&&c[es](),c=null;var S=[];if(V(m,function(y){if(y&&(y[s]&&(V(y[s],function(N){N.clr(y)}),y[s]=null),y.fn))try{u(y,y.fn)}catch(N){S[Me](N)}}),a)try{d()}catch(y){S[Me](y)}S[se]>0&&qx("Watcher error(s): ",S)}}function f(m){if(m&&m.h[se]>0){a||(a=[]),c||(c=jn(function(){c=null,d()},0));for(var S=0;S<m.h[se];S++){var y=m.h[S];y&&Ze(a,y)===-1&&a[Me](y)}}}function v(m,S){if(m){var y=m[s]=m[s]||[];Ze(y,S)===-1&&y[Me](S)}}return l=(e={prop:t,ro:n,rf:i},e[Gs]=o,e[Wv]=r,e.add=f,e[bc]=d,e.use=u,e.trk=v,e),l}var Nf,Rf,TD=E(()=>{Ne();Hx();lt();Nf="[[ai_",Rf="]]"});function h1(r,e){var t={fn:e,rm:function(){t.fn=null,r=null,e=null}};return Qe(t,"toJSON",{v:function(){return"WatcherHandler"+(t.fn?"":"[X]")}}),r.use(t,e),t}function y1(r,e,t){var n,i=Pf(e);if(i)return i;var o=Hr("dyncfg",!0),s=e&&t!==!1?e:sT(e),a;function c(){a[bc]()}function l(N,C,_){try{N=If(a,N,C,_)}catch(A){hu(r,C,"Setting value",A)}return N[C]}function u(N){return h1(a,N)}function d(N,C){a.use(null,function(_){var A=a.upd;try{Fe(C)||(a.upd=C),N(_)}finally{a.upd=A}})}function f(N,C){var _;return Sm(a,N,C,(_={},_[0]=!0,_))[C]}function v(N,C){var _;return Sm(a,N,C,(_={},_[1]=!0,_))[C]}function m(N,C){var _;return Sm(a,N,C,(_={},_[2]=!0,_))[C]}function S(N,C){return C&&me(C,function(_,A){Cf(y,N,_,A)}),N}var y=(n={uid:null,cfg:s},n[ht]=r,n[bc]=c,n.set=l,n[wi]=S,n[Ai]=u,n.ref=f,n[Tc]=v,n[Gs]=m,n._block=d,n);return Qe(y,"uid",{c:!1,e:!1,w:!1,v:o}),a=_D(y),Df(a,s,"config","Creating"),y}function S1(r,e){r?(r[ru](e),r[Zo](2,108,e)):gm(e)}function wt(r,e,t,n){var i=y1(t,r||{},n);return e&&i[wi](i.cfg,e),i}function ur(r,e,t){var n=r[po]||r;return n.cfg&&(n.cfg===r||n.cfg[po]===n)?n[Ai](e):(S1(t,tD+fe(r)),wt(r,null,t)[Ai](e))}var aa=E(()=>{Ne();gu();lr();lt();oT();SD();TD();hm()});function ls(r,e){if(r&&r[xn])return r[xn](e)}function _m(r,e,t){var n;return t||(n=ci(function(i){t=i})),r&&Zl(r)>0?Bn(ls(r[0],e),function(){_m(Ql(r,1),e,t)}):t(),n}var cT=E(()=>{Nc();Ne();lt()});var bD,lT,uT=E(()=>{bD=500,lT="Microsoft_ApplicationInsights_BypassAjaxInstrumentation"});function _1(r,e,t){return!r&&z(r)?e:ro(r)?r:er(r)[Cn]()==="true"}function dT(r){return{mrg:!0,v:r}}function yu(r,e,t){return{fb:t,isVal:r,v:e}}function di(r,e){return{fb:e,set:_1,v:!!r}}var fT=E(()=>{Ne();lt()});function T1(r,e){return function(){var t=arguments,n=vT(e);if(n){var i=n.listener;i&&i[r]&&i[r][Ws](i,t)}}}function b1(){var r=Pe("Microsoft");return r&&(bm=r.ApplicationInsights),bm}function vT(r){var e=bm;return!e&&r.disableDbgExt!==!0&&(e=bm||b1()),e?e.ChromeDbgExt:null}function ED(r){if(!Tm){Tm={};for(var e=0;e<pT[se];e++)Tm[pT[e]]=T1(pT[e],r)}return Tm}var pT,bm,Tm,mT=E(()=>{Ne();lt();lr();pT=[uu,ra,du,lo],bm=null});function CD(r){return r?'"'+r[ki](/\"/g,Re)+'"':Re}function gT(r,e){var t=mf();if(t){var n="log";t[r]&&(n=r),Ee(t[n])&&t[n](e)}}function Mi(r,e){return(r||{})[ht]||new ca(e)}function hT(r){return r||new ca}function X(r,e,t,n,i,o){o===void 0&&(o=!1),hT(r)[Zo](e,t,n,i,o)}function fn(r,e){hT(r)[ru](e)}function yT(r,e,t){hT(r)[A_](e,t)}var Su,PD,E1,C1,P1,x1,D1,Lc,ca,Ui=E(()=>{"use strict";Nr();Ne();aa();lt();mT();oa();lr();PD="warnToConsole",E1="AI (Internal): ",C1="AI: ",P1="AITR_",x1={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},D1=(Su={},Su[0]=null,Su[1]="errorToConsole",Su[2]=PD,Su[3]="debugToConsole",Su);Lc=(function(){function r(e,t,n,i){n===void 0&&(n=!1);var o=this;o[su]=e,o[co]=(n?C1:E1)+e;var s=Re;fo()&&(s=qr().stringify(i));var a=(t?" message:"+CD(t):Re)+(i?" props:"+CD(s):Re);o[co]+=a}return r.dataType="MessageData",r})();ca=(function(){function r(e){this.identifier="DiagnosticLogger",this.queue=[];var t=0,n={},i,o,s,a,c;Ke(r,this,function(l){c=d(e||{}),l.consoleLoggingLevel=function(){return i},l[Zo]=function(m,S,y,N,C){C===void 0&&(C=!1);var _=new Lc(S,y,C,N);if(a)throw fe(_);var A=D1[m]||PD;if(Fe(_[co]))v("throw"+(m===1?"Critical":"Warning"),_);else{if(C){var k=+_[su];!n[k]&&i>=m&&(l[A](_[co]),n[k]=!0)}else i>=m&&l[A](_[co]);u(m,_)}},l.debugToConsole=function(m){gT("debug",m),v("warning",m)},l[ru]=function(m){gT("warn",m),v("warning",m)},l.errorToConsole=function(m){gT("error",m),v("error",m)},l.resetInternalMessageCount=function(){t=0,n={}},l[A_]=u,l[xn]=function(m){c&&c.rm(),c=null};function u(m,S){if(!f()){var y=!0,N=P1+S[su];if(n[N]?y=!1:n[N]=!0,y&&(m<=o&&(l.queue[Me](S),t++,v(m===1?"error":"warn",S)),t===s)){var C="Internal events throttle limit per PageView reached for this app.",_=new Lc(23,C,!1);l.queue[Me](_),m===1?l.errorToConsole(C):l[ru](C)}}}function d(m){return ur(wt(m,x1,l).cfg,function(S){var y=S.cfg;i=y[Jv],o=y.loggingLevelTelemetry,s=y.maxMessageLimit,a=y.enableDebug})}function f(){return t>=s}function v(m,S){var y=vT(e||{});y&&y[Dn]&&y[Dn](m,S)}})}return r.__ieDyn=1,r})()});function CT(){!vo&&(vo=o_(function(){return zt()}))}function N1(r,e){var t=us[la]||Pm[la];return t||(t=us[la]=us(r,e),Pm[la]=t),t}function Cm(r){return r?r.isEnabled():!0}function LD(r,e){return e&&r&&de(r.ignoreCookies)?Ze(r.ignoreCookies,e)!==-1:!1}function R1(r,e){return e&&r&&de(r.blockedCookies)&&Ze(r.blockedCookies,e)!==-1?!0:LD(r,e)}function wD(r,e){var t=e[Js];if(z(t)){var n=void 0;Fe(r[ID])||(n=!r[ID]),Fe(r[bT])||(n=!r[bT]),t=n}return t}function PT(r,e){var t;if(r)t=r.getCookieMgr();else if(e){var n=e.cookieCfg;n&&n[la]?t=n[la]:t=us(e)}return t||(t=N1(e,(r||{})[ht])),t}function us(r,e){var t,n,i,o,s,a,c,l,u;r=wt(r||Pm,null,e).cfg,s=ur(r,function(f){f[wi](f.cfg,I1),n=f.ref(f.cfg,"cookieCfg"),i=n[lm]||"/",o=n[cm],a=wD(r,n)!==!1,c=n.getCookie||w1,l=n.setCookie||kD,u=n.delCookie||kD},e);var d=(t={isEnabled:function(){var f=wD(r,n)!==!1&&a&&_u(e),v=Pm[la];return f&&v&&d!==v&&(f=Cm(v)),f},setEnabled:function(f){a=f!==!1,n[Js]=f},set:function(f,v,m,S,y){var N=!1;if(Cm(d)&&!R1(n,f)){var C={},_=nt(v||Re),A=Tn(_,";");if(A!==-1&&(_=nt(hc(v,A)),C=FD(yr(v,A+1))),ui(C,cm,S||o,Di,Fe),!z(m)){var k=ia();if(Fe(C[_T])){var j=Yt(),H=j+m*1e3;if(H>0){var oe=new Date;oe.setTime(H),ui(C,_T,AD(oe,k?xD:DD)||AD(oe,k?xD:DD)||Re,Di)}}k||ui(C,"max-age",Re+m,null,Fe)}var $=kc();$&&$[Xv]==="https:"&&(ui(C,"secure",null,null,Fe),TT===null&&(TT=!xm((Sr()||{})[cf])),TT&&ui(C,"SameSite","None",null,Fe)),ui(C,lm,y||i,null,Fe),l(f,OD(_,C)),N=!0}return N},get:function(f){var v=Re;return Cm(d)&&!LD(n,f)&&(v=c(f)),v},del:function(f,v){var m=!1;return Cm(d)&&(m=d.purge(f,v)),m},purge:function(f,v){var m,S=!1;if(_u(e)){var y=(m={},m[lm]=v||"/",m[_T]="Thu, 01 Jan 1970 00:00:01 GMT",m);ia()||(y["max-age"]="0"),u(f,OD(Re,y)),S=!0}return S}},t[xn]=function(f){s&&s.rm(),s=null},t);return d[la]=d,d}function _u(r){if(Em===null){Em=!1,!vo&&CT();try{var e=vo.v||{};Em=e[ET]!==void 0}catch(t){X(r,2,68,"Cannot access document.cookie - "+_t(t),{exception:fe(t)})}}return Em}function FD(r){var e={};if(r&&r[se]){var t=nt(r)[ai](";");V(t,function(n){if(n=nt(n||Re),n){var i=Tn(n,"=");i===-1?e[n]=null:e[nt(hc(n,i))]=nt(yr(n,i+1))}})}return e}function AD(r,e){return Ee(r[e])?r[e]():null}function OD(r,e){var t=r||Re;return me(e,function(n,i){t+="; "+n+(z(i)?Re:"="+i)}),t}function w1(r){var e=Re;if(!vo&&CT(),vo.v){var t=vo.v[ET]||Re;ND!==t&&(RD=FD(t),ND=t),e=nt(RD[r]||Re)}return e}function kD(r,e){!vo&&CT(),vo.v&&(vo.v[ET]=r+"="+e)}function xm(r){return Oe(r)?!!(rr(r,"CPU iPhone OS 12")||rr(r,"iPad; CPU OS 12")||rr(r,"Macintosh; Intel Mac OS X 10_14")&&rr(r,"Version/")&&rr(r,"Safari")||rr(r,"Macintosh; Intel Mac OS X 10_14")&&Sc(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||rr(r,"Chrome/5")||rr(r,"Chrome/6")||rr(r,"UnrealEngine")&&!rr(r,"Chrome")||rr(r,"UCBrowser/12")||rr(r,"UCBrowser/11")):!1}var ST,Fc,xD,DD,ET,_T,ID,bT,la,Em,TT,ND,vo,RD,Pm,I1,xT=E(()=>{Ne();fT();aa();lt();Ui();oa();uo();lr();xD="toGMTString",DD="toUTCString",ET="cookie",_T="expires",ID="isCookieUseDisabled",bT="disableCookiesUsage",la="_ckMgr",Em=null,TT=null,ND=null,RD={},Pm={},I1=(ST={cookieCfg:dT((Fc={},Fc[cm]={fb:"cookieDomain",dfVal:li},Fc.path={fb:"cookiePath",dfVal:li},Fc.enabled=Gn,Fc.ignoreCookies=Gn,Fc.blockedCookies=Gn,Fc)),cookieDomain:Gn,cookiePath:Gn},ST[bT]=Gn,ST)});function O1(r){r.h=null;var e=r.cb;r.cb=[],V(e,function(t){Ae(t.fn,[t.arg])})}function ua(r,e,t,n){V(r,function(i){i&&i[e]&&(t?(t.cb[Me]({fn:n,arg:i}),t.h=t.h||jn(O1,0,t)):Ae(n,[i]))})}var A1,wf,DT=E(()=>{Nr();Nc();Ne();aa();lt();lr();A1={perfEvtsSendAll:!1};wf=(function(){function r(e){this.listeners=[];var t,n,i=[],o={h:null,cb:[]},s=wt(e,A1);n=s[Ai](function(a){t=!!a.cfg.perfEvtsSendAll}),Ke(r,this,function(a){Qe(a,"listeners",{g:function(){return i}}),a[iu]=function(c){i[Me](c)},a[nu]=function(c){for(var l=Ze(i,c);l>-1;)i[oo](l,1),l=Ze(i,c)},a[uu]=function(c){ua(i,uu,o,function(l){l[uu](c)})},a[ra]=function(c,l){ua(i,ra,o,function(u){u[ra](c,l)})},a[du]=function(c,l){ua(i,du,l?o:null,function(u){u[du](c,l)})},a[lo]=function(c){c&&(t||!c[uf]())&&ua(i,lo,null,function(l){c[Oi]?jn(function(){return l[lo](c)},0):l[lo](c)})},a[om]=function(c){c&&c[se]&&ua(i,om,o,function(l){l[om](c)})},a[sm]=function(c){c&&c[Zs]&&ua(i,sm,o,function(l){l[sm](c)})},a[am]=function(c,l){if(c>0){var u=l||0;ua(i,am,o,function(d){d[am](c,u)})}},a[xn]=function(c){var l=function(){n&&n.rm(),n=null,i=[],o.h&&o.h[es](),o.h=null,o.cb=[]},u;if(ua(i,"unload",null,function(d){var f=d[xn](c);f&&(u||(u=[]),u[Me](f))}),u)return ci(function(d){return Bn(eD(u),function(){l(),d()})});l()}})}return r.__ieDyn=1,r})()});function Jt(r,e,t,n,i){if(r){var o=r;if(o[fu]&&(o=o[fu]()),o){var s=void 0,a=o[Dc](IT);try{if(s=o.create(e(),n,i),s){if(a&&s[Li]&&(s[Li](Mc[NT],a),a[Dc]&&a[Li])){var c=a[Dc](Mc[Af]);c||(c=[],a[Li](Mc[Af],c)),c[Me](s)}return o[Li](IT,s),t(s)}}catch(l){s&&s[Li]&&s[Li]("exception",l)}finally{s&&o.fire(s),o[Li](IT,a)}}}return t()}function RT(){return k1}var Tu,NT,Af,k1,Mc,Of,IT,Dm=E(()=>{Nr();Ne();lt();lr();Tu="ctx",NT="ParentContextKey",Af="ChildrenContextKey",k1=null,Mc=(function(){function r(e,t,n){var i=this;if(i.start=Yt(),i[Rr]=e,i[Oi]=n,i[uf]=function(){return!1},Ee(t)){var o;Qe(i,"payload",{g:function(){return!o&&Ee(t)&&(o=t(),t=null),o}})}i[Dc]=function(s){return s?s===r[NT]||s===r[Af]?i[s]:(i[Tu]||{})[s]:null},i[Li]=function(s,a){if(s)if(s===r[NT])i[s]||(i[uf]=function(){return!0}),i[s]=a;else if(s===r[Af])i[s]=a;else{var c=i[Tu]=i[Tu]||{};c[s]=a}},i[Zv]=function(){var s=0,a=i[Dc](r[Af]);if(de(a))for(var c=0;c<a[se];c++){var l=a[c];l&&(s+=l[$s])}i[$s]=Yt()-i.start,i.exTime=i[$s]-s,i[Zv]=function(){}}}return r.ParentContextKey="parent",r.ChildrenContextKey="childEvts",r})(),Of=(function(){function r(e){this.ctx={},Ke(r,this,function(t){t.create=function(n,i,o){return new Mc(n,i,o)},t.fire=function(n){n&&(n[Zv](),e&&Ee(e[lo])&&e[lo](n))},t[Li]=function(n,i){if(n){var o=t[Tu]=t[Tu]||{};o[n]=i}},t[Dc]=function(n){return(t[Tu]||{})[n]}})}return r.__ieDyn=1,r})(),IT="CoreUtils.doPerf"});function kf(){var r=Uc();return yr(r,0,8)+"-"+yr(r,8,12)+"-"+yr(r,12,16)+"-"+yr(r,16,20)+"-"+yr(r,20)}function Uc(){for(var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=Re,t,n=0;n<4;n++)t=cs(),e+=r[t&15]+r[t>>4&15]+r[t>>8&15]+r[t>>12&15]+r[t>>16&15]+r[t>>20&15]+r[t>>24&15]+r[t>>28&15];var i=r[8+(cs()&3)|0];return io(e,0,8)+io(e,9,4)+"4"+io(e,13,3)+i+io(e,16,3)+io(e,19,12)}var wT=E(()=>{"use strict";Ne();lr();fm()});function ds(r,e,t){return r&&r[se]===e&&r!==t?!!r.match(/^[\da-f]*$/i):!1}function UD(r,e,t){return ds(r,e)?r:t}function YD(r){(isNaN(r)||r<0||r>255)&&(r=1);for(var e=r.toString(16);e[se]<2;)e="0"+e;return e}function Lf(r,e,t,n){var i;return i={},i[Cc]=ds(n,2,OT)?n:AT,i[cu]=mo(r)?r:Uc(),i[lu]=go(e)?e:hc(Uc(),16),i.traceFlags=t>=0&&t<=255?t:1,i}function Yc(r,e){var t;if(!r||(de(r)&&(r=r[0]||""),!r||!Oe(r)||r[se]>8192))return null;if(r.indexOf(",")!==-1){var n=r[ai](",");r=n[e>0&&n[se]>e?e:0]}var i=L1.exec(nt(r));return!i||i[1]===OT||i[2]===Im||i[3]===Nm?null:(t={version:(i[1]||Re)[Cn](),traceId:(i[2]||Re)[Cn](),spanId:(i[3]||Re)[Cn]()},t[ea]=parseInt(i[4],16),t)}function mo(r){return ds(r,32,Im)}function go(r){return ds(r,16,Nm)}function bu(r){return!(!r||!ds(r[Cc],2,OT)||!ds(r[cu],32,Im)||!ds(r[lu],16,Nm)||!ds(YD(r[ea]),2))}function Ff(r){return bu(r)?(r[ea]&MD)===MD:!1}function Mf(r){if(r){var e=YD(r[ea]);ds(e,2)||(e="01");var t=r[Cc]||AT;return t!=="00"&&t!=="ff"&&(t=AT),"".concat(t.toLowerCase(),"-").concat(UD(r.traceId,32,Im).toLowerCase(),"-").concat(UD(r.spanId,16,Nm).toLowerCase(),"-").concat(e.toLowerCase())}return""}function Uf(r){var e="traceparent",t=Yc(rT(e),r);return t||(t=Yc(nT(e),r)),t}function kT(r){var e=r.getElementsByTagName("script"),t=[];return V(e,function(n){var i=n[tm]("src");if(i){var o=n[tm]("crossorigin"),s=n.hasAttribute("async")===!0,a=n.hasAttribute("defer")===!0,c=n[tm]("referrerpolicy"),l={url:i};o&&(l.crossOrigin=o),s&&(l.async=s),a&&(l.defer=a),c&&(l.referrerPolicy=c),t[Me](l)}}),t}var L1,AT,OT,Im,Nm,MD,LT=E(()=>{Ne();lt();wT();oa();lr();L1=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,AT="00",OT="ff",Im="00000000000000000000000000000000",Nm="0000000000000000",MD=1});function fs(r){return F1.get(r,"state",{},!0)}function FT(r,e){for(var t=[],n=null,i=r[Kn](),o;i;){var s=i[zs]();if(s){n&&n[Qs]&&s[Nn]&&n[Qs](s),o=fs(s);var a=!!o[Pn];s[Pn]&&(a=s[Pn]()),a||t[Me](s),n=s,i=i[Kn]()}}V(t,function(c){var l=r[Vt]();c[ts](r.getCfg(),l,e,r[Kn]()),o=fs(c),!c[Vt]&&!o[Vt]&&(o[Vt]=l),o[Pn]=!0,delete o[Hn]})}function Rm(r){return r.sort(function(e,t){var n=0;if(t){var i=t[Nn];e[Nn]?n=i?e[wc]-t[wc]:1:i&&(n=-1)}else n=e?1:-1;return n})}function VD(r){var e={};return{getName:function(){return e[Rr]},setName:function(t){r&&r.setName(t),e[Rr]=t},getTraceId:function(){return e[cu]},setTraceId:function(t){r&&r.setTraceId(t),mo(t)&&(e[cu]=t)},getSpanId:function(){return e[lu]},setSpanId:function(t){r&&r.setSpanId(t),go(t)&&(e[lu]=t)},getTraceFlags:function(){return e[ea]},setTraceFlags:function(t){r&&r.setTraceFlags(t),e[ea]=t}}}var F1,MT=E(()=>{"use strict";Ne();lt();gu();lr();LT();F1=pm("plugin")});function U1(r,e,t){for(;r;){if(r[zs]()===t)return r;r=r[Kn]()}return da([t],e.config||{},e)}function UT(r,e,t,n){var i=null,o=[];e||(e=wt({},null,t[ht])),n!==null&&(i=n?U1(r,t,n):r);var s={_next:c,ctx:{core:function(){return t},diagLog:function(){return Mi(t,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:u,getConfig:d,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(v){i=v},iterate:f,onComplete:a}};function a(v,m){for(var S=[],y=2;y<arguments.length;y++)S[y-2]=arguments[y];v&&o[Me]({func:v,self:Fe(m)?s.ctx:m,args:S})}function c(){var v=i;if(i=v?v[Kn]():null,!v){var m=o;m&&m[se]>0&&(V(m,function(S){try{S.func.call(S.self,S.args)}catch(y){X(t[ht],2,73,"Unexpected Exception during onComplete - "+fe(y))}}),o=[])}return v}function l(v,m){var S=null,y=e.cfg;if(y&&v){var N=y[rs];!N&&m&&(N={}),y[rs]=N,N=e.ref(y,rs),N&&(S=N[v],!S&&m&&(S={}),N[v]=S,S=e.ref(N,v))}return S}function u(v,m){var S=l(v,!0);return m&&me(m,function(y,N){if(z(S[y])){var C=e.cfg[y];(C||!z(C))&&(S[y]=C)}Cf(e,S,y,N)}),e[wi](S,m)}function d(v,m,S){S===void 0&&(S=!1);var y,N=l(v,!1),C=e.cfg;return N&&(N[m]||!z(N[m]))?y=N[m]:(C[m]||!z(C[m]))&&(y=C[m]),y||!z(y)?y:S}function f(v){for(var m;m=s._next();){var S=m[zs]();S&&v(S)}}return s}function pn(r,e,t,n){var i=wt(e),o=UT(r,i,t,n),s=o.ctx;function a(l){var u=o._next();return u&&u[Nn](l,s),!u}function c(l,u){return l===void 0&&(l=null),de(l)&&(l=da(l,i.cfg,t,u)),pn(l||s[Kn](),i.cfg,t,u)}return s[_r]=a,s[ao]=c,s}function Eu(r,e,t){var n=wt(e.config),i=UT(r,n,e,t),o=i.ctx;function s(c){var l=i._next();return l&&l[xn](o,c),!l}function a(c,l){return c===void 0&&(c=null),de(c)&&(c=da(c,n.cfg,e,l)),Eu(c||o[Kn](),e,l)}return o[_r]=s,o[ao]=a,o}function Yf(r,e,t){var n=wt(e.config),i=UT(r,n,e,t),o=i.ctx;function s(c){return o.iterate(function(l){Ee(l[Pc])&&l[Pc](o,c)})}function a(c,l){return c===void 0&&(c=null),de(c)&&(c=da(c,n.cfg,e,l)),Yf(c||o[Kn](),e,l)}return o[_r]=s,o[ao]=a,o}function da(r,e,t,n){var i=null,o=!n;if(de(r)&&r[se]>0){var s=null;V(r,function(a){if(!o&&n===a&&(o=!0),o&&a&&Ee(a[Nn])){var c=Y1(a,e,t);i||(i=c),s&&s._setNext(c),s=c}})}return n&&!i?da([n],e,t):i}function Y1(r,e,t){var n=null,i=Ee(r[Nn]),o=Ee(r[Qs]),s;r?s=r[so]+"-"+r[wc]+"-"+HD++:s="Unknown-0-"+HD++;var a={getPlugin:function(){return r},getNext:function(){return n},processTelemetry:u,unload:d,update:f,_id:s,_setNext:function(v){n=v}};function c(){var v;return r&&Ee(r[qD])&&(v=r[qD]()),v||(v=pn(a,e,t)),v}function l(v,m,S,y,N){var C=!1,_=r?r[so]:M1,A=v[jD];return A||(A=v[jD]={}),v.setNext(n),r&&Jt(v[Vt](),function(){return _+":"+S},function(){A[s]=!0;try{var k=n?n._id:Re;k&&(A[k]=!1),C=m(v)}catch(H){var j=n?A[n._id]:!0;j&&(C=!0),(!n||!j)&&X(v[Dn](),1,73,"Plugin ["+_+"] failed during "+S+" - "+fe(H)+", run flags: "+fe(A))}},y,N),C}function u(v,m){m=m||c();function S(y){if(!r||!i)return!1;var N=fs(r);return N[Hn]||N[pf]?!1:(o&&r[Qs](n),r[Nn](v,y),!0)}l(m,S,"processTelemetry",function(){return{item:v}},!v.sync)||m[_r](v)}function d(v,m){function S(){var y=!1;if(r){var N=fs(r),C=r[Vt]||N[Vt];r&&(!C||C===v.core())&&!N[Hn]&&(N[Vt]=null,N[Hn]=!0,N[Pn]=!1,r[Hn]&&r[Hn](v,m)===!0&&(y=!0))}return y}l(v,S,"unload",function(){},m[Oi])||v[_r](m)}function f(v,m){function S(){var y=!1;if(r){var N=fs(r),C=r[Vt]||N[Vt];r&&(!C||C===v.core())&&!N[Hn]&&r[Pc]&&r[Pc](v,m)===!0&&(y=!0)}return y}l(v,S,"update",function(){},!1)||v[_r](m)}return oi(a)}var M1,jD,qD,HD,YT,wm=E(()=>{"use strict";Ne();oT();aa();lt();Ui();uo();lr();Dm();MT();M1="TelemetryPluginChain",jD="_hasRun",qD="_getTelCtx",HD=0;YT=(function(){function r(e,t,n,i){var o=this,s=pn(e,t,n,i);zn(o,s,Vr(s))}return r})()});function Vc(){var r=[];function e(n){n&&r[Me](n)}function t(n,i){V(r,function(o){try{o(n,i)}catch(s){X(n[Dn](),2,73,"Unexpected error calling unload handler - "+fe(s))}}),r=[]}return{add:e,run:t}}var Am=E(()=>{Ne();lt();Ui()});function VT(r,e){Vf=r,jf=e}function qf(){var r=[];function e(n){var i=r;r=[],V(i,function(o){try{(o.rm||o.remove).call(o)}catch(s){X(n,2,73,"Unloading:"+fe(s))}}),Vf&&i[se]>Vf&&(jf?jf("doUnload",i):X(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}function t(n){n&&(Ni(r,n),Vf&&r[se]>Vf&&(jf?jf("Add",r):X(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return{run:e,add:t}}var Vf,jf,Om=E(()=>{Ne();lt();Ui()});var jT,fa,V1,ps,qT=E(()=>{"use strict";Nr();Ne();aa();lt();Ui();uo();lr();wm();Am();Om();fa="getPlugin",V1=(jT={},jT[rs]={isVal:li,v:{}},jT),ps=(function(){function r(){var e=this,t,n,i,o,s;l(),Ke(r,e,function(u){u[ts]=function(d,f,v,m){c(d,f,m),t=!0},u[Hn]=function(d,f){var v,m=u[Vt];if(!m||d&&m!==d[Vt]())return;var S,y=!1,N=d||Eu(null,m,i&&i[fa]?i[fa]():i),C=f||(v={reason:0},v[Oi]=!1,v);function _(){y||(y=!0,o.run(N,f),s.run(N[Dn]()),S===!0&&N[_r](C),l())}return!u[Xs]||u[Xs](N,C,_)!==!0?_():S=!0,S},u[Pc]=function(d,f){var v=u[Vt];if(!v||d&&v!==d[Vt]())return;var m,S=!1,y=d||Yf(null,v,i&&i[fa]?i[fa]():i),N=f||{reason:0};function C(){S||(S=!0,c(y.getCfg(),y.core(),y[Kn]()))}return!u._doUpdate||u._doUpdate(y,N,C)!==!0?C():m=!0,m},ns(u,"_addUnloadCb",function(){return o},"add"),ns(u,"_addHook",function(){return s},"add"),Qe(u,"_unloadHooks",{g:function(){return s}})}),e[Dn]=function(u){return a(u)[Dn]()},e[Pn]=function(){return t},e.setInitialized=function(u){t=u},e[Qs]=function(u){i=u},e[_r]=function(u,d){d?d[_r](u):i&&Ee(i[Nn])&&i[Nn](u,null)},e._getTelCtx=a;function a(u){u===void 0&&(u=null);var d=u;if(!d){var f=n||pn(null,{},e[Vt]);i&&i[fa]?d=f[ao](null,i[fa]):d=f[ao](null,i)}return d}function c(u,d,f){wt(u,V1,Mi(d)),!f&&d&&(f=d[$v]()[Kn]());var v=i;i&&i[fa]&&(v=i[fa]()),e[Vt]=d,n=pn(f,u,d,v)}function l(){t=!1,e[Vt]=null,n=null,i=null,s=qf(),o=Vc()}}return r.__ieDyn=1,r})()});function j1(r,e,t){var n={id:e,fn:t};Ni(r,n);var i={remove:function(){V(r,function(o,s){if(o.id===n.id)return r[oo](s,1),-1})}};return i}function q1(r,e,t){for(var n=!1,i=r[se],o=0;o<i;++o){var s=r[o];if(s)try{if(s.fn[Ws](null,[e])===!1){n=!0;break}}catch(a){X(t,2,64,"Telemetry initializer failed: "+_t(a),{exception:fe(a)},!0)}}return!n}var KD,BD=E(()=>{En();Nr();Ne();lt();qT();Ui();uo();lr();KD=(function(r){bn(e,r);function e(){var t=r.call(this)||this;t.identifier="TelemetryInitializerPlugin",t.priority=199;var n,i;o(),Ke(e,t,function(s,a){s.addTelemetryInitializer=function(c){return j1(i,n++,c)},s[Nn]=function(c,l){q1(i,c,l?l[Dn]():s[Dn]())&&s[_r](c,l)},s[Xs]=function(){o()}});function o(){n=0,i=[]}return t}return e.__ieDyn=1,e})(ps)});function W1(r,e){return new Of(e)}function z1(r,e,t){var n,i=[],o=[],s={};return V(t,function(a){(z(a)||z(a[ts]))&&Wt($D);var c=a[wc],l=a[so];a&&c&&(z(s[c])?s[c]=l:fn(r,"Two extensions have same priority #"+c+" - "+s[c]+", "+l)),!c||c<e?i[Me](a):o[Me](a)}),n={},n[Vt]=i,n[ta]=o,n}function WD(r,e){var t=!1;return V(e,function(n){if(n===r)return t=!0,-1}),t}function KT(r,e,t,n){t&&me(t,function(i,o){n&&jr(o)&&jr(e[i])&&KT(r,e[i],o,n),n&&jr(o)&&jr(e[i])?KT(r,e[i],o,n):r.set(e,i,o)})}function zD(r,e){var t=null,n=-1;return V(r,function(i,o){if(i.w===e)return t=i,n=o,-1}),{i:n,l:t}}function $1(r,e){var t=zD(r,e).l;return t||(t={w:e,rm:function(){var n=zD(r,e);n.i!==-1&&r[oo](n.i,1)}},r[Me](t)),t}function J1(r,e,t){V(e,function(n){var i=ur(r,n.w,t);delete n.w,n.rm=function(){i.rm()}})}function X1(r,e,t,n){return e.add(r[Ai](function(i){var o=i.cfg.disableDbgExt;o===!0&&n&&(t[nu](n),n=null),t&&!n&&o!==!0&&(n=ED(i.cfg),t[iu](n))})),n}function Q1(r){return Qe({rm:function(){r.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(r)+">"}})}var pa,$D,H1,GD,K1,B1,G1,HT,vs,JD=E(()=>{"use strict";En();Nr();Nc();Ne();aa();I_();lt();cT();uT();xT();gu();mT();Ui();uo();lr();DT();Dm();wm();MT();BD();Am();Om();$D="Plugins must provide initialize method",H1="_notificationManager",GD="SDK is still unloading...",K1="SDK is not initialized",B1=100,G1=5e4,HT=no((pa={cookieCfg:{}},pa[Rc]={rdOnly:!0,ref:!0,v:[]},pa[ta]={rdOnly:!0,ref:!0,v:[]},pa[rs]={ref:!0,v:{}},pa[im]=Gn,pa.loggingLevelConsole=0,pa.diagnosticLogInterval=Gn,pa));vs=(function(){function r(){var e,t,n,i,o,s,a,c,l,u,d,f,v,m,S,y,N,C,_,A,k,j,H,oe,$,G,re,Q,ie,T,R,B,x;Ke(r,this,function(g){w(),g._getDbgPlgTargets=function(){return[H,i]},g[Pn]=function(){return t},g.activeStatus=function(){return G},g._setPendingStatus=function(){G=3},g[ts]=function(F,ne,Te,ce){v&&Wt(GD),g[Pn]()&&Wt("Core cannot be initialized more than once"),e=wt(F,HT,Te||g[ht],!1),F=e.cfg,St(e[Ai](function(We){var ot=We.cfg,Rt=G===3;if(!Rt){Q=ot.initInMemoMaxSize||B1;var Kt=ot[N_],Xr=ot.endpointUrl;if(z(Kt)){k=null,G=qn[zv];var Qr="Please provide instrumentation key";t?(X(n,1,100,Qr),I()):Wt(Qr);return}var ni=[];if(un(Kt)?(ni[Me](Kt),k=null):k=Kt,un(Xr)?(ni[Me](Xr),re=null):re=Xr,ni[se]){ie=!1,G=3;var Dr=li(ot.initTimeOut)?ot.initTimeOut:G1,Wo=Zx(ni);T=jn(function(){T=null,ie||D()},Dr),Bn(Wo,function(K){try{if(ie)return;if(!K.rejected){var J=K[Ec];if(J&&J[se]){var ue=J[0];if(k=ue&&ue[Ec],J[se]>1){var De=J[1];re=De&&De[Ec]}}k&&(F[N_]=k,F.endpointUrl=re)}D()}catch{ie||D()}})}else D();var b=We.ref(We.cfg,rs);me(b,function(K){We.ref(b,K)})}})),o=ce,_=X1(e,C,o&&g[sf](),_),ln(),g[ht]=Te;var be=F[Rc];if(u=[],u[Me].apply(u,Mv(Mv([],ne,!1),be,!1)),d=F[ta],je(null),(!f||f[se]===0)&&Wt("No "+ta+" available"),d&&d[se]>1){var Je=g[zs]("TeeChannelController");(!Je||!Je.plugin)&&X(n,1,28,"TeeChannel required")}J1(F,j,n),j=null,t=!0,G===qn.ACTIVE&&I()},g.getChannels=function(){var F=[];return f&&V(f,function(ne){F[Me](ne)}),oi(F)},g.track=function(F){Jt(g[fu](),function(){return"AppInsightsCore:track"},function(){F===null&&(Nt(F),Wt("Invalid telemetry item")),!F[Rr]&&z(F[Rr])&&(Nt(F),Wt("telemetry name required")),F[ou]=F[ou]||k,F[$s]=F[$s]||Wn(new Date),F.ver=F.ver||"4.0",!v&&g[Pn]()&&G===qn.ACTIVE?Le()[_r](F):G!==qn[zv]&&i[se]<=Q&&i[Me](F)},function(){return{item:F}},!F.sync)},g[$v]=Le,g[sf]=function(){return o||(o=new wf(e.cfg),g[H1]=o),o},g[iu]=function(F){g.getNotifyMgr()[iu](F)},g[nu]=function(F){o&&o[nu](F)},g.getCookieMgr=function(){return c||(c=us(e.cfg,g[ht])),c},g.setCookieMgr=function(F){c!==F&&(ls(c,!1),c=F)},g[fu]=function(){return s||a||RT()},g.setPerfMgr=function(F){s=F},g.eventCnt=function(){return i[se]},g.releaseQueue=function(){if(t&&i[se]>0){var F=i;i=[],G===2?V(F,function(ne){ne[ou]=ne[ou]||k,Le()[_r](ne)}):X(n,2,20,"core init status is not active")}},g[R_]=function(F){return S=F||null,x=!1,R&&R[es](),Z(!0)};function D(){ie=!0,z(k)?(G=qn[zv],X(n,1,112,"ikey can't be resolved from promises")):G=qn.ACTIVE,I()}function I(){t&&(g.releaseQueue(),g[R_]())}function Z(F){if((!R||!R[Js])&&!x){var ne=F||n&&n.queue[se]>0;ne&&(B||(B=!0,St(e[Ai](function(Te){var ce=Te.cfg.diagnosticLogInterval;(!ce||!(ce>0))&&(ce=1e4);var be=!1;R&&(be=R[Js],R[es]()),R=wx(Lr,ce),R.unref(),R[Js]=be}))),R[Js]=!0)}return R}g[w_]=function(){x=!0,R&&R[es](),Lr()},zn(g,function(){return m},["addTelemetryInitializer"]),g[xn]=function(F,ne,Te){var ce;F===void 0&&(F=!0),t||Wt(K1),v&&Wt(GD);var be=(ce={reason:50},ce[Oi]=F,ce.flushComplete=!1,ce),Je;F&&!ne&&(Je=ci(function(Rt){ne=Rt}));var We=Eu(vt(),g);We[af](function(){C.run(g[ht]),_m([c,o,n],F,function(){w(),ne&&ne(be)})},g);function ot(Rt){be.flushComplete=Rt,v=!0,N.run(We,be),g[w_](),We[_r](be)}return Lr(),gr(F,ot,6,Te)||ot(!1),Je},g[zs]=pt,g.addPlugin=function(F,ne,Te,ce){if(!F){ce&&ce(!1),rt($D);return}var be=pt(F[so]);if(be&&!ne){ce&&ce(!1),rt("Plugin ["+F[so]+"] is already loaded!");return}var Je={reason:16};function We(Kt){u[Me](F),Je.added=[F],je(Je),ce&&ce(!0)}if(be){var ot=[be.plugin],Rt={reason:2,isAsync:!!Te};sr(ot,Rt,function(Kt){Kt?(Je.removed=ot,Je.reason|=32,We(!0)):ce&&ce(!1)})}else We(!1)},g.updateCfg=function(F,ne){ne===void 0&&(ne=!0);var Te;if(g[Pn]()){Te={reason:1,cfg:e.cfg,oldCfg:f_({},e.cfg),newConfig:f_({},F),merge:ne},F=Te.newConfig;var ce=e.cfg;F[Rc]=ce[Rc],F[ta]=ce[ta]}e._block(function(be){var Je=be.cfg;KT(be,Je,F,ne),ne||me(Je,function(We){ii(F,We)||be.set(Je,We,Gn)}),be[wi](Je,HT)},!0),e[bc](),Te&&mt(Te)},g.evtNamespace=function(){return y},g.flush=gr,g.getTraceCtx=function(F){return A||(A=VD()),A},g.setTraceCtx=function(F){A=F||null},g.addUnloadHook=St,ns(g,"addUnloadCb",function(){return N},"add"),g.onCfgChange=function(F){var ne;return t?ne=ur(e.cfg,F,g[ht]):ne=$1(j,F),Q1(ne)},g.getWParam=function(){return yc()||e.cfg.enableWParam?0:-1};function M(){var F={};oe=[];var ne=function(Te){Te&&V(Te,function(ce){if(ce[so]&&ce[Cc]&&!F[ce.identifier]){var be=ce[so]+"="+ce[Cc];oe[Me](be),F[ce.identifier]=ce}})};ne(f),d&&V(d,function(Te){ne(Te)}),ne(u)}function w(){t=!1,e=wt({},HT,g[ht]),e.cfg[Jv]=1,Qe(g,"config",{g:function(){return e.cfg},s:function(ne){g.updateCfg(ne,!1)}}),Qe(g,"pluginVersionStringArr",{g:function(){return oe||M(),oe}}),Qe(g,"pluginVersionString",{g:function(){return $||(oe||M(),$=oe.join(";")),$||Re}}),Qe(g,"logger",{g:function(){return n||(n=new ca(e.cfg),e[ht]=n),n},s:function(ne){e[ht]=ne,n!==ne&&(ls(n,!1),n=ne)}}),g[ht]=new ca(e.cfg),H=[];var F=g.config[Rc]||[];F.splice(0,F[se]),Ni(F,H),m=new KD,i=[],ls(o,!1),o=null,s=null,a=null,ls(c,!1),c=null,l=null,u=[],d=null,f=null,v=!1,S=null,y=Hr("AIBaseCore",!0),N=Vc(),A=null,k=null,C=qf(),j=[],$=null,oe=null,x=!1,R=null,B=!1,G=0,re=null,Q=null,ie=!1,T=null}function Le(){var F=pn(vt(),e.cfg,g);return F[af](Z),F}function je(F){var ne=z1(g[ht],bD,u);l=null,$=null,oe=null,f=(d||[])[0]||[],f=Rm(Ni(f,ne[ta]));var Te=Ni(Rm(ne[Vt]),f);H=oi(Te);var ce=g.config[Rc]||[];ce.splice(0,ce[se]),Ni(ce,H);var be=Le();f&&f[se]>0&&FT(be[ao](f),Te),FT(be,Te),F&&mt(F)}function pt(F){var ne=null,Te=null,ce=[];return V(H,function(be){if(be[so]===F&&be!==m)return Te=be,-1;be.getChannel&&ce[Me](be)}),!Te&&ce[se]>0&&V(ce,function(be){if(Te=be.getChannel(F),!Te)return-1}),Te&&(ne={plugin:Te,setEnabled:function(be){fs(Te)[pf]=!be},isEnabled:function(){var be=fs(Te);return!be[Hn]&&!be[pf]},remove:function(be,Je){var We;be===void 0&&(be=!0);var ot=[Te],Rt=(We={reason:1},We[Oi]=be,We);sr(ot,Rt,function(Kt){Kt&&je({reason:32,removed:ot}),Je&&Je(Kt)})}}),ne}function vt(){if(!l){var F=(H||[]).slice();Ze(F,m)===-1&&F[Me](m),l=da(Rm(F),e.cfg,g)}return l}function sr(F,ne,Te){if(F&&F[se]>0){var ce=da(F,e.cfg,g),be=Eu(ce,g);be[af](function(){var Je=!1,We=[];V(u,function(Rt,Kt){WD(Rt,F)?Je=!0:We[Me](Rt)}),u=We,$=null,oe=null;var ot=[];d&&(V(d,function(Rt,Kt){var Xr=[];V(Rt,function(Qr){WD(Qr,F)?Je=!0:Xr[Me](Qr)}),ot[Me](Xr)}),d=ot),Te&&Te(Je),Z()}),be[_r](ne)}else Te(!1)}function Lr(){if(n&&n.queue){var F=n.queue.slice(0);n.queue[se]=0,V(F,function(ne){var Te,ce=(Te={},Te[Rr]=S||"InternalMessageId: "+ne[su],Te[ou]=k,Te[$s]=Wn(new Date),Te.baseType=Lc.dataType,Te.baseData={message:ne[co]},Te);g.track(ce)})}}function gr(F,ne,Te,ce){var be=1,Je=!1,We=null;ce=ce||5e3;function ot(){be--,Je&&be===0&&(We&&We[es](),We=null,ne&&ne(Je),ne=null)}if(f&&f[se]>0){var Rt=Le()[ao](f);Rt.iterate(function(Kt){if(Kt.flush){be++;var Xr=!1;Kt.flush(F,function(){Xr=!0,ot()},Te)||Xr||(F&&We==null?We=jn(function(){We=null,ot()},ce):ot())}})}return Je=!0,ot(),!0}function ln(){var F;St(e[Ai](function(ne){var Te=ne.cfg.enablePerfMgr;if(Te){var ce=ne.cfg[im];(F!==ce||!F)&&(ce||(ce=W1),vf(ne.cfg,im,ce),F=ce,a=null),!s&&!a&&Ee(ce)&&(a=ce(g,g[sf]()))}else a=null,F=null}))}function mt(F){var ne=Yf(vt(),g);ne[af](Z),(!g._updateHook||g._updateHook(ne,F)!==!0)&&ne[_r](F)}function rt(F){var ne=g[ht];ne?(X(ne,2,73,F),Z()):Wt(F)}function Nt(F){var ne=g[sf]();ne&&ne[ra]([F],2)}function St(F){C.add(F)}})}return r.__ieDyn=1,r})()});function jc(r,e){try{if(r&&r!==""){var t=qr().parse(r);if(t&&t[L_]&&t[L_]>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted===t.errors[se])return t}}catch(n){X(e,1,43,"Cannot parse the response. "+(n[Rr]||fe(n)),{response:r})}return null}var XD=E(()=>{Ne();lt();Ui();oa()});var ho,Z1,QD,BT,qc,ZD=E(()=>{Nr();Nc();Ne();lt();uT();Ui();oa();uo();ho="",Z1="NoResponseBody",QD="&"+Z1+"=true",BT="POST",qc=(function(){function r(){var e=0,t,n,i,o,s,a,c,l,u,d,f,v,m,S;Ke(r,this,function(y,N){var C=!0;ie(),y[ts]=function(T,R){i=R,n&&X(i,1,28,"Sender is already initialized"),y.SetConfig(T),n=!0},y._getDbgPlgTargets=function(){return[n,o,a,t]},y.SetConfig=function(T){try{if(s=T.senderOnCompleteCallBack||{},a=!!T.disableCredentials,c=T.fetchCredentials,o=!!T.isOneDs,t=!!T.enableSendPromise,u=!!T.disableXhr,d=!!T.disableBeacon,f=!!T.disableBeaconSync,S=T.timeWrapper,m=!!T.addNoResponse,v=!!T.disableFetchKeepAlive,l={sendPOST:G},o||(C=!1),a){var R=kc();R&&R.protocol&&R.protocol[Cn]()==="file:"&&(C=!1)}return!0}catch{}return!1},y.getSyncFetchPayload=function(){return e},y.getSenderInst=function(T,R){return T&&T[se]?j(T,R):null},y.getFallbackInst=function(){return l},y[Xs]=function(T,R){ie()};function _(T,R){H(R,200,{},T)}function A(T,R){X(i,2,26,"Failed to send telemetry.",{message:T}),H(R,400,{})}function k(T){A("No endpoint url is provided for the batch",T)}function j(T,R){for(var B,x=0,g=null,D=0;g==null&&D<T[se];)x=T[D],!u&&x===1?Sf()?g=Q:mu()&&(g=G):x===2&&as(R)&&(!R||!v)?g=re:x===3&&wn()&&(R?!f:!d)&&(g=$),D++;return g?(B={_transport:x,_isSync:R},B[F_]=g,B):null}function H(T,R,B,x){try{T&&T(R,B,x)}catch{}}function oe(T,R){var B=Sr(),x=T[au];if(!x)return k(R),!0;x=T[au]+(m?QD:ho);var g=T[Zs],D=o?g:new Blob([g],{type:"text/plain;charset=UTF-8"}),I=B.sendBeacon(x,D);return I}function $(T,R,B){var x=T[Zs];try{if(x)if(oe(T,R))_(ho,R);else{var g=s&&s.beaconOnRetry;g&&Ee(g)?g(T,R,oe):(l&&l[F_](T,R,!0),X(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(D){o&&fn(i,"Failed to send telemetry using sendBeacon API. Ex:"+fe(D)),H(R,o?0:400,{},ho)}}function G(T,R,B){var x,g,D,I=T[em]||{};!B&&t&&(x=ci(function(Le,je){g=Le,D=je})),o&&B&&T.disableXhrSync&&(B=!1);var Z=T[au];if(!Z){k(R),g&&g(!1);return}var M=$_(BT,Z,C,!0,B,T[Ic]);o||M[M_]("Content-type","application/json"),V(Vr(I),function(Le){M[M_](Le,I[Le])}),M.onreadystatechange=function(){o||(w(M),M.readyState===4&&g&&g(!0))},M.onload=function(){o&&w(M)};function w(Le){var je=s&&s.xhrOnComplete,pt=je&&Ee(je);if(pt)je(Le,R,T);else{var vt=Fi(Le);H(R,Le[xc],ss(Le,o),vt)}}return M.onerror=function(Le){H(R,o?M[xc]:400,ss(M,o),o?ho:is(M)),D&&D(Le)},M.ontimeout=function(){H(R,o?M[xc]:500,ss(M,o),o?ho:is(M)),g&&g(!1)},M.send(T[Zs]),x}function re(T,R,B){var x,g=T[au],D=T[Zs],I=o?D:new Blob([D],{type:"application/json"}),Z,M,w,Le=new Headers,je=D[se],pt=!1,vt=!1,sr=T[em]||{},Lr=(x={method:BT,body:I},x[lT]=!0,x);T.headers&&Vr(T.headers)[se]>0&&(V(Vr(sr),function(rt){Le.append(rt,sr[rt])}),Lr[em]=Le),c?Lr.credentials=c:C&&o&&(Lr.credentials="include"),B&&(Lr.keepalive=!0,e+=je,o?T._sendReason===2&&(pt=!0,m&&(g+=QD)):pt=!0);var gr=new Request(g,Lr);try{gr[lT]=!0}catch{}if(!B&&t&&(Z=ci(function(rt,Nt){M=rt,w=Nt})),!g){k(R),M&&M(!1);return}function ln(rt){H(R,o?0:400,{},o?ho:rt)}function mt(rt,Nt,St){var F=rt[xc],ne=s.fetchOnComplete;ne&&Ee(ne)?ne(rt,R,St||ho,Nt):H(R,F,{},St||ho)}try{Bn(fetch(o?g:gr,o?Lr:null),function(rt){if(B&&(e-=je,je=0),!vt)if(vt=!0,rt.rejected)ln(rt.reason&&rt.reason[co]),w&&w(rt.reason);else{var Nt=rt[Ec];try{!o&&!Nt.ok?(ln(Nt.statusText),M&&M(!1)):o&&!Nt.body?(mt(Nt,null,ho),M&&M(!0)):Bn(Nt.text(),function(St){mt(Nt,T,St[Ec]),M&&M(!0)})}catch(St){ln(fe(St)),w&&w(St)}}})}catch(rt){vt||(ln(fe(rt)),w&&w(rt))}return pt&&!vt&&(vt=!0,H(R,200,{}),M&&M(!0)),o&&!vt&&T[Ic]>0&&S&&S.set(function(){vt||(vt=!0,H(R,500,{}),M&&M(!0))},T[Ic]),Z}function Q(T,R,B){var x=cr(),g=new XDomainRequest,D=T[Zs];g.onload=function(){var Le=Fi(g),je=s&&s.xdrOnComplete;je&&Ee(je)?je(g,R,T):H(R,200,{},Le)},g.onerror=function(){H(R,400,{},o?ho:Oc(g))},g.ontimeout=function(){H(R,500,{})},g.onprogress=function(){};var I=x&&x.location&&x.location[Xv]||"",Z=T[au];if(!Z){k(R);return}if(!o&&Z.lastIndexOf(I,0)!==0){var M="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";X(i,2,40,". "+M),A(M,R);return}var w=o?Z:Z[ki](/^(https?:)/,"");g.open(BT,w),T[Ic]&&(g[Ic]=T[Ic]),g.send(D),o&&B?S&&S.set(function(){g.send(D)},0):g.send(D)}function ie(){e=0,n=!1,t=!1,i=null,o=null,s=null,a=null,c=null,l=null,u=!1,d=!1,f=!1,v=!1,m=!1,S=null}})}return r.__ieDyn=1,r})()});function iI(r){return r&&r[ki]?r[ki](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Re):r}function Fm(r,e){var t;if(e){var n=Re;de(e)?(n=Re,V(e,function(o){o=iI(o),o&&(o[0]!=="."&&(o="."+o),n+=o)})):n=iI(e),n&&(n[0]!=="."&&(n="."+n),r=(r||Re)+n)}var i=nU.exec(r||Re)||[];return t={},t[In]=i[1],t.ns=(i[2]||Re).replace(eU,".").replace(tU,Re)[ai](".").sort().join("."),t}function GT(r,e,t){var n=[],i=Kf.get(r,km,{},!1),o=Fm(e,t);return me(i,function(s,a){V(a,function(c){var l;(!o[In]||o[In]===c.evtName[In])&&(!o.ns||o.ns===o.ns)&&n[Me]((l={},l[Rr]=c.evtName[In]+(c.evtName.ns?"."+c.evtName.ns:Re),l.handler=c[lf],l))})}),n}function fI(r,e,t){t===void 0&&(t=!0);var n=Kf.get(r,km,{},t),i=n[e];return i||(i=n[e]=[]),i}function pI(r,e,t,n){r&&e&&e[In]&&(r[nI]?r[nI](e[In],t,n):r[rI]&&r[rI](sI+e[In],t))}function iU(r,e,t,n){var i=!1;return r&&e&&e[In]&&t&&(r[tI]?(r[tI](e[In],t,n),i=!0):r[eI]&&(r[eI](sI+e[In],t),i=!0)),i}function oI(r,e,t,n){for(var i=e[se];i--;){var o=e[i];o&&(!t.ns||t.ns===o.evtName.ns)&&(!n||n(o))&&(pI(r,o.evtName,o[lf],o.capture),e[oo](i,1))}}function oU(r,e,t){if(e[In])oI(r,fI(r,e[In]),e,t);else{var n=Kf.get(r,km,{});me(n,function(i,o){oI(r,o,e,t)}),Vr(n)[se]===0&&Kf.kill(r,km)}}function $n(r,e){var t;return e?(de(e)?t=[r].concat(e):t=[r,e],t=Fm("xx",t).ns[ai](".")):t=r,t}function yo(r,e,t,n,i){var o;i===void 0&&(i=!1);var s=!1;if(r)try{var a=Fm(e,n);if(s=iU(r,a,t,i),s&&Kf.accept(r)){var c=(o={guid:rU++,evtName:a},o[lf]=t,o.capture=i,o);fI(r,a.type)[Me](c)}}catch{}return s}function ms(r,e,t,n,i){if(i===void 0&&(i=!1),r)try{var o=Fm(e,n),s=!1;oU(r,o,function(a){return o.ns&&!t||a[lf]===t?(s=!0,!0):!1}),s||pI(r,o,t,i)}catch{}}function WT(r,e,t,n){return n===void 0&&(n=!1),yo(r,e,t,null,n)}function zT(r,e,t,n){n===void 0&&(n=!1),ms(r,e,t,null,n)}function Mm(r,e,t){var n=!1,i=cr();i&&(n=yo(i,r,e,t),n=yo(i.body,r,e,t)||n);var o=zt();return o&&(n=yo(o,r,e,t)||n),n}function Um(r,e,t){var n=cr();n&&(ms(n,r,e,t),ms(n.body,r,e,t));var i=zt();i&&ms(i,r,e,t)}function Cu(r,e,t,n){var i=!1;return e&&r&&r[se]>0&&V(r,function(o){o&&(!t||Ze(t,o)===-1)&&(i=Mm(o,e,n)||i)}),i}function Ym(r,e,t,n){var i=!1;return e&&r&&de(r)&&(i=Cu(r,e,t,n),!i&&t&&t[se]>0&&(i=Cu(r,e,null,n))),i}function va(r,e,t){r&&de(r)&&V(r,function(n){n&&Um(n,e,t)})}function Bf(r,e,t){return Ym([lI,cI,Lm],r,e,t)}function Gf(r,e){va([lI,cI,Lm],r,e)}function Pu(r,e,t){function n(s){var a=zt();r&&a&&a.visibilityState==="hidden"&&r(s)}var i=$n(uI,t),o=Cu([Lm],r,e,i);return(!e||Ze(e,Hf)===-1)&&(o=Cu([Hf],n,e,i)||o),!o&&e&&(o=Pu(r,null,t)),o}function Wf(r,e){var t=$n(uI,e);va([Lm],r,t),va([Hf],null,t)}function xu(r,e,t){function n(s){var a=zt();r&&a&&a.visibilityState==="visible"&&r(s)}var i=$n(dI,t),o=Cu([aI],r,e,i);return o=Cu([Hf],n,e,i)||o,!o&&e&&(o=xu(r,null,t)),o}function zf(r,e){var t=$n(dI,e);va([aI],r,t),va([Hf],null,t)}var sI,eI,tI,rI,nI,km,Hf,Lm,aI,cI,lI,uI,dI,eU,tU,rU,Kf,nU,vI=E(()=>{Ne();lt();gu();lr();sI="on",eI="attachEvent",tI="addEventListener",rI="detachEvent",nI="removeEventListener",km="events",Hf="visibilitychange",Lm="pagehide",aI="pageshow",cI="unload",lI="beforeunload",uI=Hr("aiEvtPageHide"),dI=Hr("aiEvtPageShow"),eU=/\.[\.]+/g,tU=/[\.]+$/,rU=1,Kf=pm("events"),nU=/^([^.]*)(?:\.(.+)|)/});var $T,mI=E(()=>{of();$T=$t({DISABLED:0,CRITICAL:1,WARNING:2,DEBUG:3})});var st=E(()=>{Vx();jx();I_();JD();qT();fm();wT();cT();uo();XD();ZD();Ne();of();vI();oa();En();DT();Dm();Ui();wm();mI();xT();gu();Am();Om();LT();aa();hm();fT()});var So,gI,JT,Vm,jm=E(()=>{So="",gI="https://browser.events.data.microsoft.com/OneCollector/1.0/",JT="version",Vm="properties"});var XT,QT,Du,_o,ZT,At,Hc,gs,qm,Hm,Km,Bm,$f,Gm=E(()=>{XT="initialize",QT="logger",Du="indexOf",_o="timings",ZT="pollInternalLogs",At="value",Hc="kind",gs="length",qm="processTelemetryStart",Hm="handleField",Km="rmSanitizer",Bm="rmFieldSanitizer",$f="canHandle"});function wr(r){return!(r===So||z(r))}function Wm(r){if(r){var e=Tn(r,"-");if(e>-1)return hc(r,e)}return So}function TI(){return eb===null&&(eb=!Fe(Uint8Array)&&!uU()&&!na()),eb}function zm(r){return!!(r&&Yr(r)&&r>=1&&r<=4)}function $m(r,e,t){if(!e&&!wr(e)||typeof r!="string")return null;var n=typeof e;if(n==="string"||n==="number"||n==="boolean"||de(e))e={value:e};else if(n==="object"&&!yI.call(e,"value"))e={value:t?JSON.stringify(e):e};else if(z(e[At])||e[At]===So||!Oe(e[At])&&!Yr(e[At])&&!ro(e[At])&&!de(e[At]))return null;if(de(e[At])&&!rb(e[At]))return null;if(!z(e[Hc])){if(de(e[At])||!Jf(e[Hc]))return null;e[At]=e[At].toString()}return e}function Nu(r,e,t){var n=-1;if(!Fe(r))if(e>0&&(e===32?n=8192:e<=13&&(n=e<<5)),lU(t))n===-1&&(n=0),n|=t;else{var i=cU[To(r)]||-1;n!==-1&&i!==-1?n|=i:i===6&&(n=i)}return n}function bI(r,e,t){t===void 0&&(t=!0);var n;return r&&(n=r.get(e),t&&n&&decodeURIComponent&&(n=decodeURIComponent(n))),n||So}function EI(r){r===void 0&&(r="D");var e=kf();return r==="B"?e="{"+e+"}":r==="P"?e="("+e+")":r==="N"&&(e=e.replace(/-/g,So)),e}function Kc(r,e,t,n,i){var o={},s=!1,a=0,c=arguments[gs],l=arguments;for(ro(l[0])&&(s=l[0],a++);a<c;a++){var r=l[a];me(r,function(d,f){s&&f&&Ut(f)?de(f)?(o[d]=o[d]||[],V(f,function(v,m){v&&Ut(v)?o[d][m]=Kc(!0,o[d][m],v):o[d][m]=v})):o[d]=Kc(!0,o[d],f):o[d]=f})}return o}function Jf(r){return r===0||r>0&&r<=13||r===32}function lU(r){return r>=0&&r<=9}function uU(){var r=Sr();if(!Fe(r)&&r.userAgent){var e=r.userAgent.toLowerCase();if((e[Du]("safari")>=0||e[Du]("firefox")>=0)&&e[Du]("chrome")<0)return!0}return!1}function rb(r){return r[gs]>0}function Xf(r,e){var t=r;t[_o]=t[_o]||{},t[_o][qm]=t[_o][qm]||{},t[_o][qm][e]=An()}function To(r){var e=0;if(r!=null){var t=typeof r;t==="string"?e=1:t==="number"?e=2:t==="boolean"?e=3:t===$o&&(e=4,de(r)?(e=4096,r[gs]>0&&(e|=To(r[0]))):yI.call(r,"value")&&(e=8192|To(r[At])))}return e}function Jm(){return!!Pe("chrome")}function CI(r,e,t,n,i,o){n===void 0&&(n=!1),i===void 0&&(i=!1);function s(c,l,u){try{c[l]=u}catch{}}var a=new XMLHttpRequest;return n&&s(a,sU,n),t&&s(a,hI,t),a.open(r,e,!i),t&&s(a,hI,t),!i&&o&&s(a,aU,o),a}function ma(r){return r>0}var hs,tb,Iu,yI,sU,hI,aU,cU,eb,SI,_I,An,Xm=E(()=>{st();En();Ne();jm();Gm();tb="4.3.4",Iu="1DS-Web-JS-"+tb,yI=Kd.hasOwnProperty,sU="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",hI="withCredentials",aU="timeout",cU=(hs={},hs[0]=0,hs[2]=6,hs[1]=1,hs[3]=7,hs[4098]=6,hs[4097]=1,hs[4099]=7,hs),eb=null,SI=yc(),_I=Jl();An=tf});function fU(r){return r&&(!r.getProperty||!r.setProperty)&&Wt("Invalid property storage override passed."),!0}var dU,PI,xI=E(()=>{En();Nr();st();Ne();jm();Xm();Gm();dU=no({endpointUrl:gI,propertyStorageOverride:{isVal:fU}});PI=(function(r){bn(e,r);function e(){var t=r.call(this)||this;return Ke(e,t,function(n,i){n[XT]=function(o,s,a,c){Jt(n,function(){return"AppInsightsCore.initialize"},function(){try{i[XT](wt(o,dU,a||n[QT],!1).cfg,s,a,c)}catch(d){var l=n[QT],u=fe(d);u[Du]("channels")!==-1&&(u+=`
 - Channels must be provided through config.channels only!`),X(l,1,514,"SDK Initialization Failed - no telemetry will be sent: "+u)}},function(){return{config:o,extensions:s,logger:a,notificationManager:c}})},n.track=function(o){Jt(n,function(){return"AppInsightsCore.track"},function(){var s=o;if(s){s[_o]=s[_o]||{},s[_o].trackStart=An(),zm(s.latency)||(s.latency=1);var a=s.ext=s.ext||{};a.sdk=a.sdk||{},a.sdk.ver=Iu;var c=s.baseData=s.baseData||{};c[Vm]=c[Vm]||{};var l=c[Vm];l[JT]=l[JT]||n.pluginVersionString||So}i.track(s)},function(){return{item:o}},!o.sync)},n[ZT]=function(o){return i[ZT](o||"InternalLog")}}),t}return e.__ieDyn=1,e})(vs)});var DI,II,NI,RI,wI,AI=E(()=>{st();DI=$t({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,Pii_IPv6ScrubLastHextets:14,Pii_DropValue:15,CustomerContent_GenericContent:32}),II=$t({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),NI=$t({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),RI=$t({Normal:1,Critical:2}),wI=$t({NONE:0,ERROR:1,WARNING:2,INFORMATION:3})});var OI,kI=E(()=>{st();Ne();jm();Xm();Gm();OI=(function(){function r(e){var t=this,n={},i=[],o=[];e&&o.push(e);function s(u,d){var f,v=n[u];if(v&&(f=v[d]),!f&&f!==null){if(Oe(u)&&Oe(d))if(o[gs]>0){for(var m=0;m<o[gs];m++)if(o[m][Hm](u,d)){f={canHandle:!0,fieldHandler:o[m]};break}}else i[gs]===0&&(f={canHandle:!0});if(!f&&f!==null){f=null;for(var m=0;m<i[gs];m++)if(i[m][Hm](u,d)){f={canHandle:!0,handler:i[m],fieldHandler:null};break}}v||(v=n[u]={}),v[d]=f}return f}t.clearCache=function(){n={}},t.addSanitizer=function(u){u&&(l_(i,u)||i.push(u),n={})},t.addFieldSanitizer=function(u){u&&(l_(o,u)||o.push(u),n={})},t[Km]=function(u){if(u){var d=Ze(i,u);d!==-1&&(i.splice(d,1),n={}),V(i,function(f){f&&f[Km]&&f[Km](u)})}},t[Bm]=function(u){if(u){var d=Ze(o,u);d!==-1&&(o.splice(d,1),n={}),V(i,function(f){f&&f[Bm]&&f[Bm](u)})}},t.isEmpty=function(){return Zl(i)+Zl(o)===0},t[Hm]=function(u,d){var f=s(u,d);return f?f[$f]:!1},t[At]=function(u,d,f,v){var m=s(u,d);if(m&&m[$f]){if(!m||!m[$f])return null;if(m.handler)return m.handler[At](u,d,f,v);if(!Oe(d)||z(f)||f===So)return null;var S=null,y=To(f);if((y&8192)===8192){var N=y&-8193;if(S=f,!wr(S[At])||N!==1&&N!==2&&N!==3&&(N&4096)!==4096)return null}else y===1||y===2||y===3||(y&4096)===4096?S=c(u,d,f):y===4&&(S=c(u,d,v?JSON.stringify(f):f));if(S)return a(m,u,d,y,S,v)}return null},t.property=function(u,d,f,v){var m=s(u,d);if(!m||!m[$f]||!Oe(d)||z(f)||!wr(f[At]))return null;var S=To(f[At]);return S===0?null:a(m,u,d,S,f,v)};function a(u,d,f,v,m,S){if(u.handler)return u.handler.property(d,f,m,S);if(!z(m[Hc])){if((v&4096)===4096||!Jf(m[Hc]))return null;m[At]=m[At].toString()}return l(u.fieldHandler,d,f,v,m)}function c(u,d,f){return wr(f)?{value:f}:null}function l(u,d,f,v,m){if(m&&u){var S=u.getSanitizer(d,f,v,m[Hc],m.propertyType);if(S)if(v===4){var y={},N=m[At];me(N,function(_,A){var k=d+"."+f;if(wr(A)){var j=c(k,_,A);j=l(u,k,_,To(A),j),j&&(y[_]=j[At])}}),m[At]=y}else{var C={path:d,name:f,type:v,prop:m,sanitizer:t};m=S.call(t,C)}}return m}}return r.getFieldType=To,r})()});var LI={};Be(LI,{ActiveStatus:()=>qn,AppInsightsCore:()=>PI,BaseTelemetryPlugin:()=>ps,DiagnosticLogger:()=>ca,EventLatency:()=>II,EventPersistence:()=>RI,EventPropertyType:()=>NI,EventsDiscardedReason:()=>Ri,FullVersionString:()=>Iu,InternalAppInsightsCore:()=>vs,LoggingSeverity:()=>$T,MinChannelPriorty:()=>x_,NotificationManager:()=>wf,PerfEvent:()=>Mc,PerfManager:()=>Of,ProcessTelemetryContext:()=>YT,SenderPostManager:()=>qc,TraceLevel:()=>wI,Undefined:()=>eo,ValueKind:()=>DI,ValueSanitizer:()=>OI,Version:()=>tb,_InternalLogMessage:()=>Lc,__getRegisteredEvents:()=>GT,_appendHeader:()=>pu,_getAllResponseHeaders:()=>ss,_logInternalMessage:()=>yT,_testHookMaxUnloadHooksCb:()=>VT,_throwInternal:()=>X,_warnToConsole:()=>fn,addEventHandler:()=>Mm,addEventListeners:()=>Ym,addPageHideEventListener:()=>Pu,addPageShowEventListener:()=>xu,addPageUnloadEventListener:()=>Bf,areCookiesSupported:()=>_u,arrForEach:()=>V,arrIndexOf:()=>Ze,arrMap:()=>Xo,arrReduce:()=>ef,attachEvent:()=>WT,blockDynamicConversion:()=>xf,convertAllHeadersToMap:()=>dm,cookieAvailable:()=>_u,createCookieMgr:()=>us,createDynamicConfig:()=>wt,createEnumStyle:()=>$t,createGuid:()=>EI,createProcessTelemetryContext:()=>pn,createTraceParent:()=>Lf,createUniqueNamespace:()=>Hr,createUnloadHandlerContainer:()=>Vc,dateNow:()=>Yt,detachEvent:()=>zT,disallowsSameSiteNone:()=>xm,doPerf:()=>Jt,dumpObj:()=>fe,eventOff:()=>ms,eventOn:()=>yo,extend:()=>Kc,findW3cTraceParent:()=>Uf,forceDynamicConversion:()=>aT,formatErrorMessageXdr:()=>Oc,formatErrorMessageXhr:()=>is,formatTraceParent:()=>Mf,generateW3CId:()=>Uc,getCommonSchemaMetaData:()=>Nu,getConsole:()=>mf,getCookieValue:()=>bI,getCrypto:()=>gf,getDocument:()=>zt,getDynamicConfigHandler:()=>Pf,getExceptionName:()=>_t,getFieldValueType:()=>To,getGlobal:()=>dn,getGlobalInst:()=>Pe,getHistory:()=>Ov,getIEVersion:()=>yf,getISOString:()=>Wn,getJSON:()=>qr,getLocation:()=>kc,getMsCrypto:()=>hf,getNavigator:()=>Sr,getPerformance:()=>Bs,getResponseText:()=>Fi,getSetValue:()=>vf,getTenantId:()=>Wm,getTime:()=>An,getWindow:()=>cr,hasDocument:()=>yc,hasHistory:()=>a_,hasJSON:()=>fo,hasNavigator:()=>Qd,hasOwnProperty:()=>hr,hasWindow:()=>Jl,isArray:()=>de,isArrayValid:()=>rb,isBeaconsSupported:()=>wn,isBoolean:()=>ro,isChromium:()=>Jm,isDate:()=>Rv,isDocumentObjectAvailable:()=>SI,isError:()=>mc,isFetchSupported:()=>as,isFunction:()=>Ee,isGreaterThanZero:()=>ma,isIE:()=>ia,isLatency:()=>zm,isNotTruthy:()=>e_,isNullOrUndefined:()=>z,isNumber:()=>Yr,isObject:()=>Ut,isReactNative:()=>na,isSampledFlag:()=>Ff,isString:()=>Oe,isTruthy:()=>Di,isTypeof:()=>ZS,isUint8ArrayAvailable:()=>TI,isUndefined:()=>Fe,isValidSpanId:()=>go,isValidTraceId:()=>mo,isValidTraceParent:()=>bu,isValueAssigned:()=>wr,isValueKind:()=>Jf,isWindowObjectAvailable:()=>_I,isXhrSupported:()=>mu,mergeEvtNamespace:()=>$n,newGuid:()=>kf,newId:()=>Ef,normalizeJsName:()=>Ac,objDefineAccessors:()=>n_,objForEachKey:()=>me,objFreeze:()=>oi,objKeys:()=>Vr,objSeal:()=>i_,onConfigChange:()=>ur,openXhr:()=>CI,optimizeObject:()=>Rn,parseResponse:()=>jc,parseTraceParent:()=>Yc,perfNow:()=>tf,prependTransports:()=>os,proxyAssign:()=>W_,proxyFunctionAs:()=>ns,proxyFunctions:()=>zn,random32:()=>cs,randomValue:()=>bf,removeEventHandler:()=>Um,removeEventListeners:()=>va,removePageHideEventListener:()=>Wf,removePageShowEventListener:()=>zf,removePageUnloadEventListener:()=>Gf,safeGetCookieMgr:()=>PT,safeGetLogger:()=>Mi,sanitizeProperty:()=>$m,setEnableEnvMocks:()=>tT,setProcessTelemetryTimings:()=>Xf,setValue:()=>ui,strContains:()=>rr,strEndsWith:()=>Sc,strFunction:()=>Kl,strObject:()=>$o,strPrototype:()=>Pi,strStartsWith:()=>eu,strTrim:()=>nt,strUndefined:()=>eo,throwError:()=>Wt,toISOString:()=>Wn,useXDomainRequest:()=>Sf});var Bc=E(()=>{xI();AI();kI();st();Xm()});var Gc,Qm,Zm,nb=E(()=>{Gc="REAL_TIME",Qm="NEAR_REAL_TIME",Zm="BEST_EFFORT"});var Yi,eg,FI,ib,MI,UI,ob,tg,Qf,Ru,YI,VI,jI,rg,sb,ng,ig,og,Zf,ab,cb,qI,wu,lb,sg,ep=E(()=>{Yi="",eg="drop",FI="send",ib="requeue",MI="rspFail",UI="oth",ob="no-cache, no-store",tg="application/x-json-stream",Qf="cache-control",Ru="content-type",YI="kill-tokens",VI="kill-duration",jI="time-delta-millis",rg="client-version",sb="client-id",ng="time-delta-to-apply-millis",ig="upload-time",og="apikey",Zf="AuthMsaDeviceTicket",ab="WebAuthToken",cb="AuthXToken",qI="NoResponseBody",wu="msfpc",lb="trace",sg="user"});var tp,ag,cg,lg,rp,Ve,bo,Jn,Xt,Eo,Tr,Co,Wc,ug,zc,dg,$c,fg,pg,HI,ub,db,KI,BI,vg,fb,pb,GI,WI,vb,mb,gb,zI,mg,gg,hg,np,hb,Vi,Au,yb,en,On,ip,op,Ou,yg,sp,$I,ku,Sg,_g,Lu,Sb,ap,Tg,bg,Fu,JI,Eg,Cg,Pg,cp,XI,QI,_b,Tb,ZI,eN,tN,xg,lp,ga,Jc,Mu=E(()=>{tp="allowRequestSending",ag="firstRequestSent",cg="shouldAddClockSkewHeaders",lg="getClockSkewHeaderValue",rp="setClockSkew",Ve="length",bo="concat",Jn="iKey",Xt="count",Eo="events",Tr="push",Co="split",Wc="splice",ug="toLowerCase",zc="hdrs",dg="useHdrs",$c="initialize",fg="setTimeoutOverride",pg="clearTimeoutOverride",HI="payloadPreprocessor",ub="overrideEndpointUrl",db="avoidOptions",KI="disableEventTimings",BI="stringifyObjects",vg="enableCompoundKey",fb="disableXhrSync",pb="disableFetchKeepAlive",GI="addNoResponse",WI="excludeCsMetaData",vb="useSendBeacon",mb="fetchCredentials",gb="alwaysUseXhrOverride",zI="unloadTransports",mg="serializeOfflineEvt",gg="getOfflineRequestDetails",hg="createPayload",np="createOneDSPayload",hb="payloadBlob",Vi="headers",Au="_thePayload",yb="urlString",en="batches",On="sendType",ip="addHeader",op="canSendRequest",Ou="sendQueuedRequests",yg="isCompletelyIdle",sp="setUnloading",$I="isTenantKilled",ku="resume",Sg="sendSynchronousBatch",_g="_transport",Lu="getWParam",Sb="isBeacon",ap="timings",Tg="isTeardown",bg="isSync",Fu="data",JI="timeout",Eg="_sendReason",Cg="setKillSwitchTenants",Pg="_backOffTransmission",cp="identifier",XI="disableOptimizeObj",QI="ignoreMc1Ms0CookieProcessing",_b="eventsLimitInMem",Tb="autoFlushEventsLimit",ZI="disableAutoBatchFlushLimit",eN="overrideInstrumentationKey",tN="disableTelemetry",xg="baseData",lp="sendAttempt",ga="latency",Jc="sync"});function nN(r){var e=(r.ext||{}).intweb;return e&&wr(e[wu])?e[wu]:null}function rN(r){for(var e=null,t=0;e===null&&t<r[Ve];t++)e=nN(r[t]);return e}var ha,Dg=E(()=>{Bc();ep();Mu();ha=(function(){function r(e,t){var n=t?[][bo](t):[],i=this,o=rN(n);i[Jn]=function(){return e},i.Msfpc=function(){return o||Yi},i[Xt]=function(){return n[Ve]},i[Eo]=function(){return n},i.addEvent=function(s){return s?(n[Tr](s),o||(o=nN(s)),!0):!1},i[Co]=function(s,a){var c;if(s<n[Ve]){var l=n[Ve]-s;z(a)||(l=a<l?a:l),c=n[Wc](s,l),o=rN(n)}return new r(e,c)}}return r.create=function(e,t){return new r(e,t)},r})()});var iN,oN=E(()=>{Nr();Mu();iN=(function(){function r(){var e=!0,t=!0,n=!0,i="use-collector-delta",o=!1;Ke(r,this,function(s){s[tp]=function(){return e},s[ag]=function(){n&&(n=!1,o||(e=!1))},s[cg]=function(){return t},s[lg]=function(){return i},s[rp]=function(a){o||(a?(i=a,t=!0,o=!0):t=!1,e=!0)}})}return r.__ieDyn=1,r})()});var pU,sN,aN=E(()=>{Nr();Bc();Mu();pU=1e3,sN=(function(){function r(){var e={};function t(n){var i=[];return n&&V(n,function(o){i[Tr](nt(o))}),i}Ke(r,this,function(n){n[Cg]=function(i,o){if(i&&o)try{var s=t(i[Co](","));if(o==="this-request-only")return s;for(var a=parseInt(o,10)*pU,c=0;c<s[Ve];++c)e[s[c]]=Yt()+a}catch{return[]}return[]},n[$I]=function(i){var o=e,s=nt(i);return o[s]!==void 0&&o[s]>Yt()?!0:(delete o[s],!1)}})}return r.__ieDyn=1,r})()});function lN(r){return!(r>=300&&r<500&&r!=429||r==501||r==505)}function Ig(r){var e=0,t=cN*vU,n=cN*mU,i=Math.floor(Math.random()*(n-t))+t;return e=Math.pow(2,r)*i,Math.min(e,gU)}var vU,mU,cN,gU,bb=E(()=>{vU=.8,mU=1.2,cN=3e3,gU=6e5});function TU(r,e,t,n,i){if(i&&e){var o=r(i.value,i.kind,i.propertyType);if(o>-1){var s=e[uN];s||(s=e[uN]={f:{}});var a=s[Ng];if(a||(a=s[Ng]={}),t)for(var c=0;c<t.length;c++){var l=t[c];a[l]||(a[l]={f:{}});var u=a[l][Ng];u||(u=a[l][Ng]={}),a=u}a=a[n]={},de(i.value)?a.a={t:o}:a.t=o}}}var hU,yU,dN,fN,SU,uN,Ng,_U,pN,vN=E(()=>{Nr();Bc();Dg();ep();Ne();hU=20,yU=3984588,dN=65e3,fN=2e6,SU=Math.min(fN,dN),uN="metadata",Ng="f",_U=/\./,pN=(function(){function r(e,t,n,i,o,s){var a="data",c="baseData",l="ext",u=!!i,d=!0,f=t,v={},m=!!s,S=o||Nu;Ke(r,this,function(y){y.createPayload=function(_,A,k,j,H,oe){return{apiKeys:[],payloadBlob:Yi,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:_,isTeardown:A,isSync:k,isBeacon:j,sendType:oe,sendReason:H}},y.appendPayload=function(_,A,k){var j=_&&A&&!_.overflow;return j&&Jt(e,function(){return"Serializer:appendPayload"},function(){for(var H=A.events(),oe=_.payloadBlob,$=_.numEvents,G=!1,re=[],Q=[],ie=_.isBeacon,T=ie?dN:yU,R=ie?SU:fN,B=0,x=0;B<H.length;){var g=H[B];if(g){if($>=k){_.overflow=A.split(B);break}var D=y.getEventBlob(g);if(D&&D.length<=R){var I=D.length,Z=oe.length;if(Z+I>T){_.overflow=A.split(B);break}oe&&(oe+=`
`),oe+=D,x++,x>hU&&(io(oe,0,1),x=0),G=!0,$++}else D?re.push(g):Q.push(g),H.splice(B,1),B--}B++}if(re.length>0&&_.sizeExceed.push(ha.create(A.iKey(),re)),Q.length>0&&_.failedEvts.push(ha.create(A.iKey(),Q)),G){_.batches.push(A),_.payloadBlob=oe,_.numEvents=$;var M=A.iKey();Ze(_.apiKeys,M)===-1&&_.apiKeys.push(M)}},function(){return{payload:_,theBatch:{iKey:A.iKey(),evts:A.events()},max:k}}),j},y.getEventBlob=function(_){try{return Jt(e,function(){return"Serializer.getEventBlob"},function(){var A={};A.name=_.name,A.time=_.time,A.ver=_.ver,A.iKey="o:"+Wm(_.iKey);var k={},j;m||(j=function(G,re,Q){TU(S,k,G,re,Q)});var H=_[l];H&&(A[l]=k,me(H,function(G,re){var Q=k[G]={};C(re,Q,"ext."+G,!0,null,null,!0)}));var oe=A[a]={};oe.baseType=_.baseType;var $=oe[c]={};return C(_.baseData,$,c,!1,[c],j,d),C(_.data,oe,a,!1,[],j,d),JSON.stringify(A)},function(){return{item:_}})}catch{return null}};function N(_,A){var k=v[_];return k===void 0&&(_.length>=7&&(k=eu(_,"ext.metadata")||eu(_,"ext.web")),v[_]=k),k}function C(_,A,k,j,H,oe,$){me(_,function(G,re){var Q=null;if(re||wr(re)){var ie=k,T=G,R=H,B=A;if(u&&!j&&_U.test(G)){var x=G.split("."),g=x.length;if(g>1){R&&(R=R.slice());for(var D=0;D<g-1;D++){var I=x[D];B=B[I]=B[I]||{},ie+="."+I,R&&R.push(I)}T=x[g-1]}}var Z=j&&N(ie,T);if(!Z&&f&&f.handleField(ie,T)?Q=f.value(ie,T,re,n):Q=$m(T,re,n),Q){var M=Q.value;if(B[T]=M,oe&&oe(R,T,Q),$&&typeof M=="object"&&!de(M)){var w=R;w&&(w=w.slice(),w.push(T)),C(re,M,ie+"."+T,j,w,oe,$)}}}})}})}return r.__ieDyn=1,r})()});function Uu(r,e){return{set:function(t,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return Rx([r,e],t,n,i)}}}var Eb=E(()=>{Ne()});function Qc(r,e,t){Pb[r]=e,t!==!1&&(xb[e]=r)}function Rg(r,e){var t=!1;if(r&&e){var n=Vr(r);if(n&&n[Ve]>0)for(var i=e[ug](),o=0;o<n[Ve];o++){var s=n[o];if(s&&hr(e,s)&&s[ug]()===i){t=!0;break}}}return t}function Yu(r,e,t,n){e&&t&&t[Ve]>0&&(n&&Pb[e]?(r[zc][Pb[e]]=t,r[dg]=!0):r.url+="&"+e+"="+t)}function PU(r,e,t){for(var n=0;n<r[Ve];n++)if(r[n].name===e){r[n].value=t;return}r[Tr]({name:e,value:t})}function xU(r,e){for(var t=0;t<r[Ve];t++)if(r[t].name===e){r[Wc](t,1);return}}var Xc,Cb,bU,EU,CU,Pb,xb,mN,gN=E(()=>{Nr();Bc();Ne();oN();Dg();ep();aN();bb();vN();Eb();Mu();Cb="sendAttempt",bU="&"+qI+"=true",EU="?cors=true&"+Ru[ug]()+"="+tg,CU=(Xc={},Xc[1]=ib,Xc[100]=ib,Xc[200]="sent",Xc[8004]=eg,Xc[8003]=eg,Xc),Pb={},xb={};Qc(Zf,Zf,!1);Qc(rg,rg);Qc(sb,"Client-Id");Qc(og,og);Qc(ng,ng);Qc(ig,ig);Qc(cb,cb);mN=(function(){function r(e,t,n,i){var o,s,a,c,l=!1,u,d,f,v,m,S,y,N,C,_,A,k,j,H,oe,$,G,re,Q,ie,T,R,B,x,g,D,I,Z;Ke(r,this,function(M){vt();var w=!0;M[$c]=function(b,K,J){x||(m=K,k=K.getCookieMgr(),d=J,f=d.diagLog(),Ni(ie,ur(b,function(ue){var De,Ye=ue.cfg,pe=ue.cfg.extensionConfig[J.identifier];g=Uu(pe[fg],pe[pg]),wr(Ye.anonCookieName)?PU(y,"anoncknm",Ye.anonCookieName):xU(y,"anoncknm"),T=pe[HI],R=pe.payloadListener;var p=pe.httpXHROverride,h=pe[ub]?pe[ub]:Ye.endpointUrl;o=h+EU,H=Fe(pe[db])?!0:!pe[db],A=!pe[KI];var P=pe.valueSanitizer,O=pe[BI],Y=!!Ye[vg];Fe(pe[vg])||(Y=!!pe[vg]),oe=pe.xhrTimeout,$=!!pe[fb],G=!!pe[pb],Q=pe[GI]!==!1,D=!!pe[WI],K.getPlugin("LocalStorage")&&(G=!0),l=!na(),_=new pN(m,P,O,Y,Nu,D),z(pe[vb])||(l=!!pe[vb]),pe[mb]&&(Z=pe[mb]);var W=je();I?I.SetConfig(W):(I=new qc,I[$c](W,f));var te=p,Ie=pe[gb]?p:null,ze=pe[gb]?p:null,Ce=[3,2];if(!p){S=!1;var hn=[];na()?(hn=[2,1],Ce=[2,1,3]):hn=[1,2,3],hn=os(hn,pe.transports),p=Le(hn,!1),p||fn(f,"No available transport to send events"),te=Le(hn,!0)}Ie||(Ce=os(Ce,pe[zI]),Ie=Le(Ce,!0)),re=!S&&(l&&wn()||!G&&as(!0)),v=(De={},De[0]=p,De[1]=te||Le([1,2,3],!0),De[2]=Ie||te||Le([1],!0),De[3]=ze||Le([2,3],!0)||te||Le([1],!0),De)})),x=!0)},M.addResponseHandler=function(b){return B[Tr](b),{rm:function(){var K=B.indexOf(b);K>=0&&B[Wc](K,1)}}},M[mg]=function(b){try{if(_)return _.getEventBlob(b)}catch{}return Yi},M[gg]=function(){try{var b=_&&_[hg](0,!1,!1,!1,1,0);return ce(b,H)}catch{}return null},M[np]=function(b,K){try{var J=[];V(b,function(p){K&&(p=Rn(p));var h=ha.create(p[Jn],[p]);J[Tr](h)});for(var ue=null;J[Ve]>0&&_;){var De=J.shift();De&&De[Xt]()>0&&(ue=ue||_[hg](0,!1,!1,!1,1,0),_.appendPayload(ue,De,e))}var Ye=ce(ue,H),pe={data:ue[hb],urlString:Ye.url,headers:Ye[zc],timeout:oe,disableXhrSync:$,disableFetchKeepAlive:G};return H&&(Rg(pe[Vi],Qf)||(pe[Vi][Qf]=ob),Rg(pe[Vi],Ru)||(pe[Vi][Ru]=tg)),pe}catch{}return null};function Le(b,K){try{return I&&I.getSenderInst(b,K)}catch{}return null}M._getDbgPlgTargets=function(){return[v[0],s,_,v,je(),o]};function je(){try{var b={xdrOnComplete:pt,fetchOnComplete:sr,xhrOnComplete:Lr,beaconOnRetry:ln},K={enableSendPromise:!1,isOneDs:!0,disableCredentials:!w,fetchCredentials:Z,disableXhr:!1,disableBeacon:!l,disableBeaconSync:!l,disableFetchKeepAlive:G,timeWrapper:g,addNoResponse:Q,senderOnCompleteCallBack:b};return K}catch{}return null}function pt(b,K,J){var ue=Fi(b);gr(K,200,{},ue),ni(ue)}function vt(){var b;o=null,s=new sN,a=!1,c=new iN,l=!1,u=0,d=null,f=null,v=null,m=null,S=!0,y=[],N={},C=[],_=null,A=!1,k=null,j=!1,H=!1,oe=b,$=b,G=b,re=b,Q=b,ie=[],T=b,R=b,B=[],x=!1,g=Uu(),D=!1,I=null}function sr(b,K,J,ue){var De=function(p,h,P){gr(K,p,h,P),ni(P)},Ye={},pe=b[Vi];pe&&pe.forEach(function(p,h){Ye[h]=p}),De(b.status,Ye,J||Yi)}function Lr(b,K,J){var ue=Fi(b);gr(K,b.status,ss(b,!0),ue),ni(ue)}function gr(b,K,J,ue){try{b(K,J,ue)}catch(De){X(f,2,518,fe(De))}}function ln(b,K,J){var ue=b,De=200,Ye=ue[Au],pe=b[yb]+(Q?bU:Yi);try{var p=Sr();if(Ye){var h=!!m.getPlugin("LocalStorage"),P=[],O=[];V(Ye[en],function(Y){if(P&&Y&&Y[Xt]()>0)for(var W=Y[Eo](),te=0;te<W[Ve];te++)if(p.sendBeacon(pe,_.getEventBlob(W[te])))O[Tr](Y[te]);else{P[Tr](Y[Co](te));break}else P[Tr](Y[Co](0))}),O[Ve]>0&&(Ye.sentEvts=O),h||Dr(P,8003,Ye[On],!0)}else De=0}catch(Y){fn(f,"Failed to send telemetry using sendBeacon API. Ex:"+fe(Y)),De=0}finally{gr(K,De,{},Yi)}}function mt(b){return b===2||b===3}function rt(b){return j&&mt(b)&&(b=2),b}M[ip]=function(b,K){N[b]=K},M.removeHeader=function(b){delete N[b]},M[op]=function(){return Nt()&&c[tp]()},M[Ou]=function(b,K){Fe(b)&&(b=0),j&&(b=rt(b),K=2),F(C,b,0)&&Te(St(),0,!1,b,K||0)},M[yg]=function(){return!a&&u===0&&C[Ve]===0},M[sp]=function(b){j=b},M.addBatch=function(b){if(b&&b[Xt]()>0){if(s.isTenantKilled(b[Jn]()))return!1;C[Tr](b)}return!0},M.teardown=function(){C[Ve]>0&&Te(St(),0,!0,2,2),V(ie,function(b){b&&b.rm&&b.rm()}),ie=[]},M.pause=function(){a=!0},M[ku]=function(){a=!1,M[Ou](0,4)},M[Sg]=function(b,K,J){b&&b[Xt]()>0&&(z(K)&&(K=1),j&&(K=rt(K),J=2),Te([b],0,!1,K,J||0))};function Nt(){return!a&&u<t}function St(){var b=C;return C=[],b}function F(b,K,J){var ue=!1;return b&&b[Ve]>0&&!a&&v[K]&&_&&(ue=K!==0||Nt()&&(J>0||c[tp]())),ue}function ne(b){var K={};return b&&V(b,function(J,ue){K[ue]={iKey:J[Jn](),evts:J[Eo]()}}),K}function Te(b,K,J,ue,De){if(!(!b||b[Ve]===0)){if(a){Dr(b,1,ue);return}ue=rt(ue);try{var Ye=b,pe=ue!==0;Jt(m,function(){return"HttpManager:_sendBatches"},function(p){p&&(b=b.slice(0));for(var h=[],P=null,O=An(),Y=v[ue]||(pe?v[1]:v[0]),W=Y&&Y[_g],te=re&&(j||mt(ue)||W===3||Y._isSync&&W===2);F(b,ue,K);){var Ie=b.shift();Ie&&Ie[Xt]()>0&&(s.isTenantKilled(Ie[Jn]())?h[Tr](Ie):(P=P||_[hg](K,J,pe,te,De,ue),_.appendPayload(P,Ie,e)?P.overflow!==null&&(b=[P.overflow][bo](b),P.overflow=null,Je(P,O,An(),De),O=An(),P=null):(Je(P,O,An(),De),O=An(),b=[Ie][bo](b),P=null)))}P&&Je(P,O,An(),De),b[Ve]>0&&(C=b[bo](C)),Dr(h,8004,ue)},function(){return{batches:ne(Ye),retryCount:K,isTeardown:J,isSynchronous:pe,sendReason:De,useSendBeacon:mt(ue),sendType:ue}},!pe)}catch(p){X(f,2,48,"Unexpected Exception sending batch: "+fe(p))}}}function ce(b,K){var J={url:o,hdrs:{},useHdrs:!1};K?(J[zc]=Kc(J[zc],N),J.useHdrs=Vr(J.hdrs)[Ve]>0):me(N,function(p,h){xb[p]?Yu(J,xb[p],h,!1):(J[zc][p]=h,J[dg]=!0)}),Yu(J,sb,"NO_AUTH",K),Yu(J,rg,Iu,K);var ue=Yi;V(b.apiKeys,function(p){ue[Ve]>0&&(ue+=","),ue+=p}),Yu(J,og,ue,K),Yu(J,ig,Yt().toString(),K);var De=Qr(b);if(wr(De)&&(J.url+="&ext.intweb.msfpc="+De),c[cg]()&&Yu(J,ng,c[lg](),K),m[Lu]){var Ye=m[Lu]();Ye>=0&&(J.url+="&w="+Ye)}for(var pe=0;pe<y[Ve];pe++)J.url+="&"+y[pe].name+"="+y[pe].value;return J}function be(b,K,J){b[K]=b[K]||{},b[K][d.identifier]=J}function Je(b,K,J,ue){if(b&&b.payloadBlob&&b.payloadBlob[Ve]>0){var De=!!T,Ye=v[b.sendType];!mt(b[On])&&b[Sb]&&b.sendReason===2&&(Ye=v[2]||v[3]||Ye);var pe=H;(b.isBeacon||Ye[_g]===3)&&(pe=!1);var p=ce(b,pe);pe=pe||p[dg];var h=An();Jt(m,function(){return"HttpManager:_doPayloadSend"},function(){for(var P=0;P<b.batches[Ve];P++)for(var O=b[en][P],Y=O[Eo](),W=0;W<Y[Ve];W++){var te=Y[W];if(A){var Ie=te[ap]=te[ap]||{};be(Ie,"sendEventStart",h),be(Ie,"serializationStart",K),be(Ie,"serializationCompleted",J)}te[Cb]>0?te[Cb]++:te[Cb]=1}Dr(b[en],1e3+(ue||0),b[On],!0);var ze={data:b[hb],urlString:p.url,headers:p[zc],_thePayload:b,_sendReason:ue,timeout:oe,disableXhrSync:$,disableFetchKeepAlive:G};pe&&(Rg(ze[Vi],Qf)||(ze[Vi][Qf]=ob),Rg(ze[Vi],Ru)||(ze[Vi][Ru]=tg));var Ce=null;Ye&&(Ce=function(hn){c[ag]();var zo=function(Zi,hv){ot(Zi,hv,b,ue)},yn=b[Tg]||b[bg];try{Ye.sendPOST(hn,zo,yn),R&&R(ze,hn,yn,b[Sb])}catch(Zi){fn(f,"Unexpected exception sending payload. Ex:"+fe(Zi)),gr(zo,0,{})}}),Jt(m,function(){return"HttpManager:_doPayloadSend.sender"},function(){if(Ce)if(b[On]===0&&u++,De&&!b.isBeacon&&Ye[_g]!==3){var hn={data:ze[Fu],urlString:ze[yb],headers:Kc({},ze[Vi]),timeout:ze[JI],disableXhrSync:ze[fb],disableFetchKeepAlive:ze[pb]},zo=!1;Jt(m,function(){return"HttpManager:_doPayloadSend.sendHook"},function(){try{T(hn,function(yn){zo=!0,!S&&!yn[Au]&&(yn[Au]=yn[Au]||ze[Au],yn[Eg]=yn[Eg]||ze[Eg]),Ce(yn)},b.isSync||b[Tg])}catch{zo||Ce(ze)}})}else Ce(ze)})},function(){return{thePayload:b,serializationStart:K,serializationCompleted:J,sendReason:ue}},b[bg])}b.sizeExceed&&b.sizeExceed[Ve]>0&&Dr(b.sizeExceed,8003,b[On]),b.failedEvts&&b.failedEvts[Ve]>0&&Dr(b.failedEvts,8002,b[On])}function We(b,K){A&&V(b,function(J){var ue=J[ap]=J[ap]||{};be(ue,"sendEventCompleted",K)})}function ot(b,K,J,ue){var De=9e3,Ye=null,pe=!1,p=!1;try{var h=!0;if(typeof b!==eo){if(K){c[rp](K[jI]);var P=K[VI]||K["kill-duration-seconds"];V(s[Cg](K[YI],P),function(Y){V(J[en],function(W){if(W[Jn]()===Y){Ye=Ye||[];var te=W[Co](0);J.numEvents-=te[Xt](),Ye[Tr](te)}})})}if(b==200||b==204){De=200;return}(!lN(b)||J.numEvents<=0)&&(h=!1),De=9e3+b%1e3}if(h){De=100;var O=J.retryCnt;J[On]===0&&(O<n?(pe=!0,Xr(function(){J[On]===0&&u--,Te(J[en],O+1,J[Tg],j?2:J[On],5)},j,Ig(O))):(p=!0,j&&(De=8001)))}}finally{pe||(c[rp](),Rt(J,De,ue,p)),Dr(Ye,8004,J[On])}}function Rt(b,K,J,ue){try{ue&&d[Pg]();var De=b[en];K===200&&(De=b.sentEvts||b[en],!ue&&!b[bg]&&d._clearBackOff(),Kt(De)),Dr(De,K,b[On],!0)}finally{b[On]===0&&(u--,J!==5&&M.sendQueuedRequests(b[On],J))}}function Kt(b){if(A){var K=An();V(b,function(J){J&&J[Xt]()>0&&We(J[Eo](),K)})}}function Xr(b,K,J){K?b():g.set(b,J)}function Qr(b){for(var K=0;K<b.batches[Ve];K++){var J=b[en][K].Msfpc();if(J)return encodeURIComponent(J)}return Yi}function ni(b){var K=B;try{for(var J=0;J<K[Ve];J++)try{K[J](b)}catch(De){X(f,1,519,"Response handler failed: "+De)}if(b){var ue=JSON.parse(b);wr(ue.webResult)&&wr(ue.webResult[wu])&&k.set("MSFPC",ue.webResult[wu],365*86400)}}catch{}}function Dr(b,K,J,ue){if(b&&b[Ve]>0&&i){var De=i[Wo(K)];if(De){var Ye=J!==0;Jt(m,function(){return"HttpManager:_sendBatchesNotification"},function(){Xr(function(){try{De.call(i,b,K,Ye,J)}catch(pe){X(f,1,74,"send request notification failed: "+pe)}},ue||Ye,0)},function(){return{batches:ne(b),reason:K,isSync:Ye,sendSync:ue,sendType:J}},!Ye)}}}function Wo(b){var K=CU[b];return wr(K)||(K=UI,b>=9e3&&b<=9999?K=MI:b>=8e3&&b<=8999?K=eg:b>=1e3&&b<=1999&&(K=FI)),K}})}return r.__ieDyn=1,r})()});function AU(r){return r&&r.sendPOST}var DU,hN,IU,_N,TN,NU,yN,RU,Db,Zc,SN,dr,wU,bN,EN=E(()=>{En();Nr();Bc();Nc();Ne();nb();Dg();gN();ep();bb();Eb();Mu();DU=.25,hN=500,IU=20,_N=6,TN=2,NU=4,yN=2,RU=1,Db=1e4,Zc="eventsDiscarded",SN="",dr=void 0,wU=no({eventsLimitInMem:{isVal:ma,v:Db},immediateEventLimit:{isVal:ma,v:500},autoFlushEventsLimit:{isVal:ma,v:0},disableAutoBatchFlushLimit:!1,httpXHROverride:{isVal:AU,v:dr},overrideInstrumentationKey:dr,overrideEndpointUrl:dr,disableTelemetry:!1,ignoreMc1Ms0CookieProcessing:!1,setTimeoutOverride:dr,clearTimeoutOverride:dr,payloadPreprocessor:dr,payloadListener:dr,disableEventTimings:dr,valueSanitizer:dr,stringifyObjects:dr,enableCompoundKey:dr,disableOptimizeObj:!1,fetchCredentials:dr,transports:dr,unloadTransports:dr,useSendBeacon:dr,disableFetchKeepAlive:dr,avoidOptions:!1,xhrTimeout:dr,disableXhrSync:dr,alwaysUseXhrOverride:!1,maxEventRetryAttempts:{isVal:Yr,v:_N},maxUnloadEventRetryAttempts:{isVal:Yr,v:TN},addNoResponse:dr,excludeCsMetaData:dr});bN=(function(r){bn(e,r);function e(){var t=r.call(this)||this;t.identifier="PostChannel",t.priority=1011,t.version="4.3.4";var n,i=!1,o=[],s,a=!1,c=0,l,u=0,d,f={},v=Gc,m,S,y,N,C,_,A,k,j,H,oe,$,G,re,Q,ie,T,R,B,x,g,D;return Ke(e,t,function(I,Z){rt(),I._getDbgPlgTargets=function(){return[C,n]},I[$c]=function(p,h,P){Jt(h,function(){return"PostChannel:initialize"},function(){Z[$c](p,h,P),B=h.getNotifyMgr();try{Q=$n(Hr(I[cp]),h.evtNamespace&&h.evtNamespace()),I._addHook(ur(p,function(O){var Y=O.cfg,W=pn(null,Y,h);n=W.getExtCfg(I[cp],wU),ie=Uu(n[fg],n[pg]),oe=!n[XI]&&Jm(),T=n[QI],w(h),d=n[_b],l=n.immediateEventLimit,A=n[Tb],G=n.maxEventRetryAttempts,re=n.maxUnloadEventRetryAttempts,R=n[ZI],un(Y.endpointUrl)?I.pause():a&&I[ku](),pe(),g=n[eN],D=!!n[tN],x&&M();var te=Y.disablePageUnloadEvents||[];x=Bf(pt,te,Q),x=Pu(pt,te,Q)||x,x=xu(vt,Y.disablePageShowEvents,Q)||x})),C[$c](p,I.core,I)}catch(O){throw I.setInitialized(!1),O}},function(){return{theConfig:p,core:h,extensions:P}})},I.processTelemetry=function(p,h){Xf(p,I[cp]),h=h||I._getTelCtx(h);var P=p;!D&&!i&&(g&&(P[Jn]=g),Lr(P,!0),$?F(2,2):mt()),I.processNext(P,h)},I.getOfflineSupport=function(){try{var p=C&&C[gg]();if(C)return{getUrl:function(){return p?p.url:null},serialize:je,batch:Le,shouldProcess:function(h){return!D},createPayload:function(h){return null},createOneDSPayload:function(h){if(C[np])return C[np](h,oe)}}}catch{}return null},I._doTeardown=function(p,h){F(2,2),i=!0,C.teardown(),M(),rt()};function M(){Gf(null,Q),Wf(null,Q),zf(null,Q)}function w(p){var h=p[Lu];p[Lu]=function(){var P=0;return T&&(P=P|2),P|h.call(p)}}function Le(p){var h=SN;return p&&p[Ve]&&V(p,function(P){h&&(h+=`
`),h+=P}),h}function je(p){var h=SN;try{sr(p),h=C[mg](p)}catch{}return h}function pt(p){var h=p||cr().event;h.type!=="beforeunload"&&($=!0,C[sp]($)),F(2,2)}function vt(p){$=!1,C[sp]($)}function sr(p){p.ext&&p.ext[lb]&&delete p.ext[lb],p.ext&&p.ext[sg]&&p.ext[sg].id&&delete p.ext[sg].id,oe&&(p.ext=Rn(p.ext),p[xg]&&(p[xg]=Rn(p[xg])),p[Fu]&&(p[Fu]=Rn(p[Fu])))}function Lr(p,h){if(p[lp]||(p[lp]=0),p[ga]||(p[ga]=1),sr(p),p[Jc]){if(y||a)p[ga]=3,p[Jc]=!1;else if(C){oe&&(p=Rn(p)),C[Sg](ha.create(p[Jn],[p]),p[Jc]===!0?1:p[Jc],3);return}}var P=p[ga],O=u,Y=d;P===4&&(O=c,Y=l);var W=!1;if(O<Y)W=!be(p,h);else{var te=1,Ie=IU;P===4&&(te=4,Ie=1),W=!0,Je(p[Jn],p[ga],te,Ie)&&(W=!be(p,h))}W&&Wo(Zc,[p],Ri.QueueFull)}I.setEventQueueLimits=function(p,h){n[_b]=d=ma(p)?p:Db,n[Tb]=A=ma(h)?h:0,pe();var P=u>p;if(!P&&k>0)for(var O=1;!P&&O<=3;O++){var Y=_[O];Y&&Y[en]&&V(Y[en],function(W){W&&W[Xt]()>=k&&(P=!0)})}ce(!0,P)},I.pause=function(){St(),a=!0,C&&C.pause()},I[ku]=function(){a=!1,C&&C[ku](),mt()},I._loadTransmitProfiles=function(p){Xr(),me(p,function(h,P){var O=P[Ve];if(O>=2){var Y=O>2?P[2]:0;if(P[Wc](0,O-2),P[1]<0&&(P[0]=-1),P[1]>0&&P[0]>0){var W=P[0]/P[1];P[0]=Math.ceil(W)*P[1]}Y>=0&&P[1]>=0&&Y>P[1]&&(Y=P[1]),P[Tr](Y),f[h]=P}})},I.flush=function(p,h,P){p===void 0&&(p=!0);var O;if(!a)if(P=P||1,p)h||(O=ci(function(W){h=W})),s==null?(St(),ot(1,0,P),s=Nt(function(){s=null,Rt(h,P)},0)):o[Tr](h);else{var Y=St();gr(1,1,P),h&&h(),Y&&mt()}return O},I.setMsaAuthTicket=function(p){C[ip](Zf,p)},I.setAuthPluginHeader=function(p){C[ip](ab,p)},I.removeAuthPluginHeader=function(){C.removeHeader(ab)},I.hasEvents=ln,I._setTransmitProfile=function(p){v!==p&&f[p]!==void 0&&(St(),v=p,mt())},zn(I,function(){return C},["addResponseHandler"]);function gr(p,h,P){var O=ot(p,h,P);return C[Ou](h,P),O}function ln(){return u>0}function mt(){if(j>=0&&ot(j,0,H)&&C[Ou](0,H),c>0&&!S&&!a){var p=f[v][2];p>=0&&(S=Nt(function(){S=null,gr(4,0,1),mt()},p))}var h=f[v][1];!m&&!s&&h>=0&&!a&&(ln()?m=Nt(function(){m=null,gr(N===0?3:1,0,1),N++,N%=2,mt()},h):N=0)}I[Pg]=function(){y<NU&&(y++,St(),mt())},I._clearBackOff=function(){y&&(y=0,St(),mt())};function rt(){n=null,i=!1,o=[],s=null,a=!1,c=0,l=500,u=0,d=Db,f={},v=Gc,m=null,S=null,y=0,N=0,_={},A=0,x=!1,k=0,j=-1,H=null,oe=!0,$=!1,G=_N,re=TN,Q=null,g=null,D=!1,ie=Uu(),C=new mN(hN,yN,RU,{requeue:ni,send:K,sent:J,drop:ue,rspFail:De,oth:Ye}),Qr(),ne(),pe()}function Nt(p,h){h===0&&y&&(h=1);var P=1e3;return y&&(P=Ig(y-1)),ie.set(p,h*P)}function St(){return m!==null?(m.cancel(),m=null,N=0,!0):!1}function F(p,h){St(),s&&(s.cancel(),s=null),a||gr(1,p,h)}function ne(){_[4]={batches:[],iKeyMap:{}},_[3]={batches:[],iKeyMap:{}},_[2]={batches:[],iKeyMap:{}},_[1]={batches:[],iKeyMap:{}}}function Te(p,h,P){var O=_[h];O||(h=1,O=_[h]);var Y=O.iKeyMap[p];return!Y&&P&&(Y=ha.create(p),O.batches[Tr](Y),O.iKeyMap[p]=Y),Y}function ce(p,h){C[op]()&&!y&&(A>0&&u>A&&(h=!0),h&&s==null&&I.flush(p,function(){},20))}function be(p,h){oe&&(p=Rn(p));var P=p[ga],O=Te(p[Jn],P,!0);return O.addEvent(p)?(P!==4?(u++,h&&p[lp]===0&&ce(!p.sync,k>0&&O[Xt]()>=k)):c++,!0):!1}function Je(p,h,P,O){for(;P<=h;){var Y=Te(p,h,!0);if(Y&&Y[Xt]()>0){var W=Y[Co](0,O),te=W[Xt]();if(te>0)return P===4?c-=te:u-=te,b(Zc,[W],Ri.QueueFull),!0}P++}return We(),!1}function We(){for(var p=0,h=0,P=function(Y){var W=_[Y];W&&W[en]&&V(W[en],function(te){Y===4?p+=te[Xt]():h+=te[Xt]()})},O=1;O<=4;O++)P(O);u=h,c=p}function ot(p,h,P){var O=!1,Y=h===0;return!Y||C[op]()?Jt(I.core,function(){return"PostChannel._queueBatches"},function(){for(var W=[],te=4;te>=p;){var Ie=_[te];Ie&&Ie.batches&&Ie.batches[Ve]>0&&(V(Ie[en],function(ze){C.addBatch(ze)?O=O||ze&&ze[Xt]()>0:W=W[bo](ze[Eo]()),te===4?c-=ze[Xt]():u-=ze[Xt]()}),Ie[en]=[],Ie.iKeyMap={}),te--}W[Ve]>0&&Wo(Zc,W,Ri.KillSwitch),O&&j>=p&&(j=-1,H=0)},function(){return{latency:p,sendType:h,sendReason:P}},!Y):(j=j>=0?Math.min(j,p):p,H=Math.max(H,P)),O}function Rt(p,h){gr(1,0,h),We(),Kt(function(){p&&p(),o[Ve]>0?s=Nt(function(){s=null,Rt(o.shift(),h)},0):(s=null,mt())})}function Kt(p){C[yg]()?p():s=Nt(function(){s=null,Kt(p)},DU)}function Xr(){St(),Qr(),v=Gc,mt()}function Qr(){f={},f[Gc]=[2,1,0],f[Qm]=[6,3,0],f[Zm]=[18,9,0]}function ni(p,h){var P=[],O=G;$&&(O=re),V(p,function(Y){Y&&Y[Xt]()>0&&V(Y[Eo](),function(W){W&&(W[Jc]&&(W[ga]=4,W[Jc]=!1),W[lp]<O?(Xf(W,I[cp]),Lr(W,!1)):P[Tr](W))})}),P[Ve]>0&&Wo(Zc,P,Ri.NonRetryableStatus),$&&F(2,2)}function Dr(p,h){var P=B||{},O=P[p];if(O)try{O.apply(P,h)}catch(Y){X(I.diagLog(),1,74,p+" notification failed: "+Y)}}function Wo(p,h){for(var P=[],O=2;O<arguments.length;O++)P[O-2]=arguments[O];h&&h[Ve]>0&&Dr(p,[h][bo](P))}function b(p,h){for(var P=[],O=2;O<arguments.length;O++)P[O-2]=arguments[O];h&&h[Ve]>0&&V(h,function(Y){Y&&Y[Xt]()>0&&Dr(p,[Y.events()][bo](P))})}function K(p,h,P){p&&p[Ve]>0&&Dr("eventsSendRequest",[h>=1e3&&h<=1999?h-1e3:0,P!==!0])}function J(p,h){b("eventsSent",p,h),mt()}function ue(p,h){b(Zc,p,h>=8e3&&h<=8999?h-8e3:Ri.Unknown)}function De(p){b(Zc,p,Ri.NonRetryableStatus),mt()}function Ye(p,h){b(Zc,p,Ri.Unknown),mt()}function pe(){R?k=0:k=Math.max(hN*(yN+1),d/6)}}),t}return e.__ieDyn=1,e})(ps)});var CN={};Be(CN,{BE_PROFILE:()=>Zm,NRT_PROFILE:()=>Qm,PostChannel:()=>bN,RT_PROFILE:()=>Gc});var PN=E(()=>{nb();EN()});var DN=le(Po=>{"use strict";var OU=Po&&Po.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),kU=Po&&Po.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),xN=Po&&Po.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&OU(e,r,t);return kU(e,r),e};Object.defineProperty(Po,"__esModule",{value:!0});Po.oneDataSystemClientFactory=void 0;var LU=async(r,e,t)=>{let n=await Promise.resolve().then(()=>xN((Bc(),Hd(LI)))),i=await Promise.resolve().then(()=>xN((PN(),Hd(CN)))),o=new n.AppInsightsCore,s=new i.PostChannel,a={instrumentationKey:r,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[s]]};if(t){a.extensionConfig={};let u={alwaysUseXhrOverride:!0,httpXHROverride:t};a.extensionConfig[s.identifier]=u}let l=e.workspace.getConfiguration("telemetry").get("internalTesting");return o.initialize(a,[]),o.addTelemetryInitializer(u=>{u.ext=u.ext??{},u.ext.web=u.ext.web??{},u.ext.web.consentDetails='{"GPC_DataSharingOptIn":false}',l&&(u.ext.utc=u.ext.utc??{},u.ext.utc.flags=8462029)}),o},FU=async(r,e,t)=>{let n=await LU(r,e,t);return{logEvent:(s,a)=>{try{n?.track({name:s,baseData:{name:s,properties:a?.properties,measurements:a?.measurements}})}catch(c){throw new Error(`Failed to log event to app insights!
`+c.message)}},flush:async()=>{try{return new Promise((a,c)=>{if(!n){a();return}n.flush(!0,l=>{if(!l){c("Failed to flush app 1DS!");return}})})}catch(s){throw new Error(`Failed to flush 1DS!
`+s.message)}},dispose:async()=>new Promise(a=>{if(!n){a();return}n.unload(!1,()=>{a(),n=void 0},1e3)})}};Po.oneDataSystemClientFactory=FU});var IN,Vu,ju,up,ya,ji,br,wg,fi=E(()=>{IN="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Vu="sampleRate",ju="ProcessLegacy",up="http.method",ya="https://dc.services.visualstudio.com",ji="/v2/track",br="not_specified",wg="iKey"});var el,Ib=E(()=>{st();el=D_({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]})});var ys,we,xo,Sa,Ss,_s,Ag,fr,qi,_a,Og,kg,Lg,Nb,Fg,Mg,tl,qu,Rb,dp,rl,pi,Kr,tn,nl,Do,il,Ug,Yg,wb,ol,Ta,fp,pp,sl,Hu,al,Ab,Er=E(()=>{ys="split",we="length",xo="toLowerCase",Sa="ingestionendpoint",Ss="toString",_s="push",Ag="removeItem",fr="name",qi="message",_a="count",Og="preTriggerDate",kg="disabled",Lg="interval",Nb="daysOfMonth",Fg="date",Mg="getUTCDate",tl="stringify",qu="pathname",Rb="correlationHeaderExcludePatterns",dp="extensionConfig",rl="exceptions",pi="parsedStack",Kr="properties",tn="measurements",nl="sizeInBytes",Do="typeName",il="severityLevel",Ug="problemGroup",Yg="isManual",wb="CreateFromInterface",ol="assembly",Ta="fileName",fp="hasFullStack",pp="level",sl="method",Hu="line",al="duration",Ab="receivedResponse"});function Vg(r,e,t){var n=e[we],i=Ob(r,e);if(i[we]!==n){for(var o=0,s=i;t[s]!==void 0;)o++,s=yr(i,0,147)+kb(o);i=s}return i}function Ob(r,e){var t;return e&&(e=nt(er(e)),e[we]>150&&(t=yr(e,0,150),X(r,2,57,"name is too long.  It has been truncated to 150 characters.",{name:e},!0))),t||e}function ut(r,e,t){t===void 0&&(t=1024);var n;return e&&(t=t||1024,e=nt(er(e)),e[we]>t&&(n=yr(e,0,t),X(r,2,61,"string value is too long. It has been truncated to "+t+" characters.",{value:e},!0))),n||e}function ba(r,e){return Hg(r,e,2048,66)}function Ku(r,e){var t;return e&&e[we]>32768&&(t=yr(e,0,32768),X(r,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),t||e}function jg(r,e){var t;if(e){var n=""+e;n[we]>32768&&(t=yr(n,0,32768),X(r,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return t||e}function rn(r,e){if(e){var t={};me(e,function(n,i){if(Ut(i)&&fo())try{i=qr()[tl](i)}catch(o){X(r,2,49,"custom property is not valid",{exception:o},!0)}i=ut(r,i,8192),n=Vg(r,n,t),t[n]=i}),e=t}return e}function nn(r,e){if(e){var t={};me(e,function(n,i){n=Vg(r,n,t),t[n]=i}),e=t}return e}function qg(r,e){return e&&Hg(r,e,128,69)[Ss]()}function Hg(r,e,t,n){var i;return e&&(e=nt(er(e)),e[we]>t&&(i=yr(e,0,t),X(r,2,n,"input is too long, it has been truncated to "+t+" characters.",{data:e},!0))),i||e}function kb(r){var e="00"+r;return io(e,e[we]-3)}var vi=E(()=>{st();Ne();Er()});function cl(r){var e=RN,t=MU,n=t[e];return NN.createElement?t[e]||(n=t[e]=NN.createElement("a")):n={host:Lb(r,!0)},n.href=r,e++,e>=t[we]&&(e=0),RN=e,n}function wN(r){var e,t=cl(r);return t&&(e=t.href),e}function AN(r){var e,t=cl(r);return t&&(e=t[qu]),e}function ON(r,e){return r?r.toUpperCase()+" "+e:e}function Lb(r,e){var t=vp(r,e)||"";if(t){var n=t.match(/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[we]>3&&Oe(n[2])&&n[2][we]>0)return n[2]+(n[3]||"")}return t}function vp(r,e){var t=null;if(r){var n=r.match(/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[we]>2&&Oe(n[2])&&n[2][we]>0&&(t=n[2]||"",e&&n[we]>2)){var i=(n[1]||"")[xo](),o=n[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),t+=o}}return t}var NN,RN,MU,Fb=E(()=>{st();Er();NN=zt()||{},RN=0,MU=[null,null,null,null,null]});function mp(r){return Ze(UU,r[xo]())!==-1}function kN(r){Mb=r}function LN(){return Mb}function FN(r,e,t){if(!e||r&&r.disableCorrelationHeaders)return!1;if(r&&r[Rb]){for(var n=0;n<r.correlationHeaderExcludePatterns[we];n++)if(r[Rb][n].test(e))return!1}var i=cl(e).host[xo]();if(i&&(Tn(i,":443")!==-1||Tn(i,":80")!==-1)&&(i=(vp(e,!0)||"")[xo]()),(!r||!r.enableCorsCorrelation)&&i&&i!==t)return!1;var o=r&&r.correlationHeaderDomains;if(o){var s;if(V(o,function(l){var u=new RegExp(l.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||u.test(i)}),!s)return!1}var a=r&&r.correlationHeaderExcludedDomains;if(!a||a[we]===0)return!0;for(var n=0;n<a[we];n++){var c=new RegExp(a[n].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[we]>0}function MN(r){if(r){var e=Ub(r,el[1]);if(e&&e!==Mb)return e}}function Ub(r,e){if(r)for(var t=r[ys](","),n=0;n<t[we];++n){var i=t[n][ys]("=");if(i[we]===2&&i[0]===e)return i[1]}}function UN(r,e,t,n){var i,o=n,s=n;if(e&&e[we]>0){var a=cl(e);if(i=a.host,!o)if(a[qu]!=null){var c=a.pathname[we]===0?"/":a[qu];c.charAt(0)!=="/"&&(c="/"+c),s=a[qu],o=ut(r,t?t+" "+c:c)}else o=ut(r,e)}else i=n,o=n;return{target:i,name:o,data:s}}function YN(){var r=Bs();if(r&&r.now&&r.timing){var e=r.now()+r.timing.navigationStart;if(e>0)return e}return Yt()}function VN(r,e){var t=null;return r!==0&&e!==0&&!z(r)&&!z(e)&&(t=e-r),t}function jN(r,e){var t=r||{};return{getName:function(){return t[fr]},setName:function(n){e&&e.setName(n),t[fr]=n},getTraceId:function(){return t.traceID},setTraceId:function(n){e&&e.setTraceId(n),mo(n)&&(t.traceID=n)},getSpanId:function(){return t.parentID},setSpanId:function(n){e&&e.setSpanId(n),go(n)&&(t.parentID=n)},getTraceFlags:function(){return t.traceFlags},setTraceFlags:function(n){e&&e.setTraceFlags(n),t.traceFlags=n}}}var UU,Mb,Yb=E(()=>{st();Ne();fi();Ib();vi();Fb();Er();UU=[ya+ji,"https://breeze.aimon.applicationinsights.io"+ji,"https://dc-int.services.visualstudio.com"+ji],Mb="cid-v1:"});var Bu,qN,HN,Vb=E(()=>{st();Bu=$t({LocalStorage:0,SessionStorage:1}),qN=$t({AI:0,AI_AND_W3C:1,W3C:2}),HN=$t({Normal:1,Critical:2})});function jb(){return Gu()?Kg(Bu.LocalStorage):null}function Kg(r){try{if(z(dn()))return null;var e=new Date()[Ss](),t=Pe(r===Bu.LocalStorage?"localStorage":"sessionStorage"),n=KN+e;t.setItem(n,e);var i=t.getItem(n)!==e;if(t[Ag](n),!i)return t}catch{}return null}function qb(){return ll()?Kg(Bu.SessionStorage):null}function BN(){Ea=!1,Ca=!1}function Bg(r){KN=r||""}function GN(){Ea=Gu(!0),Ca=ll(!0)}function Gu(r){return(r||Ea===void 0)&&(Ea=!!Kg(Bu.LocalStorage)),Ea}function Gg(r,e){var t=jb();if(t!==null)try{return t.getItem(e)}catch(n){Ea=!1,X(r,2,1,"Browser failed read of local storage. "+_t(n),{exception:fe(n)})}return null}function Wg(r,e,t){var n=jb();if(n!==null)try{return n.setItem(e,t),!0}catch(i){Ea=!1,X(r,2,3,"Browser failed write to local storage. "+_t(i),{exception:fe(i)})}return!1}function WN(r,e){var t=jb();if(t!==null)try{return t[Ag](e),!0}catch(n){Ea=!1,X(r,2,5,"Browser failed removal of local storage item. "+_t(n),{exception:fe(n)})}return!1}function ll(r){return(r||Ca===void 0)&&(Ca=!!Kg(Bu.SessionStorage)),Ca}function zN(){var r=[];return ll()&&me(Pe("sessionStorage"),function(e){r[_s](e)}),r}function zg(r,e){var t=qb();if(t!==null)try{return t.getItem(e)}catch(n){Ca=!1,X(r,2,2,"Browser failed read of session storage. "+_t(n),{exception:fe(n)})}return null}function $g(r,e,t){var n=qb();if(n!==null)try{return n.setItem(e,t),!0}catch(i){Ca=!1,X(r,2,4,"Browser failed write to session storage. "+_t(i),{exception:fe(i)})}return!1}function Jg(r,e){var t=qb();if(t!==null)try{return t[Ag](e),!0}catch(n){Ca=!1,X(r,2,6,"Browser failed removal of session storage item. "+_t(n),{exception:fe(n)})}return!1}var Ea,Ca,KN,Hb=E(()=>{st();Vb();Er();Ea=void 0,Ca=void 0,KN=""});var YU,$N,JN=E(()=>{st();Ne();Hb();Er();YU="appInsightsThrottle",$N=(function(){function r(e,t){var n=this,i,o,s,a,c,l,u,d=!1,f=!1;m(),n._getDbgPlgTargets=function(){return[u]},n.getConfig=function(){return s},n.canThrottle=function(T){var R=re(T),B=S(T);return C(B,i,R)},n.isTriggered=function(T){return Q(T)},n.isReady=function(){return d},n.flush=function(T){try{var R=ie(T);if(R&&R[we]>0){var B=R.slice(0);return u[T]=[],V(B,function(x){v(x.msgID,x[qi],x.severity,!1)}),!0}}catch{}return!1},n.flushAll=function(){try{if(u){var T=!0;return me(u,function(R){var B=n.flush(parseInt(R));T=T&&B}),T}}catch{}return!1},n.onReadyState=function(T,R){return R===void 0&&(R=!0),d=z(T)?!0:T,d&&R?n.flushAll():null},n.sendMessage=function(T,R,B){return v(T,R,B,!0)};function v(T,R,B,x){if(d){var g=G(T);if(!g)return;var D=S(T),I=re(T),Z=C(D,i,I),M=!1,w=0,Le=Q(T);try{Z&&!Le?(w=Math.min(D.limit.maxSendNumber,I[_a]+1),I[_a]=0,M=!0,c[T]=!0,I[Og]=new Date):(c[T]=Z,I[_a]+=1);var je=_(T);H(o,je,I);for(var pt=0;pt<w;pt++)$(T,o,R,B)}catch{}return{isThrottled:M,throttleNum:w}}else if(x){var vt=ie(T);vt[_s]({msgID:T,message:R,severity:B})}return null}function m(){o=Mi(e),c={},a={},u={},s={},y(109),l=li(t)?t:"",e.addUnloadHook(ur(e.config,function(T){var R=T.cfg;i=Gu();var B=R.throttleMgrCfg||{};me(B,function(x,g){y(parseInt(x),g)})}))}function S(T){return s[T]||s[109]}function y(T,R){var B,x;try{var g=R||{},D={};D[kg]=!!g[kg];var I=g[Lg]||{};f=I?.daysOfMonth&&I?.daysOfMonth[we]>0,D[Lg]=N(I);var Z={samplingRate:((B=g.limit)===null||B===void 0?void 0:B.samplingRate)||100,maxSendNumber:((x=g.limit)===null||x===void 0?void 0:x.maxSendNumber)||1};D.limit=Z,s[T]=D}catch{}}function N(T){T=T||{};var R=T?.monthInterval,B=T?.dayInterval;return z(R)&&z(B)&&(T.monthInterval=3,f||(T[Nb]=[28],f=!0)),T={monthInterval:T?.monthInterval,dayInterval:T?.dayInterval,daysOfMonth:T?.daysOfMonth},T}function C(T,R,B){if(T&&!T[kg]&&R&&li(B)){var x=j(),g=B[Fg],D=T[Lg],I=1;if(D?.monthInterval){var Z=(x.getUTCFullYear()-g.getUTCFullYear())*12+x.getUTCMonth()-g.getUTCMonth();I=oe(D.monthInterval,0,Z)}var M=1;if(f)M=Ze(D[Nb],x[Mg]());else if(D?.dayInterval){var w=Math.floor((x.getTime()-g.getTime())/864e5);M=oe(D.dayInterval,0,w)}return I>=0&&M>=0}return!1}function _(T,R){var B=li(R)?R:"";return T?YU+B+"-"+T:null}function A(T){try{if(T){var R=new Date;return T.getUTCFullYear()===R.getUTCFullYear()&&T.getUTCMonth()===R.getUTCMonth()&&T[Mg]()===R[Mg]()}}catch{}return!1}function k(T,R,B){try{var x={date:j(),count:0};if(T){var g=JSON.parse(T),D={date:j(g[Fg])||x[Fg],count:g[_a]||x[_a],preTriggerDate:g.preTriggerDate?j(g[Og]):void 0};return D}else return H(R,B,x),x}catch{}return null}function j(T){try{if(T){var R=new Date(T);if(!isNaN(R.getDate()))return R}else return new Date}catch{}return null}function H(T,R,B){try{return Wg(T,R,nt(JSON[tl](B)))}catch{}return!1}function oe(T,R,B){return T<=0?1:B>=R&&(B-R)%T==0?Math.floor((B-R)/T)+1:-1}function $(T,R,B,x){X(R,x||1,T,B)}function G(T){try{var R=S(T);return bf(1e6)<=R.limit.samplingRate}catch{}return!1}function re(T){try{var R=a[T];if(!R){var B=_(T,l);R=k(Gg(o,B),o,B),a[T]=R}return a[T]}catch{}return null}function Q(T){var R=c[T];if(z(R)){R=!1;var B=re(T);B&&(R=A(B[Og])),c[T]=R}return c[T]}function ie(T){return u=u||{},z(u[T])&&(u[T]=[]),u[T]}}return r})()});function ul(r){if(!r)return{};var e=r[ys](VU),t=ef(e,function(i,o){var s=o[ys](jU);if(s[we]===2){var a=s[0][xo](),c=s[1];i[a]=c}return i},{});if(Vr(t)[we]>0){if(t.endpointsuffix){var n=t.location?t.location+".":"";t[Sa]=t[Sa]||"https://"+n+"dc."+t.endpointsuffix}t[Sa]=t[Sa]||ya,Sc(t[Sa],"/")&&(t[Sa]=t[Sa].slice(0,-1))}return t}var VU,jU,XN,QN=E(()=>{st();fi();Er();VU=";",jU="=";XN={parse:ul}});var Xg,ZN=E(()=>{st();fi();Er();vi();Xg=(function(){function r(e,t,n){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[fr]=ut(e,n)||br,o.data=t,o.time=Wn(new Date),o.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return r})()});var Io,eR=E(()=>{fi();Er();vi();Io=(function(){function r(e,t,n,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[fr]=ut(e,t)||br,o[Kr]=rn(e,n),o[tn]=nn(e,i)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Event",r.dataType="EventData",r})()});function Wb(r,e){var t=r;return t&&!Oe(t)&&(JSON&&JSON[tl]?(t=JSON[tl](r),e&&(!t||t==="{}")&&(Ee(r[Ss])?t=r[Ss]():t=""+r)):t=""+r+" - (Missing JSON.stringify)"),t||""}function oR(r,e){var t=r;return r&&(t&&!Oe(t)&&(t=r[Gb]||r[iR]||t),t&&!Oe(t)&&(t=Wb(t,!0)),r.filename&&(t=t+" @"+(r.filename||"")+":"+(r.lineno||"?")+":"+(r.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&Tn(t||"",e)===-1&&(t=e+": "+t),t||""}function HU(r){try{if(Ut(r))return"hasFullStack"in r&&"typeName"in r}catch{}return!1}function KU(r){try{if(Ut(r))return"ver"in r&&"exceptions"in r&&"properties"in r}catch{}return!1}function rR(r){return r&&r.src&&Oe(r.src)&&r.obj&&de(r.obj)}function dl(r){var e=r||"";Oe(e)||(Oe(e[kn])?e=e[kn]:e=""+e);var t=e[ys](`
`);return{src:e,obj:t}}function BU(r){for(var e=[],t=r[ys](`
`),n=0;n<t[we];n++){var i=t[n];t[n+1]&&(i+="@"+t[n+1],n++),e[_s](i)}return{src:r,obj:e}}function sR(r){var e=null;if(r)try{if(r[kn])e=dl(r[kn]);else if(r[Wu]&&r[Wu][kn])e=dl(r[Wu][kn]);else if(r.exception&&r.exception[kn])e=dl(r.exception[kn]);else if(rR(r))e=r;else if(rR(r[Bb]))e=r[Bb];else if(cr()&&cr().opera&&r[Gb])e=BU(r[qi]);else if(r.reason&&r.reason[kn])e=dl(r.reason[kn]);else if(Oe(r))e=dl(r);else{var t=r[Gb]||r[iR]||"";Oe(r[tR])&&(t&&(t+=`
`),t+=" from "+r[tR]),t&&(e=dl(t))}}catch(n){e=dl(n)}return e||{src:"",obj:null}}function GU(r){var e="";return r&&(r.obj?V(r.obj,function(t){e+=t+`
`}):e=r.src||""),e}function WU(r){var e,t=r.obj;if(t&&t[we]>0){e=[];var n=0,i=0;V(t,function(m){var S=m[Ss]();if(zb.regex.test(S)){var y=new zb(S,n++);i+=y[nl],e[_s](y)}});var o=32*1024;if(i>o)for(var s=0,a=e[we]-1,c=0,l=s,u=a;s<a;){var d=e[s][nl],f=e[a][nl];if(c+=d+f,c>o){var v=u-l+1;e.splice(l,v);break}l=s,u=a,s++,a--}}return e}function Qg(r){var e="";if(r&&(e=r.typeName||r[fr]||"",!e))try{var t=/function (.{1,200})\(/,n=t.exec(r.constructor[Ss]());e=n&&n[we]>1?n[1]:""}catch{}return e}function Kb(r){if(r)try{if(!Oe(r)){var e=Qg(r),t=Wb(r,!1);return(!t||t==="{}")&&(r[Wu]&&(r=r[Wu],e=Qg(r)),t=Wb(r,!0)),Tn(t,e)!==0&&e!=="String"?e+":"+t:t}}catch{}return""+(r||"")}var qU,Wu,kn,Bb,tR,Gb,iR,Pa,nR,zb,aR=E(()=>{En();st();Ne();fi();Er();vi();qU="<no_method>",Wu="error",kn="stack",Bb="stackDetails",tR="errorSrc",Gb="message",iR="description";Pa=(function(){function r(e,t,n,i,o,s){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,KU(t)?(a[rl]=t[rl]||[],a[Kr]=t[Kr],a[tn]=t[tn],t[il]&&(a[il]=t[il]),t.id&&(a.id=t.id,t[Kr].id=t.id),t[Ug]&&(a[Ug]=t[Ug]),z(t[Yg])||(a[Yg]=t[Yg])):(n||(n={}),s&&(n.id=s),a[rl]=[new nR(e,t,n)],a[Kr]=rn(e,n),a[tn]=nn(e,i),o&&(a[il]=o),s&&(a.id=s))}return r.CreateAutoException=function(e,t,n,i,o,s,a,c){var l,u=Qg(o||s||e);return l={},l[qi]=oR(e,u),l.url=t,l.lineNumber=n,l.columnNumber=i,l.error=Kb(o||s||e),l.evt=Kb(s||e),l[Do]=u,l.stackDetails=sR(a||o||s),l.errorSrc=c,l},r.CreateFromInterface=function(e,t,n,i){var o=t[rl]&&Xo(t[rl],function(a){return nR[wb](e,a)}),s=new r(e,si(si({},t),{exceptions:o}),n,i);return s},r.prototype.toInterface=function(){var e,t=this,n=t.exceptions,i=t.properties,o=t.measurements,s=t.severityLevel,a=t.problemGroup,c=t.id,l=t.isManual,u=n instanceof Array&&Xo(n,function(d){return d.toInterface()})||void 0;return e={ver:"4.0"},e[rl]=u,e.severityLevel=s,e.properties=i,e.measurements=o,e.problemGroup=a,e.id=c,e.isManual=l,e},r.CreateSimpleException=function(e,t,n,i,o,s){var a;return{exceptions:[(a={},a[fp]=!0,a.message=e,a.stack=o,a.typeName=t,a)]}},r.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",r.dataType="ExceptionData",r.formatError=Kb,r})(),nR=(function(){function r(e,t,n){this.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2};var i=this;if(HU(t))i[Do]=t[Do],i[qi]=t[qi],i[kn]=t[kn],i[pi]=t[pi]||[],i[fp]=t[fp];else{var o=t,s=o&&o.evt;mc(o)||(o=o[Wu]||s||o),i[Do]=ut(e,Qg(o))||br,i[qi]=Ku(e,oR(t||o,i[Do]))||br;var a=t[Bb]||sR(t);i[pi]=WU(a),de(i[pi])&&Xo(i[pi],function(c){c[ol]=ut(e,c[ol]),c[Ta]=ut(e,c[Ta])}),i[kn]=jg(e,GU(a)),i.hasFullStack=de(i.parsedStack)&&i.parsedStack[we]>0,n&&(n[Do]=n[Do]||i[Do])}}return r.prototype.toInterface=function(){var e,t=this,n=t[pi]instanceof Array&&Xo(t[pi],function(o){return o.toInterface()}),i=(e={id:t.id,outerId:t.outerId,typeName:t[Do],message:t[qi],hasFullStack:t[fp],stack:t[kn]},e[pi]=n||void 0,e);return i},r.CreateFromInterface=function(e,t){var n=t[pi]instanceof Array&&Xo(t[pi],function(o){return zb[wb](o)})||t[pi],i=new r(e,si(si({},t),{parsedStack:n}));return i},r})(),zb=(function(){function r(e,t){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var n=this;if(n[nl]=0,typeof e=="string"){var i=e;n[pp]=t,n[sl]=qU,n[ol]=nt(i),n[Ta]="",n[Hu]=0;var o=i.match(r.regex);o&&o[we]>=5&&(n[sl]=nt(o[2])||n[sl],n[Ta]=nt(o[4]),n[Hu]=parseInt(o[5])||0)}else n[pp]=e[pp],n[sl]=e[sl],n[ol]=e[ol],n[Ta]=e[Ta],n[Hu]=e[Hu],n[nl]=0;n.sizeInBytes+=n.method[we],n.sizeInBytes+=n.fileName[we],n.sizeInBytes+=n.assembly[we],n[nl]+=r.baseSize,n.sizeInBytes+=n.level.toString()[we],n.sizeInBytes+=n.line.toString()[we]}return r.CreateFromInterface=function(e){return new r(e,null)},r.prototype.toInterface=function(){var e=this;return{level:e[pp],method:e[sl],assembly:e[ol],fileName:e[Ta],line:e[Hu]}},r.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,r.baseSize=58,r})()});var cR,lR=E(()=>{cR=(function(){function r(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return r})()});var No,uR=E(()=>{fi();Er();lR();vi();No=(function(){function r(e,t,n,i,o,s,a,c,l){this.aiDataContract={ver:1,metrics:1,properties:0};var u=this;u.ver=2;var d=new cR;d[_a]=i>0?i:void 0,d.max=isNaN(s)||s===null?void 0:s,d.min=isNaN(o)||o===null?void 0:o,d[fr]=ut(e,t)||br,d.value=n,d.stdDev=isNaN(a)||a===null?void 0:a,u.metrics=[d],u[Kr]=rn(e,c),u[tn]=nn(e,l)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",r.dataType="MetricData",r})()});function dR(r,e){return e===void 0&&(e=!1),r==null?e:r.toString()[xo]()==="true"}function zu(r){(isNaN(r)||r<0)&&(r=0),r=Math.round(r);var e=gp+r%1e3,t=gp+Math.floor(r/1e3)%60,n=gp+Math.floor(r/(1e3*60))%60,i=gp+Math.floor(r/(1e3*60*60))%24,o=Math.floor(r/(1e3*60*60*24));return e=e[we]===1?"00"+e:e[we]===2?"0"+e:e,t=t[we]<2?"0"+t:t,n=n[we]<2?"0"+n:n,i=i[we]<2?"0"+i:i,(o>0?o+".":gp)+i+":"+n+":"+t+"."+e}function fR(r,e){var t=null;return V(r,function(n){if(n.identifier===e)return t=n,-1}),t}function pR(r,e,t,n,i){return!i&&Oe(r)&&(r==="Script error."||r==="Script error")}var gp,Zg=E(()=>{st();Er();gp=""});var xa,vR=E(()=>{fi();Zg();Er();vi();xa=(function(){function r(e,t,n,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var c=this;c.ver=2,c.id=qg(e,a),c.url=ba(e,n),c[fr]=ut(e,t)||br,isNaN(i)||(c[al]=zu(i)),c[Kr]=rn(e,o),c[tn]=nn(e,s)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",r.dataType="PageviewData",r})()});var Da,mR=E(()=>{Zg();Yb();Er();vi();Da=(function(){function r(e,t,n,i,o,s,a,c,l,u,d,f){l===void 0&&(l="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var v=this;v.ver=2,v.id=t,v[al]=zu(o),v.success=s,v.resultCode=a+"",v.type=ut(e,l);var m=UN(e,n,c,i);v.data=ba(e,i)||m.data,v.target=ut(e,m.target),u&&(v.target="".concat(v.target," | ").concat(u)),v[fr]=ut(e,m[fr]),v[Kr]=rn(e,d),v[tn]=nn(e,f)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",r.dataType="RemoteDependencyData",r})()});var Ia,gR=E(()=>{fi();Er();vi();Ia=(function(){function r(e,t,n,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var s=this;s.ver=2,t=t||br,s[qi]=Ku(e,t),s[Kr]=rn(e,i),s[tn]=nn(e,o),n&&(s[il]=n)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Message",r.dataType="MessageData",r})()});var Na,hR=E(()=>{fi();Er();vi();Na=(function(){function r(e,t,n,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var c=this;c.ver=2,c.url=ba(e,n),c[fr]=ut(e,t)||br,c[Kr]=rn(e,o),c[tn]=nn(e,s),a&&(c.domProcessing=a.domProcessing,c[al]=a[al],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c[Ab]=a[Ab],c.sentRequest=a.sentRequest)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",r.dataType="PageviewPerformanceData",r})()});var Ro,yR=E(()=>{Ro=(function(){function r(e,t){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=t}return r})()});var eh,SR=E(()=>{st();eh=$t({Verbose:0,Information:1,Warning:2,Error:3,Critical:4})});var _R,TR=E(()=>{st();Er();_R=(function(){function r(){}return r.getConfig=function(e,t,n,i){i===void 0&&(i=!1);var o;return n&&e[dp]&&e[dp][n]&&!z(e[dp][n][t])?o=e[dp][n][t]:o=e[t],z(o)?i:o},r})()});function wa(r){var e="ai."+r+".";return function(t){return e+t}}var hp,Cr,th,$u,$b,Ra,fl,yp,Ju,Jb=E(()=>{En();st();hp=wa("application"),Cr=wa("device"),th=wa("location"),$u=wa("operation"),$b=wa("session"),Ra=wa("user"),fl=wa("cloud"),yp=wa("internal"),Ju=(function(r){bn(e,r);function e(){return r.call(this)||this}return e})(z_({applicationVersion:hp("ver"),applicationBuild:hp("build"),applicationTypeId:hp("typeId"),applicationId:hp("applicationId"),applicationLayer:hp("layer"),deviceId:Cr("id"),deviceIp:Cr("ip"),deviceLanguage:Cr("language"),deviceLocale:Cr("locale"),deviceModel:Cr("model"),deviceFriendlyName:Cr("friendlyName"),deviceNetwork:Cr("network"),deviceNetworkName:Cr("networkName"),deviceOEMName:Cr("oemName"),deviceOS:Cr("os"),deviceOSVersion:Cr("osVersion"),deviceRoleInstance:Cr("roleInstance"),deviceRoleName:Cr("roleName"),deviceScreenResolution:Cr("screenResolution"),deviceType:Cr("type"),deviceMachineName:Cr("machineName"),deviceVMName:Cr("vmName"),deviceBrowser:Cr("browser"),deviceBrowserVersion:Cr("browserVersion"),locationIp:th("ip"),locationCountry:th("country"),locationProvince:th("province"),locationCity:th("city"),operationId:$u("id"),operationName:$u("name"),operationParentId:$u("parentId"),operationRootId:$u("rootId"),operationSyntheticSource:$u("syntheticSource"),operationCorrelationVector:$u("correlationVector"),sessionId:$b("id"),sessionIsFirst:$b("isFirst"),sessionIsNew:$b("isNew"),userAccountAcquisitionDate:Ra("accountAcquisitionDate"),userAccountId:Ra("accountId"),userAgent:Ra("userAgent"),userId:Ra("id"),userStoreRegion:Ra("storeRegion"),userAuthUserId:Ra("authUserId"),userAnonymousUserAcquisitionDate:Ra("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Ra("authUserAcquisitionDate"),cloudName:fl("name"),cloudRole:fl("role"),cloudRoleVer:fl("roleVer"),cloudRoleInstance:fl("roleInstance"),cloudEnvironment:fl("environment"),cloudLocation:fl("location"),cloudDeploymentUnit:fl("deploymentUnit"),internalNodeName:yp("nodeName"),internalSdkVersion:yp("sdkVersion"),internalAgentVersion:yp("agentVersion"),internalSnippet:yp("snippet"),internalSdkSrc:yp("sdkSrc")}))});function Xb(r,e,t,n,i,o){var s;t=ut(n,t)||br,(z(r)||z(e)||z(t))&&Wt("Input doesn't contain all required fields");var a="";r[wg]&&(a=r[wg],delete r[wg]);var c=(s={},s[fr]=t,s.time=Wn(new Date),s.iKey=a,s.ext=o||{},s.tags=[],s.data={},s.baseType=e,s.baseData=r,s);return z(i)||me(i,function(l,u){c.data[l]=u}),c}var bR,ER=E(()=>{st();fi();vi();Er();bR=(function(){function r(){}return r.create=Xb,r})()});var CR,nr,PR=E(()=>{Jb();CR={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},nr=new Ju});function xR(r){var e=null;if(Ee(Event))e=new Event(r);else{var t=zt();t&&t.createEvent&&(e=t.createEvent("Event"),e.initEvent(r,!0,!0))}return e}var DR=E(()=>{st()});function IR(r,e){ms(r,null,null,e)}function rh(r){var e=zt(),t=Sr(),n=!1,i=[],o=1;t&&!z(t.onLine)&&!t.onLine&&(o=2);var s=0,a=f(),c=$n(Hr("OfflineListener"),r);try{if(u(cr())&&(n=!0),e){var l=e.body||e;l.ononline&&u(l)&&(n=!0)}}catch{n=!1}function u(_){var A=!1;return _&&(A=yo(_,"online",S,c),A&&yo(_,"offline",y,c)),A}function d(){return a}function f(){return!(s===2||o===2)}function v(){var _=f();a!==_&&(a=_,V(i,function(A){var k={isOnline:a,rState:o,uState:s};try{A(k)}catch{}}))}function m(_){s=_,v()}function S(){o=1,v()}function y(){o=2,v()}function N(){var _=cr();if(_&&n){if(IR(_,c),e){var A=e.body||e;Fe(A.ononline)||IR(A,c)}n=!1}}function C(_){return i[_s](_),{rm:function(){var A=i.indexOf(_);if(A>-1)return i.splice(A,1)}}}return{isOnline:d,isListening:function(){return n},unload:N,addListener:C,setOnlineState:m}}var NR=E(()=>{st();Er()});var RR={};Be(RR,{AnalyticsPluginIdentifier:()=>$U,BreezeChannelIdentifier:()=>Qb,ConfigurationManager:()=>_R,ConnectionStringParser:()=>XN,ContextTagKeys:()=>Ju,CtxTagKeys:()=>nr,DEFAULT_BREEZE_ENDPOINT:()=>ya,DEFAULT_BREEZE_PATH:()=>ji,Data:()=>Ro,DisabledPropertyName:()=>IN,DistributedTracingModes:()=>qN,Envelope:()=>Xg,Event:()=>Io,EventPersistence:()=>HN,Exception:()=>Pa,Extensions:()=>CR,HttpMethod:()=>up,Metric:()=>No,PageView:()=>xa,PageViewPerformance:()=>Na,ProcessLegacy:()=>ju,PropertiesPluginIdentifier:()=>zU,RemoteDependencyData:()=>Da,RequestHeaders:()=>el,SampleRate:()=>Vu,SeverityLevel:()=>eh,TelemetryItemCreator:()=>bR,ThrottleMgr:()=>$N,Trace:()=>Ia,correlationIdCanIncludeCorrelationHeader:()=>FN,correlationIdGetCorrelationContext:()=>MN,correlationIdGetCorrelationContextValue:()=>Ub,correlationIdGetPrefix:()=>LN,correlationIdSetPrefix:()=>kN,createDistributedTraceContextFromTrace:()=>jN,createDomEvent:()=>xR,createOfflineListener:()=>rh,createTelemetryItem:()=>Xb,createTraceParent:()=>Lf,dataSanitizeException:()=>jg,dataSanitizeId:()=>qg,dataSanitizeInput:()=>Hg,dataSanitizeKey:()=>Ob,dataSanitizeKeyAndAddUniqueness:()=>Vg,dataSanitizeMeasurements:()=>nn,dataSanitizeMessage:()=>Ku,dataSanitizeProperties:()=>rn,dataSanitizeString:()=>ut,dataSanitizeUrl:()=>ba,dateTimeUtilsDuration:()=>VN,dateTimeUtilsNow:()=>YN,dsPadNumber:()=>kb,findAllScripts:()=>kT,findW3cTraceParent:()=>Uf,formatTraceParent:()=>Mf,getExtensionByName:()=>fR,isBeaconApiSupported:()=>wn,isCrossOriginError:()=>pR,isInternalApplicationInsightsEndpoint:()=>mp,isSampledFlag:()=>Ff,isValidSpanId:()=>go,isValidTraceId:()=>mo,isValidTraceParent:()=>bu,msToTimeSpan:()=>zu,parseConnectionString:()=>ul,parseTraceParent:()=>Yc,strNotSpecified:()=>br,stringToBoolOrDefault:()=>dR,urlGetAbsoluteUrl:()=>wN,urlGetCompleteUrl:()=>ON,urlGetPathName:()=>AN,urlParseFullHost:()=>vp,urlParseHost:()=>Lb,urlParseUrl:()=>cl,utlCanUseLocalStorage:()=>Gu,utlCanUseSessionStorage:()=>ll,utlDisableStorage:()=>BN,utlEnableStorage:()=>GN,utlGetLocalStorage:()=>Gg,utlGetSessionStorage:()=>zg,utlGetSessionStorageKeys:()=>zN,utlRemoveSessionStorage:()=>Jg,utlRemoveStorage:()=>WN,utlSetLocalStorage:()=>Wg,utlSetSessionStorage:()=>$g,utlSetStoragePrefix:()=>Bg});var zU,Qb,$U,Ts=E(()=>{Yb();JN();QN();Ib();fi();ZN();eR();aR();uR();vR();mR();gR();hR();yR();SR();TR();Jb();vi();ER();PR();Vb();Zg();st();DR();Hb();Fb();NR();zU="AppInsightsPropertiesPlugin",Qb="AppInsightsChannelPlugin",$U="ApplicationInsightsAnalytics"});var eE=le(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});nh.TelemetryUtil=void 0;var Zb=class r{static applyReplacements(e,t){for(let n of Object.keys(e))for(let i of t)i.lookup.test(n)&&(i.replacementString!==void 0?e[n]=i.replacementString:delete e[n])}static shouldUseOneDataSystemSDK(e){return e.length===74&&e[32]==="-"&&e[41]==="-"&&e[46]==="-"&&e[51]==="-"&&e[56]==="-"&&e[69]==="-"}static getAdditionalCommonProperties(e){return{"common.os":e.platform,"common.nodeArch":e.architecture,"common.platformversion":(e.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),"common.telemetryclientversion":"0.9.8"}}static getInstance(){return r._instance||(r._instance=new r),r._instance}};nh.TelemetryUtil=Zb});var Aa,wR=E(()=>{Aa="duration"});var pr,ih,Br,wo,pl,Ue,Oa,ka,mi,La,bs,Xu,Es,Cs,oh,gi,Qu,Sp,Fa,_p,Zu,vl,Tp,sh,Ps,Ma,ed,td,Gr,ah,rd,nd,id,ch,tE,lh,uh,rE,dh,nE,xs,iE,oE,sE,bp,aE,cE,lE,od,Ua,fh,Ep,ph,vh,mh,gh,sd,uE,hh,AR,Ya=E(()=>{pr="tags",ih="deviceType",Br="data",wo="name",pl="traceID",Ue="length",Oa="stringify",ka="measurements",mi="dataType",La="envelopeType",bs="toString",Xu="_get",Es="enqueue",Cs="count",oh="eventsLimitInMem",gi="push",Qu="item",Sp="emitLineDelimitedJson",Fa="clear",_p="createNew",Zu="markAsSent",vl="clearSent",Tp="bufferOverride",sh="BUFFER_KEY",Ps="SENT_BUFFER_KEY",Ma="concat",ed="MAX_BUFFER_SIZE",td="triggerSend",Gr="diagLog",ah="initialize",rd="_sender",nd="endpointUrl",id="instrumentationKey",ch="customHeaders",tE="maxBatchSizeInBytes",lh="onunloadDisableBeacon",uh="isBeaconApiDisabled",rE="alwaysUseXhrOverride",dh="disableXhr",nE="enableSessionStorageBuffer",xs="_buffer",iE="onunloadDisableFetch",oE="disableSendBeaconSplit",sE="enableSendPromise",bp="getSenderInst",aE="unloadTransports",cE="convertUndefined",lE="maxBatchInterval",od="serialize",Ua="_onError",fh="_onPartialSuccess",Ep="_onSuccess",ph="itemsReceived",vh="itemsAccepted",mh="oriPayload",gh="baseType",sd="sampleRate",uE="eventsSendRequest",hh="getSamplingScore",AR="getHashCodeScore"});function ir(r,e,t){return ui(r,e,t,Di)}function JU(r,e,t){var n=t[pr]=t[pr]||{},i=e.ext=e.ext||{},o=e[pr]=e[pr]||[],s=i.user;s&&(ir(n,nr.userAuthUserId,s.authId),ir(n,nr.userId,s.id||s.localId));var a=i.app;a&&ir(n,nr.sessionId,a.sesId);var c=i.device;c&&(ir(n,nr.deviceId,c.id||c.localId),ir(n,nr[ih],c.deviceClass),ir(n,nr.deviceIp,c.ip),ir(n,nr.deviceModel,c.model),ir(n,nr[ih],c[ih]));var l=e.ext.web;if(l){ir(n,nr.deviceLanguage,l.browserLang),ir(n,nr.deviceBrowserVersion,l.browserVer),ir(n,nr.deviceBrowser,l.browser);var u=t[Br]=t[Br]||{},d=u[Ot]=u[Ot]||{},f=d[Ar]=d[Ar]||{};ir(f,"domain",l.domain),ir(f,"isManual",l.isManual?OR:null),ir(f,"screenRes",l.screenRes),ir(f,"userConsent",l.userConsent?OR:null)}var v=i.os;v&&(ir(n,nr.deviceOS,v[wo]),ir(n,nr.deviceOSVersion,v.osVer));var m=i.trace;m&&(ir(n,nr.operationParentId,m.parentID),ir(n,nr.operationName,ut(r,m[wo])),ir(n,nr.operationId,m[pl]));for(var S={},y=o[Ue]-1;y>=0;y--){var N=o[y];me(N,function(_,A){S[_]=A}),o.splice(y,1)}me(o,function(_,A){S[_]=A});var C=si(si({},n),S);C[nr.internalSdkVersion]||(C[nr.internalSdkVersion]=ut(r,"javascript:".concat(XU.Version),64)),t[pr]=Rn(C)}function Va(r,e,t){z(r)||me(r,function(n,i){Yr(i)?t[n]=i:Oe(i)?e[n]=i:fo()&&(e[n]=qr()[Oa](i))})}function ml(r,e){z(r)||me(r,function(t,n){r[t]=n||e})}function gl(r,e,t,n){var i=new Xg(r,n,e);ir(i,"sampleRate",t[Vu]),(t[Ot]||{}).startTime&&(i.time=Wn(t[Ot].startTime)),i.iKey=t.iKey;var o=t.iKey.replace(/-/g,"");return i[wo]=i[wo].replace("{0}",o),JU(r,t,i),t[pr]=t[pr]||[],Rn(i)}function hl(r,e){z(e[Ot])&&X(r,1,46,"telemetryItem.baseData cannot be null.")}function kR(r,e,t){hl(r,e);var n=e[Ot][ka]||{},i=e[Ot][Ar]||{};Va(e[Br],i,n),z(t)||ml(i,t);var o=e[Ot];if(z(o))return fn(r,"Invalid input for dependency data"),null;var s=o[Ar]&&o[Ar][up]?o[Ar][up]:"GET",a=new Da(r,o.id,o.target,o[wo],o[Aa],o.success,o.responseCode,s,o.type,o.correlationContext,i,n),c=new Ro(Da[mi],a);return gl(r,Da[La],e,c)}function fE(r,e,t){hl(r,e);var n={},i={};e[dE]!==Io[mi]&&(n.baseTypeSource=e[dE]),e[dE]===Io[mi]?(n=e[Ot][Ar]||{},i=e[Ot][ka]||{}):e[Ot]&&Va(e[Ot],n,i),Va(e[Br],n,i),z(t)||ml(n,t);var o=e[Ot][wo],s=new Io(r,o,n,i),a=new Ro(Io[mi],s);return gl(r,Io[La],e,a)}function LR(r,e,t){hl(r,e);var n=e[Ot][ka]||{},i=e[Ot][Ar]||{};Va(e[Br],i,n),z(t)||ml(i,t);var o=e[Ot],s=Pa.CreateFromInterface(r,o,i,n),a=new Ro(Pa[mi],s);return gl(r,Pa[La],e,a)}function FR(r,e,t){hl(r,e);var n=e[Ot],i=n[Ar]||{},o=n[ka]||{};Va(e[Br],i,o),z(t)||ml(i,t);var s=new No(r,n[wo],n.average,n.sampleCount,n.min,n.max,n.stdDev,i,o),a=new Ro(No[mi],s);return gl(r,No[La],e,a)}function MR(r,e,t){hl(r,e);var n,i=e[Ot];!z(i)&&!z(i[Ar])&&!z(i[Ar][Aa])?(n=i[Ar][Aa],delete i[Ar][Aa]):!z(e[Br])&&!z(e[Br][Aa])&&(n=e[Br][Aa],delete e[Br][Aa]);var o=e[Ot],s;((e.ext||{}).trace||{})[pl]&&(s=e.ext.trace[pl]);var a=o.id||s,c=o[wo],l=o.uri,u=o[Ar]||{},d=o[ka]||{};if(z(o.refUri)||(u.refUri=o.refUri),z(o.pageType)||(u.pageType=o.pageType),z(o.isLoggedIn)||(u.isLoggedIn=o.isLoggedIn[bs]()),!z(o[Ar])){var f=o[Ar];me(f,function(S,y){u[S]=y})}Va(e[Br],u,d),z(t)||ml(u,t);var v=new xa(r,c,l,n,u,d,a),m=new Ro(xa[mi],v);return gl(r,xa[La],e,m)}function UR(r,e,t){hl(r,e);var n=e[Ot],i=n[wo],o=n.uri||n.url,s=n[Ar]||{},a=n[ka]||{};Va(e[Br],s,a),z(t)||ml(s,t);var c=new Na(r,i,o,void 0,s,a,n),l=new Ro(Na[mi],c);return gl(r,Na[La],e,l)}function YR(r,e,t){hl(r,e);var n=e[Ot].message,i=e[Ot].severityLevel,o=e[Ot][Ar]||{},s=e[Ot][ka]||{};Va(e[Br],o,s),z(t)||ml(o,t);var a=new Ia(r,n,i,o,s),c=new Ro(Ia[mi],a);return gl(r,Ia[La],e,c)}var dE,Ot,Ar,OR,XU,VR=E(()=>{En();Ts();st();wR();Ya();dE="baseType",Ot="baseData",Ar="properties",OR="true";XU={Version:"3.3.4"}});var jR,yh,QU,pE,qR=E(()=>{En();Nr();Ts();st();Ya();jR=(function(){function r(e,t){var n=[],i=!1,o=t.maxRetryCnt;this[Xu]=function(){return n},this._set=function(s){return n=s,n},Ke(r,this,function(s){s[Es]=function(a){if(s[Cs]()>=t[oh]){i||(X(e,2,105,"Maximum in-memory buffer size reached: "+s[Cs](),!0),i=!0);return}a.cnt=a.cnt||0,!(!z(o)&&a.cnt>o)&&n[gi](a)},s[Cs]=function(){return n[Ue]},s.size=function(){for(var a=n[Ue],c=0;c<n[Ue];c++)a+=n[c].item[Ue];return t[Sp]||(a+=2),a},s[Fa]=function(){n=[],i=!1},s.getItems=function(){return n.slice(0)},s.batchPayloads=function(a){if(a&&a[Ue]>0){var c=[];V(a,function(u){c[gi](u[Qu])});var l=t[Sp]?c.join(`
`):"["+c.join(",")+"]";return l}return null},s[_p]=function(a,c,l){var u=n.slice(0);a=a||e,c=c||{};var d=l?new pE(a,c):new yh(a,c);return V(u,function(f){d[Es](f)}),d}})}return r.__ieDyn=1,r})(),yh=(function(r){bn(e,r);function e(t,n){var i=r.call(this,t,n)||this;return Ke(e,i,function(o,s){o[Zu]=function(a){s[Fa]()},o[vl]=function(a){}}),i}return e.__ieDyn=1,e})(jR),QU=["AI_buffer","AI_sentBuffer"],pE=(function(r){bn(e,r);function e(n,i){var o=r.call(this,n,i)||this,s=!1,a=i?.namePrefix,c=i[Tp]||{getItem:zg,setItem:$g},l=c.getItem,u=c.setItem,d=i.maxRetryCnt;return Ke(e,o,function(f,v){var m=A(e[sh]),S=A(e[Ps]),y=H(),N=S[Ma](y),C=f._set(m[Ma](N));C[Ue]>e[ed]&&(C[Ue]=e[ed]),j(e[Ps],[]),j(e[sh],C),f[Es]=function($){if(f[Cs]()>=e[ed]){s||(X(n,2,67,"Maximum buffer size reached: "+f[Cs](),!0),s=!0);return}$.cnt=$.cnt||0,!(!z(d)&&$.cnt>d)&&(v[Es]($),j(e.BUFFER_KEY,f[Xu]()))},f[Fa]=function(){v[Fa](),j(e.BUFFER_KEY,f[Xu]()),j(e[Ps],[]),s=!1},f[Zu]=function($){j(e[sh],f._set(_($,f[Xu]())));var G=A(e[Ps]);G instanceof Array&&$ instanceof Array&&(G=G[Ma]($),G[Ue]>e[ed]&&(X(n,1,67,"Sent buffer reached its maximum size: "+G[Ue],!0),G[Ue]=e[ed]),j(e[Ps],G))},f[vl]=function($){var G=A(e[Ps]);G=_($,G),j(e[Ps],G)},f[_p]=function($,G,re){re=!!re;var Q=f[Xu]().slice(0),ie=A(e[Ps]).slice(0);$=$||n,G=G||{},f[Fa]();var T=re?new e($,G):new yh($,G);return V(Q,function(R){T[Es](R)}),re&&T[Zu](ie),T};function _($,G){var re=[],Q=[];return V($,function(ie){Q[gi](ie[Qu])}),V(G,function(ie){!Ee(ie)&&Ze(Q,ie[Qu])===-1&&re[gi](ie)}),re}function A($){var G=$;return G=a?a+"_"+G:G,k(G)}function k($){try{var G=l(n,$);if(G){var re=qr().parse(G);if(Oe(re)&&(re=qr().parse(re)),re&&de(re))return re}}catch(Q){X(n,1,42," storage key: "+$+", "+_t(Q),{exception:fe(Q)})}return[]}function j($,G){var re=$;try{re=a?a+"_"+re:re;var Q=JSON[Oa](G);u(n,re,Q)}catch(ie){u(n,re,JSON[Oa]([])),X(n,2,41," storage key: "+re+", "+_t(ie)+". Buffer cleared",{exception:fe(ie)})}}function H(){var $=[];try{return V(QU,function(G){var re=oe(G);if($=$[Ma](re),a){var Q=a+"_"+G,ie=oe(Q);$=$[Ma](ie)}}),$}catch(G){X(n,2,41,"Transfer events from previous buffers: "+_t(G)+". previous Buffer items can not be removed",{exception:fe(G)})}return[]}function oe($){try{var G=k($),re=[];return V(G,function(Q){var ie={item:Q,cnt:0};re[gi](ie)}),Jg(n,$),re}catch{}return[]}}),o}var t;return t=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+t.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+t.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(jR)});var HR,KR=E(()=>{Nr();st();Ya();HR=(function(){function r(e){Ke(r,this,function(t){t[od]=function(s){var a=n(s,"root");try{return qr()[Oa](a)}catch(c){X(e,1,48,c&&Ee(c[bs])?c[bs]():"Error serializing object",null,!0)}};function n(s,a){var c="__aiCircularRefCheck",l={};if(!s)return X(e,1,48,"cannot serialize object because it is null or undefined",{name:a},!0),l;if(s[c])return X(e,2,50,"Circular reference detected while serializing object",{name:a},!0),l;if(!s.aiDataContract){if(a==="measurements")l=o(s,"number",a);else if(a==="properties")l=o(s,"string",a);else if(a==="tags")l=o(s,"string",a);else if(de(s))l=i(s,a);else{X(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:a},!0);try{qr()[Oa](s),l=s}catch(u){X(e,1,48,u&&Ee(u[bs])?u[bs]():"Error serializing object",null,!0)}}return l}return s[c]=!0,me(s.aiDataContract,function(u,d){var f=Ee(d)?d()&1:d&1,v=Ee(d)?d()&4:d&4,m=d&2,S=s[u]!==void 0,y=Ut(s[u])&&s[u]!==null;if(f&&!S&&!m)X(e,1,24,"Missing required field specification. The field is required but not present on source",{field:u,name:a});else if(!v){var N=void 0;y?m?N=i(s[u],u):N=n(s[u],u):N=s[u],N!==void 0&&(l[u]=N)}}),delete s[c],l}function i(s,a){var c;if(s)if(!de(s))X(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r
`,{name:a},!0);else{c=[];for(var l=0;l<s[Ue];l++){var u=s[l],d=n(u,a+"["+l+"]");c[gi](d)}}return c}function o(s,a,c){var l;return s&&(l={},me(s,function(u,d){if(a==="string")d===void 0?l[u]="undefined":d===null?l[u]="null":d[bs]?l[u]=d[bs]():l[u]="invalid field: toString() is not defined.";else if(a==="number")if(d===void 0)l[u]="undefined";else if(d===null)l[u]="null";else{var f=parseFloat(d);l[u]=f}else l[u]="invalid field: "+c+" is of unknown type.",X(e,1,l[u],null,!0)})),l}})}return r.__ieDyn=1,r})()});var ZU,BR,GR=E(()=>{Ya();ZU=8,BR=(function(){function r(){}return r.prototype.getHashCodeScore=function(e){var t=this.getHashCode(e)/r.INT_MAX_VALUE;return t*100},r.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[Ue]<ZU;)e=e[Ma](e);for(var t=5381,n=0;n<e[Ue];++n)t=(t<<5)+t+e.charCodeAt(n),t=t&t;return Math.abs(t)},r.INT_MAX_VALUE=2147483647,r})()});var WR,zR=E(()=>{Ts();Ya();GR();WR=(function(){function r(){var e=this,t=new BR,n=new Ju;e[hh]=function(i){var o=0;return i[pr]&&i[pr][n.userId]?o=t.getHashCodeScore(i[pr][n.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=t[AR](i.ext.user.id):i[pr]&&i[pr][n.operationId]?o=t.getHashCodeScore(i[pr][n.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[pl]?o=t.getHashCodeScore(i.ext.telemetryTrace[pl]):o=Math.random()*100,o}}return r})()});var $R,JR=E(()=>{Ts();st();Ya();zR();$R=(function(){function r(e,t){this.INT_MAX_VALUE=2147483647;var n=t||Mi(null);(e>100||e<0)&&(n.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[sd]=e,this.samplingScoreGenerator=new WR}return r.prototype.isSampledIn=function(e){var t=this[sd],n=!1;return t==null||t>=100||e.baseType===No[mi]?!0:(n=this.samplingScoreGenerator[hh](e)<t,n)},r})()});function QR(r){try{return r.responseText}catch{}return null}function tY(r){return r&&r.sendPOST}function rY(r){return!isNaN(r)&&r>0&&r<=100}var Dt,Ds,Ao,XR,eY,ZR,nY,Cp,ew=E(()=>{En();Nr();Ts();st();Ne();VR();qR();KR();JR();Ya();Ao=void 0,XR="",eY=65e3;ZR=no((Dt={endpointUrl:yu(Di,ya+ji)},Dt[Sp]=di(),Dt[lE]=15e3,Dt[tE]=102400,Dt.disableTelemetry=di(),Dt[nE]=di(!0),Dt.isRetryDisabled=di(),Dt[uh]=di(!0),Dt[oE]=di(!0),Dt[dh]=di(),Dt[iE]=di(),Dt[lh]=di(),Dt[id]=Ao,Dt.namePrefix=Ao,Dt.samplingPercentage=yu(rY,100),Dt[ch]=Ao,Dt[cE]=Ao,Dt[oh]=1e4,Dt[Tp]=!1,Dt.httpXHROverride={isVal:tY,v:Ao},Dt[rE]=di(),Dt.transports=Ao,Dt.retryCodes=Ao,Dt.maxRetryCnt={isVal:Yr,v:10},Dt));nY=(Ds={},Ds[Io.dataType]=fE,Ds[Ia.dataType]=YR,Ds[xa.dataType]=MR,Ds[Na.dataType]=UR,Ds[Pa.dataType]=LR,Ds[No.dataType]=FR,Ds[Da.dataType]=kR,Ds),Cp=(function(r){bn(e,r);function e(){var t=r.call(this)||this;t.priority=1001,t.identifier=Qb;var n,i,o,s,a,c,l,u,d=0,f,v,m,S,y,N,C,_,A,k,j,H,oe,$,G,re,Q,ie,T,R,B,x,g,D,I,Z,M;return Ke(e,t,function(w,Le){pe(),w.pause=function(){K(),s=!0},w.resume=function(){s&&(s=!1,i=null,We(),b())},w.flush=function(p,h,P){if(p===void 0&&(p=!0),!s){K();try{return w[td](p,null,P||1)}catch(O){X(w[Gr](),1,22,"flush failed, telemetry will not be collected: "+_t(O),{exception:fe(O)})}}},w.onunloadFlush=function(){if(!s)if(C||R)try{return w[td](!0,Kt,2)}catch(p){X(w[Gr](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+_t(p),{exception:fe(p)})}else w.flush(!1)},w.addHeader=function(p,h){u[p]=h},w[ah]=function(p,h,P,O){w.isInitialized()&&X(w[Gr](),1,28,"Sender is already initialized"),Le[ah](p,h,P,O);var Y=w.identifier;c=new HR(h.logger),n=0,i=null,o=0,w[rd]=null,l=0;var W=w[Gr]();m=$n(Hr("Sender"),h.evtNamespace&&h.evtNamespace()),v=rh(m),w._addHook(ur(p,function(te){var Ie=te.cfg;Ie.storagePrefix&&Bg(Ie.storagePrefix);var ze=pn(null,Ie,h),Ce=ze.getExtCfg(Y,ZR),hn=Ce[nd];if(S&&hn===S){var zo=Ie[nd];zo&&zo!==hn&&(Ce[nd]=zo)}un(Ce[id])&&(Ce[id]=Ie[id]),Qe(w,"_senderConfig",{g:function(){return Ce}}),y!==Ce[nd]&&(S=y=Ce[nd]),h.activeStatus()===qn.PENDING?w.pause():h.activeStatus()===qn.ACTIVE&&w.resume(),k&&k!==Ce[ch]&&V(k,function(Fr){delete u[Fr.header]}),N=Ce[tE],C=(Ce[lh]===!1||Ce[uh]===!1)&&wn(),_=Ce[lh]===!1&&wn(),A=Ce[uh]===!1&&wn(),R=Ce[rE],B=!!Ce[dh],M=Ce.retryCodes;var yn=Ce[Tp],Zi=!!Ce[nE]&&(!!yn||ll()),hv=Ce.namePrefix,tF=Zi!==re||Zi&&ie!==hv||Zi&&Q!==yn;if(w[xs]){if(tF)try{w._buffer=w._buffer[_p](W,Ce,Zi)}catch(Fr){X(w[Gr](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+_t(Fr),{exception:fe(Fr)})}We()}else w[xs]=Zi?new pE(W,Ce):new yh(W,Ce);ie=hv,re=Zi,Q=yn,x=!Ce[iE]&&as(!0),I=!!Ce[oE],w._sample=new $R(Ce.samplingPercentage,W),H=Ce[id],!un(H)&&!Ye(H,Ie)&&X(W,1,100,"Invalid Instrumentation key "+H),k=Ce[ch],Oe(S)&&!mp(S)&&k&&k[Ue]>0?V(k,function(Fr){t.addHeader(Fr.header,Fr.value)}):k=null,T=Ce[sE];var ZP=pt();Z?Z.SetConfig(ZP):(Z=new qc,Z[ah](ZP,W));var yv=Ce.httpXHROverride,Sv=null,qd=null,rF=os([3,1,2],Ce.transports);Sv=Z&&Z[bp](rF,!1);var OS=Z&&Z.getFallbackInst();g=function(Fr,dc){return ce(OS,Fr,dc)},D=function(Fr,dc){return ce(OS,Fr,dc,!1)},Sv=R?yv:Sv||yv||OS,w[rd]=function(Fr,dc){return ce(Sv,Fr,dc)},x&&(f=ni);var kS=os([3,1],Ce[aE]);x||(kS=kS.filter(function(Fr){return Fr!==2})),qd=Z&&Z[bp](kS,!0),qd=R?yv:qd||yv,(R||Ce[aE]||!f)&&qd&&(f=function(Fr,dc){return ce(qd,Fr,dc)}),f||(f=g),j=Ce.disableTelemetry,oe=Ce[cE]||Ao,$=Ce.isRetryDisabled,G=Ce[lE]}))},w.processTelemetry=function(p,h){var P;h=w._getTelCtx(h);var O=h[Gr]();try{var Y=mt(p,O);if(!Y)return;var W=rt(p,O);if(!W)return;var te=c[od](W),Ie=w[xs];We(te);var ze=(P={},P[Qu]=te,P.cnt=0,P);Ie[Es](ze),b()}catch(Ce){X(O,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+_t(Ce),{exception:fe(Ce)})}w.processNext(p,h)},w.isCompletelyIdle=function(){return!s&&d===0&&w._buffer[Cs]()===0},w.getOfflineListener=function(){return v},w._xhrReadyStateChange=function(p,h,P){if(!Qr(h))return vt(p,h,P)},w[td]=function(p,h,P){p===void 0&&(p=!0);var O;if(!s)try{var Y=w[xs];if(j)Y[Fa]();else{if(Y[Cs]()>0){var W=Y.getItems();De(P||0,p),h?O=h.call(w,W,p):O=w[rd](W,p)}o=+new Date}K()}catch(Ie){var te=yf();(!te||te>9)&&X(w[Gr](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+_t(Ie),{exception:fe(Ie)})}return O},w.getOfflineSupport=function(){var p;return p={getUrl:function(){return S},createPayload:F},p[od]=Nt,p.batch=St,p.shouldProcess=function(h){return!!mt(h)},p},w._doTeardown=function(p,h){w.onunloadFlush(),ls(v,!1),pe()},w[Ua]=function(p,h,P){if(!Qr(p))return sr(p,h,P)},w[fh]=function(p,h){if(!Qr(p))return Lr(p,h)},w[Ep]=function(p,h){if(!Qr(p))return gr(p,h)},w._xdrOnLoad=function(p,h){if(!Qr(h))return je(p,h)};function je(p,h){var P=QR(p);if(p&&(P+""=="200"||P===""))n=0,w[Ep](h,0);else{var O=jc(P);O&&O[ph]&&O[ph]>O[vh]&&!$?w[fh](h,O):w[Ua](h,Oc(p))}}function pt(){var p;try{var h={xdrOnComplete:function(O,Y,W){var te=ln(W);if(te)return je(O,te)},fetchOnComplete:function(O,Y,W,te){var Ie=ln(te);if(Ie)return ot(O.status,Ie,O.url,Ie[Ue],O.statusText,W||"")},xhrOnComplete:function(O,Y,W){var te=ln(W);if(te)return vt(O,te,te[Ue])},beaconOnRetry:function(O,Y,W){return Xr(O,Y,W)}},P=(p={},p[sE]=T,p.isOneDs=!1,p.disableCredentials=!1,p[dh]=B,p.disableBeacon=!A,p.disableBeaconSync=!_,p.senderOnCompleteCallBack=h,p);return P}catch{}return null}function vt(p,h,P){p.readyState===4&&ot(p.status,h,p.responseURL,P,is(p),QR(p)||p.response)}function sr(p,h,P){X(w[Gr](),2,26,"Failed to send telemetry.",{message:h}),w._buffer&&w._buffer[vl](p)}function Lr(p,h){for(var P=[],O=[],Y=h.errors.reverse(),W=0,te=Y;W<te.length;W++){var Ie=te[W],ze=p.splice(Ie.index,1)[0];J(Ie.statusCode)?O[gi](ze):P[gi](ze)}p[Ue]>0&&w[Ep](p,h[vh]),P[Ue]>0&&w[Ua](P,is(null,["partial success",h[vh],"of",h.itemsReceived].join(" "))),O[Ue]>0&&(Dr(O),X(w[Gr](),2,40,"Partial success. Delivered: "+p[Ue]+", Failed: "+P[Ue]+". Will retry to send "+O[Ue]+" our of "+h[ph]+" items"))}function gr(p,h){w._buffer&&w._buffer[vl](p)}function ln(p){try{if(p){var h=p,P=h[mh];return P&&P[Ue]?P:null}}catch{}return null}function mt(p,h){if(j)return!1;if(!p)return h&&X(h,1,7,"Cannot send empty telemetry"),!1;if(p.baseData&&!p[gh])return h&&X(h,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(p[gh]||(p[gh]="EventData"),!w[rd])return h&&X(h,1,28,"Sender was not initialized"),!1;if(ne(p))p[Vu]=w._sample[sd];else return h&&X(h,2,33,"Telemetry item was sampled out and not sent",{SampleRate:w._sample[sd]}),!1;return!0}function rt(p,h){var P=p.iKey||H,O=e.constructEnvelope(p,P,h,oe);if(!O){X(h,1,47,"Unable to create an AppInsights envelope");return}var Y=!1;if(p[pr]&&p[pr][ju]&&(V(p[pr][ju],function(W){try{W&&W(O)===!1&&(Y=!0,fn(h,"Telemetry processor check returns false"))}catch(te){X(h,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+_t(te),{exception:fe(te)},!0)}}),delete p[pr][ju]),!Y)return O}function Nt(p){var h=XR,P=w[Gr]();try{var O=mt(p,P),Y=null;O&&(Y=rt(p,P)),Y&&(h=c[od](Y))}catch{}return h}function St(p){var h=XR;return p&&p[Ue]&&(h="["+p.join(",")+"]"),h}function F(p){var h,P=Je();return h={urlString:S},h[Br]=p,h.headers=P,h}function ne(p){return w._sample.isSampledIn(p)}function Te(p,h,P,O){h===200&&p?w._onSuccess(p,p[Ue]):O&&w[Ua](p,O)}function ce(p,h,P,O){O===void 0&&(O=!0);var Y=function(Ie,ze,Ce){return Te(h,Ie,ze,Ce)},W=be(h),te=p&&p.sendPOST;return te&&W?(O&&w._buffer[Zu](h),te(W,Y,!P)):null}function be(p){var h;if(de(p)&&p[Ue]>0){var P=w[xs].batchPayloads(p),O=Je(),Y=(h={},h[Br]=P,h.urlString=S,h.headers=O,h.disableXhrSync=B,h.disableFetchKeepAlive=!x,h[mh]=p,h);return Y}return null}function Je(){try{var p=u||{};return mp(S)&&(p[el[6]]=el[7]),p}catch{}return null}function We(p){var h=p?p[Ue]:0;return w[xs].size()+h>N?((!v||v.isOnline())&&w[td](!0,null,10),!0):!1}function ot(p,h,P,O,Y,W){var te=null;if(w._appId||(te=jc(W),te&&te.appId&&(w._appId=te.appId)),(p<200||p>=300)&&p!==0){if((p===301||p===307||p===308)&&!Rt(P)){w[Ua](h,Y);return}if(v&&!v.isOnline()){if(!$){var Ie=10;Dr(h,Ie),X(w[Gr](),2,40,". Offline - Response Code: ".concat(p,". Offline status: ").concat(!v.isOnline(),". Will retry to send ").concat(h.length," items."))}return}!$&&J(p)?(Dr(h),X(w[Gr](),2,40,". Response code "+p+". Will retry to send "+h[Ue]+" items.")):w[Ua](h,Y)}else Rt(P),p===206?(te||(te=jc(W)),te&&!$?w[fh](h,te):w[Ua](h,Y)):(n=0,w[Ep](h,O))}function Rt(p){return l>=10?!1:!z(p)&&p!==""&&p!==S?(S=p,++l,!0):!1}function Kt(p,h){if(f)f(p,!1);else{var P=Z&&Z[bp]([3],!0);return ce(P,p,h)}}function Xr(p,h,P){var O=p,Y=O&&O[mh];if(I)D&&D(Y,!0),X(w[Gr](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var W=[],te=0;te<Y[Ue];te++){var Ie=Y[te],ze=[Ie],Ce=be(ze);P(Ce,h)?w._onSuccess(ze,ze[Ue]):W[gi](Ie)}W[Ue]>0&&(D&&D(W,!0),X(w[Gr](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function Qr(p){try{if(p&&p[Ue])return Oe(p[0])}catch{}return null}function ni(p,h){var P=null;if(de(p)){for(var O=p[Ue],Y=0;Y<p[Ue];Y++)O+=p[Y].item[Ue];var W=Z.getSyncFetchPayload();W+O<=eY?P=2:wn()?P=3:(P=1,X(w[Gr](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var te=Z&&Z[bp]([P],!0);return ce(te,p,h)}return null}function Dr(p,h){if(h===void 0&&(h=1),!(!p||p[Ue]===0)){var P=w[xs];P[vl](p),n++;for(var O=0,Y=p;O<Y.length;O++){var W=Y[O];W.cnt=W.cnt||0,W.cnt++,P[Es](W)}Wo(h),b()}}function Wo(p){var h=10,P;if(n<=1)P=h;else{var O=(Math.pow(2,n)-1)/2,Y=Math.floor(Math.random()*O*h)+1;Y=p*Y,P=Math.max(Math.min(Y,3600),h)}var W=Yt()+P*1e3;i=W}function b(){if(!a&&!s){var p=i?Math.max(0,i-Yt()):0,h=Math.max(G,p);a=jn(function(){a=null,w[td](!0,null,1)},h)}}function K(){a&&a.cancel(),a=null,i=null}function J(p){return z(M)?p===401||p===408||p===429||p===500||p===502||p===503||p===504:M[Ue]&&M.indexOf(p)>-1}function ue(){var p="getNotifyMgr";return w.core[p]?w.core[p]():w.core._notificationManager}function De(p,h){var P=ue();if(P&&P[uE])try{P[uE](p,h)}catch(O){X(w[Gr](),1,74,"send request notification failed: "+_t(O),{exception:fe(O)})}}function Ye(p,h){var P=h.disableInstrumentationKeyValidation,O=z(P)?!1:P;if(O)return!0;var Y="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",W=new RegExp(Y);return W.test(p)}function pe(){w[rd]=null,w[xs]=null,w._appId=null,w._sample=null,u={},v=null,n=0,i=null,o=null,s=!1,a=null,c=null,l=0,d=0,f=null,m=null,S=null,y=null,N=0,C=!1,k=null,j=!1,H=null,oe=Ao,$=!1,re=null,ie=Ao,B=!1,x=!1,I=!1,g=null,D=null,Z=null,Qe(w,"_senderConfig",{g:function(){return um({},ZR)}})}}),t}return e.constructEnvelope=function(t,n,i,o){var s;n!==t.iKey&&!z(n)?s=si(si({},t),{iKey:n}):s=t;var a=nY[s.baseType]||fE;return a(i,s,o)},e})(ps)});var vE=E(()=>{ew()});var yl,Pp,mE,Sl,gE,ad,tw=E(()=>{yl="instrumentationKey",Pp="connectionString",mE="instrumentationkey",Sl="endpointUrl",gE="ingestionendpoint",ad="userOverrideEndpointUrl"});var rw={};Be(rw,{AppInsightsCore:()=>vs,ApplicationInsights:()=>sY,Sender:()=>Cp,SeverityLevel:()=>eh,arrForEach:()=>V,isNullOrUndefined:()=>z,proxyFunctions:()=>zn,throwError:()=>Wt});function oY(r){return r&&r>0}var cd,hE,iY,sY,nw=E(()=>{Nr();vE();Ts();st();Nc();Ne();tw();st();Ts();vE();hE=void 0,iY=(cd={diagnosticLogInterval:yu(oY,1e4)},cd[Pp]=hE,cd[Sl]=hE,cd[yl]=hE,cd.extensionConfig={},cd);sY=(function(){function r(e){var t=new vs,n;(z(e)||z(e[yl])&&z(e[Pp]))&&Wt("Invalid input configuration"),Ke(r,this,function(o){Qe(o,"config",{g:function(){return n}}),s(),o.initialize=s,o.track=i,zn(o,t,["flush","pollInternalLogs","stopPollingInternalLogs","unload","getPlugin","addPlugin","evtNamespace","addUnloadCb","onCfgChange","getTraceCtx","updateCfg","addTelemetryInitializer"]);function s(){var a=wt(e||{},iY);n=a.cfg,t.addUnloadHook(ur(a,function(){var c=n[Pp];if(un(c)){var l=ff(function(v,m){Bn(c,function(S){var y=S.value,N=n[yl];if(!S.rejected&&y){n[Pp]=y;var C=ul(y);N=C[mE]||N}v(N)})}),u=ff(function(v,m){Bn(c,function(S){var y=S.value,N=n[Sl];if(!S.rejected&&y){var C=ul(y),_=C[gE];N=_?_+ji:N}v(N)})});n[yl]=l,n[Sl]=n[ad]||u}if(Oe(c)){var d=ul(c),f=d[gE];n[Sl]=n[ad]?n[ad]:f+ji,n[yl]=d[mE]||n[yl]}n[Sl]=n[ad]?n[ad]:n[Sl]})),t.initialize(n,[new Cp])}});function i(o){o&&(o.baseData=o.baseData||{},o.baseType=o.baseType||"EventData"),t.track(o)}}return r.__ieDyn=1,r})()});var iw=le(Oo=>{"use strict";var aY=Oo&&Oo.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),cY=Oo&&Oo.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),lY=Oo&&Oo.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&aY(e,r,t);return cY(e,r),e};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.appInsightsClientFactory=void 0;var uY=(Ts(),Hd(RR)),dY=eE(),fY=async(r,e,t,n,i)=>{let o;try{let a=await Promise.resolve().then(()=>lY((nw(),Hd(rw)))),c={};if(n){let d={alwaysUseXhrOverride:!0,httpXHROverride:n};c[uY.BreezeChannelIdentifier]=d}let l;r.startsWith("InstrumentationKey=")||(l=r);let u=l?{instrumentationKey:l}:{connectionString:r};o=new a.ApplicationInsights({...u,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!1,disableInstrumentationKeyValidation:!0,extensionConfig:c})}catch(a){return Promise.reject(a)}return{logEvent:(a,c)=>{let l={...c?.properties,...c?.measurements};i?.length&&dY.TelemetryUtil.applyReplacements(l,i),o?.track({name:a,data:l,baseType:"EventData",ext:{user:{id:e,authId:e},app:{sesId:t}},baseData:{name:a,properties:c?.properties,measurements:c?.measurements}})},flush:async()=>{o?.flush(!1)},dispose:async()=>new Promise(c=>{o?.unload(!0,()=>{c(),o=void 0},1e3)})}};Oo.appInsightsClientFactory=fY});var ow=le(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.BaseTelemetryReporter=void 0;var yE=class{constructor(e,t,n){this.telemetrySender=e,this.vscodeAPI=t,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this._onDidChangeTelemetryLevel=new this.vscodeAPI.EventEmitter,this.onDidChangeTelemetryLevel=this._onDidChangeTelemetryLevel.event,this.telemetryLogger=this.vscodeAPI.env.createTelemetryLogger(this.telemetrySender,n),this.updateUserOptIn(),this.telemetryLogger.onDidChangeEnableStates(()=>{this.updateUserOptIn()})}updateUserOptIn(){this.errorOptIn=this.telemetryLogger.isErrorsEnabled,this.userOptIn=this.telemetryLogger.isUsageEnabled,(this.telemetryLogger.isErrorsEnabled||this.telemetryLogger.isUsageEnabled)&&this.telemetrySender.instantiateSender(),this._onDidChangeTelemetryLevel.fire(this.telemetryLevel)}get telemetryLevel(){return this.errorOptIn&&this.userOptIn?"all":this.errorOptIn?"error":"off"}internalSendTelemetryEvent(e,t,n,i){i?this.telemetrySender.sendEventData(e,{properties:t,measurements:n}):this.telemetryLogger.logUsage(e,{properties:t,measurements:n})}sendTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!1)}sendRawTelemetryEvent(e,t,n){let i={...t};for(let o of Object.keys(i??{})){let s=i[o];typeof o=="string"&&s!==void 0&&(i[o]=new this.vscodeAPI.TelemetryTrustedValue(typeof s=="string"?s:s.value))}this.sendTelemetryEvent(e,i,n)}sendDangerousTelemetryEvent(e,t,n){this.telemetrySender.instantiateSender(),this.internalSendTelemetryEvent(e,t,n,!0)}internalSendTelemetryErrorEvent(e,t,n,i){i?this.telemetrySender.sendEventData(e,{properties:t,measurements:n}):this.telemetryLogger.logError(e,{properties:t,measurements:n})}sendTelemetryErrorEvent(e,t,n){this.internalSendTelemetryErrorEvent(e,t,n,!1)}sendDangerousTelemetryErrorEvent(e,t,n){this.telemetrySender.instantiateSender(),this.internalSendTelemetryErrorEvent(e,t,n,!0)}async dispose(){return await this.telemetrySender.dispose(),this.telemetryLogger.dispose(),Promise.all(this.disposables.map(e=>e.dispose()))}};Sh.BaseTelemetryReporter=yE});var sw=le(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.BaseTelemetrySender=void 0;var Is;(function(r){r[r.NOT_INSTANTIATED=0]="NOT_INSTANTIATED",r[r.INSTANTIATING=1]="INSTANTIATING",r[r.INSTANTIATED=2]="INSTANTIATED"})(Is||(Is={}));var SE=class{constructor(e,t){this._instantiationStatus=Is.NOT_INSTANTIATED,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}sendEventData(e,t){if(!this._telemetryClient){this._instantiationStatus!==Is.INSTANTIATED&&this._eventQueue.push({eventName:e,data:t});return}this._telemetryClient.logEvent(e,t)}sendErrorData(e,t){if(!this._telemetryClient){this._instantiationStatus!==Is.INSTANTIATED&&this._exceptionQueue.push({exception:e,data:t});return}let n={stack:e.stack,message:e.message,name:e.name};if(t){let i=t.properties||t;t.properties={...i,...n}}else t={properties:n};this._telemetryClient.logEvent("unhandlederror",t)}async flush(){return this._telemetryClient?.flush()}async dispose(){this._telemetryClient&&(await this._telemetryClient.dispose(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach(({eventName:e,data:t})=>this.sendEventData(e,t)),this._eventQueue=[],this._exceptionQueue.forEach(({exception:e,data:t})=>this.sendErrorData(e,t)),this._exceptionQueue=[]}instantiateSender(){this._instantiationStatus===Is.NOT_INSTANTIATED&&(this._instantiationStatus=Is.INSTANTIATING,this._clientFactory(this._key).then(e=>{this._telemetryClient=e,this._instantiationStatus=Is.INSTANTIATED,this._flushQueues()}).catch(e=>{console.error(e),this._instantiationStatus=Is.INSTANTIATED}))}};_h.BaseTelemetrySender=SE});var lw=le(Ns=>{"use strict";var pY=Ns&&Ns.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),vY=Ns&&Ns.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),bE=Ns&&Ns.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&pY(e,r,t);return vY(e,r),e};Object.defineProperty(Ns,"__esModule",{value:!0});var mY=bE(require("https")),_E=bE(require("os")),Th=bE(require("vscode")),gY=DN(),hY=iw(),yY=ow(),SY=sw(),aw=eE();function cw(){return{sendPOST:(e,t)=>{let n={method:"POST",headers:{...e.headers,"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)}};try{let i=mY.request(e.urlString,n,o=>{o.on("data",function(s){t(o.statusCode??200,o.headers,s.toString())}),o.on("error",function(){t(0,{})})});i.write(e.data,o=>{o&&t(0,{})}),i.end()}catch{t(0,{})}}}}var TE=class extends yY.BaseTelemetryReporter{constructor(e,t){let n=s=>(0,hY.appInsightsClientFactory)(s,Th.env.machineId,Th.env.sessionId,cw(),t);aw.TelemetryUtil.shouldUseOneDataSystemSDK(e)&&(n=s=>(0,gY.oneDataSystemClientFactory)(s,Th,cw()));let i={release:_E.release(),platform:_E.platform(),architecture:_E.arch()},o=new SY.BaseTelemetrySender(e,n);if(e&&e.indexOf("AIF-")===0)throw new Error("AIF keys are no longer supported. Please switch to 1DS keys for 1st party extensions");super(o,Th,{additionalCommonProperties:aw.TelemetryUtil.getAdditionalCommonProperties(i)})}};Ns.default=TE});function CE(r){let e=[];for(let t of r)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store")}var _e,_l,yt=E(()=>{"use strict";_e=class{_isDisposed=!1;_disposables=[];dispose(){this._isDisposed||(this._isDisposed=!0,CE(this._disposables))}_register(e){return this._isDisposed?e.dispose():this._disposables.push(e),e}get isDisposed(){return this._isDisposed}},_l=class extends _e{add(e){return this._register(e),e}}});function q(r,e,t){let n=hi.workspace.getConfiguration(vn,t.scope),i=n.inspect(r);return PE(i)?n.get(r,e):hi.workspace.getConfiguration(t.fallbackSection,t.scope).get(t.fallbackSubSectionNameOverride??r,e)}function PE(r){return r?typeof r.globalValue<"u"||typeof r.workspaceValue<"u"||typeof r.workspaceFolderValue<"u"||typeof r.globalLanguageValue<"u"||typeof r.workspaceLanguageValue<"u"||typeof r.workspaceFolderLanguageValue<"u"||(r.languageIds?.length??0)>0:!1}function dw(r,e){let t=hi.workspace.getConfiguration(vn,e.scope);if(PE(t.inspect(r)))return!0;let n=hi.workspace.getConfiguration(e.fallbackSection,e.scope);return PE(n.inspect(r))}var hi,vn,Tl,Hi,jt=E(()=>{"use strict";hi=U(require("vscode"));yt();vn="js/ts";Tl=class extends _e{constructor(t,n,i){super();this.subSectionName=t;this.defaultValue=n;this.options=i;this._value=this.read(),this._register(hi.workspace.onDidChangeConfiguration(o=>{if(o.affectsConfiguration(`${vn}.${t}`,i.scope??void 0)||o.affectsConfiguration(`${i.fallbackSection}.${i.fallbackSubSectionNameOverride??t}`,i.scope??void 0)){let s=this.read();s!==this._value&&(this._value=s,this._onDidChange.fire(s))}}))}subSectionName;defaultValue;options;_value;_onDidChange=this._register(new hi.EventEmitter);get onDidChange(){return this._onDidChange.event}read(){return q(this.subSectionName,this.defaultValue,this.options)}getValue(){return this._value}},Hi=class extends _e{constructor(t,n,i){super();this.subSectionName=t;this.defaultValue=n;this.options=i;let o=i?.fallbackSubSectionNameOverride??t;this._register(hi.workspace.onDidChangeConfiguration(s=>{(s.affectsConfiguration(`${vn}.${t}`)||s.affectsConfiguration(`javascript.${o}`)||s.affectsConfiguration(`typescript.${o}`))&&(this._cache.clear(),this._onDidChange.fire())})),this._register(hi.workspace.onDidChangeWorkspaceFolders(()=>{this._cache.clear(),this._onDidChange.fire()}))}subSectionName;defaultValue;options;_cache=new Map;_onDidChange=this._register(new hi.EventEmitter);onDidChange=this._onDidChange.event;getValue(t){let n=this.keyFor(t),i=this._cache.get(n);if(i!==void 0)return i;let o=this.fallbackSectionFor(t.languageId),s=q(this.subSectionName,this.defaultValue,{scope:{uri:t.uri,languageId:t.languageId},fallbackSection:o,fallbackSubSectionNameOverride:this.options?.fallbackSubSectionNameOverride});return this._cache.set(n,s),s}fallbackSectionFor(t){switch(t){case"javascript":case"javascriptreact":return"javascript";default:return"typescript"}}keyFor(t){let n=hi.workspace.getWorkspaceFolder(t.uri);return n?n.uri.toString():""}}});var Ip=le((t6,pw)=>{var _Y="2.0.0",TY=Number.MAX_SAFE_INTEGER||9007199254740991,bY=16,EY=["major","premajor","minor","preminor","patch","prepatch","prerelease"];pw.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:bY,MAX_SAFE_INTEGER:TY,RELEASE_TYPES:EY,SEMVER_SPEC_VERSION:_Y,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Np=le((r6,vw)=>{var CY=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};vw.exports=CY});var ud=le((Rs,mw)=>{var{MAX_SAFE_COMPONENT_LENGTH:IE}=Ip(),PY=Np();Rs=mw.exports={};var xY=Rs.re=[],DY=Rs.safeRe=[],ge=Rs.src=[],he=Rs.t={},IY=0,qe=(r,e,t)=>{let n=e.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),i=IY++;PY(r,i,e),he[r]=i,ge[i]=e,xY[i]=new RegExp(e,t?"g":void 0),DY[i]=new RegExp(n,t?"g":void 0)};qe("NUMERICIDENTIFIER","0|[1-9]\\d*");qe("NUMERICIDENTIFIERLOOSE","[0-9]+");qe("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");qe("MAINVERSION",`(${ge[he.NUMERICIDENTIFIER]})\\.(${ge[he.NUMERICIDENTIFIER]})\\.(${ge[he.NUMERICIDENTIFIER]})`);qe("MAINVERSIONLOOSE",`(${ge[he.NUMERICIDENTIFIERLOOSE]})\\.(${ge[he.NUMERICIDENTIFIERLOOSE]})\\.(${ge[he.NUMERICIDENTIFIERLOOSE]})`);qe("PRERELEASEIDENTIFIER",`(?:${ge[he.NUMERICIDENTIFIER]}|${ge[he.NONNUMERICIDENTIFIER]})`);qe("PRERELEASEIDENTIFIERLOOSE",`(?:${ge[he.NUMERICIDENTIFIERLOOSE]}|${ge[he.NONNUMERICIDENTIFIER]})`);qe("PRERELEASE",`(?:-(${ge[he.PRERELEASEIDENTIFIER]}(?:\\.${ge[he.PRERELEASEIDENTIFIER]})*))`);qe("PRERELEASELOOSE",`(?:-?(${ge[he.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${ge[he.PRERELEASEIDENTIFIERLOOSE]})*))`);qe("BUILDIDENTIFIER","[0-9A-Za-z-]+");qe("BUILD",`(?:\\+(${ge[he.BUILDIDENTIFIER]}(?:\\.${ge[he.BUILDIDENTIFIER]})*))`);qe("FULLPLAIN",`v?${ge[he.MAINVERSION]}${ge[he.PRERELEASE]}?${ge[he.BUILD]}?`);qe("FULL",`^${ge[he.FULLPLAIN]}$`);qe("LOOSEPLAIN",`[v=\\s]*${ge[he.MAINVERSIONLOOSE]}${ge[he.PRERELEASELOOSE]}?${ge[he.BUILD]}?`);qe("LOOSE",`^${ge[he.LOOSEPLAIN]}$`);qe("GTLT","((?:<|>)?=?)");qe("XRANGEIDENTIFIERLOOSE",`${ge[he.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);qe("XRANGEIDENTIFIER",`${ge[he.NUMERICIDENTIFIER]}|x|X|\\*`);qe("XRANGEPLAIN",`[v=\\s]*(${ge[he.XRANGEIDENTIFIER]})(?:\\.(${ge[he.XRANGEIDENTIFIER]})(?:\\.(${ge[he.XRANGEIDENTIFIER]})(?:${ge[he.PRERELEASE]})?${ge[he.BUILD]}?)?)?`);qe("XRANGEPLAINLOOSE",`[v=\\s]*(${ge[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ge[he.XRANGEIDENTIFIERLOOSE]})(?:\\.(${ge[he.XRANGEIDENTIFIERLOOSE]})(?:${ge[he.PRERELEASELOOSE]})?${ge[he.BUILD]}?)?)?`);qe("XRANGE",`^${ge[he.GTLT]}\\s*${ge[he.XRANGEPLAIN]}$`);qe("XRANGELOOSE",`^${ge[he.GTLT]}\\s*${ge[he.XRANGEPLAINLOOSE]}$`);qe("COERCE",`(^|[^\\d])(\\d{1,${IE}})(?:\\.(\\d{1,${IE}}))?(?:\\.(\\d{1,${IE}}))?(?:$|[^\\d])`);qe("COERCERTL",ge[he.COERCE],!0);qe("LONETILDE","(?:~>?)");qe("TILDETRIM",`(\\s*)${ge[he.LONETILDE]}\\s+`,!0);Rs.tildeTrimReplace="$1~";qe("TILDE",`^${ge[he.LONETILDE]}${ge[he.XRANGEPLAIN]}$`);qe("TILDELOOSE",`^${ge[he.LONETILDE]}${ge[he.XRANGEPLAINLOOSE]}$`);qe("LONECARET","(?:\\^)");qe("CARETTRIM",`(\\s*)${ge[he.LONECARET]}\\s+`,!0);Rs.caretTrimReplace="$1^";qe("CARET",`^${ge[he.LONECARET]}${ge[he.XRANGEPLAIN]}$`);qe("CARETLOOSE",`^${ge[he.LONECARET]}${ge[he.XRANGEPLAINLOOSE]}$`);qe("COMPARATORLOOSE",`^${ge[he.GTLT]}\\s*(${ge[he.LOOSEPLAIN]})$|^$`);qe("COMPARATOR",`^${ge[he.GTLT]}\\s*(${ge[he.FULLPLAIN]})$|^$`);qe("COMPARATORTRIM",`(\\s*)${ge[he.GTLT]}\\s*(${ge[he.LOOSEPLAIN]}|${ge[he.XRANGEPLAIN]})`,!0);Rs.comparatorTrimReplace="$1$2$3";qe("HYPHENRANGE",`^\\s*(${ge[he.XRANGEPLAIN]})\\s+-\\s+(${ge[he.XRANGEPLAIN]})\\s*$`);qe("HYPHENRANGELOOSE",`^\\s*(${ge[he.XRANGEPLAINLOOSE]})\\s+-\\s+(${ge[he.XRANGEPLAINLOOSE]})\\s*$`);qe("STAR","(<|>)?=?\\s*\\*");qe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");qe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ph=le((n6,gw)=>{var NY=Object.freeze({loose:!0}),RY=Object.freeze({}),wY=r=>r?typeof r!="object"?NY:r:RY;gw.exports=wY});var NE=le((i6,Sw)=>{var hw=/^[0-9]+$/,yw=(r,e)=>{let t=hw.test(r),n=hw.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},AY=(r,e)=>yw(e,r);Sw.exports={compareIdentifiers:yw,rcompareIdentifiers:AY}});var on=le((o6,Ew)=>{var xh=Np(),{MAX_LENGTH:_w,MAX_SAFE_INTEGER:Dh}=Ip(),{safeRe:Tw,t:bw}=ud(),OY=Ph(),{compareIdentifiers:dd}=NE(),RE=class r{constructor(e,t){if(t=OY(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>_w)throw new TypeError(`version is longer than ${_w} characters`);xh("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?Tw[bw.LOOSE]:Tw[bw.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>Dh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Dh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Dh||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<Dh)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(xh("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),dd(this.major,e.major)||dd(this.minor,e.minor)||dd(this.patch,e.patch)}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],i=e.prerelease[t];if(xh("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return dd(n,i)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let n=this.build[t],i=e.build[t];if(xh("prerelease compare",t,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return dd(n,i)}while(++t)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(!t&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let o=[t,i];n===!1&&(o=[t]),dd(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ew.exports=RE});var bl=le((s6,Pw)=>{var Cw=on(),kY=(r,e,t=!1)=>{if(r instanceof Cw)return r;try{return new Cw(r,e)}catch(n){if(!t)return null;throw n}};Pw.exports=kY});var Dw=le((a6,xw)=>{var LY=bl(),FY=(r,e)=>{let t=LY(r,e);return t?t.version:null};xw.exports=FY});var Nw=le((c6,Iw)=>{var MY=bl(),UY=(r,e)=>{let t=MY(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Iw.exports=UY});var Aw=le((l6,ww)=>{var Rw=on(),YY=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Rw(r instanceof Rw?r.version:r,t).inc(e,n,i).version}catch{return null}};ww.exports=YY});var Lw=le((u6,kw)=>{var Ow=bl(),VY=(r,e)=>{let t=Ow(r,null,!0),n=Ow(e,null,!0),i=t.compare(n);if(i===0)return null;let o=i>0,s=o?t:n,a=o?n:t,c=!!s.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":s.patch?"patch":s.minor?"minor":"major";let u=c?"pre":"";return t.major!==n.major?u+"major":t.minor!==n.minor?u+"minor":t.patch!==n.patch?u+"patch":"prerelease"};kw.exports=VY});var Mw=le((d6,Fw)=>{var jY=on(),qY=(r,e)=>new jY(r,e).major;Fw.exports=qY});var Yw=le((f6,Uw)=>{var HY=on(),KY=(r,e)=>new HY(r,e).minor;Uw.exports=KY});var jw=le((p6,Vw)=>{var BY=on(),GY=(r,e)=>new BY(r,e).patch;Vw.exports=GY});var Hw=le((v6,qw)=>{var WY=bl(),zY=(r,e)=>{let t=WY(r,e);return t&&t.prerelease.length?t.prerelease:null};qw.exports=zY});var yi=le((m6,Bw)=>{var Kw=on(),$Y=(r,e,t)=>new Kw(r,t).compare(new Kw(e,t));Bw.exports=$Y});var Ww=le((g6,Gw)=>{var JY=yi(),XY=(r,e,t)=>JY(e,r,t);Gw.exports=XY});var $w=le((h6,zw)=>{var QY=yi(),ZY=(r,e)=>QY(r,e,!0);zw.exports=ZY});var Ih=le((y6,Xw)=>{var Jw=on(),eV=(r,e,t)=>{let n=new Jw(r,t),i=new Jw(e,t);return n.compare(i)||n.compareBuild(i)};Xw.exports=eV});var Zw=le((S6,Qw)=>{var tV=Ih(),rV=(r,e)=>r.sort((t,n)=>tV(t,n,e));Qw.exports=rV});var tA=le((_6,eA)=>{var nV=Ih(),iV=(r,e)=>r.sort((t,n)=>nV(n,t,e));eA.exports=iV});var Rp=le((T6,rA)=>{var oV=yi(),sV=(r,e,t)=>oV(r,e,t)>0;rA.exports=sV});var Nh=le((b6,nA)=>{var aV=yi(),cV=(r,e,t)=>aV(r,e,t)<0;nA.exports=cV});var wE=le((E6,iA)=>{var lV=yi(),uV=(r,e,t)=>lV(r,e,t)===0;iA.exports=uV});var AE=le((C6,oA)=>{var dV=yi(),fV=(r,e,t)=>dV(r,e,t)!==0;oA.exports=fV});var Rh=le((P6,sA)=>{var pV=yi(),vV=(r,e,t)=>pV(r,e,t)>=0;sA.exports=vV});var wh=le((x6,aA)=>{var mV=yi(),gV=(r,e,t)=>mV(r,e,t)<=0;aA.exports=gV});var OE=le((D6,cA)=>{var hV=wE(),yV=AE(),SV=Rp(),_V=Rh(),TV=Nh(),bV=wh(),EV=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return hV(r,t,n);case"!=":return yV(r,t,n);case">":return SV(r,t,n);case">=":return _V(r,t,n);case"<":return TV(r,t,n);case"<=":return bV(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};cA.exports=EV});var uA=le((I6,lA)=>{var CV=on(),PV=bl(),{safeRe:Ah,t:Oh}=ud(),xV=(r,e)=>{if(r instanceof CV)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Ah[Oh.COERCE]);else{let n;for(;(n=Ah[Oh.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Ah[Oh.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Ah[Oh.COERCERTL].lastIndex=-1}return t===null?null:PV(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};lA.exports=xV});var fA=le((N6,dA)=>{"use strict";dA.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var vA=le((R6,pA)=>{"use strict";pA.exports=it;it.Node=El;it.create=it;function it(r){var e=this;if(e instanceof it||(e=new it),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}it.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};it.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};it.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};it.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)IV(this,arguments[r]);return this.length};it.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)NV(this,arguments[r]);return this.length};it.prototype.pop=function(){if(this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};it.prototype.shift=function(){if(this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};it.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};it.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};it.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};it.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};it.prototype.map=function(r,e){e=e||this;for(var t=new it,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};it.prototype.mapReverse=function(r,e){e=e||this;for(var t=new it,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};it.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)t=r(t,n.value,i),n=n.next;return t};it.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)t=r(t,n.value,i),n=n.prev;return t};it.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};it.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};it.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new it;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<r;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)t.push(i.value);return t};it.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new it;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>r;n--,i=i.prev)t.push(i.value);return t};it.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,i=this.head;i!==null&&n<r;n++)i=i.next;for(var o=[],n=0;i&&n<e;n++)o.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<t.length;n++)i=DV(this,i,t[n]);return o};it.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function DV(r,e,t){var n=e===r.head?new El(t,null,e,r):new El(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function IV(r,e){r.tail=new El(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function NV(r,e){r.head=new El(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function El(r,e,t,n){if(!(this instanceof El))return new El(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{fA()(it)}catch{}});var SA=le((w6,yA)=>{"use strict";var RV=vA(),Cl=Symbol("max"),As=Symbol("length"),fd=Symbol("lengthCalculator"),Ap=Symbol("allowStale"),Pl=Symbol("maxAge"),ws=Symbol("dispose"),mA=Symbol("noDisposeOnSet"),Or=Symbol("lruList"),Ki=Symbol("cache"),hA=Symbol("updateAgeOnGet"),kE=()=>1,FE=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Cl]=e.max||1/0,n=e.length||kE;if(this[fd]=typeof n!="function"?kE:n,this[Ap]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Pl]=e.maxAge||0,this[ws]=e.dispose,this[mA]=e.noDisposeOnSet||!1,this[hA]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Cl]=e||1/0,wp(this)}get max(){return this[Cl]}set allowStale(e){this[Ap]=!!e}get allowStale(){return this[Ap]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Pl]=e,wp(this)}get maxAge(){return this[Pl]}set lengthCalculator(e){typeof e!="function"&&(e=kE),e!==this[fd]&&(this[fd]=e,this[As]=0,this[Or].forEach(t=>{t.length=this[fd](t.value,t.key),this[As]+=t.length})),wp(this)}get lengthCalculator(){return this[fd]}get length(){return this[As]}get itemCount(){return this[Or].length}rforEach(e,t){t=t||this;for(let n=this[Or].tail;n!==null;){let i=n.prev;gA(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[Or].head;n!==null;){let i=n.next;gA(this,e,n,t),n=i}}keys(){return this[Or].toArray().map(e=>e.key)}values(){return this[Or].toArray().map(e=>e.value)}reset(){this[ws]&&this[Or]&&this[Or].length&&this[Or].forEach(e=>this[ws](e.key,e.value)),this[Ki]=new Map,this[Or]=new RV,this[As]=0}dump(){return this[Or].map(e=>kh(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Or]}set(e,t,n){if(n=n||this[Pl],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,o=this[fd](t,e);if(this[Ki].has(e)){if(o>this[Cl])return pd(this,this[Ki].get(e)),!1;let c=this[Ki].get(e).value;return this[ws]&&(this[mA]||this[ws](e,c.value)),c.now=i,c.maxAge=n,c.value=t,this[As]+=o-c.length,c.length=o,this.get(e),wp(this),!0}let s=new ME(e,t,o,i,n);return s.length>this[Cl]?(this[ws]&&this[ws](e,t),!1):(this[As]+=s.length,this[Or].unshift(s),this[Ki].set(e,this[Or].head),wp(this),!0)}has(e){if(!this[Ki].has(e))return!1;let t=this[Ki].get(e).value;return!kh(this,t)}get(e){return LE(this,e,!0)}peek(e){return LE(this,e,!1)}pop(){let e=this[Or].tail;return e?(pd(this,e),e.value):null}del(e){pd(this,this[Ki].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let i=e[n],o=i.e||0;if(o===0)this.set(i.k,i.v);else{let s=o-t;s>0&&this.set(i.k,i.v,s)}}}prune(){this[Ki].forEach((e,t)=>LE(this,t,!1))}},LE=(r,e,t)=>{let n=r[Ki].get(e);if(n){let i=n.value;if(kh(r,i)){if(pd(r,n),!r[Ap])return}else t&&(r[hA]&&(n.value.now=Date.now()),r[Or].unshiftNode(n));return i.value}},kh=(r,e)=>{if(!e||!e.maxAge&&!r[Pl])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Pl]&&t>r[Pl]},wp=r=>{if(r[As]>r[Cl])for(let e=r[Or].tail;r[As]>r[Cl]&&e!==null;){let t=e.prev;pd(r,e),e=t}},pd=(r,e)=>{if(e){let t=e.value;r[ws]&&r[ws](t.key,t.value),r[As]-=t.length,r[Ki].delete(t.key),r[Or].removeNode(e)}},ME=class{constructor(e,t,n,i,o){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=o||0}},gA=(r,e,t,n)=>{let i=t.value;kh(r,i)&&(pd(r,t),r[Ap]||(i=void 0)),i&&e.call(n,i.value,i.key,r)};yA.exports=FE});var Si=le((A6,EA)=>{var UE=class r{constructor(e,t){if(t=AV(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof YE)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(n=>this.parseRange(n)).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!TA(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&YV(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&MV)|(this.options.loose&&UV))+":"+e,i=_A.get(n);if(i)return i;let o=this.options.loose,s=o?Ln[mn.HYPHENRANGELOOSE]:Ln[mn.HYPHENRANGE];e=e.replace(s,$V(this.options.includePrerelease)),qt("hyphen replace",e),e=e.replace(Ln[mn.COMPARATORTRIM],kV),qt("comparator trim",e),e=e.replace(Ln[mn.TILDETRIM],LV),e=e.replace(Ln[mn.CARETTRIM],FV);let a=e.split(" ").map(d=>VV(d,this.options)).join(" ").split(/\s+/).map(d=>zV(d,this.options));o&&(a=a.filter(d=>(qt("loose invalid filter",d,this.options),!!d.match(Ln[mn.COMPARATORLOOSE])))),qt("range list",a);let c=new Map,l=a.map(d=>new YE(d,this.options));for(let d of l){if(TA(d))return[d];c.set(d.value,d)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return _A.set(n,u),u}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>bA(n,t)&&e.set.some(i=>bA(i,t)&&n.every(o=>i.every(s=>o.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new OV(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(JV(this.set[t],e,this.options))return!0;return!1}};EA.exports=UE;var wV=SA(),_A=new wV({max:1e3}),AV=Ph(),YE=Op(),qt=Np(),OV=on(),{safeRe:Ln,t:mn,comparatorTrimReplace:kV,tildeTrimReplace:LV,caretTrimReplace:FV}=ud(),{FLAG_INCLUDE_PRERELEASE:MV,FLAG_LOOSE:UV}=Ip(),TA=r=>r.value==="<0.0.0-0",YV=r=>r.value==="",bA=(r,e)=>{let t=!0,n=r.slice(),i=n.pop();for(;t&&n.length;)t=n.every(o=>i.intersects(o,e)),i=n.pop();return t},VV=(r,e)=>(qt("comp",r,e),r=HV(r,e),qt("caret",r),r=jV(r,e),qt("tildes",r),r=BV(r,e),qt("xrange",r),r=WV(r,e),qt("stars",r),r),gn=r=>!r||r.toLowerCase()==="x"||r==="*",jV=(r,e)=>r.trim().split(/\s+/).map(t=>qV(t,e)).join(" "),qV=(r,e)=>{let t=e.loose?Ln[mn.TILDELOOSE]:Ln[mn.TILDE];return r.replace(t,(n,i,o,s,a)=>{qt("tilde",r,n,i,o,s,a);let c;return gn(i)?c="":gn(o)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:gn(s)?c=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:a?(qt("replaceTilde pr",a),c=`>=${i}.${o}.${s}-${a} <${i}.${+o+1}.0-0`):c=`>=${i}.${o}.${s} <${i}.${+o+1}.0-0`,qt("tilde return",c),c})},HV=(r,e)=>r.trim().split(/\s+/).map(t=>KV(t,e)).join(" "),KV=(r,e)=>{qt("caret",r,e);let t=e.loose?Ln[mn.CARETLOOSE]:Ln[mn.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(i,o,s,a,c)=>{qt("caret",r,i,o,s,a,c);let l;return gn(o)?l="":gn(s)?l=`>=${o}.0.0${n} <${+o+1}.0.0-0`:gn(a)?o==="0"?l=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`:c?(qt("replaceCaret pr",c),o==="0"?s==="0"?l=`>=${o}.${s}.${a}-${c} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a}-${c} <${+o+1}.0.0-0`):(qt("no pr"),o==="0"?s==="0"?l=`>=${o}.${s}.${a}${n} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}${n} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),qt("caret return",l),l})},BV=(r,e)=>(qt("replaceXRanges",r,e),r.split(/\s+/).map(t=>GV(t,e)).join(" ")),GV=(r,e)=>{r=r.trim();let t=e.loose?Ln[mn.XRANGELOOSE]:Ln[mn.XRANGE];return r.replace(t,(n,i,o,s,a,c)=>{qt("xRange",r,n,i,o,s,a,c);let l=gn(o),u=l||gn(s),d=u||gn(a),f=d;return i==="="&&f&&(i=""),c=e.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&f?(u&&(s=0),a=0,i===">"?(i=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):i==="<="&&(i="<",u?o=+o+1:s=+s+1),i==="<"&&(c="-0"),n=`${i+o}.${s}.${a}${c}`):u?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),qt("xRange return",n),n})},WV=(r,e)=>(qt("replaceStars",r,e),r.trim().replace(Ln[mn.STAR],"")),zV=(r,e)=>(qt("replaceGTE0",r,e),r.trim().replace(Ln[e.includePrerelease?mn.GTE0PRE:mn.GTE0],"")),$V=r=>(e,t,n,i,o,s,a,c,l,u,d,f,v)=>(gn(n)?t="":gn(i)?t=`>=${n}.0.0${r?"-0":""}`:gn(o)?t=`>=${n}.${i}.0${r?"-0":""}`:s?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,gn(l)?c="":gn(u)?c=`<${+l+1}.0.0-0`:gn(d)?c=`<${l}.${+u+1}.0-0`:f?c=`<=${l}.${u}.${d}-${f}`:r?c=`<${l}.${u}.${+d+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),JV=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(qt(r[n].semver),r[n].semver!==YE.ANY&&r[n].semver.prerelease.length>0){let i=r[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Op=le((O6,NA)=>{var kp=Symbol("SemVer ANY"),qE=class r{static get ANY(){return kp}constructor(e,t){if(t=CA(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),jE("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===kp?this.value="":this.value=this.operator+this.semver.version,jE("comp",this)}parse(e){let t=this.options.loose?PA[xA.COMPARATORLOOSE]:PA[xA.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new DA(n[2],this.options.loose):this.semver=kp}toString(){return this.value}test(e){if(jE("Comparator.test",e,this.options.loose),this.semver===kp||e===kp)return!0;if(typeof e=="string")try{e=new DA(e,this.options)}catch{return!1}return VE(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new IA(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new IA(this.value,t).test(e.semver):(t=CA(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||VE(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||VE(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};NA.exports=qE;var CA=Ph(),{safeRe:PA,t:xA}=ud(),VE=OE(),jE=Np(),DA=on(),IA=Si()});var Lp=le((k6,RA)=>{var XV=Si(),QV=(r,e,t)=>{try{e=new XV(e,t)}catch{return!1}return e.test(r)};RA.exports=QV});var AA=le((L6,wA)=>{var ZV=Si(),ej=(r,e)=>new ZV(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));wA.exports=ej});var kA=le((F6,OA)=>{var tj=on(),rj=Si(),nj=(r,e,t)=>{let n=null,i=null,o=null;try{o=new rj(e,t)}catch{return null}return r.forEach(s=>{o.test(s)&&(!n||i.compare(s)===-1)&&(n=s,i=new tj(n,t))}),n};OA.exports=nj});var FA=le((M6,LA)=>{var ij=on(),oj=Si(),sj=(r,e,t)=>{let n=null,i=null,o=null;try{o=new oj(e,t)}catch{return null}return r.forEach(s=>{o.test(s)&&(!n||i.compare(s)===1)&&(n=s,i=new ij(n,t))}),n};LA.exports=sj});var YA=le((U6,UA)=>{var HE=on(),aj=Si(),MA=Rp(),cj=(r,e)=>{r=new aj(r,e);let t=new HE("0.0.0");if(r.test(t)||(t=new HE("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let i=r.set[n],o=null;i.forEach(s=>{let a=new HE(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||MA(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!t||MA(t,o))&&(t=o)}return t&&r.test(t)?t:null};UA.exports=cj});var jA=le((Y6,VA)=>{var lj=Si(),uj=(r,e)=>{try{return new lj(r,e).range||"*"}catch{return null}};VA.exports=uj});var Lh=le((V6,BA)=>{var dj=on(),KA=Op(),{ANY:fj}=KA,pj=Si(),vj=Lp(),qA=Rp(),HA=Nh(),mj=wh(),gj=Rh(),hj=(r,e,t,n)=>{r=new dj(r,n),e=new pj(e,n);let i,o,s,a,c;switch(t){case">":i=qA,o=mj,s=HA,a=">",c=">=";break;case"<":i=HA,o=gj,s=qA,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(vj(r,e,n))return!1;for(let l=0;l<e.set.length;++l){let u=e.set[l],d=null,f=null;if(u.forEach(v=>{v.semver===fj&&(v=new KA(">=0.0.0")),d=d||v,f=f||v,i(v.semver,d.semver,n)?d=v:s(v.semver,f.semver,n)&&(f=v)}),d.operator===a||d.operator===c||(!f.operator||f.operator===a)&&o(r,f.semver))return!1;if(f.operator===c&&s(r,f.semver))return!1}return!0};BA.exports=hj});var WA=le((j6,GA)=>{var yj=Lh(),Sj=(r,e,t)=>yj(r,e,">",t);GA.exports=Sj});var $A=le((q6,zA)=>{var _j=Lh(),Tj=(r,e,t)=>_j(r,e,"<",t);zA.exports=Tj});var QA=le((H6,XA)=>{var JA=Si(),bj=(r,e,t)=>(r=new JA(r,t),e=new JA(e,t),r.intersects(e,t));XA.exports=bj});var e0=le((K6,ZA)=>{var Ej=Lp(),Cj=yi();ZA.exports=(r,e,t)=>{let n=[],i=null,o=null,s=r.sort((u,d)=>Cj(u,d,t));for(let u of s)Ej(u,e,t)?(o=u,i||(i=u)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);let a=[];for(let[u,d]of n)u===d?a.push(u):!d&&u===s[0]?a.push("*"):d?u===s[0]?a.push(`<=${d}`):a.push(`${u} - ${d}`):a.push(`>=${u}`);let c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var s0=le((B6,o0)=>{var t0=Si(),BE=Op(),{ANY:KE}=BE,Fp=Lp(),GE=yi(),Pj=(r,e,t={})=>{if(r===e)return!0;r=new t0(r,t),e=new t0(e,t);let n=!1;e:for(let i of r.set){for(let o of e.set){let s=Dj(i,o,t);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},xj=[new BE(">=0.0.0-0")],r0=[new BE(">=0.0.0")],Dj=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===KE){if(e.length===1&&e[0].semver===KE)return!0;t.includePrerelease?r=xj:r=r0}if(e.length===1&&e[0].semver===KE){if(t.includePrerelease)return!0;e=r0}let n=new Set,i,o;for(let v of r)v.operator===">"||v.operator===">="?i=n0(i,v,t):v.operator==="<"||v.operator==="<="?o=i0(o,v,t):n.add(v.semver);if(n.size>1)return null;let s;if(i&&o){if(s=GE(i.semver,o.semver,t),s>0)return null;if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let v of n){if(i&&!Fp(v,String(i),t)||o&&!Fp(v,String(o),t))return null;for(let m of e)if(!Fp(v,String(m),t))return!1;return!0}let a,c,l,u,d=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1,f=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;d&&d.prerelease.length===1&&o.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let v of e){if(u=u||v.operator===">"||v.operator===">=",l=l||v.operator==="<"||v.operator==="<=",i){if(f&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===f.major&&v.semver.minor===f.minor&&v.semver.patch===f.patch&&(f=!1),v.operator===">"||v.operator===">="){if(a=n0(i,v,t),a===v&&a!==i)return!1}else if(i.operator===">="&&!Fp(i.semver,String(v),t))return!1}if(o){if(d&&v.semver.prerelease&&v.semver.prerelease.length&&v.semver.major===d.major&&v.semver.minor===d.minor&&v.semver.patch===d.patch&&(d=!1),v.operator==="<"||v.operator==="<="){if(c=i0(o,v,t),c===v&&c!==o)return!1}else if(o.operator==="<="&&!Fp(o.semver,String(v),t))return!1}if(!v.operator&&(o||i)&&s!==0)return!1}return!(i&&l&&!o&&s!==0||o&&u&&!i&&s!==0||f||d)},n0=(r,e,t)=>{if(!r)return e;let n=GE(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},i0=(r,e,t)=>{if(!r)return e;let n=GE(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};o0.exports=Pj});var u0=le((G6,l0)=>{var WE=ud(),a0=Ip(),Ij=on(),c0=NE(),Nj=bl(),Rj=Dw(),wj=Nw(),Aj=Aw(),Oj=Lw(),kj=Mw(),Lj=Yw(),Fj=jw(),Mj=Hw(),Uj=yi(),Yj=Ww(),Vj=$w(),jj=Ih(),qj=Zw(),Hj=tA(),Kj=Rp(),Bj=Nh(),Gj=wE(),Wj=AE(),zj=Rh(),$j=wh(),Jj=OE(),Xj=uA(),Qj=Op(),Zj=Si(),eq=Lp(),tq=AA(),rq=kA(),nq=FA(),iq=YA(),oq=jA(),sq=Lh(),aq=WA(),cq=$A(),lq=QA(),uq=e0(),dq=s0();l0.exports={parse:Nj,valid:Rj,clean:wj,inc:Aj,diff:Oj,major:kj,minor:Lj,patch:Fj,prerelease:Mj,compare:Uj,rcompare:Yj,compareLoose:Vj,compareBuild:jj,sort:qj,rsort:Hj,gt:Kj,lt:Bj,eq:Gj,neq:Wj,gte:zj,lte:$j,cmp:Jj,coerce:Xj,Comparator:Qj,Range:Zj,satisfies:eq,toComparators:tq,maxSatisfying:rq,minSatisfying:nq,minVersion:iq,validRange:oq,outside:sq,gtr:aq,ltr:cq,intersects:lq,simplifyRange:uq,subset:dq,SemVer:Ij,re:WE.re,src:WE.src,tokens:WE.t,SEMVER_SPEC_VERSION:a0.SEMVER_SPEC_VERSION,RELEASE_TYPES:a0.RELEASE_TYPES,compareIdentifiers:c0.compareIdentifiers,rcompareIdentifiers:c0.rcompareIdentifiers}});var vd,d0,ve,Qt=E(()=>{"use strict";vd=U(u0()),d0=U(require("vscode")),ve=class r{constructor(e,t,n){this.displayName=e;this.version=t;this.fullVersionString=n}displayName;version;fullVersionString;static fromSimpleString(e){return new r(e,e,e)}static defaultVersion=r.fromSimpleString("1.0.0");static v380=r.fromSimpleString("3.8.0");static v390=r.fromSimpleString("3.9.0");static v400=r.fromSimpleString("4.0.0");static v401=r.fromSimpleString("4.0.1");static v420=r.fromSimpleString("4.2.0");static v430=r.fromSimpleString("4.3.0");static v440=r.fromSimpleString("4.4.0");static v460=r.fromSimpleString("4.6.0");static v470=r.fromSimpleString("4.7.0");static v490=r.fromSimpleString("4.9.0");static v500=r.fromSimpleString("5.0.0");static v510=r.fromSimpleString("5.1.0");static v520=r.fromSimpleString("5.2.0");static v544=r.fromSimpleString("5.4.4");static v540=r.fromSimpleString("5.4.0");static v560=r.fromSimpleString("5.6.0");static v570=r.fromSimpleString("5.7.0");static v590=r.fromSimpleString("5.9.0");static fromVersionString(e){let t=vd.valid(e);if(!t)return new r(d0.l10n.t("invalid version"),"1.0.0","1.0.0");let n=e.indexOf("-");return n>=0&&(t=t.substr(0,n)),new r(e,t,e)}eq(e){return vd.eq(this.version,e.version)}gte(e){return vd.gte(this.version,e.version)}lt(e){return!this.gte(e)}isYarnPnp(){return this.fullVersionString.includes("-sdk")}}});var f0,fq,It,ko=E(()=>{"use strict";f0=U(require("vscode")),fq=f0.Disposable.from(),It={isCancellationRequested:!1,onCancellationRequested:()=>fq}});function xl(r){return r.startsWith("/dev/null/")}function zE(r,e,t){let n={module:r.gte(ve.v540)?"Preserve":"ESNext",moduleResolution:r.gte(ve.v540)?"Bundler":"Node",target:"ES2022",jsx:"react-jsx"};return r.gte(ve.v500)&&(n.allowImportingTsExtensions=!0),n.checkJs=t.implicitProjectConfiguration.checkJs,t.implicitProjectConfiguration.checkJs&&e===0&&(n.allowJs=!0),n.experimentalDecorators=t.implicitProjectConfiguration.experimentalDecorators,n.strictNullChecks=t.implicitProjectConfiguration.strictNullChecks,n.strictFunctionTypes=t.implicitProjectConfiguration.strictFunctionTypes,n.strict=t.implicitProjectConfiguration.strict,t.implicitProjectConfiguration.module&&(n.module=t.implicitProjectConfiguration.module),t.implicitProjectConfiguration.target&&(n.target=t.implicitProjectConfiguration.target),e===0&&(n.sourceMap=!0),n}function pq(r,e,t){let n=zE(r,e,t);e===0&&delete n.allowImportingTsExtensions;let i=Object.keys(n).map(o=>`"${o}": ${JSON.stringify(n[o])}`);return new Tt.SnippetString(`{
	"compilerOptions": {
		${i.join(`,
		`)}$0
	},
	"exclude": [
		"node_modules",
		"**/node_modules/*"
	]
}`)}async function Mp(r,e,t,n){let i=Tt.Uri.joinPath(t,e===0?"tsconfig.json":"jsconfig.json"),o=Tt.window.activeTextEditor?.viewColumn;try{let s=await Tt.workspace.openTextDocument(i);return Tt.window.showTextDocument(s,o)}catch{let s=await Tt.workspace.openTextDocument(i.with({scheme:"untitled"})),a=await Tt.window.showTextDocument(s,o);return a.document.getText().length===0&&await a.insertSnippet(pq(r,e,n)),a}}async function $E(r,e,t,n){if(!xl(n)){let s=await Tt.workspace.openTextDocument(e.toResource(n));Tt.window.showTextDocument(s,Tt.window.activeTextEditor?.viewColumn);return}let i={title:r===0?Tt.l10n.t("Configure tsconfig.json"):Tt.l10n.t("Configure jsconfig.json")};if(await Tt.window.showInformationMessage(r===0?Tt.l10n.t("File is not part of a TypeScript project. View the [tsconfig.json documentation]({0}) to learn more.","https://go.microsoft.com/fwlink/?linkid=841896"):Tt.l10n.t("File is not part of a JavaScript project. View the [jsconfig.json documentation]({0}) to learn more.","https://go.microsoft.com/fwlink/?linkid=759670"),i)===i){Mp(e.apiVersion,r,t,e.configuration);return}}async function Up(r,e,t){let n=e.getWorkspaceRootForResource(t);if(!n){Tt.window.showInformationMessage(Tt.l10n.t("Please open a folder in VS Code to use a TypeScript or JavaScript project"));return}let i=e.toTsFilePath(t);if(!i||!e.toTsFilePath(t)){Tt.window.showWarningMessage(Tt.l10n.t("Could not determine TypeScript or JavaScript project. Unsupported file type"));return}let o;try{o=await e.execute("projectInfo",{file:i,needFileNameList:!1},It)}catch{}if(o?.type!=="response"||!o.body){Tt.window.showWarningMessage(Tt.l10n.t("Could not determine TypeScript or JavaScript project"));return}return $E(r,e,n,o.body.configFileName)}var Tt,md=E(()=>{"use strict";Tt=U(require("vscode"));Qt();ko()});function Lo(r){return XE.languages.match([Dl,Os,ja,qa],r)>0}function Il(r){return XE.languages.match([Dl,Os],r)>0}var XE,Dl,Os,ja,qa,Uh,_i=E(()=>{"use strict";XE=U(require("vscode")),Dl="typescript",Os="typescriptreact",ja="javascript",qa="javascriptreact",Uh=[ja,qa,Dl,Os]});var Nl,gd,ZE=E(()=>{"use strict";Nl=U(require("vscode"));_i();gd=class r{static id="_typescript.learnMoreAboutRefactorings";id=r.id;execute(){let e=Nl.window.activeTextEditor&&Il(Nl.window.activeTextEditor.document)?"https://go.microsoft.com/fwlink/?linkid=2114477":"https://go.microsoft.com/fwlink/?linkid=2116761";Nl.env.openExternal(Nl.Uri.parse(e))}}});var Ka,Ha,eC=E(()=>{"use strict";Ka=U(require("vscode")),Ha=class r{static id="_typescript.openJsDocLink";id=r.id;async execute(e){let{line:t,character:n}=e.position,i=new Ka.Position(t,n);await Ka.commands.executeCommand("vscode.open",Ka.Uri.from(e.file),{selection:new Ka.Range(i,i)})}}});function ks(r,e,t=(n,i)=>n===i){return r===e?!0:r.length!==e.length?!1:r.every((n,i)=>t(n,e[i]))}function Pr(r){return r.filter(e=>!!e)}var Yp,Ti=E(()=>{"use strict";Yp=Object.freeze([])});function Bi(r,e){if(r===e)return!0;if(r==null||e===null||e===void 0||typeof r!=typeof e||typeof r!="object"||Array.isArray(r)!==Array.isArray(e))return!1;if(Array.isArray(r))return ks(r,e,Bi);{let t=[];for(let i in r)t.push(i);t.sort();let n=[];for(let i in e)n.push(i);return n.sort(),ks(t,n)?t.every(i=>Bi(r[i],e[i])):!1}}var Vp=E(()=>{"use strict";Ti()});var oC=le(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.TargetPopulation=Wa.Filters=Wa.VSCodeFilterProvider=void 0;var zh=require("vscode"),iC=class r{constructor(e,t,n){this.extensionName=e,this.extensionVersion=t,this.targetPopulation=n}static trimVersionSuffix(e){let t=/\-[a-zA-Z0-9]+$/;return e.split(t)[0]}getFilterValue(e){switch(e){case Mo.ApplicationVersion:return r.trimVersionSuffix(zh.version);case Mo.Build:return zh.env.appName;case Mo.ClientId:return zh.env.machineId;case Mo.ExtensionName:return this.extensionName;case Mo.ExtensionVersion:return r.trimVersionSuffix(this.extensionVersion);case Mo.Language:return zh.env.language;case Mo.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let e=new Map,t=Object.values(Mo);for(let n of t)e.set(n,this.getFilterValue(n));return e}};Wa.VSCodeFilterProvider=iC;var Mo;(function(r){r.Market="X-MSEdge-Market",r.CorpNet="X-FD-Corpnet",r.ApplicationVersion="X-VSCode-AppVersion",r.Build="X-VSCode-Build",r.ClientId="X-MSEdge-ClientId",r.ExtensionName="X-VSCode-ExtensionName",r.ExtensionVersion="X-VSCode-ExtensionVersion",r.Language="X-VSCode-Language",r.TargetPopulation="X-VSCode-TargetPopulation"})(Mo||(Wa.Filters=Mo={}));var T0;(function(r){r.Team="team",r.Internal="internal",r.Insiders="insider",r.Public="public"})(T0||(Wa.TargetPopulation=T0={}))});var b0=le($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.BaseFeatureProvider=void 0;var sC=class{constructor(e){this.telemetry=e,this.isFetching=!1}async getFeatures(){if(this.isFetching&&this.fetchPromise)return this.fetchPromise;this.fetchPromise=this.fetch();let e=await this.fetchPromise;return this.isFetching=!1,this.fetchPromise=void 0,e}};$h.BaseFeatureProvider=sC});var E0=le(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});Jh.FilteredFeatureProvider=void 0;var gq=b0(),aC=class extends gq.BaseFeatureProvider{constructor(e,t){super(e),this.telemetry=e,this.filterProviders=t,this.cachedTelemetryEvents=[]}getFilters(){let e=new Map;for(let t of this.filterProviders){let n=t.getFilters();for(let i of n.keys()){let o=n.get(i);e.set(i,o)}}return e}PostEventToTelemetry(e){if(this.cachedTelemetryEvents.includes(e))return;let t=JSON.stringify(e);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",t]])),this.cachedTelemetryEvents.push(e)}};Jh.FilteredFeatureProvider=aC});var C0=le(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.TasApiFeatureProvider=za.TASAPI_FETCHERROR_EVENTNAME=void 0;var hq=E0();za.TASAPI_FETCHERROR_EVENTNAME="call-tas-error";var cC="ErrorType",lC=class extends hq.FilteredFeatureProvider{constructor(e,t,n){super(t,n),this.httpClient=e,this.telemetry=t,this.filterProviders=n}async fetch(){let e=this.getFilters(),t={};for(let a of e.keys()){let c=e.get(a);t[a]=c}let n;try{n=await this.httpClient.get({headers:t})}catch(a){let c=a,l=new Map;c.responseReceived&&!c.responseOk?l.set(cC,"ServerError"):c.responseReceived===!1?l.set(cC,"NoResponse"):l.set(cC,"GenericError"),this.telemetry.postEvent(za.TASAPI_FETCHERROR_EVENTNAME,l)}if(!n)throw Error(za.TASAPI_FETCHERROR_EVENTNAME);e.keys.length>0&&this.PostEventToTelemetry(t);let i=n.data,o=i.Configs,s=[];for(let a of o)if(a.Parameters)for(let c of Object.keys(a.Parameters)){let l=c+(a.Parameters[c]?"":"cf");s.includes(l)||s.push(l)}return{features:s,assignmentContext:i.AssignmentContext,configs:o}}};za.TasApiFeatureProvider=lC});var P0=le(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.HttpClient=Sd.FetchError=void 0;var yd=class extends Error{constructor(e,t,n){super(e),this.responseReceived=t,this.responseOk=n}};Sd.FetchError=yd;var uC=class{constructor(e){this.endpoint=e}async get(e){let t=await fetch(this.endpoint,{method:"GET",headers:e?.headers});if(!t)throw new yd("No response received",!1);if(!t.ok)throw new yd("Response not ok",!0,!1);let n=await t.json();if(!n)throw new yd("No data received",!1);return{data:n}}};Sd.HttpClient=uC});var x0=le(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});Xh.MemoryKeyValueStorage=void 0;var dC=class{constructor(){this.storage=new Map}async getValue(e,t){return this.storage.has(e)?await Promise.resolve(this.storage.get(e)):await Promise.resolve(t||void 0)}setValue(e,t){this.storage.set(e,t)}};Xh.MemoryKeyValueStorage=dC});var D0=le(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.ExperimentationServiceBase=void 0;var yq=x0(),fC=class{get features(){return this._features}set features(e){this._features=e,this.telemetry&&this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext)}constructor(e,t,n,i,o){this.telemetry=e,this.assignmentContextTelemetryPropertyName=t,this.telemetryEventName=n,this.storageKey=i,this.storage=o,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(o=new yq.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise((s,a)=>{this.resolveInitialFetchPromise=s})}async getFeaturesAsync(e=!1){if(this.fetchPromise!=null){try{await this.fetchPromise}catch{}return this.features}if(!this.featureProviders||this.featureProviders.length===0)return Promise.resolve({features:[],assignmentContext:"",configs:[]});try{this.fetchPromise=Promise.all(this.featureProviders.map(async n=>await n.getFeatures()));let t=await this.fetchPromise;this.updateFeatures(t,e)}catch{}return this.fetchPromise=void 0,this.resolveInitialFetchPromise&&(this.resolveInitialFetchPromise(),this.resolveInitialFetchPromise=void 0),this.features}updateFeatures(e,t=!1){let n={features:[],assignmentContext:"",configs:[]};for(let i of e){for(let o of i.features)n.features.includes(o)||n.features.push(o);for(let o of i.configs){let s=n.configs.find(a=>a.Id===o.Id);s?s.Parameters=Object.assign(Object.assign({},s.Parameters),o.Parameters):n.configs.push(o)}n.assignmentContext+=i.assignmentContext}(t||!this.featuresConsumed)&&(this.features=n),this.storage&&this.storage.setValue(this.storageKey,n)}async loadCachedFeatureData(){let e;this.storage&&(e=await this.storage.getValue(this.storageKey),e!==void 0&&e.configs===void 0&&(e.configs=[])),this.features.features.length===0&&(this.features=e||{features:[],assignmentContext:"",configs:[]})}isFlightEnabled(e){return this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isCachedFlightEnabled(e){return await this.loadCachePromise,this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isFlightEnabledAsync(e){let t=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(e),t.features.includes(e)}getTreatmentVariable(e,t){this.featuresConsumed=!0,this.PostEventToTelemetry(`${e}.${t}`);let n=this.features.configs.find(i=>i.Id===e);return n?.Parameters[t]}async getTreatmentVariableAsync(e,t,n){if(n){let i=this.featuresConsumed,o=this.getTreatmentVariable(e,t);if(o===void 0)this.featuresConsumed=i;else return o}return await this.getFeaturesAsync(!0),this.getTreatmentVariable(e,t)}PostEventToTelemetry(e){this.cachedTelemetryEvents.includes(e)||(this.telemetry.postEvent(this.telemetryEventName,new Map([["ABExp.queriedFeature",e]])),this.cachedTelemetryEvents.push(e))}invokeInit(){this.init()}addFeatureProvider(...e){if(!(e==null||this.featureProviders==null))for(let t of e)this.featureProviders.push(t)}};Qh.ExperimentationServiceBase=fC});var I0=le(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});Zh.PollingService=void 0;var pC=class{constructor(e){this.fetchInterval=e}StopPolling(){clearInterval(this.intervalHandle),this.intervalHandle=void 0}OnPollTick(e){this.onTick=e}StartPolling(e=!1){this.intervalHandle&&this.StopPolling(),this.onTick!=null&&(e&&this.onTick().then(()=>{}).catch(()=>{}),this.intervalHandle=setInterval(async()=>{await this.onTick()},this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}};Zh.PollingService=pC});var N0=le(ey=>{"use strict";Object.defineProperty(ey,"__esModule",{value:!0});ey.ExperimentationServiceAutoPolling=void 0;var Sq=D0(),_q=I0(),vC=class extends Sq.ExperimentationServiceBase{constructor(e,t,n,i,o,s,a){if(super(e,i,o,s,a),this.telemetry=e,this.filterProviders=t,this.refreshRateMs=n,this.assignmentContextTelemetryPropertyName=i,this.telemetryEventName=o,this.storageKey=s,this.storage=a,n<1e3&&n!==0)throw new Error("The minimum refresh rate for polling is 1000 ms (1 second). If you wish to deactivate this auto-polling use value of 0.");n>0&&(this.pollingService=new _q.PollingService(n),this.pollingService.OnPollTick(async()=>{await super.getFeaturesAsync()}))}init(){this.pollingService?this.pollingService.StartPolling(!0):super.getFeaturesAsync()}async getFeaturesAsync(e=!1){if(this.pollingService){this.pollingService.StopPolling();let t=await super.getFeaturesAsync(e);return this.pollingService.StartPolling(),t}else return await super.getFeaturesAsync(e)}};ey.ExperimentationServiceAutoPolling=vC});var R0=le(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.ExperimentationService=void 0;var Tq=C0(),bq=P0(),Eq=N0(),ty=class extends Eq.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],e.refetchInterval!=null?e.refetchInterval:0,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new Tq.TasApiFeatureProvider(new bq.HttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}};ry.ExperimentationService=ty;ty.REFRESH_RATE_IN_MINUTES=30});var w0=le(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});ny.ExperimentationService=void 0;var Cq=R0();Object.defineProperty(ny,"ExperimentationService",{enumerable:!0,get:function(){return Cq.ExperimentationService}})});var A0=le(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.MementoKeyValueStorage=void 0;var mC=class{constructor(e){this.mementoGlobalStorage=e}async getValue(e,t){return await this.mementoGlobalStorage.get(e)||t}setValue(e,t){this.mementoGlobalStorage.update(e,t)}};iy.MementoKeyValueStorage=mC});var O0=le(hC=>{"use strict";Object.defineProperty(hC,"__esModule",{value:!0});var gC=class{constructor(){this.initializePromise=Promise.resolve(),this.initialFetch=Promise.resolve()}isFlightEnabled(e){return!1}isCachedFlightEnabled(e){return Promise.resolve(!1)}isFlightEnabledAsync(e){return Promise.resolve(!1)}getTreatmentVariable(e,t){}getTreatmentVariableAsync(e,t){return Promise.resolve(void 0)}};hC.default=gC});var L0=le(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.getExperimentationServiceAsync=_d.getExperimentationService=void 0;var Pq=oC(),xq=w0(),yC=require("vscode"),Dq=A0(),Iq=O0(),Nq="https://default.exp-tas.com/vscode/ab",Rq="query-expfeature",wq="abexp.assignmentcontext",Aq="VSCode.ABExp.FeatureData",Oq=1e3*60*30;function k0(r,e,t,n,i,...o){if(!i)throw new Error("Memento storage was not provided.");let s=yC.workspace.getConfiguration("telemetry");if(!(yC.env.isTelemetryEnabled===void 0?s.get("enableTelemetry",!0):yC.env.isTelemetryEnabled))return new Iq.default;let l=[new Pq.VSCodeFilterProvider(r,e,t),...o],u=new Dq.MementoKeyValueStorage(i);return new xq.ExperimentationService({filterProviders:l,telemetry:n,storageKey:Aq,keyValueStorage:u,featuresTelemetryPropertyName:"",assignmentContextTelemetryPropertyName:wq,telemetryEventName:Rq,endpoint:Nq,refetchInterval:Oq})}_d.getExperimentationService=k0;async function kq(r,e,t,n,i,...o){let s=k0(r,e,t,n,i,...o);return await s.initializePromise,s}_d.getExperimentationServiceAsync=kq});var M0=le($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.TargetPopulation=$a.getExperimentationServiceAsync=$a.getExperimentationService=void 0;var F0=L0();Object.defineProperty($a,"getExperimentationService",{enumerable:!0,get:function(){return F0.getExperimentationService}});Object.defineProperty($a,"getExperimentationServiceAsync",{enumerable:!0,get:function(){return F0.getExperimentationServiceAsync}});var Lq=oC();Object.defineProperty($a,"TargetPopulation",{enumerable:!0,get:function(){return Lq.TargetPopulation}})});function Y0(r){return/^tsconfig\.(.+\.)?json$/i.test((0,SC.basename)(r))}function Td(r){return/^[jt]sconfig\.(.+\.)?json$/i.test((0,SC.basename)(r))}function bd(r){return/\.(tsx?|mts|cts)$/i.test(r.fsPath)}function V0(r){return/\.(jsx?|mjs|cjs)$/i.test(r.fsPath)}var SC,_C,Xa=E(()=>{"use strict";SC=require("path");_i();_C=[{id:"typescript",diagnosticOwner:"typescript",diagnosticSource:"ts",diagnosticLanguage:1,languageIds:[Dl,Os],configFilePattern:/^tsconfig(\..*)?\.json$/i,standardFileExtensions:["ts","tsx","cts","mts"]},{id:"javascript",diagnosticOwner:"typescript",diagnosticSource:"ts",diagnosticLanguage:0,languageIds:[ja,qa],configFilePattern:/^jsconfig(\..*)?\.json$/i,standardFileExtensions:["js","jsx","cjs","mjs","es6","pac"]}]});function sn(){return!(typeof process=="object"&&process.versions.node)&&sy.env.uiKind===sy.UIKind.Web}function Qa(){return sn()&&!!globalThis.crossOriginIsolated}function j0(){return sn()&&typeof ReadableByteStreamController<"u"}var sy,Ed=E(()=>{"use strict";sy=U(require("vscode"))});function ay(){let r=[Mq,bC,EC,Cd];return sn()?[...(q0.workspace.workspaceFolders??[]).map(e=>e.uri.scheme),...r]:[Gi,...r]}function jp(r,...e){let t=r.scheme.toLowerCase();return e.some(n=>t===n)}var q0,Gi,Mq,TC,Uq,Yq,Vq,jq,bC,EC,H0,Cd,wl,Wi=E(()=>{"use strict";q0=U(require("vscode"));Ed();Gi="file",Mq="untitled",TC="git",Uq="github",Yq="azurerepos",Vq="chat-editing-text-model",jq="vsls",bC="walkThroughSnippet",EC="vscode-notebook-cell",H0="office-script",Cd="vscode-chat-code-block";wl=new Set([TC,jq,Uq,Yq,Vq])});async function Al(r){try{return!!((await cy.workspace.fs.stat(r)).type&cy.FileType.File)}catch{return!1}}function ly(r){return/^[a-zA-Z]:[\/\\]/.test(r)}var cy,uy=E(()=>{"use strict";cy=U(require("vscode"))});var Fn,dy=E(()=>{"use strict";Wi();uy();Fn=class r{constructor(e=r.defaultPathNormalizer,t){this._normalizePath=e;this.config=t}_normalizePath;config;static defaultPathNormalizer=e=>e.scheme===Gi?e.fsPath:e.toString(!0);_map=new Map;get size(){return this._map.size}has(e){let t=this.toKey(e);return!!t&&this._map.has(t)}get(e){let t=this.toKey(e);if(!t)return;let n=this._map.get(t);return n?n.value:void 0}set(e,t){let n=this.toKey(e);if(!n)return;let i=this._map.get(n);i?i.value=t:this._map.set(n,{resource:e,value:t})}delete(e){let t=this.toKey(e);t&&this._map.delete(t)}clear(){this._map.clear()}values(){return Array.from(this._map.values(),e=>e.value)}entries(){return this._map.values()}toKey(e){let t=this._normalizePath(e);return t&&(this.isCaseInsensitivePath(t)?t.toLowerCase():t)}isCaseInsensitivePath(e){return ly(e)?!0:e[0]==="/"&&this.config.onCaseInsensitiveFileSystem}}});function qq(r,e){return Bi(r,e)}function K0(r,e){return r===e?void 0:r}function CC(r,e){return{includeInlayParameterNameHints:Hq(r,e),includeInlayParameterNameHintsWhenArgumentMatchesName:!q(Uo.parameterNamesSuppressWhenArgumentMatchesName,!0,{scope:r,fallbackSection:e}),includeInlayFunctionParameterTypeHints:q(Uo.parameterTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayVariableTypeHints:q(Uo.variableTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayVariableTypeHintsWhenTypeMatchesName:!q(Uo.variableTypesSuppressWhenTypeMatchesName,!0,{scope:r,fallbackSection:e}),includeInlayPropertyDeclarationTypeHints:q(Uo.propertyDeclarationTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayFunctionLikeReturnTypeHints:q(Uo.functionLikeReturnTypesEnabled,!1,{scope:r,fallbackSection:e}),includeInlayEnumMemberValueHints:q(Uo.enumMemberValuesEnabled,!1,{scope:r,fallbackSection:e})}}function Hq(r,e){switch(q(Uo.parameterNamesEnabled,"none",{scope:r,fallbackSection:e})){case"none":return"none";case"literals":return"literals";case"all":return"all";default:return}}function Kq(r,e){switch(q("preferences.quoteStyle","auto",{scope:r,fallbackSection:e})){case"single":return"single";case"double":return"double";default:return"auto"}}function Bq(r,e){switch(q("preferences.importModuleSpecifier","shortest",{scope:r,fallbackSection:e})){case"project-relative":return"project-relative";case"relative":return"relative";case"non-relative":return"non-relative";default:return}}function Gq(r,e){switch(q("preferences.importModuleSpecifierEnding","auto",{scope:r,fallbackSection:e})){case"minimal":return"minimal";case"index":return"index";case"js":return"js";default:return"auto"}}function Wq(r,e){switch(q("preferences.jsxAttributeCompletionStyle","auto",{scope:r,fallbackSection:e})){case"braces":return"braces";case"none":return"none";default:return"auto"}}function zq(r,e){let t=q("preferences.organizeImports.unicodeCollation","ordinal",{scope:r,fallbackSection:e}),n=q("preferences.organizeImports.caseSensitivity","auto",{scope:r,fallbackSection:e});return{organizeImportsTypeOrder:K0(q("preferences.organizeImports.typeOrder","auto",{scope:r,fallbackSection:e}),"auto"),organizeImportsIgnoreCase:n==="caseInsensitive"?!0:n==="caseSensitive"?!1:"auto",organizeImportsCollation:t,...t==="unicode"?{organizeImportsCaseFirst:n==="caseInsensitive"?void 0:K0(q("preferences.organizeImports.caseFirst",!1,{scope:r,fallbackSection:e}),"default"),organizeImportsAccentCollation:q("preferences.organizeImports.accentCollation",void 0,{scope:r,fallbackSection:e}),organizeImportsLocale:q("preferences.organizeImports.locale",void 0,{scope:r,fallbackSection:e}),organizeImportsNumericCollation:q("preferences.organizeImports.numericCollation",void 0,{scope:r,fallbackSection:e})}:{}}}var Pd,Fs,qp,Uo,PC=E(()=>{"use strict";Pd=U(require("path")),Fs=U(require("vscode"));Wi();_i();Qt();jt();yt();Vp();dy();qp=class extends _e{constructor(t,n){super();this.client=t;this.formatOptions=new Fn(void 0,{onCaseInsensitiveFileSystem:n}),Fs.workspace.onDidCloseTextDocument(i=>{this.formatOptions.delete(i.uri)},void 0,this._disposables)}client;formatOptions;async ensureConfigurationForDocument(t,n){let i=this.getFormattingOptions(t)??{tabSize:void 0,insertSpaces:void 0};return this.ensureConfigurationOptions(t,i,n)}getFormattingOptions(t){let n=Fs.window.visibleTextEditors.find(i=>i.document.uri.toString()===t.uri.toString());if(n)return{tabSize:typeof n.options.tabSize=="number"?n.options.tabSize:void 0,insertSpaces:typeof n.options.insertSpaces=="boolean"?n.options.insertSpaces:void 0}}async ensureConfigurationOptions(t,n,i){let o=this.client.toOpenTsFilePath(t);if(!o)return;let s=this.getFileOptions(t,n),a=this.formatOptions.get(t.uri);if(a){let l=await a;if(i.isCancellationRequested||l&&qq(l,s))return}let c=(async()=>{try{return(await this.client.execute("configure",{file:o,...s},i)).type==="response"?s:void 0}catch{return}})();this.formatOptions.set(t.uri,c),await c}async setGlobalConfigurationFromDocument(t,n){let i=this.getFormattingOptions(t);if(!i)return;let o={file:void 0,...this.getFileOptions(t,i)};await this.client.execute("configure",o,n)}reset(){this.formatOptions.clear()}getFileOptions(t,n){return{formatOptions:this.getFormatOptions(t,n),preferences:this.getPreferences(t)}}getFormatOptions(t,n){let i=Il(t)?"typescript":"javascript";return{tabSize:n.tabSize,indentSize:n.tabSize,convertTabsToSpaces:n.insertSpaces,newLineCharacter:`
`,insertSpaceAfterCommaDelimiter:q("format.insertSpaceAfterCommaDelimiter",!0,{scope:t,fallbackSection:i}),insertSpaceAfterConstructor:q("format.insertSpaceAfterConstructor",!1,{scope:t,fallbackSection:i}),insertSpaceAfterSemicolonInForStatements:q("format.insertSpaceAfterSemicolonInForStatements",!0,{scope:t,fallbackSection:i}),insertSpaceBeforeAndAfterBinaryOperators:q("format.insertSpaceBeforeAndAfterBinaryOperators",!0,{scope:t,fallbackSection:i}),insertSpaceAfterKeywordsInControlFlowStatements:q("format.insertSpaceAfterKeywordsInControlFlowStatements",!0,{scope:t,fallbackSection:i}),insertSpaceAfterFunctionKeywordForAnonymousFunctions:q("format.insertSpaceAfterFunctionKeywordForAnonymousFunctions",!0,{scope:t,fallbackSection:i}),insertSpaceBeforeFunctionParenthesis:q("format.insertSpaceBeforeFunctionParenthesis",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:q("format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:q("format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:q("format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces",!0,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingEmptyBraces:q("format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces",!0,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:q("format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces",!1,{scope:t,fallbackSection:i}),insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:q("format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces",!1,{scope:t,fallbackSection:i}),insertSpaceAfterTypeAssertion:q("format.insertSpaceAfterTypeAssertion",!1,{scope:t,fallbackSection:i}),placeOpenBraceOnNewLineForFunctions:q("format.placeOpenBraceOnNewLineForFunctions",!1,{scope:t,fallbackSection:i}),placeOpenBraceOnNewLineForControlBlocks:q("format.placeOpenBraceOnNewLineForControlBlocks",!1,{scope:t,fallbackSection:i}),semicolons:q("format.semicolons","ignore",{scope:t,fallbackSection:i}),indentSwitchCase:q("format.indentSwitchCase",!0,{scope:t,fallbackSection:i})}}getPreferences(t){let n=Il(t)?"typescript":"javascript";return{...Fs.workspace.getConfiguration(n,t).get("unstable"),quotePreference:Kq(t,n),importModuleSpecifierPreference:Bq(t,n),importModuleSpecifierEnding:Gq(t,n),jsxAttributeCompletionStyle:Wq(t,n),allowTextChangesInNewFiles:t.uri.scheme===Gi,providePrefixAndSuffixTextForRename:q("preferences.useAliasesForRenames",!0,{scope:t,fallbackSection:n}),allowRenameOfImportPath:!0,includeAutomaticOptionalChainCompletions:q("suggest.includeAutomaticOptionalChainCompletions",!0,{scope:t,fallbackSection:n}),provideRefactorNotApplicableReason:!0,generateReturnInDocTemplate:q("suggest.jsdoc.generateReturns",!0,{scope:t,fallbackSection:n}),includeCompletionsForImportStatements:q("suggest.includeCompletionsForImportStatements",!0,{scope:t,fallbackSection:n}),includeCompletionsWithSnippetText:!0,includeCompletionsWithClassMemberSnippets:q("suggest.classMemberSnippets.enabled",!0,{scope:t,fallbackSection:n}),includeCompletionsWithObjectLiteralMethodSnippets:q("suggest.objectLiteralMethodSnippets.enabled",!0,{scope:t,fallbackSection:n}),autoImportFileExcludePatterns:this.getAutoImportFileExcludePatternsPreference(t,n,Fs.workspace.getWorkspaceFolder(t.uri)?.uri),autoImportSpecifierExcludeRegexes:q("preferences.autoImportSpecifierExcludeRegexes",void 0,{scope:t,fallbackSection:n}),preferTypeOnlyAutoImports:q("preferences.preferTypeOnlyAutoImports",!1,{scope:t,fallbackSection:n}),useLabelDetailsInCompletionEntries:!0,allowIncompleteCompletions:!0,displayPartsForJSDoc:!0,disableLineTextInReferences:!0,interactiveInlayHints:!0,includeCompletionsForModuleExports:q("suggest.autoImports",!0,{scope:t,fallbackSection:n}),...CC(t,n),...zq(t,n),maximumHoverLength:this.getMaximumHoverLength(t)}}getAutoImportFileExcludePatternsPreference(t,n,i){let o=q("preferences.autoImportFileExcludePatterns",void 0,{scope:t,fallbackSection:n});return i&&o?.map(s=>{let a=/^\.\.?($|[\/\\])/.test(s),c=this.client.apiVersion.gte(ve.v540)?"":Pd.parse(this.client.toTsFilePath(i)).root;return Pd.isAbsolute(s)?s:s.startsWith("*")?c+s:a?this.client.toTsFilePath(Fs.Uri.joinPath(i,s)):c+"**"+Pd.sep+s})}getMaximumHoverLength(t){let i=Fs.workspace.getConfiguration("js/ts",t).get("hover.maximumLength",500);return!Number.isSafeInteger(i)||i<=0?500:i}};Uo=Object.freeze({parameterNamesEnabled:"inlayHints.parameterNames.enabled",parameterNamesSuppressWhenArgumentMatchesName:"inlayHints.parameterNames.suppressWhenArgumentMatchesName",parameterTypesEnabled:"inlayHints.parameterTypes.enabled",variableTypesEnabled:"inlayHints.variableTypes.enabled",variableTypesSuppressWhenTypeMatchesName:"inlayHints.variableTypes.suppressWhenTypeMatchesName",propertyDeclarationTypesEnabled:"inlayHints.propertyDeclarationTypes.enabled",functionLikeReturnTypesEnabled:"inlayHints.functionLikeReturnTypes.enabled",enumMemberValuesEnabled:"inlayHints.enumMemberValues.enabled"})});var xd,fy=E(()=>{"use strict";xd=Object.freeze({file:"file",untitled:"untitled",mailto:"mailto",vscode:"vscode","vscode-insiders":"vscode-insiders",notebookCell:"vscode-notebook-cell"})});var Yo,Za,dt=E(()=>{"use strict";(n=>{class r{constructor(o){this.reason=o}reason;type="cancelled"}n.Cancelled=r,n.NoContent={type:"noContent"},n.NoServer={type:"noServer"}})(Yo||={});Za=class{capabilities;constructor(...e){this.capabilities=new Set(e)}has(e){return this.capabilities.has(e)}}});function Ms(r){return new Set(r.split(/,|\s+/g))}var Hp=E(()=>{"use strict"});var L,kl,Xn,Us,Mn=E(()=>{"use strict";L=class{static alias="alias";static callSignature="call";static class="class";static const="const";static constructorImplementation="constructor";static constructSignature="construct";static directory="directory";static enum="enum";static enumMember="enum member";static externalModuleName="external module name";static function="function";static indexSignature="index";static interface="interface";static keyword="keyword";static let="let";static localFunction="local function";static localVariable="local var";static method="method";static memberGetAccessor="getter";static memberSetAccessor="setter";static memberVariable="property";static module="module";static primitiveType="primitive type";static script="script";static type="type";static variable="var";static warning="warning";static string="string";static parameter="parameter";static typeParameter="type parameter"},kl=class{static error="error";static warning="warning";static suggestion="suggestion"},Xn=class r{static optional="optional";static deprecated="deprecated";static color="color";static dtsFile=".d.ts";static tsFile=".ts";static tsxFile=".tsx";static jsFile=".js";static jsxFile=".jsx";static jsonFile=".json";static fileExtensionKindModifiers=[r.dtsFile,r.tsFile,r.tsxFile,r.jsFile,r.jsxFile,r.jsonFile]},Us=class{static functionName="functionName";static methodName="methodName";static parameterName="parameterName";static propertyName="propertyName";static punctuation="punctuation";static text="text"}});var Ge,Se,ye,xr,ec,Wr,NC,RC,wC,Xe=E(()=>{"use strict";Ge=U(require("vscode"));Mn();(a=>(a.fromTextSpan=c=>(0,a.fromLocations)(c.start,c.end),a.toTextSpan=c=>({start:ye.toLocation(c.start),end:ye.toLocation(c.end)}),a.fromLocations=(c,l)=>new Ge.Range(Math.max(0,c.line-1),Math.max(c.offset-1,0),Math.max(0,l.line-1),Math.max(0,l.offset-1)),a.toFileRange=c=>({startLine:c.start.line+1,startOffset:c.start.character+1,endLine:c.end.line+1,endOffset:c.end.character+1}),a.toFileRangeRequestArgs=(c,l)=>({file:c,...(0,a.toFileRange)(l)}),a.toFileRangesRequestArgs=(c,l)=>({file:c,ranges:l.map(a.toFileRange)}),a.toFormattingRequestArgs=(c,l)=>({file:c,line:l.start.line+1,offset:l.start.character+1,endLine:l.end.line+1,endOffset:l.end.character+1})))(Se||={});(n=>(n.fromLocation=i=>new Ge.Position(i.line-1,i.offset-1),n.toLocation=i=>({line:i.line+1,offset:i.character+1}),n.toFileLocationRequestArgs=(i,o)=>({file:i,line:o.line+1,offset:o.character+1})))(ye||={});(e=>e.fromTextSpan=(t,n)=>new Ge.Location(t,Se.fromTextSpan(n)))(xr||={});(e=>e.fromCodeEdit=t=>new Ge.TextEdit(Se.fromTextSpan(t),t.newText))(ec||={});(t=>{function r(n,i){return e(new Ge.WorkspaceEdit,n,i)}t.fromFileCodeEdits=r;function e(n,i,o){for(let s of o){let a=i.toResource(s.fileName);for(let c of s.textChanges)n.replace(a,Se.fromTextSpan(c),c.newText)}return n}t.withFileCodeEdits=e})(Wr||={});(e=>{function r(t){switch(t){case L.module:return Ge.SymbolKind.Module;case L.class:return Ge.SymbolKind.Class;case L.enum:return Ge.SymbolKind.Enum;case L.enumMember:return Ge.SymbolKind.EnumMember;case L.interface:return Ge.SymbolKind.Interface;case L.indexSignature:return Ge.SymbolKind.Method;case L.callSignature:return Ge.SymbolKind.Method;case L.method:return Ge.SymbolKind.Method;case L.memberVariable:return Ge.SymbolKind.Property;case L.memberGetAccessor:return Ge.SymbolKind.Property;case L.memberSetAccessor:return Ge.SymbolKind.Property;case L.variable:return Ge.SymbolKind.Variable;case L.let:return Ge.SymbolKind.Variable;case L.const:return Ge.SymbolKind.Variable;case L.localVariable:return Ge.SymbolKind.Variable;case L.alias:return Ge.SymbolKind.Variable;case L.function:return Ge.SymbolKind.Function;case L.localFunction:return Ge.SymbolKind.Function;case L.constructSignature:return Ge.SymbolKind.Constructor;case L.constructorImplementation:return Ge.SymbolKind.Constructor;case L.typeParameter:return Ge.SymbolKind.TypeParameter;case L.string:return Ge.SymbolKind.String;default:return Ge.SymbolKind.Variable}}e.fromProtocolScriptElementKind=r})(NC||={});(e=>{function r(t){switch(t){case Ge.CompletionTriggerKind.Invoke:return 1;case Ge.CompletionTriggerKind.TriggerCharacter:return 2;case Ge.CompletionTriggerKind.TriggerForIncompleteCompletions:return 3}}e.toProtocolCompletionTriggerKind=r})(RC||={});(e=>{function r(t){switch(t){case"All":return"All";case"SortAndCombine":return"SortAndCombine";case"RemoveUnused":return"RemoveUnused"}}e.toProtocolOrganizeImportsMode=r})(wC||={})});function ke(r,e,t){return new AC(r,e,t)}function jo(r,e){return new Ys(()=>r.apiVersion.gte(e),r.onTsServerStarted)}function my(r,e){return new Ys(()=>dw(r,{fallbackSection:e}),tc.workspace.onDidChangeConfiguration)}function Dd(r,e){return new Ys(()=>!!q(r,void 0,e),tc.workspace.onDidChangeConfiguration)}function He(r,...e){return new Ys(()=>e.some(t=>r.capabilities.has(t)),r.onDidChangeCapabilities)}function B0(r){return new Ys(()=>r.some(e=>tc.extensions.getExtension(e)),tc.extensions.onDidChange)}var tc,Ys,AC,kt=E(()=>{"use strict";tc=U(require("vscode"));jt();yt();Ys=class extends _e{constructor(t,n){super();this.getValue=t;this._value=this.getValue(),n(()=>{let i=this.getValue();i!==this._value&&(this._value=i,this._onDidChange.fire())})}getValue;_value;get value(){return this._value}_onDidChange=this._register(new tc.EventEmitter);onDidChange=this._onDidChange.event},AC=class{constructor(e,t,n){this.conditions=e;this.doRegister=t;this.elseDoRegister=n;for(let i of e)i.onDidChange(()=>this.update());this.update()}conditions;doRegister;elseDoRegister;state;dispose(){this.state?.registration?.dispose(),this.state=void 0}update(){this.conditions.every(t=>t.value)?this.state?.enabled||(this.state?.registration?.dispose(),this.state={enabled:!0,registration:this.doRegister()}):(this.state?.enabled||!this.state)&&(this.state?.registration?.dispose(),this.state={enabled:!1,registration:this.elseDoRegister?.()})}}});var G0={};Be(G0,{register:()=>tH});function Qq(r){return r.kind===L.script||r.kind===L.module&&r.selectionSpan.start.line===1&&r.selectionSpan.start.offset===1}function hy(r){let e=Qq(r),t=e?yy.basename(r.file):r.name,n=e?Un.workspace.asRelativePath(yy.dirname(r.file)):r.containerName??"",i=new Un.CallHierarchyItem(NC.fromProtocolScriptElementKind(r.kind),t,n,Un.Uri.file(r.file),Se.fromTextSpan(r.span),Se.fromTextSpan(r.selectionSpan));return(r.kindModifiers?Ms(r.kindModifiers):void 0)?.has(Xn.deprecated)&&(i.tags=[Un.SymbolTag.Deprecated]),i}function Zq(r){return new Un.CallHierarchyIncomingCall(hy(r.from),r.fromSpans.map(Se.fromTextSpan))}function eH(r){return new Un.CallHierarchyOutgoingCall(hy(r.to),r.fromSpans.map(Se.fromTextSpan))}function tH(r,e){return ke([jo(e,gy.minVersion),He(e,2)],()=>Un.languages.registerCallHierarchyProvider(r.semantic,new gy(e)))}var yy,Un,gy,W0=E(()=>{"use strict";yy=U(require("path")),Un=U(require("vscode"));Qt();Hp();Mn();Xe();dt();kt();gy=class{constructor(e){this.client=e}client;static minVersion=ve.v380;async prepareCallHierarchy(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o=ye.toFileLocationRequestArgs(i,t),s=await this.client.execute("prepareCallHierarchy",o,n);if(!(s.type!=="response"||!s.body))return Array.isArray(s.body)?s.body.map(hy):hy(s.body)}async provideCallHierarchyIncomingCalls(e,t){let n=this.client.toTsFilePath(e.uri);if(!n)return;let i=ye.toFileLocationRequestArgs(n,e.selectionRange.start),o=await this.client.execute("provideCallHierarchyIncomingCalls",i,t);if(!(o.type!=="response"||!o.body))return o.body.map(Zq)}async provideCallHierarchyOutgoingCalls(e,t){let n=this.client.toTsFilePath(e.uri);if(!n)return;let i=ye.toFileLocationRequestArgs(n,e.selectionRange.start),o=await this.client.execute("provideCallHierarchyOutgoingCalls",i,t);if(!(o.type!=="response"||!o.body))return o.body.map(eH)}}});function z0(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var $0=E(()=>{"use strict"});function bi(r,e){if(e.nameSpan)return Se.fromTextSpan(e.nameSpan);let t=e.spans?.[0];if(!t)return;let n=Se.fromTextSpan(t),i=r.getText(n),s=new RegExp(`^(.*?(\\b|\\W))${z0(e.text||"")}(\\b|\\W)`,"gm").exec(i),a=s?s.index+s[1].length:0,c=r.offsetAt(new Ho.Position(n.start.line,n.start.character))+a;return new Ho.Range(r.positionAt(c),r.positionAt(c+e.text.length))}var Ho,OC,qo,kC=E(()=>{"use strict";Ho=U(require("vscode"));Xe();$0();yt();OC=class extends Ho.CodeLens{constructor(t,n,i){super(i);this.document=t;this.file=n}document;file},qo=class extends _e{constructor(t,n){super();this.client=t;this.cachedResponse=n}client;cachedResponse;changeEmitter=this._register(new Ho.EventEmitter);onDidChangeCodeLenses=this.changeEmitter.event;static cancelledCommand={title:"",command:""};static errorCommand={title:Ho.l10n.t("Could not determine references"),command:""};async provideCodeLenses(t,n){let i=this.client.toOpenTsFilePath(t);if(!i)return[];let o=await this.cachedResponse.execute(t,()=>this.client.execute("navtree",{file:i},n));if(o.type!=="response")return[];let s=[];return o.body?.childItems?.forEach(a=>this.walkNavTree(t,a,void 0,s)),s.map(a=>new OC(t.uri,i,a))}walkNavTree(t,n,i,o){let s=this.extractSymbol(t,n,i);s&&o.push(s),n.childItems?.forEach(a=>this.walkNavTree(t,a,n,o))}}});var J0=le(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.Cancellation=void 0;var rH;(function(r){function e(n){if(n.$cancellationData!==void 0)throw new Error("Message already has a property $cancellationData");let i=new SharedArrayBuffer(4),o=new Int32Array(i,0,1);return o[0]=0,n.$cancellationData=i,()=>{Atomics.store(o,0,1)}}r.addData=e;function t(n){let i=n;if(!(i instanceof SharedArrayBuffer))return()=>!1;let o=new Int32Array(i.$cancellationData,0,1);return()=>Atomics.load(o,0)===1}r.retrieveCheck=t})(rH=Kp.Cancellation||(Kp.Cancellation={}))});var Sy,X0=E(()=>{"use strict";dt();Sy=class{_callbacks=new Map;_asyncCallbacks=new Map;destroy(e){let t=new Yo.Cancelled(e);for(let n of this._callbacks.values())n.onSuccess(t);this._callbacks.clear();for(let n of this._asyncCallbacks.values())n.onSuccess(t);this._asyncCallbacks.clear()}add(e,t,n){n?this._asyncCallbacks.set(e,t):this._callbacks.set(e,t)}fetch(e){let t=this._callbacks.get(e)||this._asyncCallbacks.get(e);return this.delete(e),t}peek(e){return this._callbacks.get(e)??this._asyncCallbacks.get(e)}delete(e){this._callbacks.delete(e)||this._asyncCallbacks.delete(e)}}});var _y,Q0=E(()=>{"use strict";_y=class{queue=[];sequenceNumber=0;get length(){return this.queue.length}enqueue(e){if(e.queueingType===1){let t=this.queue.length-1;for(;t>=0&&this.queue[t].queueingType===2;)--t;this.queue.splice(t+1,0,e)}else this.queue.push(e)}dequeue(){return this.queue.shift()}getQueuedCommands(e=!1){let t=[],n=e?this.queue.length-1:this.queue.length;if(n<=0)return t;for(let i=0;i<n;i++){let o=this.queue[i];if(t.push(o.request.command),t.length>=5)break}return t}tryDeletePendingRequest(e){for(let t=0;t<this.queue.length;t++)if(this.queue[t].request.seq===e)return this.queue.splice(t,1),!0;return!1}createRequest(e,t){return{seq:this.sequenceNumber++,type:"request",command:e,arguments:t}}}});var Vs,LC=E(()=>{"use strict";Vs=class r extends Error{constructor(t,n,i,o,s,a){super([`<${t}> TypeScript Server Error (${n.displayName})`,o,s].filter(Boolean).join(`
`));this.serverId=t;this.version=n;this.response=i;this.serverMessage=o;this.serverStack=s;this.sanitizedStack=a}serverId;version;response;serverMessage;serverStack;sanitizedStack;static create(t,n,i){let o=r.parseErrorText(i);return new r(t,n,i,o?.message,o?.stack,o?.sanitizedStack)}get serverErrorText(){return this.response.message}get serverCommand(){return this.response.command}get telemetry(){return{command:this.serverCommand,serverid:this.serverId,sanitizedstack:this.sanitizedStack||"",badclient:/\bBADCLIENT\b/.test(this.stack||"")}}static parseErrorText(t){let n=t.message;if(n){let i="Error processing request. ";if(n.startsWith(i)){let o=n.substr(i.length),s=o.indexOf(`
`);if(s>=0){let a=o.substring(s+1);return{message:o.substring(0,s),stack:a,sanitizedStack:r.sanitizeStack(a)}}}}}static sanitizeStack(t){if(!t)return"";let n=/(\btsserver)?(\.(?:ts|tsx|js|jsx)(?::\d+(?::\d+)?)?)\)?$/igm,i="";for(;;){let o=n.exec(t);if(!o)break;i+=`${o[1]||"suppressed"}${o[2]}
`}return i}}});var Z0,Ei,Ty,by,Ey,Cy,Ll,Bp=E(()=>{"use strict";Z0=U(J0()),Ei=U(require("vscode"));X0();Q0();LC();dt();yt();Ed();Mn();Ty=class r extends _e{constructor(t,n,i,o,s,a,c,l){super();this._serverId=t;this._serverSource=n;this._process=i;this._tsServerLog=o;this._requestCanceller=s;this._version=a;this._telemetryReporter=c;this._tracer=l;this._process.onData(u=>{this.dispatchMessage(u)}),this._process.onExit((u,d)=>{this._onExit.fire({code:u,signal:d}),this._callbacks.destroy("server exited")}),this._process.onError(u=>{this._onError.fire(u),this._callbacks.destroy("server errored")})}_serverId;_serverSource;_process;_tsServerLog;_requestCanceller;_version;_telemetryReporter;_tracer;_requestQueue=new _y;_callbacks=new Sy;_pendingResponses=new Set;_onEvent=this._register(new Ei.EventEmitter);onEvent=this._onEvent.event;_onExit=this._register(new Ei.EventEmitter);onExit=this._onExit.event;_onError=this._register(new Ei.EventEmitter);onError=this._onError.event;get tsServerLog(){return this._tsServerLog}write(t){this._process.write(t)}dispose(){super.dispose(),this._callbacks.destroy("server disposed"),this._pendingResponses.clear()}kill(){this._process.kill()}dispatchMessage(t){try{switch(t.type){case"response":this._serverSource?this.dispatchResponse({...t,_serverType:this._serverSource}):this.dispatchResponse(t);break;case"event":{let n=t;if(n.event==="requestCompleted"){let i=n.body.request_seq,o=this._callbacks.fetch(i);o&&(this._tracer.traceRequestCompleted(this._serverId,"requestCompleted",i,o),o.onSuccess(void 0)),n.body.performanceData&&this._onEvent.fire(n)}else this._tracer.traceEvent(this._serverId,n),this._onEvent.fire(n);break}default:throw new Error(`Unknown message type ${t.type} received`)}}finally{this.sendNextRequests()}}tryCancelRequest(t,n){let i=t.seq,o=this._callbacks.peek(i);o?.traceId!==void 0&&this._telemetryReporter.logTraceEvent("TSServer.tryCancelRequest",o.traceId,JSON.stringify({command:n,cancelled:!0}));try{return this._requestQueue.tryDeletePendingRequest(i)?(this.logTrace(`Canceled request with sequence number ${i}`),!0):this._requestCanceller.tryCancelOngoingRequest(i)?!0:(this.logTrace(`Tried to cancel request with sequence number ${i}. But request got already delivered.`),!1)}finally{this.fetchCallback(i)?.onSuccess(new Yo.Cancelled(`Cancelled request ${i} - ${n}`))}}dispatchResponse(t){let n=this.fetchCallback(t.request_seq);n&&(n.traceId!==void 0&&this._telemetryReporter.logTraceEvent("TSServerRequest.dispatchResponse",n.traceId,JSON.stringify({command:t.command,success:t.success,performanceData:t.performanceData})),this._tracer.traceResponse(this._serverId,t,n),t.success?n.onSuccess(t):t.message==="No content available."?n.onSuccess(Yo.NoContent):n.onError(Vs.create(this._serverId,this._version,t)))}executeImpl(t,n,i){let o=this._requestQueue.createRequest(t,n),s={request:o,expectsResponse:i.expectsResult,isAsync:i.isAsync,queueingType:r.getQueueingType(t,i.lowPriority)},a;i.expectsResult&&(a=new Promise((l,u)=>{let d=typeof o.arguments?.$traceId=="string"?{onSuccess:l,onError:u,queuingStartTime:Date.now(),isAsync:i.isAsync,command:o.command,traceId:o.arguments.$traceId}:{onSuccess:l,onError:u,queuingStartTime:Date.now(),isAsync:i.isAsync,command:o.command};if(this._callbacks.add(o.seq,d,i.isAsync),i.token){let f=Qa()?Z0.Cancellation.addData(o):void 0;i.token.onCancellationRequested(()=>{f?.(),this.tryCancelRequest(o,t)})}}).catch(l=>{throw l instanceof Vs&&(i.token?.isCancellationRequested||this._telemetryReporter.logTelemetry("languageServiceErrorResponse",l.telemetry)),l})),this._requestQueue.enqueue(s);let c=n?.$traceId;if(n&&typeof c=="string"){let l=this._requestQueue.length-1,u=this._pendingResponses.size,d={command:o.command,queueLength:l,pendingResponses:u};l>0&&(d.queuedCommands=this._requestQueue.getQueuedCommands(!0)),u>0&&(d.pendingCommands=this.getPendingCommands()),this._telemetryReporter.logTraceEvent("TSServer.enqueueRequest",c,JSON.stringify(d))}return this.sendNextRequests(),[a]}getPendingCommands(){let t=[];for(let n of this._pendingResponses){let i=this._callbacks.peek(n);if(typeof i?.command=="string"&&(t.push(i.command),t.length>=5))break}return t}sendNextRequests(){for(;this._pendingResponses.size===0&&this._requestQueue.length>0;){let t=this._requestQueue.dequeue();t&&this.sendRequest(t)}}sendRequest(t){let n=t.request;this._tracer.traceRequest(this._serverId,n,t.expectsResponse,this._requestQueue.length),t.expectsResponse&&!t.isAsync&&this._pendingResponses.add(t.request.seq);try{this.write(n),typeof n.arguments?.$traceId=="string"&&this._telemetryReporter.logTraceEvent("TSServer.sendRequest",n.arguments.$traceId,JSON.stringify({command:n.command}))}catch(i){this.fetchCallback(n.seq)?.onError(i)}}fetchCallback(t){let n=this._callbacks.fetch(t);if(n)return this._pendingResponses.delete(t),n}logTrace(t){this._tracer.trace(this._serverId,t)}static fenceCommands=new Set(["change","close","open","updateOpen"]);static getQueueingType(t,n){return r.fenceCommands.has(t)?3:n?2:1}},by=class r{constructor(e,t){this.servers=e;this.delegate=t}servers;delegate;static sharedCommands=new Set(["change","close","open","updateOpen","configure"]);execute(e,t,n){if(r.sharedCommands.has(e)&&typeof n.executionTarget>"u"){let i=this.servers.map(()=>Ll.Unresolved),o;if(n.token){let a=new Ei.CancellationTokenSource;n.token.onCancellationRequested(()=>{i.some(c=>c===Ll.Resolved)||a.cancel()}),o=a.token}let s=[];for(let a=0;a<this.servers.length;++a){let l=this.servers[a].server.executeImpl(e,t,{...n,token:o})[0];s.push(l),l&&l.then(u=>{i[a]=Ll.Resolved;let d=i.find(f=>f.type===Ll.Type.Errored);return d&&this.delegate.onFatalError(e,d.err),u},u=>{throw i[a]=new Ll.Errored(u),i.some(d=>d===Ll.Resolved)&&this.delegate.onFatalError(e,u),u})}return s}for(let{canRun:i,server:o}of this.servers)if(!i||i(e,n))return o.executeImpl(e,t,n);throw new Error(`Could not find server for command: '${e}'`)}},Ey=class r extends _e{static diagnosticEvents=new Set(["configFileDiag","syntaxDiag","semanticDiag","suggestionDiag"]);getErrServer;mainServer;router;constructor(e,t){super(),this.getErrServer=e.getErr,this.mainServer=e.primary,this.router=new by([{server:this.getErrServer,canRun:n=>["geterr","geterrForProject"].includes(n)},{server:this.mainServer,canRun:void 0}],t),this._register(this.getErrServer.onEvent(n=>{r.diagnosticEvents.has(n.event)&&this._onEvent.fire(n)})),this._register(this.mainServer.onEvent(n=>{r.diagnosticEvents.has(n.event)||this._onEvent.fire(n)})),this._register(this.getErrServer.onError(n=>this._onError.fire(n))),this._register(this.mainServer.onError(n=>this._onError.fire(n))),this._register(this.mainServer.onExit(n=>{this._onExit.fire(n),this.getErrServer.kill()}))}_onEvent=this._register(new Ei.EventEmitter);onEvent=this._onEvent.event;_onExit=this._register(new Ei.EventEmitter);onExit=this._onExit.event;_onError=this._register(new Ei.EventEmitter);onError=this._onError.event;get tsServerLog(){return this.mainServer.tsServerLog}kill(){this.getErrServer.kill(),this.mainServer.kill()}executeImpl(e,t,n){return this.router.execute(e,t,n)}},Cy=class r extends _e{static syntaxAlwaysCommands=new Set(["navtree","getOutliningSpans","jsxClosingTag","selectionRange","format","formatonkey","docCommentTemplate","linkedEditingRange"]);static semanticCommands=new Set(["geterr","geterrForProject","projectInfo","configurePlugin"]);static syntaxAllowedCommands=new Set(["completions","completionEntryDetails","completionInfo","definition","definitionAndBoundSpan","documentHighlights","implementation","navto","quickinfo","references","rename","signatureHelp"]);syntaxServer;semanticServer;router;_projectLoading=!0;constructor(e,t,n){super(),this.syntaxServer=e.syntax,this.semanticServer=e.semantic,this.router=new by([{server:this.syntaxServer,canRun:(i,o)=>{switch(o.executionTarget){case 0:return!1;case 1:return!0}return r.syntaxAlwaysCommands.has(i)?!0:r.semanticCommands.has(i)?!1:!!(n&&this.projectLoading&&r.syntaxAllowedCommands.has(i))}},{server:this.semanticServer,canRun:void 0}],t),this._register(this.syntaxServer.onEvent(i=>this._onEvent.fire(i))),this._register(this.semanticServer.onEvent(i=>{switch(i.event){case"projectLoadingStart":this._projectLoading=!0;break;case"projectLoadingFinish":case"semanticDiag":case"syntaxDiag":case"suggestionDiag":case"configFileDiag":this._projectLoading=!1;break}return this._onEvent.fire(i)})),this._register(this.semanticServer.onExit(i=>{this._onExit.fire(i),this.syntaxServer.kill()})),this._register(this.semanticServer.onError(i=>this._onError.fire(i)))}get projectLoading(){return this._projectLoading}_onEvent=this._register(new Ei.EventEmitter);onEvent=this._onEvent.event;_onExit=this._register(new Ei.EventEmitter);onExit=this._onExit.event;_onError=this._register(new Ei.EventEmitter);onError=this._onError.event;get tsServerLog(){return this.semanticServer.tsServerLog}kill(){this.syntaxServer.kill(),this.semanticServer.kill()}executeImpl(e,t,n){return this.router.execute(e,t,n)}};(i=>{let r;(c=>(c[c.Unresolved=0]="Unresolved",c[c.Resolved=1]="Resolved",c[c.Errored=2]="Errored"))(r=i.Type||={}),i.Unresolved={type:0},i.Resolved={type:1};class n{constructor(s){this.err=s}err;type=2}i.Errored=n})(Ll||={})});var eO={};Be(eO,{default:()=>Gp,register:()=>oH});function oH(r,e,t,n){return ke([my(Py.enabled,e.id),He(t,2)],()=>zi.languages.registerCodeLensProvider(r.semantic,new Gp(t,n)))}var zi,Py,Gp,tO=E(()=>{"use strict";zi=U(require("vscode"));Mn();Xe();dt();jt();kt();kC();Bp();Py=Object.freeze({enabled:"implementationsCodeLens.enabled",showOnInterfaceMethods:"implementationsCodeLens.showOnInterfaceMethods",showOnAllClassMethods:"implementationsCodeLens.showOnAllClassMethods"}),Gp=class extends qo{constructor(t,n){super(t,n);this._cachedResponse=n;this._enabled=this._register(new Hi(Py.enabled,!1)),this._register(this._enabled.onDidChange(()=>this.changeEmitter.fire())),this._showOnInterfaceMethods=this._register(new Hi(Py.showOnInterfaceMethods,!1)),this._register(this._showOnInterfaceMethods.onDidChange(()=>this.changeEmitter.fire())),this._showOnAllClassMethods=this._register(new Hi(Py.showOnAllClassMethods,!1)),this._register(this._showOnAllClassMethods.onDidChange(()=>this.changeEmitter.fire()))}_cachedResponse;_enabled;_showOnInterfaceMethods;_showOnAllClassMethods;async provideCodeLenses(t,n){return this._enabled.getValue(t)?super.provideCodeLenses(t,n):[]}async resolveCodeLens(t,n){let i=ye.toFileLocationRequestArgs(t.file,t.range.start),o=await this.client.execute("implementation",i,n,{lowPriority:!0,executionTarget:0,cancelOnResourceChange:t.document});if(o.type!=="response"||!o.body)return t.command=o.type==="cancelled"?qo.cancelledCommand:qo.errorCommand,t;let s=o.body.map(a=>new zi.Location(this.client.toResource(a.file),a.start.line===a.end.line?Se.fromTextSpan(a):new zi.Range(ye.fromLocation(a.start),new zi.Position(a.start.line,0)))).filter(a=>!(a.uri.toString()===t.document.toString()&&a.range.start.line===t.range.start.line&&a.range.start.character===t.range.start.character));return t.command=this.getCommand(s,t),t}getCommand(t,n){return{title:this.getTitle(t),command:t.length?"editor.action.showReferences":"",arguments:[n.document,n.range.start,t]}}getTitle(t){return t.length===1?zi.l10n.t("1 implementation"):zi.l10n.t("{0} implementations",t.length)}extractSymbol(t,n,i){if(n.kind===L.interface)return bi(t,n);if((n.kind===L.class||n.kind===L.method||n.kind===L.memberVariable||n.kind===L.memberGetAccessor||n.kind===L.memberSetAccessor)&&/\babstract\b/.test(n.kindModifiers??""))return bi(t,n);if(n.kind===L.method&&i?.kind===L.interface&&this._showOnInterfaceMethods.getValue(t))return bi(t,n);if(n.kind===L.method&&i?.kind===L.class&&this._showOnAllClassMethods.getValue(t))return/\bprivate\b/.test(n.kindModifiers??"")?void 0:bi(t,n)}}});var rO={};Be(rO,{TypeScriptReferencesCodeLensProvider:()=>xy,register:()=>sH});function sH(r,e,t,n){return ke([my(FC.enabled,e.id),He(t,2)],()=>Wp.languages.registerCodeLensProvider(r.semantic,new xy(t,n)))}var Wp,FC,xy,nO=E(()=>{"use strict";Wp=U(require("vscode"));Mn();Bp();Xe();dt();jt();kt();kC();FC=Object.freeze({enabled:"referencesCodeLens.enabled",showOnAllFunctions:"referencesCodeLens.showOnAllFunctions"}),xy=class extends qo{constructor(t,n){super(t,n);this._cachedResponse=n;this._enabled=this._register(new Hi(FC.enabled,!1)),this._register(this._enabled.onDidChange(()=>this.changeEmitter.fire())),this._showOnAllFunctions=this._register(new Hi(FC.showOnAllFunctions,!1)),this._register(this._showOnAllFunctions.onDidChange(()=>this.changeEmitter.fire()))}_cachedResponse;_enabled;_showOnAllFunctions;async provideCodeLenses(t,n){return this._enabled.getValue(t)?super.provideCodeLenses(t,n):[]}async resolveCodeLens(t,n){let i=ye.toFileLocationRequestArgs(t.file,t.range.start),o=await this.client.execute("references",i,n,{lowPriority:!0,executionTarget:0,cancelOnResourceChange:t.document});if(o.type!=="response"||!o.body)return t.command=o.type==="cancelled"?qo.cancelledCommand:qo.errorCommand,t;let s=o.body.refs.filter(a=>!a.isDefinition).map(a=>xr.fromTextSpan(this.client.toResource(a.file),a));return t.command={title:this.getCodeLensLabel(s),command:s.length?"editor.action.showReferences":"",arguments:[t.document,t.range.start,s]},t}getCodeLensLabel(t){return t.length===1?Wp.l10n.t("1 reference"):Wp.l10n.t("{0} references",t.length)}extractSymbol(t,n,i){if(i?.kind===L.enum)return bi(t,n);switch(n.kind){case L.function:if(this._showOnAllFunctions.getValue(t)&&n.nameSpan)return bi(t,n);case L.const:case L.let:case L.variable:if(/\bexport\b/.test(n.kindModifiers))return bi(t,n);break;case L.class:if(n.text==="<class>")break;return bi(t,n);case L.interface:case L.type:case L.enum:return bi(t,n);case L.method:case L.memberGetAccessor:case L.memberSetAccessor:case L.constructorImplementation:case L.memberVariable:if(i&&ye.fromLocation(i.spans[0].start).isEqual(ye.fromLocation(n.spans[0].start)))return;switch(i?.kind){case L.class:case L.interface:case L.type:return bi(t,n)}break}}}});function Dy(r,e){return e.changes?.length?Wr.fromFileCodeEdits(r,e.changes):void 0}async function MC(r,e,t){let n=Dy(r,e);return n&&!await iO.workspace.applyEdit(n)?!1:Iy(r,e.commands,t)}async function Iy(r,e,t){if(e?.length)for(let n of e)await r.execute("applyCodeActionCommand",{command:n},t);return!0}var iO,UC=E(()=>{"use strict";iO=U(require("vscode"));Xe()});function sO(r,e){if(r.insertText&&typeof r.insertText!="string")return{snippet:r.insertText,parameterCount:0};let t=cH(e),n=new oO.SnippetString;return n.appendText(`${r.insertText||r.label}(`),aH(n,t.parts,", "),t.hasOptionalParameters&&n.appendTabstop(),n.appendText(")"),n.appendTabstop(0),{snippet:n,parameterCount:t.parts.length+(t.hasOptionalParameters?1:0)}}function aH(r,e,t){for(let n=0;n<e.length;++n){let i=e[n];r.appendPlaceholder(i.text),n!==e.length-1&&r.appendText(t)}}function cH(r){let e=[],t=[],n=!1,i=!1,o=0,s=0;e:for(let a=0;a<r.length;++a){let c=r[a];switch(c.kind){case Us.methodName:case Us.functionName:case Us.text:case Us.propertyName:o===0&&s===0&&(n=!0);break;case Us.parameterName:if(o===1&&s===0&&n){let u=r[a+1]?.text==="?",d=c.text==="this";u?t.push(c):(e.push(...t),t=[]),!u&&!d&&e.push(c),i=i||u}break;case Us.punctuation:if(c.text==="(")++o;else if(c.text===")"){if(--o,o<=0&&n)break e}else if(c.text==="..."&&o===1){i=!0;break e}else c.text==="{"?++s:c.text==="}"&&--s;break}}return{hasOptionalParameters:i,parts:e}}var oO,aO=E(()=>{"use strict";oO=U(require("vscode"));Mn()});function lH(r,e){if(!r.text)return;function t(i){return/^\s*[~`]{3}/m.test(i)?i:"```tsx\n"+i+"\n```"}let n=Ny(r.text,e);switch(r.name){case"example":{n=fH(r.text);let i=n.match(/<caption>(.*?)<\/caption>\s*(\r\n|\n)/);return i?.index===0?i[1]+`
`+t(n.substr(i[0].length)):t(n)}case"author":{let i=n.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);return i===null?n:`${i[1]} ${i[2]}`}case"default":return t(n);default:return n}}function uH(r,e){switch(r.name){case"augments":case"extends":case"param":case"template":{let i=dH(r,e);if(i?.length===3){let o=i[1],s=i[2],a=`*@${r.name}* \`${o}\``;return s?a+(s.match(/\r\n|\n/g)?`  
`+s:` \u2014 ${s}`):a}break}case"return":case"returns":{if(!r.text?.length)return;break}}let t=`*@${r.name}*`,n=lH(r,e);return n?t+(n.match(/\r\n|\n/g)?`  
`+n:` \u2014 ${n}`):t}function dH(r,e){if(r.name==="template"){let t=r.text;if(t&&typeof t!="string"){let n=t.filter(o=>o.kind==="typeParameterName").map(o=>o.text).join(", "),i=t.filter(o=>o.kind==="text").map(o=>Ny(o.text.replace(/^\s*-?\s*/,""),e)).join(" ");return n?["",n,i]:void 0}}return Ny(r.text,e).split(/^(\S+)\s*-?\s*/)}function fH(r){return typeof r=="string"?r:r.map(e=>e.text).join("")}function js(r,e){return Ny(r,e)}function Ny(r,e){if(!r)return"";if(typeof r=="string")return r;let t=[],n;for(let i of r)switch(i.kind){case"link":if(n){if(n.target){let s={file:{...e.toResource(n.target.file).toJSON(),$mid:void 0},position:ye.fromLocation(n.target.start)},a=`command:${Ha.id}?${encodeURIComponent(JSON.stringify([s]))}`,c=n.text?n.text:YC(n.name??"");t.push(`[${n.linkcode?"`"+c+"`":c}](${a} "${Ry.l10n.t("Open symbol link")}")`)}else{let o=n.text??n.name;if(o)if(/^https?:/.test(o)){let s=o.split(" ");if(s.length===1&&!n.linkcode)t.push(`<${s[0]}>`);else{let a=s.length>1?s.slice(1).join(" "):s[0];t.push(`[${n.linkcode?"`"+YC(a)+"`":a}](${s[0]})`)}}else t.push(YC(o))}n=void 0}else n={linkcode:i.text==="{@linkcode "};break;case"linkName":n&&(n.name=i.text,n.target=i.target);break;case"linkText":n&&(n.text=i.text);break;default:t.push(i.text);break}return t.join("")}function YC(r){return r.replace(/`/g,"\\$&")}function pH(r,e){return r.map(t=>uH(t,e)).join(`  

`)}function zp(r,e,t,n){let i=new Ry.MarkdownString;return VC(i,r,e,t),i.baseUri=n,i.isTrusted={enabledCommands:[Ha.id]},i}function VC(r,e,t,n){if(e&&r.appendMarkdown(js(e,n)),t){let i=pH(t,n);i&&r.appendMarkdown(`

`+i)}return r.isTrusted={enabledCommands:[Ha.id]},r}var Ry,wy=E(()=>{"use strict";Ry=U(require("vscode"));eC();Xe()});var uO={};Be(uO,{register:()=>gH});function vH(r){if(!r.kindModifiers||r.kind!==L.script)return;let e=Ms(r.kindModifiers);for(let t of Xn.fileExtensionKindModifiers)if(e.has(t))return r.name.toLowerCase().endsWith(t)?r.name:r.name+t}function mH(r,e){return!e.nameSuggestions&&r.kind===L.warning||!e.pathSuggestions&&(r.kind===L.directory||r.kind===L.script||r.kind===L.externalModuleName)||!e.autoImportSuggestions&&r.hasAction}function gH(r,e,t,n,i,o,s,a){return ke([He(t,1,2)],()=>xe.languages.registerCompletionItemProvider(r.syntax,new Fy(t,e,n,i,o,s,a),...Fy.triggerCharacters))}var xe,Ay,Oy,ky,Ly,lO,Fy,dO=E(()=>{"use strict";xe=U(require("vscode"));Qt();Hp();Mn();Xe();dt();ko();jt();UC();kt();aO();wy();Ay=class r extends xe.CompletionItem{constructor(t,n,i,o,s,a,c){let l=i.name||(i.insertText??"");super(l,r.convertKind(i.kind));this.position=t;this.document=n;this.tsEntry=i;this.completionContext=o;this.metadata=s;if(i.source&&i.hasAction&&a.apiVersion.lt(ve.v490)?this.sortText="\uFFFF"+i.sortText:this.sortText=i.sortText,i.source&&i.hasAction){let f=xe.workspace.asRelativePath(i.source);f!==i.source&&(this.label={label:l,description:f})}let{sourceDisplay:u,isSnippet:d}=i;if(u&&(this.label={label:l,description:js(u,a)}),i.labelDetails&&(this.label={label:l,...i.labelDetails}),this.preselect=i.isRecommended,this.position=t,this.useCodeSnippet=o.completeFunctionCalls&&(this.kind===xe.CompletionItemKind.Function||this.kind===xe.CompletionItemKind.Method),this.range=this.getRangeFromReplacementSpan(i,o),this.commitCharacters=r.getCommitCharacters(o,i,c),this.insertText=d&&i.insertText?new xe.SnippetString(i.insertText):i.insertText,this.filterText=i.filterText||this.getFilterText(o.line,i.insertText),o.isMemberCompletion&&o.dotAccessorContext&&!(this.insertText instanceof xe.SnippetString)&&(this.filterText=o.dotAccessorContext.text+(this.insertText||this.textLabel),!this.range)){let f=this.completionContext.wordRange;f?this.range={inserting:o.dotAccessorContext.range,replacing:o.dotAccessorContext.range.union(f)}:this.range=o.dotAccessorContext.range,this.insertText=this.filterText}if(i.kindModifiers){let f=Ms(i.kindModifiers);f.has(Xn.optional)&&(this.insertText??=this.textLabel,this.filterText??=this.textLabel,typeof this.label=="string"?this.label+="?":this.label.label+="?"),f.has(Xn.deprecated)&&(this.tags=[xe.CompletionItemTag.Deprecated]),f.has(Xn.color)&&(this.kind=xe.CompletionItemKind.Color),this.detail=vH(i)}this.resolveRange()}position;document;tsEntry;completionContext;metadata;useCodeSnippet;get textLabel(){return typeof this.label=="string"?this.label:this.label.label}_resolvedPromise;async resolveCompletionItem(t,n){if(n.onCancellationRequested(()=>{this._resolvedPromise&&--this._resolvedPromise.waiting<=0&&setTimeout(()=>{this._resolvedPromise&&this._resolvedPromise.waiting<=0&&this._resolvedPromise.requestToken.cancel()},300)}),this._resolvedPromise)return++this._resolvedPromise.waiting,this._resolvedPromise.promise;let i=new xe.CancellationTokenSource,o=(async()=>{let s=t.toOpenTsFilePath(this.document);if(!s)return;let a={...ye.toFileLocationRequestArgs(s,this.position),entryNames:[this.tsEntry.source||this.tsEntry.data?{name:this.tsEntry.name,source:this.tsEntry.source,data:this.tsEntry.data}:this.tsEntry.name]},c=await t.interruptGetErr(()=>t.execute("completionEntryDetails",a,i.token));if(c.type!=="response"||!c.body?.length)return;let l=c.body[0],u=this.getDetails(t,l);u&&(this.detail=u),this.documentation=this.getDocumentation(t,l,this.document.uri);let d=this.getCodeActions(l,s),f=[{command:Oy.ID,title:"",arguments:[this]}];d.command&&f.push(d.command);let v=d.additionalTextEdits;if(this.useCodeSnippet&&await this.isValidFunctionCompletionContext(t,s,this.position,this.document,n)){let{snippet:S,parameterCount:y}=sO({...this,label:this.textLabel},l.displayParts);this.insertText=S,y>0&&xe.workspace.getConfiguration("editor.parameterHints").get("enabled")&&f.push({title:"triggerParameterHints",command:"editor.action.triggerParameterHints"})}return{commands:f,edits:v}})();return this._resolvedPromise={promise:o,requestToken:i,waiting:1},this._resolvedPromise.promise}getDetails(t,n){let i=[];if(n.kind!==L.script){for(let o of n.codeActions??[])i.push(o.description);return i.push(js(n.displayParts,t)),i.join(`

`)}}getDocumentation(t,n,i){let o=new xe.MarkdownString;return VC(o,n.documentation,n.tags,t),o.baseUri=i,o.value.length?o:void 0}async isValidFunctionCompletionContext(t,n,i,o,s){try{let u=ye.toFileLocationRequestArgs(n,i),d=await t.execute("quickinfo",u,s);if(d.type==="response"&&d.body)switch(d.body.kind){case"var":case"let":case"const":case"alias":return!1}}catch{}let a=o.lineAt(i.line);return!(a.text.slice(i.character).match(/^[a-z_$0-9]*\s*\(/gi)||a.text.slice(0,i.character).match(/<\s*[\w]*$/gi))}getCodeActions(t,n){if(!t.codeActions?.length)return{};let i=[],o=!1;for(let a of t.codeActions)if(a.commands&&(o=!0),a.changes)for(let c of a.changes)c.fileName===n?i.push(...c.textChanges.map(ec.fromCodeEdit)):o=!0;let s;return o&&(s={title:"",command:Ly.ID,arguments:[n,t.codeActions.map(a=>({commands:a.commands,description:a.description,changes:a.changes.filter(c=>c.fileName!==n)}))]}),{command:s,additionalTextEdits:i.length?i:void 0}}getRangeFromReplacementSpan(t,n){if(!t.replacementSpan)return n.optionalReplacementRange?{inserting:new xe.Range(n.optionalReplacementRange.start,this.position),replacing:n.optionalReplacementRange}:void 0;let i=Se.fromTextSpan(t.replacementSpan);return i.isSingleLine||(i=new xe.Range(i.start.line,i.start.character,i.start.line,n.line.length)),{inserting:i,replacing:i}}getFilterText(t,n){if(this.tsEntry.name.startsWith("#")){let i=this.completionContext.wordRange,o=i?t.charAt(i.start.character):void 0;return n?n.startsWith("this.#")?o==="#"?n:n.replace(/^this\.#/,""):n:o==="#"?void 0:this.tsEntry.name.replace(/^#/,"")}if(!n?.startsWith("this."))return n?.startsWith("[")?n.replace(/^\[['"](.+)[['"]\]$/,".$1"):n}resolveRange(){if(this.range)return;let t=this.completionContext.wordRange;t&&(this.range={inserting:new xe.Range(t.start,this.position),replacing:t})}static convertKind(t){switch(t){case L.primitiveType:case L.keyword:return xe.CompletionItemKind.Keyword;case L.const:case L.let:case L.variable:case L.localVariable:case L.alias:case L.parameter:return xe.CompletionItemKind.Variable;case L.memberVariable:case L.memberGetAccessor:case L.memberSetAccessor:return xe.CompletionItemKind.Field;case L.function:case L.localFunction:return xe.CompletionItemKind.Function;case L.method:case L.constructSignature:case L.callSignature:case L.indexSignature:return xe.CompletionItemKind.Method;case L.enum:return xe.CompletionItemKind.Enum;case L.enumMember:return xe.CompletionItemKind.EnumMember;case L.module:case L.externalModuleName:return xe.CompletionItemKind.Module;case L.class:case L.type:return xe.CompletionItemKind.Class;case L.interface:return xe.CompletionItemKind.Interface;case L.warning:return xe.CompletionItemKind.Text;case L.script:return xe.CompletionItemKind.File;case L.directory:return xe.CompletionItemKind.Folder;case L.string:return xe.CompletionItemKind.Constant;default:return xe.CompletionItemKind.Property}}static getCommitCharacters(t,n,i){let o=n.commitCharacters??(i?Array.from(i):void 0);if(o)return t.enableCallCompletions&&!t.isNewIdentifierLocation&&n.kind!==L.warning&&n.kind!==L.string&&o.push("("),o;if(!(n.kind===L.warning||n.kind===L.string)&&!t.isNewIdentifierLocation)return o=[".",",",";"],t.enableCallCompletions&&o.push("("),o}};Oy=class r{constructor(e,t){this.onCompletionAccepted=e;this.telemetryReporter=t}onCompletionAccepted;telemetryReporter;static ID="_typescript.onCompletionAccepted";id=r.ID;execute(e){this.onCompletionAccepted(e),e instanceof Ay&&this.telemetryReporter.logTelemetry("completions.accept",{isPackageJsonImport:e.tsEntry.isPackageJsonImport?"true":void 0,isImportStatementCompletion:e.tsEntry.isImportStatementCompletion?"true":void 0})}},ky=class r{constructor(e){this.client=e}client;static ID="_typescript.applyCompletionCommand";id=r.ID;async execute(e){let t=await e.resolveCompletionItem(this.client,It);if(!t)return;let{edits:n,commands:i}=t;if(n){let o=new xe.WorkspaceEdit;for(let s of n)o.replace(e.document.uri,s.range,s.newText);await xe.workspace.applyEdit(o)}for(let o of i)await xe.commands.executeCommand(o.command,...o.arguments??[])}},Ly=class r{constructor(e){this.client=e}client;static ID="_typescript.applyCompletionCodeAction";id=r.ID;async execute(e,t){if(t.length===0)return!0;if(t.length===1)return MC(this.client,t[0],It);let n=await xe.window.showQuickPick(t.map(i=>({label:i.description,description:"",action:i})),{placeHolder:xe.l10n.t("Select code action to apply")});return n?MC(this.client,n.action,It):!1}};(s=>{s.completeFunctionCalls="suggest.completeFunctionCalls",s.nameSuggestions="suggest.names",s.pathSuggestions="suggest.paths",s.autoImportSuggestions="suggest.autoImports",s.importStatementSuggestions="suggest.importStatements";function o(a,c){return{completeFunctionCalls:q(s.completeFunctionCalls,!1,{scope:c,fallbackSection:a}),pathSuggestions:q(s.pathSuggestions,!0,{scope:c,fallbackSection:a}),autoImportSuggestions:q(s.autoImportSuggestions,!0,{scope:c,fallbackSection:a}),nameSuggestions:q(s.nameSuggestions,!0,{scope:c,fallbackSection:a}),importStatementSuggestions:q(s.importStatementSuggestions,!0,{scope:c,fallbackSection:a})}}s.getConfigurationForResource=o})(lO||={});Fy=class{constructor(e,t,n,i,o,s,a){this.client=e;this.language=t;this.typingsStatus=n;this.fileConfigurationManager=i;this.telemetryReporter=s;o.register(new Ly(this.client)),o.register(new Oy(a,this.telemetryReporter)),o.register(new ky(this.client))}client;language;typingsStatus;fileConfigurationManager;telemetryReporter;static triggerCharacters=[".",'"',"'","`","/","@","<","#"," "];async provideCompletionItems(e,t,n,i){if(!q("suggest.enabled",!0,{scope:e,fallbackSection:this.language.id}))return;if(this.typingsStatus.isAcquiringTypings)return Promise.reject({label:xe.l10n.t({message:"Acquiring typings...",comment:["Typings refers to the *.d.ts typings files that power our IntelliSense. It should not be localized"]}),detail:xe.l10n.t({message:"Acquiring typings definitions for IntelliSense.",comment:["Typings refers to the *.d.ts typings files that power our IntelliSense. It should not be localized"]})});let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=e.lineAt(t.line),a=lO.getConfigurationForResource(this.language.id,e);if(!this.shouldTrigger(i,s,t,a))return;let c=e.getWordRangeAtPosition(t);if(c&&!c.isEmpty){let $=c.start.translate(0,1);e.getText(new xe.Range(c.start,$))==="@"&&(c=c.with($))}await this.client.interruptGetErr(()=>this.fileConfigurationManager.ensureConfigurationForDocument(e,n));let l={...ye.toFileLocationRequestArgs(o,t),includeExternalModuleExports:a.autoImportSuggestions,includeInsertTextCompletions:!0,triggerCharacter:this.getTsTriggerCharacter(i),triggerKind:RC.toProtocolCompletionTriggerKind(i.triggerKind)},u,d,f,v,m=Date.now();try{d=await this.client.interruptGetErr(()=>this.client.execute("completionInfo",l,n))}finally{f=Date.now()-m}if(d.type!=="response"||!d.body){this.logCompletionsTelemetry(f,d);return}let S=d.body.isNewIdentifierLocation,y=d.body.isMemberCompletion;if(y){let $=s.text.slice(0,t.character).match(/\??\.\s*$/)||void 0;if($){let G=new xe.Range(t.translate({characterDelta:-$[0].length}),t),re=e.getText(G);u={range:G,text:re}}}let N=!!d.body.isIncomplete||!!d.metadata?.isIncomplete,C=d.body.entries,_=d.metadata,A=Object.freeze(d.body.defaultCommitCharacters);d.body.optionalReplacementSpan&&(v=Se.fromTextSpan(d.body.optionalReplacementSpan));let k={isNewIdentifierLocation:S,isMemberCompletion:y,dotAccessorContext:u,enableCallCompletions:!a.completeFunctionCalls,wordRange:c,line:s.text,completeFunctionCalls:a.completeFunctionCalls,optionalReplacementRange:v},j=!1,H=!1,oe=[];for(let $ of C)if(!mH($,a)){let G=new Ay(t,e,$,k,_,this.client,A);G.command={command:ky.ID,title:"",arguments:[G]},oe.push(G),j=j||!!$.isPackageJsonImport,H=H||!!$.isImportStatementCompletion}return f!==void 0&&this.logCompletionsTelemetry(f,d,j,H),new xe.CompletionList(oe,N)}logCompletionsTelemetry(e,t,n,i){this.telemetryReporter.logTelemetry("completions.execute",{duration:String(e),type:t?.type??"unknown",flags:t?.type==="response"&&typeof t.body?.flags=="number"?String(t.body.flags):void 0,count:String(t?.type==="response"&&t.body?t.body.entries.length:0),updateGraphDurationMs:t?.type==="response"&&typeof t.performanceData?.updateGraphDurationMs=="number"?String(t.performanceData.updateGraphDurationMs):void 0,createAutoImportProviderProgramDurationMs:t?.type==="response"&&typeof t.performanceData?.createAutoImportProviderProgramDurationMs=="number"?String(t.performanceData.createAutoImportProviderProgramDurationMs):void 0,includesPackageJsonImport:n?"true":void 0,includesImportStatementCompletion:i?"true":void 0})}getTsTriggerCharacter(e){switch(e.triggerCharacter){case"@":return"@";case"#":return"#";case" ":return this.client.apiVersion.gte(ve.v430)?" ":void 0;case".":case'"':case"'":case"`":case"/":case"<":return e.triggerCharacter;default:return}}async resolveCompletionItem(e,t){return await e.resolveCompletionItem(this.client,t),e}shouldTrigger(e,t,n,i){return e.triggerCharacter===" "?!i.importStatementSuggestions||this.client.apiVersion.lt(ve.v430)?!1:t.text.slice(0,n.character)==="import":!0}}});function rc(r,...e){if(global.setImmediate){let t=global.setImmediate(r,...e);return{dispose:()=>global.clearImmediate(t)}}else{let t=setTimeout(r,0,...e);return{dispose:()=>clearTimeout(t)}}}function jC(r,e,t){let n,i=setTimeout(()=>{n?.(void 0),t?.()},e);return Promise.race([r.finally(()=>clearTimeout(i)),new Promise(o=>n=o)])}var Id,Nd=E(()=>{"use strict";Id=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(n=>{this.onSuccess=n}).then(()=>{this.completionPromise=null,this.onSuccess=null;let n=this.task?.();return this.task=null,n})),(t>=0||this.timeout===null)&&(this.timeout=setTimeout(()=>{this.timeout=null,this.onSuccess?.(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}}});var pO={};Be(pO,{register:()=>hH});function hH(r,e,t,n){return ke([He(t,2),jo(t,ve.v570),Dd(fO,{fallbackSection:e.id})],()=>vr.languages.registerDocumentPasteEditProvider(r.semantic,new Fl(e.id,t,n),{providedPasteEditKinds:[Fl.kind],copyMimeTypes:[Fl.metadataMimeType],pasteMimeTypes:[Fl.metadataMimeType]}))}var vr,Rd,My,$p,fO,Fl,vO=E(()=>{"use strict";vr=U(require("vscode"));Qt();Xe();dt();Nd();jt();kt();Rd=class r{constructor(e,t,n){this.resource=e;this.ranges=t;this.copyOperation=n}resource;ranges;copyOperation;static parse(e){try{let t=JSON.parse(e),n=vr.Uri.parse(t.resource),i=t.ranges.map(s=>new vr.Range(s.start,s.end)),o=t.copyOperation?Promise.resolve(t.copyOperation):void 0;return new r(n,i,o)}catch{return}}},My=class r extends vr.DocumentPasteEdit{static tryCreateFromResponse(e,t){if(t.type!=="response"||!t.body?.edits.length)return;let n=new r,i=new vr.WorkspaceEdit;for(let o of t.body.edits)i.set(e.toResource(o.fileName),o.textChanges.map(ec.fromCodeEdit));return n.additionalEdit=i,n}constructor(){super("",vr.l10n.t("Paste with imports"),Fl.kind),this.yieldTo=[vr.DocumentDropOrPasteEditKind.Text.append("plain")]}},$p=class extends My{constructor(t,n){super();this.operation=n;this.insertText=t}operation},fO="updateImportsOnPaste.enabled",Fl=class r{constructor(e,t,n){this._modeId=e;this._client=t;this.fileConfigurationManager=n}_modeId;_client;fileConfigurationManager;static kind=vr.DocumentDropOrPasteEditKind.TextUpdateImports.append("jsts");static metadataMimeType="application/vnd.code.jsts.metadata";async prepareDocumentPaste(e,t,n,i){if(!this.isEnabled(e))return;let o=this._client.toOpenTsFilePath(e);if(!o)return;let s=this._client.interruptGetErr(()=>this._client.execute("preparePasteEdits",{file:o,copiedTextSpan:t.map(Se.toTextSpan)},i)),c=await jC(s,200);if(!i.isCancellationRequested)if(c){if(c.type!=="response"||!c.body)return;n.set(r.metadataMimeType,new vr.DataTransferItem(new Rd(e.uri,t,void 0)))}else n.set(r.metadataMimeType,new vr.DataTransferItem(new Rd(e.uri,t,s)))}async provideDocumentPasteEdits(e,t,n,i,o){if(!this.isEnabled(e))return;let s=this._client.toOpenTsFilePath(e);if(!s)return;let a=await n.get("text/plain")?.asString();if(!a||o.isCancellationRequested)return;let c=await this.extractMetadata(n,o);if(o.isCancellationRequested)return;let l;if(c){let d=c.ranges.map(Se.toTextSpan),f=this._client.toTsFilePath(c.resource);f&&(l={file:f,spans:d})}if(l?.file===s)return;let u=new vr.CancellationTokenSource;o.onCancellationRequested(()=>u.cancel()),c?.copyOperation?.then(d=>{(d.type!=="response"||!d.body)&&u.cancel()},d=>{});try{let d=this._client.interruptGetErr(()=>(this.fileConfigurationManager.ensureConfigurationForDocument(e,o),this._client.execute("getPasteEdits",{file:s,pastedText:[a],pasteLocations:t.map(Se.toTextSpan),copiedFrom:l},u.token))),v=await jC(d,200);if(v){let m=My.tryCreateFromResponse(this._client,v);return m?[m]:void 0}else return[new $p(a,d)]}finally{u.dispose()}}async resolveDocumentPasteEdit(e,t){if(!(e instanceof $p))return;let n=await e.operation;return $p.tryCreateFromResponse(this._client,n)??e}async extractMetadata(e,t){let n=await e.get(r.metadataMimeType)?.value;if(!t.isCancellationRequested){if(n instanceof Rd)return n;if(typeof n=="string")return Rd.parse(n)}}isEnabled(e){return q(fO,!0,{scope:e,fallbackSection:this._modeId})}}});var qs,Uy=E(()=>{"use strict";Xe();qs=class{constructor(e){this.client=e}client;async getSymbolLocations(e,t,n,i){let o=this.client.toOpenTsFilePath(t);if(!o)return;let s=ye.toFileLocationRequestArgs(o,n),a=await this.client.execute(e,s,i);if(!(a.type!=="response"||!a.body))return a.body.map(c=>xr.fromTextSpan(this.client.toResource(c.file),c))}}});var gO={};Be(gO,{default:()=>Jp,register:()=>yH});function yH(r,e){return ke([He(e,1,2)],()=>mO.languages.registerDefinitionProvider(r.syntax,new Jp(e)))}var mO,Jp,hO=E(()=>{"use strict";mO=U(require("vscode"));Qt();Xe();dt();Uy();jt();kt();Jp=class extends qs{async provideDefinition(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o=ye.toFileLocationRequestArgs(i,t),s=await this.client.execute("definitionAndBoundSpan",o,n);if(s.type!=="response"||!s.body)return;let a=s.body.textSpan?Se.fromTextSpan(s.body.textSpan):void 0,c=s.body.definitions;if(q("preferGoToSourceDefinition",!1,{scope:e,fallbackSection:e.languageId})&&this.client.apiVersion.gte(ve.v470)){let l=await this.client.execute("findSourceDefinition",o,n);l.type==="response"&&l.body?.length&&(c=l.body)}return c.map(l=>{let u=xr.fromTextSpan(this.client.toResource(l.file),l);return l.contextStart&&l.contextEnd?{originSelectionRange:a,targetRange:Se.fromLocations(l.contextStart,l.contextEnd),targetUri:u.uri,targetSelectionRange:u.range}:{originSelectionRange:a,targetRange:u.range,targetUri:u.uri}})}}});var SO={};Be(SO,{register:()=>_H});function _H(r,e){return Qn.languages.registerCompletionItemProvider(r.syntax,new qC(e),"@")}var Qn,yO,SH,qC,_O=E(()=>{"use strict";Qn=U(require("vscode"));Qt();yO=[{value:"@ts-check",description:Qn.l10n.t("Enables semantic checking in a JavaScript file. Must be at the top of a file.")},{value:"@ts-nocheck",description:Qn.l10n.t("Disables semantic checking in a JavaScript file. Must be at the top of a file.")},{value:"@ts-ignore",description:Qn.l10n.t("Suppresses @ts-check errors on the next line of a file.")}],SH=[...yO,{value:"@ts-expect-error",description:Qn.l10n.t("Suppresses @ts-check errors on the next line of a file, expecting at least one to exist.")}],qC=class{constructor(e){this.client=e}client;provideCompletionItems(e,t,n){if(!this.client.toOpenTsFilePath(e))return[];let a=e.lineAt(t.line).text.slice(0,t.character).match(/^\s*\/\/+\s?(@[a-zA-Z\-]*)?$/);return a?(this.client.apiVersion.gte(ve.v390)?SH:yO).map(l=>{let u=new Qn.CompletionItem(l.value,Qn.CompletionItemKind.Snippet);return u.detail=l.description,u.range=new Qn.Range(t.line,Math.max(0,t.character-(a[1]?a[1].length:0)),t.line,t.character),u}):[]}}});var bO={};Be(bO,{register:()=>TH});function TO(r){return r.highlightSpans.map(e=>new Yn.DocumentHighlight(Se.fromTextSpan(e),e.kind==="writtenReference"?Yn.DocumentHighlightKind.Write:Yn.DocumentHighlightKind.Read))}function TH(r,e){let t=new HC(e);return Yn.Disposable.from(Yn.languages.registerDocumentHighlightProvider(r.syntax,t),Yn.languages.registerMultiDocumentHighlightProvider(r.syntax,t))}var Yn,HC,EO=E(()=>{"use strict";Yn=U(require("vscode"));Xe();HC=class{constructor(e){this.client=e}client;async provideMultiDocumentHighlights(e,t,n,i){let o=[e,...n].map(u=>this.client.toOpenTsFilePath(u)).filter(u=>!!u),s=this.client.toOpenTsFilePath(e);if(!s||o.length===0)return[];let a={...ye.toFileLocationRequestArgs(s,t),filesToSearch:o},c=await this.client.execute("documentHighlights",a,i);return c.type!=="response"||!c.body?[]:c.body.map(u=>new Yn.MultiDocumentHighlight(Yn.Uri.file(u.file),[...TO(u)]))}async provideDocumentHighlights(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return[];let o={...ye.toFileLocationRequestArgs(i,t),filesToSearch:[i]},s=await this.client.execute("documentHighlights",o,n);return s.type!=="response"||!s.body?[]:s.body.flatMap(TO)}}});var CO={};Be(CO,{register:()=>EH});function EH(r,e,t){return Ht.languages.registerDocumentSymbolProvider(r.syntax,new KC(e,t),{label:"TypeScript"})}var Ht,bH,KC,PO=E(()=>{"use strict";Ht=U(require("vscode"));Hp();Mn();Xe();bH=r=>{switch(r){case L.module:return Ht.SymbolKind.Module;case L.class:return Ht.SymbolKind.Class;case L.enum:return Ht.SymbolKind.Enum;case L.interface:return Ht.SymbolKind.Interface;case L.method:return Ht.SymbolKind.Method;case L.memberVariable:return Ht.SymbolKind.Property;case L.memberGetAccessor:return Ht.SymbolKind.Property;case L.memberSetAccessor:return Ht.SymbolKind.Property;case L.variable:return Ht.SymbolKind.Variable;case L.const:return Ht.SymbolKind.Variable;case L.localVariable:return Ht.SymbolKind.Variable;case L.function:return Ht.SymbolKind.Function;case L.localFunction:return Ht.SymbolKind.Function;case L.constructSignature:return Ht.SymbolKind.Constructor;case L.constructorImplementation:return Ht.SymbolKind.Constructor}return Ht.SymbolKind.Variable},KC=class r{constructor(e,t){this.client=e;this.cachedResponse=t}client;cachedResponse;async provideDocumentSymbols(e,t){let n=this.client.toOpenTsFilePath(e);if(!n)return;let i={file:n},o=await this.cachedResponse.execute(e,()=>this.client.execute("navtree",i,t));if(o.type!=="response"||!o.body?.childItems)return;let s=[];for(let a of o.body.childItems)r.convertNavTree(e.uri,s,a);return s}static convertNavTree(e,t,n){let i=r.shouldInclueEntry(n);if(!i&&!n.childItems?.length)return!1;let o=new Set(n.childItems||[]);for(let s of n.spans){let a=Se.fromTextSpan(s),c=r.convertSymbol(n,a);for(let l of o)if(l.spans.some(u=>!!a.intersection(Se.fromTextSpan(u)))){let u=r.convertNavTree(e,c.children,l);i=i||u,o.delete(l)}i&&t.push(c)}return i}static convertSymbol(e,t){let n=e.nameSpan?Se.fromTextSpan(e.nameSpan):t,i=e.text;switch(e.kind){case L.memberGetAccessor:i=`(get) ${i}`;break;case L.memberSetAccessor:i=`(set) ${i}`;break}let o=new Ht.DocumentSymbol(i,"",bH(e.kind),t,t.contains(n)?n:t);return Ms(e.kindModifiers).has(Xn.deprecated)&&(o.tags=[Ht.SymbolTag.Deprecated]),o}static shouldInclueEntry(e){return e.kind===L.alias?!1:!!(e.text&&e.text!=="<function>"&&e.text!=="<class>")}}});var xO={};Be(xO,{register:()=>CH});function CH(r,e){function t(n){bt.commands.executeCommand("setContext",Xp.context,n??r.apiVersion.gte(Xp.minVersion))}return t(),e.register(new Xp(r)),bt.Disposable.from(r.onTsServerStarted(()=>t()),new bt.Disposable(()=>t(!1)))}var bt,Xp,DO=E(()=>{"use strict";bt=U(require("vscode"));_i();Qt();Xe();Xp=class r{constructor(e){this.client=e}client;static context="tsSupportsFileReferences";static minVersion=ve.v420;id="typescript.findAllFileReferences";async execute(e){if(this.client.apiVersion.lt(r.minVersion)){bt.window.showErrorMessage(bt.l10n.t("Find file references failed. Requires TypeScript 4.2+."));return}if(e??=bt.window.activeTextEditor?.document.uri,!e){bt.window.showErrorMessage(bt.l10n.t("Find file references failed. No resource provided."));return}let t=await bt.workspace.openTextDocument(e);if(!Lo(t)){bt.window.showErrorMessage(bt.l10n.t("Find file references failed. Unsupported file type."));return}let n=this.client.toOpenTsFilePath(t);if(!n){bt.window.showErrorMessage(bt.l10n.t("Find file references failed. Unknown file type."));return}await bt.window.withProgress({location:bt.ProgressLocation.Window,title:bt.l10n.t("Finding file references")},async(i,o)=>{let s=await this.client.execute("fileReferences",{file:n},o);if(s.type!=="response"||!s.body)return;let a=s.body.refs.map(u=>xr.fromTextSpan(this.client.toResource(u.file),u)),c=bt.workspace.getConfiguration("references"),l=c.inspect("preferredLocation");await c.update("preferredLocation","view");try{await bt.commands.executeCommand("editor.action.showReferences",e,new bt.Position(0,0),a)}finally{await c.update("preferredLocation",l?.workspaceFolderValue??l?.workspaceValue)}})}}});var Yy,IO,NO,Vy,RO,wO,AO,OO,kO,LO,BC=E(()=>{"use strict";Yy=new Set([6196,6133]),IO=new Set([6138]),NO=new Set([6192]),Vy=new Set([7027]),RO=new Set([7028]),wO=new Set([7029]),AO=new Set([7030]),OO=new Set([2420]),kO=new Set([2552,2304]),LO=new Set([1308])});var MO,UO,YO,VO,jy,jO,Qp,qO,HO,qy,KO,BO,GO,WO,zO,$O,JO,Hy,Ky,GC=E(()=>{"use strict";MO="addMissingAwait",UO="addMissingNewOperator",YO="fixOverrideModifier",VO="annotateWithTypeFromJSDoc",jy="fixAwaitInSyncFunction",jO="fixClassDoesntImplementInheritedAbstractMember",Qp="fixClassIncorrectlyImplementsInterface",qO="constructorForDerivedNeedSuperCall",HO="extendsInterfaceBecomesImplements",qy="import",KO="forgottenThisPropertyAccess",BO="removeUnnecessaryAwait",GO="spelling",WO="inferFromUsage",zO="addNameToNamelessParameter",$O="fixMissingFunctionDeclaration",JO="fixClassDoesntImplementInheritedAbstractMember",Hy="fixUnreachableCode",Ky="unusedIdentifier"});var QO={};Be(QO,{register:()=>xH});async function PH(r,e,t,n,i,o){for(let s of i)for(let{codes:a,fixName:c}of r){if(o.isCancellationRequested)return;if(!a.has(s.code))continue;let l={...Se.toFileRangeRequestArgs(n,s.range),errorCodes:[+s.code]},u=await t.execute("getCodeFixes",l,o);if(u.type!=="response")continue;let d=u.body?.find(f=>f.fixName===c);if(d){Wr.withFileCodeEdits(e,t,d.changes);break}}}async function XC(r,e,t,n,i,o){for(let s of i)for(let{codes:a,fixName:c}of r){if(o.isCancellationRequested)return;if(!a.has(s.code))continue;let l={...Se.toFileRangeRequestArgs(n,s.range),errorCodes:[+s.code]},u=await t.execute("getCodeFixes",l,o);if(u.type!=="response"||!u.body?.length)continue;let d=u.body?.find(m=>m.fixName===c);if(!d)continue;if(!d.fixId){Wr.withFileCodeEdits(e,t,d.changes);return}let f={scope:{type:"file",args:{file:n}},fixId:d.fixId},v=await t.execute("getCombinedCodeFix",f,o);if(v.type!=="response"||!v.body)return;Wr.withFileCodeEdits(e,t,v.body.changes);return}}function xH(r,e,t,n){return ke([He(e,2)],()=>{let i=new JC(e,t,n);return zr.languages.registerCodeActionsProvider(r.semantic,i,i.metadata)})}var zr,Zp,WC,zC,$C,JC,ZO=E(()=>{"use strict";zr=U(require("vscode"));BC();GC();Xe();dt();kt();Zp=class extends zr.CodeAction{},WC=class r extends Zp{static kind=zr.CodeActionKind.SourceFixAll.append("ts");constructor(){super(zr.l10n.t("Fix all fixable JS/TS issues"),r.kind)}async build(e,t,n,i){this.edit=new zr.WorkspaceEdit,await PH([{codes:OO,fixName:Qp},{codes:LO,fixName:jy}],this.edit,e,t,n,i),await XC([{codes:Vy,fixName:Hy}],this.edit,e,t,n,i)}},zC=class r extends Zp{static kind=zr.CodeActionKind.Source.append("removeUnused").append("ts");constructor(){super(zr.l10n.t("Remove all unused code"),r.kind)}async build(e,t,n,i){this.edit=new zr.WorkspaceEdit,await XC([{codes:Yy,fixName:Ky}],this.edit,e,t,n,i)}},$C=class r extends Zp{static kind=zr.CodeActionKind.Source.append("addMissingImports").append("ts");constructor(){super(zr.l10n.t("Add all missing imports"),r.kind)}async build(e,t,n,i){this.edit=new zr.WorkspaceEdit,await XC([{codes:kO,fixName:qy}],this.edit,e,t,n,i)}},JC=class r{constructor(e,t,n){this.client=e;this.fileConfigurationManager=t;this.diagnosticsManager=n}client;fileConfigurationManager;diagnosticsManager;static kindProviders=[WC,zC,$C];get metadata(){return{providedCodeActionKinds:r.kindProviders.map(e=>e.kind)}}async provideCodeActions(e,t,n,i){if(!n.only||!zr.CodeActionKind.Source.intersects(n.only))return;let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=this.getFixAllActions(n.only),a=this.diagnosticsManager.getDiagnostics(e.uri);if(!a.length)return s;if(await this.fileConfigurationManager.ensureConfigurationForDocument(e,i),!i.isCancellationRequested)return await Promise.all(s.map(c=>c.build(this.client,o,a,i))),s}getFixAllActions(e){return r.kindProviders.filter(t=>e.intersects(t.kind)).map(t=>new t)}}});var ek={};Be(ek,{register:()=>DH});function DH(r,e){return Ko.languages.registerFoldingRangeProvider(r.syntax,new QC(e))}var Ko,QC,tk=E(()=>{"use strict";Ko=U(require("vscode"));Xe();Ti();QC=class r{constructor(e){this.client=e}client;async provideFoldingRanges(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o={file:i},s=await this.client.execute("getOutliningSpans",o,n);if(!(s.type!=="response"||!s.body))return Pr(s.body.map(a=>this.convertOutliningSpan(a,e)))}convertOutliningSpan(e,t){let n=Se.fromTextSpan(e.textSpan),i=r.getFoldingRangeKind(e);if(e.kind==="comment"){let a=t.lineAt(n.start.line).text;if(/\/\/\s*#endregion/gi.test(a))return}let o=n.start.line,s=this.adjustFoldingEnd(n,t);return new Ko.FoldingRange(o,s,i)}static foldEndPairCharacters=["}","]",")","`",">"];adjustFoldingEnd(e,t){if(e.end.character>0){let n=t.getText(new Ko.Range(e.end.translate(0,-1),e.end));if(r.foldEndPairCharacters.includes(n))return Math.max(e.end.line-1,e.start.line)}return e.end.line}static getFoldingRangeKind(e){switch(e.kind){case"comment":return Ko.FoldingRangeKind.Comment;case"region":return Ko.FoldingRangeKind.Region;case"imports":return Ko.FoldingRangeKind.Imports;default:return}}}});var rk={};Be(rk,{register:()=>IH});function IH(r,e,t,n){return ke([Dd("format.enabled",{fallbackSection:e.id,fallbackSubSectionNameOverride:"format.enable"})],()=>{let i=new ZC(t,n);return ev.Disposable.from(ev.languages.registerOnTypeFormattingEditProvider(r.syntax,i,";","}",`
`),ev.languages.registerDocumentRangeFormattingEditProvider(r.syntax,i))})}var ev,ZC,nk=E(()=>{"use strict";ev=U(require("vscode"));Xe();kt();ZC=class{constructor(e,t){this.client=e;this.fileConfigurationManager=t}client;fileConfigurationManager;async provideDocumentRangeFormattingEdits(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;await this.fileConfigurationManager.ensureConfigurationOptions(e,n,i);let s=Se.toFormattingRequestArgs(o,t),a=await this.client.execute("format",s,i);if(!(a.type!=="response"||!a.body))return a.body.map(ec.fromCodeEdit)}async provideOnTypeFormattingEdits(e,t,n,i,o){let s=this.client.toOpenTsFilePath(e);if(!s)return;await this.fileConfigurationManager.ensureConfigurationOptions(e,i,o);let a={...ye.toFileLocationRequestArgs(s,t),key:n},c=await this.client.execute("formatonkey",a,o);if(c.type!=="response"||!c.body)return[];let l=[];for(let u of c.body){let d=ec.fromCodeEdit(u),f=d.range;if(f.start.character===0&&f.start.line===f.end.line&&d.newText===""){let v=e.lineAt(f.start.line).text;(v.trim().length>0||v.length>f.end.character)&&l.push(d)}else l.push(d)}return l}}});var ik={};Be(ik,{register:()=>RH});function RH(r,e,t){return ke([He(e,1,2)],()=>Bo.languages.registerHoverProvider(r.syntax,new eP(e,t)))}var Bo,eP,ok=E(()=>{"use strict";Bo=U(require("vscode"));dt();kt();wy();Xe();Qt();eP=class{constructor(e,t){this.client=e;this.fileConfigurationManager=t}client;fileConfigurationManager;lastHoverAndLevel;async provideHover(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s;this.client.apiVersion.gte(ve.v590)&&(s=Math.max(0,this.getPreviousLevel(i?.previousHover)+(i?.verbosityDelta??0)));let a={...ye.toFileLocationRequestArgs(o,t),verbosityLevel:s},c=await this.client.interruptGetErr(async()=>(await this.fileConfigurationManager.ensureConfigurationForDocument(e,n),this.client.execute("quickinfo",a,n)));if(c.type!=="response"||!c.body)return;let l=this.getContents(e.uri,c.body,c._serverType),u=Se.fromTextSpan(c.body),d=s!==void 0?new Bo.VerboseHover(l,u,c.body.canIncreaseVerbosityLevel,s!==0):new Bo.Hover(l,u);return s!==void 0&&(this.lastHoverAndLevel=[d,s]),d}getContents(e,t,n){let i=[];if(t.displayString){let s=[];n==="syntax"&&this.client.hasCapabilityForResource(e,2)&&s.push(Bo.l10n.t({message:"(loading...)",comment:["Prefix displayed for hover entries while the server is still loading"]})),s.push(t.displayString),i.push(new Bo.MarkdownString().appendCodeblock(s.join(" "),"typescript"))}let o=zp(t.documentation,t.tags,this.client,e);return i.push(o),i}getPreviousLevel(e){return e&&this.lastHoverAndLevel?.[0]===e?this.lastHoverAndLevel[1]:0}}});var ak={};Be(ak,{register:()=>wH});function wH(r,e){return ke([He(e,2)],()=>sk.languages.registerImplementationProvider(r.semantic,new tP(e)))}var sk,tP,ck=E(()=>{"use strict";sk=U(require("vscode"));dt();Uy();kt();tP=class extends qs{provideImplementation(e,t,n){return this.getSymbolLocations("implementation",e,t,n)}}});var lk={};Be(lk,{register:()=>LH});function OH(r){switch(r){case"Parameter":return Vn.InlayHintKind.Parameter;case"Type":return Vn.InlayHintKind.Type;case"Enum":return;default:return}}function kH(r,e){let t=CC(e,r.id);return t.includeInlayParameterNameHints==="literals"||t.includeInlayParameterNameHints==="all"||t.includeInlayEnumMemberValueHints||t.includeInlayFunctionLikeReturnTypeHints||t.includeInlayFunctionParameterTypeHints||t.includeInlayPropertyDeclarationTypeHints||t.includeInlayVariableTypeHints}function LH(r,e,t,n,i){return ke([jo(t,By.minVersion),He(t,2)],()=>{let o=new By(e,t,n,i);return Vn.languages.registerInlayHintsProvider(r.semantic,o)})}var Vn,AH,By,uk=E(()=>{"use strict";Vn=U(require("vscode"));Qt();Xe();dt();jt();yt();PC();kt();AH=Object.values(Uo),By=class extends _e{constructor(t,n,i,o){super();this.language=t;this.client=n;this.fileConfigurationManager=i;this.telemetryReporter=o;this._register(Vn.workspace.onDidChangeConfiguration(s=>{AH.some(a=>s.affectsConfiguration(vn+"."+a)||s.affectsConfiguration(t.id+"."+a))&&this._onDidChangeInlayHints.fire()})),this._register(Vn.workspace.onDidChangeTextDocument(s=>{t.languageIds.includes(s.document.languageId)&&this._onDidChangeInlayHints.fire()}))}language;client;fileConfigurationManager;telemetryReporter;static minVersion=ve.v440;_onDidChangeInlayHints=this._register(new Vn.EventEmitter);onDidChangeInlayHints=this._onDidChangeInlayHints.event;hasReportedTelemetry=!1;async provideInlayHints(t,n,i){let o=this.client.toOpenTsFilePath(t);if(!o||!kH(this.language,t))return;let s=t.offsetAt(n.start),a=t.offsetAt(n.end)-s;if(await this.fileConfigurationManager.ensureConfigurationForDocument(t,i),i.isCancellationRequested)return;this.hasReportedTelemetry||(this.hasReportedTelemetry=!0,this.telemetryReporter.logTelemetry("inlayHints.provide",{}));let c=await this.client.execute("provideInlayHints",{file:o,start:s,length:a},i);if(!(c.type!=="response"||!c.success||!c.body))return c.body.map(l=>{let u=new Vn.InlayHint(ye.fromLocation(l.position),this.convertInlayHintText(l),OH(l.kind));return u.paddingLeft=l.whitespaceBefore,u.paddingRight=l.whitespaceAfter,u})}convertInlayHintText(t){return t.displayParts?t.displayParts.map(n=>{let i=new Vn.InlayHintLabelPart(n.text);return n.span&&(i.location=xr.fromTextSpan(this.client.toResource(n.span.file),n.span)),i}):t.text}}});var fk={};Be(fk,{register:()=>MH,templateToSnippet:()=>dk});function dk(r){let e=1;return r=r.replace(/\$/g,"\\$"),r=r.replace(/^[ \t]*(?=(\/|[ ]\*))/gm,""),r=r.replace(/^(\/\*\*\s*\*[ ]*)$/m,t=>t+"$0"),r=r.replace(/\* @param([ ]\{\S+\})?\s+(\S+)[ \t]*$/gm,(t,n,i)=>{let o="* @param ";return n===" {any}"||n===" {*}"?o+=`{\${${e++}:*}} `:n&&(o+=n+" "),o+=i+` \${${e++}}`,o}),r=r.replace(/\* @returns[ \t]*$/gm,`* @returns \${${e++}}`),new Zn.SnippetString(r)}function MH(r,e,t,n){return Zn.languages.registerCompletionItemProvider(r.syntax,new nP(t,e,n),"*")}var Zn,FH,rP,nP,pk=E(()=>{"use strict";Zn=U(require("vscode"));Xe();jt();FH=new Zn.SnippetString(`/**
 * $0
 */`),rP=class extends Zn.CompletionItem{constructor(t,n){super("/** */",Zn.CompletionItemKind.Text);this.document=t;this.position=n;this.detail=Zn.l10n.t("JSDoc comment"),this.sortText="\0";let i=t.lineAt(n.line).text,o=i.slice(0,n.character).match(/\/\**\s*$/),s=i.slice(n.character).match(/^\s*\**\//),a=n.translate(0,o?-o[0].length:0),c=new Zn.Range(a,n.translate(0,s?s[0].length:0));this.range={inserting:c,replacing:c}}document;position},nP=class{constructor(e,t,n){this.client=e;this.language=t;this.fileConfigurationManager=n}client;language;fileConfigurationManager;async provideCompletionItems(e,t,n){if(!q("suggest.jsdoc.enabled",!0,{scope:e,fallbackSection:this.language.id,fallbackSubSectionNameOverride:"suggest.completeJSDocs"}))return;let i=this.client.toOpenTsFilePath(e);if(!i||!this.isPotentiallyValidDocCompletionPosition(e,t))return;let o=await this.client.interruptGetErr(async()=>{await this.fileConfigurationManager.ensureConfigurationForDocument(e,n);let a=ye.toFileLocationRequestArgs(i,t);return this.client.execute("docCommentTemplate",a,n)});if(o.type!=="response"||!o.body)return;let s=new rP(e,t);return o.body.newText==="/** */"?s.insertText=FH:s.insertText=dk(o.body.newText),[s]}isPotentiallyValidDocCompletionPosition(e,t){let n=e.lineAt(t.line).text,i=n.slice(0,t.character);if(!/^\s*$|\/\*\*\s*$|^\s*\/\*\*+\s*$/.test(i))return!1;let o=n.slice(t.character);return/^\s*(\*+\/)?\s*$/.test(o)}}});var vk={};Be(vk,{register:()=>UH});function UH(r,e){return ke([jo(e,Gy.minVersion),He(e,0)],()=>Wy.languages.registerLinkedEditingRangeProvider(r.syntax,new Gy(e)))}var Wy,Gy,mk=E(()=>{"use strict";Wy=U(require("vscode"));Qt();Xe();dt();kt();Gy=class{constructor(e){this.client=e}client;static minVersion=ve.v510;async provideLinkedEditingRanges(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o=ye.toFileLocationRequestArgs(i,t),s=await this.client.execute("linkedEditingRange",o,n);if(s.type!=="response"||!s.body)return;let a=s.body.wordPattern?new RegExp(s.body.wordPattern):void 0;return new Wy.LinkedEditingRanges(s.body.ranges.map(c=>Se.fromTextSpan(c)),a)}}});var gk={};Be(gk,{register:()=>qH});function qH(r,e,t,n,i){let o=[];for(let s of[YH,VH,jH])o.push(ke([jo(e,s.minVersion??ve.defaultVersion),He(e,2)],()=>{let a=new oP(e,s,t,n,i);return $r.Disposable.from($r.languages.registerCodeActionsProvider(r.semantic,a,{providedCodeActionKinds:[s.kind]}))}),...s.commandIds.map(a=>t.register({id:a,execute(){return $r.commands.executeCommand("editor.action.sourceAction",{kind:s.kind.value,apply:"first"})}})));return $r.Disposable.from(...o)}var $r,YH,VH,jH,zy,iP,oP,hk=E(()=>{"use strict";$r=U(require("vscode"));Qt();Mn();Xe();dt();ko();kt();YH={commandIds:[],title:$r.l10n.t("Organize Imports"),kind:$r.CodeActionKind.SourceOrganizeImports,mode:"All"},VH={commandIds:["typescript.sortImports","javascript.sortImports"],minVersion:ve.v430,title:$r.l10n.t("Sort Imports"),kind:$r.CodeActionKind.Source.append("sortImports"),mode:"SortAndCombine"},jH={commandIds:["typescript.removeUnusedImports","javascript.removeUnusedImports"],minVersion:ve.v490,title:$r.l10n.t("Remove Unused Imports"),kind:$r.CodeActionKind.Source.append("removeUnusedImports"),mode:"RemoveUnused"},zy=class r{constructor(e){this.telemetryReporter=e}telemetryReporter;static ID="_typescript.didOrganizeImports";id=r.ID;async execute(){this.telemetryReporter.logTelemetry("organizeImports.execute",{})}},iP=class extends $r.CodeAction{constructor(t,n,i){super(t,n);this.document=i}document},oP=class{constructor(e,t,n,i,o){this.client=e;this.commandMetadata=t;this.fileConfigManager=i;n.register(new zy(o))}client;commandMetadata;fileConfigManager;provideCodeActions(e,t,n,i){return n.only?.contains(this.commandMetadata.kind)?this.client.toOpenTsFilePath(e)?[new iP(this.commandMetadata.title,this.commandMetadata.kind,e)]:[]:[]}async resolveCodeAction(e,t){let n=await this.client.interruptGetErr(async()=>{if(await this.fileConfigManager.ensureConfigurationForDocument(e.document,t),t.isCancellationRequested)return;let i=this.client.toOpenTsFilePath(e.document);if(!i)return;let o={scope:{type:"file",args:{file:i}},skipDestructiveCodeActions:this.commandMetadata.mode==="SortAndCombine",mode:wC.toProtocolOrganizeImportsMode(this.commandMetadata.mode)};return this.client.execute("organizeImports",o,It)});if(!(n?.type!=="response"||!n.body||t.isCancellationRequested))return n.body.length&&(e.edit=Wr.fromFileCodeEdits(this.client,n.body)),e.command={command:zy.ID,title:"",arguments:[]},e}}});var Jr,nc=E(()=>{"use strict";Jr=class r{constructor(e){this.executor=e}executor;_didRun=!1;_value;_error;get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}map(e){return new r(()=>e(this.value))}}});function Sk(r,e){for(let t of e){let n=Se.fromTextSpan(t.spans[0]);if(r===n.start.line)return n;if(r>n.start.line&&r<=n.end.line&&t.childItems)return Sk(r,t.childItems)}}async function _k(r,e,t){let n=r.toOpenTsFilePath(e);if(!n)return;let i=await r.execute("navtree",{file:n},It);if(!(i.type!=="response"||!i.body?.childItems))return Sk(t,i.body.childItems)}async function yk(r,e,t){let n=ye.fromLocation(t[0].start),i=t[0],o=t[0],s=ye.fromLocation(t[0].start);for(let v of t){let m=ye.fromLocation(v.start),S=ye.fromLocation(v.end);m.compareTo(n)<0&&(n=m,i=v),S.compareTo(s)>0&&(s=S,o=v)}let a=e.getText(),c=a.indexOf(i.newText),l=c>-1?e.positionAt(c):n,u=a.lastIndexOf(o.newText),d=u>-1?e.positionAt(u+o.newText.length):s,f=await _k(r,e,d.line);return new Ml.Range(l,f?.end??d)}var Ml,ic,oc,sP=E(()=>{"use strict";Ml=U(require("vscode"));ko();Xe();ic=class r{constructor(e,t){this.client=e;this.telemetryReporter=t}client;telemetryReporter;static ID="_typescript.quickFix.editorChatReplacement2";id=r.ID;async execute({message:e,document:t,expand:n,action:i}){i.type==="quickfix"?this.telemetryReporter.logTelemetry("aiQuickfix.execute",{action:i.quickfix.fixName}):this.telemetryReporter.logTelemetry("aiRefactor.execute",{action:i.refactor.name});let o=n.kind==="navtree-function"?await _k(this.client,t,n.pos.line):n.kind==="refactor-info"?await yk(this.client,t,n.refactor.edits.flatMap(a=>a.textChanges)):n.kind==="code-action"?await yk(this.client,t,n.action.changes.flatMap(a=>a.textChanges)):n.range,s=o?new Ml.Selection(o.start,o.end):void 0;await Ml.commands.executeCommand("vscode.editorChat.start",{initialRange:o,initialSelection:s,message:e,autoSend:!0})}},oc=class r{static ID="_typescript.compositeCommand";id=r.ID;async execute(...e){for(let t of e)await Ml.commands.executeCommand(t.command,...t.arguments??[])}}});var bk={};Be(bk,{register:()=>KH});function HH(r,e){if(r instanceof Ad)return!1;let t=Tk.get(r.tsAction.fixName);return t?e.every(n=>{if(n===r||n instanceof Ad)return!0;let i=Tk.get(n.tsAction.fixName);return!i||i.priority<t.priority?!0:!(i.priority>t.priority||t.thereCanOnlyBeOne&&r.tsAction.fixName===n.tsAction.fixName)}):!1}function KH(r,e,t,n,i,o){return ke([He(e,2)],()=>Et.languages.registerCodeActionsProvider(r.semantic,new Jy(e,t,n,i,o),Jy.metadata))}var Et,tv,$y,cP,wd,Ad,lP,uP,Jy,aP,Tk,Ek=E(()=>{"use strict";Et=U(require("vscode"));GC();Xe();dt();ko();nc();Vp();UC();sP();kt();tv=class r{constructor(e,t,n){this.client=e;this.diagnosticManager=t;this.telemetryReporter=n}client;diagnosticManager;telemetryReporter;static ID="_typescript.applyCodeActionCommand";id=r.ID;async execute({document:e,action:t,diagnostic:n,followupAction:i}){this.telemetryReporter.logTelemetry("quickFix.execute",{fixName:t.fixName}),this.diagnosticManager.deleteDiagnostic(e.uri,n);let o=await Iy(this.client,t.commands,It);return await i?.execute(),o}},$y=class r{constructor(e,t){this.client=e;this.telemetryReporter=t}client;telemetryReporter;static ID="_typescript.applyFixAllCodeAction";id=r.ID;async execute(e){this.telemetryReporter.logTelemetry("quickFixAll.execute",{fixName:e.action.tsAction.fixName}),e.action.combinedResponse&&await Iy(this.client,e.action.combinedResponse.body.commands,It)}},cP=class r{constructor(e){this._values=e}_values;static from(e){let t=new Map;for(let n of e)t.set(r.key(n),n);return new r(t)}static key(e){let{start:t,end:n}=e.range;return`${e.code}-${t.line},${t.character}-${n.line},${n.character}`}get values(){return this._values.values()}get size(){return this._values.size}},wd=class extends Et.CodeAction{constructor(t,n,i){super(n,i);this.tsAction=t}tsAction},Ad=class extends wd{constructor(t,n,i,o){super(t,i,o);this.file=n}file;combinedResponse},lP=class{_actions=new Set;_fixAllActions=new Map;_aiActions=new Set;*values(){yield*this._actions,yield*this._aiActions}addAction(e){if(e.isAI){this._aiActions.add(e);return}for(let t of this._actions)e.tsAction.fixName===t.tsAction.fixName&&Bi(e.edit,t.edit)&&this._actions.delete(t);if(this._actions.add(e),e.tsAction.fixId){let t=this._fixAllActions.get(e.tsAction.fixId);t&&(this._actions.delete(t),this._actions.add(t))}}addFixAllAction(e,t){let n=this._fixAllActions.get(e);n&&this._actions.delete(n),this.addAction(t),this._fixAllActions.set(e,t)}hasFixAllAction(e){return this._fixAllActions.has(e)}},uP=class{constructor(e){this.client=e}client;async getFixableDiagnosticsForContext(e){let t=await this.fixableDiagnosticCodes.value;return cP.from(e.filter(n=>typeof n.code<"u"&&t.has(n.code+"")))}fixableDiagnosticCodes=new Jr(()=>this.client.execute("getSupportedCodeFixes",null,It).then(e=>e.type==="response"?e.body||[]:[]).then(e=>new Set(e)))},Jy=class r{constructor(e,t,n,i,o){this.client=e;this.formattingConfigurationManager=t;this.diagnosticsManager=i;n.register(new oc),n.register(new tv(e,i,o)),n.register(new $y(e,o)),n.register(new ic(e,o)),this.supportedCodeActionProvider=new uP(e)}client;formattingConfigurationManager;diagnosticsManager;static _maxCodeActionsPerFile=1e3;static metadata={providedCodeActionKinds:[Et.CodeActionKind.QuickFix]};supportedCodeActionProvider;async provideCodeActions(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=n.diagnostics;if(this.client.bufferSyncSupport.hasPendingDiagnostics(e.uri)){if(await new Promise(d=>{setTimeout(d,500)}),i.isCancellationRequested)return;let u=[];for(let d of this.diagnosticsManager.getDiagnostics(e.uri))if(t.intersection(d.range)&&u.push(d)>r._maxCodeActionsPerFile)break;s=u}let a=await this.supportedCodeActionProvider.getFixableDiagnosticsForContext(s);if(!a.size||i.isCancellationRequested||(await this.formattingConfigurationManager.ensureConfigurationForDocument(e,i),i.isCancellationRequested))return;let c=new lP;for(let u of a.values)if(await this.getFixesForDiagnostic(e,o,u,c,i),i.isCancellationRequested)return;let l=Array.from(c.values());for(let u of l)u.isPreferred=HH(u,l);return l}async resolveCodeAction(e,t){if(!(e instanceof Ad)||!e.tsAction.fixId)return e;let n={scope:{type:"file",args:{file:e.file}},fixId:e.tsAction.fixId},i=await this.client.execute("getCombinedCodeFix",n,t);return i.type==="response"&&(e.combinedResponse=i,e.edit=Wr.fromFileCodeEdits(this.client,i.body.changes)),e}async getFixesForDiagnostic(e,t,n,i,o){let s={...Se.toFileRangeRequestArgs(t,n.range),errorCodes:[+n.code]},a=await this.client.execute("getCodeFixes",s,o);if(a.type!=="response"||!a.body)return i;for(let c of a.body){for(let l of this.getFixesForTsCodeAction(e,n,c))i.addAction(l);this.addFixAllForTsCodeAction(i,e.uri,t,n,c)}return i}getFixesForTsCodeAction(e,t,n){let i=[],o=new wd(n,n.description,Et.CodeActionKind.QuickFix);if(o.edit=Dy(this.client,n),o.diagnostics=[t],o.ranges=[t.range],o.command={command:tv.ID,arguments:[{action:n,diagnostic:t,document:e}],title:""},i.push(o),Et.extensions.getExtension("github.copilot-chat")?.isActive){let a,c,l=n.description;if(n.fixName===Qp)l=Et.l10n.t("{0} with AI",n.description),a=Et.l10n.t("Implement the stubbed-out class members for {0} with a useful implementation.",e.getText(t.range)),c={kind:"code-action",action:n};else if(n.fixName===JO)l=Et.l10n.t("{0} with AI",n.description),a=Et.l10n.t("Implement the stubbed-out class members for {0} with a useful implementation.",e.getText(t.range)),c={kind:"code-action",action:n};else if(n.fixName===$O)l=Et.l10n.t("Implement missing function declaration '{0}' using AI",e.getText(t.range)),a=Et.l10n.t("Provide a reasonable implementation of the function {0} given its type and the context it's called in.",e.getText(t.range)),c={kind:"code-action",action:n};else if(n.fixName===WO){let u=new wd(n,Et.l10n.t("Infer types using AI"),Et.CodeActionKind.QuickFix);u.edit=new Et.WorkspaceEdit,u.diagnostics=[t],u.ranges=[t.range],u.isAI=!0,u.command={command:ic.ID,arguments:[{message:Et.l10n.t("Add types to this code. Add separate interfaces when possible. Do not change the code except for adding types."),expand:{kind:"navtree-function",pos:t.range.start},document:e,action:{type:"quickfix",quickfix:n}}],title:""},i.push(u)}else if(n.fixName===zO){let u=n.changes.map(d=>d.textChanges.map(f=>f.newText).join("")).join("");l=Et.l10n.t("Add meaningful parameter name with AI"),a=Et.l10n.t("Rename the parameter {0} with a more meaningful name.",u),c={kind:"navtree-function",pos:t.range.start}}if(c&&a!==void 0){let u=new wd(n,l,Et.CodeActionKind.QuickFix);u.edit=Dy(this.client,n),u.edit?.insert(e.uri,t.range.start,""),u.diagnostics=[t],u.ranges=[t.range],u.isAI=!0,u.command={command:oc.ID,title:"",arguments:[{command:tv.ID,arguments:[{action:n,diagnostic:t,document:e}],title:""},{command:ic.ID,title:"",arguments:[{message:a,expand:c,document:e,action:{type:"quickfix",quickfix:n}}]}]},i.push(u)}}return i}addFixAllForTsCodeAction(e,t,n,i,o){if(!o.fixId||e.hasFixAllAction(o.fixId)||!this.diagnosticsManager.getDiagnostics(t).some(a=>a===i?!1:a.code===i.code||aP.has(a.code)&&aP.get(a.code)===aP.get(i.code)))return e;let s=new Ad(o,n,o.fixAllDescription||Et.l10n.t("{0} (Fix all in file)",o.description),Et.CodeActionKind.QuickFix);return s.diagnostics=[i],s.ranges=[i.range],s.command={command:$y.ID,arguments:[{action:s}],title:""},e.addFixAllAction(o.fixId,s),e}},aP=new Map([[2339,2339],[2345,2339]]),Tk=new Map([[VO,{priority:2}],[qO,{priority:2}],[HO,{priority:2}],[jy,{priority:2}],[BO,{priority:2}],[Qp,{priority:3}],[jO,{priority:3}],[Hy,{priority:2}],[Ky,{priority:2}],[KO,{priority:2}],[GO,{priority:0}],[MO,{priority:2}],[YO,{priority:2}],[UO,{priority:2}],[qy,{priority:1,thereCanOnlyBeOne:!0}]])});var Ck,I7,sc,dP=E(()=>{Ck=(()=>{"use strict";var r={470:n=>{function i(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function o(a,c){for(var l,u="",d=0,f=-1,v=0,m=0;m<=a.length;++m){if(m<a.length)l=a.charCodeAt(m);else{if(l===47)break;l=47}if(l===47){if(!(f===m-1||v===1))if(f!==m-1&&v===2){if(u.length<2||d!==2||u.charCodeAt(u.length-1)!==46||u.charCodeAt(u.length-2)!==46){if(u.length>2){var S=u.lastIndexOf("/");if(S!==u.length-1){S===-1?(u="",d=0):d=(u=u.slice(0,S)).length-1-u.lastIndexOf("/"),f=m,v=0;continue}}else if(u.length===2||u.length===1){u="",d=0,f=m,v=0;continue}}c&&(u.length>0?u+="/..":u="..",d=2)}else u.length>0?u+="/"+a.slice(f+1,m):u=a.slice(f+1,m),d=m-f-1;f=m,v=0}else l===46&&v!==-1?++v:v=-1}return u}var s={resolve:function(){for(var a,c="",l=!1,u=arguments.length-1;u>=-1&&!l;u--){var d;u>=0?d=arguments[u]:(a===void 0&&(a=process.cwd()),d=a),i(d),d.length!==0&&(c=d+"/"+c,l=d.charCodeAt(0)===47)}return c=o(c,!l),l?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(a){if(i(a),a.length===0)return".";var c=a.charCodeAt(0)===47,l=a.charCodeAt(a.length-1)===47;return(a=o(a,!c)).length!==0||c||(a="."),a.length>0&&l&&(a+="/"),c?"/"+a:a},isAbsolute:function(a){return i(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,c=0;c<arguments.length;++c){var l=arguments[c];i(l),l.length>0&&(a===void 0?a=l:a+="/"+l)}return a===void 0?".":s.normalize(a)},relative:function(a,c){if(i(a),i(c),a===c||(a=s.resolve(a))===(c=s.resolve(c)))return"";for(var l=1;l<a.length&&a.charCodeAt(l)===47;++l);for(var u=a.length,d=u-l,f=1;f<c.length&&c.charCodeAt(f)===47;++f);for(var v=c.length-f,m=d<v?d:v,S=-1,y=0;y<=m;++y){if(y===m){if(v>m){if(c.charCodeAt(f+y)===47)return c.slice(f+y+1);if(y===0)return c.slice(f+y)}else d>m&&(a.charCodeAt(l+y)===47?S=y:y===0&&(S=0));break}var N=a.charCodeAt(l+y);if(N!==c.charCodeAt(f+y))break;N===47&&(S=y)}var C="";for(y=l+S+1;y<=u;++y)y!==u&&a.charCodeAt(y)!==47||(C.length===0?C+="..":C+="/..");return C.length>0?C+c.slice(f+S):(f+=S,c.charCodeAt(f)===47&&++f,c.slice(f))},_makeLong:function(a){return a},dirname:function(a){if(i(a),a.length===0)return".";for(var c=a.charCodeAt(0),l=c===47,u=-1,d=!0,f=a.length-1;f>=1;--f)if((c=a.charCodeAt(f))===47){if(!d){u=f;break}}else d=!1;return u===-1?l?"/":".":l&&u===1?"//":a.slice(0,u)},basename:function(a,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');i(a);var l,u=0,d=-1,f=!0;if(c!==void 0&&c.length>0&&c.length<=a.length){if(c.length===a.length&&c===a)return"";var v=c.length-1,m=-1;for(l=a.length-1;l>=0;--l){var S=a.charCodeAt(l);if(S===47){if(!f){u=l+1;break}}else m===-1&&(f=!1,m=l+1),v>=0&&(S===c.charCodeAt(v)?--v==-1&&(d=l):(v=-1,d=m))}return u===d?d=m:d===-1&&(d=a.length),a.slice(u,d)}for(l=a.length-1;l>=0;--l)if(a.charCodeAt(l)===47){if(!f){u=l+1;break}}else d===-1&&(f=!1,d=l+1);return d===-1?"":a.slice(u,d)},extname:function(a){i(a);for(var c=-1,l=0,u=-1,d=!0,f=0,v=a.length-1;v>=0;--v){var m=a.charCodeAt(v);if(m!==47)u===-1&&(d=!1,u=v+1),m===46?c===-1?c=v:f!==1&&(f=1):c!==-1&&(f=-1);else if(!d){l=v+1;break}}return c===-1||u===-1||f===0||f===1&&c===u-1&&c===l+1?"":a.slice(c,u)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return(function(c,l){var u=l.dir||l.root,d=l.base||(l.name||"")+(l.ext||"");return u?u===l.root?u+d:u+"/"+d:d})(0,a)},parse:function(a){i(a);var c={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return c;var l,u=a.charCodeAt(0),d=u===47;d?(c.root="/",l=1):l=0;for(var f=-1,v=0,m=-1,S=!0,y=a.length-1,N=0;y>=l;--y)if((u=a.charCodeAt(y))!==47)m===-1&&(S=!1,m=y+1),u===46?f===-1?f=y:N!==1&&(N=1):f!==-1&&(N=-1);else if(!S){v=y+1;break}return f===-1||m===-1||N===0||N===1&&f===m-1&&f===v+1?m!==-1&&(c.base=c.name=v===0&&d?a.slice(1,m):a.slice(v,m)):(v===0&&d?(c.name=a.slice(1,f),c.base=a.slice(1,m)):(c.name=a.slice(v,f),c.base=a.slice(v,m)),c.ext=a.slice(f,m)),v>0?c.dir=a.slice(0,v-1):d&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,n.exports=s},447:(n,i,o)=>{var s;if(o.r(i),o.d(i,{URI:()=>C,Utils:()=>ie}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;s=a.indexOf("Windows")>=0}var c,l,u=(c=function(x,g){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,I){D.__proto__=I}||function(D,I){for(var Z in I)Object.prototype.hasOwnProperty.call(I,Z)&&(D[Z]=I[Z])})(x,g)},function(x,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function D(){this.constructor=x}c(x,g),x.prototype=g===null?Object.create(g):(D.prototype=g.prototype,new D)}),d=/^\w[\w\d+.-]*$/,f=/^\//,v=/^\/\//;function m(x,g){if(!x.scheme&&g)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(x.authority,'", path: "').concat(x.path,'", query: "').concat(x.query,'", fragment: "').concat(x.fragment,'"}'));if(x.scheme&&!d.test(x.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(x.path){if(x.authority){if(!f.test(x.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(v.test(x.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var S="",y="/",N=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,C=(function(){function x(g,D,I,Z,M,w){w===void 0&&(w=!1),typeof g=="object"?(this.scheme=g.scheme||S,this.authority=g.authority||S,this.path=g.path||S,this.query=g.query||S,this.fragment=g.fragment||S):(this.scheme=(function(Le,je){return Le||je?Le:"file"})(g,w),this.authority=D||S,this.path=(function(Le,je){switch(Le){case"https":case"http":case"file":je?je[0]!==y&&(je=y+je):je=y}return je})(this.scheme,I||S),this.query=Z||S,this.fragment=M||S,m(this,w))}return x.isUri=function(g){return g instanceof x||!!g&&typeof g.authority=="string"&&typeof g.fragment=="string"&&typeof g.path=="string"&&typeof g.query=="string"&&typeof g.scheme=="string"&&typeof g.fsPath=="string"&&typeof g.with=="function"&&typeof g.toString=="function"},Object.defineProperty(x.prototype,"fsPath",{get:function(){return oe(this,!1)},enumerable:!1,configurable:!0}),x.prototype.with=function(g){if(!g)return this;var D=g.scheme,I=g.authority,Z=g.path,M=g.query,w=g.fragment;return D===void 0?D=this.scheme:D===null&&(D=S),I===void 0?I=this.authority:I===null&&(I=S),Z===void 0?Z=this.path:Z===null&&(Z=S),M===void 0?M=this.query:M===null&&(M=S),w===void 0?w=this.fragment:w===null&&(w=S),D===this.scheme&&I===this.authority&&Z===this.path&&M===this.query&&w===this.fragment?this:new A(D,I,Z,M,w)},x.parse=function(g,D){D===void 0&&(D=!1);var I=N.exec(g);return I?new A(I[2]||S,Q(I[4]||S),Q(I[5]||S),Q(I[7]||S),Q(I[9]||S),D):new A(S,S,S,S,S)},x.file=function(g){var D=S;if(s&&(g=g.replace(/\\/g,y)),g[0]===y&&g[1]===y){var I=g.indexOf(y,2);I===-1?(D=g.substring(2),g=y):(D=g.substring(2,I),g=g.substring(I)||y)}return new A("file",D,g,S,S)},x.from=function(g){var D=new A(g.scheme,g.authority,g.path,g.query,g.fragment);return m(D,!0),D},x.prototype.toString=function(g){return g===void 0&&(g=!1),$(this,g)},x.prototype.toJSON=function(){return this},x.revive=function(g){if(g){if(g instanceof x)return g;var D=new A(g);return D._formatted=g.external,D._fsPath=g._sep===_?g.fsPath:null,D}return g},x})(),_=s?1:void 0,A=(function(x){function g(){var D=x!==null&&x.apply(this,arguments)||this;return D._formatted=null,D._fsPath=null,D}return u(g,x),Object.defineProperty(g.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=oe(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),g.prototype.toString=function(D){return D===void 0&&(D=!1),D?$(this,!0):(this._formatted||(this._formatted=$(this,!1)),this._formatted)},g.prototype.toJSON=function(){var D={$mid:1};return this._fsPath&&(D.fsPath=this._fsPath,D._sep=_),this._formatted&&(D.external=this._formatted),this.path&&(D.path=this.path),this.scheme&&(D.scheme=this.scheme),this.authority&&(D.authority=this.authority),this.query&&(D.query=this.query),this.fragment&&(D.fragment=this.fragment),D},g})(C),k=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function j(x,g){for(var D=void 0,I=-1,Z=0;Z<x.length;Z++){var M=x.charCodeAt(Z);if(M>=97&&M<=122||M>=65&&M<=90||M>=48&&M<=57||M===45||M===46||M===95||M===126||g&&M===47)I!==-1&&(D+=encodeURIComponent(x.substring(I,Z)),I=-1),D!==void 0&&(D+=x.charAt(Z));else{D===void 0&&(D=x.substr(0,Z));var w=k[M];w!==void 0?(I!==-1&&(D+=encodeURIComponent(x.substring(I,Z)),I=-1),D+=w):I===-1&&(I=Z)}}return I!==-1&&(D+=encodeURIComponent(x.substring(I))),D!==void 0?D:x}function H(x){for(var g=void 0,D=0;D<x.length;D++){var I=x.charCodeAt(D);I===35||I===63?(g===void 0&&(g=x.substr(0,D)),g+=k[I]):g!==void 0&&(g+=x[D])}return g!==void 0?g:x}function oe(x,g){var D;return D=x.authority&&x.path.length>1&&x.scheme==="file"?"//".concat(x.authority).concat(x.path):x.path.charCodeAt(0)===47&&(x.path.charCodeAt(1)>=65&&x.path.charCodeAt(1)<=90||x.path.charCodeAt(1)>=97&&x.path.charCodeAt(1)<=122)&&x.path.charCodeAt(2)===58?g?x.path.substr(1):x.path[1].toLowerCase()+x.path.substr(2):x.path,s&&(D=D.replace(/\//g,"\\")),D}function $(x,g){var D=g?H:j,I="",Z=x.scheme,M=x.authority,w=x.path,Le=x.query,je=x.fragment;if(Z&&(I+=Z,I+=":"),(M||Z==="file")&&(I+=y,I+=y),M){var pt=M.indexOf("@");if(pt!==-1){var vt=M.substr(0,pt);M=M.substr(pt+1),(pt=vt.indexOf(":"))===-1?I+=D(vt,!1):(I+=D(vt.substr(0,pt),!1),I+=":",I+=D(vt.substr(pt+1),!1)),I+="@"}(pt=(M=M.toLowerCase()).indexOf(":"))===-1?I+=D(M,!1):(I+=D(M.substr(0,pt),!1),I+=M.substr(pt))}if(w){if(w.length>=3&&w.charCodeAt(0)===47&&w.charCodeAt(2)===58)(sr=w.charCodeAt(1))>=65&&sr<=90&&(w="/".concat(String.fromCharCode(sr+32),":").concat(w.substr(3)));else if(w.length>=2&&w.charCodeAt(1)===58){var sr;(sr=w.charCodeAt(0))>=65&&sr<=90&&(w="".concat(String.fromCharCode(sr+32),":").concat(w.substr(2)))}I+=D(w,!0)}return Le&&(I+="?",I+=D(Le,!1)),je&&(I+="#",I+=g?je:j(je,!1)),I}function G(x){try{return decodeURIComponent(x)}catch{return x.length>3?x.substr(0,3)+G(x.substr(3)):x}}var re=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Q(x){return x.match(re)?x.replace(re,(function(g){return G(g)})):x}var ie,T=o(470),R=function(x,g,D){if(D||arguments.length===2)for(var I,Z=0,M=g.length;Z<M;Z++)!I&&Z in g||(I||(I=Array.prototype.slice.call(g,0,Z)),I[Z]=g[Z]);return x.concat(I||Array.prototype.slice.call(g))},B=T.posix||T;(function(x){x.joinPath=function(g){for(var D=[],I=1;I<arguments.length;I++)D[I-1]=arguments[I];return g.with({path:B.join.apply(B,R([g.path],D,!1))})},x.resolvePath=function(g){for(var D=[],I=1;I<arguments.length;I++)D[I-1]=arguments[I];var Z=g.path||"/";return g.with({path:B.resolve.apply(B,R([Z],D,!1))})},x.dirname=function(g){var D=B.dirname(g.path);return D.length===1&&D.charCodeAt(0)===46?g:g.with({path:D})},x.basename=function(g){return B.basename(g.path)},x.extname=function(g){return B.extname(g.path)}})(ie||(ie={}))}},e={};function t(n){if(e[n])return e[n].exports;var i=e[n]={exports:{}};return r[n](i,i.exports,t),i.exports}return t.d=(n,i)=>{for(var o in i)t.o(i,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:i[o]})},t.o=(n,i)=>Object.prototype.hasOwnProperty.call(n,i),t.r=n=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t(447)})();({URI:I7,Utils:sc}=Ck)});var Rk={};Be(Rk,{register:()=>JH});function Pk(r,e){let t=new ae.WorkspaceEdit;for(let n of e){let i=r.toResource(n.fileName);i.scheme===Gi&&t.createFile(i,{ignoreIfExists:!0})}return Wr.withFileCodeEdits(t,r,e),t}function JH(r,e,t,n,i,o){return ke([He(e,2)],()=>ae.languages.registerCodeActionsProvider(r.semantic,new tS(e,t,n,i,o),tS.metadata))}var Hs,ae,Qy,Zy,eS,Xy,Od,xk,Dk,vP,Ik,BH,GH,WH,zH,$H,Nk,rv,fP,pP,tS,wk=E(()=>{"use strict";Hs=U(require("path")),ae=U(require("vscode"));dP();ZE();Wi();fy();Qt();Mn();Xe();dt();Ti();ko();sP();kt();Qy=class r{constructor(e){this.telemetryReporter=e}telemetryReporter;static ID="_typescript.didApplyRefactoring";id=r.ID;async execute(e){this.telemetryReporter.logTelemetry("refactor.execute",{action:e.action,trigger:e.trigger})}},Zy=class r{constructor(e){this.client=e}client;static ID="_typescript.selectRefactoring";id=r.ID;async execute(e){if(!this.client.toOpenTsFilePath(e.document))return;let n=await ae.window.showQuickPick(e.refactor.actions.map(o=>({action:o,label:o.name,description:o.description})));if(!n)return;let i=new rv(this.client,e.document,e.refactor,n.action,e.rangeOrSelection,e.trigger);if(await i.resolve(It),i.edit&&!await ae.workspace.applyEdit(i.edit,{isRefactoring:!0})){ae.window.showErrorMessage(ae.l10n.t("Could not apply refactoring"));return}i.command&&await ae.commands.executeCommand(i.command.command,...i.command.arguments??[])}},eS=class r{constructor(e,t){this.client=e;this.didApplyCommand=t}client;didApplyCommand;static ID="_typescript.moveToFileRefactoring";id=r.ID;async execute(e){let t=this.client.toOpenTsFilePath(e.document);if(!t)return;let n=await this.getTargetFile(e.document,t,e.range);if(!n||n.toString()===t.toString())return;let i={...Se.toFileRangeRequestArgs(t,e.range),action:"Move to file",refactor:"Move to file",interactiveRefactorArguments:{targetFile:n}},o=await this.client.execute("getEditsForRefactor",i,It);if(o.type!=="response"||!o.body)return;let s=Pk(this.client,o.body.edits);if(!await ae.workspace.applyEdit(s,{isRefactoring:!0})){ae.window.showErrorMessage(ae.l10n.t("Could not apply refactoring"));return}await this.didApplyCommand.execute({action:e.action.name,trigger:e.trigger})}async getTargetFile(e,t,n){let i=Se.toFileRangeRequestArgs(t,n),o=await this.client.execute("getMoveToRefactoringFileSuggestions",i,It);if(o.type!=="response"||!o.body)return;let s=o.body,a={label:ae.l10n.t("Select existing file...")},c={label:ae.l10n.t("Enter new file path...")},l=ae.workspace.getWorkspaceFolder(e.uri),u=ae.window.createQuickPick();u.ignoreFocusOut=!0;let d=!0,f=()=>{let m=["./","../"].find(y=>u.value.startsWith(y));if(d===!1&&!m)return;d=!!m;let S=s.files.map(y=>{let N=this.client.toResource(y),C=sc.dirname(N),_=sc.basename(N),A;if(l){if(N.scheme===xd.file?A=Hs.relative(l.uri.fsPath,C.fsPath):A=Hs.posix.relative(l.uri.path,C.path),m){let j=(H=>H.startsWith("../")?H:`./${H}`)(Hs.relative(Hs.dirname(e.uri.fsPath),N.fsPath));if(!j.startsWith(m))return;A=j}}else A=C.fsPath;return{file:y,label:sc.basename(N),description:m?A:Hs.join(A,_)}});u.items=[a,c,{label:ae.l10n.t("destination files"),kind:ae.QuickPickItemKind.Separator},...Pr(S)]};u.title=ae.l10n.t("Move to File"),u.placeholder=ae.l10n.t("Enter file path"),u.matchOnDescription=!0,u.onDidChangeValue(f),f();let v=await new Promise(m=>{u.onDidAccept(()=>{m(u.selectedItems[0]),u.dispose()}),u.onDidHide(()=>{m(void 0),u.dispose()}),u.show()});if(v)if(v===a){let m=await ae.window.showOpenDialog({title:ae.l10n.t("Select move destination"),openLabel:ae.l10n.t("Move to File"),defaultUri:sc.dirname(e.uri)});return m?.length?this.client.toTsFilePath(m[0]):void 0}else if(v===c){let m=await ae.window.showSaveDialog({title:ae.l10n.t("Select move destination"),saveLabel:ae.l10n.t("Move to File"),defaultUri:this.client.toResource(o.body.newFileName)});return m?this.client.toTsFilePath(m):void 0}else return v.file}},Xy=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("function"),matches:r=>r.name.startsWith("function_")}),Od=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("constant"),matches:r=>r.name.startsWith("constant_")}),xk=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("type"),matches:r=>r.name.startsWith("Extract to type alias")}),Dk=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("interface"),matches:r=>r.name.startsWith("Extract to interface")}),vP=Object.freeze({kind:ae.CodeActionKind.RefactorMove.append("file"),matches:r=>r.name.startsWith("Move to file")}),Ik=Object.freeze({kind:ae.CodeActionKind.RefactorMove.append("newFile"),matches:r=>r.name.startsWith("Move to a new file")}),BH=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("import"),matches:r=>r.name.startsWith("Convert namespace import")||r.name.startsWith("Convert named imports")}),GH=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("export"),matches:r=>r.name.startsWith("Convert default export")||r.name.startsWith("Convert named export")}),WH=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("arrow").append("braces"),matches:r=>r.name.startsWith("Convert default export")||r.name.startsWith("Convert named export")}),zH=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("parameters").append("toDestructured"),matches:r=>r.name.startsWith("Convert parameters to destructured object")}),$H=Object.freeze({kind:ae.CodeActionKind.RefactorRewrite.append("property").append("generateAccessors"),matches:r=>r.name.startsWith("Generate 'get' and 'set' accessors")}),Nk=[Xy,Od,xk,Dk,vP,Ik,BH,GH,WH,zH,$H],rv=class r extends ae.CodeAction{constructor(t,n,i,o,s,a){let c=o.description;super(c,r.getKind(o));this.client=t;this.document=n;this.refactor=i;this.action=o;this.range=s;o.notApplicableReason&&(this.disabled={reason:o.notApplicableReason}),this.command={title:c,command:Qy.ID,arguments:[{action:o.name,trigger:a}]}}client;document;refactor;action;range;async resolve(t){let n=this.client.toOpenTsFilePath(this.document);if(!n)return;let i={...Se.toFileRangeRequestArgs(n,this.range),refactor:this.refactor.name,action:this.action.name},o=await this.client.execute("getEditsForRefactor",i,t);if(!(o.type!=="response"||!o.body)){if(this.edit=Pk(this.client,o.body.edits),!this.edit.size){ae.window.showErrorMessage(ae.l10n.t("Could not apply refactoring"));return}o.body.renameLocation&&this.document.uri.scheme!==bC&&(this.command={command:oc.ID,title:"",arguments:Pr([this.command,{command:"editor.action.rename",arguments:[[this.document.uri,ye.fromLocation(o.body.renameLocation)]]}])})}}static getKind(t){if(t.kind)return ae.CodeActionKind.Empty.append(t.kind);let n=Nk.find(i=>i.matches(t));return n?n.kind:ae.CodeActionKind.Refactor}},fP=class extends ae.CodeAction{constructor(e,t,n,i){super(t.description,vP.kind),t.notApplicableReason&&(this.disabled={reason:t.notApplicableReason}),this.command={title:t.description,command:eS.ID,arguments:[{action:t,document:e,range:n,trigger:i}]}}},pP=class extends ae.CodeAction{constructor(e,t,n,i){super(e.description,ae.CodeActionKind.Refactor),this.command={title:e.description,command:Zy.ID,arguments:[{document:t,refactor:e,rangeOrSelection:n,trigger:i}]}}},tS=class r{constructor(e,t,n,i,o){this.client=e;this.cachedNavTree=t;this.formattingOptionsManager=n;let s=new Qy(o);i.register(s),i.register(new oc),i.register(new Zy(this.client)),i.register(new eS(this.client,s)),i.register(new ic(this.client,o))}client;cachedNavTree;formattingOptionsManager;static _declarationKinds=new Set([L.module,L.class,L.interface,L.function,L.enum,L.type,L.const,L.variable,L.let]);static isOnSignatureName(e,t){if(this._declarationKinds.has(e.kind)){if(e.nameSpan){let n=Se.fromTextSpan(e.nameSpan);if(t.intersection(n))return!0}if(!e.nameSpan&&/\bexport\b/.test(e.kindModifiers)&&e.spans.length){let n=Se.fromTextSpan(e.spans[0]);if(t.intersection(new ae.Range(n.start.line,0,n.start.line,Number.MAX_SAFE_INTEGER)))return!0}}return e.childItems?.some(n=>this.isOnSignatureName(n,t))??!1}static metadata={providedCodeActionKinds:[ae.CodeActionKind.Refactor,...Nk.map(e=>e.kind)],documentation:[{kind:ae.CodeActionKind.Refactor,command:{command:gd.id,title:ae.l10n.t("Learn more about JS/TS refactorings")}}]};async provideCodeActions(e,t,n,i){if(!this.shouldTrigger(n,t)||!this.client.toOpenTsFilePath(e))return;let o=await this.interruptGetErrIfNeeded(n,()=>{let c=this.client.toOpenTsFilePath(e);if(!c)return;this.formattingOptionsManager.ensureConfigurationForDocument(e,i);let l={...Se.toFileRangeRequestArgs(c,t),triggerReason:this.toTsTriggerReason(n),kind:n.only?.value,includeInteractiveActions:this.client.apiVersion.gte(ve.v520)};return this.client.execute("getApplicableRefactors",l,i)});if(o?.type!=="response"||!o.body)return;let s=this.convertApplicableRefactors(e,n,o.body,t),a=Pr(await Promise.all(Array.from(s,async c=>{if(!(this.client.apiVersion.lt(ve.v430)&&!n.only&&c.kind?.value==="refactor.rewrite.function.returnType")){if(this.client.apiVersion.lt(ve.v540)&&n.triggerKind===ae.CodeActionTriggerKind.Automatic&&(c.kind?.value===Ik.kind.value||c.kind?.value===vP.kind.value)){let l=this.client.toOpenTsFilePath(e);if(!l)return;let u=await this.cachedNavTree.execute(e,()=>this.client.execute("navtree",{file:l},i));if(u.type!=="response"||!u.body||!r.isOnSignatureName(u.body,t))return}return c}})));return n.only?this.pruneInvalidActions(this.appendInvalidActions(a),n.only,5):a}interruptGetErrIfNeeded(e,t){return e.triggerKind===ae.CodeActionTriggerKind.Invoke?this.client.interruptGetErr(t):t()}async resolveCodeAction(e,t){return e instanceof rv&&await e.resolve(t),e}toTsTriggerReason(e){return e.triggerKind===ae.CodeActionTriggerKind.Invoke?"invoked":"implicit"}*convertApplicableRefactors(e,t,n,i){for(let o of n)if(o.inlineable===!1)yield new pP(o,e,i,t.triggerKind);else for(let s of o.actions)for(let a of this.refactorActionToCodeActions(e,t,o,s,i,o.actions))yield a}refactorActionToCodeActions(e,t,n,i,o,s){let a=[];i.name==="Move to file"?a.push(new fP(e,i,o,t.triggerKind)):a.push(new rv(this.client,e,n,i,o,t.triggerKind));for(let c of a)c.isPreferred=r.isPreferred(i,s);return a}shouldTrigger(e,t){return e.only&&!ae.CodeActionKind.Refactor.contains(e.only)?!1:e.triggerKind===ae.CodeActionTriggerKind.Invoke?!0:t instanceof ae.Selection}static isPreferred(e,t){if(Od.matches(e)){let n=o=>{let s=o.match(/scope_(\d)/)?.[1];return s?+s:void 0},i=n(e.name);return typeof i!="number"?!1:t.filter(o=>o!==e&&Od.matches(o)).every(o=>{let s=n(o.name);return typeof s=="number"?i<s:!0})}return!!(xk.matches(e)||Dk.matches(e))}appendInvalidActions(e){if(this.client.apiVersion.gte(ve.v400))return e;if(!e.some(t=>t.kind&&Od.kind.contains(t.kind))){let t=new ae.CodeAction(ae.l10n.t("Extract to constant"),Od.kind);t.disabled={reason:ae.l10n.t("The current selection cannot be extracted")},t.isPreferred=!0,e.push(t)}if(!e.some(t=>t.kind&&Xy.kind.contains(t.kind))){let t=new ae.CodeAction(ae.l10n.t("Extract to function"),Xy.kind);t.disabled={reason:ae.l10n.t("The current selection cannot be extracted")},e.push(t)}return e}pruneInvalidActions(e,t,n){if(this.client.apiVersion.lt(ve.v400))return e;let i=[],o=[],s=[];for(let l of e){if(!l.disabled){i.push(l);continue}if(l.kind&&(Od.kind.contains(l.kind)||Xy.kind.contains(l.kind))){o.push(l);continue}s.push(l)}let a=[];a.push(...o),a.push(...s);let c=a.filter(l=>!t||l.kind&&t.contains(l.kind)).slice(0,n);return i.push(...c),i}}});var Ok={};Be(Ok,{register:()=>XH});function XH(r,e){return ke([He(e,1,2)],()=>Ak.languages.registerReferenceProvider(r.syntax,new mP(e)))}var Ak,mP,kk=E(()=>{"use strict";Ak=U(require("vscode"));Xe();dt();kt();mP=class{constructor(e){this.client=e}client;async provideReferences(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return[];let s=ye.toFileLocationRequestArgs(o,t),a=await this.client.execute("references",s,i);if(a.type!=="response"||!a.body)return[];let c=[];for(let l of a.body.refs){if(!n.includeDeclaration&&l.isDefinition)continue;let u=this.client.toResource(l.file),d=xr.fromTextSpan(u,l);c.push(d)}return c}}});var Lk={};Be(Lk,{register:()=>QH});function QH(r,e,t,n){return ke([He(t,2)],()=>Ji.languages.registerRenameProvider(r.semantic,new gP(e,t,n)))}var $i,Ji,gP,Fk=E(()=>{"use strict";$i=U(require("path")),Ji=U(require("vscode"));_i();Qt();Xe();dt();jt();kt();gP=class{constructor(e,t,n){this.language=e;this.client=t;this.fileConfigurationManager=n}language;client;fileConfigurationManager;async prepareRename(e,t,n){let i=await this.execRename(e,t,n);if(i)switch(i.type){case"rename":{let o=i.body.info;return o.canRename?Se.fromTextSpan(o.triggerSpan):Promise.reject(o.localizedErrorMessage)}case"jsxLinkedEditing":return i.spans.map(Se.fromTextSpan).find(o=>o.contains(t))}}async provideRenameEdits(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=await this.execRename(e,t,i);if(!(!s||i.isCancellationRequested))switch(s.type){case"rename":{let a=s.body.info;if(!a.canRename)return Promise.reject(a.localizedErrorMessage);if(a.fileToRename){let c=await this.renameFile(a.fileToRename,a.fullDisplayName,n,i);return c||Promise.reject(Ji.l10n.t("An error occurred while renaming file"))}return this.updateLocs(s.body.locs,n)}case"jsxLinkedEditing":return this.updateLocs([{file:o,locs:s.spans.map(a=>({...a}))}],n)}}async execRename(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;if(this.client.apiVersion.gte(ve.v510)&&q("preferences.renameMatchingJsxTags",!0,{scope:e,fallbackSection:this.language.id})&&this.looksLikePotentialJsxTagContext(e,t)){let s=ye.toFileLocationRequestArgs(i,t),a=await this.client.execute("linkedEditingRange",s,n);return a.type!=="response"||!a.body?void 0:{type:"jsxLinkedEditing",spans:a.body.ranges}}let o={...ye.toFileLocationRequestArgs(i,t),findInStrings:!1,findInComments:!1};return this.client.interruptGetErr(async()=>{this.fileConfigurationManager.ensureConfigurationForDocument(e,n);let s=await this.client.execute("rename",o,n);if(!(s.type!=="response"||!s.body))return{type:"rename",body:s.body}})}looksLikePotentialJsxTagContext(e,t){if(![Os,ja,qa].includes(e.languageId))return!1;let n=e.getText(new Ji.Range(t.line,0,t.line,t.character));return/\<\/?\s*[\w\d_$.]*$/.test(n)}updateLocs(e,t){let n=new Ji.WorkspaceEdit;for(let i of e){let o=this.client.toResource(i.file);for(let s of i.locs)n.replace(o,Se.fromTextSpan(s),(s.prefixText||"")+t+(s.suffixText||""))}return n}async renameFile(e,t,n,i){$i.extname(n)?$i.extname(n)===$i.extname(t)&&(n=n.slice(0,n.length-$i.extname(n).length)+$i.extname(e)):n+=$i.extname(e);let o=$i.dirname(e),s=$i.join(o,n),a={file:e,oldFilePath:e,newFilePath:s},c=await this.client.execute("getEditsForFileRename",a,i);if(c.type!=="response"||!c.body)return;let l=Wr.fromFileCodeEdits(this.client,c.body);return l.renameFile(Ji.Uri.file(e),Ji.Uri.file(s)),l}}});var Uk={};Be(Uk,{register:()=>ZH});function ZH(r,e){return ke([He(e,2)],()=>{let t=new hP(e);return ac.languages.registerDocumentRangeSemanticTokensProvider(r.semantic,t,t.getLegend())})}function eK(r){let e=r.version;return new Promise(t=>{let n=setInterval(i=>{r.version===e&&(clearInterval(n),t()),e=r.version},400)})}function tK(r){if(r>255)return(r>>8)-1}function rK(r){return r&255}var ac,Mk,hP,ei,Ul,Yk=E(()=>{"use strict";ac=U(require("vscode"));dt();kt();Mk=1e5;hP=class{constructor(e){this.client=e}client;getLegend(){return new ac.SemanticTokensLegend(ei,Ul)}async provideDocumentSemanticTokens(e,t){let n=this.client.toOpenTsFilePath(e);return!n||e.getText().length>Mk?null:this.provideSemanticTokens(e,{file:n,start:0,length:e.getText().length},t)}async provideDocumentRangeSemanticTokens(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i||e.offsetAt(t.end)-e.offsetAt(t.start)>Mk)return null;let o=e.offsetAt(t.start),s=e.offsetAt(t.end)-o;return this.provideSemanticTokens(e,{file:i,start:o,length:s},n)}async provideSemanticTokens(e,t,n){if(!this.client.toOpenTsFilePath(e))return null;let o=e.version,s=await this.client.execute("encodedSemanticClassifications-full",{...t,format:"2020"},n,{cancelOnResourceChange:e.uri});if(s.type!=="response"||!s.body)return null;let a=e.version;if(o!==a)throw await eK(e),new ac.CancellationError;let c=s.body.spans,l=new ac.SemanticTokensBuilder;for(let u=0;u<c.length;){let d=c[u++],f=c[u++],v=c[u++],m=tK(v);if(m===void 0)continue;let S=rK(v),y=e.positionAt(d),N=e.positionAt(d+f);for(let C=y.line;C<=N.line;C++){let _=C===y.line?y.character:0,A=C===N.line?N.character:e.lineAt(C).text.length;l.push(C,_,A-_,m,S)}}return l.build()}};ei=[];ei[0]="class";ei[1]="enum";ei[2]="interface";ei[3]="namespace";ei[4]="typeParameter";ei[5]="type";ei[6]="parameter";ei[7]="variable";ei[8]="enumMember";ei[9]="property";ei[10]="function";ei[11]="method";Ul=[];Ul[2]="async";Ul[0]="declaration";Ul[3]="readonly";Ul[1]="static";Ul[5]="local";Ul[4]="defaultLibrary"});var rS,Vk=E(()=>{"use strict";rS=class{requestIds=new WeakMap;previousSignatureHelpState=new WeakMap;startRequest(e){let t=(this.requestIds.get(e)??0)+1;return this.requestIds.set(e,t),t}getActiveSignature(e,t,n,i,o){if(t!==this.requestIds.get(e))return i;let s=this.previousSignatureHelpState.get(e),a=n.activeSignatureHelp,c;n.isRetrigger&&s&&a&&this.hasMatchingSignatures(a.signatures,s.signatureLabels)&&(c=s.userSelectedSignatureLabel,a.activeSignature!==s.activeSignatureIndex&&(c=a.signatures[a.activeSignature]?.label));let l=i;if(c!==void 0){let u=o.findIndex(d=>d.label===c);u>=0?l=u:c=void 0}return this.previousSignatureHelpState.set(e,{activeSignatureIndex:l,signatureLabels:o.map(u=>u.label),userSelectedSignatureLabel:c}),l}hasMatchingSignatures(e,t){return e.length===t.length&&e.every((n,i)=>n.label===t[i])}}});var jk={};Be(jk,{register:()=>iK});function nK(r){switch(r.triggerKind){case Ci.SignatureHelpTriggerKind.TriggerCharacter:return r.triggerCharacter?r.isRetrigger?{kind:"retrigger",triggerCharacter:r.triggerCharacter}:{kind:"characterTyped",triggerCharacter:r.triggerCharacter}:{kind:"invoked"};case Ci.SignatureHelpTriggerKind.ContentChange:return r.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case Ci.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}function iK(r,e){return ke([He(e,1,2)],()=>Ci.languages.registerSignatureHelpProvider(r.syntax,new nv(e),{triggerCharacters:nv.triggerCharacters,retriggerCharacters:nv.retriggerCharacters}))}var Ci,nv,qk=E(()=>{"use strict";Ci=U(require("vscode"));Xe();dt();Vk();kt();wy();nv=class{constructor(e){this.client=e}client;static triggerCharacters=["(",",","<"];static retriggerCharacters=[")"];state=new rS;async provideSignatureHelp(e,t,n,i){let o=this.client.toOpenTsFilePath(e);if(!o)return;let s=this.state.startRequest(e),a={...ye.toFileLocationRequestArgs(o,t),triggerReason:nK(i)},c=await this.client.interruptGetErr(()=>this.client.execute("signatureHelp",a,n));if(c.type!=="response"||!c.body)return;let l=c.body,u=new Ci.SignatureHelp;return u.signatures=l.items.map(d=>this.convertSignature(d,e.uri)),u.activeSignature=this.state.getActiveSignature(e,s,i,l.selectedItemIndex,u.signatures),u.activeParameter=this.getActiveParameter(l,u.activeSignature),u}getActiveParameter(e,t){let n=e.items[t];return n?.isVariadic?Math.min(e.argumentIndex,n.parameters.length-1):e.argumentIndex}convertSignature(e,t){let n=new Ci.SignatureInformation(js(e.prefixDisplayParts,this.client),zp(e.documentation,e.tags.filter(s=>s.name!=="param"),this.client,t)),i=n.label.length,o=js(e.separatorDisplayParts,this.client);for(let s=0;s<e.parameters.length;++s){let a=e.parameters[s],c=js(a.displayParts,this.client);n.parameters.push(new Ci.ParameterInformation([i,i+c.length],zp(a.documentation,[],this.client,t))),i+=c.length,n.label+=c,s!==e.parameters.length-1&&(n.label+=o,i+=o.length)}return n.label+=js(e.suffixDisplayParts,this.client),n}}});var Hk={};Be(Hk,{register:()=>oK});function oK(r,e){return nS.languages.registerSelectionRangeProvider(r.syntax,new yP(e))}var nS,yP,Kk=E(()=>{"use strict";nS=U(require("vscode"));Xe();yP=class r{constructor(e){this.client=e}client;async provideSelectionRanges(e,t,n){let i=this.client.toOpenTsFilePath(e);if(!i)return;let o={file:i,locations:t.map(ye.toLocation)},s=await this.client.execute("selectionRange",o,n);if(!(s.type!=="response"||!s.body))return s.body.map(r.convertSelectionRange)}static convertSelectionRange(e){return new nS.SelectionRange(Se.fromTextSpan(e.textSpan),e.parent?r.convertSelectionRange(e.parent):void 0)}}});var Bk={};Be(Bk,{register:()=>sK});function sK(r,e){function t(n){Ct.commands.executeCommand("setContext",iv.context,n??r.apiVersion.gte(iv.minVersion))}return t(),e.register(new iv(r)),Ct.Disposable.from(r.onTsServerStarted(()=>t()),new Ct.Disposable(()=>t(!1)))}var Ct,iv,Gk=E(()=>{"use strict";Ct=U(require("vscode"));_i();Qt();Xe();iv=class r{constructor(e){this.client=e}client;static context="tsSupportsSourceDefinition";static minVersion=ve.v470;id="typescript.goToSourceDefinition";async execute(){if(this.client.apiVersion.lt(r.minVersion)){Ct.window.showErrorMessage(Ct.l10n.t("Go to Source Definition failed. Requires TypeScript 4.7+."));return}let e=Ct.window.activeTextEditor;if(!e){Ct.window.showErrorMessage(Ct.l10n.t("Go to Source Definition failed. No resource provided."));return}let t=e.document.uri,n=await Ct.workspace.openTextDocument(t);if(!Lo(n)){Ct.window.showErrorMessage(Ct.l10n.t("Go to Source Definition failed. Unsupported file type."));return}let i=this.client.toOpenTsFilePath(n);if(!i){Ct.window.showErrorMessage(Ct.l10n.t("Go to Source Definition failed. Unknown file type."));return}await Ct.window.withProgress({location:Ct.ProgressLocation.Window,title:Ct.l10n.t("Finding source definitions")},async(o,s)=>{let a=e.selection.anchor,c=ye.toFileLocationRequestArgs(i,a),l=await this.client.execute("findSourceDefinition",c,s);if(l.type==="response"&&l.body){let u=l.body.map(d=>xr.fromTextSpan(this.client.toResource(d.file),d));if(u.length){u.length===1?Ct.commands.executeCommand("vscode.open",u[0].uri.with({fragment:`L${u[0].range.start.line+1},${u[0].range.start.character+1}`})):Ct.commands.executeCommand("editor.action.showReferences",t,a,u);return}}Ct.window.showErrorMessage(Ct.l10n.t("No source definitions found."))})}}});var Wk={};Be(Wk,{register:()=>cK});function aK(r,e){return new Ys(()=>{let t=Ft.window.activeTextEditor;return!t||!Ft.languages.match(r,t.document)?!1:!!q("autoClosingTags.enabled",!0,{scope:t.document,fallbackSection:e.id,fallbackSubSectionNameOverride:"autoClosingTags"})},t=>Ft.Disposable.from(Ft.window.onDidChangeActiveTextEditor(t),Ft.workspace.onDidOpenTextDocument(t),Ft.workspace.onDidChangeConfiguration(t)))}function cK(r,e,t){return ke([aK(r.syntax,e)],()=>new SP(t))}var Ft,SP,zk=E(()=>{"use strict";Ft=U(require("vscode"));Xe();yt();jt();kt();SP=class extends _e{constructor(t){super();this.client=t;Ft.workspace.onDidChangeTextDocument(n=>this.onDidChangeTextDocument(n),null,this._disposables)}client;_disposed=!1;_timeout=void 0;_cancel=void 0;dispose(){super.dispose(),this._disposed=!0,this._timeout&&(clearTimeout(this._timeout),this._timeout=void 0),this._cancel&&(this._cancel.cancel(),this._cancel.dispose(),this._cancel=void 0)}onDidChangeTextDocument({document:t,contentChanges:n,reason:i}){if(n.length===0||i===Ft.TextDocumentChangeReason.Undo||i===Ft.TextDocumentChangeReason.Redo)return;let o=Ft.window.activeTextEditor?.document;if(t!==o)return;let s=this.client.toOpenTsFilePath(t);if(!s)return;typeof this._timeout<"u"&&clearTimeout(this._timeout),this._cancel&&(this._cancel.cancel(),this._cancel.dispose(),this._cancel=void 0);let a=n[n.length-1],c=a.text[a.text.length-1];if(a.rangeLength>0||c!==">"&&c!=="/"||(a.range.start.character>0?t.getText(new Ft.Range(a.range.start.translate({characterDelta:-1}),a.range.start)):"")===">")return;let u=t.version;this._timeout=setTimeout(async()=>{if(this._timeout=void 0,this._disposed)return;let d=a.text.split(/\r\n|\n/g),f=d.length<=1?a.range.start.translate({characterDelta:a.text.length}):new Ft.Position(a.range.start.line+d.length-1,d[d.length-1].length),v=ye.toFileLocationRequestArgs(s,f);this._cancel=new Ft.CancellationTokenSource;let m=await this.client.execute("jsxClosingTag",v,this._cancel.token);if(m.type!=="response"||!m.body||this._disposed)return;let S=Ft.window.activeTextEditor;if(!S)return;let y=m.body,N=S.document;t===N&&N.version===u&&S.insertSnippet(this.getTagSnippet(y),this.getInsertionPositions(S,f))},100)}getTagSnippet(t){let n=new Ft.SnippetString;return n.appendPlaceholder("",0),n.appendText(t.newText),n}getInsertionPositions(t,n){let i=t.selections.map(o=>o.active);return i.some(o=>o.isEqual(n))?i:n}}});var Jk={};Be(Jk,{default:()=>ov,register:()=>lK});function lK(r,e){return ke([He(e,1,2)],()=>$k.languages.registerTypeDefinitionProvider(r.syntax,new ov(e)))}var $k,ov,Xk=E(()=>{"use strict";$k=U(require("vscode"));dt();Uy();kt();ov=class extends qs{provideTypeDefinition(e,t,n){return this.getSymbolLocations("typeDefinition",e,t,n)}}});var cL={};Be(cL,{register:()=>bK});async function TK(r){try{return(await tt.workspace.fs.stat(r)).type===tt.FileType.Directory}catch{return!1}}function bK(r,e,t){return ke([He(r,2)],()=>new kP(r,e,t))}var OP,tt,Md,kP,lL=E(()=>{"use strict";OP=U(require("path")),tt=U(require("vscode"));Wi();Xa();Xe();dt();Nd();ko();jt();yt();kt();Md="updateImportsOnFileMove.enabled";kP=class extends _e{constructor(t,n,i){super();this.client=t;this.fileConfigurationManager=n;this._handles=i;this._register(tt.workspace.onDidRenameFiles(async o=>{for(let{newUri:s,oldUri:a}of o.files){let c=this.client.toTsFilePath(s);if(!c)continue;let l=this.client.toTsFilePath(a);if(!l)continue;let u=bd(s)?"typescript":"javascript";if(q(Md,"prompt",{scope:null,fallbackSection:u})==="never")continue;let f=await this.getJsTsFileBeingMoved(s);!f||!this.client.toTsFilePath(f)||(this._pendingRenames.add({oldUri:a,newUri:s,newFilePath:c,oldFilePath:l,jsTsFileThatIsBeingMoved:f}),this._delayer.trigger(()=>{tt.window.withProgress({location:tt.ProgressLocation.Window,title:tt.l10n.t("Checking for update of JS/TS imports")},()=>this.flushRenames())}))}}))}client;fileConfigurationManager;_handles;_delayer=new Id(50);_pendingRenames=new Set;async flushRenames(){let t=Array.from(this._pendingRenames);this._pendingRenames.clear();for(let n of this.groupRenames(t)){let i=new tt.WorkspaceEdit,o=[];for(let{oldUri:s,newUri:a,newFilePath:c,oldFilePath:l,jsTsFileThatIsBeingMoved:u}of n){let d=await tt.workspace.openTextDocument(u);this.client.bufferSyncSupport.closeResource(s),this.client.bufferSyncSupport.openTextDocument(d),await this.withEditsForFileRename(i,d,l,c)&&o.push(a)}i.size&&await this.confirmActionWithUser(o)&&await tt.workspace.applyEdit(i,{isRefactoring:!0})}}async confirmActionWithUser(t){if(!t.length)return!1;let n=bd(t[0])?"typescript":"javascript";switch(q(Md,"prompt",{scope:null,fallbackSection:n})){case"always":return!0;case"never":return!1;default:return this.promptUser(t)}}async promptUser(t){if(!t.length)return!1;let n={title:tt.l10n.t("No"),isCloseAffordance:!0},i={title:tt.l10n.t("Yes")},o={title:tt.l10n.t("Always")},s={title:tt.l10n.t("Never")};switch(await tt.window.showInformationMessage(t.length===1?tt.l10n.t("Update imports for '{0}'?",OP.basename(t[0].fsPath)):this.getConfirmMessage(tt.l10n.t("Update imports for the following {0} files?",t.length),t),{modal:!0},n,i,o,s)){case i:return!0;case n:return!1;case o:{let c=tt.workspace.getConfiguration(vn);return c.update(Md,"always",this.getConfigTargetScope(c,Md)),!0}case s:{let c=tt.workspace.getConfiguration(vn);return c.update(Md,"never",this.getConfigTargetScope(c,Md)),!1}default:return!1}}async getJsTsFileBeingMoved(t){if(t.scheme===Gi)return await TK(t)?(await tt.workspace.findFiles(new tt.RelativePattern(t,"**/*.{ts,tsx,js,jsx}"),"**/node_modules/**",1))[0]:await this._handles(t)?t:void 0}async withEditsForFileRename(t,n,i,o){let s=await this.client.interruptGetErr(()=>{this.fileConfigurationManager.setGlobalConfigurationFromDocument(n,It);let a={oldFilePath:i,newFilePath:o};return this.client.execute("getEditsForFileRename",a,It)});return s.type!=="response"||!s.body.length?!1:(Wr.withFileCodeEdits(t,this.client,s.body),!0)}groupRenames(t){let n=new Map;for(let i of t){let o=`${this.client.getWorkspaceRootForResource(i.jsTsFileThatIsBeingMoved)?.fsPath}@@@${bd(i.jsTsFileThatIsBeingMoved)}`;n.has(o)||n.set(o,new Set),n.get(o).add(i)}return n.values()}getConfirmMessage(t,n){let o=[t];return o.push(""),o.push(...n.slice(0,10).map(s=>OP.basename(s.fsPath))),n.length>10&&(n.length-10===1?o.push(tt.l10n.t("...1 additional file not shown")):o.push(tt.l10n.t("...{0} additional files not shown",n.length-10))),o.push(""),o.join(`
`)}getConfigTargetScope(t,n){let i=t.inspect(n);return i?.workspaceFolderValue?tt.ConfigurationTarget.WorkspaceFolder:i?.workspaceValue?tt.ConfigurationTarget.Workspace:tt.ConfigurationTarget.Global}}});var uL={};Be(uL,{register:()=>CK});function EK(r){switch(r.kind){case L.method:return xt.SymbolKind.Method;case L.enum:return xt.SymbolKind.Enum;case L.enumMember:return xt.SymbolKind.EnumMember;case L.function:return xt.SymbolKind.Function;case L.class:return xt.SymbolKind.Class;case L.interface:return xt.SymbolKind.Interface;case L.type:return xt.SymbolKind.Class;case L.memberVariable:return xt.SymbolKind.Field;case L.memberGetAccessor:return xt.SymbolKind.Field;case L.memberSetAccessor:return xt.SymbolKind.Field;case L.variable:return xt.SymbolKind.Variable;default:return xt.SymbolKind.Variable}}function CK(r,e){return xt.languages.registerWorkspaceSymbolProvider(new LP(r,e))}var xt,LP,dL=E(()=>{"use strict";xt=U(require("vscode"));Wi();Xa();Qt();Hp();Mn();Xe();Ti();jt();LP=class r{constructor(e,t){this.client=e;this.modeIds=t}client;modeIds;async provideWorkspaceSymbols(e,t){let n;if(this.searchAllOpenProjects)n=void 0;else{let s=this.getDocument();if(n=s?await this.toOpenedFiledPath(s):void 0,!n&&this.client.apiVersion.lt(ve.v390))return[]}let i={file:n,searchValue:e,maxResultCount:256},o=await this.client.execute("navto",i,t);return o.type!=="response"||!o.body?[]:Pr(o.body.map(s=>this.toSymbolInformation(s)))}get searchAllOpenProjects(){return this.client.apiVersion.gte(ve.v390)&&q("workspaceSymbols.scope","allOpenProjects",{scope:null,fallbackSection:"typescript"})==="allOpenProjects"}async toOpenedFiledPath(e){if(e.uri.scheme===TC)try{let t=xt.Uri.file(JSON.parse(e.uri.query)?.path);if(bd(t)||V0(t)){let n=await xt.workspace.openTextDocument(t);return this.client.toOpenTsFilePath(n)}}catch{}return this.client.toOpenTsFilePath(e)}toSymbolInformation(e){if(e.kind==="alias"&&!e.containerName)return;let t=this.client.toResource(e.file);if(jp(t,Cd))return;let n=r.getLabel(e),i=new xt.SymbolInformation(n,EK(e),e.containerName||"",xr.fromTextSpan(t,e));return(e.kindModifiers?Ms(e.kindModifiers):void 0)?.has(Xn.deprecated)&&(i.tags=[xt.SymbolTag.Deprecated]),i}static getLabel(e){let t=e.name;return e.kind==="method"||e.kind==="function"?t+"()":t}getDocument(){let e=xt.window.activeTextEditor?.document;if(e&&this.modeIds.includes(e.languageId))return e;let t=xt.workspace.textDocuments;for(let n of t)if(this.modeIds.includes(n.languageId))return n}}});function NS(r,e=!1){let t=r.length,n=0,i="",o=0,s=16,a=0,c=0,l=0,u=0,d=0;function f(_,A){let k=0,j=0;for(;k<_||!A;){let H=r.charCodeAt(n);if(H>=48&&H<=57)j=j*16+H-48;else if(H>=65&&H<=70)j=j*16+H-65+10;else if(H>=97&&H<=102)j=j*16+H-97+10;else break;n++,k++}return k<_&&(j=-1),j}function v(_){n=_,i="",o=0,s=16,d=0}function m(){let _=n;if(r.charCodeAt(n)===48)n++;else for(n++;n<r.length&&jd(r.charCodeAt(n));)n++;if(n<r.length&&r.charCodeAt(n)===46)if(n++,n<r.length&&jd(r.charCodeAt(n)))for(n++;n<r.length&&jd(r.charCodeAt(n));)n++;else return d=3,r.substring(_,n);let A=n;if(n<r.length&&(r.charCodeAt(n)===69||r.charCodeAt(n)===101))if(n++,(n<r.length&&r.charCodeAt(n)===43||r.charCodeAt(n)===45)&&n++,n<r.length&&jd(r.charCodeAt(n))){for(n++;n<r.length&&jd(r.charCodeAt(n));)n++;A=n}else d=3;return r.substring(_,A)}function S(){let _="",A=n;for(;;){if(n>=t){_+=r.substring(A,n),d=2;break}let k=r.charCodeAt(n);if(k===34){_+=r.substring(A,n),n++;break}if(k===92){if(_+=r.substring(A,n),n++,n>=t){d=2;break}switch(r.charCodeAt(n++)){case 34:_+='"';break;case 92:_+="\\";break;case 47:_+="/";break;case 98:_+="\b";break;case 102:_+="\f";break;case 110:_+=`
`;break;case 114:_+="\r";break;case 116:_+="	";break;case 117:let H=f(4,!0);H>=0?_+=String.fromCharCode(H):d=4;break;default:d=5}A=n;continue}if(k>=0&&k<=31)if(vv(k)){_+=r.substring(A,n),d=2;break}else d=6;n++}return _}function y(){if(i="",d=0,o=n,c=a,u=l,n>=t)return o=t,s=17;let _=r.charCodeAt(n);if(KP(_)){do n++,i+=String.fromCharCode(_),_=r.charCodeAt(n);while(KP(_));return s=15}if(vv(_))return n++,i+=String.fromCharCode(_),_===13&&r.charCodeAt(n)===10&&(n++,i+=`
`),a++,l=n,s=14;switch(_){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,i=S(),s=10;case 47:let A=n-1;if(r.charCodeAt(n+1)===47){for(n+=2;n<t&&!vv(r.charCodeAt(n));)n++;return i=r.substring(A,n),s=12}if(r.charCodeAt(n+1)===42){n+=2;let k=t-1,j=!1;for(;n<k;){let H=r.charCodeAt(n);if(H===42&&r.charCodeAt(n+1)===47){n+=2,j=!0;break}n++,vv(H)&&(H===13&&r.charCodeAt(n)===10&&n++,a++,l=n)}return j||(n++,d=1),i=r.substring(A,n),s=13}return i+=String.fromCharCode(_),n++,s=16;case 45:if(i+=String.fromCharCode(_),n++,n===t||!jd(r.charCodeAt(n)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),s=11;default:for(;n<t&&N(_);)n++,_=r.charCodeAt(n);if(o!==n){switch(i=r.substring(o,n),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(_),n++,s=16}}function N(_){if(KP(_)||vv(_))return!1;switch(_){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function C(){let _;do _=y();while(_>=12&&_<=15);return _}return{setPosition:v,getPosition:()=>n,scan:e?C:y,getToken:()=>s,getTokenValue:()=>i,getTokenOffset:()=>o,getTokenLength:()=>n-o,getTokenStartLine:()=>c,getTokenStartCharacter:()=>o-u,getTokenError:()=>d}}function KP(r){return r===32||r===9}function vv(r){return r===10||r===13}function jd(r){return r>=48&&r<=57}var kL,RS=E(()=>{"use strict";(function(r){r[r.lineFeed=10]="lineFeed",r[r.carriageReturn=13]="carriageReturn",r[r.space=32]="space",r[r._0=48]="_0",r[r._1=49]="_1",r[r._2=50]="_2",r[r._3=51]="_3",r[r._4=52]="_4",r[r._5=53]="_5",r[r._6=54]="_6",r[r._7=55]="_7",r[r._8=56]="_8",r[r._9=57]="_9",r[r.a=97]="a",r[r.b=98]="b",r[r.c=99]="c",r[r.d=100]="d",r[r.e=101]="e",r[r.f=102]="f",r[r.g=103]="g",r[r.h=104]="h",r[r.i=105]="i",r[r.j=106]="j",r[r.k=107]="k",r[r.l=108]="l",r[r.m=109]="m",r[r.n=110]="n",r[r.o=111]="o",r[r.p=112]="p",r[r.q=113]="q",r[r.r=114]="r",r[r.s=115]="s",r[r.t=116]="t",r[r.u=117]="u",r[r.v=118]="v",r[r.w=119]="w",r[r.x=120]="x",r[r.y=121]="y",r[r.z=122]="z",r[r.A=65]="A",r[r.B=66]="B",r[r.C=67]="C",r[r.D=68]="D",r[r.E=69]="E",r[r.F=70]="F",r[r.G=71]="G",r[r.H=72]="H",r[r.I=73]="I",r[r.J=74]="J",r[r.K=75]="K",r[r.L=76]="L",r[r.M=77]="M",r[r.N=78]="N",r[r.O=79]="O",r[r.P=80]="P",r[r.Q=81]="Q",r[r.R=82]="R",r[r.S=83]="S",r[r.T=84]="T",r[r.U=85]="U",r[r.V=86]="V",r[r.W=87]="W",r[r.X=88]="X",r[r.Y=89]="Y",r[r.Z=90]="Z",r[r.asterisk=42]="asterisk",r[r.backslash=92]="backslash",r[r.closeBrace=125]="closeBrace",r[r.closeBracket=93]="closeBracket",r[r.colon=58]="colon",r[r.comma=44]="comma",r[r.dot=46]="dot",r[r.doubleQuote=34]="doubleQuote",r[r.minus=45]="minus",r[r.openBrace=123]="openBrace",r[r.openBracket=91]="openBracket",r[r.plus=43]="plus",r[r.slash=47]="slash",r[r.formFeed=12]="formFeed",r[r.tab=9]="tab"})(kL||(kL={}))});var BP=E(()=>{"use strict";RS()});function LL(r,e=[],t=mv.DEFAULT){let n=null,i=[],o=[];function s(c){Array.isArray(i)?i.push(c):n!==null&&(i[n]=c)}return zP(r,{onObjectBegin:()=>{let c={};s(c),o.push(i),i=c,n=null},onObjectProperty:c=>{n=c},onObjectEnd:()=>{i=o.pop()},onArrayBegin:()=>{let c=[];s(c),o.push(i),i=c,n=null},onArrayEnd:()=>{i=o.pop()},onLiteralValue:s,onError:(c,l,u)=>{e.push({error:c,offset:l,length:u})}},t),i[0]}function GP(r,e=[],t=mv.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(c){n.type==="property"&&(n.length=c-n.offset,n=n.parent)}function o(c){return n.children.push(c),c}zP(r,{onObjectBegin:c=>{n=o({type:"object",offset:c,length:-1,parent:n,children:[]})},onObjectProperty:(c,l,u)=>{n=o({type:"property",offset:l,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:c,offset:l,length:u,parent:n})},onObjectEnd:(c,l)=>{i(c+l),n.length=c+l-n.offset,n=n.parent,i(c+l)},onArrayBegin:(c,l)=>{n=o({type:"array",offset:c,length:-1,parent:n,children:[]})},onArrayEnd:(c,l)=>{n.length=c+l-n.offset,n=n.parent,i(c+l)},onLiteralValue:(c,l,u)=>{o({type:MK(c),offset:l,length:u,parent:n,value:c}),i(l+u)},onSeparator:(c,l,u)=>{n.type==="property"&&(c===":"?n.colonOffset=l:c===","&&i(l))},onError:(c,l,u)=>{e.push({error:c,offset:l,length:u})}},t);let a=n.children[0];return a&&delete a.parent,a}function WP(r,e){if(!r)return;let t=r;for(let n of e)if(typeof n=="string"){if(t.type!=="object"||!Array.isArray(t.children))return;let i=!1;for(let o of t.children)if(Array.isArray(o.children)&&o.children[0].value===n&&o.children.length===2){t=o.children[1],i=!0;break}if(!i)return}else{let i=n;if(t.type!=="array"||i<0||!Array.isArray(t.children)||i>=t.children.length)return;t=t.children[i]}return t}function zP(r,e,t=mv.DEFAULT){let n=NS(r,!1),i=[];function o(Q){return Q?()=>Q(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function s(Q){return Q?()=>Q(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}function a(Q){return Q?ie=>Q(ie,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(Q){return Q?ie=>Q(ie,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}let l=s(e.onObjectBegin),u=c(e.onObjectProperty),d=o(e.onObjectEnd),f=s(e.onArrayBegin),v=o(e.onArrayEnd),m=c(e.onLiteralValue),S=a(e.onSeparator),y=o(e.onComment),N=a(e.onError),C=t&&t.disallowComments,_=t&&t.allowTrailingComma;function A(){for(;;){let Q=n.scan();switch(n.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:C||k(11);break;case 2:k(12);break;case 6:k(16);break}switch(Q){case 12:case 13:C?k(10):y();break;case 16:k(1);break;case 15:case 14:break;default:return Q}}}function k(Q,ie=[],T=[]){if(N(Q),ie.length+T.length>0){let R=n.getToken();for(;R!==17;){if(ie.indexOf(R)!==-1){A();break}else if(T.indexOf(R)!==-1)break;R=A()}}}function j(Q){let ie=n.getTokenValue();return Q?m(ie):(u(ie),i.push(ie)),A(),!0}function H(){switch(n.getToken()){case 11:let Q=n.getTokenValue(),ie=Number(Q);isNaN(ie)&&(k(2),ie=0),m(ie);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return A(),!0}function oe(){return n.getToken()!==10?(k(3,[],[2,5]),!1):(j(!1),n.getToken()===6?(S(":"),A(),re()||k(4,[],[2,5])):k(5,[],[2,5]),i.pop(),!0)}function $(){l(),A();let Q=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(Q||k(4,[],[]),S(","),A(),n.getToken()===2&&_)break}else Q&&k(6,[],[]);oe()||k(4,[],[2,5]),Q=!0}return d(),n.getToken()!==2?k(7,[2],[]):A(),!0}function G(){f(),A();let Q=!0,ie=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(ie||k(4,[],[]),S(","),A(),n.getToken()===4&&_)break}else ie&&k(6,[],[]);Q?(i.push(0),Q=!1):i[i.length-1]++,re()||k(4,[],[4,5]),ie=!0}return v(),Q||i.pop(),n.getToken()!==4?k(8,[4],[]):A(),!0}function re(){switch(n.getToken()){case 3:return G();case 1:return $();case 10:return j(!0);default:return H()}}return A(),n.getToken()===17?t.allowEmptyContent?!0:(k(4,[],[]),!1):re()?(n.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}function MK(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(r){if(Array.isArray(r))return"array"}else return"null";return"object"}default:return"null"}}var mv,$P=E(()=>{"use strict";RS();(function(r){r.DEFAULT={allowTrailingComma:!1}})(mv||(mv={}))});var FL=E(()=>{"use strict";BP();$P()});var ML,UL,VL,jL,gv,YL,JP=E(()=>{"use strict";BP();FL();RS();$P();(function(r){r[r.None=0]="None",r[r.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=2]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",r[r.InvalidUnicode=4]="InvalidUnicode",r[r.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",r[r.InvalidCharacter=6]="InvalidCharacter"})(ML||(ML={}));(function(r){r[r.OpenBraceToken=1]="OpenBraceToken",r[r.CloseBraceToken=2]="CloseBraceToken",r[r.OpenBracketToken=3]="OpenBracketToken",r[r.CloseBracketToken=4]="CloseBracketToken",r[r.CommaToken=5]="CommaToken",r[r.ColonToken=6]="ColonToken",r[r.NullKeyword=7]="NullKeyword",r[r.TrueKeyword=8]="TrueKeyword",r[r.FalseKeyword=9]="FalseKeyword",r[r.StringLiteral=10]="StringLiteral",r[r.NumericLiteral=11]="NumericLiteral",r[r.LineCommentTrivia=12]="LineCommentTrivia",r[r.BlockCommentTrivia=13]="BlockCommentTrivia",r[r.LineBreakTrivia=14]="LineBreakTrivia",r[r.Trivia=15]="Trivia",r[r.Unknown=16]="Unknown",r[r.EOF=17]="EOF"})(UL||(UL={}));VL=LL,jL=GP,gv=WP;(function(r){r[r.InvalidSymbol=1]="InvalidSymbol",r[r.InvalidNumberFormat=2]="InvalidNumberFormat",r[r.PropertyNameExpected=3]="PropertyNameExpected",r[r.ValueExpected=4]="ValueExpected",r[r.ColonExpected=5]="ColonExpected",r[r.CommaExpected=6]="CommaExpected",r[r.CloseBraceExpected=7]="CloseBraceExpected",r[r.CloseBracketExpected=8]="CloseBracketExpected",r[r.EndOfFileExpected=9]="EndOfFileExpected",r[r.InvalidCommentToken=10]="InvalidCommentToken",r[r.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=12]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",r[r.InvalidUnicode=14]="InvalidUnicode",r[r.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",r[r.InvalidCharacter=16]="InvalidCharacter"})(YL||(YL={}))});var BL={};Be(BL,{register:()=>HK});function HL(r,e){return r?.type==="array"&&r.children?r.children.map(e):[]}async function jK(r,e){let t=r,n=e[0],i=n.startsWith("@")?2:1,o=n.split(ql.posix.sep).slice(0,i).join(ql.posix.sep);for(;;){let s=at.Uri.joinPath(t,"node_modules",o),a;try{a=await at.workspace.fs.stat(s)}catch{}if(a&&a.type&at.FileType.Directory){for(let l of e.map(u=>u.split(ql.posix.sep).slice(i).join(ql.posix.sep)).filter(Boolean).map(u=>at.Uri.joinPath(s,u)))if(await Al(l))return l}let c=t;if(t=at.Uri.joinPath(t,".."),c.path===t.path)return}}async function qK(r,e,t){async function n(o){return o.path.endsWith(".json")||await Al(o)?o:o.with({path:`${o.path}${t===1?"/tsconfig.json":".json"}`})}return["./","../"].some(o=>e.startsWith(o))?n(at.Uri.joinPath(r,e)):e.startsWith("/")||ly(e)?n(at.Uri.file(e)):jK(r,[e,...e.endsWith(".json")?[]:[`${e}.json`,`${e}/tsconfig.json`]])}function HK(){let r=["**/[jt]sconfig.json","**/[jt]sconfig.*.json"],t=["json","jsonc"].map(n=>r.map(i=>({language:n,pattern:i}))).flat();return at.Disposable.from(at.commands.registerCommand(KL,async({resourceUri:n,extendsValue:i,linkType:o})=>{let s=await qK(sc.dirname(at.Uri.from(n)),i,o);if(s===void 0){at.window.showErrorMessage(at.l10n.t("Failed to resolve {0} as module",i));return}await at.commands.executeCommand("vscode.open",s)}),at.languages.registerDocumentLinkProvider(t,new XP))}var ql,at,KL,XP,GL=E(()=>{"use strict";JP();ql=require("path"),at=U(require("vscode"));dP();Ti();uy();KL="_typescript.openExtendsLink",XP=class{provideDocumentLinks(e,t){let n=jL(e.getText());return n?Pr([this.getExtendsLink(e,n),...this.getFilesLinks(e,n),...this.getReferencesLinks(e,n)]):[]}getExtendsLink(e,t){let n=gv(t,["extends"]);return n&&this.tryCreateTsConfigLink(e,n,0)}getReferencesLinks(e,t){return HL(gv(t,["references"]),n=>{let i=gv(n,["path"]);return i&&this.tryCreateTsConfigLink(e,i,1)})}tryCreateTsConfigLink(e,t,n){if(!this.isPathValue(t))return;let i={resourceUri:{...e.uri.toJSON(),$mid:void 0},extendsValue:t.value,linkType:n},o=new at.DocumentLink(this.getRange(e,t),at.Uri.parse(`command:${KL}?${JSON.stringify(i)}`));return o.tooltip=at.l10n.t("Follow link"),o}getFilesLinks(e,t){return HL(gv(t,["files"]),n=>this.pathNodeToLink(e,n))}pathNodeToLink(e,t){return this.isPathValue(t)?new at.DocumentLink(this.getRange(e,t),this.getFileTarget(e,t)):void 0}isPathValue(e){return e?.type==="string"&&e.value&&!e.value.includes("*")}getFileTarget(e,t){return(0,ql.isAbsolute)(t.value)?at.Uri.file(t.value):at.Uri.joinPath(sc.dirname(e.uri),t.value)}getRange(e,t){let n=t.offset,i=e.positionAt(n+1),o=e.positionAt(n+(t.length-1));return new at.Range(i,o)}}});var Hl,WL,xte,Dte,zL=E(()=>{"use strict";Hl=U(require("vscode")),WL=r=>new Promise(e=>setTimeout(()=>e(),r)),xte=Object.freeze({autoClosingBrackets:"editor.autoClosingBrackets",completeFunctionCalls:"js/ts.suggest.completeFunctionCalls",insertMode:"editor.suggest.insertMode",snippetSuggestions:"editor.snippetSuggestions",suggestSelection:"editor.suggestSelection",quoteStyle:"js/ts.preferences.quoteStyle"}),Dte=Object.freeze(["insert","replace"])});var wS,AS,$L=E(()=>{"use strict";wS=U(require("vscode")),AS=class{async getConfigsForWorkspace(e){if(!wS.workspace.workspaceFolders)return[];let t=new Map;for(let n of await this.findConfigFiles(e)){let i=wS.workspace.getWorkspaceFolder(n);i&&t.set(n.fsPath,{uri:n,fsPath:n.fsPath,posixPath:n.path,workspaceFolder:i})}return t.values()}async findConfigFiles(e){return await wS.workspace.findFiles("**/tsconfig*.json","**/{node_modules,.*}/**",void 0,e)}}});var JL={};Be(JL,{register:()=>KK});function KK(r){return $e.tasks.registerTaskProvider("typescript",new QP(r))}var ri,$e,QP,XL=E(()=>{"use strict";JP();ri=U(require("path")),$e=U(require("vscode"));zL();dt();Ti();jt();yt();uy();Xa();md();$L();QP=class r extends _e{constructor(t){super();this.client=t;this.tsconfigProvider=new AS,this._register($e.workspace.onDidChangeConfiguration(this.onConfigurationChanged,this)),this.onConfigurationChanged()}client;projectInfoRequestTimeout=2e3;findConfigFilesTimeout=5e3;autoDetect="on";tsconfigProvider;async provideTasks(t){let n=$e.workspace.workspaceFolders;if(this.autoDetect==="off"||!n?.length)return[];let i=new Set,o=[];for(let s of await this.getAllTsConfigs(t))i.has(s.fsPath)||(i.add(s.fsPath),o.push(...await this.getTasksForProject(s)));return o}async resolveTask(t){let n=t.definition;if(/\\tsconfig.*\.json/.test(n.tsconfig)){$e.window.showWarningMessage($e.l10n.t('TypeScript Task in tasks.json contains "\\\\". TypeScript tasks tsconfig must use "/"'));return}let i=n.tsconfig;if(!i||t.scope===void 0||t.scope===$e.TaskScope.Global||t.scope===$e.TaskScope.Workspace)return;let o=t.scope.uri.with({path:t.scope.uri.path+"/"+i}),s={uri:o,fsPath:o.fsPath,posixPath:o.path,workspaceFolder:t.scope};return this.getTasksForProjectAndDefinition(s,n)}async getAllTsConfigs(t){let n=(await Promise.all([this.getTsConfigForActiveFile(t),this.getTsConfigsInWorkspace(t)])).flat();return Promise.all(n.map(async i=>await Al(i.uri)?i:void 0)).then(Pr)}async getTsConfigForActiveFile(t){let n=$e.window.activeTextEditor;if(n&&Y0(n.document.fileName)){let a=n.document.uri;return[{uri:a,fsPath:a.fsPath,posixPath:a.path,workspaceFolder:$e.workspace.getWorkspaceFolder(a)}]}let i=this.getActiveTypeScriptFile();if(!i)return[];let o=await Promise.race([this.client.value.execute("projectInfo",{file:i,needFileNameList:!1},t),new Promise(a=>setTimeout(()=>a(Yo.NoContent),this.projectInfoRequestTimeout))]);if(o.type!=="response"||!o.body)return[];let{configFileName:s}=o.body;if(s&&!xl(s)){let a=ri.normalize(s),c=$e.Uri.file(a),l=$e.workspace.getWorkspaceFolder(c);return[{uri:c,fsPath:a,posixPath:c.path,workspaceFolder:l}]}return[]}async getTsConfigsInWorkspace(t){let n=new $e.CancellationTokenSource;return t.onCancellationRequested(()=>n.cancel()),Promise.race([this.tsconfigProvider.getConfigsForWorkspace(n.token).then(i=>Array.from(i)),WL(this.findConfigFilesTimeout).then(()=>(n.cancel(),[]))])}static async getCommand(t){if(t.workspaceFolder){let n=await r.getLocalTscAtPath(ri.dirname(t.fsPath));if(n)return n;let i=await r.getLocalTscAtPath(t.workspaceFolder.uri.fsPath);if(i)return i}return"tsc"}static async getLocalTscAtPath(t){let n=process.platform,i=ri.join(t,"node_modules",".bin");if(n==="win32"&&await Al($e.Uri.file(ri.join(i,"tsc.cmd"))))return ri.join(i,"tsc.cmd");if((n==="linux"||n==="darwin")&&await Al($e.Uri.file(ri.join(i,"tsc"))))return ri.join(i,"tsc")}getActiveTypeScriptFile(){let t=$e.window.activeTextEditor;if(t){let n=t.document;if(n&&(n.languageId==="typescript"||n.languageId==="typescriptreact"))return this.client.value.toTsFilePath(n.uri)}}getBuildTask(t,n,i,o,s){let a=new $e.Task(s,t||$e.TaskScope.Workspace,$e.l10n.t("build - {0}",n),"tsc",new $e.ShellExecution(i,o),"$tsc");return a.group=$e.TaskGroup.Build,a.isBackground=!1,a}getWatchTask(t,n,i,o,s){let a=new $e.Task(s,t||$e.TaskScope.Workspace,$e.l10n.t("watch - {0}",n),"tsc",new $e.ShellExecution(i,[...o,"--watch"]),"$tsc-watch");return a.group=$e.TaskGroup.Build,a.isBackground=!0,a}async getTasksForProject(t){let n=await r.getCommand(t),i=await this.getBuildShellArgs(t),o=this.getLabelForTasks(t),s=[];return(this.autoDetect==="build"||this.autoDetect==="on")&&s.push(this.getBuildTask(t.workspaceFolder,o,n,i,{type:"typescript",tsconfig:o})),(this.autoDetect==="watch"||this.autoDetect==="on")&&s.push(this.getWatchTask(t.workspaceFolder,o,n,i,{type:"typescript",tsconfig:o,option:"watch"})),s}async getTasksForProjectAndDefinition(t,n){let i=await r.getCommand(t),o=await this.getBuildShellArgs(t),s=this.getLabelForTasks(t),a;return n.option===void 0?a=this.getBuildTask(t.workspaceFolder,s,i,o,n):n.option==="watch"&&(a=this.getWatchTask(t.workspaceFolder,s,i,o,n)),a}async getBuildShellArgs(t){let n=["-p",t.fsPath];try{let i=await $e.workspace.fs.readFile(t.uri),o=Buffer.from(i).toString("utf-8");if(VL(o)?.references)return["-b",t.fsPath]}catch{}return n}getLabelForTasks(t){if(t.workspaceFolder){let n=$e.Uri.file(ri.normalize(t.workspaceFolder.uri.fsPath));return ri.posix.relative(n.path,t.posixPath)}return t.posixPath}onConfigurationChanged(){let t=q("tsc.autoDetect",void 0,{fallbackSection:"typescript"});this.autoDetect=typeof t>"u"?"on":t}}});var WK={};Be(WK,{activate:()=>BK,deactivate:()=>GK});module.exports=Hd(WK);var QL=U(lw()),ZL=U(require("fs")),eF=U(require("vscode"));var EE=class{constructor(e,t){this.onCompletionAccepted=e;this._pluginManager=t}onCompletionAccepted;_pluginManager;configurePlugin(e,t){this._pluginManager.setConfiguration(e,t)}};function uw(r,e){return{getAPI(t){if(t===0)return new EE(r,e)}}}var bh=U(require("vscode")),xp=class{commands=new Map;dispose(){for(let e of this.commands.values())e.registration.dispose();this.commands.clear()}register(e){let t=this.commands.get(e.id);return t?t.refCount+=1:(t={refCount:1,registration:bh.commands.registerCommand(e.id,e.execute,e)},this.commands.set(e.id,t)),new bh.Disposable(()=>{t.refCount-=1,t.refCount<=0&&(t.registration.dispose(),this.commands.delete(e.id))})}};var or=U(require("vscode"));jt();var xE="typescriptteam.native-preview",DE=["typescriptteam.vscode-typescript",xE];function Dp(){for(let r of DE){let e=or.extensions.getExtension(r);if(e)return e}}var Eh=class{id="typescript.experimental.enableTsgo";async execute(){await fw(!0)}},ld=class{id="typescript.experimental.disableTsgo";async execute(){await fw(!1)}};async function fw(r){if(Dp()||await or.window.showErrorMessage(or.l10n.t("The TypeScript Go extension is not installed."),{title:or.l10n.t("Open on GitHub"),isCloseAffordance:!0})&&await or.env.openExternal(or.Uri.parse("https://github.com/microsoft/typescript-go")),q("experimental.useTsgo",!1,{fallbackSection:"typescript"})===r)return;let n=or.ConfigurationTarget.Global,i=or.workspace.getConfiguration(vn),o=i.inspect("experimental.useTsgo"),s=or.workspace.getConfiguration("typescript").inspect("experimental.useTsgo");if(o?.workspaceValue!==void 0||s?.workspaceValue!==void 0)n=or.ConfigurationTarget.Workspace;else if(o?.workspaceFolderValue!==void 0||s?.workspaceFolderValue!==void 0)n=or.ConfigurationTarget.WorkspaceFolder;else{let c=or.workspace.getConfiguration("typescript-go").inspect("executablePath");c?.workspaceValue!==void 0?n=or.ConfigurationTarget.Workspace:c?.workspaceFolderValue!==void 0&&(n=or.ConfigurationTarget.WorkspaceFolder)}await i.update("experimental.useTsgo",r,n)}var Ch=class{constructor(e){this.pluginManager=e}pluginManager;id="_typescript.configurePlugin";execute(e,t){this.pluginManager.setConfiguration(e,t)}};md();var Fh=class{constructor(e,t){this.activeJsTsEditorTracker=e;this.lazyClientHost=t}activeJsTsEditorTracker;lazyClientHost;id="typescript.goToProjectConfig";execute(){let e=this.activeJsTsEditorTracker.activeJsTsEditor;e&&Up(0,this.lazyClientHost.value.serviceClient,e.document.uri)}},Mh=class{constructor(e,t){this.activeJsTsEditorTracker=e;this.lazyClientHost=t}activeJsTsEditorTracker;lazyClientHost;id="javascript.goToProjectConfig";execute(){let e=this.activeJsTsEditorTracker.activeJsTsEditor;e&&Up(1,this.lazyClientHost.value.serviceClient,e.document.uri)}};ZE();eC();var Yh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="typescript.openTsServerLog";execute(){this.lazyClientHost.value.serviceClient.openTsServerLogFile()}};var Vh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="typescript.reloadProjects";execute(){this.lazyClientHost.value.reloadProjects()}},jh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="javascript.reloadProjects";execute(){this.lazyClientHost.value.reloadProjects()}};var qh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="typescript.restartTsServer";execute(){this.lazyClientHost.value.serviceClient.restartTsServer(!0)}};var hd=class r{constructor(e){this.lazyClientHost=e}lazyClientHost;static id="typescript.selectTypeScriptVersion";id=r.id;execute(){this.lazyClientHost.value.serviceClient.showVersionPicker()}};var p0=U(require("vscode"));ko();function vq(r){return r&&typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}var Hh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="typescript.tsserverRequest";async execute(e,t,n,i){if(vq(i)||(i=It),t&&typeof t=="object"&&!Array.isArray(t)){let s=t,a=s.file instanceof p0.Uri,c=typeof s.$traceId=="string";if(a||c){let l={file:void 0,...t};if(a){let u=this.lazyClientHost.value.serviceClient;l.file=u.toOpenTsFilePath(s.file)}c&&this.lazyClientHost.value.serviceClient.telemetryReporter.logTraceEvent("TSServerRequestCommand.execute",s.$traceId,JSON.stringify({command:e})),t=l}}if(["emit-output","semanticDiagnosticsSync","syntacticDiagnosticsSync","suggestionDiagnosticsSync","quickinfo","quickinfo-full","completionInfo"].includes(e)||e.startsWith("_"))return this.lazyClientHost.value.serviceClient.execute(e,t,i,n)}};function v0(r,e,t,n){r.register(new Vh(e)),r.register(new jh(e)),r.register(new hd(e)),r.register(new Yh(e)),r.register(new qh(e)),r.register(new Fh(n,e)),r.register(new Mh(n,e)),r.register(new Ch(t)),r.register(new gd),r.register(new Hh(e)),r.register(new Ha),r.register(new Eh),r.register(new ld)}var S0=U(require("os")),Rl=U(require("path")),Ga=U(require("vscode")),_0=U(require("child_process")),Gh=U(require("fs"));var m0=U(require("vscode"));jt();Vp();var Fo=(o=>(o[o.Off=0]="Off",o[o.Normal=1]="Normal",o[o.Terse=2]="Terse",o[o.Verbose=3]="Verbose",o[o.RequestTime=4]="RequestTime",o))(Fo||{});(t=>{function r(n){switch(n?.toLowerCase()){case"normal":return 1;case"terse":return 2;case"verbose":return 3;case"requestTime":return 4;default:return 0}}t.fromString=r;function e(n){switch(n){case 1:return"normal";case 2:return"terse";case 3:return"verbose";case 4:return"requestTime";default:return"off"}}t.toString=e})(Fo||={});var nC=class r{target;module;checkJs;experimentalDecorators;strictNullChecks;strictFunctionTypes;strict;constructor(e){this.target=r.readTarget(e),this.module=r.readModule(e),this.checkJs=r.readCheckJs(e),this.experimentalDecorators=r.readExperimentalDecorators(e),this.strictNullChecks=r.readImplicitStrictNullChecks(e),this.strictFunctionTypes=r.readImplicitStrictFunctionTypes(e),this.strict=r.readImplicitStrict(e)}isEqualTo(e){return Bi(this,e)}static readTarget(e){return e.get("js/ts.implicitProjectConfig.target")}static readModule(e){return e.get("js/ts.implicitProjectConfig.module")}static readCheckJs(e){let t=e.inspect("js/ts.implicitProjectConfig.checkJs");if(this.hasValue(t))return e.get("js/ts.implicitProjectConfig.checkJs")}static readExperimentalDecorators(e){return e.get("js/ts.implicitProjectConfig.experimentalDecorators",!1)}static readImplicitStrictNullChecks(e){return e.get("js/ts.implicitProjectConfig.strictNullChecks",!0)}static readImplicitStrictFunctionTypes(e){return e.get("js/ts.implicitProjectConfig.strictFunctionTypes",!0)}static readImplicitStrict(e){return e.get("js/ts.implicitProjectConfig.strict",!0)}static hasValue(e){return e===void 0?!1:e.globalValue!==void 0||e.workspaceValue!==void 0||e.workspaceFolderValue!==void 0||e.globalLanguageValue!==void 0||e.workspaceLanguageValue!==void 0||e.workspaceFolderLanguageValue!==void 0}};function g0(r,e){return Bi(r,e)}var rC="vscode",Kh=class{loadFromWorkspace(){let e=m0.workspace.getConfiguration();return{locale:this.readLocale(),globalTsdk:this.readGlobalTsdk(e),localTsdk:this.readLocalTsdk(e),npmLocation:this.readNpmLocation(),tsServerLogLevel:this.readTsServerLogLevel(),tsServerPluginPaths:this.readTsServerPluginPaths(),implicitProjectConfiguration:new nC(e),disableAutomaticTypeAcquisition:this.readDisableAutomaticTypeAcquisition(e),useSyntaxServer:this.readUseSyntaxServer(e),webProjectWideIntellisenseEnabled:this.readWebProjectWideIntellisenseEnable(),webProjectWideIntellisenseSuppressSemanticErrors:this.readWebProjectWideIntellisenseSuppressSemanticErrors(),webTypeAcquisitionEnabled:this.readWebTypeAcquisition(),enableDiagnosticsTelemetry:this.readEnableDiagnosticsTelemetry(),enableProjectDiagnostics:this.readEnableProjectDiagnostics(),maxTsServerMemory:this.readMaxTsServerMemory(),diagnosticDir:this.readDiagnosticDir(),heapSnapshot:this.readHeapSnapshot(),heapProfile:this.readHeapProfileConfiguration(),enablePromptUseWorkspaceTsdk:this.readEnablePromptUseWorkspaceTsdk(),useVsCodeWatcher:this.readUseVsCodeWatcher(e),watchOptions:this.readWatchOptions(),includePackageJsonAutoImports:this.readIncludePackageJsonAutoImports(),enableTsServerTracing:this.readEnableTsServerTracing(),localNodePath:this.readLocalNodePath(e),globalNodePath:this.readGlobalNodePath(e),workspaceSymbolsExcludeLibrarySymbols:this.readWorkspaceSymbolsExcludeLibrarySymbols()}}readTsServerLogLevel(){let e=q("tsserver.log","off",{fallbackSection:"typescript"});return Fo.fromString(e)}readTsServerPluginPaths(){return q("tsserver.pluginPaths",[],{fallbackSection:"typescript"})}readNpmLocation(){return q("tsserver.npm.path",null,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"npm"})}readDisableAutomaticTypeAcquisition(e){let t=q("tsserver.automaticTypeAcquisition.enabled",void 0,{fallbackSection:"typescript"});return t!==void 0?!t:e.get("typescript.disableAutomaticTypeAcquisition",!1)}readLocale(){let e=q("locale","auto",{fallbackSection:"typescript"});return!e||e==="auto"?null:e}readUseSyntaxServer(e){switch(q("tsserver.useSyntaxServer",void 0,{fallbackSection:"typescript"})){case"never":return 0;case"always":return 1;case"auto":return 2}let n=e.get("typescript.tsserver.useSeparateSyntaxServer",!0);return n==="forAllRequests"?1:n===!0?2:0}readEnableDiagnosticsTelemetry(){return q("enableDiagnosticsTelemetry",!1,{fallbackSection:"typescript"})}readEnableProjectDiagnostics(){return q("tsserver.experimental.enableProjectDiagnostics",!1,{fallbackSection:"typescript"})}readUseVsCodeWatcher(e){let t=e.get("files.watcherExclude")??{};if(t["**/node_modules/*/**"]===!0||t["**/node_modules/**"]===!0||t["**/node_modules"]===!0||t["**"]===!0)return!1;let n=e.inspect("typescript.tsserver.experimental.useVsCodeWatcher");return typeof n?.globalValue=="boolean"?n.globalValue:typeof n?.workspaceValue=="boolean"?n.workspaceValue:typeof n?.workspaceFolderValue=="boolean"?n.workspaceFolderValue:q("tsserver.watchOptions",rC,{fallbackSection:"typescript"})===rC}readWatchOptions(){let e=q("tsserver.watchOptions",void 0,{fallbackSection:"typescript"});if(!(!e||e===rC))return{...e??{}}}readIncludePackageJsonAutoImports(){return q("preferences.includePackageJsonAutoImports",void 0,{fallbackSection:"typescript"})}readMaxTsServerMemory(){let n=q("tsserver.maxMemory",3072,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"tsserver.maxTsServerMemory"});return Number.isSafeInteger(n)?Math.max(n,128):3072}readDiagnosticDir(){let e=q("tsserver.diagnosticDir",void 0,{fallbackSection:"typescript"});return typeof e=="string"&&e.length>0?e:void 0}readHeapSnapshot(){let t=q("tsserver.heapSnapshot",0,{fallbackSection:"typescript"});return Number.isSafeInteger(t)?Math.max(t,0):0}readHeapProfileConfiguration(){let t=q("tsserver.heapProfile",{enabled:!1,dir:void 0,interval:void 0},{fallbackSection:"typescript"}),n=typeof t.enabled=="boolean"?t.enabled:!1,i=typeof t.dir=="string"&&t.dir.length>0?t.dir:void 0,o=typeof t.interval=="number"&&Number.isSafeInteger(t.interval)&&t.interval>0?t.interval:void 0;return{enabled:n,dir:i,interval:o}}readEnablePromptUseWorkspaceTsdk(){return q("tsdk.promptToUseWorkspaceVersion",!1,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"enablePromptUseWorkspaceTsdk"})}readEnableTsServerTracing(){return q("tsserver.tracing.enabled",!1,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"tsserver.enableTracing"})}readWorkspaceSymbolsExcludeLibrarySymbols(){return q("workspaceSymbols.excludeLibrarySymbols",!0,{scope:null,fallbackSection:"typescript"})}readWebProjectWideIntellisenseEnable(){return q("tsserver.web.projectWideIntellisense.enabled",!0,{fallbackSection:"typescript"})}readWebProjectWideIntellisenseSuppressSemanticErrors(){return this.readWebTypeAcquisition()&&q("tsserver.web.projectWideIntellisense.suppressSemanticErrors",!1,{fallbackSection:"typescript"})}readWebTypeAcquisition(){return q("tsserver.web.typeAcquisition.enabled",!0,{fallbackSection:"typescript"})}};var h0=U(require("path")),y0=U(require("vscode")),Ba=class{static asAbsoluteWorkspacePath(e){for(let t of y0.workspace.workspaceFolders||[]){let n=[`./${t.name}/`,`${t.name}/`,`.\\${t.name}\\`,`${t.name}\\`];for(let i of n)if(e.startsWith(i))return h0.join(t.uri.fsPath,e.replace(i,""))}}};var Bh=class extends Kh{fixPathPrefixes(e){let t=["~"+Rl.sep];for(let n of t)if(e.startsWith(n))return Rl.join(S0.homedir(),e.slice(n.length));return e}readGlobalTsdk(e){let t=e.inspect("js/ts.tsdk.path");if(t&&typeof t.globalValue=="string")return this.fixPathPrefixes(t.globalValue);let n=e.inspect("typescript.tsdk");return n&&typeof n.globalValue=="string"?this.fixPathPrefixes(n.globalValue):null}readLocalTsdk(e){let t=e.inspect("js/ts.tsdk.path");if(t&&typeof t.workspaceValue=="string")return this.fixPathPrefixes(t.workspaceValue);let n=e.inspect("typescript.tsdk");return n&&typeof n.workspaceValue=="string"?this.fixPathPrefixes(n.workspaceValue):null}readLocalNodePath(e){return this.validatePath(this.readLocalNodePathWorker(e))}readLocalNodePathWorker(e){let t=e.inspect("js/ts.tsserver.node.path"),n=t?.workspaceValue&&typeof t.workspaceValue=="string"?t:e.inspect("typescript.tsserver.nodePath");if(n?.workspaceValue&&typeof n.workspaceValue=="string"){if(n.workspaceValue==="node")return this.findNodePath();let i=this.fixPathPrefixes(n.workspaceValue);return Rl.isAbsolute(i)?i:Ba.asAbsoluteWorkspacePath(i)||null}return null}readGlobalNodePath(e){return this.validatePath(this.readGlobalNodePathWorker(e))}readGlobalNodePathWorker(e){let t=e.inspect("js/ts.tsserver.node.path"),n=t?.globalValue&&typeof t.globalValue=="string"?t:e.inspect("typescript.tsserver.nodePath");if(n?.globalValue&&typeof n.globalValue=="string"){if(n.globalValue==="node")return this.findNodePath();let i=this.fixPathPrefixes(n.globalValue);if(Rl.isAbsolute(i))return i}return null}findNodePath(){try{return _0.execFileSync("node",["-e","console.log(process.execPath)"],{windowsHide:!0,timeout:2e3,cwd:Ga.workspace.workspaceFolders?.[0].uri.fsPath,encoding:"utf-8"}).trim()}catch{return Ga.window.showWarningMessage(Ga.l10n.t("Could not detect a Node installation to run TS Server.")),null}}validatePath(e){return e&&(!Gh.existsSync(e)||Gh.lstatSync(e).isDirectory())?(Ga.window.showWarningMessage(Ga.l10n.t("The path {0} doesn't point to a valid Node installation to run TS Server. Falling back to bundled Node.",e)),null):e}};var Wh=class{_sharedProperties={};_reporter;constructor(e){this._reporter=e}setSharedProperty(e,t){this._sharedProperties[e]=t}postEvent(e,t){let n={...this._sharedProperties,...Object.fromEntries(t)};this._reporter.sendTelemetryEvent(e,n)}postEventObj(e,t){this._reporter.sendTelemetryEvent(e,{...this._sharedProperties,...t})}dispose(){this._reporter.dispose()}};var U0=U(require("vscode")),Ja=U(M0()),oy=class{_experimentationServicePromise;_telemetryReporter;constructor(e,t,n,i){this._telemetryReporter=e,this._experimentationServicePromise=Fq(this._telemetryReporter,t,n,i)}async getTreatmentVariable(e,t){let n=await this._experimentationServicePromise;try{return await n.getTreatmentVariableAsync("vscode",e,!0)??t}catch{return t}}};async function Fq(r,e,t,n){let i;switch(U0.env.uriScheme){case"vscode":i=Ja.TargetPopulation.Public;break;case"vscode-insiders":i=Ja.TargetPopulation.Insiders;break;case"vscode-exploration":i=Ja.TargetPopulation.Internal;break;case"code-oss":i=Ja.TargetPopulation.Team;break;default:i=Ja.TargetPopulation.Public;break}let o=Ja.getExperimentationService(e,t,i,r,n);return await o.initialFetch,o}var pv=U(require("vscode"));var mr=U(require("vscode"));Xa();jt();PC();var iS=require("path");Wi();fy();var Ol=U(require("vscode"));Ti();yt();Vp();dy();function $q(r,e){return r===e?!0:r.code===e.code&&r.message===e.message&&r.severity===e.severity&&r.source===e.source&&r.range.isEqual(e.range)&&ks(r.relatedInformation||Yp,e.relatedInformation||Yp,(t,n)=>t.message===n.message&&t.location.range.isEqual(n.location.range)&&t.location.uri.fsPath===n.location.uri.fsPath)&&ks(r.tags||Yp,e.tags||Yp)}var xC=class{constructor(e,t){this.file=e;this.language=t}file;language;_diagnostics=new Map;updateDiagnostics(e,t,n,i){return e!==this.language&&(this._diagnostics.clear(),this.language=e),this._diagnostics.get(t)?.length===0&&n.length===0?!1:t===3?this.updateRegionDiagnostics(n,i):(this._diagnostics.set(t,n),!0)}getAllDiagnostics(e){return e.getValidate(this.language)?[...this.get(0),...this.get(1),...this.getSuggestionDiagnostics(e)]:[]}delete(e){for(let[t,n]of this._diagnostics)this._diagnostics.set(t,n.filter(i=>!$q(i,e)))}updateRegionDiagnostics(e,t){if(!this._diagnostics.get(1))return this._diagnostics.set(1,e),!0;let i=this._diagnostics.get(1).filter(o=>!t.some(s=>o.range.intersection(s)));return i.push(...e),this._diagnostics.set(1,i),!0}getSuggestionDiagnostics(e){let t=e.getEnableSuggestions(this.language);return this.get(2).filter(n=>t?!0:n.tags&&(n.tags.includes(Ol.DiagnosticTag.Unnecessary)||n.tags.includes(Ol.DiagnosticTag.Deprecated)))}get(e){return this._diagnostics.get(e)||[]}};function Jq(r,e){return r.validate===e.validate&&r.enableSuggestions===e.enableSuggestions}var DC=class r{static defaultSettings={validate:!0,enableSuggestions:!0};_languageSettings=new Map;getValidate(e){return this.get(e).validate}setValidate(e,t){return this.update(e,n=>({validate:t,enableSuggestions:n.enableSuggestions}))}getEnableSuggestions(e){return this.get(e).enableSuggestions}setEnableSuggestions(e,t){return this.update(e,n=>({validate:n.validate,enableSuggestions:t}))}get(e){return this._languageSettings.get(e)||r.defaultSettings}update(e,t){let n=this.get(e),i=t(n);return this._languageSettings.set(e,i),!Jq(n,i)}},IC=class extends _e{constructor(t,n){super();this._telemetryReporter=t;this._diagnosticsCollection=n;this._register(Ol.workspace.onDidChangeTextDocument(i=>{(i.document.languageId==="typescript"||i.document.languageId==="typescriptreact")&&this._updateAllDiagnosticCodesAfterTimeout()})),this._updateAllDiagnosticCodesAfterTimeout(),this._registerTelemetryEventEmitter()}_telemetryReporter;_diagnosticsCollection;_diagnosticCodesMap=new Map;_diagnosticSnapshotsMap=new Fn(t=>t.toString(),{onCaseInsensitiveFileSystem:!1});_timeout;_telemetryEmitter;logDiagnosticsPerformanceTelemetry(t){for(let n of t)this._telemetryReporter.logTelemetry("diagnostics.performance",{syntaxDiagDuration:n.syntaxDiag,semanticDiagDuration:n.semanticDiag,suggestionDiagDuration:n.suggestionDiag,regionSemanticDiagDuration:n.regionSemanticDiag,fileLineCount:n.fileLineCount})}_updateAllDiagnosticCodesAfterTimeout(){clearTimeout(this._timeout),this._timeout=setTimeout(()=>this._updateDiagnosticCodes(),5e3)}_increaseDiagnosticCodeCount(t){t!==void 0&&this._diagnosticCodesMap.set(Number(t),(this._diagnosticCodesMap.get(Number(t))||0)+1)}_updateDiagnosticCodes(){this._diagnosticsCollection.forEach((t,n)=>{let i=this._diagnosticSnapshotsMap.get(t);this._diagnosticSnapshotsMap.set(t,n),n.filter(s=>!i?.some(a=>Bi(s,a))).forEach(s=>{let a=s.code;this._increaseDiagnosticCodeCount(typeof a=="string"||typeof a=="number"?a:a?.value)})})}_registerTelemetryEventEmitter(){this._telemetryEmitter=setInterval(()=>{if(this._diagnosticCodesMap.size>0){let t="";this._diagnosticCodesMap.forEach((n,i)=>{t+=`${i}:${n},`}),this._diagnosticCodesMap.clear(),this._telemetryReporter.logTelemetry("typescript.diagnostics",{diagnosticCodes:t})}},300*1e3)}dispose(){super.dispose(),clearTimeout(this._timeout),clearInterval(this._telemetryEmitter)}},py=class extends _e{_diagnostics;_settings=new DC;_currentDiagnostics;_pendingUpdates;_updateDelay=50;_diagnosticsTelemetryManager;constructor(e,t,n,i){super(),this._diagnostics=new Fn(void 0,{onCaseInsensitiveFileSystem:i}),this._pendingUpdates=new Fn(void 0,{onCaseInsensitiveFileSystem:i}),this._currentDiagnostics=this._register(Ol.languages.createDiagnosticCollection(e)),(Math.random()*1e3<=1||t.enableDiagnosticsTelemetry)&&(this._diagnosticsTelemetryManager=this._register(new IC(n,this._currentDiagnostics)))}dispose(){super.dispose();for(let e of this._pendingUpdates.values())clearTimeout(e);this._pendingUpdates.clear()}reInitialize(){this._currentDiagnostics.clear(),this._diagnostics.clear()}setValidate(e,t){this._settings.setValidate(e,t)&&this.rebuildAll()}setEnableSuggestions(e,t){this._settings.setEnableSuggestions(e,t)&&this.rebuildAll()}updateDiagnostics(e,t,n,i,o){let s=!1,a=this._diagnostics.get(e);if(a)s=a.updateDiagnostics(t,n,i,o);else if(i.length){let c=new xC(e,t);c.updateDiagnostics(t,n,i,o),this._diagnostics.set(e,c),s=!0}s&&this.scheduleDiagnosticsUpdate(e)}configFileDiagnosticsReceived(e,t){this._currentDiagnostics.set(e,t)}deleteAllDiagnosticsInFile(e){this._currentDiagnostics.delete(e),this._diagnostics.delete(e)}deleteDiagnostic(e,t){let n=this._diagnostics.get(e);n&&(n.delete(t),this.rebuildFile(n))}getDiagnostics(e){return this._currentDiagnostics.get(e)||[]}logDiagnosticsPerformanceTelemetry(e){this._diagnosticsTelemetryManager?.logDiagnosticsPerformanceTelemetry(e)}scheduleDiagnosticsUpdate(e){this._pendingUpdates.has(e)||this._pendingUpdates.set(e,setTimeout(()=>this.updateCurrentDiagnostics(e),this._updateDelay))}updateCurrentDiagnostics(e){this._pendingUpdates.has(e)&&(clearTimeout(this._pendingUpdates.get(e)),this._pendingUpdates.delete(e));let t=this._diagnostics.get(e);this._currentDiagnostics.set(e,t?t.getAllDiagnostics(this._settings):[])}rebuildAll(){this._currentDiagnostics.clear();for(let e of this._diagnostics.values())this.rebuildFile(e)}rebuildFile(e){this._currentDiagnostics.set(e.file,e.getAllDiagnostics(this._settings))}};var vy=class{response;version=-1;document="";execute(e,t){return this.response&&this.matches(e)?this.response=this.response.then(n=>n.type==="cancelled"?t():n):this.reset(e,t)}matches(e){return this.version===e.version&&this.document===e.uri.toString()}async reset(e,t){return this.version=e.version,this.document=e.uri.toString(),this.response=t()}};dt();yt();jt();Ed();var kd=class extends _e{constructor(t,n,i,o,s,a,c){super();this.client=t;this.description=n;this.commandManager=i;this.telemetryReporter=o;this.typingsStatus=s;this.fileConfigurationManager=a;this.onCompletionAccepted=c;let l={languageId:this.description.languageIds[0]},u=this._register(new Tl("validate.enabled",!0,{scope:l,fallbackSection:this.id,fallbackSubSectionNameOverride:"validate.enable"}));this.updateValidate(u.getValue()),this._register(u.onDidChange(f=>this.updateValidate(f)));let d=this._register(new Tl("suggestionActions.enabled",!0,{scope:l,fallbackSection:this.id}));this.updateSuggestionDiagnostics(d.getValue()),this._register(d.onDidChange(f=>this.updateSuggestionDiagnostics(f))),t.onReady(()=>this.registerProviders())}client;description;commandManager;telemetryReporter;typingsStatus;fileConfigurationManager;onCompletionAccepted;get documentSelector(){let t=[],n=[];for(let i of this.description.languageIds){n.push({language:i});for(let o of ay())t.push({language:i,scheme:o})}return{semantic:t,syntax:n}}async registerProviders(){let t=this.documentSelector,n=new vy;await Promise.all([Promise.resolve().then(()=>(W0(),G0)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(tO(),eO)).then(i=>this._register(i.register(t,this.description,this.client,n))),Promise.resolve().then(()=>(nO(),rO)).then(i=>this._register(i.register(t,this.description,this.client,n))),Promise.resolve().then(()=>(dO(),uO)).then(i=>this._register(i.register(t,this.description,this.client,this.typingsStatus,this.fileConfigurationManager,this.commandManager,this.telemetryReporter,this.onCompletionAccepted))),Promise.resolve().then(()=>(vO(),pO)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(hO(),gO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(_O(),SO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(EO(),bO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(PO(),CO)).then(i=>this._register(i.register(t,this.client,n))),Promise.resolve().then(()=>(DO(),xO)).then(i=>this._register(i.register(this.client,this.commandManager))),Promise.resolve().then(()=>(ZO(),QO)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager,this.client.diagnosticsManager))),Promise.resolve().then(()=>(tk(),ek)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(nk(),rk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(ok(),ik)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(ck(),ak)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(uk(),lk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager,this.telemetryReporter))),Promise.resolve().then(()=>(pk(),fk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(mk(),vk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(hk(),gk)).then(i=>this._register(i.register(t,this.client,this.commandManager,this.fileConfigurationManager,this.telemetryReporter))),Promise.resolve().then(()=>(Ek(),bk)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager,this.commandManager,this.client.diagnosticsManager,this.telemetryReporter))),Promise.resolve().then(()=>(wk(),Rk)).then(i=>this._register(i.register(t,this.client,n,this.fileConfigurationManager,this.commandManager,this.telemetryReporter))),Promise.resolve().then(()=>(kk(),Ok)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Fk(),Lk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(Yk(),Uk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(qk(),jk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Kk(),Hk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Gk(),Bk)).then(i=>this._register(i.register(this.client,this.commandManager))),Promise.resolve().then(()=>(zk(),Wk)).then(i=>this._register(i.register(t,this.description,this.client))),Promise.resolve().then(()=>(Xk(),Jk)).then(i=>this._register(i.register(t,this.client)))])}handlesUri(t){let n=(0,iS.extname)(t.path).slice(1).toLowerCase();return this.description.standardFileExtensions.includes(n)||this.handlesConfigFile(t)}handlesDocument(t){return this.description.languageIds.includes(t.languageId)||this.handlesConfigFile(t.uri)}handlesConfigFile(t){let n=(0,iS.basename)(t.fsPath);return!!n&&!!this.description.configFilePattern&&this.description.configFilePattern.test(n)}get id(){return this.description.id}get diagnosticSource(){return this.description.diagnosticSource}updateValidate(t){this.client.diagnosticsManager.setValidate(this._diagnosticLanguage,t)}updateSuggestionDiagnostics(t){this.client.diagnosticsManager.setEnableSuggestions(this._diagnosticLanguage,t)}reInitialize(){this.client.diagnosticsManager.reInitialize()}triggerAllDiagnostics(){this.client.bufferSyncSupport.requestAllDiagnostics()}diagnosticsReceived(t,n,i,o){t!==0&&!this.client.hasCapabilityForResource(n,2)||t===1&&sn()&&(!Qa()||!j0()||this.client.configuration.webProjectWideIntellisenseSuppressSemanticErrors||!this.client.configuration.webProjectWideIntellisenseEnabled)||t===1&&n.scheme===xd.notebookCell||this.client.diagnosticsManager.updateDiagnostics(n,this._diagnosticLanguage,t,i,o)}configFileDiagnosticsReceived(t,n){this.client.diagnosticsManager.configFileDiagnosticsReceived(t,n)}get _diagnosticLanguage(){return this.description.diagnosticLanguage}};var cc=U(require("vscode"));jt();yt();var oS=class r extends _e{constructor(t){super();this.context=t;this._logLevel=this._register(new Tl("tsserver.log","off",{fallbackSection:"typescript"})),this._register(this._logLevel.onDidChange(()=>{this.context.globalState.update(r.logLevelChangedStorageKey,new Date)})),this.shouldNotifyExtendedLogging()&&this.notifyExtendedLogging()}context;static logLevelChangedStorageKey="typescript.tsserver.logLevelChanged";static doNotPromptLogLevelStorageKey="typescript.tsserver.doNotPromptLogLevel";_logLevel;get logLevel(){return Fo.fromString(this._logLevel.getValue())}get lastLogLevelChange(){let t=this.context.globalState.get(r.logLevelChangedStorageKey);if(t){let n=new Date(t);if(n instanceof Date&&!isNaN(n.valueOf()))return n}}get doNotPrompt(){return this.context.globalState.get(r.doNotPromptLogLevelStorageKey)||!1}shouldNotifyExtendedLogging(){let t=this.lastLogLevelChange?new Date(this.lastLogLevelChange).valueOf():0,n=new Date(t+864e5*7);return!this.doNotPrompt&&this.logLevel!==0&&n.valueOf()<Date.now()}notifyExtendedLogging(){let t;(o=>(o[o.DisableLogging=0]="DisableLogging",o[o.DoNotShowAgain=1]="DoNotShowAgain"))(t||={}),cc.window.showInformationMessage(cc.l10n.t("TS Server logging is currently enabled which may impact performance."),{title:cc.l10n.t("Disable logging"),choice:0},{title:cc.l10n.t("Don't show again"),choice:1}).then(n=>{if(n){if(n.choice===0)return cc.workspace.getConfiguration().update(`${vn}.tsserver.log`,"off",!0);if(n.choice===1)return this.context.globalState.update(r.doNotPromptLogLevelStorageKey,!0)}})}};BC();Mn();Xe();var iL=U(require("path")),ee=U(require("vscode"));Wi();fy();var sS=class{constructor(e,t){this.reporter=e;this.clientVersionDelegate=t}reporter;clientVersionDelegate;logTelemetry(e,t={}){let n=this.reporter;n&&(t.version=this.clientVersionDelegate(),n.postEventObj(e,t))}logTraceEvent(e,t,n){let i={point:e,traceId:t};n&&(i.data=n),this.logTelemetry("typeScriptExtension.trace",i)}};var sv=U(require("vscode"));yt();var av=class extends _e{constructor(t){super();this.logger=t}logger;traceRequest(t,n,i,o){this.logger.logLevel===sv.LogLevel.Trace&&this.trace(t,`Sending request: ${n.command} (${n.seq}). Response expected: ${i?"yes":"no"}. Current queue length: ${o}`,n.arguments)}traceResponse(t,n,i){this.logger.logLevel===sv.LogLevel.Trace&&this.trace(t,`Response received: ${n.command} (${n.request_seq}). Request took ${Date.now()-i.queuingStartTime} ms. Success: ${n.success} ${n.success?"":". Message: "+n.message}`,n.body)}traceRequestCompleted(t,n,i,o){this.logger.logLevel===sv.LogLevel.Trace&&this.trace(t,`Async response received: ${n} (${i}). Request took ${Date.now()-o.queuingStartTime} ms.`)}traceEvent(t,n){this.logger.logLevel===sv.LogLevel.Trace&&this.trace(t,`Event received: ${n.event} (${n.seq}).`,n.body)}trace(t,n,i){this.logger.trace(`<${t}> ${n}`,...i?[JSON.stringify(i,null,4)]:[])}};md();Qt();var ft=U(require("vscode"));Wi();_i();Xe();dt();Ti();jt();Nd();ko();yt();dy();Qt();function Qk(r){switch(r){case Dl:return"TS";case Os:return"TSX";case ja:return"JS";case qa:return"JSX"}}var _P=class{constructor(e,t){this.args=e;this.scriptKind=t}args;scriptKind;type=0},TP=class{constructor(e,t){this.args=e;this.scriptKind=t}args;scriptKind;type=1},bP=class{constructor(e){this.args=e}args;type=2},EP=class{constructor(e,t,n){this.client=e;this._pending=new Fn(t,{onCaseInsensitiveFileSystem:n})}client;_pending;open(e,t){this.updatePending(e,new TP(t,t.scriptKindName))}close(e,t,n){return this.updatePending(e,new _P(t,n))}change(e,t,n){n.length&&this.updatePending(e,new bP({fileName:t,textChanges:n.map(i=>({newText:i.text,start:ye.toLocation(i.range.start),end:ye.toLocation(i.range.end)})).reverse()}))}reset(){this._pending.clear()}beforeCommand(e){e!=="updateOpen"&&this.flush()}flush(){if(this._pending.size>0){let e=[],t=[],n=[];for(let i of this._pending.values())switch(i.type){case 2:n.push(i.args);break;case 1:t.push(i.args);break;case 0:e.push(i.args);break}this.client.execute("updateOpen",{changedFiles:n,closedFiles:e,openFiles:t},It,{nonRecoverable:!0}),this._pending.clear()}}updatePending(e,t){switch(t.type){case 0:{let n=this._pending.get(e);switch(n?.type){case 1:if(n.scriptKind===t.scriptKind)return this._pending.delete(e),!1}break}}return this._pending.has(e)&&this.flush(),this._pending.set(e,t),!0}},CP=class{constructor(e,t,n,i){this.document=e;this.filepath=t;this.client=n;this.synchronizer=i}document;filepath;client;synchronizer;state=0;open(){let e={file:this.filepath,fileContent:this.document.getText(),projectRootPath:this.getProjectRootPath(this.document.uri)},t=Qk(this.document.languageId);t&&(e.scriptKindName=t);let n=this.client.pluginManager.plugins.filter(i=>i.languages.indexOf(this.document.languageId)>=0);n.length&&(e.plugins=n.map(i=>i.name)),this.synchronizer.open(this.resource,e),this.state=1}getProjectRootPath(e){let t=this.client.getWorkspaceRootForResource(e);if(!t&&ft.workspace.workspaceFolders){for(let n of Array.from(ft.workspace.workspaceFolders).sort((i,o)=>i.uri.path.length-o.uri.path.length))if(n.uri.scheme===e.scheme&&n.uri.authority===e.authority){t=n.uri;break}}if(t){let n=this.client.toTsFilePath(t);return n?.startsWith(Ld)?void 0:n}return jp(e,H0,Cd)?"/":void 0}get resource(){return this.document.uri}get lineCount(){return this.document.lineCount}get languageId(){return this.document.languageId}close(){return this.state!==1?(this.state=2,!1):(this.state=2,this.synchronizer.close(this.resource,this.filepath,Qk(this.document.languageId)))}onContentChanged(e){this.state!==1&&console.error(`Unexpected buffer state: ${this.state}`),this.synchronizer.change(this.resource,this.filepath,e)}},PP=class extends Fn{getForPath(e){return this.get(ft.Uri.file(e))}get allBuffers(){return this.values()}},xP=class extends Fn{getOrderedFileSet(){let e=Array.from(this.entries()).sort((n,i)=>n.value-i.value).map(n=>n.resource),t=new Fn(this._normalizePath,this.config);for(let n of e)t.set(n,void 0);return t}},DP=class r{constructor(e,t,n){this.client=e;this.files=t;if(!this.isErrorReportingEnabled()){this._done=!0,rc(n);return}let i=this.client.apiVersion.gte(ve.v440),o=Array.from(t.entries()).filter(a=>i||e.hasCapabilityForResource(a.resource,2)),s=Pr(o.map(a=>e.toTsFilePath(a.resource)));if(!s.length)this._done=!0,rc(n);else{let a;if(this.areProjectDiagnosticsEnabled())a=e.executeAsync("geterrForProject",{delay:0,file:s[0]},this._token.token);else{let c;this.areRegionDiagnosticsEnabled()?c=Pr(o.map(l=>{let u=e.toTsFilePath(l.resource),d=l.value;return u&&d?Se.toFileRangesRequestArgs(u,d):u})):c=s,a=e.executeAsync("geterr",{delay:0,files:c},this._token.token)}a.finally(()=>{this._done||(this._done=!0,n())})}}client;files;static executeGetErrRequest(e,t,n){return new r(e,t,n)}_done=!1;_token=new ft.CancellationTokenSource;isErrorReportingEnabled(){return this.client.apiVersion.gte(ve.v440)?!0:this.client.capabilities.has(2)}areProjectDiagnosticsEnabled(){return this.client.configuration.enableProjectDiagnostics&&this.client.capabilities.has(2)}areRegionDiagnosticsEnabled(){return this.client.apiVersion.gte(ve.v560)}cancel(){this._done||this._token.cancel(),this._token.dispose()}},IP=class extends _e{_onDidChange=this._register(new ft.EventEmitter);onDidChange=this._onDidChange.event;_tabResources;constructor(e,t){super(),this._tabResources=new Fn(e,t);for(let n of ft.window.tabGroups.all)for(let i of n.tabs)this.add(i);this._register(ft.window.tabGroups.onDidChangeTabs(n=>{let i=n.closed.flatMap(s=>this.delete(s)),o=n.opened.flatMap(s=>this.add(s));(i.length||o.length)&&this._onDidChange.fire({closed:i,opened:o})}))}has(e){if(e.scheme===EC){let n=ft.workspace.notebookDocuments.find(i=>i.getCells().some(o=>o.document.uri.toString()===e.toString()));return!!n&&this.has(n.uri)}let t=this._tabResources.get(e);return!!t&&t.tabs.size>0}add(e){let t=[];for(let n of this.getResourcesForTab(e)){let i=this._tabResources.get(n);i?i.tabs.add(e):(this._tabResources.set(n,{tabs:new Set([e])}),t.push(n))}return t}delete(e){let t=[];for(let n of this.getResourcesForTab(e)){let i=this._tabResources.get(n);i&&(i.tabs.delete(e),i.tabs.size===0&&(this._tabResources.delete(n),t.push(n)))}return t}getResourcesForTab(e){return e.input instanceof ft.TabInputText?[e.input.uri]:e.input instanceof ft.TabInputTextDiff?[e.input.original,e.input.modified]:e.input instanceof ft.TabInputNotebook?[e.input.uri]:[]}},cv=class extends _e{client;modeIds;syncedBuffers;pendingDiagnostics;diagnosticDelayer;pendingGetErr;listening=!1;synchronizer;_validate;_tabResources;constructor(e,t,n){super(),this.client=e,this.modeIds=new Set(t),this._validate=this._register(new Hi("validate.enabled",!0,{fallbackSubSectionNameOverride:"validate.enable"})),this.diagnosticDelayer=new Id(300);let i=o=>this.client.toTsFilePath(o);this.syncedBuffers=new PP(i,{onCaseInsensitiveFileSystem:n}),this.pendingDiagnostics=new xP(i,{onCaseInsensitiveFileSystem:n}),this.synchronizer=new EP(e,i,n),this._tabResources=this._register(new IP(i,{onCaseInsensitiveFileSystem:n})),this._register(this._tabResources.onDidChange(o=>{if(!this.client.configuration.enableProjectDiagnostics){for(let s of o.closed)this.syncedBuffers.get(s)&&(this.pendingDiagnostics.delete(s),this.pendingGetErr?.files.delete(s));for(let s of o.opened){let a=this.syncedBuffers.get(s);a&&this.requestDiagnostic(a)}}})),this._register(this._validate.onDidChange(()=>this.requestAllDiagnostics()))}_onDelete=this._register(new ft.EventEmitter);onDelete=this._onDelete.event;_onWillChange=this._register(new ft.EventEmitter);onWillChange=this._onWillChange.event;listen(){this.listening||(this.listening=!0,ft.workspace.onDidOpenTextDocument(this.openTextDocument,this,this._disposables),ft.workspace.onDidCloseTextDocument(this.onDidCloseTextDocument,this,this._disposables),ft.workspace.onDidChangeTextDocument(this.onDidChangeTextDocument,this,this._disposables),ft.window.onDidChangeVisibleTextEditors(e=>{for(let{document:t}of e){let n=this.syncedBuffers.get(t.uri);n&&this.requestDiagnostic(n)}},this,this._disposables),ft.workspace.textDocuments.forEach(this.openTextDocument,this))}handles(e){return this.syncedBuffers.has(e)}ensureHasBuffer(e){if(this.syncedBuffers.has(e))return!0;let t=ft.workspace.textDocuments.find(n=>n.uri.toString()===e.toString());return t?this.openTextDocument(t):!1}toVsCodeResource(e){let t=this.client.toTsFilePath(e);for(let n of this.syncedBuffers.allBuffers)if(n.filepath===t)return n.resource;return e}toResource(e){let t=this.syncedBuffers.getForPath(e);return t?t.resource:ft.Uri.file(e)}reset(){this.pendingGetErr?.cancel(),this.pendingDiagnostics.clear(),this.synchronizer.reset()}reinitialize(){this.reset();for(let e of this.syncedBuffers.allBuffers)e.open()}openTextDocument(e){if(!this.modeIds.has(e.languageId))return!1;let t=e.uri,n=this.client.toTsFilePath(t);if(!n)return!1;if(this.syncedBuffers.has(t))return!0;let i=new CP(e,n,this.client,this.synchronizer);return this.syncedBuffers.set(t,i),i.open(),this.requestDiagnostic(i),!0}closeResource(e){let t=this.syncedBuffers.get(e);if(!t)return;this.pendingDiagnostics.delete(e),this.pendingGetErr?.files.delete(e),this.syncedBuffers.delete(e);let n=t.close();this._onDelete.fire(e),n&&this.requestAllDiagnostics()}interruptGetErr(e){if(!this.pendingGetErr||this.client.configuration.enableProjectDiagnostics)return e();this.pendingGetErr.cancel(),this.pendingGetErr=void 0;let t=e();return this.triggerDiagnostics(),t}beforeCommand(e){this.synchronizer.beforeCommand(e)}lineCount(e){return this.syncedBuffers.get(e)?.lineCount}onDidCloseTextDocument(e){this.closeResource(e.uri)}onDidChangeTextDocument(e){let t=this.syncedBuffers.get(e.document.uri);if(!t)return;this._onWillChange.fire(t.resource),t.onContentChanged(e.contentChanges),!this.requestDiagnostic(t)&&this.pendingGetErr&&(this.pendingGetErr.cancel(),this.pendingGetErr=void 0,this.triggerDiagnostics())}requestAllDiagnostics(){for(let e of this.syncedBuffers.allBuffers)this.shouldValidate(e)&&this.pendingDiagnostics.set(e.resource,Date.now());this.triggerDiagnostics()}getErr(e){let t=e.filter(n=>this.handles(n));if(t.length){for(let n of t)this.pendingDiagnostics.set(n,Date.now());this.triggerDiagnostics()}}triggerDiagnostics(e=200){this.diagnosticDelayer.trigger(()=>{this.sendPendingDiagnostics()},e)}requestDiagnostic(e){if(!this.shouldValidate(e))return!1;this.pendingDiagnostics.set(e.resource,Date.now());let t=Math.min(Math.max(Math.ceil(e.lineCount/20),300),800);return this.triggerDiagnostics(t),!0}hasPendingDiagnostics(e){return this.pendingDiagnostics.has(e)}sendPendingDiagnostics(){let e=this.pendingDiagnostics.getOrderedFileSet();if(this.pendingGetErr){this.pendingGetErr.cancel();for(let{resource:t}of this.pendingGetErr.files.entries())this.syncedBuffers.get(t)&&e.set(t,void 0);this.pendingGetErr=void 0}for(let t of this.syncedBuffers.values()){let i=ft.window.visibleTextEditors.filter(o=>o.document.uri.toString()===t.resource.toString()).flatMap(o=>o.visibleRanges);e.set(t.resource,i.length?i:void 0)}for(let{resource:t}of e.entries()){let n=this.syncedBuffers.get(t);n&&!this.shouldValidate(n)&&e.delete(t)}if(e.size){let t=this.pendingGetErr=DP.executeGetErrRequest(this.client,e,()=>{this.pendingGetErr===t&&(this.pendingGetErr=void 0)})}this.pendingDiagnostics.clear()}shouldValidate(e){return jp(e.resource,Cd)||!this.client.configuration.enableProjectDiagnostics&&!this._tabResources.has(e.resource)?!1:this._validate.getValue(e.document)}};var ti=U(require("vscode"));Nd();yt();var Zk="typescript.useWorkspaceNode",eL="typescript.lastKnownWorkspaceNode",aS=class extends _e{constructor(t,n){super();this.configuration=t;this.workspaceState=n;if(this._currentVersion=this.configuration.globalNodePath||void 0,ti.workspace.isTrusted){let i=this.configuration.localNodePath;if(i){let o=this.canUseWorkspaceNode(i);o===void 0?rc(()=>{this.promptAndSetWorkspaceNode()}):o&&(this._currentVersion=i)}}else this._disposables.push(ti.workspace.onDidGrantWorkspaceTrust(()=>{let i=this.configuration.localNodePath;if(i){let o=this.canUseWorkspaceNode(i);o===void 0?rc(()=>{this.promptAndSetWorkspaceNode()}):o&&this.updateActiveVersion(i)}}))}configuration;workspaceState;_currentVersion;_onDidPickNewVersion=this._register(new ti.EventEmitter);onDidPickNewVersion=this._onDidPickNewVersion.event;get currentVersion(){return this._currentVersion}async updateConfiguration(t){let n=this.configuration;this.configuration=t,(n.globalNodePath!==t.globalNodePath||n.localNodePath!==t.localNodePath)&&await this.computeNewVersion()}async computeNewVersion(){let t=this.configuration.globalNodePath||void 0,n=this.configuration.localNodePath;if(ti.workspace.isTrusted&&n){let i=this.canUseWorkspaceNode(n);i===void 0?t=await this.promptUseWorkspaceNode()||t:i&&(t=n)}this.updateActiveVersion(t)}async promptUseWorkspaceNode(){let t=this.configuration.localNodePath;if(t===null)throw new Error("Could not prompt to use workspace Node installation because no workspace Node installation is specified");let n=ti.l10n.t("Yes"),i=ti.l10n.t("No"),o=ti.l10n.t("Not now"),s=await ti.window.showInformationMessage(ti.l10n.t("This workspace wants to use the Node installation at '{0}' to run TS Server. Would you like to use it?",t),n,i,o),a;switch(s){case n:await this.setUseWorkspaceNodeState(!0,t),a=t;break;case i:await this.setUseWorkspaceNodeState(!1,t);break;case o:await this.setUseWorkspaceNodeState(void 0,t);break}return a}async promptAndSetWorkspaceNode(){let t=await this.promptUseWorkspaceNode();t!==void 0&&this.updateActiveVersion(t)}updateActiveVersion(t){let n=this.currentVersion;this._currentVersion=t,n!==t&&this._onDidPickNewVersion.fire()}canUseWorkspaceNode(t){if(this.workspaceState.get(eL)===t)return this.workspaceState.get(Zk)}async setUseWorkspaceNodeState(t,n){await this.workspaceState.update(eL,n),await this.workspaceState.update(Zk,t)}};var lS=U(require("path")),tL=U(require("vscode"));var cS=class{constructor(e){this.configuration=e}configuration;updateConfiguration(e){this.configuration=e}getPluginPaths(){let e=[];for(let t of this.configuration.tsServerPluginPaths)e.push(...this.resolvePluginPath(t));return e}resolvePluginPath(e){if(lS.isAbsolute(e))return[e];let t=Ba.asAbsoluteWorkspacePath(e);return t!==void 0?[t]:(tL.workspace.workspaceFolders||[]).map(n=>lS.join(n.uri.fsPath,e))}};Mn();LC();var lc=U(require("vscode"));dt();Ed();Qt();Bp();nc();var uS=class r{constructor(e,t,n,i,o,s,a,c,l){this._versionProvider=e;this._versionManager=t;this._nodeVersionManager=n;this._logDirectoryProvider=i;this._pluginPathsProvider=o;this._logger=s;this._telemetryReporter=a;this._tracer=c;this._factory=l}_versionProvider;_versionManager;_nodeVersionManager;_logDirectoryProvider;_pluginPathsProvider;_logger;_telemetryReporter;_tracer;_factory;static tsServerLogOutputChannel=new Jr(()=>lc.window.createOutputChannel(lc.l10n.t("TypeScript Server Log")));spawn(e,t,n,i,o,s){let a,c=this.getCompositeServerType(e,t,n),l=this.shouldUseSeparateDiagnosticsServer(n);switch(c){case 1:case 2:{let u=!l&&c===2;a=new Cy({syntax:this.spawnTsServer("syntax",e,n,i,o),semantic:this.spawnTsServer("semantic",e,n,i,o)},s,u);break}case 0:{a=this.spawnTsServer("main",e,n,i,o);break}case 3:{a=this.spawnTsServer("syntax",e,n,i,o);break}}return l?new Ey({getErr:this.spawnTsServer("diagnostics",e,n,i,o),primary:a},s):a}getCompositeServerType(e,t,n){if(!t.has(2))return 3;switch(n.useSyntaxServer){case 1:return 3;case 0:return 0;case 2:return e.apiVersion?.gte(ve.v400)?2:1}}shouldUseSeparateDiagnosticsServer(e){return e.enableProjectDiagnostics}spawnTsServer(e,t,n,i,o){let s=t.apiVersion||ve.defaultVersion,a=o.create(e,this._tracer),{args:c,tsServerLog:l,tsServerTraceDirectory:u}=this.getTsServerArgs(e,n,t,s,i,a.cancellationPipeName);r.isLoggingEnabled(n)&&(l?.type==="file"?this._logger.info(`<${e}> Log file: ${l.uri.fsPath}`):l?.type==="output"?this._logger.info(`<${e}> Logging to output`):this._logger.error(`<${e}> Could not create TS Server log`)),n.enableTsServerTracing&&(u?this._logger.info(`<${e}> Trace directory: ${u.fsPath}`):this._logger.error(`<${e}> Could not create trace directory`)),this._logger.info(`<${e}> Forking...`);let d=this._factory.fork(t,c,e,n,this._versionManager,this._nodeVersionManager,l);return this._logger.info(`<${e}> Starting...`),new Ty(e,this.kindToServerType(e),d,l,a,t,this._telemetryReporter,this._tracer)}kindToServerType(e){switch(e){case"syntax":return"syntax";case"main":case"semantic":case"diagnostics":default:return"semantic"}}getTsServerArgs(e,t,n,i,o,s){let a=[],c,l;if(e==="syntax"&&(i.gte(ve.v401)?a.push("--serverMode","partialSemantic"):a.push("--syntaxOnly")),a.push("--useInferredProjectPerProjectRoot"),(t.disableAutomaticTypeAcquisition||e==="syntax"||e==="diagnostics")&&a.push("--disableAutomaticTypingAcquisition"),(e==="semantic"||e==="main")&&a.push("--enableTelemetry"),s&&a.push("--cancellationPipeName",s+"*"),r.isLoggingEnabled(t))if(sn())a.push("--logVerbosity",Fo.toString(t.tsServerLogLevel)),c={type:"output",output:r.tsServerLogOutputChannel.value};else{let v=this._logDirectoryProvider.getNewLogDirectory();if(v){let m=lc.Uri.joinPath(v,"tsserver.log");c={type:"file",uri:m},a.push("--logVerbosity",Fo.toString(t.tsServerLogLevel)),a.push("--logFile",m.fsPath)}}t.enableTsServerTracing&&!sn()&&(l=this._logDirectoryProvider.getNewLogDirectory(),l&&a.push("--traceDirectory",`"${l.fsPath}"`));let u=sn()?[]:this._pluginPathsProvider.getPluginPaths();if(o.plugins.length){a.push("--globalPlugins",o.plugins.map(m=>m.name).join(","));let v=n.path===this._versionProvider.defaultVersion.path;for(let m of o.plugins)(v||m.enableForWorkspaceTypeScriptVersions)&&u.push(sn()?m.uri.toString():m.uri.fsPath)}u.length!==0&&a.push("--pluginProbeLocations",u.join(",")),t.npmLocation&&!sn()&&a.push("--npmLocation",`"${t.npmLocation}"`),a.push("--locale",r.getTsLocale(t)),a.push("--noGetErrOnBackgroundUpdate");let d=t.useVsCodeWatcher,f=i.isYarnPnp();return i.gte(ve.v544)&&d&&!f?a.push("--canUseWatchEvents"):d?f&&this._logger.info(`<${e}> Falling back to legacy node.js based file watching because of Yarn PnP.`):this._logger.info(`<${e}> Falling back to legacy node.js based file watching because of user settings.`),a.push("--validateDefaultNpmLocation"),Qa()&&a.push("--enableProjectWideIntelliSenseOnWeb"),{args:a,tsServerLog:c,tsServerTraceDirectory:l}}static isLoggingEnabled(e){return e.tsServerLogLevel!==0}static getTsLocale(e){return e.locale?e.locale:lc.env.language}};var ct=U(require("vscode"));jt();Nd();yt();var dS="typescript.useWorkspaceTsdk",rL="typescript.suppressPromptWorkspaceTsdk",fS=class extends _e{constructor(t,n,i){super();this.configuration=t;this.versionProvider=n;this.workspaceState=i;if(this._currentVersion=this.versionProvider.defaultVersion,this.useWorkspaceTsdkSetting)if(ct.workspace.isTrusted){let o=this.versionProvider.localVersion;o&&(this._currentVersion=o)}else this._disposables.push(ct.workspace.onDidGrantWorkspaceTrust(()=>{this.versionProvider.localVersion&&this.updateActiveVersion(this.versionProvider.localVersion)}));this.isInPromptWorkspaceTsdkState(t)&&rc(()=>{this.promptUseWorkspaceTsdk()})}configuration;versionProvider;workspaceState;_currentVersion;_onDidPickNewVersion=this._register(new ct.EventEmitter);onDidPickNewVersion=this._onDidPickNewVersion.event;updateConfiguration(t){let n=this.configuration;this.configuration=t,!this.isInPromptWorkspaceTsdkState(n)&&this.isInPromptWorkspaceTsdkState(t)&&this.promptUseWorkspaceTsdk()}get currentVersion(){return this._currentVersion}reset(){this._currentVersion=this.versionProvider.bundledVersion}async promptUserForVersion(){let t=this.getNativePreviewPickItem(),n=[this.getBundledPickItem(),...this.getLocalPickItems()];return t&&n.push(t),n.push({kind:ct.QuickPickItemKind.Separator,label:"",run:()=>{}},pK),(await ct.window.showQuickPick(n,{placeHolder:ct.l10n.t("Select the TypeScript version used for JavaScript and TypeScript language features")}))?.run()}getBundledPickItem(){let t=this.versionProvider.defaultVersion;return{label:(!this.useWorkspaceTsdkSetting||!ct.workspace.isTrusted?"\u2022 ":"")+ct.l10n.t("Use VS Code's Version"),description:t.displayName,detail:t.pathLabel,run:async()=>{await this.workspaceState.update(dS,!1),this.updateActiveVersion(t)}}}getLocalPickItems(){return this.versionProvider.localVersions.map(t=>({label:(this.useWorkspaceTsdkSetting&&ct.workspace.isTrusted&&this.currentVersion.eq(t)?"\u2022 ":"")+ct.l10n.t("Use Workspace Version"),description:t.displayName,detail:t.pathLabel,run:async()=>{await ct.workspace.requestWorkspaceTrust()&&(await this.workspaceState.update(dS,!0),await ct.workspace.getConfiguration(vn).update("tsdk.path",t.pathLabel,!1),this.updateActiveVersion(t))}}))}getNativePreviewPickItem(){let t=Dp();return t?{label:(q("experimental.useTsgo",!1,{fallbackSection:"typescript"})?"\u2022 ":"")+ct.l10n.t("Use TypeScript Native Preview (Experimental)"),description:t.packageJSON.version,run:async()=>{await ct.commands.executeCommand("typescript.native-preview.enable")}}:void 0}async promptUseWorkspaceTsdk(){let t=this.versionProvider.localVersion;if(t===void 0)throw new Error("Could not prompt to use workspace TypeScript version because no workspace version is specified");let n=ct.l10n.t("Allow"),i=ct.l10n.t("Dismiss"),o=ct.l10n.t("Never in this Workspace"),s=await ct.window.showInformationMessage(ct.l10n.t("This workspace contains a TypeScript version. Would you like to use the workspace TypeScript version for TypeScript and JavaScript language features?"),n,i,o);s===n?(await this.workspaceState.update(dS,!0),this.updateActiveVersion(t)):s===o&&await this.workspaceState.update(rL,!0)}updateActiveVersion(t){let n=this.currentVersion;this._currentVersion=t,n.eq(t)||this._onDidPickNewVersion.fire()}get useWorkspaceTsdkSetting(){return this.workspaceState.get(dS,!1)}get suppressPromptWorkspaceTsdkSetting(){return this.workspaceState.get(rL,!1)}isInPromptWorkspaceTsdkState(t){return t.localTsdk!==null&&t.enablePromptUseWorkspaceTsdk===!0&&this.suppressPromptWorkspaceTsdkSetting===!1&&this.useWorkspaceTsdkSetting===!1}},pK={label:ct.l10n.t("Learn more about managing TypeScript versions"),description:"",run:()=>{ct.env.openExternal(ct.Uri.parse("https://go.microsoft.com/fwlink/?linkid=839919"))}};dt();yt();function nL(r,e,t,n){return i=>{e()===r&&t()&&n(i)}}function pS(r,e=0){switch(typeof r){case"object":return r===null?Yl(349,e):Array.isArray(r)?mK(r,e):gK(r,e);case"string":return NP(r,e);case"boolean":return vK(r,e);case"number":return Yl(r,e);case"undefined":return 937*31;default:return NP(String(r),617)}}function Yl(r,e){return(e<<5)-e+r|0}function vK(r,e){return Yl(r?433:863,e)}function NP(r,e){e=Yl(149417,e);for(let t=0,n=r.length;t<n;t++)e=Yl(r.charCodeAt(t),e);return e}function mK(r,e){return e=Yl(104579,e),r.reduce((t,n)=>pS(n,t),e)}function gK(r,e){return e=Yl(181387,e),Object.keys(r).sort().reduce((t,n)=>(t=NP(n,t),pS(Reflect.get(r,n),t)),e)}Ed();var uc;(i=>{let r;(c=>(c[c.None=0]="None",c[c.Running=1]="Running",c[c.Errored=2]="Errored"))(r=i.Type||={}),i.None={type:0};class t{constructor(s,a,c,l){this.server=s;this.apiVersion=a;this.tsserverVersion=c;this.languageServiceEnabled=l}server;apiVersion;tsserverVersion;languageServiceEnabled;type=1;toCancelOnResourceChange=new Set;updateTsserverVersion(s){this.tsserverVersion=s}updateLanguageServiceEnabled(s){this.languageServiceEnabled=s}}i.Running=t;class n{constructor(s,a){this.error=s;this.tsServerLog=a}error;tsServerLog;type=2}i.Errored=n})(uc||={});var RP="ts-nul-authority",Ld="^",hK="github.copilot-chat",lv=class extends _e{constructor(t,n,i,o){super();this.context=t;this.loadingIndicator=this._register(new wP(this)),this.logger=i.logger,this.tracer=new av(this.logger),this.pluginManager=i.pluginManager,this.logDirectoryProvider=i.logDirectoryProvider,this.cancellerFactory=i.cancellerFactory,this.versionProvider=i.versionProvider,this.processFactory=i.processFactory,this.lastStart=Date.now();let s,a,c=new Promise((l,u)=>{s=l,a=u});this._onReady={promise:c,resolve:s,reject:a},this.numberRestarts=0,this._configuration=i.serviceConfigurationProvider.loadFromWorkspace(),this.versionProvider.updateConfiguration(this._configuration),this.pluginPathsProvider=new cS(this._configuration),this._versionManager=this._register(new fS(this._configuration,this.versionProvider,t.workspaceState)),this._register(this._versionManager.onDidPickNewVersion(()=>{this.restartTsServer()})),this._nodeVersionManager=this._register(new aS(this._configuration,t.workspaceState)),this._register(this._nodeVersionManager.onDidPickNewVersion(()=>{this.restartTsServer()})),this.bufferSyncSupport=new cv(this,o,n),this.onReady(()=>{this.bufferSyncSupport.listen()}),this.bufferSyncSupport.onDelete(l=>{this.cancelInflightRequestsForResource(l),this.diagnosticsManager.deleteAllDiagnosticsInFile(l)},null,this._disposables),this.bufferSyncSupport.onWillChange(l=>{this.cancelInflightRequestsForResource(l)}),ee.workspace.onDidChangeConfiguration(()=>{let l=this._configuration;this._configuration=i.serviceConfigurationProvider.loadFromWorkspace(),this.versionProvider.updateConfiguration(this._configuration),this._versionManager.updateConfiguration(this._configuration),this.pluginPathsProvider.updateConfiguration(this._configuration),this._nodeVersionManager.updateConfiguration(this._configuration),this.serverState.type===1&&(this._configuration.implicitProjectConfiguration.isEqualTo(l.implicitProjectConfiguration)||this.setCompilerOptionsForInferredProjects(this._configuration),g0(this._configuration,l)||this.restartTsServer())},this,this._disposables),this.telemetryReporter=new sS(i.experimentTelemetryReporter,()=>this.serverState.type===1&&this.serverState.tsserverVersion?this.serverState.tsserverVersion:this.apiVersion.fullVersionString),this.diagnosticsManager=this._register(new py("typescript",this._configuration,this.telemetryReporter,n)),this.typescriptServerSpawner=new uS(this.versionProvider,this._versionManager,this._nodeVersionManager,this.logDirectoryProvider,this.pluginPathsProvider,this.logger,this.telemetryReporter,this.tracer,this.processFactory),this._register(this.pluginManager.onDidUpdateConfig(l=>{this.configurePlugin(l.pluginId,l.config)})),this._register(this.pluginManager.onDidChangePlugins(()=>{this.restartTsServer()}))}context;_onReady;_configuration;pluginPathsProvider;_versionManager;_nodeVersionManager;logger;tracer;typescriptServerSpawner;serverState=uc.None;lastStart;numberRestarts;_isPromptingAfterCrash=!1;isRestarting=!1;hasServerFatallyCrashedTooManyTimes=!1;loadingIndicator;telemetryReporter;bufferSyncSupport;diagnosticsManager;pluginManager;logDirectoryProvider;cancellerFactory;versionProvider;processFactory;watches=new Map;watchEvents=new Map;watchChangeTimeout;get capabilities(){return this._configuration.useSyntaxServer===1?new Za(0,1):sn()?this.isProjectWideIntellisenseOnWebEnabled()?new Za(0,1,2):new Za(0,1):this.apiVersion.gte(ve.v400)?new Za(0,1,2):new Za(0,2)}_onDidChangeCapabilities=this._register(new ee.EventEmitter);onDidChangeCapabilities=this._onDidChangeCapabilities.event;isProjectWideIntellisenseOnWebEnabled(){return Qa()&&this._configuration.webProjectWideIntellisenseEnabled}cancelInflightRequestsForResource(t){if(this.serverState.type===1)for(let n of this.serverState.toCancelOnResourceChange)n.resource.toString()===t.toString()&&n.cancel()}get configuration(){return this._configuration}dispose(){super.dispose(),this.bufferSyncSupport.dispose(),this.serverState.type===1&&this.serverState.server.kill(),this.loadingIndicator.reset(),this.resetWatchers()}restartTsServer(t=!1){this.serverState.type===1&&(this.logger.info("Killing TS Server"),this.isRestarting=!0,this.serverState.server.kill()),t&&(this.hasServerFatallyCrashedTooManyTimes=!1,this.numberRestarts=0,this.lastStart=Date.now()),this.serverState=this.startService(!0)}_onTsServerStarted=this._register(new ee.EventEmitter);onTsServerStarted=this._onTsServerStarted.event;_onDiagnosticsReceived=this._register(new ee.EventEmitter);onDiagnosticsReceived=this._onDiagnosticsReceived.event;_onConfigDiagnosticsReceived=this._register(new ee.EventEmitter);onConfigDiagnosticsReceived=this._onConfigDiagnosticsReceived.event;_onResendModelsRequested=this._register(new ee.EventEmitter);onResendModelsRequested=this._onResendModelsRequested.event;_onProjectLanguageServiceStateChanged=this._register(new ee.EventEmitter);onProjectLanguageServiceStateChanged=this._onProjectLanguageServiceStateChanged.event;_onDidBeginInstallTypings=this._register(new ee.EventEmitter);onDidBeginInstallTypings=this._onDidBeginInstallTypings.event;_onDidEndInstallTypings=this._register(new ee.EventEmitter);onDidEndInstallTypings=this._onDidEndInstallTypings.event;_onTypesInstallerInitializationFailed=this._register(new ee.EventEmitter);onTypesInstallerInitializationFailed=this._onTypesInstallerInitializationFailed.event;_onSurveyReady=this._register(new ee.EventEmitter);onSurveyReady=this._onSurveyReady.event;get apiVersion(){return this.serverState.type===1?this.serverState.apiVersion:ve.defaultVersion}onReady(t){return this._onReady.promise.then(t)}ensureServiceStarted(){this.serverState.type!==1&&this.startService()}token=0;startService(t=!1){if(this.logger.info("Starting TS Server"),this.isDisposed)return this.logger.info("Not starting server: disposed"),uc.None;if(this.hasServerFatallyCrashedTooManyTimes)return this.logger.info("Not starting server: too many crashes"),uc.None;let n=this._versionManager.currentVersion;n.isValid||(ee.window.showWarningMessage(ee.l10n.t("The path {0} doesn't point to a valid tsserver install. Falling back to bundled TypeScript version.",n.path)),this._versionManager.reset(),n=this._versionManager.currentVersion),this.logger.info(`Using tsserver from: ${n.path}`);let i=this._nodeVersionManager.currentVersion;i&&this.logger.info(`Using Node installation from ${i} to run TS Server`),this.resetWatchers();let o=n.apiVersion||ve.defaultVersion,s=++this.token,a=this.typescriptServerSpawner.spawn(n,this.capabilities,this.configuration,this.pluginManager,this.cancellerFactory,{onFatalError:(l,u)=>this.fatalError(l,u)});this.serverState=new uc.Running(a,o,void 0,!0),this.lastStart=Date.now();let c={hasGlobalPlugins:this.pluginManager.plugins.length>0,globalPluginNameHashes:JSON.stringify(this.pluginManager.plugins.map(l=>pS(l.name)))};return this.telemetryReporter.logTelemetry("tsserver.spawned",{...c,localTypeScriptVersion:this.versionProvider.localVersion?this.versionProvider.localVersion.displayName:"",typeScriptVersionSource:n.source}),a.onError(l=>{if(this.token===s){if(!(l instanceof Error)){this.logger.error("TSServer got unknown error type:",l);return}l&&ee.window.showErrorMessage(ee.l10n.t("TypeScript language server exited with error. Error message is: {0}",l.message||l.name)),this.serverState=new uc.Errored(l,a.tsServerLog),this.logger.error("TSServer errored with error.",l),a.tsServerLog?.type==="file"&&this.logger.error(`TSServer log file: ${a.tsServerLog.uri.fsPath}`),this.telemetryReporter.logTelemetry("tsserver.error",{...c}),this.serviceExited(!1,o)}}),a.onExit(l=>{let{code:u,signal:d}=l;this.logger.error(`TSServer exited. Code: ${u}. Signal: ${d}`),this.telemetryReporter.logTelemetry("tsserver.exitWithCode",{...c,code:u??void 0,signal:d??void 0}),this.token===s&&(a.tsServerLog?.type==="file"&&this.logger.info(`TSServer log file: ${a.tsServerLog.uri.fsPath}`),this.serviceExited(!this.isRestarting,o),this.isRestarting=!1)}),a.onEvent(nL(s,()=>this.token,()=>!this.isDisposed&&this.serverState.type===1&&this.serverState.server===a,l=>this.dispatchEvent(l))),this.serviceStarted(t),this._onReady.resolve(),this._onTsServerStarted.fire({version:n,usedApiVersion:o}),this._onDidChangeCapabilities.fire(),this.serverState}resetWatchers(){clearTimeout(this.watchChangeTimeout),CE(Array.from(this.watches.values()))}async showVersionPicker(){this._versionManager.promptUserForVersion()}async openTsServerLogFile(){if(this._configuration.tsServerLogLevel===0)return ee.window.showErrorMessage(ee.l10n.t("TS Server logging is off. Please set 'js/ts.tsserver.log' and restart the TS server to enable logging"),{title:ee.l10n.t("Enable logging and restart TS server")}).then(t=>{if(t)return ee.workspace.getConfiguration().update("js/ts.tsserver.log","verbose",!0).then(()=>{this.restartTsServer()})}),!1;if(this.serverState.type!==1||!this.serverState.server.tsServerLog)return ee.window.showWarningMessage(ee.l10n.t("TS Server has not started logging.")),!1;switch(this.serverState.server.tsServerLog.type){case"output":return this.serverState.server.tsServerLog.output.show(),!0;case"file":{try{let t=await ee.workspace.openTextDocument(this.serverState.server.tsServerLog.uri);return await ee.window.showTextDocument(t),!0}catch{}try{return await ee.commands.executeCommand("revealFileInOS",this.serverState.server.tsServerLog.uri),!0}catch{return ee.window.showWarningMessage(ee.l10n.t("Could not open TS Server log file")),!1}}}}serviceStarted(t){this.bufferSyncSupport.reset();let n=this.apiVersion.gte(ve.v380)?this.configuration.watchOptions:void 0,i={hostInfo:"vscode",preferences:{providePrefixAndSuffixTextForRename:!0,allowRenameOfImportPath:!0,includePackageJsonAutoImports:this._configuration.includePackageJsonAutoImports,excludeLibrarySymbolsInNavTo:this._configuration.workspaceSymbolsExcludeLibrarySymbols},watchOptions:n};this.executeWithoutWaitingForResponse("configure",i),this.setCompilerOptionsForInferredProjects(this._configuration),t&&(this._onResendModelsRequested.fire(),this.bufferSyncSupport.reinitialize(),this.bufferSyncSupport.requestAllDiagnostics());for(let[o,s]of this.pluginManager.configurations())this.configurePlugin(o,s)}setCompilerOptionsForInferredProjects(t){let n={options:this.getCompilerOptionsForInferredProjects(t)};this.executeWithoutWaitingForResponse("compilerOptionsForInferredProjects",n)}getCompilerOptionsForInferredProjects(t){return{...zE(this.apiVersion,0,t),allowJs:!0,allowSyntheticDefaultImports:!0,allowNonTsExtensions:!0,resolveJsonModule:!0}}serviceExited(t,n){if(this.resetWatchers(),this.loadingIndicator.reset(),this.serverState=uc.None,!this.isDisposed&&t){let i=Date.now()-this.lastStart;this.numberRestarts++;let o=!0,s=this.pluginManager.plugins,a=s.filter(d=>d.extension.id.toLowerCase()!==hK),c=[...new Set(a.map(d=>d.extension.id))].join(", "),l={title:ee.l10n.t("Report Issue")},u;this.numberRestarts>5?(this.numberRestarts=0,i<10*1e3?(this.lastStart=Date.now(),o=!1,this.hasServerFatallyCrashedTooManyTimes=!0,a.length?u=ee.window.showErrorMessage(ee.l10n.t(`The JS/TS language service immediately crashed 5 times. The service will not be restarted.
This may be caused by a plugin contributed by one of these extensions: {0}.
Please try disabling these extensions before filing an issue against VS Code.`,c)):s.length||(u=ee.window.showErrorMessage(ee.l10n.t("The JS/TS language service immediately crashed 5 times. The service will not be restarted."),l)),this.telemetryReporter.logTelemetry("serviceExited")):i<60*1e3*5&&(this.lastStart=Date.now(),this._isPromptingAfterCrash||(a.length?u=ee.window.showWarningMessage(ee.l10n.t(`The JS/TS language service crashed 5 times in the last 5 Minutes.
This may be caused by a plugin contributed by one of these extensions: {0}
Please try disabling these extensions before filing an issue against VS Code.`,c)):s.length||(u=ee.window.showWarningMessage(ee.l10n.t("The JS/TS language service crashed 5 times in the last 5 Minutes."),l))))):["vscode-insiders","code-oss"].includes(ee.env.uriScheme)&&(this.numberRestarts=0,this._isPromptingAfterCrash||(a.length?u=ee.window.showWarningMessage(ee.l10n.t(`The JS/TS language service crashed.
This may be caused by a plugin contributed by one of these extensions: {0}.
Please try disabling these extensions before filing an issue against VS Code.`,c)):s.length||(u=ee.window.showWarningMessage(ee.l10n.t("The JS/TS language service crashed."),l)))),u&&(this._isPromptingAfterCrash=!0),u?.then(async d=>{if(this._isPromptingAfterCrash=!1,d===l){let f=this.versionProvider.bundledVersion.apiVersion;if(n.isYarnPnp()){let v={title:ee.l10n.t("Report issue against Yarn PnP")};await ee.window.showWarningMessage(ee.l10n.t("Please report an issue against Yarn PnP"),{modal:!0,detail:ee.l10n.t("The workspace is using a version of the TypeScript Server that has been patched by Yarn PnP. This patching is a common source of bugs.")},v)===v&&ee.env.openExternal(ee.Uri.parse("https://github.com/yarnpkg/berry/issues"))}else f&&n.lt(f)?ee.window.showWarningMessage(ee.l10n.t("Please update your TypeScript version"),{modal:!0,detail:ee.l10n.t(`The workspace is using an old version of TypeScript ({0}).

Before reporting an issue, please update the workspace to use TypeScript {1} or newer to make sure the bug has not already been fixed.`,n.displayName,f.displayName)}):ee.env.openExternal(ee.Uri.parse("https://github.com/microsoft/vscode/wiki/TypeScript-Issues"))}}),o&&this.startService(!0)}}toTsFilePath(t){if(!wl.has(t.scheme))return t.scheme===Gi&&!sn()?t.fsPath:(this.isProjectWideIntellisenseOnWebEnabled()?"":Ld)+"/"+t.scheme+"/"+(t.authority||RP)+(t.path.startsWith("/")?t.path:"/"+t.path)+(t.fragment?"#"+t.fragment:"")}toOpenTsFilePath(t,n={}){let i=t instanceof ee.Uri?t:t.uri;if(!this.bufferSyncSupport.ensureHasBuffer(i)){!n.suppressAlertOnFailure&&!wl.has(i.scheme)&&console.error(`Unexpected resource ${i}`);return}return this.toTsFilePath(i)}hasCapabilityForResource(t,n){if(!this.capabilities.has(n))return!1;switch(n){case 2:return ay().includes(t.scheme);case 0:case 1:return!0}}toResource(t){if(sn()){if(t.startsWith("/lib.")&&t.endsWith(".d.ts"))return ee.Uri.joinPath(this.context.extensionUri,"dist","browser","typescript",t.slice(1));let n=t.match(/^\/([^\/]+)\/([^\/]*)\/(.+)$/);if(n){let i=ee.Uri.parse(n[1]+"://"+(n[2]===RP?"":n[2])+"/"+n[3]);return this.bufferSyncSupport.toVsCodeResource(i)}}if(t.startsWith(Ld)){let n=t.match(/^\^\/([^\/]+)\/([^\/]*)\/(.+)$/);if(n){let i=ee.Uri.parse(n[1]+"://"+(n[2]===RP?"":n[2])+"/"+n[3]);return this.bufferSyncSupport.toVsCodeResource(i)}}return this.bufferSyncSupport.toResource(t)}getWorkspaceRootForResource(t){let n=ee.workspace.workspaceFolders?Array.from(ee.workspace.workspaceFolders):void 0;if(n?.length){if(t.scheme===xd.notebookCell){for(let i of ee.workspace.notebookDocuments)for(let o of i.getCells())if(o.document.uri.toString()===t.toString()){t=i.uri;break}}for(let i of n.sort((o,s)=>o.uri.path.length-s.uri.path.length))if(i.uri.scheme===t.scheme&&i.uri.authority===t.authority&&t.path.startsWith(i.uri.path+"/"))return i.uri;return ee.workspace.getWorkspaceFolder(t)?.uri}}execute(t,n,i,o){let s;if(o?.cancelOnResourceChange){let a=this.serverState;if(a.type===1){let c=new ee.CancellationTokenSource;i.onCancellationRequested(()=>c.cancel());let l={resource:o.cancelOnResourceChange,cancel:()=>c.cancel()};a.toCancelOnResourceChange.add(l),s=this.executeImpl(t,n,{isAsync:!1,token:c.token,expectsResult:!0,...o}),s[0].finally(()=>{a.toCancelOnResourceChange.delete(l),c.dispose()})}}if(s||(s=this.executeImpl(t,n,{isAsync:!1,token:i,expectsResult:!0,...o})),o?.nonRecoverable&&s[0].catch(a=>this.fatalError(t,a)),t==="updateOpen"){let a=Promise.all(s).then(()=>{this.loadingIndicator.reset()}),c=n;c.openFiles?.length===1&&this.loadingIndicator.startedLoadingFile(c.openFiles[0].file,a)}return s[0]}executeWithoutWaitingForResponse(t,n){this.executeImpl(t,n,{isAsync:!1,token:void 0,expectsResult:!1})}executeAsync(t,n,i){return this.executeImpl(t,n,{isAsync:!0,token:i,expectsResult:!0})[0]}executeImpl(t,n,i){let o=this.serverState;return o.type===1?(this.bufferSyncSupport.beforeCommand(t),o.server.executeImpl(t,n,i)):[Promise.resolve(Yo.NoServer)]}interruptGetErr(t){return this.bufferSyncSupport.interruptGetErr(t)}fatalError(t,n){if(this.telemetryReporter.logTelemetry("fatalError",{...n instanceof Vs?n.telemetry:{command:t}}),console.error(`A non-recoverable error occurred while executing tsserver command: ${t}`),n instanceof Vs&&n.serverErrorText&&console.error(n.serverErrorText),this.serverState.type===1){this.logger.info("Killing TS Server");let i=this.serverState.server.tsServerLog;this.serverState.server.kill(),n instanceof Vs&&(this.serverState=new uc.Errored(n,i))}}dispatchEvent(t){switch(t.event){case"syntaxDiag":case"semanticDiag":case"suggestionDiag":case"regionSemanticDiag":{this.loadingIndicator.reset();let n=t;n.body?.diagnostics&&this._onDiagnosticsReceived.fire({kind:yK(t),resource:this.toResource(n.body.file),diagnostics:n.body.diagnostics,spans:n.body.spans});return}case"configFileDiag":this._onConfigDiagnosticsReceived.fire(t);return;case"telemetry":{let n=t.body;this.dispatchTelemetryEvent(n);return}case"projectLanguageServiceState":{let n=t.body;this.serverState.type===1&&this.serverState.updateLanguageServiceEnabled(n.languageServiceEnabled),this._onProjectLanguageServiceStateChanged.fire(n);return}case"projectsUpdatedInBackground":{this.loadingIndicator.reset();let i=t.body.openFiles.map(o=>this.toResource(o));this.bufferSyncSupport.getErr(i);return}case"beginInstallTypes":this._onDidBeginInstallTypings.fire(t.body);return;case"endInstallTypes":this._onDidEndInstallTypings.fire(t.body);return;case"typesInstallerInitializationFailed":this._onTypesInstallerInitializationFailed.fire(t.body);return;case"surveyReady":this._onSurveyReady.fire(t.body);return;case"projectLoadingStart":this.loadingIndicator.startedLoadingProject(t.body.projectName);return;case"projectLoadingFinish":this.loadingIndicator.finishedLoadingProject(t.body.projectName);return;case"createDirectoryWatcher":{let n=t.body.path;if(n.startsWith(Ld))return;this.createFileSystemWatcher(t.body.id,new ee.RelativePattern(ee.Uri.file(n),t.body.recursive?"**":"*"),t.body.ignoreUpdate);return}case"createFileWatcher":{let n=t.body.path;if(n.startsWith(Ld))return;this.createFileSystemWatcher(t.body.id,new ee.RelativePattern(ee.Uri.file(n),"*"));return}case"closeFileWatcher":this.closeFileSystemWatcher(t.body.id);return;case"requestCompleted":{let n=t.body.performanceData?.diagnosticsDuration;n&&this.diagnosticsManager.logDiagnosticsPerformanceTelemetry(n.map(i=>{let o=this.toResource(i.file);return{...i,fileLineCount:this.bufferSyncSupport.lineCount(o)}}));return}}}scheduleExecuteWatchChangeRequest(){this.watchChangeTimeout||(this.watchChangeTimeout=setTimeout(()=>{this.watchChangeTimeout=void 0;let t=Array.from(this.watchEvents,([n,i])=>({id:n,updated:i.updated&&Array.from(i.updated),created:i.created&&Array.from(i.created),deleted:i.deleted&&Array.from(i.deleted)}));this.watchEvents.clear(),this.executeWithoutWaitingForResponse("watchChange",t)},100))}addWatchEvent(t,n,i){let o=this.watchEvents.get(t),s=c=>{o?.[c]?.delete(i)&&o[c].size===0&&(o[c]=void 0)},a=()=>{o||this.watchEvents.set(t,o={}),(o[n]??=new Set).add(i)};switch(n){case"created":s("deleted"),s("updated"),a();break;case"deleted":s("created"),s("updated"),a();break;case"updated":if(o?.created?.has(i))return;s("deleted"),a();break}this.scheduleExecuteWatchChangeRequest()}createFileSystemWatcher(t,n,i){let o=new _l,s=o.add(ee.workspace.createFileSystemWatcher(n,void 0,i));o.add(s.onDidChange(a=>this.addWatchEvent(t,"updated",a.fsPath))),o.add(s.onDidCreate(a=>this.addWatchEvent(t,"created",a.fsPath))),o.add(s.onDidDelete(a=>this.addWatchEvent(t,"deleted",a.fsPath))),o.add({dispose:()=>{this.watchEvents.delete(t),this.watches.delete(t)}}),this.watches.has(t)&&this.closeFileSystemWatcher(t),this.watches.set(t,o)}closeFileSystemWatcher(t){this.watches.get(t)?.dispose()}dispatchTelemetryEvent(t){let n=Object.create(null);if(t.telemetryEventName==="typingsInstalled"){let i=t.payload;n.installedPackages=i.installedPackages,typeof i.installSuccess=="boolean"&&(n.installSuccess=i.installSuccess.toString()),typeof i.typingsInstallerVersion=="string"&&(n.typingsInstallerVersion=i.typingsInstallerVersion)}else{let i=t.payload;i&&Object.keys(i).forEach(o=>{try{i.hasOwnProperty(o)&&(n[o]=typeof i[o]=="string"?i[o]:JSON.stringify(i[o]))}catch{}})}t.telemetryEventName==="projectInfo"&&this.serverState.type===1&&this.serverState.updateTsserverVersion(n.version),this.telemetryReporter.logTelemetry(t.telemetryEventName,n)}configurePlugin(t,n){this.executeWithoutWaitingForResponse("configurePlugin",{pluginName:t,configuration:n})}};function yK(r){switch(r.event){case"syntaxDiag":return 0;case"semanticDiag":return 1;case"suggestionDiag":return 2;case"regionSemanticDiag":return 3}throw new Error("Unknown dignostics kind")}var wP=class extends _e{constructor(t){super();this.client=t}client;_task;reset(){this._task&&(this._task.resolve(),this._task=void 0)}startedLoadingProject(t){this.reset();let n=this.getProjectDisplayName(t);ee.window.withProgress({location:ee.ProgressLocation.Window,title:ee.l10n.t("Initializing '{0}'",n)},()=>new Promise(i=>{this._task={project:t,resolve:i}}))}getProjectDisplayName(t){let n=this.client.toResource(t),i=ee.workspace.asRelativePath(n),o=60;return i.length>o?"..."+i.slice(-o):i}startedLoadingFile(t,n){this._task||ee.window.withProgress({location:ee.ProgressLocation.Window,title:ee.l10n.t("Analyzing '{0}' and its dependencies",iL.basename(t))},()=>n)}finishedLoadingProject(t){this._task?.project===t&&(this._task.resolve(),this._task=void 0)}};var Pt=U(require("vscode"));_i();md();dt();yt();var Vl;(o=>{let r;(u=>(u[u.None=0]="None",u[u.Pending=1]="Pending",u[u.Resolved=2]="Resolved",u[u.SyntaxOnly=3]="SyntaxOnly"))(r=o.Type||={}),o.None=Object.freeze({type:0}),o.SyntaxOnly=Object.freeze({type:3});class n{constructor(a,c){this.resource=a;this.projectType=c}resource;projectType;type=1;cancellation=new Pt.CancellationTokenSource}o.Pending=n;class i{constructor(a,c,l){this.resource=a;this.projectType=c;this.configFile=l}resource;projectType;configFile;type=2}o.Resolved=i})(Vl||={});var vS=class extends _e{constructor(t,n,i){super();this._client=t;this._activeTextEditorManager=i;n.register({id:this.openOpenConfigCommandId,execute:async(...[o,s])=>{this._state.type===2?await $E(s,this._client,o,this._state.configFile):this._state.type===1&&await Up(s,this._client,this._state.resource)}}),n.register({id:this.createOrOpenConfigCommandId,execute:async(...[o,s])=>{await Mp(this._client.apiVersion,s,o,this._client.configuration)}}),i.onDidChangeActiveJsTsEditor(this.updateStatus,this,this._disposables),this._client.onReady(()=>{this._ready=!0,this.updateStatus()})}_client;_activeTextEditorManager;openOpenConfigCommandId="_typescript.openConfig";createOrOpenConfigCommandId="_typescript.createOrOpenConfig";_statusItem;_ready=!1;_state=Vl.None;dispose(){super.dispose(),this._statusItem?.dispose()}async updateStatus(){let t=this._activeTextEditorManager.activeJsTsEditor?.document;if(!t||!Lo(t)){this.updateState(Vl.None);return}if(!this._client.hasCapabilityForResource(t.uri,2)){this.updateState(Vl.SyntaxOnly);return}let n=this._client.toOpenTsFilePath(t,{suppressAlertOnFailure:!0});if(!n){this.updateState(Vl.None);return}if(!this._ready)return;let i=Il(t)?0:1,o=new Vl.Pending(t.uri,i);this.updateState(o);let s=await this._client.execute("projectInfo",{file:n,needFileNameList:!1},o.cancellation.token);s.type==="response"&&s.body&&this._state===o&&this.updateState(new Vl.Resolved(t.uri,i,s.body.configFileName))}updateState(t){if(this._state!==t)switch(this._state.type===1&&(this._state.cancellation.cancel(),this._state.cancellation.dispose()),this._state=t,this._state.type){case 0:{this._statusItem?.dispose(),this._statusItem=void 0;break}case 1:{let n=this.ensureStatusItem();n.severity=Pt.LanguageStatusSeverity.Information,n.text=Pt.l10n.t("Loading IntelliSense status"),n.detail=void 0,n.command=void 0,n.busy=!0;break}case 2:{let n=this._state.projectType===0?Pt.l10n.t("No tsconfig"):Pt.l10n.t("No jsconfig"),i=this._client.getWorkspaceRootForResource(this._state.resource);if(!i){this._statusItem&&(this._statusItem.text=n,this._statusItem.detail=Pt.workspace.workspaceFolders?Pt.l10n.t("File is not part opened folders"):Pt.l10n.t("No opened folders"),this._statusItem.busy=!1);return}let o=this.ensureStatusItem();o.busy=!1,o.detail=void 0,o.severity=Pt.LanguageStatusSeverity.Information,xl(this._state.configFile)?(o.text=n,o.detail=void 0,o.command={command:this.createOrOpenConfigCommandId,title:this._state.projectType===0?Pt.l10n.t("Configure TSConfig"):Pt.l10n.t("Configure JSConfig"),arguments:[i,this._state.projectType]}):(o.text=Pt.workspace.asRelativePath(this._state.configFile),o.detail=void 0,o.command={command:this.openOpenConfigCommandId,title:Pt.l10n.t("Open Config File"),arguments:[i,this._state.projectType]});break}case 3:{let n=this.ensureStatusItem();n.severity=Pt.LanguageStatusSeverity.Warning,n.text=Pt.l10n.t("Partial mode"),n.detail=Pt.l10n.t("Project wide IntelliSense not available"),n.busy=!1,n.command={title:Pt.l10n.t("Learn More"),command:"vscode.open",arguments:[Pt.Uri.parse("https://aka.ms/vscode/jsts/partial-mode")]};break}}}ensureStatusItem(){return this._statusItem||(this._statusItem=Pt.languages.createLanguageStatusItem("typescript.projectStatus",Uh),this._statusItem.name=Pt.l10n.t("JS/TS IntelliSense Status")),this._statusItem}};var Zt=U(require("vscode"));md();var AP=class{constructor(e){this.telemetryReporter=e;this._item=Zt.window.createStatusBarItem("status.typescript.exclude",Zt.StatusBarAlignment.Right,98),this._item.name=Zt.l10n.t("TypeScript: Configure Excludes"),this._item.command="js.projectStatus.command"}telemetryReporter;configFileName;_item;_currentHint;getCurrentHint(){return this._currentHint}hide(){this._item.hide()}show(e){this._currentHint={message:e?Zt.l10n.t("To enable project-wide JavaScript/TypeScript language features, exclude folders with many files, like: {0}",e):Zt.l10n.t("To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.")},this._item.tooltip=this._currentHint.message,this._item.text=Zt.l10n.t("Configure Excludes"),this._item.tooltip=Zt.l10n.t("To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on."),this._item.color="#A5DF3B",this._item.show(),this.telemetryReporter.logTelemetry("js.hintProjectExcludes")}};function SK(r,e){return e.onProjectLanguageServiceStateChanged(t=>{if(t.languageServiceEnabled)r.hide();else{r.show();let n=t.projectName;n&&(r.configFileName=n,Zt.window.showWarningMessage(r.getCurrentHint().message,{title:Zt.l10n.t("Configure Excludes"),index:0}).then(i=>{i?.index===0&&oL(e,n)}))}})}function oL(r,e){if(!xl(e))Zt.workspace.openTextDocument(e).then(Zt.window.showTextDocument);else{let t=r.getWorkspaceRootForResource(Zt.Uri.file(e));t&&Mp(r.apiVersion,/tsconfig\.?.*\.json/.test(e)?0:1,t,r.configuration)}}function sL(r){let e=[],t=new AP(r.telemetryReporter);return e.push(Zt.commands.registerCommand("js.projectStatus.command",()=>{t.configFileName&&oL(r,t.configFileName);let{message:n}=t.getCurrentHint();return Zt.window.showInformationMessage(n)})),e.push(SK(t,r)),Zt.Disposable.from(...e)}var Xi=U(require("vscode"));jt();yt();var aL=30*1e3,uv=class extends _e{_acquiringTypings=new Map;_client;constructor(e){super(),this._client=e,this._register(this._client.onDidBeginInstallTypings(t=>this.onBeginInstallTypings(t.eventId))),this._register(this._client.onDidEndInstallTypings(t=>this.onEndInstallTypings(t.eventId)))}dispose(){super.dispose();for(let e of this._acquiringTypings.values())clearTimeout(e)}get isAcquiringTypings(){return Object.keys(this._acquiringTypings).length>0}onBeginInstallTypings(e){this._acquiringTypings.has(e)||this._acquiringTypings.set(e,setTimeout(()=>{this.onEndInstallTypings(e)},aL))}onEndInstallTypings(e){let t=this._acquiringTypings.get(e);t&&clearTimeout(t),this._acquiringTypings.delete(e)}},mS=class extends _e{_promises=new Map;constructor(e){super(),this._register(e.onDidBeginInstallTypings(t=>this._onBegin(t.eventId))),this._register(e.onDidEndInstallTypings(t=>this._onEndOrTimeout(t.eventId))),this._register(e.onTypesInstallerInitializationFailed(t=>this.onTypesInstallerInitializationFailed()))}dispose(){super.dispose(),this._promises.forEach(e=>e())}_onBegin(e){let t=setTimeout(()=>this._onEndOrTimeout(e),aL),n=new Promise(i=>{this._promises.set(e,()=>{clearTimeout(t),i()})});Xi.window.withProgress({location:Xi.ProgressLocation.Window,title:Xi.l10n.t("Fetching data for better TypeScript IntelliSense")},()=>n)}_onEndOrTimeout(e){let t=this._promises.get(e);t&&(this._promises.delete(e),t())}async onTypesInstallerInitializationFailed(){if(q("tsserver.checkNpmIsInstalled",!0,{fallbackSection:"typescript",fallbackSubSectionNameOverride:"check.npmIsInstalled"})){let e={title:Xi.l10n.t("Don't Show Again")};await Xi.window.showWarningMessage(Xi.l10n.t("Could not install typings files for JavaScript language features. Please ensure that NPM is installed, or configure 'js/ts.tsserver.npm.path' in your user settings. Alternatively, check the [documentation]({0}) to learn more.","https://go.microsoft.com/fwlink/?linkid=847635"),e)===e&&Xi.workspace.getConfiguration("js/ts").update("tsserver.checkNpmIsInstalled",!1,!0)}}};var Fd=U(require("vscode"));_i();yt();var gS=class extends _e{constructor(t){super();this._client=t;this._statusItem=this._register(Fd.languages.createLanguageStatusItem("typescript.version",Uh)),this._statusItem.name=Fd.l10n.t("TypeScript Version"),this._statusItem.detail=Fd.l10n.t("TypeScript version"),this._register(this._client.onTsServerStarted(({version:n})=>this.onDidChangeTypeScriptVersion(n)))}_client;_statusItem;onDidChangeTypeScriptVersion(t){this._statusItem.text=t.displayName,this._statusItem.command={command:hd.id,title:Fd.l10n.t("Select Version"),tooltip:t.path}}};Ti();yt();var PK=new Set([...Yy,...IO,...NO,...Vy,...RO,...wO,...AO]),dv=class extends _e{client;languages=[];languagePerId=new Map;typingsStatus;fileConfigurationManager;reportStyleCheckAsWarnings=!0;commandManager;constructor(e,t,n,i,o){super(),this.commandManager=i.commandManager;let s=this.getAllModeIds(e,i.pluginManager);this.client=this._register(new lv(t,n,i,s)),this.client.onDiagnosticsReceived(({kind:a,resource:c,diagnostics:l,spans:u})=>{this.diagnosticsReceived(a,c,l,u)},null,this._disposables),this.client.onConfigDiagnosticsReceived(a=>this.configFileDiagnosticsReceived(a),null,this._disposables),this.client.onResendModelsRequested(()=>this.populateService(),null,this._disposables),this._register(new gS(this.client)),this._register(new vS(this.client,i.commandManager,i.activeJsTsEditorTracker)),this._register(new mS(this.client)),this.typingsStatus=this._register(new uv(this.client)),this._register(sL(this.client)),this.fileConfigurationManager=this._register(new qp(this.client,n));for(let a of e){let c=new kd(this.client,a,this.commandManager,this.client.telemetryReporter,this.typingsStatus,this.fileConfigurationManager,o);this.languages.push(c),this._register(c),this.languagePerId.set(a.id,c)}Promise.resolve().then(()=>(lL(),cL)).then(a=>this._register(a.register(this.client,this.fileConfigurationManager,c=>this.handles(c)))),Promise.resolve().then(()=>(dL(),uL)).then(a=>this._register(a.register(this.client,s))),this.client.ensureServiceStarted(),this.client.onReady(()=>{let a=new Set;for(let c of i.pluginManager.plugins)if(c.configNamespace&&c.languages.length)this.registerExtensionLanguageProvider({id:c.configNamespace,languageIds:Array.from(c.languages),diagnosticSource:"ts-plugin",diagnosticLanguage:1,diagnosticOwner:"typescript",isExternal:!0,standardFileExtensions:[]},o);else for(let l of c.languages)a.add(l);a.size&&this.registerExtensionLanguageProvider({id:"typescript-plugins",languageIds:Array.from(a.values()),diagnosticSource:"ts-plugin",diagnosticLanguage:1,diagnosticOwner:"typescript",isExternal:!0,standardFileExtensions:[]},o)}),this.client.onTsServerStarted(()=>{this.triggerAllDiagnostics()}),mr.workspace.onDidChangeConfiguration(this.configurationChanged,this,this._disposables),this.configurationChanged(),this._register(new oS(t))}registerExtensionLanguageProvider(e,t){let n=new kd(this.client,e,this.commandManager,this.client.telemetryReporter,this.typingsStatus,this.fileConfigurationManager,t);this.languages.push(n),this._register(n),this.languagePerId.set(e.id,n)}getAllModeIds(e,t){return[...e.map(n=>n.languageIds),...t.plugins.map(n=>n.languages)].flat()}get serviceClient(){return this.client}reloadProjects(){this.client.executeWithoutWaitingForResponse("reloadProjects",null),this.triggerAllDiagnostics()}async handles(e){return await this.findLanguage(e)?!0:this.client.bufferSyncSupport.handles(e)}configurationChanged(){this.reportStyleCheckAsWarnings=q("reportStyleChecksAsWarnings",!0,{scope:null,fallbackSection:"typescript"})}async findLanguage(e){try{for(let n of this.languages)if(n.handlesUri(e))return n;let t=await mr.workspace.openTextDocument(e);return this.languages.find(n=>n.handlesDocument(t))}catch{return}}triggerAllDiagnostics(){for(let e of this.languagePerId.values())e.triggerAllDiagnostics()}populateService(){this.fileConfigurationManager.reset();for(let e of this.languagePerId.values())e.reInitialize()}async diagnosticsReceived(e,t,n,i){let o=await this.findLanguage(t);o&&o.diagnosticsReceived(e,t,this.createMarkerDatas(n,o.diagnosticSource),i?.map(s=>Se.fromTextSpan(s)))}configFileDiagnosticsReceived(e){let t=e.body;!t?.diagnostics||!t.configFile||this.findLanguage(this.client.toResource(t.configFile)).then(n=>{n?.configFileDiagnosticsReceived(this.client.toResource(t.configFile),t.diagnostics.map(i=>{let o=i.start&&i.end?Se.fromTextSpan(i):new mr.Range(0,0,0,1),s=new mr.Diagnostic(o,i.text,this.getDiagnosticSeverity(i));return s.source=n.diagnosticSource,s}))})}createMarkerDatas(e,t){return e.map(n=>this.tsDiagnosticToVsDiagnostic(n,t))}tsDiagnosticToVsDiagnostic(e,t){let{start:n,end:i,text:o}=e,s=new mr.Range(ye.fromLocation(n),ye.fromLocation(i)),a=new mr.Diagnostic(s,o,this.getDiagnosticSeverity(e));a.source=e.source||t,e.code&&(a.code=e.code);let c=e.relatedInformation;c&&(a.relatedInformation=Pr(c.map(d=>{let f=d.span;if(f)return new mr.DiagnosticRelatedInformation(xr.fromTextSpan(this.client.toResource(f.file),f),d.message)})));let l=[];e.reportsUnnecessary&&l.push(mr.DiagnosticTag.Unnecessary),e.reportsDeprecated&&l.push(mr.DiagnosticTag.Deprecated),a.tags=l.length?l:void 0;let u=a;return u.reportUnnecessary=e.reportsUnnecessary,u.reportDeprecated=e.reportsDeprecated,u}getDiagnosticSeverity(e){if(this.reportStyleCheckAsWarnings&&this.isStyleCheckDiagnostic(e.code)&&e.category===kl.error)return mr.DiagnosticSeverity.Warning;switch(e.category){case kl.error:return mr.DiagnosticSeverity.Error;case kl.warning:return mr.DiagnosticSeverity.Warning;case kl.suggestion:return mr.DiagnosticSeverity.Hint;default:return mr.DiagnosticSeverity.Error}}isStyleCheckDiagnostic(e){return typeof e=="number"&&PK.has(e)}};var fL=U(require("vscode"));Wi();Xa();_i();yt();var fv=class r extends _e{static contextName="typescript.isManagedFile";isInManagedFileContext=!1;constructor(e){super(),e.onDidChangeActiveJsTsEditor(this.onDidChangeActiveTextEditor,this,this._disposables),this.onDidChangeActiveTextEditor(e.activeJsTsEditor)}dispose(){this.updateContext(!1),super.dispose()}onDidChangeActiveTextEditor(e){e?this.updateContext(this.isManagedFile(e)):this.updateContext(!1)}updateContext(e){e!==this.isInManagedFileContext&&(fL.commands.executeCommand("setContext",r.contextName,e),this.isInManagedFileContext=e)}isManagedFile(e){return this.isManagedScriptFile(e)||this.isManagedConfigFile(e)}isManagedScriptFile(e){return Lo(e.document)&&!wl.has(e.document.uri.scheme)}isManagedConfigFile(e){return Td(e.document.fileName)}};Wi();Xa();nc();function pL(r,e,t,n){return new Jr(()=>new dv(_C,r,e,t,n))}function vL(r,e,t,n=()=>Promise.resolve()){let i=[],o=[..._C.map(l=>l.languageIds),...e.plugins.map(l=>l.languages)].flat(),s=!1,a=l=>!s&&xK(o,l)?(s=!0,n().then(()=>{r.value,i.push(new fv(t))}),!0):!1;if(!pv.workspace.textDocuments.some(a)){let l=pv.workspace.onDidOpenTextDocument(u=>{a(u)&&l.dispose()},void 0,i)}return new pv.Disposable(()=>{i.forEach(l=>l.dispose())})}function xK(r,e){return(r.indexOf(e.languageId)>=0||Td(e.fileName))&&!wl.has(e.uri.scheme)}var mL=U(require("vscode"));nc();var hS=class{output=new Jr(()=>mL.window.createOutputChannel("TypeScript",{log:!0}));get logLevel(){return this.output.value.logLevel}info(e,...t){this.output.value.info(e,...t)}trace(e,...t){this.output.value.trace(e,...t)}error(e,t){t&&t.message==="No content available."||this.output.value.error(e,...t?[t]:[])}};var SL=U(require("fs"));var gL=U(require("fs")),hL=U(require("os")),yS=U(require("path"));nc();function yL(r){let e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t="";for(let n=0;n<r;n++){let i=Math.floor(e.length*Math.random());t+=e[i]}return t}var DK=new Jr(()=>{let r=`vscode-typescript${process.platform!=="win32"&&process.getuid?process.getuid():""}`;return yS.join(hL.tmpdir(),r)}),FP=new Jr(()=>{let r=yS.join(DK.value,yL(20));return gL.mkdirSync(r,{recursive:!0}),r});function SS(r){return yS.join(FP.value,`${r}-${yL(20)}.tmp`)}var MP=class{constructor(e,t){this._serverId=e;this._tracer=t;this.cancellationPipeName=SS("tscancellation")}_serverId;_tracer;cancellationPipeName;tryCancelOngoingRequest(e){if(!this.cancellationPipeName)return!1;this._tracer.trace(this._serverId,`TypeScript Server: trying to cancel ongoing request with sequence number ${e}`);try{SL.writeFileSync(this.cancellationPipeName+e,"")}catch{}return!0}},_L=new class{create(r,e){return new MP(r,e)}};var Ud=U(require("fs")),TL=U(require("path")),bL=U(require("vscode"));nc();var _S=class{constructor(e){this.context=e}context;getNewLogDirectory(){let e=this.logDirectory.value;if(e)try{return bL.Uri.file(Ud.mkdtempSync(TL.join(e,"tsserver-log-")))}catch{return}}logDirectory=new Jr(()=>{try{let e=this.context.logPath;return Ud.existsSync(e)||Ud.mkdirSync(e),this.context.logPath}catch{return}})};var Yd=U(require("vscode"));Ti();yt();var EL;(e=>{function r(t,n){return t.uri.toString()===n.uri.toString()&&t.name===n.name&&t.enableForWorkspaceTypeScriptVersions===n.enableForWorkspaceTypeScriptVersions&&ks(t.languages,n.languages)}e.equals=r})(EL||={});var TS=class extends _e{_pluginConfigurations=new Map;_plugins;constructor(){super(),Yd.extensions.onDidChange(()=>{if(!this._plugins)return;let e=this.readPlugins();ks(Array.from(this._plugins.values()).flat(),Array.from(e.values()).flat(),EL.equals)||(this._plugins=e,this._onDidUpdatePlugins.fire(this))},void 0,this._disposables)}get plugins(){return this._plugins??=this.readPlugins(),Array.from(this._plugins.values()).flat()}_onDidUpdatePlugins=this._register(new Yd.EventEmitter);onDidChangePlugins=this._onDidUpdatePlugins.event;_onDidUpdateConfig=this._register(new Yd.EventEmitter);onDidUpdateConfig=this._onDidUpdateConfig.event;setConfiguration(e,t){this._pluginConfigurations.set(e,t),this._onDidUpdateConfig.fire({pluginId:e,config:t})}configurations(){return this._pluginConfigurations.entries()}readPlugins(){let e=new Map;for(let t of Yd.extensions.all){let n=t.packageJSON;if(n.contributes&&Array.isArray(n.contributes.typescriptServerPlugins)){let i=[];for(let o of n.contributes.typescriptServerPlugins)i.push({extension:t,name:o.name,enableForWorkspaceTypeScriptVersions:!!o.enableForWorkspaceTypeScriptVersions,uri:t.extensionUri,languages:Array.isArray(o.languages)?o.languages:[],configNamespace:o.configNamespace});i.length&&e.set(t.id,i)}}return e}};var PS=U(require("child_process")),PL=U(require("fs")),xL=U(require("path")),Go=U(require("vscode"));yt();Qt();Bp();var UP=8192,NK="Content-Length: ",CL=Buffer.byteLength(NK,"utf8"),RK=Buffer.from(" ","utf8")[0],bS=Buffer.from("\r","utf8")[0],ES=Buffer.from(`
`,"utf8")[0],DL=5e3,IL={seq:0,type:"request",command:"exit"},YP=class{index=0;buffer=Buffer.allocUnsafe(UP);append(e){let t=null;if(Buffer.isBuffer(e)?t=e:t=Buffer.from(e,"utf8"),this.buffer.length-this.index>=t.length)t.copy(this.buffer,this.index,0,t.length);else{let n=(Math.ceil((this.index+t.length)/UP)+1)*UP;this.index===0?(this.buffer=Buffer.allocUnsafe(n),t.copy(this.buffer,0,0,t.length)):this.buffer=Buffer.concat([this.buffer.slice(0,this.index),t],n)}this.index+=t.length}tryReadContentLength(){let e=-1,t=0;for(;t<this.index&&(this.buffer[t]===RK||this.buffer[t]===bS||this.buffer[t]===ES);)t++;if(this.index<t+CL)return e;t+=CL;let n=t;for(;t<this.index&&this.buffer[t]!==bS;)t++;if(t+3>=this.index||this.buffer[t+1]!==ES||this.buffer[t+2]!==bS||this.buffer[t+3]!==ES)return e;let i=this.buffer.toString("utf8",n,t);return e=parseInt(i),this.buffer=this.buffer.slice(t+4),this.index=this.index-(t+4),e}tryReadContent(e){if(this.index<e)return null;let t=this.buffer.toString("utf8",0,e),n=e;for(;n<this.index&&(this.buffer[n]===bS||this.buffer[n]===ES);)n++;return this.buffer.copy(this.buffer,0,n),this.index=this.index-n,t}},VP=class extends _e{buffer=new YP;nextMessageLength=-1;constructor(e){super(),e.on("data",t=>this.onLengthData(t))}_onError=this._register(new Go.EventEmitter);onError=this._onError.event;_onData=this._register(new Go.EventEmitter);onData=this._onData.event;onLengthData(e){if(!this.isDisposed)try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1&&(this.nextMessageLength=this.buffer.tryReadContentLength(),this.nextMessageLength===-1))return;let t=this.buffer.tryReadContent(this.nextMessageLength);if(t===null)return;this.nextMessageLength=-1;let n=JSON.parse(t);this._onData.fire(n)}}catch(t){this._onError.fire(t)}}};function wK(r,e,t){let n=Object.assign({},r);return t||(n.ELECTRON_RUN_AS_NODE="1"),n.NODE_PATH=xL.join(e,"..","..",".."),n.PATH=n.PATH||process.env.PATH,n}function AK(r,e){let t=[],n=OK(r);if(n){let i=NL()?"--inspect-brk":"--inspect";t.push(`${i}=${n}`)}return e.maxTsServerMemory&&t.push(`--max-old-space-size=${e.maxTsServerMemory}`),e.diagnosticDir&&t.push(`--diagnostic-dir=${e.diagnosticDir}`),e.heapSnapshot>0&&t.push(`--heapsnapshot-near-heap-limit=${e.heapSnapshot}`),e.heapProfile.enabled&&(t.push("--heap-prof"),e.heapProfile.dir&&t.push(`--heap-prof-dir=${e.heapProfile.dir}`),e.heapProfile.interval&&t.push(`--heap-prof-interval=${e.heapProfile.interval}`)),t}function OK(r){if(r==="syntax")return;let e=NL()||kK();if(e){let t=parseInt(e);if(!isNaN(t))return t}}function kK(){return process.env[Go.env.remoteName?"TSS_REMOTE_DEBUG":"TSS_DEBUG"]}function NL(){return process.env[Go.env.remoteName?"TSS_REMOTE_DEBUG_BRK":"TSS_DEBUG_BRK"]}var jP=class extends _e{constructor(t,n){super();this._process=t;this._useGracefulShutdown=n;this._process.once("exit",()=>this.clearKillTimeout())}_process;_useGracefulShutdown;_killTimeout;_isShuttingDown=!1;write(t){this._process.send(t)}onData(t){this._process.on("message",t)}onExit(t){this._process.on("exit",t)}onError(t){this._process.on("error",t)}kill(){if(!this._useGracefulShutdown){this._process.kill();return}if(!this._isShuttingDown){this._isShuttingDown=!0;try{this._process.send(IL)}catch{this._process.kill();return}this._killTimeout=setTimeout(()=>this._process.kill(),DL),this._killTimeout.unref?.()}}clearKillTimeout(){this._killTimeout&&(clearTimeout(this._killTimeout),this._killTimeout=void 0)}},qP=class extends _e{constructor(t,n){super();this._process=t;this._useGracefulShutdown=n;this._reader=this._register(new VP(this._process.stdout)),this._process.once("exit",()=>this.clearKillTimeout())}_process;_useGracefulShutdown;_reader;_killTimeout;_isShuttingDown=!1;write(t){this._process.stdin.write(JSON.stringify(t)+`\r
`,"utf8")}onData(t){this._reader.onData(t)}onExit(t){this._process.on("exit",t)}onError(t){this._process.on("error",t),this._reader.onError(t)}kill(){if(!this._useGracefulShutdown){this._process.kill(),this._reader.dispose();return}if(!this._isShuttingDown){this._isShuttingDown=!0;try{this._process.stdin?.write(JSON.stringify(IL)+`\r
`,"utf8"),this._process.stdin?.end()}catch{this._process.kill(),this._reader.dispose();return}this._killTimeout=setTimeout(()=>{this._process.kill(),this._reader.dispose()},DL),this._killTimeout.unref?.()}}clearKillTimeout(){this._killTimeout&&(clearTimeout(this._killTimeout),this._killTimeout=void 0),this._reader.dispose()}},CS=class{fork(e,t,n,i,o,s,a){let c=e.tsServerPath;PL.existsSync(c)||(Go.window.showWarningMessage(Go.l10n.t("The path {0} doesn't point to a valid tsserver install. Falling back to bundled TypeScript version.",c)),o.reset(),c=o.currentVersion.tsServerPath);let l=s.currentVersion,u=wK(process.env,c,!!l),d=[...t],f=AK(n,i),v=i.heapProfile.enabled,m=!l&&e.apiVersion?.gte(ve.v460);m&&d.push("--useNodeIpc");let S=l?PS.spawn(l,[...f,c,...d],{windowsHide:!0,cwd:void 0,env:u}):PS.fork(c,d,{silent:!0,cwd:void 0,env:u,execArgv:f,stdio:m?["pipe","pipe","pipe","ipc"]:void 0});return m?new jP(S,v):new qP(S,v)}};var Vd=U(require("fs")),an=U(require("path")),Qi=U(require("vscode"));Qt();var RL=U(require("vscode"));var jl=class{constructor(e,t,n,i){this.source=e;this.path=t;this.apiVersion=n;this._pathLabel=i}source;path;apiVersion;_pathLabel;get tsServerPath(){return this.path}get pathLabel(){return this._pathLabel??this.path}get isValid(){return this.apiVersion!==void 0}eq(e){return this.path!==e.path?!1:this.apiVersion===e.apiVersion?!0:!this.apiVersion||!e.apiVersion?!1:this.apiVersion.eq(e.apiVersion)}get displayName(){let e=this.apiVersion;return e?e.displayName:RL.l10n.t("Could not load the TypeScript version at this path")}};var xS=class r{constructor(e){this.configuration=e}configuration;updateConfiguration(e){this.configuration=e}get defaultVersion(){return this.globalVersion||this.bundledVersion}get globalVersion(){if(this.configuration?.globalTsdk){let e=this.loadVersionsFromSetting("user-setting",this.configuration.globalTsdk);if(e?.length)return e[0]}return this.contributedTsNextVersion}get localVersion(){let e=this.localTsdkVersions;if(e?.length)return e[0];let t=this.localNodeModulesVersions;if(t?.length===1)return t[0]}get localVersions(){let e=this.localTsdkVersions.concat(this.localNodeModulesVersions),t=new Set;return e.filter(n=>t.has(n.path)?!1:(t.add(n.path),!0))}get bundledVersion(){let e=this.getContributedVersion("bundled","vscode.typescript-language-features",["..","node_modules"]);if(e)return e;throw Qi.window.showErrorMessage(Qi.l10n.t("VS Code's tsserver was deleted by another application such as a misbehaving virus detection tool. Please reinstall VS Code.")),new Error("Could not find bundled tsserver.js")}get contributedTsNextVersion(){return this.getContributedVersion("ts-nightly-extension","ms-vscode.vscode-typescript-next",["node_modules"])}getContributedVersion(e,t,n){try{let i=Qi.extensions.getExtension(t);if(i){let o=an.join(i.extensionPath,...n,"typescript","lib","tsserver.js"),s=new jl(e,o,r.getApiVersion(o),"");if(s.isValid)return s}}catch{}}get localTsdkVersions(){let e=this.configuration?.localTsdk;return e?this.loadVersionsFromSetting("workspace-setting",e):[]}loadVersionsFromSetting(e,t){if(an.isAbsolute(t)){let i=an.join(t,"tsserver.js");return[new jl(e,i,r.getApiVersion(i),t)]}let n=Ba.asAbsoluteWorkspacePath(t);if(n!==void 0){let i=an.join(n,"tsserver.js");return[new jl(e,i,r.getApiVersion(i),t)]}return this.loadTypeScriptVersionsFromPath(e,t)}get localNodeModulesVersions(){return this.loadTypeScriptVersionsFromPath("node-modules",an.join("node_modules","typescript","lib")).filter(e=>e.isValid)}loadTypeScriptVersionsFromPath(e,t){if(!Qi.workspace.workspaceFolders)return[];let n=[];for(let i of Qi.workspace.workspaceFolders){let o=t;Qi.workspace.workspaceFolders.length>1&&(o=an.join(i.name,t));let s=an.join(i.uri.fsPath,t,"tsserver.js");n.push(new jl(e,s,r.getApiVersion(s),o))}return n}static getApiVersion(e){let t=r.getTypeScriptVersion(e);if(t)return t;let n=Qi.workspace.getConfiguration().get("typescript.tsdk_version",void 0);if(n)return ve.fromVersionString(n)}static getTypeScriptVersion(e){if(!Vd.existsSync(e))return;let t=e.split(an.sep);if(t.length<=2)return;let i=t.slice(0,-2).join(an.sep),o=an.join(i,"package.json");if(Vd.existsSync(o)||an.basename(i)==="built"&&(o=an.join(i,"..","package.json")),!Vd.existsSync(o))return;let s=Vd.readFileSync(o).toString(),a;try{a=JSON.parse(s)}catch{return}if(a?.version)return a.version?ve.fromVersionString(a.version):void 0}};var kr=U(require("vscode"));Xa();_i();yt();Ti();var DS=class extends _e{_activeJsTsEditor;_onDidChangeActiveJsTsEditor=this._register(new kr.EventEmitter);onDidChangeActiveJsTsEditor=this._onDidChangeActiveJsTsEditor.event;constructor(){super(),this._register(kr.window.onDidChangeActiveTextEditor(e=>this.update())),this._register(kr.window.onDidChangeVisibleTextEditors(e=>this.update())),this._register(kr.window.tabGroups.onDidChangeTabGroups(e=>this.update())),this.update()}get activeJsTsEditor(){return this._activeJsTsEditor}update(){let n=this.getEditorCandidatesForActiveTab().filter(i=>this.isManagedFile(i)).at(0);this._activeJsTsEditor!==n&&(this._activeJsTsEditor=n,this._onDidChangeActiveJsTsEditor.fire(this._activeJsTsEditor))}getEditorCandidatesForActiveTab(){let e=kr.window.tabGroups.activeTabGroup.activeTab;if(!e)return[];if(e.input instanceof kr.TabInputText){let t=e.input.uri,n=kr.window.visibleTextEditors.find(i=>i.document.uri.toString()===t.toString()&&i.viewColumn===e.group.viewColumn);return n?[n]:[]}if(e.input instanceof kr.TabInputTextDiff){let t=e.input.original,n=e.input.modified;return Pr([kr.window.activeTextEditor,...kr.window.visibleTextEditors]).filter(i=>(i.document.uri.toString()===t.toString()||i.document.uri.toString()===n.toString())&&i.viewColumn===void 0)}if(e.input instanceof kr.TabInputNotebook){let t=kr.window.activeTextEditor;return t?t.viewColumn!==void 0?[]:kr.window.visibleNotebookEditors.find(i=>i.notebook.uri.toString()===e.input.uri.toString()&&i.viewColumn===e.group.viewColumn)?.notebook.getCells().some(i=>i.document.uri.toString()===t.document.uri.toString())?[t]:[]:[]}return[]}isManagedFile(e){return this.isManagedScriptFile(e)||this.isManagedConfigFile(e)}isManagedScriptFile(e){return Lo(e.document)}isManagedConfigFile(e){return Td(e.document.fileName)}};var cn=U(require("vscode"));var HP="typescript.suggestNativePreview.dismissed";async function wL(r,e){if(r.globalState.get(HP)||!cn.window.state.active||!cn.extensions.getExtension("ms-vscode.vscode-typescript-next"))return;if(Dp()){await r.globalState.update(HP,!0);return}if(!await e.getTreatmentVariable("suggestNativePreview",!1))return;let n={title:cn.l10n.t("Install")},i={title:cn.l10n.t("Learn More")},o={title:cn.l10n.t("Don't Show Again")},s=await cn.window.showInformationMessage(cn.l10n.t("Try TypeScript 7 Native Preview for significantly faster type checking and language features."),{},n,i,o);await r.globalState.update(HP,!0),s===n?await cn.commands.executeCommand("workbench.extensions.installExtension",xE):s===i&&await cn.env.openExternal(cn.Uri.parse("https://aka.ms/vscode-try-ts-7-learn-more"))}var IS=U(require("fs"));var AL=(()=>{let r;return()=>{if(typeof r>"u")if(process.platform==="win32")r=!0;else if(process.platform!=="darwin")r=!1;else{let e=SS("typescript-case-check");IS.writeFileSync(e,""),r=IS.existsSync(e.toUpperCase())}return r}})();nc();function OL(r){let e=r.extension.packageJSON;return e&&typeof e=="object"?{name:e.name??"",version:e.version??"",aiKey:e.aiKey??""}:null}kt();yt();function BK(r){let e=new TS;r.subscriptions.push(e);let t=new eF.EventEmitter;r.subscriptions.push(t);let n=new _S(r),i=new xS,o,s=OL(r);if(s){let{name:a,version:c,aiKey:l}=s,u=new QL.default(l);o=new Wh(u),r.subscriptions.push(o);let d=new oy(o,a,c,r.globalState);wL(r,d)}return Promise.resolve().then(()=>(GL(),BL)).then(a=>{r.subscriptions.push(a.register())}),r.subscriptions.push(ke([Dd("experimental.useTsgo",{fallbackSection:"typescript"}),B0(DE)],()=>{let a=new _l;return a.add(new xp).register(new ld),a},()=>{let a=new _l,c=a.add(new xp),l=a.add(new DS),u=pL(r,AL(),{pluginManager:e,commandManager:c,logDirectoryProvider:n,cancellerFactory:_L,versionProvider:i,processFactory:new CS,activeJsTsEditorTracker:l,serviceConfigurationProvider:new Bh,experimentTelemetryReporter:o,logger:new hS},d=>{t.fire(d)}).map(d=>a.add(d));return v0(c,u,e,l),Promise.resolve().then(()=>(XL(),JL)).then(d=>{a.add(d.register(new Jr(()=>u.value.serviceClient)))}),a.add(vL(u,e,l)),a})),uw(t.event,e)}function GK(){ZL.rmSync(FP.value,{recursive:!0,force:!0})}0&&(module.exports={activate,deactivate});
/*! Bundled license information:

@nevware21/ts-utils/dist/es5/mod/ts-utils.js:
  (*! https://github.com/nevware21/ts-utils v0.14.0 *)

@nevware21/ts-async/dist/es5/mod/ts-async.js:
  (*!
   * NevWare21 Solutions LLC - ts-async, 0.5.4
   * https://github.com/nevware21/ts-async
   * Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
   * Licensed under the MIT license.
   *)
*/
//# sourceMappingURL=extension.js.map