UNPKG

code-server

Version:

Run VS Code on a remote server.

67 lines • 485 kB
"use strict";var nF=Object.create;var Tv=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)Tv(r,t,{get:e[t],enumerable:!0})},nx=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of oF(e))!aF.call(r,i)&&i!==t&&Tv(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)):{},nx(e||!r||!r.__esModule?Tv(t,"default",{value:r,enumerable:!0}):t,r)),Hd=r=>nx(Tv({},"__esModule",{value:!0}),r);var Bl,$o,eo,Pi,Gl,Kd,US=E(()=>{Bl="function",$o="object",eo="undefined",Pi="prototype",Gl=Object,Kd=Gl[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 Nv(r){return function(e){return typeof e===r}}function vx(r){var e="[object "+r+"]";return function(t){return!!(t&&Rv(t)===e)}}function Rv(r){return Jd[$d].call(r)}function r_(r,e){return typeof r===e}function Fe(r){return typeof r===pc||r===pc}function bF(r){return r===Mr}function z(r){return r===Ut||Fe(r)}function xi(r){return r===Ut||r===Mr}function mx(r){return!!r||r!==Mr}function EF(r){return!YS&&(YS=["string","number","boolean",pc,"symbol","bigint"]),r!==zd&&YS.indexOf(r)!==-1}function Yt(r){return!r&&z(r)?!1:!!r&&typeof r===zd}function ln(r){return!!(r&&r.then&&Ee(r.then))}function n_(r){return!r||!Di(r)}function Di(r){return!(!r||TF(function(){return!(r&&0+r)},!r))}function i_(){}function CF(){return[]}function PF(){return!1}function fe(r,e){var t=ZS,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,Ut,e?typeof e=="number"?e:4:Mr),t=(t?t.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):Ut)||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 Av(r){xi(r)&&Zr("Cannot convert undefined or null to object")}function gx(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 Av(r),hr(r,e)||!!DF(r,e)}function NF(r){return r===Gd||r===Wd||r===Ur}function me(r,e,t){if(r&&(Yt(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[mc]>>>0,i=0;i<n&&!(i in r&&e[tr](xi(t)?r:t,r[i],i,r)===-1);i++);}function $l(r,e,t){var n=e?e[r]:Ut;return function(i){var o=(i?i[r]:Ut)||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]:Ut;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||Ut),!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 hx(r){var e={};if(e[bv.c]=!0,e[bv.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[bv[n]]=bF(i)?e[bv[n]]:i}),e}function s_(r,e,t,n,i,o){var s={e:o,c:i};return t&&(s.g=t),n&&(s.s=n),yn(r,e,hx(s))}function Qe(r,e,t){return yn(r,e,hx(t))}function yx(r,e,t,n,i){var o={};return me(r,function(s,a){xv(o,s,e?a:s),xv(o,a,t?a:s)}),n?n(o):o}function xv(r,e,t,n){yn(r,e,{value:t,enumerable:!0,writable:!1})}function _x(r){return r}function FF(r){return Av(r),r[Gd]||Ut}function Tx(r,e){if((de(r)||Yt(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){Tx(i,e)}),oi(r)}return r}function no(r){return Sx?Tx(r,[]):r}function bx(r){return yx(r,1,0,oi)}function MF(r){return yx(r,0,0,oi)}function UF(r){var e={};return me(r,function(t,n){xv(e,t,n[1]),xv(e,n[0],n[1])}),oi(e)}function Ex(r){return UF(r)}function Px(){var r;return typeof globalThis!==pc&&(r=globalThis),!r&&typeof self!==pc&&(r=self),!r&&typeof window!==pc&&(r=window),!r&&typeof global!==pc&&(r=global),r}function Ov(){if(!VS){var r=Ae(Px).v||{};VS=r[sx]=r[sx]||{}}return VS}function VF(r,e,t){return Av(r),t<0?ZS:(e=e||0,e<0&&(e=YF(e+r[mc],0)),Fe(t)?ax(r,e):ax(r,e,e+t))}function yc(r,e){return yr(r,0,e)}function jF(r,e){return r&&(Ae(function(){r[ix]=!0,r[ox]=e}),Ae(Qe,[r,ix,{v:!0,w:!1,e:!1}]),Ae(Qe,[r,ox,{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!==Iv&&Zr("Prototype must be an Object or function: "+fe(r)),n[Ur]=r,Ae(function(){n[Gd]=r}),t=new n}return e&&Ae(o_,[t,e]),t}function Vt(){return(Date.now||HF)()}function HF(){return new Date().getTime()}function vc(r,e,t){return r.apply(e,t)}function Gs(){ar=Ov()}function c_(r,e){var t={};return!ar&&Gs(),t.b=ar.lzy,yn(t,"v",{configurable:!0,get:function(){var n=vc(r,null,e);return ar.lzy||yn(t,"v",{value:n}),t.b=ar.lzy,n}}),t}function zF(){if(!jS){var r=Ov();jS=r.gblSym=r.gblSym||{k:{},s:{}}}return jS}function l_(r){var e="_"+WF+++"_"+BF.v,t=e_+"("+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=l_(r),n=Vr(e.s).length;t[cx]=function(){return n+"_"+t[$d]()},e.k[r]=t,e.s[t[cx]()]=er(r)}return e.k[r]}function JF(r){!Ev&&(Ev={});var e,t=Cx[r];return t&&(e=Ev[t]=Ev[t]||l_(e_+"."+t)),e}function Sn(r){return yn({toJSON:function(){return r}},"v",{value:r})}function Xd(r,e){var t;return function(){return!ar&&Gs(),(!t||ar.lzy)&&(t=Sn(Ae(r,e).v)),t.v}}function un(r){return!ar&&Gs(),(!Bd||r===!1||ar.lzy)&&(Bd=Sn(Ae(Px).v||Ut)),Bd.v}function Pe(r,e){var t;if(!Bd||e===!1?t=un(e):t=Bd.v,t&&t[r])return t[r];if(r===xx)try{return window}catch{}return Ut}function Sc(){return!!zt()}function Xl(){return!!cr()}function Qd(){return!!Sr()}function u_(){return!!kv()}function Lv(){return Wl=Sn(Ae(Pe,[e_]).v),Wl}function XF(r){var e=(ar.lzy?0:Wl)||Lv();return e.v?e.v[r]:Mr}function Ix(){return!!QF()}function QF(){return!ar&&Gs(),((ar.lzy?0:Wl)||Lv()).v}function Zd(r,e){var t=Cx[r];!ar&&Gs();var n=(ar.lzy?0:Wl)||Lv();return n.v?n.v[t||r]:e?Mr:JF(r)}function Ql(r,e){!ar&&Gs();var t=(ar.lzy?0:Wl)||Lv();return t.v?t.v(r):e?Ut:l_(r)}function Fv(r){return!ar&&Gs(),qS=(ar.lzy?0:qS)||Sn(Ae(XF,["for"]).v),(qS.v||$F)(r)}function Dv(r){return!!r&&Ee(r.next)}function d_(r){return!xi(r)&&Ee(r[Zd(3)])}function Mv(r,e,t){if(r&&(Dv(r)||(!Cv&&(Cv=Sn(Zd(3))),r=r[Cv.v]?r[Cv.v]():Ut),Dv(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=Ut,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)?vc(r.push,r,e):Dv(e)||d_(e)?Mv(e,function(t){r.push(t)}):r.push(e)),r}function Zl(r,e,t){return((r?r.slice:Ut)||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!HS&&(HS=Sn((t={},t[Gd]=[],t instanceof Array))),HS.v?r[Gd]=e:me(e,function(n,i){return r[n]=i}),r}function tM(r,e,t){Ae(Qe,[e,Pv,{v:r,c:!0,e:!1}]),e=Nx(e,t);function n(){this[Wd]=e,Ae(Qe,[this,Pv,{v:r,c:!0,e:!1}])}return e[Ur]=t===Ut?Ii(t):(n[Ur]=t[Ur],new n),e}function lx(r,e){e&&(r[Pv]=e)}function p_(r,e,t,n){var i=t||Error,o=i[Ur][Pv],s=Error.captureStackTrace;return tM(r,function(){var a=this,c=arguments;try{Ae(lx,[i,r]);var l=vc(i,a,n?n(c):to[tr](c))||a;if(l!==a){var u=QS(a);u!==QS(l)&&Nx(l,u)}return s&&s(l,a[Wd]),e&&e(l,c),l}finally{Ae(lx,[i,o])}},i)}function nM(r){return function(t){return Av(t),t=er(t),t&&(t=rM(t,r,ZS)),t}}function sM(r,e,t){if(r!==Ut&&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;GS||(GS=Xl()?cr():!0);var e=!1;if(r!==GS){BS||(KS=Function[Ur][$d],BS=KS[tr](Ir));try{var t=QS(r);e=!t,e||(hr(t,Wd)&&(t=t[Wd]),e=!!(t&&typeof t===Iv&&KS[tr](t)===BS))}catch{}}return e}function cM(r,e){e&&r.push(e)}function Bt(r,e){e&&e[Ur]}function lM(){var r=[Jd,Jo,zl,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 WS||(WS=Sn(lM())),Ze(WS.v,r)>=0}function dM(r){return r.value&&Ax(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 v_(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===Ut;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 v_(r,d,f?s:t,f)},copyTo:function(d,f){return wx(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<ux.length?ux[f++]:dM))[tr](t,u);)v=Ut})}function wx(r,e,t,n){return uM(t)||aM(t,function(i,o){e[i]=v_(r,o,n,i)}),e}function pM(r,e,t){var n={handler:t,src:e,path:[]};return wx([],r,e,n)}function vM(r,e){var t={handler:e,src:r};return v_([],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 wv(e)?(r.result=new Date(e.getTime()),!0):!1}function hM(r){return r.type===Iv}function Ax(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 m_(r,e,t,n,i,o,s){return yM(vM(r)||{},to[tr](arguments))}function Ws(){return!ar&&Gs(),(!zS||ar.lzy)&&(zS=Sn(Ae(Pe,["performance"]).v)),zS.v}function tf(){var r=Ws();return r&&r.now?r.now():Vt()}function SM(r,e,t){gx(r);var n=Oe(e)?e:er(e),i=!Fe(t)&&t<r[mc]?t:r[mc];return yr(r,i-n[mc],i)===n}function _M(r,e,t){gx(r);var n=Oe(e)?e:er(e),i=t>0?t:0;return yr(r,i,i+n[mc])===n}function bM(r,e,t){var n=!0,i=r?e(Ut):Ut,o;function s(){return n=!1,i&&i[JS]&&i[JS](),o}function a(){i&&t(i),i=Ut}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[XS]=function(){return i&&i[XS]?i[XS]():n},o[$S]=function(){return n=!0,i&&i[$S]&&i[$S](),o},o[JS]=s,o=yn(o,TM,{get:function(){return!!i},set:l}),{h:o,dn:function(){i=Ut}}}function PM(r){var e=Ee(r)?r:EM;if(!e){var t=Ov().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=Ov().tmOut||[];de(t)&&t.length>1&&Ee(t[1])&&(e=t[1])}return e||clearTimeout}function g_(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(),vc(a,Mr,to[tr](arguments))};var c=bM(r,function(l){if(l){if(l.refresh)return l.refresh(),l;vc(s,Mr,[l])}return vc(o,Mr,t)},function(l){vc(s,Mr,[l])});return c.h}function jn(r,e){return g_(!0,Mr,to[tr](arguments))}function Ox(r,e,t){return g_(!0,r,to[tr](arguments,1))}function kx(r,e){return g_(!1,Mr,to[tr](arguments))}var Mr,Ut,ZS,Iv,zd,Ur,Gd,pc,Wd,e_,mc,Pv,tr,$d,t_,cF,Ir,Jd,dx,Jo,fx,px,zl,to,lF,uF,dF,fF,pF,vF,mF,gF,hF,yF,SF,_F,ix,ox,YS,Oe,Ee,de,wv,Yr,ro,gc,er,xF,DF,ii,hc,OF,kF,bv,yn,o_,LF,Sx,Jl,Vr,oi,a_,QS,Cx,sx,VS,YF,ax,yr,io,Ii,ar,KF,BF,cx,GF,jS,WF,Ev,xx,Bd,zt,cr,Sr,kv,Dx,Wl,qS,Cv,Ze,Xo,f_,eu,ef,HS,Nx,rM,iM,nt,Rx,oM,KS,BS,GS,WS,ux,zS,_n,_c,tu,$S,JS,XS,TM,EM,CM,Ne=E(()=>{Mr=void 0,Ut=null,ZS="",Iv="function",zd="object",Ur="prototype",Gd="__proto__",pc="undefined",Wd="constructor",e_="Symbol",mc="length",Pv="name",tr="call",$d="toString",t_="getOwnPropertyDescriptor",cF="getOwnPropertySymbols",Ir=Gt(Object),Jd=gt(Ir,Ur),dx=Gt(String),Jo=gt(dx,Ur),fx=Gt(Math),px=Gt(Array),zl=gt(px,Ur),to=gt(zl,"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),ix="_polyfill",ox="__nw21$polytype__";Oe=Nv("string"),Ee=Nv(Iv);de=gt(px,"isArray"),wv=vx("Date"),Yr=Nv("number"),ro=Nv("boolean"),gc=vx("Error");er=Gt(dx),xF="[object Error]";DF=Gt(gt(Ir,t_),i_),ii=Gt(gt(Ir,"hasOwn"),IF);hc=$l;OF=RF("propertyIsEnumerable",Jd,AF),kF=Gt(gt(Ir,t_),i_),bv={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};yn=gt(Ir,"defineProperty"),o_=gt(Ir,"defineProperties");LF=Gt(gt(Ir,"isFrozen"),PF),Sx=gt(Ir,"freeze");Jl=gt(Ir,"assign"),Vr=gt(Ir,"keys");oi=Gt(Sx,_x),a_=Gt(gt(Ir,"seal"),_x),QS=Gt(gt(Ir,"getPrototypeOf"),FF);Cx=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}),sx="__tsUtils$gblCfg";YF=gt(fx,"max"),ax=hc("slice",Jo),yr=hc("substring",Jo),io=$l("substr",Jo,VF);Ii=Gt(gt(Ir,"create"),qF);KF=gt(fx,"random"),BF=c_(function(){for(var r=Vt().toString(36).slice(2);r.length<16;)r+=KF().toString(36).slice(2);return r=r.substring(0,16),r}),cx="_urid",GF="$nw21sym",WF=0;xx="window";zt=Xd(Pe,["document"]);cr=Xd(Pe,[xx]);Sr=Xd(Pe,["navigator"]);kv=Xd(Pe,["history"]),Dx=Xd(function(){return!!Ae(function(){return process&&(process.versions||{}).node}).v});Ze=hc("indexOf",zl),Xo=hc("map",zl);f_=$l("includes",zl,ZF),eu=wF(mc),ef=hc("reduce",zl),Nx=Gt(gt(Ir,"setPrototypeOf"),eM);rM=hc("replace",Jo);iM=nM(/^\s+|(?=\s)\s+$/g),nt=$l("trim",Jo,iM),Rx=Gt(gt(Ir,t_),i_),oM=Gt(gt(Ir,cF),CF);ux=[mM,Ax,hM,gM];_n=hc("indexOf",Jo),_c=$l("endsWith",Jo,SM);tu=$l("startsWith",Jo,_M);$S="ref",JS="unref",XS="hasRef",TM="enabled"});function Tn(r,e){typeof e!==Bl&&e!==null&&Zr("Class extends value "+String(e)+" is not a constructor or null"),h_(r,e);function t(){this.constructor=r}r[Pi]=e===null?Ii(e):(t[Pi]=e[Pi],new t)}function Uv(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r}var QK,ZK,Lx,IM,si,h_,Fx=E(()=>{Ne();US();QK=(un()||{}).Symbol,ZK=(un()||{}).Reflect,Lx="hasOwnProperty",IM=function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Kd[Lx].call(e,i)&&(r[i]=e[i])}return r},si=Jl||IM,h_=function(r,e){return h_=Gl.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n[Lx](i)&&(t[i]=n[i])},h_(r,e)}});var Mx=E(()=>{});var bn=E(()=>{US();Fx();Mx();Ne()});function qv(r){return r&&(r===P_[Qo]||r===Array[Qo])}function x_(r){return qv(r)||r===Function[Qo]}function Tc(r){var e;if(r){if(nf)return nf(r);var t=r[C_]||r[Qo]||(r[Hv]?r[Hv][Qo]:null);e=r[Vv]||t,hr(r,Vv)||(delete r[y_],e=r[Vv]=r[y_]||r[Vv],r[y_]=t)}return e}function Gv(r,e){var t=[];if(Vx)t=Vx(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 D_(r,e,t){return e!==Hv&&typeof r[e]===Kv&&(t||hr(r,e))&&e!==C_&&e!==Qo}function Wv(r){Zr("DynamicProto: "+r)}function RM(r){var e=Ii(null);return Gv(r,function(t){!e[t]&&D_(r,t,!1)&&(e[t]=r[t])}),e}function I_(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[__]&&n){var f=c[Bv]||{};f[rf]!==!1&&(d=(f[l[ru]]||{})[u]||d)}return function(){return d.apply(c,arguments)}}var o=Ii(null);Gv(t,function(c){o[c]=i(e,t,c)});for(var s=Tc(r),a=[];s&&!x_(s)&&!I_(a,s);)Gv(s,function(c){!o[c]&&D_(s,c,!nf)&&(o[c]=i(e,s,c))}),a.push(s),s=Tc(s);return o}function AM(r,e,t,n){var i=null;if(r&&hr(t,ru)){var o=r[Bv]||Ii(null);if(i=(o[t[ru]]||Ii(null))[e],i||Wv("Missing ["+e+"] "+Kv),!i[T_]&&o[rf]!==!1){for(var s=!hr(r,e),a=Tc(r),c=[];s&&a&&!x_(a)&&!I_(c,a);){var l=a[e];if(l){s=l===n;break}c.push(a),a=Tc(a)}try{s&&(r[e]=i),i[T_]=1}catch{o[rf]=!1}}}return i}function OM(r,e,t){var n=e[r];return n===t&&(n=Tc(e)[r]),typeof n!==Kv&&Wv("["+r+"] is not a "+Kv),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[__]=1,u}if(!qv(r)){var s=t[Bv]=t[Bv]||Ii(null);if(!qv(s)){var a=s[e]=s[e]||Ii(null);s[rf]!==!1&&(s[rf]=!!i),qv(a)||Gv(t,function(c){D_(t,c,!1)&&t[c]!==n[c]&&(a[c]=t[c],delete t[c],(!hr(r,c)||r[c]&&!r[c][__])&&(r[c]=o(r,c)))})}}}function LM(r,e){if(nf){for(var t=[],n=Tc(e);n&&!x_(n)&&!I_(t,n);){if(n===r)return!0;t.push(n),n=Tc(n)}return!1}return!0}function S_(r,e){return hr(r,Qo)?r.name||e||Ux:((r||{})[Hv]||{}).name||e||Ux}function Ke(r,e,t,n){hr(r,Qo)||Wv("theClass is an invalid class definition.");var i=r[Qo];LM(i,e)||Wv("["+S_(r)+"] not in hierarchy of ["+S_(e)+"]");var o=null;hr(i,ru)?o=i[ru]:(o=NM+S_(r,"_")+"$"+E_.n,E_.n++,i[ru]=o);var s=Ke[qx],a=!!s[jv];a&&n&&n[jv]!==void 0&&(a=!!n[jv]);var c=RM(e),l=wM(i,e,c,a);t(e,l);var u=!!nf&&!!s[b_];u&&n&&(u=!!n[b_]),kM(i,o,e,c,u!==!1)}var Yv,Hv,Qo,Kv,Bv,__,ru,NM,T_,rf,qx,Ux,C_,Vv,Yx,y_,jv,b_,P_,nf,Vx,jx,E_,Nr=E(()=>{Ne();Hv="constructor",Qo="prototype",Kv="function",Bv="_dynInstFuncs",__="_isDynProxy",ru="_dynClass",NM="_dynCls$",T_="_dynInstChk",rf=T_,qx="_dfOpts",Ux="_unknown_",C_="__proto__",Vv="_dyn"+C_,Yx="__dynProto$Gbl",y_="_dynInstProto",jv="useBaseInst",b_="setInstFuncs",P_=Object,nf=P_.getPrototypeOf,Vx=P_.getOwnPropertyNames,jx=un(),E_=jx[Yx]||(jx[Yx]={o:(Yv={},Yv[b_]=!0,Yv[jv]=!0,Yv),n:1e3});Ke[qx]=E_.o});var N_,Hx=E(()=>{"use strict";N_=100});var $t,R_,of=E(()=>{Ne();$t=bx,R_=Ex});var Ri,FM,Kx=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,w_=E(()=>{of();qn=$t({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2})});var En,zs,se,bc,Ec,nu,Zo,wi,Ai,ht,$s,Me,oo,zv,es,ts,so,iu,ou,Cn,A_,$v,Cc,sf,Js,Rr,su,Xs,_r,Jv,O_,Qs,k_,Pn,af,Pc,Xv,ao,Hn,au,co,Oi,xn,Zs,xc,Kn,ea,Qv,cf,ai,Zv,ki,L_,Dn,lf,Dc,F_,M_,uf,ta,Ic,Li,em,U_,cu,Y_,tm,Nc,V_,lu,uu,ra,rm,lt=E(()=>{En="toLowerCase",zs="blkVal",se="length",bc="rdOnly",Ec="notify",nu="warnToConsole",Zo="throwInternal",wi="setDf",Ai="watch",ht="logger",$s="apply",Me="push",oo="splice",zv="hdlr",es="cancel",ts="initialize",so="identifier",iu="removeNotificationListener",ou="addNotificationListener",Cn="isInitialized",A_="instrumentationKey",$v="INACTIVE",Cc="value",sf="getNotifyMgr",Js="getPlugin",Rr="name",su="iKey",Xs="time",_r="processNext",Jv="getProcessTelContext",O_="pollInternalLogs",Qs="enabled",k_="stopPollingInternalLogs",Pn="unload",af="onComplete",Pc="version",Xv="loggingLevelConsole",ao="createNew",Hn="teardown",au="messageId",co="message",Oi="isAsync",xn="diagLog",Zs="_doTeardown",xc="update",Kn="getNext",ea="setNextPlugin",Qv="protocol",cf="userAgent",ai="split",Zv="nodeType",ki="replace",L_="logInternalMessage",Dn="type",lf="handler",Dc="status",F_="getResponseHeader",M_="getAllResponseHeaders",uf="isChildEvt",ta="data",Ic="getCtx",Li="setCtx",em="complete",U_="itemsReceived",cu="urlString",Y_="sendPOST",tm="headers",Nc="timeout",V_="setRequestHeader",lu="traceId",uu="spanId",ra="traceFlags",rm="getAttribute"});function Bx(r,e){j_||(j_=p_("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 j_(t,e||[])}var j_,Gx=E(()=>{Ne();lt()});function Bn(r,e){return Jx(r,function(t){return e?e({status:"fulfilled",rejected:!1,value:t}):t},function(t){return e?e({status:$_,rejected:!0,reason:t}):t})}function Jx(r,e,t,n){var i=r;try{if(ln(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&&(ln(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){q_=q_||{toString:function(){return"[[PromiseState]]"}},H_=H_||{toString:function(){return"[[PromiseResult]]"}},K_=K_||{toString:function(){return"[[PromiseIsHandled]]"}};var i={};i[q_]={get:e},i[H_]={get:t},i[K_]={get:n},o_(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();!nm&&(nm=Sn(!!Ae(YM,[i]).v));var o=nm.v?i.createEvent("Event"):n?new Event(e):{};if(t&&t(o),nm.v&&o.initEvent(e,!1,!0),o&&r[zx])r[zx](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 $x(r){return Ee(r)?r.toString():fe(r)}function Zx(r,e,t){var n=Zl(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;ln(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 Xx[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&&ln(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,Dx())process.emit(Qx,s,f);else{var k=cr()||un();!B_&&(B_=Sn(Ae(Pe,[im+"RejectionEvent"]).v)),VM(k,jM,function(j){return Qe(j,"promise",{g:function(){return f}}),j.reason=s,j},!!B_.v)}}f={then:v,catch:m,finally:S},yn(f,"state",{get:y}),Wx&&UM(f,y,function(){return Rv(s)},function(){return u}),Ix()&&(f[Zd(11)]="IPromise");function A(){return"IPromise"+(Wx?"["+c+(Fe(l)?"":":"+l)+"]":"")+" "+y()+(o?" - "+$x(s):"")}return f.toString=A,(function(){Ee(t)||Zr(im+": executor is not a function - "+$x(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=Zl(arguments,1);return r(function(n,i){try{var o=[],s=1;Mv(e,function(a,c){a&&(s++,Jx(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 Sn(function(e){var t=Zl(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:$_,reason:u.reason}:o[l]={status:"fulfilled",value:u.value},--s===0&&n(o)})}try{de(e)?V(e,a):d_(e)?Mv(e,a):Zr("Input is not an iterable"),s--,s===0&&n(o)}catch(c){i(c)}},t)})}function eD(r){V(r,function(e){try{e()}catch{}})}function GM(r){var e=Yr(r)?r:0;return function(t){jn(function(){eD(t)},e)}}function tD(r,e){return Zx(tD,GM(e),r,e)}function WM(r,e){!G_&&(G_=Sn(Ae(Pe,[im]).v||null));var t=G_.v;if(!t)return tD(r);Ee(r)||Zr(im+": executor is not a function - "+fe(r));var n=0;function i(){return Xx[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 yn(o,"state",{get:i}),o}function ff(r){return Zx(ff,eD,r)}function rD(r,e){return!W_&&(W_=BM(ff)),W_.v(r,e)}function ci(r,e){return!z_&&(z_=Sn(WM)),z_.v.call(this,r,e)}var im,$_,q_,H_,K_,Wx,Xx,zx,nm,Qx,jM,df,qM,HM,B_,G_,W_,z_,nD,FB,Rc=E(()=>{Ne();im="Promise",$_="rejected";Wx=!1;Xx=["pending","resolving","resolved",$_],zx="dispatchEvent";Qx="unhandledRejection",jM=Qx.toLowerCase(),df=[],qM=0,HM=10;nD=KM(ci),FB=Zd(11)});var Gn,Re,na,jt,om,pf,rs,wc,In,Ac,du,ia,fu,lo,sm,am,cm,pu,lm,um,iD,lr=E(()=>{Gn=void 0,Re="",na="channels",jt="core",om="createPerfMgr",pf="disabled",rs="extensionConfig",wc="extensions",In="processTelemetry",Ac="priority",du="eventsSent",ia="eventsDiscarded",fu="eventsSendRequest",lo="perfEvent",sm="offlineEventsStored",am="offlineBatchSent",cm="offlineBatchDrop",pu="getPerfMgr",lm="domain",um="path",iD="Not dynamic - "});function li(r){return!z(r)}function Oc(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?_n(r,e)!==-1:!1}function Wn(r){return r&&r.toISOString()||""}function _t(r){return gc(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 sD(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][$s](n,i)}}function J_(r,e,t){if(r&&e&&Yt(r)&&Yt(e)){var n=function(o){if(Oe(o)){var s=e[o];Ee(s)?(!t||t(o,!0,e,r))&&(r[o]=sD(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]=sD(t,n))}function zn(r,e,t,n){return r&&e&&Yt(r)&&de(t)&&V(t,function(i){Oe(i)&&ns(r,i,e,i,n)}),r}function X_(r){return(function(){function e(){var t=this;r&&me(r,function(n,i){t[n]=i})}return e})()}function Nn(r){return r&&Jl&&(r=Gl(Jl({},r))),r}function dm(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++),Yt(a)||(a={});u<c;u++){var d=s[u],f=de(d),v=Yt(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=dm(l,C,y)}y!==void 0&&(a[m]=y)}}}return a}function Fi(r){try{return r.responseText}catch{}return null}function kc(r,e){return r?"XDomainRequest,Response:"+Fi(r)||"":e}function is(r,e){return r?"XMLHttpRequest,Status:"+r[Dc]+",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 Q_(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,oD,t),a.open(r,e,!i),t&&s(a,oD,t),!i&&o&&s(a,ZM,o),a}function fm(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))[En](),s=nt(n.substring(i+1));e[o]=s}else e[nt(n)]=1}})}return e}function vu(r,e,t){if(!r[t]&&e&&e[F_]){var n=e[F_](t);n&&(r[t]=nt(n))}return r}function ss(r,e){var t={};return r[M_]?t=fm(r[M_]()):e&&(t=vu(t,r,r1),t=vu(t,r,e1),t=vu(t,r,t1)),t}var zM,$M,JM,XM,HB,QM,oD,ZM,e1,t1,r1,uo=E(()=>{bn();Ne();lt();lr();zM="getPrototypeOf",$M=/-([a-z])/g,JM=/([^\w\d_$])/g,XM=/^(\d+[\w\d_$])/,HB=Object[zM];QM="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",oD="withCredentials",ZM="timeout";e1="kill-duration",t1="kill-duration-seconds",r1="time-delta-millis"});function uD(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 iT(r){lD=r}function Lc(r){if(r&&lD){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(aD)!==null)}function qr(){return fo()?JSON||Pe(aD):null}function gf(){return Pe(s1)}function hf(){return Pe(a1)}function oa(){var r=Sr();return r&&r.product?r.product===c1:!1}function sa(){var r=Sr();if(r&&(r[cf]!==eT||Z_===null)){eT=r[cf];var e=(eT||Re)[En]();Z_=rr(e,rT)||rr(e,nT)}return Z_}function yf(r){if(r===void 0&&(r=null),!r){var e=Sr()||{};r=e?(e.userAgent||Re)[En]():Re}var t=(r||Re)[En]();if(rr(t,rT)){var n=zt()||{};return Math.max(parseInt(t[ai](rT)[1]),n[n1]||0)}else if(rr(t,nT)){var i=parseInt(t[ai](nT)[1]);if(i)return i+4}return null}function Rn(r){return(tT===null||r===!1)&&(tT=Qd()&&!!Sr().sendBeacon),tT}function as(r){var e=!1;try{e=!!Pe("fetch");var t=Pe("Request");e&&r&&t&&(e=uD(t,"keepalive"))}catch{}return e}function Sf(){return mu===null&&(mu=typeof XDomainRequest!==eo,mu&&gu()&&(mu=mu&&!uD(Pe(cD),"withCredentials"))),mu}function gu(){var r=!1;try{var e=Pe(cD);r=!!e}catch{}return r}function dD(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 oT(r){var e=zt();return e&&r?dD(e.querySelectorAll("meta"),r).content:null}function sT(r){var e,t=Ws();if(t){var n=t.getEntriesByType("navigation")||[];e=dD((n[se]>0?n[0]:{}).serverTiming,r).description}return e}var n1,i1,o1,aD,s1,a1,c1,rT,nT,cD,Z_,eT,lD,mu,tT,aa=E(()=>{"use strict";bn();Ne();lt();uo();lr();n1="documentMode",i1="location",o1="console",aD="JSON",s1="crypto",a1="msCrypto",c1="ReactNative",rT="msie",nT="trident/",cD="XMLHttpRequest",Z_=null,eT=null,lD=!1,mu=null,tT=null});function l1(r){r<0&&(r>>>=0),_f=pD+r&ca,Tf=vD-r&ca,mD=!0}function u1(){try{var r=Vt()&2147483647;l1((Math.random()*fD^r)+r)}catch{}}function bf(r){return r>0?Math.floor(cs()/ca*(r+1))>>>0:0}function cs(r){var e=0,t=gf()||hf();return t&&t.getRandomValues&&(e=t.getRandomValues(new Uint32Array(1))[0]&ca),e===0&&sa()&&(mD||u1(),e=gD()&ca),e===0&&(e=Math.floor(fD*Math.random()|0)),r||(e>>>=0),e}function gD(r){Tf=36969*(Tf&65535)+(Tf>>16)&ca,_f=18e3*(_f&65535)+(_f>>16)&ca;var e=(Tf<<16)+(_f&65535)>>>0&ca|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 fD,ca,pD,vD,mD,_f,Tf,pm=E(()=>{Ne();lt();aa();lr();fD=4294967296,ca=4294967295,pD=123456789,vD=987654321,mD=!1,_f=pD,Tf=vD});function yD(r){return r[Zv]===1||r[Zv]===9||!+r[Zv]}function p1(r,e){var t=e[r.id];if(!t){t={};try{yD(e)&&Qe(e,r.id,{e:!1,v:t})}catch{}}return t}function Hr(r,e){return e===void 0&&(e=!1),Oc(r+f1+++(e?"."+hD:Re)+d1)}function vm(r){var e={id:Hr("_aiData-"+(r||Re)+"."+hD),accept:function(t){return yD(t)},get:function(t,n,i,o){var s=t[e.id];return s?s[Oc(n)]:(o&&(s=p1(e,t),s[Oc(n)]=i),i)},kill:function(t,n){if(t&&t[n])try{delete t[n]}catch{}}};return e}var hD,d1,f1,hu=E(()=>{Ne();lt();uo();lr();pm();hD="3.3.4",d1="."+Ef(6),f1=0});function mm(r){return r&&Yt(r)&&(r.isVal||r.fb||ii(r,"v")||ii(r,"mrg")||ii(r,"ref")||r.set)}function SD(r,e,t){var n,i=t.dfVal||mx;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 aT(r,e,t){var n=t;if(t&&mm(t)&&(n=SD(r,e,t)),n){mm(n)&&(n=aT(r,e,n));var i;de(n)?(i=[],i[se]=n[se]):jr(n)&&(i={}),i&&(me(n,function(o,s){s&&mm(s)&&(s=aT(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;mm(a)?(i=a.isVal,o=a.set,u=a[bc],d=a[zs],c=a.mrg,l=a.ref,!l&&Fe(l)&&(l=!!c),s=SD(r,e,a)):s=n,d&&r[zs](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=aT(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[bc](e,t)}var cT=E(()=>{Ne();lt()});function lT(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]=lT(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[_D]=!0}catch{}return r}function uT(r){if(r)try{r[TD]=!0}catch{}return r}function gm(r,e,t){var n=!1;return t&&!r[e.blkVal]&&(n=t[TD],!n&&!t[_D]&&(n=jr(t)||de(t))),n}function hm(r){Zr("InvalidAccess:"+r)}var po,_D,TD,ym=E(()=>{Ne();lt();po=Fv("[[ai_dynCfg_1]]"),_D=Fv("[[ai_blkDynCfg_1]]"),TD=Fv("[[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[$s](this,o);return Df(r,e,t,"Patching"),a}})}function Sm(r,e){var t=Rx(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||gm(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&&hm("["+t+"] is read-only:"+fe(e)),o&&(s=s||gm(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){yu((r.hdlr||{})[ht],t,"Assigning",f),s=!1}}else n&&n[po]&&me(n,function(f){var v=Sm(n,f);if(v){var m=v[r.prop];m&&m.chng()}});if(l!==n){var d=l&&gm(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=Sm(e,t),o=i&&!!i[r.prop];o?e[t]=n:g1(r,e,t,n)}return e}function _m(r,e,t,n){if(e){var i=Sm(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){yu((r.hdlr||{})[ht],t,"Blocking",l)}try{If(r,e,t,e[t]),i=Sm(e,t)}catch(l){yu((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]||(yn(e,po,{get:function(){return r[zv]}}),m1(r,e,t))}catch(i){yu((r.hdlr||{})[ht],t,n,i)}return e}var v1,yu,bD=E(()=>{Ne();lr();lt();ym();v1=["push","pop","shift","unshift","splice"],yu=function(r,e,t,n){r&&r[Zo](3,108,"".concat(t," [").concat(e,"] failed - ")+fe(n))}});function ED(r){var e,t=Ql(Nf+"get"+r.uid+Rf),n=Ql(Nf+"ro"+r.uid+Rf),i=Ql(Nf+"rf"+r.uid+Rf),o=Ql(Nf+"blkVal"+r.uid+Rf),s=Ql(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[bc].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&&Bx("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[zs]=o,e[zv]=r,e.add=f,e[Ec]=d,e.use=u,e.trk=v,e),l}var Nf,Rf,CD=E(()=>{Ne();Gx();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:lT(e),a;function c(){a[Ec]()}function l(N,C,_){try{N=If(a,N,C,_)}catch(A){yu(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 _m(a,N,C,(_={},_[0]=!0,_))[C]}function v(N,C){var _;return _m(a,N,C,(_={},_[1]=!0,_))[C]}function m(N,C){var _;return _m(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[Ec]=c,n.set=l,n[wi]=S,n[Ai]=u,n.ref=f,n[bc]=v,n[zs]=m,n._block=d,n);return Qe(y,"uid",{c:!1,e:!1,w:!1,v:o}),a=ED(y),Df(a,s,"config","Creating"),y}function S1(r,e){r?(r[nu](e),r[Zo](2,108,e)):hm(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,iD+fe(r)),wt(r,null,t)[Ai](e))}var la=E(()=>{Ne();hu();lr();lt();cT();bD();CD();ym()});function ls(r,e){if(r&&r[Pn])return r[Pn](e)}function Tm(r,e,t){var n;return t||(n=ci(function(i){t=i})),r&&eu(r)>0?Bn(ls(r[0],e),function(){Tm(Zl(r,1),e,t)}):t(),n}var dT=E(()=>{Rc();Ne();lt()});var PD,fT,pT=E(()=>{PD=500,fT="Microsoft_ApplicationInsights_BypassAjaxInstrumentation"});function _1(r,e,t){return!r&&z(r)?e:ro(r)?r:er(r)[En]()==="true"}function vT(r){return{mrg:!0,v:r}}function Su(r,e,t){return{fb:t,isVal:r,v:e}}function di(r,e){return{fb:e,set:_1,v:!!r}}var mT=E(()=>{Ne();lt()});function T1(r,e){return function(){var t=arguments,n=hT(e);if(n){var i=n.listener;i&&i[r]&&i[r][$s](i,t)}}}function b1(){var r=Pe("Microsoft");return r&&(Em=r.ApplicationInsights),Em}function hT(r){var e=Em;return!e&&r.disableDbgExt!==!0&&(e=Em||b1()),e?e.ChromeDbgExt:null}function xD(r){if(!bm){bm={};for(var e=0;e<gT[se];e++)bm[gT[e]]=T1(gT[e],r)}return bm}var gT,Em,bm,yT=E(()=>{Ne();lt();lr();gT=[du,ia,fu,lo],Em=null});function DD(r){return r?'"'+r[ki](/\"/g,Re)+'"':Re}function ST(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 ua(e)}function _T(r){return r||new ua}function X(r,e,t,n,i,o){o===void 0&&(o=!1),_T(r)[Zo](e,t,n,i,o)}function dn(r,e){_T(r)[nu](e)}function TT(r,e,t){_T(r)[L_](e,t)}var _u,ID,E1,C1,P1,x1,D1,Fc,ua,Ui=E(()=>{"use strict";Nr();Ne();la();lt();yT();aa();lr();ID="warnToConsole",E1="AI (Internal): ",C1="AI: ",P1="AITR_",x1={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},D1=(_u={},_u[0]=null,_u[1]="errorToConsole",_u[2]=ID,_u[3]="debugToConsole",_u);Fc=(function(){function r(e,t,n,i){n===void 0&&(n=!1);var o=this;o[au]=e,o[co]=(n?C1:E1)+e;var s=Re;fo()&&(s=qr().stringify(i));var a=(t?" message:"+DD(t):Re)+(i?" props:"+DD(s):Re);o[co]+=a}return r.dataType="MessageData",r})();ua=(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 Fc(S,y,C,N);if(a)throw fe(_);var A=D1[m]||ID;if(Fe(_[co]))v("throw"+(m===1?"Critical":"Warning"),_);else{if(C){var k=+_[au];!n[k]&&i>=m&&(l[A](_[co]),n[k]=!0)}else i>=m&&l[A](_[co]);u(m,_)}},l.debugToConsole=function(m){ST("debug",m),v("warning",m)},l[nu]=function(m){ST("warn",m),v("warning",m)},l.errorToConsole=function(m){ST("error",m),v("error",m)},l.resetInternalMessageCount=function(){t=0,n={}},l[L_]=u,l[Pn]=function(m){c&&c.rm(),c=null};function u(m,S){if(!f()){var y=!0,N=P1+S[au];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 Fc(23,C,!1);l.queue[Me](_),m===1?l.errorToConsole(C):l[nu](C)}}}function d(m){return ur(wt(m,x1,l).cfg,function(S){var y=S.cfg;i=y[Xv],o=y.loggingLevelTelemetry,s=y.maxMessageLimit,a=y.enableDebug})}function f(){return t>=s}function v(m,S){var y=hT(e||{});y&&y[xn]&&y[xn](m,S)}})}return r.__ieDyn=1,r})()});function DT(){!vo&&(vo=c_(function(){return zt()}))}function N1(r,e){var t=us[da]||xm[da];return t||(t=us[da]=us(r,e),xm[da]=t),t}function Pm(r){return r?r.isEnabled():!0}function UD(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:UD(r,e)}function kD(r,e){var t=e[Qs];if(z(t)){var n=void 0;Fe(r[wD])||(n=!r[wD]),Fe(r[PT])||(n=!r[PT]),t=n}return t}function IT(r,e){var t;if(r)t=r.getCookieMgr();else if(e){var n=e.cookieCfg;n&&n[da]?t=n[da]: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||xm,null,e).cfg,s=ur(r,function(f){f[wi](f.cfg,I1),n=f.ref(f.cfg,"cookieCfg"),i=n[um]||"/",o=n[lm],a=kD(r,n)!==!1,c=n.getCookie||w1,l=n.setCookie||MD,u=n.delCookie||MD},e);var d=(t={isEnabled:function(){var f=kD(r,n)!==!1&&a&&Tu(e),v=xm[da];return f&&v&&d!==v&&(f=Pm(v)),f},setEnabled:function(f){a=f!==!1,n[Qs]=f},set:function(f,v,m,S,y){var N=!1;if(Pm(d)&&!R1(n,f)){var C={},_=nt(v||Re),A=_n(_,";");if(A!==-1&&(_=nt(yc(v,A)),C=YD(yr(v,A+1))),ui(C,lm,S||o,Di,Fe),!z(m)){var k=sa();if(Fe(C[ET])){var j=Vt(),H=j+m*1e3;if(H>0){var oe=new Date;oe.setTime(H),ui(C,ET,LD(oe,k?ND:RD)||LD(oe,k?ND:RD)||Re,Di)}}k||ui(C,"max-age",Re+m,null,Fe)}var $=Lc();$&&$[Qv]==="https:"&&(ui(C,"secure",null,null,Fe),CT===null&&(CT=!Dm((Sr()||{})[cf])),CT&&ui(C,"SameSite","None",null,Fe)),ui(C,um,y||i,null,Fe),l(f,FD(_,C)),N=!0}return N},get:function(f){var v=Re;return Pm(d)&&!UD(n,f)&&(v=c(f)),v},del:function(f,v){var m=!1;return Pm(d)&&(m=d.purge(f,v)),m},purge:function(f,v){var m,S=!1;if(Tu(e)){var y=(m={},m[um]=v||"/",m[ET]="Thu, 01 Jan 1970 00:00:01 GMT",m);sa()||(y["max-age"]="0"),u(f,FD(Re,y)),S=!0}return S}},t[Pn]=function(f){s&&s.rm(),s=null},t);return d[da]=d,d}function Tu(r){if(Cm===null){Cm=!1,!vo&&DT();try{var e=vo.v||{};Cm=e[xT]!==void 0}catch(t){X(r,2,68,"Cannot access document.cookie - "+_t(t),{exception:fe(t)})}}return Cm}function YD(r){var e={};if(r&&r[se]){var t=nt(r)[ai](";");V(t,function(n){if(n=nt(n||Re),n){var i=_n(n,"=");i===-1?e[n]=null:e[nt(yc(n,i))]=nt(yr(n,i+1))}})}return e}function LD(r,e){return Ee(r[e])?r[e]():null}function FD(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&&DT(),vo.v){var t=vo.v[xT]||Re;AD!==t&&(OD=YD(t),AD=t),e=nt(OD[r]||Re)}return e}function MD(r,e){!vo&&DT(),vo.v&&(vo.v[xT]=r+"="+e)}function Dm(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")&&_c(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 bT,Mc,ND,RD,xT,ET,wD,PT,da,Cm,CT,AD,vo,OD,xm,I1,NT=E(()=>{Ne();mT();la();lt();Ui();aa();uo();lr();ND="toGMTString",RD="toUTCString",xT="cookie",ET="expires",wD="isCookieUseDisabled",PT="disableCookiesUsage",da="_ckMgr",Cm=null,CT=null,AD=null,OD={},xm={},I1=(bT={cookieCfg:vT((Mc={},Mc[lm]={fb:"cookieDomain",dfVal:li},Mc.path={fb:"cookiePath",dfVal:li},Mc.enabled=Gn,Mc.ignoreCookies=Gn,Mc.blockedCookies=Gn,Mc)),cookieDomain:Gn,cookiePath:Gn},bT[PT]=Gn,bT)});function O1(r){r.h=null;var e=r.cb;r.cb=[],V(e,function(t){Ae(t.fn,[t.arg])})}function fa(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,RT=E(()=>{Nr();Rc();Ne();la();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[ou]=function(c){i[Me](c)},a[iu]=function(c){for(var l=Ze(i,c);l>-1;)i[oo](l,1),l=Ze(i,c)},a[du]=function(c){fa(i,du,o,function(l){l[du](c)})},a[ia]=function(c,l){fa(i,ia,o,function(u){u[ia](c,l)})},a[fu]=function(c,l){fa(i,fu,l?o:null,function(u){u[fu](c,l)})},a[lo]=function(c){c&&(t||!c[uf]())&&fa(i,lo,null,function(l){c[Oi]?jn(function(){return l[lo](c)},0):l[lo](c)})},a[sm]=function(c){c&&c[se]&&fa(i,sm,o,function(l){l[sm](c)})},a[am]=function(c){c&&c[ta]&&fa(i,am,o,function(l){l[am](c)})},a[cm]=function(c,l){if(c>0){var u=l||0;fa(i,cm,o,function(d){d[cm](c,u)})}},a[Pn]=function(c){var l=function(){n&&n.rm(),n=null,i=[],o.h&&o.h[es](),o.h=null,o.cb=[]},u;if(fa(i,"unload",null,function(d){var f=d[Pn](c);f&&(u||(u=[]),u[Me](f))}),u)return ci(function(d){return Bn(nD(u),function(){l(),d()})});l()}})}return r.__ieDyn=1,r})()});function Jt(r,e,t,n,i){if(r){var o=r;if(o[pu]&&(o=o[pu]()),o){var s=void 0,a=o[Ic](wT);try{if(s=o.create(e(),n,i),s){if(a&&s[Li]&&(s[Li](Uc[AT],a),a[Ic]&&a[Li])){var c=a[Ic](Uc[Af]);c||(c=[],a[Li](Uc[Af],c)),c[Me](s)}return o[Li](wT,s),t(s)}}catch(l){s&&s[Li]&&s[Li]("exception",l)}finally{s&&o.fire(s),o[Li](wT,a)}}}return t()}function OT(){return k1}var bu,AT,Af,k1,Uc,Of,wT,Im=E(()=>{Nr();Ne();lt();lr();bu="ctx",AT="ParentContextKey",Af="ChildrenContextKey",k1=null,Uc=(function(){function r(e,t,n){var i=this;if(i.start=Vt(),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[Ic]=function(s){return s?s===r[AT]||s===r[Af]?i[s]:(i[bu]||{})[s]:null},i[Li]=function(s,a){if(s)if(s===r[AT])i[s]||(i[uf]=function(){return!0}),i[s]=a;else if(s===r[Af])i[s]=a;else{var c=i[bu]=i[bu]||{};c[s]=a}},i[em]=function(){var s=0,a=i[Ic](r[Af]);if(de(a))for(var c=0;c<a[se];c++){var l=a[c];l&&(s+=l[Xs])}i[Xs]=Vt()-i.start,i.exTime=i[Xs]-s,i[em]=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 Uc(n,i,o)},t.fire=function(n){n&&(n[em](),e&&Ee(e[lo])&&e[lo](n))},t[Li]=function(n,i){if(n){var o=t[bu]=t[bu]||{};o[n]=i}},t[Ic]=function(n){return(t[bu]||{})[n]}})}return r.__ieDyn=1,r})(),wT="CoreUtils.doPerf"});function kf(){var r=Yc();return yr(r,0,8)+"-"+yr(r,8,12)+"-"+yr(r,12,16)+"-"+yr(r,16,20)+"-"+yr(r,20)}function Yc(){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 kT=E(()=>{"use strict";Ne();lr();pm()});function ds(r,e,t){return r&&r[se]===e&&r!==t?!!r.match(/^[\da-f]*$/i):!1}function jD(r,e,t){return ds(r,e)?r:t}function qD(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[Pc]=ds(n,2,FT)?n:LT,i[lu]=mo(r)?r:Yc(),i[uu]=go(e)?e:yc(Yc(),16),i.traceFlags=t>=0&&t<=255?t:1,i}function Vc(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]===FT||i[2]===Nm||i[3]===Rm?null:(t={version:(i[1]||Re)[En](),traceId:(i[2]||Re)[En](),spanId:(i[3]||Re)[En]()},t[ra]=parseInt(i[4],16),t)}function mo(r){return ds(r,32,Nm)}function go(r){return ds(r,16,Rm)}function Eu(r){return!(!r||!ds(r[Pc],2,FT)||!ds(r[lu],32,Nm)||!ds(r[uu],16,Rm)||!ds(qD(r[ra]),2))}function Ff(r){return Eu(r)?(r[ra]&VD)===VD:!1}function Mf(r){if(r){var e=qD(r[ra]);ds(e,2)||(e="01");var t=r[Pc]||LT;return t!=="00"&&t!=="ff"&&(t=LT),"".concat(t.toLowerCase(),"-").concat(jD(r.traceId,32,Nm).toLowerCase(),"-").concat(jD(r.spanId,16,Rm).toLowerCase(),"-").concat(e.toLowerCase())}return""}function Uf(r){var e="traceparent",t=Vc(oT(e),r);return t||(t=Vc(sT(e),r)),t}function MT(r){var e=r.getElementsByTagName("script"),t=[];return V(e,function(n){var i=n[rm]("src");if(i){var o=n[rm]("crossorigin"),s=n.hasAttribute("async")===!0,a=n.hasAttribute("defer")===!0,c=n[rm]("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,LT,FT,Nm,Rm,VD,UT=E(()=>{Ne();lt();kT();aa();lr();L1=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,LT="00",FT="ff",Nm="00000000000000000000000000000000",Rm="0000000000000000",VD=1});function fs(r){return F1.get(r,"state",{},!0)}function YT(r,e){for(var t=[],n=null,i=r[Kn](),o;i;){var s=i[Js]();if(s){n&&n[ea]&&s[In]&&n[ea](s),o=fs(s);var a=!!o[Cn];s[Cn]&&(a=s[Cn]()),a||t[Me](s),n=s,i=i[Kn]()}}V(t,function(c){var l=r[jt]();c[ts](r.getCfg(),l,e,r[Kn]()),o=fs(c),!c[jt]&&!o[jt]&&(o[jt]=l),o[Cn]=!0,delete o[Hn]})}function wm(r){return r.sort(function(e,t){var n=0;if(t){var i=t[In];e[In]?n=i?e[Ac]-t[Ac]:1:i&&(n=-1)}else n=e?1:-1;return n})}function HD(r){var e={};return{getName:function(){return e[Rr]},setName:function(t){r&&r.setName(t),e[Rr]=t},getTraceId:function(){return e[lu]},setTraceId:function(t){r&&r.setTraceId(t),mo(t)&&(e[lu]=t)},getSpanId:function(){return e[uu]},setSpanId:function(t){r&&r.setSpanId(t),go(t)&&(e[uu]=t)},getTraceFlags:function(){return e[ra]},setTraceFlags:function(t){r&&r.setTraceFlags(t),e[ra]=t}}}var F1,VT=E(()=>{"use strict";Ne();lt();hu();lr();UT();F1=vm("plugin")});function U1(r,e,t){for(;r;){if(r[Js]()===t)return r;r=r[Kn]()}return pa([t],e.config||{},e)}function jT(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[Js]();S&&v(S)}}return s}function fn(r,e,t,n){var i=wt(e),o=jT(r,i,t,n),s=o.ctx;function a(l){var u=o._next();return u&&u[In](l,s),!u}function c(l,u){return l===void 0&&(l=null),de(l)&&(l=pa(l,i.cfg,t,u)),fn(l||s[Kn](),i.cfg,t,u)}return s[_r]=a,s[ao]=c,s}function Cu(r,e,t){var n=wt(e.config),i=jT(r,n,e,t),o=i.ctx;function s(c){var l=i._next();return l&&l[Pn](o,c),!l}function a(c,l){return c===void 0&&(c=null),de(c)&&(c=pa(c,n.cfg,e,l)),Cu(c||o[Kn](),e,l)}return o[_r]=s,o[ao]=a,o}function Yf(r,e,t){var n=wt(e.config),i=jT(r,n,e,t),o=i.ctx;function s(c){return o.iterate(function(l){Ee(l[xc])&&l[xc](o,c)})}function a(c,l){return c===void 0&&(c=null),de(c)&&(c=pa(c,n.cfg,e,l)),Yf(c||o[Kn](),e,l)}return o[_r]=s,o[ao]=a,o}function pa(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[In])){var c=Y1(a,e,t);i||(i=c),s&&s._setNext(c),s=c}})}return n&&!i?pa([n],e,t):i}function Y1(r,e,t){var n=null,i=Ee(r[In]),o=Ee(r[ea]),s;r?s=r[so]+"-"+r[Ac]+"-"+GD++:s="Unknown-0-"+GD++;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[BD])&&(v=r[BD]()),v||(v=fn(a,e,t)),v}function l(v,m,S,y,N){var C=!1,_=r?r[so]:M1,A=v[KD];return A||(A=v[KD]={}),v.setNext(n),r&&Jt(v[jt](),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[xn](),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[ea](n),r[In](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[jt]||N[jt];r&&(!C||C===v.core())&&!N[Hn]&&(N[jt]=null,N[Hn]=!0,N[Cn]=!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[jt]||N[jt];r&&(!C||C===v.core())&&!N[Hn]&&r[xc]&&r[xc](v,m)===!0&&(y=!0)}return y}l(v,S,"update",function(){},!1)||v[_r](m)}return oi(a)}var M1,KD,BD,GD,qT,Am=E(()=>{"use strict";Ne();cT();la();lt();Ui();uo();lr();Im();VT();M1="TelemetryPluginChain",KD="_hasRun",BD="_getTelCtx",GD=0;qT=(function(){function r(e,t,n,i){var o=this,s=fn(e,t,n,i);zn(o,s,Vr(s))}return r})()});function jc(){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[xn](),2,73,"Unexpected error calling unload handler - "+fe(s))}}),r=[]}return{add:e,run:t}}var Om=E(()=>{Ne();lt();Ui()});function HT(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,km=E(()=>{Ne();lt();Ui()});var KT,va,V1,ps,BT=E(()=>{"use strict";Nr();Ne();la();lt();Ui();uo();lr();Am();Om();km();va="getPlugin",V1=(KT={},KT[rs]={isVal:li,v:{}},KT),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[jt];if(!m||d&&m!==d[jt]())return;var S,y=!1,N=d||Cu(null,m,i&&i[va]?i[va]():i),C=f||(v={reason:0},v[Oi]=!1,v);function _(){y||(y=!0,o.run(N,f),s.run(N[xn]()),S===!0&&N[_r](C),l())}return!u[Zs]||u[Zs](N,C,_)!==!0?_():S=!0,S},u[xc]=function(d,f){var v=u[jt];if(!v||d&&v!==d[jt]())return;var m,S=!1,y=d||Yf(null,v,i&&i[va]?i[va]():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[xn]=function(u){return a(u)[xn]()},e[Cn]=function(){return t},e.setInitialized=function(u){t=u},e[ea]=function(u){i=u},e[_r]=function(u,d){d?d[_r](u):i&&Ee(i[In])&&i[In](u,null)},e._getTelCtx=a;function a(u){u===void 0&&(u=null);var d=u;if(!d){var f=n||fn(null,{},e[jt]);i&&i[va]?d=f[ao](null,i[va]):d=f[ao](null,i)}return d}function c(u,d,f){wt(u,V1,Mi(d)),!f&&d&&(f=d[Jv]()[Kn]());var v=i;i&&i[va]&&(v=i[va]()),e[jt]=d,n=fn(f,u,d,v)}function l(){t=!1,e[jt]=null,n=null,i=null,s=qf(),o=jc()}}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[$s](null,[e])===!1){n=!0;break}}catch(a){X(t,2,64,"Telemetry initializer failed: "+_t(a),{exception:fe(a)},!0)}}return!n}var WD,zD=E(()=>{bn();Nr();Ne();lt();BT();Ui();uo();lr();WD=(function(r){Tn(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[In]=function(c,l){q1(i,c,l?l[xn]():s[xn]())&&s[_r](c,l)},s[Zs]=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(QD);var c=a[Ac],l=a[so];a&&c&&(z(s[c])?s[c]=l:dn(r,"Two extensions have same priority #"+c+" - "+s[c]+", "+l)),!c||c<e?i[Me](a):o[Me](a)}),n={},n[jt]=i,n[na]=o,n}function JD(r,e){var t=!1;return V(e,function(n){if(n===r)return t=!0,-1}),t}function WT(r,e,t,n){t&&me(t,function(i,o){n&&jr(o)&&jr(e[i])&&WT(r,e[i],o,n),n&&jr(o)&&jr(e[i])?WT(r,e[i],o,n):r.set(e,i,o)})}function XD(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=XD(r,e).l;return t||(t={w:e,rm:function(){var n=XD(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[iu](n),n=null),t&&!n&&o!==!0&&(n=xD(i.cfg),t[ou](n))})),n}function Q1(r){return Qe({rm:function(){r.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(r)+">"}})}var ma,QD,H1,$D,K1,B1,G1,GT,vs,ZD=E(()=>{"use strict";bn();Nr();Rc();Ne();la();w_();lt();dT();pT();NT();hu();yT();Ui();uo();lr();RT();Im();Am();VT();zD();Om();km();QD="Plugins must provide initialize method",H1="_notificationManager",$D="SDK is still unloading...",K1="SDK is not initialized",B1=100,G1=5e4,GT=no((ma={cookieCfg:{}},ma[wc]={rdOnly:!0,ref:!0,v:[]},ma[na]={rdOnly:!0,ref:!0,v:[]},ma[rs]={ref:!0,v:{}},ma[om]=Gn,ma.loggingLevelConsole=0,ma.diagnosticLogInterval=Gn,ma));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[Cn]=function(){return t},g.activeStatus=function(){return G},g._setPendingStatus=function(){G=3},g[ts]=function(F,ne,Te,ce){v&&Wt($D),g[Cn]()&&Wt("Core cannot be initialized more than once"),e=wt(F,GT,Te||g[ht],!1),F=e.cfg,St(e[Ai](function(We){var st=We.cfg,Rt=G===3;if(!Rt){Q=st.initInMemoMaxSize||B1;var Kt=st[A_],Xr=st.endpointUrl;if(z(Kt)){k=null,G=qn[$v];var Qr="Please provide instrumentation key";t?(X(n,1,100,Qr),I()):Wt(Qr);return}var ni=[];if(ln(Kt)?(ni[Me](Kt),k=null):k=Kt,ln(Xr)?(ni[Me](Xr),re=null):re=Xr,ni[se]){ie=!1,G=3;var Dr=li(st.initTimeOut)?st.initTimeOut:G1,Wo=rD(ni);T=jn(function(){T=null,ie||D()},Dr),Bn(Wo,function(K){try{if(ie)return;if(!K.rejected){var J=K[Cc];if(J&&J[se]){var ue=J[0];if(k=ue&&ue[Cc],J[se]>1){var De=J[1];re=De&&De[Cc]}}k&&(F[A_]=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](),_),cn(),g[ht]=Te;var be=F[wc];if(u=[],u[Me].apply(u,Uv(Uv([],ne,!1),be,!1)),d=F[na],je(null),(!f||f[se]===0)&&Wt("No "+na+" available"),d&&d[se]>1){var Je=g[Js]("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[pu](),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[su]=F[su]||k,F[Xs]=F[Xs]||Wn(new Date),F.ver=F.ver||"4.0",!v&&g[Cn]()&&G===qn.ACTIVE?Le()[_r](F):G!==qn[$v]&&i[se]<=Q&&i[Me](F)},function(){return{item:F}},!F.sync)},g[Jv]=Le,g[sf]=function(){return o||(o=new wf(e.cfg),g[H1]=o),o},g[ou]=function(F){g.getNotifyMgr()[ou](F)},g[iu]=function(F){o&&o[iu](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[pu]=function(){return s||a||OT()},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[su]=ne[su]||k,Le()[_r](ne)}):X(n,2,20,"core init status is not active")}},g[O_]=function(F){return S=F||null,x=!1,R&&R[es](),ee(!0)};function D(){ie=!0,z(k)?(G=qn[$v],X(n,1,112,"ikey can't be resolved from promises")):G=qn.ACTIVE,I()}function I(){t&&(g.releaseQueue(),g[O_]())}function ee(F){if((!R||!R[Qs])&&!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[Qs],R[es]()),R=kx(Lr,ce),R.unref(),R[Qs]=be}))),R[Qs]=!0)}return R}g[k_]=function(){x=!0,R&&R[es](),Lr()},zn(g,function(){return m},["addTelemetryInitializer"]),g[Pn]=function(F,ne,Te){var ce;F===void 0&&(F=!0),t||Wt(K1),v&&Wt($D);var be=(ce={reason:50},ce[Oi]=F,ce.flushComplete=!1,ce),Je;F&&!ne&&(Je=ci(function(Rt){ne=Rt}));var We=Cu(vt(),g);We[af](function(){C.run(g[ht]),Tm([c,o,n],F,function(){w(),ne&&ne(be)})},g);function st(Rt){be.flushComplete=Rt,v=!0,N.run(We,be),g[k_](),We[_r](be)}return Lr(),gr(F,st,6,Te)||st(!1),Je},g[Js]=pt,g.addPlugin=function(F,ne,Te,ce){if(!F){ce&&ce(!1),rt(QD);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 st=[be.plugin],Rt={reason:2,isAsync:!!Te};sr(st,Rt,function(Kt){Kt?(Je.removed=st,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[Cn]()){Te={reason:1,cfg:e.cfg,oldCfg:m_({},e.cfg),newConfig:m_({},F),merge:ne},F=Te.newConfig;var ce=e.cfg;F[wc]=ce[wc],F[na]=ce[na]}e._block(function(be){var Je=be.cfg;WT(be,Je,F,ne),ne||me(Je,function(We){ii(F,We)||be.set(Je,We,Gn)}),be[wi](Je,GT)},!0),e[Ec](),Te&&mt(Te)},g.evtNamespace=function(){return y},g.flush=gr,g.getTraceCtx=function(F){return A||(A=HD()),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 Sc()||e.cfg.enableWParam?0:-1};function M(){var F={};oe=[];var ne=function(Te){Te&&V(Te,function(ce){if(ce[so]&&ce[Pc]&&!F[ce.identifier]){var be=ce[so]+"="+ce[Pc];oe[Me](be),F[ce.identifier]=ce}})};ne(f),d&&V(d,function(Te){ne(Te)}),ne(u)}function w(){t=!1,e=wt({},GT,g[ht]),e.cfg[Xv]=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 ua(e.cfg),e[ht]=n),n},s:function(ne){e[ht]=ne,n!==ne&&(ls(n,!1),n=ne)}}),g[ht]=new ua(e.cfg),H=[];var F=g.config[wc]||[];F.splice(0,F[se]),Ni(F,H),m=new WD,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=jc(),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=fn(vt(),e.cfg,g);return F[af](ee),F}function je(F){var ne=z1(g[ht],PD,u);l=null,$=null,oe=null,f=(d||[])[0]||[],f=wm(Ni(f,ne[na]));var Te=Ni(wm(ne[jt]),f);H=oi(Te);var ce=g.config[wc]||[];ce.splice(0,ce[se]),Ni(ce,H);var be=Le();f&&f[se]>0&&YT(be[ao](f),Te),YT(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 st=[Te],Rt=(We={reason:1},We[Oi]=be,We);sr(st,Rt,function(Kt){Kt&&je({reason:32,removed:st}),Je&&Je(Kt)})}}),ne}function vt(){if(!l){var F=(H||[]).slice();Ze(F,m)===-1&&F[Me](m),l=pa(wm(F),e.cfg,g)}return l}function sr(F,ne,Te){if(F&&F[se]>0){var ce=pa(F,e.cfg,g),be=Cu(ce,g);be[af](function(){var Je=!1,We=[];V(u,function(Rt,Kt){JD(Rt,F)?Je=!0:We[Me](Rt)}),u=We,$=null,oe=null;var st=[];d&&(V(d,function(Rt,Kt){var Xr=[];V(Rt,function(Qr){JD(Qr,F)?Je=!0:Xr[Me](Qr)}),st[Me](Xr)}),d=st),Te&&Te(Je),ee()}),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[au],Te[su]=k,Te[Xs]=Wn(new Date),Te.baseType=Fc.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 st(){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,st()},Te)||Xr||(F&&We==null?We=jn(function(){We=null,st()},ce):st())}})}return Je=!0,st(),!0}function cn(){var F;St(e[Ai](function(ne){var Te=ne.cfg.enablePerfMgr;if(Te){var ce=ne.cfg[om];(F!==ce||!F)&&(ce||(ce=W1),vf(ne.cfg,om,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](ee),(!g._updateHook||g._updateHook(ne,F)!==!0)&&ne[_r](F)}function rt(F){var ne=g[ht];ne?(X(ne,2,73,F),ee()):Wt(F)}function Nt(F){var ne=g[sf]();ne&&ne[ia]([F],2)}function St(F){C.add(F)}})}return r.__ieDyn=1,r})()});function qc(r,e){try{if(r&&r!==""){var t=qr().parse(r);if(t&&t[U_]&&t[U_]>=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 eI=E(()=>{Ne();lt();Ui();aa()});var ho,Z1,tI,zT,Hc,rI=E(()=>{Nr();Rc();Ne();lt();pT();Ui();aa();uo();ho="",Z1="NoResponseBody",tI="&"+Z1+"=true",zT="POST",Hc=(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=Lc();R&&R.protocol&&R.protocol[En]()==="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[Zs]=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:gu()&&(g=G):x===2&&as(R)&&(!R||!v)?g=re:x===3&&Rn()&&(R?!f:!d)&&(g=$),D++;return g?(B={_transport:x,_isSync:R},B[Y_]=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[cu];if(!x)return k(R),!0;x=T[cu]+(m?tI:ho);var g=T[ta],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[ta];try{if(x)if(oe(T,R))_(ho,R);else{var g=s&&s.beaconOnRetry;g&&Ee(g)?g(T,R,oe):(l&&l[Y_](T,R,!0),X(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(D){o&&dn(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[tm]||{};!B&&t&&(x=ci(function(Le,je){g=Le,D=je})),o&&B&&T.disableXhrSync&&(B=!1);var ee=T[cu];if(!ee){k(R),g&&g(!1);return}var M=Q_(zT,ee,C,!0,B,T[Nc]);o||M[V_]("Content-type","application/json"),V(Vr(I),function(Le){M[V_](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[Dc],ss(Le,o),vt)}}return M.onerror=function(Le){H(R,o?M[Dc]:400,ss(M,o),o?ho:is(M)),D&&D(Le)},M.ontimeout=function(){H(R,o?M[Dc]:500,ss(M,o),o?ho:is(M)),g&&g(!1)},M.send(T[ta]),x}function re(T,R,B){var x,g=T[cu],D=T[ta],I=o?D:new Blob([D],{type:"application/json"}),ee,M,w,Le=new Headers,je=D[se],pt=!1,vt=!1,sr=T[tm]||{},Lr=(x={method:zT,body:I},x[fT]=!0,x);T.headers&&Vr(T.headers)[se]>0&&(V(Vr(sr),function(rt){Le.append(rt,sr[rt])}),Lr[tm]=Le),c?Lr.credentials=c:C&&o&&(Lr.credentials="include"),B&&(Lr.keepalive=!0,e+=je,o?T._sendReason===2&&(pt=!0,m&&(g+=tI)):pt=!0);var gr=new Request(g,Lr);try{gr[fT]=!0}catch{}if(!B&&t&&(ee=ci(function(rt,Nt){M=rt,w=Nt})),!g){k(R),M&&M(!1);return}function cn(rt){H(R,o?0:400,{},o?ho:rt)}function mt(rt,Nt,St){var F=rt[Dc],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)cn(rt.reason&&rt.reason[co]),w&&w(rt.reason);else{var Nt=rt[Cc];try{!o&&!Nt.ok?(cn(Nt.statusText),M&&M(!1)):o&&!Nt.body?(mt(Nt,null,ho),M&&M(!0)):Bn(Nt.text(),function(St){mt(Nt,T,St[Cc]),M&&M(!0)})}catch(St){cn(fe(St)),w&&w(St)}}})}catch(rt){vt||(cn(fe(rt)),w&&w(rt))}return pt&&!vt&&(vt=!0,H(R,200,{}),M&&M(!0)),o&&!vt&&T[Nc]>0&&S&&S.set(function(){vt||(vt=!0,H(R,500,{}),M&&M(!0))},T[Nc]),ee}function Q(T,R,B){var x=cr(),g=new XDomainRequest,D=T[ta];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:kc(g))},g.ontimeout=function(){H(R,500,{})},g.onprogress=function(){};var I=x&&x.location&&x.location[Qv]||"",ee=T[cu];if(!ee){k(R);return}if(!o&&ee.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?ee:ee[ki](/^(https?:)/,"");g.open(zT,w),T[Nc]&&(g[Nc]=T[Nc]),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 aI(r){return r&&r[ki]?r[ki](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Re):r}function Mm(r,e){var t;if(e){var n=Re;de(e)?(n=Re,V(e,function(o){o=aI(o),o&&(o[0]!=="."&&(o="."+o),n+=o)})):n=aI(e),n&&(n[0]!=="."&&(n="."+n),r=(r||Re)+n)}var i=nU.exec(r||Re)||[];return t={},t[Dn]=i[1],t.ns=(i[2]||Re).replace(eU,".").replace(tU,Re)[ai](".").sort().join("."),t}function $T(r,e,t){var n=[],i=Kf.get(r,Lm,{},!1),o=Mm(e,t);return me(i,function(s,a){V(a,function(c){var l;(!o[Dn]||o[Dn]===c.evtName[Dn])&&(!o.ns||o.ns===o.ns)&&n[Me]((l={},l[Rr]=c.evtName[Dn]+(c.evtName.ns?"."+c.evtName.ns:Re),l.handler=c[lf],l))})}),n}function mI(r,e,t){t===void 0&&(t=!0);var n=Kf.get(r,Lm,{},t),i=n[e];return i||(i=n[e]=[]),i}function gI(r,e,t,n){r&&e&&e[Dn]&&(r[sI]?r[sI](e[Dn],t,n):r[oI]&&r[oI](lI+e[Dn],t))}function iU(r,e,t,n){var i=!1;return r&&e&&e[Dn]&&t&&(r[iI]?(r[iI](e[Dn],t,n),i=!0):r[nI]&&(r[nI](lI+e[Dn],t),i=!0)),i}function cI(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))&&(gI(r,o.evtName,o[lf],o.capture),e[oo](i,1))}}function oU(r,e,t){if(e[Dn])cI(r,mI(r,e[Dn]),e,t);else{var n=Kf.get(r,Lm,{});me(n,function(i,o){cI(r,o,e,t)}),Vr(n)[se]===0&&Kf.kill(r,Lm)}}function $n(r,e){var t;return e?(de(e)?t=[r].concat(e):t=[r,e],t=Mm("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=Mm(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);mI(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=Mm(e,n),s=!1;oU(r,o,function(a){return o.ns&&!t||a[lf]===t?(s=!0,!0):!1}),s||gI(r,o,t,i)}catch{}}function JT(r,e,t,n){return n===void 0&&(n=!1),yo(r,e,t,null,n)}function XT(r,e,t,n){n===void 0&&(n=!1),ms(r,e,t,null,n)}function Um(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 Ym(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 Pu(r,e,t,n){var i=!1;return e&&r&&r[se]>0&&V(r,function(o){o&&(!t||Ze(t,o)===-1)&&(i=Um(o,e,n)||i)}),i}function Vm(r,e,t,n){var i=!1;return e&&r&&de(r)&&(i=Pu(r,e,t,n),!i&&t&&t[se]>0&&(i=Pu(r,e,null,n))),i}function ga(r,e,t){r&&de(r)&&V(r,function(n){n&&Ym(n,e,t)})}function Bf(r,e,t){return Vm([fI,dI,Fm],r,e,t)}function Gf(r,e){ga([fI,dI,Fm],r,e)}function xu(r,e,t){function n(s){var a=zt();r&&a&&a.visibilityState==="hidden"&&r(s)}var i=$n(pI,t),o=Pu([Fm],r,e,i);return(!e||Ze(e,Hf)===-1)&&(o=Pu([Hf],n,e,i)||o),!o&&e&&(o=xu(r,null,t)),o}function Wf(r,e){var t=$n(pI,e);ga([Fm],r,t),ga([Hf],null,t)}function Du(r,e,t){function n(s){var a=zt();r&&a&&a.visibilityState==="visible"&&r(s)}var i=$n(vI,t),o=Pu([uI],r,e,i);return o=Pu([Hf],n,e,i)||o,!o&&e&&(o=Du(r,null,t)),o}function zf(r,e){var t=$n(vI,e);ga([uI],r,t),ga([Hf],null,t)}var lI,nI,iI,oI,sI,Lm,Hf,Fm,uI,dI,fI,pI,vI,eU,tU,rU,Kf,nU,hI=E(()=>{Ne();lt();hu();lr();lI="on",nI="attachEvent",iI="addEventListener",oI="detachEvent",sI="removeEventListener",Lm="events",Hf="visibilitychange",Fm="pagehide",uI="pageshow",dI="unload",fI="beforeunload",pI=Hr("aiEvtPageHide"),vI=Hr("aiEvtPageShow"),eU=/\.[\.]+/g,tU=/[\.]+$/,rU=1,Kf=vm("events"),nU=/^([^.]*)(?:\.(.+)|)/});var QT,yI=E(()=>{of();QT=$t({DISABLED:0,CRITICAL:1,WARNING:2,DEBUG:3})});var at=E(()=>{Hx();Kx();w_();ZD();BT();pm();kT();dT();uo();eI();rI();Ne();of();hI();aa();bn();RT();Im();Ui();Am();yI();NT();hu();Om();km();UT();la();ym();mT()});var So,SI,ZT,jm,qm=E(()=>{So="",SI="https://browser.events.data.microsoft.com/OneCollector/1.0/",ZT="version",jm="properties"});var eb,tb,Iu,_o,rb,At,Kc,gs,Hm,Km,Bm,Gm,$f,Wm=E(()=>{eb="initialize",tb="logger",Iu="indexOf",_o="timings",rb="pollInternalLogs",At="value",Kc="kind",gs="length",Hm="processTelemetryStart",Km="handleField",Bm="rmSanitizer",Gm="rmFieldSanitizer",$f="canHandle"});function wr(r){return!(r===So||z(r))}function zm(r){if(r){var e=_n(r,"-");if(e>-1)return yc(r,e)}return So}function CI(){return nb===null&&(nb=!Fe(Uint8Array)&&!uU()&&!oa()),nb}function $m(r){return!!(r&&Yr(r)&&r>=1&&r<=4)}function Jm(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"&&!TI.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])&&!ob(e[At]))return null;if(!z(e[Kc])){if(de(e[At])||!Jf(e[Kc]))return null;e[At]=e[At].toString()}return e}function Ru(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 PI(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 xI(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 Bc(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&&Yt(f)?de(f)?(o[d]=o[d]||[],V(f,function(v,m){v&&Yt(v)?o[d][m]=Bc(!0,o[d][m],v):o[d][m]=v})):o[d]=Bc(!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[Iu]("safari")>=0||e[Iu]("firefox")>=0)&&e[Iu]("chrome")<0)return!0}return!1}function ob(r){return r[gs]>0}function Xf(r,e){var t=r;t[_o]=t[_o]||{},t[_o][Hm]=t[_o][Hm]||{},t[_o][Hm][e]=wn()}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]))):TI.call(r,"value")&&(e=8192|To(r[At])))}return e}function Xm(){return!!Pe("chrome")}function DI(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,_I,t),a.open(r,e,!i),t&&s(a,_I,t),!i&&o&&s(a,aU,o),a}function ha(r){return r>0}var hs,ib,Nu,TI,sU,_I,aU,cU,nb,bI,EI,wn,Qm=E(()=>{at();bn();Ne();qm();Wm();ib="4.3.4",Nu="1DS-Web-JS-"+ib,TI=Kd.hasOwnProperty,sU="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",_I="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),nb=null,bI=Sc(),EI=Xl();wn=tf});function fU(r){return r&&(!r.getProperty||!r.setProperty)&&Wt("Invalid property storage override passed."),!0}var dU,II,NI=E(()=>{bn();Nr();at();Ne();qm();Qm();Wm();dU=no({endpointUrl:SI,propertyStorageOverride:{isVal:fU}});II=(function(r){Tn(e,r);function e(){var t=r.call(this)||this;return Ke(e,t,function(n,i){n[eb]=function(o,s,a,c){Jt(n,function(){return"AppInsightsCore.initialize"},function(){try{i[eb](wt(o,dU,a||n[tb],!1).cfg,s,a,c)}catch(d){var l=n[tb],u=fe(d);u[Iu]("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=wn(),$m(s.latency)||(s.latency=1);var a=s.ext=s.ext||{};a.sdk=a.sdk||{},a.sdk.ver=Nu;var c=s.baseData=s.baseData||{};c[jm]=c[jm]||{};var l=c[jm];l[ZT]=l[ZT]||n.pluginVersionString||So}i.track(s)},function(){return{item:o}},!o.sync)},n[rb]=function(o){return i[rb](o||"InternalLog")}}),t}return e.__ieDyn=1,e})(vs)});var RI,wI,AI,OI,kI,LI=E(()=>{at();RI=$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}),wI=$t({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),AI=$t({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),OI=$t({Normal:1,Critical:2}),kI=$t({NONE:0,ERROR:1,WARNING:2,INFORMATION:3})});var FI,MI=E(()=>{at();Ne();qm();Qm();Wm();FI=(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][Km](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][Km](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&&(f_(i,u)||i.push(u),n={})},t.addFieldSanitizer=function(u){u&&(f_(o,u)||o.push(u),n={})},t[Bm]=function(u){if(u){var d=Ze(i,u);d!==-1&&(i.splice(d,1),n={}),V(i,function(f){f&&f[Bm]&&f[Bm](u)})}},t[Gm]=function(u){if(u){var d=Ze(o,u);d!==-1&&(o.splice(d,1),n={}),V(i,function(f){f&&f[Gm]&&f[Gm](u)})}},t.isEmpty=function(){return eu(i)+eu(o)===0},t[Km]=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[Kc])){if((v&4096)===4096||!Jf(m[Kc]))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[Kc],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 UI={};Be(UI,{ActiveStatus:()=>qn,AppInsightsCore:()=>II,BaseTelemetryPlugin:()=>ps,DiagnosticLogger:()=>ua,EventLatency:()=>wI,EventPersistence:()=>OI,EventPropertyType:()=>AI,EventsDiscardedReason:()=>Ri,FullVersionString:()=>Nu,InternalAppInsightsCore:()=>vs,LoggingSeverity:()=>QT,MinChannelPriorty:()=>N_,NotificationManager:()=>wf,PerfEvent:()=>Uc,PerfManager:()=>Of,ProcessTelemetryContext:()=>qT,SenderPostManager:()=>Hc,TraceLevel:()=>kI,Undefined:()=>eo,ValueKind:()=>RI,ValueSanitizer:()=>FI,Version:()=>ib,_InternalLogMessage:()=>Fc,__getRegisteredEvents:()=>$T,_appendHeader:()=>vu,_getAllResponseHeaders:()=>ss,_logInternalMessage:()=>TT,_testHookMaxUnloadHooksCb:()=>HT,_throwInternal:()=>X,_warnToConsole:()=>dn,addEventHandler:()=>Um,addEventListeners:()=>Vm,addPageHideEventListener:()=>xu,addPageShowEventListener:()=>Du,addPageUnloadEventListener:()=>Bf,areCookiesSupported:()=>Tu,arrForEach:()=>V,arrIndexOf:()=>Ze,arrMap:()=>Xo,arrReduce:()=>ef,attachEvent:()=>JT,blockDynamicConversion:()=>xf,convertAllHeadersToMap:()=>fm,cookieAvailable:()=>Tu,createCookieMgr:()=>us,createDynamicConfig:()=>wt,createEnumStyle:()=>$t,createGuid:()=>xI,createProcessTelemetryContext:()=>fn,createTraceParent:()=>Lf,createUniqueNamespace:()=>Hr,createUnloadHandlerContainer:()=>jc,dateNow:()=>Vt,detachEvent:()=>XT,disallowsSameSiteNone:()=>Dm,doPerf:()=>Jt,dumpObj:()=>fe,eventOff:()=>ms,eventOn:()=>yo,extend:()=>Bc,findW3cTraceParent:()=>Uf,forceDynamicConversion:()=>uT,formatErrorMessageXdr:()=>kc,formatErrorMessageXhr:()=>is,formatTraceParent:()=>Mf,generateW3CId:()=>Yc,getCommonSchemaMetaData:()=>Ru,getConsole:()=>mf,getCookieValue:()=>PI,getCrypto:()=>gf,getDocument:()=>zt,getDynamicConfigHandler:()=>Pf,getExceptionName:()=>_t,getFieldValueType:()=>To,getGlobal:()=>un,getGlobalInst:()=>Pe,getHistory:()=>kv,getIEVersion:()=>yf,getISOString:()=>Wn,getJSON:()=>qr,getLocation:()=>Lc,getMsCrypto:()=>hf,getNavigator:()=>Sr,getPerformance:()=>Ws,getResponseText:()=>Fi,getSetValue:()=>vf,getTenantId:()=>zm,getTime:()=>wn,getWindow:()=>cr,hasDocument:()=>Sc,hasHistory:()=>u_,hasJSON:()=>fo,hasNavigator:()=>Qd,hasOwnProperty:()=>hr,hasWindow:()=>Xl,isArray:()=>de,isArrayValid:()=>ob,isBeaconsSupported:()=>Rn,isBoolean:()=>ro,isChromium:()=>Xm,isDate:()=>wv,isDocumentObjectAvailable:()=>bI,isError:()=>gc,isFetchSupported:()=>as,isFunction:()=>Ee,isGreaterThanZero:()=>ha,isIE:()=>sa,isLatency:()=>$m,isNotTruthy:()=>n_,isNullOrUndefined:()=>z,isNumber:()=>Yr,isObject:()=>Yt,isReactNative:()=>oa,isSampledFlag:()=>Ff,isString:()=>Oe,isTruthy:()=>Di,isTypeof:()=>r_,isUint8ArrayAvailable:()=>CI,isUndefined:()=>Fe,isValidSpanId:()=>go,isValidTraceId:()=>mo,isValidTraceParent:()=>Eu,isValueAssigned:()=>wr,isValueKind:()=>Jf,isWindowObjectAvailable:()=>EI,isXhrSupported:()=>gu,mergeEvtNamespace:()=>$n,newGuid:()=>kf,newId:()=>Ef,normalizeJsName:()=>Oc,objDefineAccessors:()=>s_,objForEachKey:()=>me,objFreeze:()=>oi,objKeys:()=>Vr,objSeal:()=>a_,onConfigChange:()=>ur,openXhr:()=>DI,optimizeObject:()=>Nn,parseResponse:()=>qc,parseTraceParent:()=>Vc,perfNow:()=>tf,prependTransports:()=>os,proxyAssign:()=>J_,proxyFunctionAs:()=>ns,proxyFunctions:()=>zn,random32:()=>cs,randomValue:()=>bf,removeEventHandler:()=>Ym,removeEventListeners:()=>ga,removePageHideEventListener:()=>Wf,removePageShowEventListener:()=>zf,removePageUnloadEventListener:()=>Gf,safeGetCookieMgr:()=>IT,safeGetLogger:()=>Mi,sanitizeProperty:()=>Jm,setEnableEnvMocks:()=>iT,setProcessTelemetryTimings:()=>Xf,setValue:()=>ui,strContains:()=>rr,strEndsWith:()=>_c,strFunction:()=>Bl,strObject:()=>$o,strPrototype:()=>Pi,strStartsWith:()=>tu,strTrim:()=>nt,strUndefined:()=>eo,throwError:()=>Wt,toISOString:()=>Wn,useXDomainRequest:()=>Sf});var Gc=E(()=>{NI();LI();MI();at();Qm()});var Wc,Zm,eg,sb=E(()=>{Wc="REAL_TIME",Zm="NEAR_REAL_TIME",eg="BEST_EFFORT"});var Yi,tg,YI,ab,VI,jI,cb,rg,Qf,wu,qI,HI,KI,ng,lb,ig,og,sg,Zf,ub,db,BI,Au,fb,ag,ep=E(()=>{Yi="",tg="drop",YI="send",ab="requeue",VI="rspFail",jI="oth",cb="no-cache, no-store",rg="application/x-json-stream",Qf="cache-control",wu="content-type",qI="kill-tokens",HI="kill-duration",KI="time-delta-millis",ng="client-version",lb="client-id",ig="time-delta-to-apply-millis",og="upload-time",sg="apikey",Zf="AuthMsaDeviceTicket",ub="WebAuthToken",db="AuthXToken",BI="NoResponseBody",Au="msfpc",fb="trace",ag="user"});var tp,cg,lg,ug,rp,Ve,bo,Jn,Xt,Eo,Tr,Co,zc,dg,$c,fg,Jc,pg,vg,GI,pb,vb,WI,zI,mg,mb,gb,$I,JI,hb,yb,Sb,XI,gg,hg,yg,np,_b,Vi,Ou,Tb,en,An,ip,op,ku,Sg,sp,QI,Lu,_g,Tg,Fu,bb,ap,bg,Eg,Mu,ZI,Cg,Pg,xg,cp,eN,tN,Eb,Cb,rN,nN,iN,Dg,lp,ya,Xc,Uu=E(()=>{tp="allowRequestSending",cg="firstRequestSent",lg="shouldAddClockSkewHeaders",ug="getClockSkewHeaderValue",rp="setClockSkew",Ve="length",bo="concat",Jn="iKey",Xt="count",Eo="events",Tr="push",Co="split",zc="splice",dg="toLowerCase",$c="hdrs",fg="useHdrs",Jc="initialize",pg="setTimeoutOverride",vg="clearTimeoutOverride",GI="payloadPreprocessor",pb="overrideEndpointUrl",vb="avoidOptions",WI="disableEventTimings",zI="stringifyObjects",mg="enableCompoundKey",mb="disableXhrSync",gb="disableFetchKeepAlive",$I="addNoResponse",JI="excludeCsMetaData",hb="useSendBeacon",yb="fetchCredentials",Sb="alwaysUseXhrOverride",XI="unloadTransports",gg="serializeOfflineEvt",hg="getOfflineRequestDetails",yg="createPayload",np="createOneDSPayload",_b="payloadBlob",Vi="headers",Ou="_thePayload",Tb="urlString",en="batches",An="sendType",ip="addHeader",op="canSendRequest",ku="sendQueuedRequests",Sg="isCompletelyIdle",sp="setUnloading",QI="isTenantKilled",Lu="resume",_g="sendSynchronousBatch",Tg="_transport",Fu="getWParam",bb="isBeacon",ap="timings",bg="isTeardown",Eg="isSync",Mu="data",ZI="timeout",Cg="_sendReason",Pg="setKillSwitchTenants",xg="_backOffTransmission",cp="identifier",eN="disableOptimizeObj",tN="ignoreMc1Ms0CookieProcessing",Eb="eventsLimitInMem",Cb="autoFlushEventsLimit",rN="disableAutoBatchFlushLimit",nN="overrideInstrumentationKey",iN="disableTelemetry",Dg="baseData",lp="sendAttempt",ya="latency",Xc="sync"});function sN(r){var e=(r.ext||{}).intweb;return e&&wr(e[Au])?e[Au]:null}function oN(r){for(var e=null,t=0;e===null&&t<r[Ve];t++)e=sN(r[t]);return e}var Sa,Ig=E(()=>{Gc();ep();Uu();Sa=(function(){function r(e,t){var n=t?[][bo](t):[],i=this,o=oN(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=sN(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[zc](s,l),o=oN(n)}return new r(e,c)}}return r.create=function(e,t){return new r(e,t)},r})()});var aN,cN=E(()=>{Nr();Uu();aN=(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[cg]=function(){n&&(n=!1,o||(e=!1))},s[lg]=function(){return t},s[ug]=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,lN,uN=E(()=>{Nr();Gc();Uu();pU=1e3,lN=(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[Pg]=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]]=Vt()+a}catch{return[]}return[]},n[QI]=function(i){var o=e,s=nt(i);return o[s]!==void 0&&o[s]>Vt()?!0:(delete o[s],!1)}})}return r.__ieDyn=1,r})()});function fN(r){return!(r>=300&&r<500&&r!=429||r==501||r==505)}function Ng(r){var e=0,t=dN*vU,n=dN*mU,i=Math.floor(Math.random()*(n-t))+t;return e=Math.pow(2,r)*i,Math.min(e,gU)}var vU,mU,dN,gU,Pb=E(()=>{vU=.8,mU=1.2,dN=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[pN];s||(s=e[pN]={f:{}});var a=s[Rg];if(a||(a=s[Rg]={}),t)for(var c=0;c<t.length;c++){var l=t[c];a[l]||(a[l]={f:{}});var u=a[l][Rg];u||(u=a[l][Rg]={}),a=u}a=a[n]={},de(i.value)?a.a={t:o}:a.t=o}}}var hU,yU,vN,mN,SU,pN,Rg,_U,gN,hN=E(()=>{Nr();Gc();Ig();ep();Ne();hU=20,yU=3984588,vN=65e3,mN=2e6,SU=Math.min(mN,vN),pN="metadata",Rg="f",_U=/\./,gN=(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||Ru;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?vN:yU,R=ie?SU:mN,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,ee=oe.length;if(ee+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(Sa.create(A.iKey(),re)),Q.length>0&&_.failedEvts.push(Sa.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:"+zm(_.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=tu(_,"ext.metadata")||tu(_,"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 ee=j&&N(ie,T);if(!ee&&f&&f.handleField(ie,T)?Q=f.value(ie,T,re,n):Q=Jm(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 Yu(r,e){return{set:function(t,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return Ox([r,e],t,n,i)}}}var xb=E(()=>{Ne()});function Zc(r,e,t){Ib[r]=e,t!==!1&&(Nb[e]=r)}function wg(r,e){var t=!1;if(r&&e){var n=Vr(r);if(n&&n[Ve]>0)for(var i=e[dg](),o=0;o<n[Ve];o++){var s=n[o];if(s&&hr(e,s)&&s[dg]()===i){t=!0;break}}}return t}function Vu(r,e,t,n){e&&t&&t[Ve]>0&&(n&&Ib[e]?(r[$c][Ib[e]]=t,r[fg]=!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[zc](t,1);return}}var Qc,Db,bU,EU,CU,Ib,Nb,yN,SN=E(()=>{Nr();Gc();Ne();cN();Ig();ep();uN();Pb();hN();xb();Uu();Db="sendAttempt",bU="&"+BI+"=true",EU="?cors=true&"+wu[dg]()+"="+rg,CU=(Qc={},Qc[1]=ab,Qc[100]=ab,Qc[200]="sent",Qc[8004]=tg,Qc[8003]=tg,Qc),Ib={},Nb={};Zc(Zf,Zf,!1);Zc(ng,ng);Zc(lb,"Client-Id");Zc(sg,sg);Zc(ig,ig);Zc(og,og);Zc(db,db);yN=(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,ee;Ke(r,this,function(M){vt();var w=!0;M[Jc]=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=Yu(pe[pg],pe[vg]),wr(Ye.anonCookieName)?PU(y,"anoncknm",Ye.anonCookieName):xU(y,"anoncknm"),T=pe[GI],R=pe.payloadListener;var p=pe.httpXHROverride,h=pe[pb]?pe[pb]:Ye.endpointUrl;o=h+EU,H=Fe(pe[vb])?!0:!pe[vb],A=!pe[WI];var P=pe.valueSanitizer,O=pe[zI],Y=!!Ye[mg];Fe(pe[mg])||(Y=!!pe[mg]),oe=pe.xhrTimeout,$=!!pe[mb],G=!!pe[gb],Q=pe[$I]!==!1,D=!!pe[JI],K.getPlugin("LocalStorage")&&(G=!0),l=!oa(),_=new gN(m,P,O,Y,Ru,D),z(pe[hb])||(l=!!pe[hb]),pe[yb]&&(ee=pe[yb]);var W=je();I?I.SetConfig(W):(I=new Hc,I[Jc](W,f));var te=p,Ie=pe[Sb]?p:null,ze=pe[Sb]?p:null,Ce=[3,2];if(!p){S=!1;var gn=[];oa()?(gn=[2,1],Ce=[2,1,3]):gn=[1,2,3],gn=os(gn,pe.transports),p=Le(gn,!1),p||dn(f,"No available transport to send events"),te=Le(gn,!0)}Ie||(Ce=os(Ce,pe[XI]),Ie=Le(Ce,!0)),re=!S&&(l&&Rn()||!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[zc](K,1)}}},M[gg]=function(b){try{if(_)return _.getEventBlob(b)}catch{}return Yi},M[hg]=function(){try{var b=_&&_[yg](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=Nn(p));var h=Sa.create(p[Jn],[p]);J[Tr](h)});for(var ue=null;J[Ve]>0&&_;){var De=J.shift();De&&De[Xt]()>0&&(ue=ue||_[yg](0,!1,!1,!1,1,0),_.appendPayload(ue,De,e))}var Ye=ce(ue,H),pe={data:ue[_b],urlString:Ye.url,headers:Ye[$c],timeout:oe,disableXhrSync:$,disableFetchKeepAlive:G};return H&&(wg(pe[Vi],Qf)||(pe[Vi][Qf]=cb),wg(pe[Vi],wu)||(pe[Vi][wu]=rg)),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:cn},K={enableSendPromise:!1,isOneDs:!0,disableCredentials:!w,fetchCredentials:ee,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 lN,a=!1,c=new aN,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=Yu(),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 cn(b,K,J){var ue=b,De=200,Ye=ue[Ou],pe=b[Tb]+(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[An],!0)}else De=0}catch(Y){dn(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[ku]=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[Sg]=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[Lu]=function(){a=!1,M[ku](0,4)},M[_g]=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=wn(),Y=v[ue]||(pe?v[1]:v[0]),W=Y&&Y[Tg],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||_[yg](K,J,pe,te,De,ue),_.appendPayload(P,Ie,e)?P.overflow!==null&&(b=[P.overflow][bo](b),P.overflow=null,Je(P,O,wn(),De),O=wn(),P=null):(Je(P,O,wn(),De),O=wn(),b=[Ie][bo](b),P=null)))}P&&Je(P,O,wn(),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[$c]=Bc(J[$c],N),J.useHdrs=Vr(J.hdrs)[Ve]>0):me(N,function(p,h){Nb[p]?Vu(J,Nb[p],h,!1):(J[$c][p]=h,J[fg]=!0)}),Vu(J,lb,"NO_AUTH",K),Vu(J,ng,Nu,K);var ue=Yi;V(b.apiKeys,function(p){ue[Ve]>0&&(ue+=","),ue+=p}),Vu(J,sg,ue,K),Vu(J,og,Vt().toString(),K);var De=Qr(b);if(wr(De)&&(J.url+="&ext.intweb.msfpc="+De),c[lg]()&&Vu(J,ig,c[ug](),K),m[Fu]){var Ye=m[Fu]();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[An])&&b[bb]&&b.sendReason===2&&(Ye=v[2]||v[3]||Ye);var pe=H;(b.isBeacon||Ye[Tg]===3)&&(pe=!1);var p=ce(b,pe);pe=pe||p[fg];var h=wn();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[Db]>0?te[Db]++:te[Db]=1}Dr(b[en],1e3+(ue||0),b[An],!0);var ze={data:b[_b],urlString:p.url,headers:p[$c],_thePayload:b,_sendReason:ue,timeout:oe,disableXhrSync:$,disableFetchKeepAlive:G};pe&&(wg(ze[Vi],Qf)||(ze[Vi][Qf]=cb),wg(ze[Vi],wu)||(ze[Vi][wu]=rg));var Ce=null;Ye&&(Ce=function(gn){c[cg]();var zo=function(Zi,yv){st(Zi,yv,b,ue)},hn=b[bg]||b[Eg];try{Ye.sendPOST(gn,zo,hn),R&&R(ze,gn,hn,b[bb])}catch(Zi){dn(f,"Unexpected exception sending payload. Ex:"+fe(Zi)),gr(zo,0,{})}}),Jt(m,function(){return"HttpManager:_doPayloadSend.sender"},function(){if(Ce)if(b[An]===0&&u++,De&&!b.isBeacon&&Ye[Tg]!==3){var gn={data:ze[Mu],urlString:ze[Tb],headers:Bc({},ze[Vi]),timeout:ze[ZI],disableXhrSync:ze[mb],disableFetchKeepAlive:ze[gb]},zo=!1;Jt(m,function(){return"HttpManager:_doPayloadSend.sendHook"},function(){try{T(gn,function(hn){zo=!0,!S&&!hn[Ou]&&(hn[Ou]=hn[Ou]||ze[Ou],hn[Cg]=hn[Cg]||ze[Cg]),Ce(hn)},b.isSync||b[bg])}catch{zo||Ce(ze)}})}else Ce(ze)})},function(){return{thePayload:b,serializationStart:K,serializationCompleted:J,sendReason:ue}},b[Eg])}b.sizeExceed&&b.sizeExceed[Ve]>0&&Dr(b.sizeExceed,8003,b[An]),b.failedEvts&&b.failedEvts[Ve]>0&&Dr(b.failedEvts,8002,b[An])}function We(b,K){A&&V(b,function(J){var ue=J[ap]=J[ap]||{};be(ue,"sendEventCompleted",K)})}function st(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[KI]);var P=K[HI]||K["kill-duration-seconds"];V(s[Pg](K[qI],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}(!fN(b)||J.numEvents<=0)&&(h=!1),De=9e3+b%1e3}if(h){De=100;var O=J.retryCnt;J[An]===0&&(O<n?(pe=!0,Xr(function(){J[An]===0&&u--,Te(J[en],O+1,J[bg],j?2:J[An],5)},j,Ng(O))):(p=!0,j&&(De=8001)))}}finally{pe||(c[rp](),Rt(J,De,ue,p)),Dr(Ye,8004,J[An])}}function Rt(b,K,J,ue){try{ue&&d[xg]();var De=b[en];K===200&&(De=b.sentEvts||b[en],!ue&&!b[Eg]&&d._clearBackOff(),Kt(De)),Dr(De,K,b[An],!0)}finally{b[An]===0&&(u--,J!==5&&M.sendQueuedRequests(b[An],J))}}function Kt(b){if(A){var K=wn();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[Au])&&k.set("MSFPC",ue.webResult[Au],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=jI,b>=9e3&&b<=9999?K=VI:b>=8e3&&b<=8999?K=tg:b>=1e3&&b<=1999&&(K=YI)),K}})}return r.__ieDyn=1,r})()});function AU(r){return r&&r.sendPOST}var DU,_N,IU,EN,CN,NU,TN,RU,Rb,el,bN,dr,wU,PN,xN=E(()=>{bn();Nr();Gc();Rc();Ne();sb();Ig();SN();ep();Pb();xb();Uu();DU=.25,_N=500,IU=20,EN=6,CN=2,NU=4,TN=2,RU=1,Rb=1e4,el="eventsDiscarded",bN="",dr=void 0,wU=no({eventsLimitInMem:{isVal:ha,v:Rb},immediateEventLimit:{isVal:ha,v:500},autoFlushEventsLimit:{isVal:ha,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:EN},maxUnloadEventRetryAttempts:{isVal:Yr,v:CN},addNoResponse:dr,excludeCsMetaData:dr});PN=(function(r){Tn(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=Wc,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,ee){rt(),I._getDbgPlgTargets=function(){return[C,n]},I[Jc]=function(p,h,P){Jt(h,function(){return"PostChannel:initialize"},function(){ee[Jc](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=fn(null,Y,h);n=W.getExtCfg(I[cp],wU),ie=Yu(n[pg],n[vg]),oe=!n[eN]&&Xm(),T=n[tN],w(h),d=n[Eb],l=n.immediateEventLimit,A=n[Cb],G=n.maxEventRetryAttempts,re=n.maxUnloadEventRetryAttempts,R=n[rN],ln(Y.endpointUrl)?I.pause():a&&I[Lu](),pe(),g=n[nN],D=!!n[iN],x&&M();var te=Y.disablePageUnloadEvents||[];x=Bf(pt,te,Q),x=xu(pt,te,Q)||x,x=Du(vt,Y.disablePageShowEvents,Q)||x})),C[Jc](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[hg]();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[Fu];p[Fu]=function(){var P=0;return T&&(P=P|2),P|h.call(p)}}function Le(p){var h=bN;return p&&p[Ve]&&V(p,function(P){h&&(h+=`
`),h+=P}),h}function je(p){var h=bN;try{sr(p),h=C[gg](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[fb]&&delete p.ext[fb],p.ext&&p.ext[ag]&&p.ext[ag].id&&delete p.ext[ag].id,oe&&(p.ext=Nn(p.ext),p[Dg]&&(p[Dg]=Nn(p[Dg])),p[Mu]&&(p[Mu]=Nn(p[Mu])))}function Lr(p,h){if(p[lp]||(p[lp]=0),p[ya]||(p[ya]=1),sr(p),p[Xc]){if(y||a)p[ya]=3,p[Xc]=!1;else if(C){oe&&(p=Nn(p)),C[_g](Sa.create(p[Jn],[p]),p[Xc]===!0?1:p[Xc],3);return}}var P=p[ya],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[ya],te,Ie)&&(W=!be(p,h))}W&&Wo(el,[p],Ri.QueueFull)}I.setEventQueueLimits=function(p,h){n[Eb]=d=ha(p)?p:Rb,n[Cb]=A=ha(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[Lu]=function(){a=!1,C&&C[Lu](),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[zc](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(),st(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](ub,p)},I.removeAuthPluginHeader=function(){C.removeHeader(ub)},I.hasEvents=cn,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=st(p,h,P);return C[ku](h,P),O}function cn(){return u>0}function mt(){if(j>=0&&st(j,0,H)&&C[ku](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&&(cn()?m=Nt(function(){m=null,gr(N===0?3:1,0,1),N++,N%=2,mt()},h):N=0)}I[xg]=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=Rb,f={},v=Wc,m=null,S=null,y=0,N=0,_={},A=0,x=!1,k=0,j=-1,H=null,oe=!0,$=!1,G=EN,re=CN,Q=null,g=null,D=!1,ie=Yu(),C=new yN(_N,TN,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=Ng(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=Sa.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=Nn(p));var P=p[ya],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(el,[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 st(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(el,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[Sg]()?p():s=Nt(function(){s=null,Kt(p)},DU)}function Xr(){St(),Qr(),v=Wc,mt()}function Qr(){f={},f[Wc]=[2,1,0],f[Zm]=[6,3,0],f[eg]=[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[Xc]&&(W[ya]=4,W[Xc]=!1),W[lp]<O?(Xf(W,I[cp]),Lr(W,!1)):P[Tr](W))})}),P[Ve]>0&&Wo(el,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(el,p,h>=8e3&&h<=8999?h-8e3:Ri.Unknown)}function De(p){b(el,p,Ri.NonRetryableStatus),mt()}function Ye(p,h){b(el,p,Ri.Unknown),mt()}function pe(){R?k=0:k=Math.max(_N*(TN+1),d/6)}}),t}return e.__ieDyn=1,e})(ps)});var DN={};Be(DN,{BE_PROFILE:()=>eg,NRT_PROFILE:()=>Zm,PostChannel:()=>PN,RT_PROFILE:()=>Wc});var IN=E(()=>{sb();xN()});var RN=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}),NN=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(()=>NN((Gc(),Hd(UI)))),i=await Promise.resolve().then(()=>NN((IN(),Hd(DN)))),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 wN,ju,qu,up,_a,ji,br,Ag,fi=E(()=>{wN="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",ju="sampleRate",qu="ProcessLegacy",up="http.method",_a="https://dc.services.visualstudio.com",ji="/v2/track",br="not_specified",Ag="iKey"});var tl,wb=E(()=>{at();tl=R_({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,Ta,Ss,_s,Og,fr,qi,ba,kg,Lg,Fg,Ab,Mg,Ug,rl,Hu,Ob,dp,nl,pi,Kr,tn,il,Do,ol,Yg,Vg,kb,sl,Ea,fp,pp,al,Ku,cl,Lb,Er=E(()=>{ys="split",we="length",xo="toLowerCase",Ta="ingestionendpoint",Ss="toString",_s="push",Og="removeItem",fr="name",qi="message",ba="count",kg="preTriggerDate",Lg="disabled",Fg="interval",Ab="daysOfMonth",Mg="date",Ug="getUTCDate",rl="stringify",Hu="pathname",Ob="correlationHeaderExcludePatterns",dp="extensionConfig",nl="exceptions",pi="parsedStack",Kr="properties",tn="measurements",il="sizeInBytes",Do="typeName",ol="severityLevel",Yg="problemGroup",Vg="isManual",kb="CreateFromInterface",sl="assembly",Ea="fileName",fp="hasFullStack",pp="level",al="method",Ku="line",cl="duration",Lb="receivedResponse"});function jg(r,e,t){var n=e[we],i=Fb(r,e);if(i[we]!==n){for(var o=0,s=i;t[s]!==void 0;)o++,s=yr(i,0,147)+Mb(o);i=s}return i}function Fb(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 Ca(r,e){return Kg(r,e,2048,66)}function Bu(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 qg(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(Yt(i)&&fo())try{i=qr()[rl](i)}catch(o){X(r,2,49,"custom property is not valid",{exception:o},!0)}i=ut(r,i,8192),n=jg(r,n,t),t[n]=i}),e=t}return e}function nn(r,e){if(e){var t={};me(e,function(n,i){n=jg(r,n,t),t[n]=i}),e=t}return e}function Hg(r,e){return e&&Kg(r,e,128,69)[Ss]()}function Kg(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 Mb(r){var e="00"+r;return io(e,e[we]-3)}var vi=E(()=>{at();Ne();Er()});function ll(r){var e=ON,t=MU,n=t[e];return AN.createElement?t[e]||(n=t[e]=AN.createElement("a")):n={host:Ub(r,!0)},n.href=r,e++,e>=t[we]&&(e=0),ON=e,n}function kN(r){var e,t=ll(r);return t&&(e=t.href),e}function LN(r){var e,t=ll(r);return t&&(e=t[Hu]),e}function FN(r,e){return r?r.toUpperCase()+" "+e:e}function Ub(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 AN,ON,MU,Yb=E(()=>{at();Er();AN=zt()||{},ON=0,MU=[null,null,null,null,null]});function mp(r){return Ze(UU,r[xo]())!==-1}function MN(r){Vb=r}function UN(){return Vb}function YN(r,e,t){if(!e||r&&r.disableCorrelationHeaders)return!1;if(r&&r[Ob]){for(var n=0;n<r.correlationHeaderExcludePatterns[we];n++)if(r[Ob][n].test(e))return!1}var i=ll(e).host[xo]();if(i&&(_n(i,":443")!==-1||_n(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 VN(r){if(r){var e=jb(r,tl[1]);if(e&&e!==Vb)return e}}function jb(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 jN(r,e,t,n){var i,o=n,s=n;if(e&&e[we]>0){var a=ll(e);if(i=a.host,!o)if(a[Hu]!=null){var c=a.pathname[we]===0?"/":a[Hu];c.charAt(0)!=="/"&&(c="/"+c),s=a[Hu],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 qN(){var r=Ws();if(r&&r.now&&r.timing){var e=r.now()+r.timing.navigationStart;if(e>0)return e}return Vt()}function HN(r,e){var t=null;return r!==0&&e!==0&&!z(r)&&!z(e)&&(t=e-r),t}function KN(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,Vb,qb=E(()=>{at();Ne();fi();wb();vi();Yb();Er();UU=[_a+ji,"https://breeze.aimon.applicationinsights.io"+ji,"https://dc-int.services.visualstudio.com"+ji],Vb="cid-v1:"});var Gu,BN,GN,Hb=E(()=>{at();Gu=$t({LocalStorage:0,SessionStorage:1}),BN=$t({AI:0,AI_AND_W3C:1,W3C:2}),GN=$t({Normal:1,Critical:2})});function Kb(){return Wu()?Bg(Gu.LocalStorage):null}function Bg(r){try{if(z(un()))return null;var e=new Date()[Ss](),t=Pe(r===Gu.LocalStorage?"localStorage":"sessionStorage"),n=WN+e;t.setItem(n,e);var i=t.getItem(n)!==e;if(t[Og](n),!i)return t}catch{}return null}function Bb(){return ul()?Bg(Gu.SessionStorage):null}function zN(){Pa=!1,xa=!1}function Gg(r){WN=r||""}function $N(){Pa=Wu(!0),xa=ul(!0)}function Wu(r){return(r||Pa===void 0)&&(Pa=!!Bg(Gu.LocalStorage)),Pa}function Wg(r,e){var t=Kb();if(t!==null)try{return t.getItem(e)}catch(n){Pa=!1,X(r,2,1,"Browser failed read of local storage. "+_t(n),{exception:fe(n)})}return null}function zg(r,e,t){var n=Kb();if(n!==null)try{return n.setItem(e,t),!0}catch(i){Pa=!1,X(r,2,3,"Browser failed write to local storage. "+_t(i),{exception:fe(i)})}return!1}function JN(r,e){var t=Kb();if(t!==null)try{return t[Og](e),!0}catch(n){Pa=!1,X(r,2,5,"Browser failed removal of local storage item. "+_t(n),{exception:fe(n)})}return!1}function ul(r){return(r||xa===void 0)&&(xa=!!Bg(Gu.SessionStorage)),xa}function XN(){var r=[];return ul()&&me(Pe("sessionStorage"),function(e){r[_s](e)}),r}function $g(r,e){var t=Bb();if(t!==null)try{return t.getItem(e)}catch(n){xa=!1,X(r,2,2,"Browser failed read of session storage. "+_t(n),{exception:fe(n)})}return null}function Jg(r,e,t){var n=Bb();if(n!==null)try{return n.setItem(e,t),!0}catch(i){xa=!1,X(r,2,4,"Browser failed write to session storage. "+_t(i),{exception:fe(i)})}return!1}function Xg(r,e){var t=Bb();if(t!==null)try{return t[Og](e),!0}catch(n){xa=!1,X(r,2,6,"Browser failed removal of session storage item. "+_t(n),{exception:fe(n)})}return!1}var Pa,xa,WN,Gb=E(()=>{at();Hb();Er();Pa=void 0,xa=void 0,WN=""});var YU,QN,ZN=E(()=>{at();Ne();Gb();Er();YU="appInsightsThrottle",QN=(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),ee=C(D,i,I),M=!1,w=0,Le=Q(T);try{ee&&!Le?(w=Math.min(D.limit.maxSendNumber,I[ba]+1),I[ba]=0,M=!0,c[T]=!0,I[kg]=new Date):(c[T]=ee,I[ba]+=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=Wu();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[Lg]=!!g[Lg];var I=g[Fg]||{};f=I?.daysOfMonth&&I?.daysOfMonth[we]>0,D[Fg]=N(I);var ee={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=ee,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[Ab]=[28],f=!0)),T={monthInterval:T?.monthInterval,dayInterval:T?.dayInterval,daysOfMonth:T?.daysOfMonth},T}function C(T,R,B){if(T&&!T[Lg]&&R&&li(B)){var x=j(),g=B[Mg],D=T[Fg],I=1;if(D?.monthInterval){var ee=(x.getUTCFullYear()-g.getUTCFullYear())*12+x.getUTCMonth()-g.getUTCMonth();I=oe(D.monthInterval,0,ee)}var M=1;if(f)M=Ze(D[Ab],x[Ug]());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[Ug]()===R[Ug]()}}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[Mg])||x[Mg],count:g[ba]||x[ba],preTriggerDate:g.preTriggerDate?j(g[kg]):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 zg(T,R,nt(JSON[rl](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(Wg(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[kg])),c[T]=R}return c[T]}function ie(T){return u=u||{},z(u[T])&&(u[T]=[]),u[T]}}return r})()});function dl(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[Ta]=t[Ta]||"https://"+n+"dc."+t.endpointsuffix}t[Ta]=t[Ta]||_a,_c(t[Ta],"/")&&(t[Ta]=t[Ta].slice(0,-1))}return t}var VU,jU,eR,tR=E(()=>{at();fi();Er();VU=";",jU="=";eR={parse:dl}});var Qg,rR=E(()=>{at();fi();Er();vi();Qg=(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,nR=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 Jb(r,e){var t=r;return t&&!Oe(t)&&(JSON&&JSON[rl]?(t=JSON[rl](r),e&&(!t||t==="{}")&&(Ee(r[Ss])?t=r[Ss]():t=""+r)):t=""+r+" - (Missing JSON.stringify)"),t||""}function cR(r,e){var t=r;return r&&(t&&!Oe(t)&&(t=r[$b]||r[aR]||t),t&&!Oe(t)&&(t=Jb(t,!0)),r.filename&&(t=t+" @"+(r.filename||"")+":"+(r.lineno||"?")+":"+(r.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&_n(t||"",e)===-1&&(t=e+": "+t),t||""}function HU(r){try{if(Yt(r))return"hasFullStack"in r&&"typeName"in r}catch{}return!1}function KU(r){try{if(Yt(r))return"ver"in r&&"exceptions"in r&&"properties"in r}catch{}return!1}function oR(r){return r&&r.src&&Oe(r.src)&&r.obj&&de(r.obj)}function fl(r){var e=r||"";Oe(e)||(Oe(e[On])?e=e[On]: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 lR(r){var e=null;if(r)try{if(r[On])e=fl(r[On]);else if(r[zu]&&r[zu][On])e=fl(r[zu][On]);else if(r.exception&&r.exception[On])e=fl(r.exception[On]);else if(oR(r))e=r;else if(oR(r[zb]))e=r[zb];else if(cr()&&cr().opera&&r[$b])e=BU(r[qi]);else if(r.reason&&r.reason[On])e=fl(r.reason[On]);else if(Oe(r))e=fl(r);else{var t=r[$b]||r[aR]||"";Oe(r[iR])&&(t&&(t+=`
`),t+=" from "+r[iR]),t&&(e=fl(t))}}catch(n){e=fl(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(Xb.regex.test(S)){var y=new Xb(S,n++);i+=y[il],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][il],f=e[a][il];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 Zg(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 Wb(r){if(r)try{if(!Oe(r)){var e=Zg(r),t=Jb(r,!1);return(!t||t==="{}")&&(r[zu]&&(r=r[zu],e=Zg(r)),t=Jb(r,!0)),_n(t,e)!==0&&e!=="String"?e+":"+t:t}}catch{}return""+(r||"")}var qU,zu,On,zb,iR,$b,aR,Da,sR,Xb,uR=E(()=>{bn();at();Ne();fi();Er();vi();qU="<no_method>",zu="error",On="stack",zb="stackDetails",iR="errorSrc",$b="message",aR="description";Da=(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[nl]=t[nl]||[],a[Kr]=t[Kr],a[tn]=t[tn],t[ol]&&(a[ol]=t[ol]),t.id&&(a.id=t.id,t[Kr].id=t.id),t[Yg]&&(a[Yg]=t[Yg]),z(t[Vg])||(a[Vg]=t[Vg])):(n||(n={}),s&&(n.id=s),a[nl]=[new sR(e,t,n)],a[Kr]=rn(e,n),a[tn]=nn(e,i),o&&(a[ol]=o),s&&(a.id=s))}return r.CreateAutoException=function(e,t,n,i,o,s,a,c){var l,u=Zg(o||s||e);return l={},l[qi]=cR(e,u),l.url=t,l.lineNumber=n,l.columnNumber=i,l.error=Wb(o||s||e),l.evt=Wb(s||e),l[Do]=u,l.stackDetails=lR(a||o||s),l.errorSrc=c,l},r.CreateFromInterface=function(e,t,n,i){var o=t[nl]&&Xo(t[nl],function(a){return sR[kb](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[nl]=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=Wb,r})(),sR=(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[On]=t[On],i[pi]=t[pi]||[],i[fp]=t[fp];else{var o=t,s=o&&o.evt;gc(o)||(o=o[zu]||s||o),i[Do]=ut(e,Zg(o))||br,i[qi]=Bu(e,cR(t||o,i[Do]))||br;var a=t[zb]||lR(t);i[pi]=WU(a),de(i[pi])&&Xo(i[pi],function(c){c[sl]=ut(e,c[sl]),c[Ea]=ut(e,c[Ea])}),i[On]=qg(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[On]},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 Xb[kb](o)})||t[pi],i=new r(e,si(si({},t),{parsedStack:n}));return i},r})(),Xb=(function(){function r(e,t){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var n=this;if(n[il]=0,typeof e=="string"){var i=e;n[pp]=t,n[al]=qU,n[sl]=nt(i),n[Ea]="",n[Ku]=0;var o=i.match(r.regex);o&&o[we]>=5&&(n[al]=nt(o[2])||n[al],n[Ea]=nt(o[4]),n[Ku]=parseInt(o[5])||0)}else n[pp]=e[pp],n[al]=e[al],n[sl]=e[sl],n[Ea]=e[Ea],n[Ku]=e[Ku],n[il]=0;n.sizeInBytes+=n.method[we],n.sizeInBytes+=n.fileName[we],n.sizeInBytes+=n.assembly[we],n[il]+=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[al],assembly:e[sl],fileName:e[Ea],line:e[Ku]}},r.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,r.baseSize=58,r})()});var dR,fR=E(()=>{dR=(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,pR=E(()=>{fi();Er();fR();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 dR;d[ba]=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 vR(r,e){return e===void 0&&(e=!1),r==null?e:r.toString()[xo]()==="true"}function $u(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 mR(r,e){var t=null;return V(r,function(n){if(n.identifier===e)return t=n,-1}),t}function gR(r,e,t,n,i){return!i&&Oe(r)&&(r==="Script error."||r==="Script error")}var gp,eh=E(()=>{at();Er();gp=""});var Ia,hR=E(()=>{fi();eh();Er();vi();Ia=(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=Hg(e,a),c.url=Ca(e,n),c[fr]=ut(e,t)||br,isNaN(i)||(c[cl]=$u(i)),c[Kr]=rn(e,o),c[tn]=nn(e,s)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",r.dataType="PageviewData",r})()});var Na,yR=E(()=>{eh();qb();Er();vi();Na=(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[cl]=$u(o),v.success=s,v.resultCode=a+"",v.type=ut(e,l);var m=jN(e,n,c,i);v.data=Ca(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 Ra,SR=E(()=>{fi();Er();vi();Ra=(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]=Bu(e,t),s[Kr]=rn(e,i),s[tn]=nn(e,o),n&&(s[ol]=n)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.Message",r.dataType="MessageData",r})()});var wa,_R=E(()=>{fi();Er();vi();wa=(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=Ca(e,n),c[fr]=ut(e,t)||br,c[Kr]=rn(e,o),c[tn]=nn(e,s),a&&(c.domProcessing=a.domProcessing,c[cl]=a[cl],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c[Lb]=a[Lb],c.sentRequest=a.sentRequest)}return r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",r.dataType="PageviewPerformanceData",r})()});var Ro,TR=E(()=>{Ro=(function(){function r(e,t){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=t}return r})()});var th,bR=E(()=>{at();th=$t({Verbose:0,Information:1,Warning:2,Error:3,Critical:4})});var ER,CR=E(()=>{at();Er();ER=(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 Oa(r){var e="ai."+r+".";return function(t){return e+t}}var hp,Cr,rh,Ju,Qb,Aa,pl,yp,Xu,Zb=E(()=>{bn();at();hp=Oa("application"),Cr=Oa("device"),rh=Oa("location"),Ju=Oa("operation"),Qb=Oa("session"),Aa=Oa("user"),pl=Oa("cloud"),yp=Oa("internal"),Xu=(function(r){Tn(e,r);function e(){return r.call(this)||this}return e})(X_({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:rh("ip"),locationCountry:rh("country"),locationProvince:rh("province"),locationCity:rh("city"),operationId:Ju("id"),operationName:Ju("name"),operationParentId:Ju("parentId"),operationRootId:Ju("rootId"),operationSyntheticSource:Ju("syntheticSource"),operationCorrelationVector:Ju("correlationVector"),sessionId:Qb("id"),sessionIsFirst:Qb("isFirst"),sessionIsNew:Qb("isNew"),userAccountAcquisitionDate:Aa("accountAcquisitionDate"),userAccountId:Aa("accountId"),userAgent:Aa("userAgent"),userId:Aa("id"),userStoreRegion:Aa("storeRegion"),userAuthUserId:Aa("authUserId"),userAnonymousUserAcquisitionDate:Aa("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Aa("authUserAcquisitionDate"),cloudName:pl("name"),cloudRole:pl("role"),cloudRoleVer:pl("roleVer"),cloudRoleInstance:pl("roleInstance"),cloudEnvironment:pl("environment"),cloudLocation:pl("location"),cloudDeploymentUnit:pl("deploymentUnit"),internalNodeName:yp("nodeName"),internalSdkVersion:yp("sdkVersion"),internalAgentVersion:yp("agentVersion"),internalSnippet:yp("snippet"),internalSdkSrc:yp("sdkSrc")}))});function eE(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[Ag]&&(a=r[Ag],delete r[Ag]);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 PR,xR=E(()=>{at();fi();vi();Er();PR=(function(){function r(){}return r.create=eE,r})()});var DR,nr,IR=E(()=>{Zb();DR={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},nr=new Xu});function NR(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 RR=E(()=>{at()});function wR(r,e){ms(r,null,null,e)}function nh(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(wR(_,c),e){var A=e.body||e;Fe(A.ononline)||wR(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 AR=E(()=>{at();Er()});var OR={};Be(OR,{AnalyticsPluginIdentifier:()=>$U,BreezeChannelIdentifier:()=>tE,ConfigurationManager:()=>ER,ConnectionStringParser:()=>eR,ContextTagKeys:()=>Xu,CtxTagKeys:()=>nr,DEFAULT_BREEZE_ENDPOINT:()=>_a,DEFAULT_BREEZE_PATH:()=>ji,Data:()=>Ro,DisabledPropertyName:()=>wN,DistributedTracingModes:()=>BN,Envelope:()=>Qg,Event:()=>Io,EventPersistence:()=>GN,Exception:()=>Da,Extensions:()=>DR,HttpMethod:()=>up,Metric:()=>No,PageView:()=>Ia,PageViewPerformance:()=>wa,ProcessLegacy:()=>qu,PropertiesPluginIdentifier:()=>zU,RemoteDependencyData:()=>Na,RequestHeaders:()=>tl,SampleRate:()=>ju,SeverityLevel:()=>th,TelemetryItemCreator:()=>PR,ThrottleMgr:()=>QN,Trace:()=>Ra,correlationIdCanIncludeCorrelationHeader:()=>YN,correlationIdGetCorrelationContext:()=>VN,correlationIdGetCorrelationContextValue:()=>jb,correlationIdGetPrefix:()=>UN,correlationIdSetPrefix:()=>MN,createDistributedTraceContextFromTrace:()=>KN,createDomEvent:()=>NR,createOfflineListener:()=>nh,createTelemetryItem:()=>eE,createTraceParent:()=>Lf,dataSanitizeException:()=>qg,dataSanitizeId:()=>Hg,dataSanitizeInput:()=>Kg,dataSanitizeKey:()=>Fb,dataSanitizeKeyAndAddUniqueness:()=>jg,dataSanitizeMeasurements:()=>nn,dataSanitizeMessage:()=>Bu,dataSanitizeProperties:()=>rn,dataSanitizeString:()=>ut,dataSanitizeUrl:()=>Ca,dateTimeUtilsDuration:()=>HN,dateTimeUtilsNow:()=>qN,dsPadNumber:()=>Mb,findAllScripts:()=>MT,findW3cTraceParent:()=>Uf,formatTraceParent:()=>Mf,getExtensionByName:()=>mR,isBeaconApiSupported:()=>Rn,isCrossOriginError:()=>gR,isInternalApplicationInsightsEndpoint:()=>mp,isSampledFlag:()=>Ff,isValidSpanId:()=>go,isValidTraceId:()=>mo,isValidTraceParent:()=>Eu,msToTimeSpan:()=>$u,parseConnectionString:()=>dl,parseTraceParent:()=>Vc,strNotSpecified:()=>br,stringToBoolOrDefault:()=>vR,urlGetAbsoluteUrl:()=>kN,urlGetCompleteUrl:()=>FN,urlGetPathName:()=>LN,urlParseFullHost:()=>vp,urlParseHost:()=>Ub,urlParseUrl:()=>ll,utlCanUseLocalStorage:()=>Wu,utlCanUseSessionStorage:()=>ul,utlDisableStorage:()=>zN,utlEnableStorage:()=>$N,utlGetLocalStorage:()=>Wg,utlGetSessionStorage:()=>$g,utlGetSessionStorageKeys:()=>XN,utlRemoveSessionStorage:()=>Xg,utlRemoveStorage:()=>JN,utlSetLocalStorage:()=>zg,utlSetSessionStorage:()=>Jg,utlSetStoragePrefix:()=>Gg});var zU,tE,$U,Ts=E(()=>{qb();ZN();tR();wb();fi();rR();nR();uR();pR();hR();yR();SR();_R();TR();bR();CR();Zb();vi();xR();IR();Hb();eh();at();RR();Gb();Yb();AR();zU="AppInsightsPropertiesPlugin",tE="AppInsightsChannelPlugin",$U="ApplicationInsightsAnalytics"});var nE=le(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.TelemetryUtil=void 0;var rE=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}};ih.TelemetryUtil=rE});var ka,kR=E(()=>{ka="duration"});var pr,oh,Br,wo,vl,Ue,La,Fa,mi,Ma,bs,Qu,Es,Cs,sh,gi,Zu,Sp,Ua,_p,ed,ml,Tp,ah,Ps,Ya,td,rd,Gr,ch,nd,id,od,lh,iE,uh,dh,oE,fh,sE,xs,aE,cE,lE,bp,uE,dE,fE,sd,Va,ph,Ep,vh,mh,gh,hh,ad,pE,yh,LR,ja=E(()=>{pr="tags",oh="deviceType",Br="data",wo="name",vl="traceID",Ue="length",La="stringify",Fa="measurements",mi="dataType",Ma="envelopeType",bs="toString",Qu="_get",Es="enqueue",Cs="count",sh="eventsLimitInMem",gi="push",Zu="item",Sp="emitLineDelimitedJson",Ua="clear",_p="createNew",ed="markAsSent",ml="clearSent",Tp="bufferOverride",ah="BUFFER_KEY",Ps="SENT_BUFFER_KEY",Ya="concat",td="MAX_BUFFER_SIZE",rd="triggerSend",Gr="diagLog",ch="initialize",nd="_sender",id="endpointUrl",od="instrumentationKey",lh="customHeaders",iE="maxBatchSizeInBytes",uh="onunloadDisableBeacon",dh="isBeaconApiDisabled",oE="alwaysUseXhrOverride",fh="disableXhr",sE="enableSessionStorageBuffer",xs="_buffer",aE="onunloadDisableFetch",cE="disableSendBeaconSplit",lE="enableSendPromise",bp="getSenderInst",uE="unloadTransports",dE="convertUndefined",fE="maxBatchInterval",sd="serialize",Va="_onError",ph="_onPartialSuccess",Ep="_onSuccess",vh="itemsReceived",mh="itemsAccepted",gh="oriPayload",hh="baseType",ad="sampleRate",pE="eventsSendRequest",yh="getSamplingScore",LR="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[oh],c.deviceClass),ir(n,nr.deviceIp,c.ip),ir(n,nr.deviceModel,c.model),ir(n,nr[oh],c[oh]));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?FR:null),ir(f,"screenRes",l.screenRes),ir(f,"userConsent",l.userConsent?FR: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[vl]));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]=Nn(C)}function qa(r,e,t){z(r)||me(r,function(n,i){Yr(i)?t[n]=i:Oe(i)?e[n]=i:fo()&&(e[n]=qr()[La](i))})}function gl(r,e){z(r)||me(r,function(t,n){r[t]=n||e})}function hl(r,e,t,n){var i=new Qg(r,n,e);ir(i,"sampleRate",t[ju]),(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]||[],Nn(i)}function yl(r,e){z(e[Ot])&&X(r,1,46,"telemetryItem.baseData cannot be null.")}function MR(r,e,t){yl(r,e);var n=e[Ot][Fa]||{},i=e[Ot][Ar]||{};qa(e[Br],i,n),z(t)||gl(i,t);var o=e[Ot];if(z(o))return dn(r,"Invalid input for dependency data"),null;var s=o[Ar]&&o[Ar][up]?o[Ar][up]:"GET",a=new Na(r,o.id,o.target,o[wo],o[ka],o.success,o.responseCode,s,o.type,o.correlationContext,i,n),c=new Ro(Na[mi],a);return hl(r,Na[Ma],e,c)}function mE(r,e,t){yl(r,e);var n={},i={};e[vE]!==Io[mi]&&(n.baseTypeSource=e[vE]),e[vE]===Io[mi]?(n=e[Ot][Ar]||{},i=e[Ot][Fa]||{}):e[Ot]&&qa(e[Ot],n,i),qa(e[Br],n,i),z(t)||gl(n,t);var o=e[Ot][wo],s=new Io(r,o,n,i),a=new Ro(Io[mi],s);return hl(r,Io[Ma],e,a)}function UR(r,e,t){yl(r,e);var n=e[Ot][Fa]||{},i=e[Ot][Ar]||{};qa(e[Br],i,n),z(t)||gl(i,t);var o=e[Ot],s=Da.CreateFromInterface(r,o,i,n),a=new Ro(Da[mi],s);return hl(r,Da[Ma],e,a)}function YR(r,e,t){yl(r,e);var n=e[Ot],i=n[Ar]||{},o=n[Fa]||{};qa(e[Br],i,o),z(t)||gl(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 hl(r,No[Ma],e,a)}function VR(r,e,t){yl(r,e);var n,i=e[Ot];!z(i)&&!z(i[Ar])&&!z(i[Ar][ka])?(n=i[Ar][ka],delete i[Ar][ka]):!z(e[Br])&&!z(e[Br][ka])&&(n=e[Br][ka],delete e[Br][ka]);var o=e[Ot],s;((e.ext||{}).trace||{})[vl]&&(s=e.ext.trace[vl]);var a=o.id||s,c=o[wo],l=o.uri,u=o[Ar]||{},d=o[Fa]||{};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})}qa(e[Br],u,d),z(t)||gl(u,t);var v=new Ia(r,c,l,n,u,d,a),m=new Ro(Ia[mi],v);return hl(r,Ia[Ma],e,m)}function jR(r,e,t){yl(r,e);var n=e[Ot],i=n[wo],o=n.uri||n.url,s=n[Ar]||{},a=n[Fa]||{};qa(e[Br],s,a),z(t)||gl(s,t);var c=new wa(r,i,o,void 0,s,a,n),l=new Ro(wa[mi],c);return hl(r,wa[Ma],e,l)}function qR(r,e,t){yl(r,e);var n=e[Ot].message,i=e[Ot].severityLevel,o=e[Ot][Ar]||{},s=e[Ot][Fa]||{};qa(e[Br],o,s),z(t)||gl(o,t);var a=new Ra(r,n,i,o,s),c=new Ro(Ra[mi],a);return hl(r,Ra[Ma],e,c)}var vE,Ot,Ar,FR,XU,HR=E(()=>{bn();Ts();at();kR();ja();vE="baseType",Ot="baseData",Ar="properties",FR="true";XU={Version:"3.3.4"}});var KR,Sh,QU,gE,BR=E(()=>{bn();Nr();Ts();at();ja();KR=(function(){function r(e,t){var n=[],i=!1,o=t.maxRetryCnt;this[Qu]=function(){return n},this._set=function(s){return n=s,n},Ke(r,this,function(s){s[Es]=function(a){if(s[Cs]()>=t[sh]){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[Ua]=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[Zu])});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 gE(a,c):new Sh(a,c);return V(u,function(f){d[Es](f)}),d}})}return r.__ieDyn=1,r})(),Sh=(function(r){Tn(e,r);function e(t,n){var i=r.call(this,t,n)||this;return Ke(e,i,function(o,s){o[ed]=function(a){s[Ua]()},o[ml]=function(a){}}),i}return e.__ieDyn=1,e})(KR),QU=["AI_buffer","AI_sentBuffer"],gE=(function(r){Tn(e,r);function e(n,i){var o=r.call(this,n,i)||this,s=!1,a=i?.namePrefix,c=i[Tp]||{getItem:$g,setItem:Jg},l=c.getItem,u=c.setItem,d=i.maxRetryCnt;return Ke(e,o,function(f,v){var m=A(e[ah]),S=A(e[Ps]),y=H(),N=S[Ya](y),C=f._set(m[Ya](N));C[Ue]>e[td]&&(C[Ue]=e[td]),j(e[Ps],[]),j(e[ah],C),f[Es]=function($){if(f[Cs]()>=e[td]){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[Qu]()))},f[Ua]=function(){v[Ua](),j(e.BUFFER_KEY,f[Qu]()),j(e[Ps],[]),s=!1},f[ed]=function($){j(e[ah],f._set(_($,f[Qu]())));var G=A(e[Ps]);G instanceof Array&&$ instanceof Array&&(G=G[Ya]($),G[Ue]>e[td]&&(X(n,1,67,"Sent buffer reached its maximum size: "+G[Ue],!0),G[Ue]=e[td]),j(e[Ps],G))},f[ml]=function($){var G=A(e[Ps]);G=_($,G),j(e[Ps],G)},f[_p]=function($,G,re){re=!!re;var Q=f[Qu]().slice(0),ie=A(e[Ps]).slice(0);$=$||n,G=G||{},f[Ua]();var T=re?new e($,G):new Sh($,G);return V(Q,function(R){T[Es](R)}),re&&T[ed](ie),T};function _($,G){var re=[],Q=[];return V($,function(ie){Q[gi](ie[Zu])}),V(G,function(ie){!Ee(ie)&&Ze(Q,ie[Zu])===-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[La](G);u(n,re,Q)}catch(ie){u(n,re,JSON[La]([])),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($=$[Ya](re),a){var Q=a+"_"+G,ie=oe(Q);$=$[Ya](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)}),Xg(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})(KR)});var GR,WR=E(()=>{Nr();at();ja();GR=(function(){function r(e){Ke(r,this,function(t){t[sd]=function(s){var a=n(s,"root");try{return qr()[La](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()[La](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=Yt(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,zR,$R=E(()=>{ja();ZU=8,zR=(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[Ya](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 JR,XR=E(()=>{Ts();ja();$R();JR=(function(){function r(){var e=this,t=new zR,n=new Xu;e[yh]=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[LR](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[vl]?o=t.getHashCodeScore(i.ext.telemetryTrace[vl]):o=Math.random()*100,o}}return r})()});var QR,ZR=E(()=>{Ts();at();ja();XR();QR=(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[ad]=e,this.samplingScoreGenerator=new JR}return r.prototype.isSampledIn=function(e){var t=this[ad],n=!1;return t==null||t>=100||e.baseType===No[mi]?!0:(n=this.samplingScoreGenerator[yh](e)<t,n)},r})()});function tw(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,ew,eY,rw,nY,Cp,nw=E(()=>{bn();Nr();Ts();at();Ne();HR();BR();WR();ZR();ja();Ao=void 0,ew="",eY=65e3;rw=no((Dt={endpointUrl:Su(Di,_a+ji)},Dt[Sp]=di(),Dt[fE]=15e3,Dt[iE]=102400,Dt.disableTelemetry=di(),Dt[sE]=di(!0),Dt.isRetryDisabled=di(),Dt[dh]=di(!0),Dt[cE]=di(!0),Dt[fh]=di(),Dt[aE]=di(),Dt[uh]=di(),Dt[od]=Ao,Dt.namePrefix=Ao,Dt.samplingPercentage=Su(rY,100),Dt[lh]=Ao,Dt[dE]=Ao,Dt[sh]=1e4,Dt[Tp]=!1,Dt.httpXHROverride={isVal:tY,v:Ao},Dt[oE]=di(),Dt.transports=Ao,Dt.retryCodes=Ao,Dt.maxRetryCnt={isVal:Yr,v:10},Dt));nY=(Ds={},Ds[Io.dataType]=mE,Ds[Ra.dataType]=qR,Ds[Ia.dataType]=VR,Ds[wa.dataType]=jR,Ds[Da.dataType]=UR,Ds[No.dataType]=YR,Ds[Na.dataType]=MR,Ds),Cp=(function(r){Tn(e,r);function e(){var t=r.call(this)||this;t.priority=1001,t.identifier=tE;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,ee,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[rd](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[rd](!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[ch]=function(p,h,P,O){w.isInitialized()&&X(w[Gr](),1,28,"Sender is already initialized"),Le[ch](p,h,P,O);var Y=w.identifier;c=new GR(h.logger),n=0,i=null,o=0,w[nd]=null,l=0;var W=w[Gr]();m=$n(Hr("Sender"),h.evtNamespace&&h.evtNamespace()),v=nh(m),w._addHook(ur(p,function(te){var Ie=te.cfg;Ie.storagePrefix&&Gg(Ie.storagePrefix);var ze=fn(null,Ie,h),Ce=ze.getExtCfg(Y,rw),gn=Ce[id];if(S&&gn===S){var zo=Ie[id];zo&&zo!==gn&&(Ce[id]=zo)}ln(Ce[od])&&(Ce[od]=Ie[od]),Qe(w,"_senderConfig",{g:function(){return Ce}}),y!==Ce[id]&&(S=y=Ce[id]),h.activeStatus()===qn.PENDING?w.pause():h.activeStatus()===qn.ACTIVE&&w.resume(),k&&k!==Ce[lh]&&V(k,function(Fr){delete u[Fr.header]}),N=Ce[iE],C=(Ce[uh]===!1||Ce[dh]===!1)&&Rn(),_=Ce[uh]===!1&&Rn(),A=Ce[dh]===!1&&Rn(),R=Ce[oE],B=!!Ce[fh],M=Ce.retryCodes;var hn=Ce[Tp],Zi=!!Ce[sE]&&(!!hn||ul()),yv=Ce.namePrefix,tF=Zi!==re||Zi&&ie!==yv||Zi&&Q!==hn;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 gE(W,Ce):new Sh(W,Ce);ie=yv,re=Zi,Q=hn,x=!Ce[aE]&&as(!0),I=!!Ce[cE],w._sample=new QR(Ce.samplingPercentage,W),H=Ce[od],!ln(H)&&!Ye(H,Ie)&&X(W,1,100,"Invalid Instrumentation key "+H),k=Ce[lh],Oe(S)&&!mp(S)&&k&&k[Ue]>0?V(k,function(Fr){t.addHeader(Fr.header,Fr.value)}):k=null,T=Ce[lE];var rx=pt();ee?ee.SetConfig(rx):(ee=new Hc,ee[ch](rx,W));var Sv=Ce.httpXHROverride,_v=null,qd=null,rF=os([3,1,2],Ce.transports);_v=ee&&ee[bp](rF,!1);var FS=ee&&ee.getFallbackInst();g=function(Fr,fc){return ce(FS,Fr,fc)},D=function(Fr,fc){return ce(FS,Fr,fc,!1)},_v=R?Sv:_v||Sv||FS,w[nd]=function(Fr,fc){return ce(_v,Fr,fc)},x&&(f=ni);var MS=os([3,1],Ce[uE]);x||(MS=MS.filter(function(Fr){return Fr!==2})),qd=ee&&ee[bp](MS,!0),qd=R?Sv:qd||Sv,(R||Ce[uE]||!f)&&qd&&(f=function(Fr,fc){return ce(qd,Fr,fc)}),f||(f=g),j=Ce.disableTelemetry,oe=Ce[dE]||Ao,$=Ce.isRetryDisabled,G=Ce[fE]}))},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[sd](W),Ie=w[xs];We(te);var ze=(P={},P[Zu]=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[rd]=function(p,h,P){p===void 0&&(p=!0);var O;if(!s)try{var Y=w[xs];if(j)Y[Ua]();else{if(Y[Cs]()>0){var W=Y.getItems();De(P||0,p),h?O=h.call(w,W,p):O=w[nd](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[sd]=Nt,p.batch=St,p.shouldProcess=function(h){return!!mt(h)},p},w._doTeardown=function(p,h){w.onunloadFlush(),ls(v,!1),pe()},w[Va]=function(p,h,P){if(!Qr(p))return sr(p,h,P)},w[ph]=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=tw(p);if(p&&(P+""=="200"||P===""))n=0,w[Ep](h,0);else{var O=qc(P);O&&O[vh]&&O[vh]>O[mh]&&!$?w[ph](h,O):w[Va](h,kc(p))}}function pt(){var p;try{var h={xdrOnComplete:function(O,Y,W){var te=cn(W);if(te)return je(O,te)},fetchOnComplete:function(O,Y,W,te){var Ie=cn(te);if(Ie)return st(O.status,Ie,O.url,Ie[Ue],O.statusText,W||"")},xhrOnComplete:function(O,Y,W){var te=cn(W);if(te)return vt(O,te,te[Ue])},beaconOnRetry:function(O,Y,W){return Xr(O,Y,W)}},P=(p={},p[lE]=T,p.isOneDs=!1,p.disableCredentials=!1,p[fh]=B,p.disableBeacon=!A,p.disableBeaconSync=!_,p.senderOnCompleteCallBack=h,p);return P}catch{}return null}function vt(p,h,P){p.readyState===4&&st(p.status,h,p.responseURL,P,is(p),tw(p)||p.response)}function sr(p,h,P){X(w[Gr](),2,26,"Failed to send telemetry.",{message:h}),w._buffer&&w._buffer[ml](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[mh]),P[Ue]>0&&w[Va](P,is(null,["partial success",h[mh],"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[vh]+" items"))}function gr(p,h){w._buffer&&w._buffer[ml](p)}function cn(p){try{if(p){var h=p,P=h[gh];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[hh])return h&&X(h,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(p[hh]||(p[hh]="EventData"),!w[nd])return h&&X(h,1,28,"Sender was not initialized"),!1;if(ne(p))p[ju]=w._sample[ad];else return h&&X(h,2,33,"Telemetry item was sampled out and not sent",{SampleRate:w._sample[ad]}),!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][qu]&&(V(p[pr][qu],function(W){try{W&&W(O)===!1&&(Y=!0,dn(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][qu]),!Y)return O}function Nt(p){var h=ew,P=w[Gr]();try{var O=mt(p,P),Y=null;O&&(Y=rt(p,P)),Y&&(h=c[sd](Y))}catch{}return h}function St(p){var h=ew;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[Va](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[ed](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[gh]=p,h);return Y}return null}function Je(){try{var p=u||{};return mp(S)&&(p[tl[6]]=tl[7]),p}catch{}return null}function We(p){var h=p?p[Ue]:0;return w[xs].size()+h>N?((!v||v.isOnline())&&w[rd](!0,null,10),!0):!1}function st(p,h,P,O,Y,W){var te=null;if(w._appId||(te=qc(W),te&&te.appId&&(w._appId=te.appId)),(p<200||p>=300)&&p!==0){if((p===301||p===307||p===308)&&!Rt(P)){w[Va](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[Va](h,Y)}else Rt(P),p===206?(te||(te=qc(W)),te&&!$?w[ph](h,te):w[Va](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=ee&&ee[bp]([3],!0);return ce(P,p,h)}}function Xr(p,h,P){var O=p,Y=O&&O[gh];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=ee.getSyncFetchPayload();W+O<=eY?P=2:Rn()?P=3:(P=1,X(w[Gr](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var te=ee&&ee[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[ml](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=Vt()+P*1e3;i=W}function b(){if(!a&&!s){var p=i?Math.max(0,i-Vt()):0,h=Math.max(G,p);a=jn(function(){a=null,w[rd](!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[pE])try{P[pE](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[nd]=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,ee=null,Qe(w,"_senderConfig",{g:function(){return dm({},rw)}})}}),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]||mE;return a(i,s,o)},e})(ps)});var hE=E(()=>{nw()});var Sl,Pp,yE,_l,SE,cd,iw=E(()=>{Sl="instrumentationKey",Pp="connectionString",yE="instrumentationkey",_l="endpointUrl",SE="ingestionendpoint",cd="userOverrideEndpointUrl"});var ow={};Be(ow,{AppInsightsCore:()=>vs,ApplicationInsights:()=>sY,Sender:()=>Cp,SeverityLevel:()=>th,arrForEach:()=>V,isNullOrUndefined:()=>z,proxyFunctions:()=>zn,throwError:()=>Wt});function oY(r){return r&&r>0}var ld,_E,iY,sY,sw=E(()=>{Nr();hE();Ts();at();Rc();Ne();iw();at();Ts();hE();_E=void 0,iY=(ld={diagnosticLogInterval:Su(oY,1e4)},ld[Pp]=_E,ld[_l]=_E,ld[Sl]=_E,ld.extensionConfig={},ld);sY=(function(){function r(e){var t=new vs,n;(z(e)||z(e[Sl])&&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(ln(c)){var l=ff(function(v,m){Bn(c,function(S){var y=S.value,N=n[Sl];if(!S.rejected&&y){n[Pp]=y;var C=dl(y);N=C[yE]||N}v(N)})}),u=ff(function(v,m){Bn(c,function(S){var y=S.value,N=n[_l];if(!S.rejected&&y){var C=dl(y),_=C[SE];N=_?_+ji:N}v(N)})});n[Sl]=l,n[_l]=n[cd]||u}if(Oe(c)){var d=dl(c),f=d[SE];n[_l]=n[cd]?n[cd]:f+ji,n[Sl]=d[yE]||n[Sl]}n[_l]=n[cd]?n[cd]:n[_l]})),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 aw=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(OR)),dY=nE(),fY=async(r,e,t,n,i)=>{let o;try{let a=await Promise.resolve().then(()=>lY((sw(),Hd(ow)))),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 cw=le(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.BaseTelemetryReporter=void 0;var TE=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()))}};_h.BaseTelemetryReporter=TE});var lw=le(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.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 bE=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}))}};Th.BaseTelemetrySender=bE});var fw=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}),PE=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=PE(require("https")),EE=PE(require("os")),bh=PE(require("vscode")),gY=RN(),hY=aw(),yY=cw(),SY=lw(),uw=nE();function dw(){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 CE=class extends yY.BaseTelemetryReporter{constructor(e,t){let n=s=>(0,hY.appInsightsClientFactory)(s,bh.env.machineId,bh.env.sessionId,dw(),t);uw.TelemetryUtil.shouldUseOneDataSystemSDK(e)&&(n=s=>(0,gY.oneDataSystemClientFactory)(s,bh,dw()));let i={release:EE.release(),platform:EE.platform(),architecture:EE.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,bh,{additionalCommonProperties:uw.TelemetryUtil.getAdditionalCommonProperties(i)})}};Ns.default=CE});function DE(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,Tl,yt=E(()=>{"use strict";_e=class{_isDisposed=!1;_disposables=[];dispose(){this._isDisposed||(this._isDisposed=!0,DE(this._disposables))}_register(e){return this._isDisposed?e.dispose():this._disposables.push(e),e}get isDisposed(){return this._isDisposed}},Tl=class extends _e{add(e){return this._register(e),e}}});function q(r,e,t){let n=hi.workspace.getConfiguration(pn,t.scope),i=n.inspect(r);return IE(i)?n.get(r,e):hi.workspace.getConfiguration(t.fallbackSection,t.scope).get(t.fallbackSubSectionNameOverride??r,e)}function IE(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 Ch(r,e){let t=hi.workspace.getConfiguration(pn,e.scope);if(IE(t.inspect(r)))return!0;let n=hi.workspace.getConfiguration(e.fallbackSection,e.scope);return IE(n.inspect(r))}var hi,pn,bl,Hi,kt=E(()=>{"use strict";hi=U(require("vscode"));yt();pn="js/ts";bl=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(`${pn}.${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(`${pn}.${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((e6,mw)=>{var _Y="2.0.0",TY=Number.MAX_SAFE_INTEGER||9007199254740991,bY=16,EY=["major","premajor","minor","preminor","patch","prepatch","prerelease"];mw.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((t6,gw)=>{var CY=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};gw.exports=CY});var dd=le((Rs,hw)=>{var{MAX_SAFE_COMPONENT_LENGTH:wE}=Ip(),PY=Np();Rs=hw.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,${wE}})(?:\\.(\\d{1,${wE}}))?(?:\\.(\\d{1,${wE}}))?(?:$|[^\\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 Dh=le((r6,yw)=>{var NY=Object.freeze({loose:!0}),RY=Object.freeze({}),wY=r=>r?typeof r!="object"?NY:r:RY;yw.exports=wY});var AE=le((n6,Tw)=>{var Sw=/^[0-9]+$/,_w=(r,e)=>{let t=Sw.test(r),n=Sw.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)=>_w(e,r);Tw.exports={compareIdentifiers:_w,rcompareIdentifiers:AY}});var on=le((i6,Pw)=>{var Ih=Np(),{MAX_LENGTH:bw,MAX_SAFE_INTEGER:Nh}=Ip(),{safeRe:Ew,t:Cw}=dd(),OY=Dh(),{compareIdentifiers:fd}=AE(),OE=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>bw)throw new TypeError(`version is longer than ${bw} characters`);Ih("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?Ew[Cw.LOOSE]:Ew[Cw.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>Nh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Nh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Nh||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<Nh)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(Ih("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)),fd(this.major,e.major)||fd(this.minor,e.minor)||fd(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(Ih("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 fd(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(Ih("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 fd(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]),fd(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}};Pw.exports=OE});var El=le((o6,Dw)=>{var xw=on(),kY=(r,e,t=!1)=>{if(r instanceof xw)return r;try{return new xw(r,e)}catch(n){if(!t)return null;throw n}};Dw.exports=kY});var Nw=le((s6,Iw)=>{var LY=El(),FY=(r,e)=>{let t=LY(r,e);return t?t.version:null};Iw.exports=FY});var ww=le((a6,Rw)=>{var MY=El(),UY=(r,e)=>{let t=MY(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Rw.exports=UY});var kw=le((c6,Ow)=>{var Aw=on(),YY=(r,e,t,n,i)=>{typeof t=="string"&&(i=n,n=t,t=void 0);try{return new Aw(r instanceof Aw?r.version:r,t).inc(e,n,i).version}catch{return null}};Ow.exports=YY});var Mw=le((l6,Fw)=>{var Lw=El(),VY=(r,e)=>{let t=Lw(r,null,!0),n=Lw(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"};Fw.exports=VY});var Yw=le((u6,Uw)=>{var jY=on(),qY=(r,e)=>new jY(r,e).major;Uw.exports=qY});var jw=le((d6,Vw)=>{var HY=on(),KY=(r,e)=>new HY(r,e).minor;Vw.exports=KY});var Hw=le((f6,qw)=>{var BY=on(),GY=(r,e)=>new BY(r,e).patch;qw.exports=GY});var Bw=le((p6,Kw)=>{var WY=El(),zY=(r,e)=>{let t=WY(r,e);return t&&t.prerelease.length?t.prerelease:null};Kw.exports=zY});var yi=le((v6,Ww)=>{var Gw=on(),$Y=(r,e,t)=>new Gw(r,t).compare(new Gw(e,t));Ww.exports=$Y});var $w=le((m6,zw)=>{var JY=yi(),XY=(r,e,t)=>JY(e,r,t);zw.exports=XY});var Xw=le((g6,Jw)=>{var QY=yi(),ZY=(r,e)=>QY(r,e,!0);Jw.exports=ZY});var Rh=le((h6,Zw)=>{var Qw=on(),eV=(r,e,t)=>{let n=new Qw(r,t),i=new Qw(e,t);return n.compare(i)||n.compareBuild(i)};Zw.exports=eV});var tA=le((y6,eA)=>{var tV=Rh(),rV=(r,e)=>r.sort((t,n)=>tV(t,n,e));eA.exports=rV});var nA=le((S6,rA)=>{var nV=Rh(),iV=(r,e)=>r.sort((t,n)=>nV(n,t,e));rA.exports=iV});var Rp=le((_6,iA)=>{var oV=yi(),sV=(r,e,t)=>oV(r,e,t)>0;iA.exports=sV});var wh=le((T6,oA)=>{var aV=yi(),cV=(r,e,t)=>aV(r,e,t)<0;oA.exports=cV});var kE=le((b6,sA)=>{var lV=yi(),uV=(r,e,t)=>lV(r,e,t)===0;sA.exports=uV});var LE=le((E6,aA)=>{var dV=yi(),fV=(r,e,t)=>dV(r,e,t)!==0;aA.exports=fV});var Ah=le((C6,cA)=>{var pV=yi(),vV=(r,e,t)=>pV(r,e,t)>=0;cA.exports=vV});var Oh=le((P6,lA)=>{var mV=yi(),gV=(r,e,t)=>mV(r,e,t)<=0;lA.exports=gV});var FE=le((x6,uA)=>{var hV=kE(),yV=LE(),SV=Rp(),_V=Ah(),TV=wh(),bV=Oh(),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}`)}};uA.exports=EV});var fA=le((D6,dA)=>{var CV=on(),PV=El(),{safeRe:kh,t:Lh}=dd(),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(kh[Lh.COERCE]);else{let n;for(;(n=kh[Lh.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),kh[Lh.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;kh[Lh.COERCERTL].lastIndex=-1}return t===null?null:PV(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};dA.exports=xV});var vA=le((I6,pA)=>{"use strict";pA.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var gA=le((N6,mA)=>{"use strict";mA.exports=it;it.Node=Cl;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 Cl(t,null,e,r):new Cl(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 Cl(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function NV(r,e){r.head=new Cl(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Cl(r,e,t,n){if(!(this instanceof Cl))return new Cl(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{vA()(it)}catch{}});var TA=le((R6,_A)=>{"use strict";var RV=gA(),Pl=Symbol("max"),As=Symbol("length"),pd=Symbol("lengthCalculator"),Ap=Symbol("allowStale"),xl=Symbol("maxAge"),ws=Symbol("dispose"),hA=Symbol("noDisposeOnSet"),Or=Symbol("lruList"),Ki=Symbol("cache"),SA=Symbol("updateAgeOnGet"),ME=()=>1,YE=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[Pl]=e.max||1/0,n=e.length||ME;if(this[pd]=typeof n!="function"?ME:n,this[Ap]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[xl]=e.maxAge||0,this[ws]=e.dispose,this[hA]=e.noDisposeOnSet||!1,this[SA]=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[Pl]=e||1/0,wp(this)}get max(){return this[Pl]}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[xl]=e,wp(this)}get maxAge(){return this[xl]}set lengthCalculator(e){typeof e!="function"&&(e=ME),e!==this[pd]&&(this[pd]=e,this[As]=0,this[Or].forEach(t=>{t.length=this[pd](t.value,t.key),this[As]+=t.length})),wp(this)}get lengthCalculator(){return this[pd]}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;yA(this,e,n,t),n=i}}forEach(e,t){t=t||this;for(let n=this[Or].head;n!==null;){let i=n.next;yA(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=>Fh(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[xl],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let i=n?Date.now():0,o=this[pd](t,e);if(this[Ki].has(e)){if(o>this[Pl])return vd(this,this[Ki].get(e)),!1;let c=this[Ki].get(e).value;return this[ws]&&(this[hA]||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 VE(e,t,o,i,n);return s.length>this[Pl]?(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!Fh(this,t)}get(e){return UE(this,e,!0)}peek(e){return UE(this,e,!1)}pop(){let e=this[Or].tail;return e?(vd(this,e),e.value):null}del(e){vd(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)=>UE(this,t,!1))}},UE=(r,e,t)=>{let n=r[Ki].get(e);if(n){let i=n.value;if(Fh(r,i)){if(vd(r,n),!r[Ap])return}else t&&(r[SA]&&(n.value.now=Date.now()),r[Or].unshiftNode(n));return i.value}},Fh=(r,e)=>{if(!e||!e.maxAge&&!r[xl])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[xl]&&t>r[xl]},wp=r=>{if(r[As]>r[Pl])for(let e=r[Or].tail;r[As]>r[Pl]&&e!==null;){let t=e.prev;vd(r,e),e=t}},vd=(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)}},VE=class{constructor(e,t,n,i,o){this.key=e,this.value=t,this.length=n,this.now=i,this.maxAge=o||0}},yA=(r,e,t,n)=>{let i=t.value;Fh(r,i)&&(vd(r,t),r[Ap]||(i=void 0)),i&&e.call(n,i.value,i.key,r)};_A.exports=YE});var Si=le((w6,PA)=>{var jE=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 qE)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=>!EA(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=bA.get(n);if(i)return i;let o=this.options.loose,s=o?kn[vn.HYPHENRANGELOOSE]:kn[vn.HYPHENRANGE];e=e.replace(s,$V(this.options.includePrerelease)),qt("hyphen replace",e),e=e.replace(kn[vn.COMPARATORTRIM],kV),qt("comparator trim",e),e=e.replace(kn[vn.TILDETRIM],LV),e=e.replace(kn[vn.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(kn[vn.COMPARATORLOOSE])))),qt("range list",a);let c=new Map,l=a.map(d=>new qE(d,this.options));for(let d of l){if(EA(d))return[d];c.set(d.value,d)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return bA.set(n,u),u}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>CA(n,t)&&e.set.some(i=>CA(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}};PA.exports=jE;var wV=TA(),bA=new wV({max:1e3}),AV=Dh(),qE=Op(),qt=Np(),OV=on(),{safeRe:kn,t:vn,comparatorTrimReplace:kV,tildeTrimReplace:LV,caretTrimReplace:FV}=dd(),{FLAG_INCLUDE_PRERELEASE:MV,FLAG_LOOSE:UV}=Ip(),EA=r=>r.value==="<0.0.0-0",YV=r=>r.value==="",CA=(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),mn=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?kn[vn.TILDELOOSE]:kn[vn.TILDE];return r.replace(t,(n,i,o,s,a)=>{qt("tilde",r,n,i,o,s,a);let c;return mn(i)?c="":mn(o)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:mn(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?kn[vn.CARETLOOSE]:kn[vn.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 mn(o)?l="":mn(s)?l=`>=${o}.0.0${n} <${+o+1}.0.0-0`:mn(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?kn[vn.XRANGELOOSE]:kn[vn.XRANGE];return r.replace(t,(n,i,o,s,a,c)=>{qt("xRange",r,n,i,o,s,a,c);let l=mn(o),u=l||mn(s),d=u||mn(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(kn[vn.STAR],"")),zV=(r,e)=>(qt("replaceGTE0",r,e),r.trim().replace(kn[e.includePrerelease?vn.GTE0PRE:vn.GTE0],"")),$V=r=>(e,t,n,i,o,s,a,c,l,u,d,f,v)=>(mn(n)?t="":mn(i)?t=`>=${n}.0.0${r?"-0":""}`:mn(o)?t=`>=${n}.${i}.0${r?"-0":""}`:s?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,mn(l)?c="":mn(u)?c=`<${+l+1}.0.0-0`:mn(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!==qE.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((A6,wA)=>{var kp=Symbol("SemVer ANY"),BE=class r{static get ANY(){return kp}constructor(e,t){if(t=xA(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),KE("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,KE("comp",this)}parse(e){let t=this.options.loose?DA[IA.COMPARATORLOOSE]:DA[IA.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 NA(n[2],this.options.loose):this.semver=kp}toString(){return this.value}test(e){if(KE("Comparator.test",e,this.options.loose),this.semver===kp||e===kp)return!0;if(typeof e=="string")try{e=new NA(e,this.options)}catch{return!1}return HE(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 RA(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new RA(this.value,t).test(e.semver):(t=xA(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("=")||HE(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||HE(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};wA.exports=BE;var xA=Dh(),{safeRe:DA,t:IA}=dd(),HE=FE(),KE=Np(),NA=on(),RA=Si()});var Lp=le((O6,AA)=>{var XV=Si(),QV=(r,e,t)=>{try{e=new XV(e,t)}catch{return!1}return e.test(r)};AA.exports=QV});var kA=le((k6,OA)=>{var ZV=Si(),ej=(r,e)=>new ZV(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));OA.exports=ej});var FA=le((L6,LA)=>{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};LA.exports=nj});var UA=le((F6,MA)=>{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};MA.exports=sj});var jA=le((M6,VA)=>{var GE=on(),aj=Si(),YA=Rp(),cj=(r,e)=>{r=new aj(r,e);let t=new GE("0.0.0");if(r.test(t)||(t=new GE("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 GE(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||YA(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!t||YA(t,o))&&(t=o)}return t&&r.test(t)?t:null};VA.exports=cj});var HA=le((U6,qA)=>{var lj=Si(),uj=(r,e)=>{try{return new lj(r,e).range||"*"}catch{return null}};qA.exports=uj});var Mh=le((Y6,WA)=>{var dj=on(),GA=Op(),{ANY:fj}=GA,pj=Si(),vj=Lp(),KA=Rp(),BA=wh(),mj=Oh(),gj=Ah(),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=KA,o=mj,s=BA,a=">",c=">=";break;case"<":i=BA,o=gj,s=KA,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 GA(">=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};WA.exports=hj});var $A=le((V6,zA)=>{var yj=Mh(),Sj=(r,e,t)=>yj(r,e,">",t);zA.exports=Sj});var XA=le((j6,JA)=>{var _j=Mh(),Tj=(r,e,t)=>_j(r,e,"<",t);JA.exports=Tj});var e0=le((q6,ZA)=>{var QA=Si(),bj=(r,e,t)=>(r=new QA(r,t),e=new QA(e,t),r.intersects(e,t));ZA.exports=bj});var r0=le((H6,t0)=>{var Ej=Lp(),Cj=yi();t0.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 c0=le((K6,a0)=>{var n0=Si(),zE=Op(),{ANY:WE}=zE,Fp=Lp(),$E=yi(),Pj=(r,e,t={})=>{if(r===e)return!0;r=new n0(r,t),e=new n0(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 zE(">=0.0.0-0")],i0=[new zE(">=0.0.0")],Dj=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===WE){if(e.length===1&&e[0].semver===WE)return!0;t.includePrerelease?r=xj:r=i0}if(e.length===1&&e[0].semver===WE){if(t.includePrerelease)return!0;e=i0}let n=new Set,i,o;for(let v of r)v.operator===">"||v.operator===">="?i=o0(i,v,t):v.operator==="<"||v.operator==="<="?o=s0(o,v,t):n.add(v.semver);if(n.size>1)return null;let s;if(i&&o){if(s=$E(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=o0(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=s0(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)},o0=(r,e,t)=>{if(!r)return e;let n=$E(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},s0=(r,e,t)=>{if(!r)return e;let n=$E(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};a0.exports=Pj});var f0=le((B6,d0)=>{var JE=dd(),l0=Ip(),Ij=on(),u0=AE(),Nj=El(),Rj=Nw(),wj=ww(),Aj=kw(),Oj=Mw(),kj=Yw(),Lj=jw(),Fj=Hw(),Mj=Bw(),Uj=yi(),Yj=$w(),Vj=Xw(),jj=Rh(),qj=tA(),Hj=nA(),Kj=Rp(),Bj=wh(),Gj=kE(),Wj=LE(),zj=Ah(),$j=Oh(),Jj=FE(),Xj=fA(),Qj=Op(),Zj=Si(),eq=Lp(),tq=kA(),rq=FA(),nq=UA(),iq=jA(),oq=HA(),sq=Mh(),aq=$A(),cq=XA(),lq=e0(),uq=r0(),dq=c0();d0.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:JE.re,src:JE.src,tokens:JE.t,SEMVER_SPEC_VERSION:l0.SEMVER_SPEC_VERSION,RELEASE_TYPES:l0.RELEASE_TYPES,compareIdentifiers:u0.compareIdentifiers,rcompareIdentifiers:u0.rcompareIdentifiers}});var md,p0,ve,Qt=E(()=>{"use strict";md=U(f0()),p0=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=md.valid(e);if(!t)return new r(p0.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 md.eq(this.version,e.version)}gte(e){return md.gte(this.version,e.version)}lt(e){return!this.gte(e)}isYarnPnp(){return this.fullVersionString.includes("-sdk")}}});var v0,fq,It,ko=E(()=>{"use strict";v0=U(require("vscode")),fq=v0.Disposable.from(),It={isCancellationRequested:!1,onCancellationRequested:()=>fq}});function Dl(r){return r.startsWith("/dev/null/")}function XE(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=XE(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 QE(r,e,t,n){if(!Dl(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 QE(r,e,n,o.body.configFileName)}var Tt,gd=E(()=>{"use strict";Tt=U(require("vscode"));Qt();ko()});function Lo(r){return eC.languages.match([Il,Os,Ha,Ka],r)>0}function Nl(r){return eC.languages.match([Il,Os],r)>0}var eC,Il,Os,Ha,Ka,Vh,_i=E(()=>{"use strict";eC=U(require("vscode")),Il="typescript",Os="typescriptreact",Ha="javascript",Ka="javascriptreact",Vh=[Ha,Ka,Il,Os]});var Rl,hd,rC=E(()=>{"use strict";Rl=U(require("vscode"));_i();hd=class r{static id="_typescript.learnMoreAboutRefactorings";id=r.id;execute(){let e=Rl.window.activeTextEditor&&Nl(Rl.window.activeTextEditor.document)?"https://go.microsoft.com/fwlink/?linkid=2114477":"https://go.microsoft.com/fwlink/?linkid=2116761";Rl.env.openExternal(Rl.Uri.parse(e))}}});var Ga,Ba,nC=E(()=>{"use strict";Ga=U(require("vscode")),Ba=class r{static id="_typescript.openJsDocLink";id=r.id;async execute(e){let{line:t,character:n}=e.position,i=new Ga.Position(t,n);await Ga.commands.executeCommand("vscode.open",Ga.Uri.from(e.file),{selection:new Ga.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()});function Ls(r,e){return/\]\(|command:/i.test(r)?e:r}var Wh=E(()=>{"use strict"});var cC=le(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.TargetPopulation=za.Filters=za.VSCodeFilterProvider=void 0;var Xh=require("vscode"),aC=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(Xh.version);case Mo.Build:return Xh.env.appName;case Mo.ClientId:return Xh.env.machineId;case Mo.ExtensionName:return this.extensionName;case Mo.ExtensionVersion:return r.trimVersionSuffix(this.extensionVersion);case Mo.Language:return Xh.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}};za.VSCodeFilterProvider=aC;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||(za.Filters=Mo={}));var E0;(function(r){r.Team="team",r.Internal="internal",r.Insiders="insider",r.Public="public"})(E0||(za.TargetPopulation=E0={}))});var C0=le(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.BaseFeatureProvider=void 0;var lC=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}};Qh.BaseFeatureProvider=lC});var P0=le(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});Zh.FilteredFeatureProvider=void 0;var gq=C0(),uC=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)}};Zh.FilteredFeatureProvider=uC});var x0=le($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.TasApiFeatureProvider=$a.TASAPI_FETCHERROR_EVENTNAME=void 0;var hq=P0();$a.TASAPI_FETCHERROR_EVENTNAME="call-tas-error";var dC="ErrorType",fC=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(dC,"ServerError"):c.responseReceived===!1?l.set(dC,"NoResponse"):l.set(dC,"GenericError"),this.telemetry.postEvent($a.TASAPI_FETCHERROR_EVENTNAME,l)}if(!n)throw Error($a.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}}};$a.TasApiFeatureProvider=fC});var D0=le(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.HttpClient=_d.FetchError=void 0;var Sd=class extends Error{constructor(e,t,n){super(e),this.responseReceived=t,this.responseOk=n}};_d.FetchError=Sd;var pC=class{constructor(e){this.endpoint=e}async get(e){let t=await fetch(this.endpoint,{method:"GET",headers:e?.headers});if(!t)throw new Sd("No response received",!1);if(!t.ok)throw new Sd("Response not ok",!0,!1);let n=await t.json();if(!n)throw new Sd("No data received",!1);return{data:n}}};_d.HttpClient=pC});var I0=le(ey=>{"use strict";Object.defineProperty(ey,"__esModule",{value:!0});ey.MemoryKeyValueStorage=void 0;var vC=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)}};ey.MemoryKeyValueStorage=vC});var N0=le(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.ExperimentationServiceBase=void 0;var yq=I0(),mC=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)}};ty.ExperimentationServiceBase=mC});var R0=le(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.PollingService=void 0;var gC=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())}};ry.PollingService=gC});var w0=le(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});ny.ExperimentationServiceAutoPolling=void 0;var Sq=N0(),_q=R0(),hC=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)}};ny.ExperimentationServiceAutoPolling=hC});var A0=le(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});oy.ExperimentationService=void 0;var Tq=x0(),bq=D0(),Eq=w0(),iy=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()}};oy.ExperimentationService=iy;iy.REFRESH_RATE_IN_MINUTES=30});var O0=le(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.ExperimentationService=void 0;var Cq=A0();Object.defineProperty(sy,"ExperimentationService",{enumerable:!0,get:function(){return Cq.ExperimentationService}})});var k0=le(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});ay.MementoKeyValueStorage=void 0;var yC=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)}};ay.MementoKeyValueStorage=yC});var L0=le(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});var SC=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)}};_C.default=SC});var M0=le(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.getExperimentationServiceAsync=Td.getExperimentationService=void 0;var Pq=cC(),xq=O0(),TC=require("vscode"),Dq=k0(),Iq=L0(),Nq="https://default.exp-tas.com/vscode/ab",Rq="query-expfeature",wq="abexp.assignmentcontext",Aq="VSCode.ABExp.FeatureData",Oq=1e3*60*30;function F0(r,e,t,n,i,...o){if(!i)throw new Error("Memento storage was not provided.");let s=TC.workspace.getConfiguration("telemetry");if(!(TC.env.isTelemetryEnabled===void 0?s.get("enableTelemetry",!0):TC.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})}Td.getExperimentationService=F0;async function kq(r,e,t,n,i,...o){let s=F0(r,e,t,n,i,...o);return await s.initializePromise,s}Td.getExperimentationServiceAsync=kq});var Y0=le(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.TargetPopulation=Ja.getExperimentationServiceAsync=Ja.getExperimentationService=void 0;var U0=M0();Object.defineProperty(Ja,"getExperimentationService",{enumerable:!0,get:function(){return U0.getExperimentationService}});Object.defineProperty(Ja,"getExperimentationServiceAsync",{enumerable:!0,get:function(){return U0.getExperimentationServiceAsync}});var Lq=cC();Object.defineProperty(Ja,"TargetPopulation",{enumerable:!0,get:function(){return Lq.TargetPopulation}})});function j0(r){return/^tsconfig\.(.+\.)?json$/i.test((0,bC.basename)(r))}function bd(r){return/^[jt]sconfig\.(.+\.)?json$/i.test((0,bC.basename)(r))}function Ed(r){return/\.(tsx?|mts|cts)$/i.test(r.fsPath)}function q0(r){return/\.(jsx?|mjs|cjs)$/i.test(r.fsPath)}var bC,EC,Qa=E(()=>{"use strict";bC=require("path");_i();EC=[{id:"typescript",diagnosticOwner:"typescript",diagnosticSource:"ts",diagnosticLanguage:1,languageIds:[Il,Os],configFilePattern:/^tsconfig(\..*)?\.json$/i,standardFileExtensions:["ts","tsx","cts","mts"]},{id:"javascript",diagnosticOwner:"typescript",diagnosticSource:"ts",diagnosticLanguage:0,languageIds:[Ha,Ka],configFilePattern:/^jsconfig(\..*)?\.json$/i,standardFileExtensions:["js","jsx","cjs","mjs","es6","pac"]}]});function sn(){return!(typeof process=="object"&&process.versions.node)&&ly.env.uiKind===ly.UIKind.Web}function Za(){return sn()&&!!globalThis.crossOriginIsolated}function H0(){return sn()&&typeof ReadableByteStreamController<"u"}var ly,Cd=E(()=>{"use strict";ly=U(require("vscode"))});function uy(){let r=[Mq,PC,xC,Pd];return sn()?[...(K0.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 K0,Gi,Mq,CC,Uq,Yq,Vq,jq,PC,xC,B0,Pd,Al,Wi=E(()=>{"use strict";K0=U(require("vscode"));Cd();Gi="file",Mq="untitled",CC="git",Uq="github",Yq="azurerepos",Vq="chat-editing-text-model",jq="vsls",PC="walkThroughSnippet",xC="vscode-notebook-cell",B0="office-script",Pd="vscode-chat-code-block";Al=new Set([CC,jq,Uq,Yq,Vq])});async function Ol(r){try{return!!((await dy.workspace.fs.stat(r)).type&dy.FileType.File)}catch{return!1}}function fy(r){return/^[a-zA-Z]:[\/\\]/.test(r)}var dy,py=E(()=>{"use strict";dy=U(require("vscode"))});var Ln,vy=E(()=>{"use strict";Wi();py();Ln=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 fy(e)?!0:e[0]==="/"&&this.config.onCaseInsensitiveFileSystem}}});function qq(r,e){return Bi(r,e)}function G0(r,e){return r===e?void 0:r}function DC(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:G0(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:G0(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 xd,Us,qp,Uo,IC=E(()=>{"use strict";xd=U(require("path")),Us=U(require("vscode"));Wi();_i();Qt();kt();yt();Vp();vy();qp=class extends _e{constructor(t,n){super();this.client=t;this.formatOptions=new Ln(void 0,{onCaseInsensitiveFileSystem:n}),Us.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=Us.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=Nl(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=Nl(t)?"typescript":"javascript";return{...Us.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,Us.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}),...DC(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)?"":xd.parse(this.client.toTsFilePath(i)).root;return xd.isAbsolute(s)?s:s.startsWith("*")?c+s:a?this.client.toTsFilePath(Us.Uri.joinPath(i,s)):c+"**"+xd.sep+s})}getMaximumHoverLength(t){let i=Us.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 Dd,my=E(()=>{"use strict";Dd=Object.freeze({file:"file",untitled:"untitled",mailto:"mailto",vscode:"vscode","vscode-insiders":"vscode-insiders",notebookCell:"vscode-notebook-cell"})});var Yo,ec,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||={});ec=class{capabilities;constructor(...e){this.capabilities=new Set(e)}has(e){return this.capabilities.has(e)}}});function Ys(r){return new Set(r.split(/,|\s+/g))}var Hp=E(()=>{"use strict"});var L,Ll,Xn,Vs,Fn=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"},Ll=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]},Vs=class{static functionName="functionName";static methodName="methodName";static parameterName="parameterName";static propertyName="propertyName";static punctuation="punctuation";static text="text"}});var Ge,Se,ye,xr,tc,Wr,AC,OC,kC,Xe=E(()=>{"use strict";Ge=U(require("vscode"));Fn();(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))(tc||={});(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})(AC||={});(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})(OC||={});(e=>{function r(t){switch(t){case"All":return"All";case"SortAndCombine":return"SortAndCombine";case"RemoveUnused":return"RemoveUnused"}}e.toProtocolOrganizeImportsMode=r})(kC||={})});function ke(r,e,t){return new LC(r,e,t)}function jo(r,e){return new js(()=>r.apiVersion.gte(e),r.onTsServerStarted)}function yy(r,e){return new js(()=>Ch(r,{fallbackSection:e}),rc.workspace.onDidChangeConfiguration)}function Id(r,e){return new js(()=>!!q(r,void 0,e),rc.workspace.onDidChangeConfiguration)}function He(r,...e){return new js(()=>e.some(t=>r.capabilities.has(t)),r.onDidChangeCapabilities)}function W0(r){return new js(()=>r.some(e=>rc.extensions.getExtension(e)),rc.extensions.onDidChange)}var rc,js,LC,Lt=E(()=>{"use strict";rc=U(require("vscode"));kt();yt();js=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 rc.EventEmitter);onDidChange=this._onDidChange.event},LC=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 z0={};Be(z0,{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 _y(r){let e=Qq(r),t=e?Ty.basename(r.file):r.name,n=e?Mn.workspace.asRelativePath(Ty.dirname(r.file)):r.containerName??"",i=new Mn.CallHierarchyItem(AC.fromProtocolScriptElementKind(r.kind),t,n,Mn.Uri.file(r.file),Se.fromTextSpan(r.span),Se.fromTextSpan(r.selectionSpan));return(r.kindModifiers?Ys(r.kindModifiers):void 0)?.has(Xn.deprecated)&&(i.tags=[Mn.SymbolTag.Deprecated]),i}function Zq(r){return new Mn.CallHierarchyIncomingCall(_y(r.from),r.fromSpans.map(Se.fromTextSpan))}function eH(r){return new Mn.CallHierarchyOutgoingCall(_y(r.to),r.fromSpans.map(Se.fromTextSpan))}function tH(r,e){return ke([jo(e,Sy.minVersion),He(e,2)],()=>Mn.languages.registerCallHierarchyProvider(r.semantic,new Sy(e)))}var Ty,Mn,Sy,$0=E(()=>{"use strict";Ty=U(require("path")),Mn=U(require("vscode"));Qt();Hp();Fn();Xe();dt();Lt();Sy=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(_y):_y(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 J0(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var X0=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))${J0(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,FC,qo,MC=E(()=>{"use strict";Ho=U(require("vscode"));Xe();X0();yt();FC=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 FC(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 Q0=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 by,Z0=E(()=>{"use strict";dt();by=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 Ey,eO=E(()=>{"use strict";Ey=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 qs,UC=E(()=>{"use strict";qs=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 tO,Ei,Cy,Py,xy,Dy,Fl,Bp=E(()=>{"use strict";tO=U(Q0()),Ei=U(require("vscode"));Z0();eO();UC();dt();yt();Cd();Fn();Cy=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 Ey;_callbacks=new by;_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(qs.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=Za()?tO.Cancellation.addData(o):void 0;i.token.onCancellationRequested(()=>{f?.(),this.tryCancelRequest(o,t)})}}).catch(l=>{throw l instanceof qs&&(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}},Py=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(()=>Fl.Unresolved),o;if(n.token){let a=new Ei.CancellationTokenSource;n.token.onCancellationRequested(()=>{i.some(c=>c===Fl.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]=Fl.Resolved;let d=i.find(f=>f.type===Fl.Type.Errored);return d&&this.delegate.onFatalError(e,d.err),u},u=>{throw i[a]=new Fl.Errored(u),i.some(d=>d===Fl.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}'`)}},xy=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 Py([{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)}},Dy=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 Py([{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})(Fl||={})});var rO={};Be(rO,{default:()=>Gp,register:()=>oH});function oH(r,e,t,n){return ke([yy(Iy.enabled,e.id),He(t,2)],()=>zi.languages.registerCodeLensProvider(r.semantic,new Gp(t,n)))}var zi,Iy,Gp,nO=E(()=>{"use strict";zi=U(require("vscode"));Fn();Xe();dt();kt();Lt();MC();Bp();Iy=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(Iy.enabled,!1)),this._register(this._enabled.onDidChange(()=>this.changeEmitter.fire())),this._showOnInterfaceMethods=this._register(new Hi(Iy.showOnInterfaceMethods,!1)),this._register(this._showOnInterfaceMethods.onDidChange(()=>this.changeEmitter.fire())),this._showOnAllClassMethods=this._register(new Hi(Iy.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 iO={};Be(iO,{TypeScriptReferencesCodeLensProvider:()=>Ny,register:()=>sH});function sH(r,e,t,n){return ke([yy(YC.enabled,e.id),He(t,2)],()=>Wp.languages.registerCodeLensProvider(r.semantic,new Ny(t,n)))}var Wp,YC,Ny,oO=E(()=>{"use strict";Wp=U(require("vscode"));Fn();Bp();Xe();dt();kt();Lt();MC();YC=Object.freeze({enabled:"referencesCodeLens.enabled",showOnAllFunctions:"referencesCodeLens.showOnAllFunctions"}),Ny=class extends qo{constructor(t,n){super(t,n);this._cachedResponse=n;this._enabled=this._register(new Hi(YC.enabled,!1)),this._register(this._enabled.onDidChange(()=>this.changeEmitter.fire())),this._showOnAllFunctions=this._register(new Hi(YC.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 Ry(r,e){return e.changes?.length?Wr.fromFileCodeEdits(r,e.changes):void 0}async function VC(r,e,t){let n=Ry(r,e);return n&&!await sO.workspace.applyEdit(n)?!1:wy(r,e.commands,t)}async function wy(r,e,t){if(e?.length)for(let n of e)await r.execute("applyCodeActionCommand",{command:n},t);return!0}var sO,jC=E(()=>{"use strict";sO=U(require("vscode"));Xe()});function cO(r,e){if(r.insertText&&typeof r.insertText!="string")return{snippet:r.insertText,parameterCount:0};let t=cH(e),n=new aO.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 Vs.methodName:case Vs.functionName:case Vs.text:case Vs.propertyName:o===0&&s===0&&(n=!0);break;case Vs.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 Vs.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 aO,lO=E(()=>{"use strict";aO=U(require("vscode"));Fn()});function lH(r,e){if(!r.text)return;function t(i){return/^\s*[~`]{3}/m.test(i)?i:"```tsx\n"+i+"\n```"}let n=Ay(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=>Ay(o.text.replace(/^\s*-?\s*/,""),e)).join(" ");return n?["",n,i]:void 0}}return Ay(r.text,e).split(/^(\S+)\s*-?\s*/)}function fH(r){return typeof r=="string"?r:r.map(e=>e.text).join("")}function Hs(r,e){return Ay(r,e)}function Ay(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:${Ba.id}?${encodeURIComponent(JSON.stringify([s]))}`,c=n.text?n.text:qC(n.name??"");t.push(`[${n.linkcode?"`"+c+"`":c}](${a} "${Oy.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?"`"+qC(a)+"`":a}](${s[0]})`)}}else t.push(qC(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 qC(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 Oy.MarkdownString;return HC(i,r,e,t),i.baseUri=n,i.isTrusted={enabledCommands:[Ba.id]},i}function HC(r,e,t,n){if(e&&r.appendMarkdown(Hs(e,n)),t){let i=pH(t,n);i&&r.appendMarkdown(`

`+i)}return r.isTrusted={enabledCommands:[Ba.id]},r}var Oy,ky=E(()=>{"use strict";Oy=U(require("vscode"));nC();Xe()});var fO={};Be(fO,{register:()=>gH});function vH(r){if(!r.kindModifiers||r.kind!==L.script)return;let e=Ys(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 Yy(t,e,n,i,o,s,a),...Yy.triggerCharacters))}var xe,Ly,Fy,My,Uy,dO,Yy,pO=E(()=>{"use strict";xe=U(require("vscode"));Qt();Hp();Fn();Xe();dt();ko();kt();jC();Lt();lO();ky();Ly=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:Hs(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=Ys(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:Fy.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}=cO({...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(Hs(n.displayParts,t)),i.join(`

`)}}getDocumentation(t,n,i){let o=new xe.MarkdownString;return HC(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(tc.fromCodeEdit)):o=!0;let s;return o&&(s={title:"",command:Uy.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}};Fy=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 Ly&&this.telemetryReporter.logTelemetry("completions.accept",{isPackageJsonImport:e.tsEntry.isPackageJsonImport?"true":void 0,isImportStatementCompletion:e.tsEntry.isImportStatementCompletion?"true":void 0})}},My=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??[])}},Uy=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 VC(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?VC(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})(dO||={});Yy=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 Uy(this.client)),o.register(new Fy(a,this.telemetryReporter)),o.register(new My(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=dO.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:OC.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 Ly(t,e,$,k,_,this.client,A);G.command={command:My.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 nc(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 $p(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 Nd,Ml=E(()=>{"use strict";Nd=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 mO={};Be(mO,{register:()=>hH});function hH(r,e,t,n){return ke([He(t,2),jo(t,ve.v570),Id(vO,{fallbackSection:e.id})],()=>vr.languages.registerDocumentPasteEditProvider(r.semantic,new Ul(e.id,t,n),{providedPasteEditKinds:[Ul.kind],copyMimeTypes:[Ul.metadataMimeType],pasteMimeTypes:[Ul.metadataMimeType]}))}var vr,Rd,Vy,Jp,vO,Ul,gO=E(()=>{"use strict";vr=U(require("vscode"));Qt();Xe();dt();Ml();kt();Lt();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}}},Vy=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(tc.fromCodeEdit));return n.additionalEdit=i,n}constructor(){super("",vr.l10n.t("Paste with imports"),Ul.kind),this.yieldTo=[vr.DocumentDropOrPasteEditKind.Text.append("plain")]}},Jp=class extends Vy{constructor(t,n){super();this.operation=n;this.insertText=t}operation},vO="updateImportsOnPaste.enabled",Ul=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 $p(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 $p(d,200);if(v){let m=Vy.tryCreateFromResponse(this._client,v);return m?[m]:void 0}else return[new Jp(a,d)]}finally{u.dispose()}}async resolveDocumentPasteEdit(e,t){if(!(e instanceof Jp))return;let n=await e.operation;return Jp.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(vO,!0,{scope:e,fallbackSection:this._modeId})}}});var Ks,jy=E(()=>{"use strict";Xe();Ks=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 yO={};Be(yO,{default:()=>Xp,register:()=>yH});function yH(r,e){return ke([He(e,1,2)],()=>hO.languages.registerDefinitionProvider(r.syntax,new Xp(e)))}var hO,Xp,SO=E(()=>{"use strict";hO=U(require("vscode"));Qt();Xe();dt();jy();kt();Lt();Xp=class extends Ks{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 TO={};Be(TO,{register:()=>_H});function _H(r,e){return Qn.languages.registerCompletionItemProvider(r.syntax,new KC(e),"@")}var Qn,_O,SH,KC,bO=E(()=>{"use strict";Qn=U(require("vscode"));Qt();_O=[{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=[..._O,{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.")}],KC=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:_O).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 CO={};Be(CO,{register:()=>TH});function EO(r){return r.highlightSpans.map(e=>new Un.DocumentHighlight(Se.fromTextSpan(e),e.kind==="writtenReference"?Un.DocumentHighlightKind.Write:Un.DocumentHighlightKind.Read))}function TH(r,e){let t=new BC(e);return Un.Disposable.from(Un.languages.registerDocumentHighlightProvider(r.syntax,t),Un.languages.registerMultiDocumentHighlightProvider(r.syntax,t))}var Un,BC,PO=E(()=>{"use strict";Un=U(require("vscode"));Xe();BC=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 Un.MultiDocumentHighlight(Un.Uri.file(u.file),[...EO(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(EO)}}});var xO={};Be(xO,{register:()=>EH});function EH(r,e,t){return Ht.languages.registerDocumentSymbolProvider(r.syntax,new GC(e,t),{label:"TypeScript"})}var Ht,bH,GC,DO=E(()=>{"use strict";Ht=U(require("vscode"));Hp();Fn();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},GC=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 Ys(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 IO={};Be(IO,{register:()=>CH});function CH(r,e){function t(n){bt.commands.executeCommand("setContext",Qp.context,n??r.apiVersion.gte(Qp.minVersion))}return t(),e.register(new Qp(r)),bt.Disposable.from(r.onTsServerStarted(()=>t()),new bt.Disposable(()=>t(!1)))}var bt,Qp,NO=E(()=>{"use strict";bt=U(require("vscode"));_i();Qt();Xe();Qp=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 qy,RO,wO,Hy,AO,OO,kO,LO,FO,MO,WC=E(()=>{"use strict";qy=new Set([6196,6133]),RO=new Set([6138]),wO=new Set([6192]),Hy=new Set([7027]),AO=new Set([7028]),OO=new Set([7029]),kO=new Set([7030]),LO=new Set([2420]),FO=new Set([2552,2304]),MO=new Set([1308])});var YO,VO,jO,qO,Ky,HO,Zp,KO,BO,By,GO,WO,zO,$O,JO,XO,QO,Gy,Wy,zC=E(()=>{"use strict";YO="addMissingAwait",VO="addMissingNewOperator",jO="fixOverrideModifier",qO="annotateWithTypeFromJSDoc",Ky="fixAwaitInSyncFunction",HO="fixClassDoesntImplementInheritedAbstractMember",Zp="fixClassIncorrectlyImplementsInterface",KO="constructorForDerivedNeedSuperCall",BO="extendsInterfaceBecomesImplements",By="import",GO="forgottenThisPropertyAccess",WO="removeUnnecessaryAwait",zO="spelling",$O="inferFromUsage",JO="addNameToNamelessParameter",XO="fixMissingFunctionDeclaration",QO="fixClassDoesntImplementInheritedAbstractMember",Gy="fixUnreachableCode",Wy="unusedIdentifier"});var ek={};Be(ek,{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 ZC(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 QC(e,t,n);return zr.languages.registerCodeActionsProvider(r.semantic,i,i.metadata)})}var zr,ev,$C,JC,XC,QC,tk=E(()=>{"use strict";zr=U(require("vscode"));WC();zC();Xe();dt();Lt();ev=class extends zr.CodeAction{},$C=class r extends ev{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:LO,fixName:Zp},{codes:MO,fixName:Ky}],this.edit,e,t,n,i),await ZC([{codes:Hy,fixName:Gy}],this.edit,e,t,n,i)}},JC=class r extends ev{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 ZC([{codes:qy,fixName:Wy}],this.edit,e,t,n,i)}},XC=class r extends ev{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 ZC([{codes:FO,fixName:By}],this.edit,e,t,n,i)}},QC=class r{constructor(e,t,n){this.client=e;this.fileConfigurationManager=t;this.diagnosticsManager=n}client;fileConfigurationManager;diagnosticsManager;static kindProviders=[$C,JC,XC];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 rk={};Be(rk,{register:()=>DH});function DH(r,e){return Ko.languages.registerFoldingRangeProvider(r.syntax,new eP(e))}var Ko,eP,nk=E(()=>{"use strict";Ko=U(require("vscode"));Xe();Ti();eP=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 ik={};Be(ik,{register:()=>IH});function IH(r,e,t,n){return ke([Id("format.enabled",{fallbackSection:e.id,fallbackSubSectionNameOverride:"format.enable"})],()=>{let i=new tP(t,n);return tv.Disposable.from(tv.languages.registerOnTypeFormattingEditProvider(r.syntax,i,";","}",`
`),tv.languages.registerDocumentRangeFormattingEditProvider(r.syntax,i))})}var tv,tP,ok=E(()=>{"use strict";tv=U(require("vscode"));Xe();Lt();tP=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(tc.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=tc.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 sk={};Be(sk,{register:()=>RH});function RH(r,e,t){return ke([He(e,1,2)],()=>Bo.languages.registerHoverProvider(r.syntax,new rP(e,t)))}var Bo,rP,ak=E(()=>{"use strict";Bo=U(require("vscode"));dt();Lt();ky();Xe();Qt();rP=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 lk={};Be(lk,{register:()=>wH});function wH(r,e){return ke([He(e,2)],()=>ck.languages.registerImplementationProvider(r.semantic,new nP(e)))}var ck,nP,uk=E(()=>{"use strict";ck=U(require("vscode"));dt();jy();Lt();nP=class extends Ks{provideImplementation(e,t,n){return this.getSymbolLocations("implementation",e,t,n)}}});var dk={};Be(dk,{register:()=>LH});function OH(r){switch(r){case"Parameter":return Yn.InlayHintKind.Parameter;case"Type":return Yn.InlayHintKind.Type;case"Enum":return;default:return}}function kH(r,e){let t=DC(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,zy.minVersion),He(t,2)],()=>{let o=new zy(e,t,n,i);return Yn.languages.registerInlayHintsProvider(r.semantic,o)})}var Yn,AH,zy,fk=E(()=>{"use strict";Yn=U(require("vscode"));Qt();Xe();dt();kt();yt();IC();Lt();AH=Object.values(Uo),zy=class extends _e{constructor(t,n,i,o){super();this.language=t;this.client=n;this.fileConfigurationManager=i;this.telemetryReporter=o;this._register(Yn.workspace.onDidChangeConfiguration(s=>{AH.some(a=>s.affectsConfiguration(pn+"."+a)||s.affectsConfiguration(t.id+"."+a))&&this._onDidChangeInlayHints.fire()})),this._register(Yn.workspace.onDidChangeTextDocument(s=>{t.languageIds.includes(s.document.languageId)&&this._onDidChangeInlayHints.fire()}))}language;client;fileConfigurationManager;telemetryReporter;static minVersion=ve.v440;_onDidChangeInlayHints=this._register(new Yn.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 Yn.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 Yn.InlayHintLabelPart(n.text);return n.span&&(i.location=xr.fromTextSpan(this.client.toResource(n.span.file),n.span)),i}):t.text}}});var vk={};Be(vk,{register:()=>MH,templateToSnippet:()=>pk});function pk(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 oP(t,e,n),"*")}var Zn,FH,iP,oP,mk=E(()=>{"use strict";Zn=U(require("vscode"));Xe();kt();FH=new Zn.SnippetString(`/**
 * $0
 */`),iP=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},oP=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 iP(e,t);return o.body.newText==="/** */"?s.insertText=FH:s.insertText=pk(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 gk={};Be(gk,{register:()=>UH});function UH(r,e){return ke([jo(e,$y.minVersion),He(e,0)],()=>Jy.languages.registerLinkedEditingRangeProvider(r.syntax,new $y(e)))}var Jy,$y,hk=E(()=>{"use strict";Jy=U(require("vscode"));Qt();Xe();dt();Lt();$y=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 Jy.LinkedEditingRanges(s.body.ranges.map(c=>Se.fromTextSpan(c)),a)}}});var yk={};Be(yk,{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 aP(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,Xy,sP,aP,Sk=E(()=>{"use strict";$r=U(require("vscode"));Qt();Fn();Xe();dt();ko();Lt();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"},Xy=class r{constructor(e){this.telemetryReporter=e}telemetryReporter;static ID="_typescript.didOrganizeImports";id=r.ID;async execute(){this.telemetryReporter.logTelemetry("organizeImports.execute",{})}},sP=class extends $r.CodeAction{constructor(t,n,i){super(t,n);this.document=i}document},aP=class{constructor(e,t,n,i,o){this.client=e;this.commandMetadata=t;this.fileConfigManager=i;n.register(new Xy(o))}client;commandMetadata;fileConfigManager;provideCodeActions(e,t,n,i){return n.only?.contains(this.commandMetadata.kind)?this.client.toOpenTsFilePath(e)?[new sP(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:kC.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:Xy.ID,title:"",arguments:[]},e}}});var Jr,ic=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 Tk(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 Tk(r,t.childItems)}}async function bk(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 Tk(t,i.body.childItems)}async function _k(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 bk(r,e,d.line);return new Yl.Range(l,f?.end??d)}var Yl,oc,sc,cP=E(()=>{"use strict";Yl=U(require("vscode"));ko();Xe();oc=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 bk(this.client,t,n.pos.line):n.kind==="refactor-info"?await _k(this.client,t,n.refactor.edits.flatMap(a=>a.textChanges)):n.kind==="code-action"?await _k(this.client,t,n.action.changes.flatMap(a=>a.textChanges)):n.range,s=o?new Yl.Selection(o.start,o.end):void 0;await Yl.commands.executeCommand("vscode.editorChat.start",{initialRange:o,initialSelection:s,message:e,autoSend:!0})}},sc=class r{static ID="_typescript.compositeCommand";id=r.ID;async execute(...e){for(let t of e)await Yl.commands.executeCommand(t.command,...t.arguments??[])}}});var Ck={};Be(Ck,{register:()=>KH});function HH(r,e){if(r instanceof Ad)return!1;let t=Ek.get(r.tsAction.fixName);return t?e.every(n=>{if(n===r||n instanceof Ad)return!0;let i=Ek.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 Zy(e,t,n,i,o),Zy.metadata))}var Et,rv,Qy,uP,wd,Ad,dP,fP,Zy,lP,Ek,Pk=E(()=>{"use strict";Et=U(require("vscode"));zC();Xe();dt();ko();ic();Vp();jC();cP();Lt();rv=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 wy(this.client,t.commands,It);return await i?.execute(),o}},Qy=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 wy(this.client,e.action.combinedResponse.body.commands,It)}},uP=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},dP=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)}},fP=class{constructor(e){this.client=e}client;async getFixableDiagnosticsForContext(e){let t=await this.fixableDiagnosticCodes.value;return uP.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)))},Zy=class r{constructor(e,t,n,i,o){this.client=e;this.formattingConfigurationManager=t;this.diagnosticsManager=i;n.register(new sc),n.register(new rv(e,i,o)),n.register(new Qy(e,o)),n.register(new oc(e,o)),this.supportedCodeActionProvider=new fP(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 dP;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=Ry(this.client,n),o.diagnostics=[t],o.ranges=[t.range],o.command={command:rv.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===Zp)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===QO)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===XO)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===$O){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:oc.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===JO){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=Ry(this.client,n),u.edit?.insert(e.uri,t.range.start,""),u.diagnostics=[t],u.ranges=[t.range],u.isAI=!0,u.command={command:sc.ID,title:"",arguments:[{command:rv.ID,arguments:[{action:n,diagnostic:t,document:e}],title:""},{command:oc.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||lP.has(a.code)&&lP.get(a.code)===lP.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:Qy.ID,arguments:[{action:s}],title:""},e.addFixAllAction(o.fixId,s),e}},lP=new Map([[2339,2339],[2345,2339]]),Ek=new Map([[qO,{priority:2}],[KO,{priority:2}],[BO,{priority:2}],[Ky,{priority:2}],[WO,{priority:2}],[Zp,{priority:3}],[HO,{priority:3}],[Gy,{priority:2}],[Wy,{priority:2}],[GO,{priority:2}],[zO,{priority:0}],[YO,{priority:2}],[jO,{priority:2}],[VO,{priority:2}],[By,{priority:1,thereCanOnlyBeOne:!0}]])});var xk,N7,ac,pP=E(()=>{xk=(()=>{"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 ee in I)Object.prototype.hasOwnProperty.call(I,ee)&&(D[ee]=I[ee])})(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,ee,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=ee||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,ee=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),ee===void 0?ee=this.path:ee===null&&(ee=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&&ee===this.path&&M===this.query&&w===this.fragment?this:new A(D,I,ee,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,ee=0;ee<x.length;ee++){var M=x.charCodeAt(ee);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,ee)),I=-1),D!==void 0&&(D+=x.charAt(ee));else{D===void 0&&(D=x.substr(0,ee));var w=k[M];w!==void 0?(I!==-1&&(D+=encodeURIComponent(x.substring(I,ee)),I=-1),D+=w):I===-1&&(I=ee)}}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="",ee=x.scheme,M=x.authority,w=x.path,Le=x.query,je=x.fragment;if(ee&&(I+=ee,I+=":"),(M||ee==="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,ee=0,M=g.length;ee<M;ee++)!I&&ee in g||(I||(I=Array.prototype.slice.call(g,0,ee)),I[ee]=g[ee]);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 ee=g.path||"/";return g.with({path:B.resolve.apply(B,R([ee],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:N7,Utils:ac}=xk)});var Ak={};Be(Ak,{register:()=>JH});function Dk(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 iS(e,t,n,i,o),iS.metadata))}var Bs,ae,tS,rS,nS,eS,Od,Ik,Nk,gP,Rk,BH,GH,WH,zH,$H,wk,nv,vP,mP,iS,Ok=E(()=>{"use strict";Bs=U(require("path")),ae=U(require("vscode"));pP();rC();Wi();my();Qt();Fn();Xe();dt();Ti();ko();cP();Lt();tS=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})}},rS=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 nv(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??[])}},nS=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=Dk(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=ac.dirname(N),_=ac.basename(N),A;if(l){if(N.scheme===Dd.file?A=Bs.relative(l.uri.fsPath,C.fsPath):A=Bs.posix.relative(l.uri.path,C.path),m){let j=(H=>H.startsWith("../")?H:`./${H}`)(Bs.relative(Bs.dirname(e.uri.fsPath),N.fsPath));if(!j.startsWith(m))return;A=j}}else A=C.fsPath;return{file:y,label:ac.basename(N),description:m?A:Bs.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:ac.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}},eS=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_")}),Ik=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("type"),matches:r=>r.name.startsWith("Extract to type alias")}),Nk=Object.freeze({kind:ae.CodeActionKind.RefactorExtract.append("interface"),matches:r=>r.name.startsWith("Extract to interface")}),gP=Object.freeze({kind:ae.CodeActionKind.RefactorMove.append("file"),matches:r=>r.name.startsWith("Move to file")}),Rk=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")}),wk=[eS,Od,Ik,Nk,gP,Rk,BH,GH,WH,zH,$H],nv=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:tS.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=Dk(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!==PC&&(this.command={command:sc.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=wk.find(i=>i.matches(t));return n?n.kind:ae.CodeActionKind.Refactor}},vP=class extends ae.CodeAction{constructor(e,t,n,i){super(t.description,gP.kind),t.notApplicableReason&&(this.disabled={reason:t.notApplicableReason}),this.command={title:t.description,command:nS.ID,arguments:[{action:t,document:e,range:n,trigger:i}]}}},mP=class extends ae.CodeAction{constructor(e,t,n,i){super(e.description,ae.CodeActionKind.Refactor),this.command={title:e.description,command:rS.ID,arguments:[{document:t,refactor:e,rangeOrSelection:n,trigger:i}]}}},iS=class r{constructor(e,t,n,i,o){this.client=e;this.cachedNavTree=t;this.formattingOptionsManager=n;let s=new tS(o);i.register(s),i.register(new sc),i.register(new rS(this.client)),i.register(new nS(this.client,s)),i.register(new oc(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,...wk.map(e=>e.kind)],documentation:[{kind:ae.CodeActionKind.Refactor,command:{command:hd.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===Rk.kind.value||c.kind?.value===gP.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 nv&&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 mP(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 vP(e,i,o,t.triggerKind)):a.push(new nv(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!!(Ik.matches(e)||Nk.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&&eS.kind.contains(t.kind))){let t=new ae.CodeAction(ae.l10n.t("Extract to function"),eS.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)||eS.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 Lk={};Be(Lk,{register:()=>XH});function XH(r,e){return ke([He(e,1,2)],()=>kk.languages.registerReferenceProvider(r.syntax,new hP(e)))}var kk,hP,Fk=E(()=>{"use strict";kk=U(require("vscode"));Xe();dt();Lt();hP=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 Mk={};Be(Mk,{register:()=>QH});function QH(r,e,t,n){return ke([He(t,2)],()=>Ji.languages.registerRenameProvider(r.semantic,new yP(e,t,n)))}var $i,Ji,yP,Uk=E(()=>{"use strict";$i=U(require("path")),Ji=U(require("vscode"));_i();Qt();Xe();dt();kt();Lt();yP=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,Ha,Ka].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 Vk={};Be(Vk,{register:()=>ZH});function ZH(r,e){return ke([He(e,2)],()=>{let t=new SP(e);return cc.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 cc,Yk,SP,ei,Vl,jk=E(()=>{"use strict";cc=U(require("vscode"));dt();Lt();Yk=1e5;SP=class{constructor(e){this.client=e}client;getLegend(){return new cc.SemanticTokensLegend(ei,Vl)}async provideDocumentSemanticTokens(e,t){let n=this.client.toOpenTsFilePath(e);return!n||e.getText().length>Yk?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)>Yk)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 cc.CancellationError;let c=s.body.spans,l=new cc.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";Vl=[];Vl[2]="async";Vl[0]="declaration";Vl[3]="readonly";Vl[1]="static";Vl[5]="local";Vl[4]="defaultLibrary"});var oS,qk=E(()=>{"use strict";oS=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 Hk={};Be(Hk,{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 iv(e),{triggerCharacters:iv.triggerCharacters,retriggerCharacters:iv.retriggerCharacters}))}var Ci,iv,Kk=E(()=>{"use strict";Ci=U(require("vscode"));Xe();dt();qk();Lt();ky();iv=class{constructor(e){this.client=e}client;static triggerCharacters=["(",",","<"];static retriggerCharacters=[")"];state=new oS;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(Hs(e.prefixDisplayParts,this.client),zp(e.documentation,e.tags.filter(s=>s.name!=="param"),this.client,t)),i=n.label.length,o=Hs(e.separatorDisplayParts,this.client);for(let s=0;s<e.parameters.length;++s){let a=e.parameters[s],c=Hs(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+=Hs(e.suffixDisplayParts,this.client),n}}});var Bk={};Be(Bk,{register:()=>oK});function oK(r,e){return sS.languages.registerSelectionRangeProvider(r.syntax,new _P(e))}var sS,_P,Gk=E(()=>{"use strict";sS=U(require("vscode"));Xe();_P=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 sS.SelectionRange(Se.fromTextSpan(e.textSpan),e.parent?r.convertSelectionRange(e.parent):void 0)}}});var Wk={};Be(Wk,{register:()=>sK});function sK(r,e){function t(n){Ct.commands.executeCommand("setContext",ov.context,n??r.apiVersion.gte(ov.minVersion))}return t(),e.register(new ov(r)),Ct.Disposable.from(r.onTsServerStarted(()=>t()),new Ct.Disposable(()=>t(!1)))}var Ct,ov,zk=E(()=>{"use strict";Ct=U(require("vscode"));_i();Qt();Xe();ov=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 $k={};Be($k,{register:()=>cK});function aK(r,e){return new js(()=>{let t=Mt.window.activeTextEditor;return!t||!Mt.languages.match(r,t.document)?!1:!!q("autoClosingTags.enabled",!0,{scope:t.document,fallbackSection:e.id,fallbackSubSectionNameOverride:"autoClosingTags"})},t=>Mt.Disposable.from(Mt.window.onDidChangeActiveTextEditor(t),Mt.workspace.onDidOpenTextDocument(t),Mt.workspace.onDidChangeConfiguration(t)))}function cK(r,e,t){return ke([aK(r.syntax,e)],()=>new TP(t))}var Mt,TP,Jk=E(()=>{"use strict";Mt=U(require("vscode"));Xe();yt();kt();Lt();TP=class extends _e{constructor(t){super();this.client=t;Mt.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===Mt.TextDocumentChangeReason.Undo||i===Mt.TextDocumentChangeReason.Redo)return;let o=Mt.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 Mt.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 Mt.Position(a.range.start.line+d.length-1,d[d.length-1].length),v=ye.toFileLocationRequestArgs(s,f);this._cancel=new Mt.CancellationTokenSource;let m=await this.client.execute("jsxClosingTag",v,this._cancel.token);if(m.type!=="response"||!m.body||this._disposed)return;let S=Mt.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 Mt.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 Qk={};Be(Qk,{default:()=>sv,register:()=>lK});function lK(r,e){return ke([He(e,1,2)],()=>Xk.languages.registerTypeDefinitionProvider(r.syntax,new sv(e)))}var Xk,sv,Zk=E(()=>{"use strict";Xk=U(require("vscode"));dt();jy();Lt();sv=class extends Ks{provideTypeDefinition(e,t,n){return this.getSymbolLocations("typeDefinition",e,t,n)}}});var uL={};Be(uL,{register:()=>TK});async function _K(r){try{return(await tt.workspace.fs.stat(r)).type===tt.FileType.Directory}catch{return!1}}function TK(r,e,t){return ke([He(r,2)],()=>new MP(r,e,t))}var FP,tt,Md,MP,dL=E(()=>{"use strict";FP=U(require("path")),tt=U(require("vscode"));Wi();Qa();Xe();dt();Ml();ko();kt();yt();Lt();Md="updateImportsOnFileMove.enabled";MP=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=Ed(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 Nd(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=Ed(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}'?",FP.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(pn);return c.update(Md,"always",this.getConfigTargetScope(c,Md)),!0}case s:{let c=tt.workspace.getConfiguration(pn);return c.update(Md,"never",this.getConfigTargetScope(c,Md)),!1}default:return!1}}async getJsTsFileBeingMoved(t){if(t.scheme===Gi)return await _K(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}@@@${Ed(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=>FP.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 fL={};Be(fL,{register:()=>EK});function bK(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 EK(r,e){return xt.languages.registerWorkspaceSymbolProvider(new UP(r,e))}var xt,UP,pL=E(()=>{"use strict";xt=U(require("vscode"));Wi();Qa();Qt();Hp();Fn();Xe();Ti();kt();UP=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===CC)try{let t=xt.Uri.file(JSON.parse(e.uri.query)?.path);if(Ed(t)||q0(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,Pd))return;let n=r.getLabel(e),i=new xt.SymbolInformation(n,bK(e),e.containerName||"",xr.fromTextSpan(t,e));return(e.kindModifiers?Ys(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 AS(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(mv(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(WP(_)){do n++,i+=String.fromCharCode(_),_=r.charCodeAt(n);while(WP(_));return s=15}if(mv(_))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&&!mv(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++,mv(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(WP(_)||mv(_))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 WP(r){return r===32||r===9}function mv(r){return r===10||r===13}function jd(r){return r>=48&&r<=57}var FL,OS=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"})(FL||(FL={}))});var zP=E(()=>{"use strict";OS()});function ML(r,e=[],t=gv.DEFAULT){let n=null,i=[],o=[];function s(c){Array.isArray(i)?i.push(c):n!==null&&(i[n]=c)}return XP(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 $P(r,e=[],t=gv.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}XP(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:FK(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 JP(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 XP(r,e,t=gv.DEFAULT){let n=AS(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 FK(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 gv,QP=E(()=>{"use strict";OS();(function(r){r.DEFAULT={allowTrailingComma:!1}})(gv||(gv={}))});var UL=E(()=>{"use strict";zP();QP()});var YL,VL,qL,HL,hv,jL,ZP=E(()=>{"use strict";zP();UL();OS();QP();(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"})(YL||(YL={}));(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"})(VL||(VL={}));qL=ML,HL=$P,hv=JP;(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"})(jL||(jL={}))});var WL={};Be(WL,{register:()=>qK});function BL(r,e){return r?.type==="array"&&r.children?r.children.map(e):[]}async function VK(r,e){let t=r,n=e[0],i=n.startsWith("@")?2:1,o=n.split(Kl.posix.sep).slice(0,i).join(Kl.posix.sep);for(;;){let s=ot.Uri.joinPath(t,"node_modules",o),a;try{a=await ot.workspace.fs.stat(s)}catch{}if(a&&a.type&ot.FileType.Directory){for(let l of e.map(u=>u.split(Kl.posix.sep).slice(i).join(Kl.posix.sep)).filter(Boolean).map(u=>ot.Uri.joinPath(s,u)))if(await Ol(l))return l}let c=t;if(t=ot.Uri.joinPath(t,".."),c.path===t.path)return}}async function jK(r,e,t){async function n(o){return o.path.endsWith(".json")||await Ol(o)?o:o.with({path:`${o.path}${t===1?"/tsconfig.json":".json"}`})}return["./","../"].some(o=>e.startsWith(o))?n(ot.Uri.joinPath(r,e)):e.startsWith("/")||fy(e)?n(ot.Uri.file(e)):VK(r,[e,...e.endsWith(".json")?[]:[`${e}.json`,`${e}/tsconfig.json`]])}function qK(){let r=["**/[jt]sconfig.json","**/[jt]sconfig.*.json"],t=["json","jsonc"].map(n=>r.map(i=>({language:n,pattern:i}))).flat();return ot.Disposable.from(ot.commands.registerCommand(GL,async({resourceUri:n,extendsValue:i,linkType:o})=>{let s=await jK(ac.dirname(ot.Uri.from(n)),i,o);if(s===void 0){ot.window.showErrorMessage(Ls(ot.l10n.t("Failed to resolve {0} as module",i),ot.l10n.t("Failed to resolve the referenced configuration as a module.")));return}await ot.commands.executeCommand("vscode.open",s)}),ot.languages.registerDocumentLinkProvider(t,new ex))}var Kl,ot,GL,ex,zL=E(()=>{"use strict";ZP();Kl=require("path"),ot=U(require("vscode"));pP();Ti();py();Wh();GL="_typescript.openExtendsLink",ex=class{provideDocumentLinks(e,t){let n=HL(e.getText());return n?Pr([this.getExtendsLink(e,n),...this.getFilesLinks(e,n),...this.getReferencesLinks(e,n)]):[]}getExtendsLink(e,t){let n=hv(t,["extends"]);return n&&this.tryCreateTsConfigLink(e,n,0)}getReferencesLinks(e,t){return BL(hv(t,["references"]),n=>{let i=hv(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 ot.DocumentLink(this.getRange(e,t),ot.Uri.parse(`command:${GL}?${JSON.stringify(i)}`));return o.tooltip=ot.l10n.t("Follow link"),o}getFilesLinks(e,t){return BL(hv(t,["files"]),n=>this.pathNodeToLink(e,n))}pathNodeToLink(e,t){return this.isPathValue(t)?new ot.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,Kl.isAbsolute)(t.value)?ot.Uri.file(t.value):ot.Uri.joinPath(ac.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 ot.Range(i,o)}}});var kS,LS,$L=E(()=>{"use strict";kS=U(require("vscode")),LS=class{async getConfigsForWorkspace(e){if(!kS.workspace.workspaceFolders)return[];let t=new Map;for(let n of await this.findConfigFiles(e)){let i=kS.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 kS.workspace.findFiles("**/tsconfig*.json","**/{node_modules,.*}/**",void 0,e)}}});var JL={};Be(JL,{register:()=>HK});function HK(r){return $e.tasks.registerTaskProvider("typescript",new tx(r))}var ri,$e,tx,XL=E(()=>{"use strict";ZP();ri=U(require("path")),$e=U(require("vscode"));dt();Ti();Ml();kt();yt();py();Qa();gd();$L();tx=class r extends _e{constructor(t){super();this.client=t;this.tsconfigProvider=new LS,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 Ol(i.uri)?i:void 0)).then(Pr)}async getTsConfigForActiveFile(t){let n=$e.window.activeTextEditor;if(n&&j0(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&&!Dl(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()),await $p(this.tsconfigProvider.getConfigsForWorkspace(n.token).then(i=>Array.from(i)),this.findConfigFilesTimeout,()=>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 Ol($e.Uri.file(ri.join(i,"tsc.cmd"))))return ri.join(i,"tsc.cmd");if((n==="linux"||n==="darwin")&&await Ol($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(qL(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 GK={};Be(GK,{activate:()=>KK,deactivate:()=>BK});module.exports=Hd(GK);var QL=U(fw()),ZL=U(require("fs")),eF=U(require("vscode"));var xE=class{constructor(e,t){this.onCompletionAccepted=e;this._pluginManager=t}onCompletionAccepted;_pluginManager;configurePlugin(e,t){this._pluginManager.setConfiguration(e,t)}};function pw(r,e){return{getAPI(t){if(t===0)return new xE(r,e)}}}var Eh=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:Eh.commands.registerCommand(e.id,e.execute,e)},this.commands.set(e.id,t)),new Eh.Disposable(()=>{t.refCount-=1,t.refCount<=0&&(t.registration.dispose(),this.commands.delete(e.id))})}};var or=U(require("vscode"));kt();var NE="typescriptteam.native-preview",RE=["typescriptteam.vscode-typescript","typescriptteam.vscode-typescript-nightly",NE];function Dp(){for(let r of RE){let e=or.extensions.getExtension(r);if(e)return e}}var Ph=class{id="typescript.experimental.enableTsgo";async execute(){await vw(!0)}},ud=class{id="typescript.experimental.disableTsgo";async execute(){await vw(!1)}};async function vw(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(pn),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 xh=class{constructor(e){this.pluginManager=e}pluginManager;id="_typescript.configurePlugin";execute(e,t){this.pluginManager.setConfiguration(e,t)}};gd();var Uh=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)}},Yh=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)}};rC();nC();var jh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="typescript.openTsServerLog";execute(){this.lazyClientHost.value.serviceClient.openTsServerLogFile()}};var qh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="typescript.reloadProjects";execute(){this.lazyClientHost.value.reloadProjects()}},Hh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="javascript.reloadProjects";execute(){this.lazyClientHost.value.reloadProjects()}};var Kh=class{constructor(e){this.lazyClientHost=e}lazyClientHost;id="typescript.restartTsServer";execute(){this.lazyClientHost.value.serviceClient.restartTsServer(!0)}};var yd=class r{constructor(e){this.lazyClientHost=e}lazyClientHost;static id="typescript.selectTypeScriptVersion";id=r.id;execute(){this.lazyClientHost.value.serviceClient.showVersionPicker()}};var m0=U(require("vscode"));ko();function vq(r){return r&&typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}var Bh=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 m0.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 g0(r,e,t,n){r.register(new qh(e)),r.register(new Hh(e)),r.register(new yd(e)),r.register(new jh(e)),r.register(new Kh(e)),r.register(new Uh(n,e)),r.register(new Yh(n,e)),r.register(new xh(t)),r.register(new hd),r.register(new Bh(e)),r.register(new Ba),r.register(new Ph),r.register(new ud)}var T0=U(require("os")),wl=U(require("path")),Fs=U(require("vscode")),b0=U(require("child_process")),$h=U(require("fs"));var h0=U(require("vscode"));kt();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 sC=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 y0(r,e){return Bi(r,e)}var oC="vscode",Gh=class{loadFromWorkspace(){let e=h0.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 sC(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",oC,{fallbackSection:"typescript"})===oC}readWatchOptions(){let e=q("tsserver.watchOptions",void 0,{fallbackSection:"typescript"});if(!(!e||e===oC))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 S0=U(require("path")),_0=U(require("vscode")),Wa=class{static asAbsoluteWorkspacePath(e){for(let t of _0.workspace.workspaceFolders||[]){let n=[`./${t.name}/`,`${t.name}/`,`.\\${t.name}\\`,`${t.name}\\`];for(let i of n)if(e.startsWith(i))return S0.join(t.uri.fsPath,e.replace(i,""))}}};Wh();var zh=class extends Gh{fixPathPrefixes(e){let t=["~"+wl.sep];for(let n of t)if(e.startsWith(n))return wl.join(T0.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 wl.isAbsolute(i)?i:Wa.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(wl.isAbsolute(i))return i}return null}findNodePath(){try{return b0.execFileSync("node",["-e","console.log(process.execPath)"],{windowsHide:!0,timeout:2e3,cwd:Fs.workspace.workspaceFolders?.[0].uri.fsPath,encoding:"utf-8"}).trim()}catch{return Fs.window.showWarningMessage(Fs.l10n.t("Could not detect a Node installation to run TS Server.")),null}}validatePath(e){return e&&(!$h.existsSync(e)||$h.lstatSync(e).isDirectory())?(Fs.window.showWarningMessage(Ls(Fs.l10n.t("The path {0} doesn't point to a valid Node installation to run TS Server. Falling back to bundled Node.",e),Fs.l10n.t("The configured path doesn't point to a valid Node installation to run TS Server. Falling back to bundled Node."))),null):e}};var Jh=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 V0=U(require("vscode")),Xa=U(Y0()),cy=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(V0.env.uriScheme){case"vscode":i=Xa.TargetPopulation.Public;break;case"vscode-insiders":i=Xa.TargetPopulation.Insiders;break;case"vscode-exploration":i=Xa.TargetPopulation.Internal;break;case"code-oss":i=Xa.TargetPopulation.Team;break;default:i=Xa.TargetPopulation.Public;break}let o=Xa.getExperimentationService(e,t,i,r,n);return await o.initialFetch,o}var vv=U(require("vscode"));var mr=U(require("vscode"));Qa();kt();IC();var aS=require("path");Wi();my();var kl=U(require("vscode"));Ti();yt();Vp();vy();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 NC=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(kl.DiagnosticTag.Unnecessary)||n.tags.includes(kl.DiagnosticTag.Deprecated)))}get(e){return this._diagnostics.get(e)||[]}};function Jq(r,e){return r.validate===e.validate&&r.enableSuggestions===e.enableSuggestions}var RC=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)}},wC=class extends _e{constructor(t,n){super();this._telemetryReporter=t;this._diagnosticsCollection=n;this._register(kl.workspace.onDidChangeTextDocument(i=>{(i.document.languageId==="typescript"||i.document.languageId==="typescriptreact")&&this._updateAllDiagnosticCodesAfterTimeout()})),this._updateAllDiagnosticCodesAfterTimeout(),this._registerTelemetryEventEmitter()}_telemetryReporter;_diagnosticsCollection;_diagnosticCodesMap=new Map;_diagnosticSnapshotsMap=new Ln(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)}},gy=class extends _e{_diagnostics;_settings=new RC;_currentDiagnostics;_pendingUpdates;_updateDelay=50;_diagnosticsTelemetryManager;constructor(e,t,n,i){super(),this._diagnostics=new Ln(void 0,{onCaseInsensitiveFileSystem:i}),this._pendingUpdates=new Ln(void 0,{onCaseInsensitiveFileSystem:i}),this._currentDiagnostics=this._register(kl.languages.createDiagnosticCollection(e)),(Math.random()*1e3<=1||t.enableDiagnosticsTelemetry)&&(this._diagnosticsTelemetryManager=this._register(new wC(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 NC(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 hy=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();kt();Cd();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 bl("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 bl("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 uy())t.push({language:i,scheme:o})}return{semantic:t,syntax:n}}async registerProviders(){let t=this.documentSelector,n=new hy;await Promise.all([Promise.resolve().then(()=>($0(),z0)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(nO(),rO)).then(i=>this._register(i.register(t,this.description,this.client,n))),Promise.resolve().then(()=>(oO(),iO)).then(i=>this._register(i.register(t,this.description,this.client,n))),Promise.resolve().then(()=>(pO(),fO)).then(i=>this._register(i.register(t,this.description,this.client,this.typingsStatus,this.fileConfigurationManager,this.commandManager,this.telemetryReporter,this.onCompletionAccepted))),Promise.resolve().then(()=>(gO(),mO)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(SO(),yO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(bO(),TO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(PO(),CO)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(DO(),xO)).then(i=>this._register(i.register(t,this.client,n))),Promise.resolve().then(()=>(NO(),IO)).then(i=>this._register(i.register(this.client,this.commandManager))),Promise.resolve().then(()=>(tk(),ek)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager,this.client.diagnosticsManager))),Promise.resolve().then(()=>(nk(),rk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(ok(),ik)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(ak(),sk)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(uk(),lk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(fk(),dk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager,this.telemetryReporter))),Promise.resolve().then(()=>(mk(),vk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(hk(),gk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Sk(),yk)).then(i=>this._register(i.register(t,this.client,this.commandManager,this.fileConfigurationManager,this.telemetryReporter))),Promise.resolve().then(()=>(Pk(),Ck)).then(i=>this._register(i.register(t,this.client,this.fileConfigurationManager,this.commandManager,this.client.diagnosticsManager,this.telemetryReporter))),Promise.resolve().then(()=>(Ok(),Ak)).then(i=>this._register(i.register(t,this.client,n,this.fileConfigurationManager,this.commandManager,this.telemetryReporter))),Promise.resolve().then(()=>(Fk(),Lk)).then(i=>this._register(i.register(t,this.client))),Promise.resolve().then(()=>(Uk(),Mk)).then(i=>this._register(i.register(t,this.description,this.client,this.fileConfigurationManager))),Promise.resolve().then(()=>(jk(),Vk)).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(t,this.client))),Promise.resolve().then(()=>(zk(),Wk)).then(i=>this._register(i.register(this.client,this.commandManager))),Promise.resolve().then(()=>(Jk(),$k)).then(i=>this._register(i.register(t,this.description,this.client))),Promise.resolve().then(()=>(Zk(),Qk)).then(i=>this._register(i.register(t,this.client)))])}handlesUri(t){let n=(0,aS.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,aS.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()&&(!Za()||!H0()||this.client.configuration.webProjectWideIntellisenseSuppressSemanticErrors||!this.client.configuration.webProjectWideIntellisenseEnabled)||t===1&&n.scheme===Dd.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 lc=U(require("vscode"));kt();yt();var cS=class r extends _e{constructor(t){super();this.context=t;this._logLevel=this._register(new bl("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||={}),lc.window.showInformationMessage(lc.l10n.t("TS Server logging is currently enabled which may impact performance."),{title:lc.l10n.t("Disable logging"),choice:0},{title:lc.l10n.t("Don't show again"),choice:1}).then(n=>{if(n){if(n.choice===0)return lc.workspace.getConfiguration().update(`${pn}.tsserver.log`,"off",!0);if(n.choice===1)return this.context.globalState.update(r.doNotPromptLogLevelStorageKey,!0)}})}};WC();Fn();Xe();var sL=U(require("path")),Z=U(require("vscode"));Wi();my();var lS=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 av=U(require("vscode"));yt();var cv=class extends _e{constructor(t){super();this.logger=t}logger;traceRequest(t,n,i,o){this.logger.logLevel===av.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===av.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===av.LogLevel.Trace&&this.trace(t,`Async response received: ${n} (${i}). Request took ${Date.now()-o.queuingStartTime} ms.`)}traceEvent(t,n){this.logger.logLevel===av.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)]:[])}};gd();Qt();var ft=U(require("vscode"));Wi();_i();Xe();dt();Ti();kt();Ml();ko();yt();vy();Qt();function eL(r){switch(r){case Il:return"TS";case Os:return"TSX";case Ha:return"JS";case Ka:return"JSX"}}var bP=class{constructor(e,t){this.args=e;this.scriptKind=t}args;scriptKind;type=0},EP=class{constructor(e,t){this.args=e;this.scriptKind=t}args;scriptKind;type=1},CP=class{constructor(e){this.args=e}args;type=2},PP=class{constructor(e,t,n){this.client=e;this._pending=new Ln(t,{onCaseInsensitiveFileSystem:n})}client;_pending;open(e,t){this.updatePending(e,new EP(t,t.scriptKindName))}close(e,t,n){return this.updatePending(e,new bP(t,n))}change(e,t,n){n.length&&this.updatePending(e,new CP({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}},xP=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=eL(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,B0,Pd)?"/":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,eL(this.document.languageId)))}onContentChanged(e){this.state!==1&&console.error(`Unexpected buffer state: ${this.state}`),this.synchronizer.change(this.resource,this.filepath,e)}},DP=class extends Ln{getForPath(e){return this.get(ft.Uri.file(e))}get allBuffers(){return this.values()}},IP=class extends Ln{getOrderedFileSet(){let e=Array.from(this.entries()).sort((n,i)=>n.value-i.value).map(n=>n.resource),t=new Ln(this._normalizePath,this.config);for(let n of e)t.set(n,void 0);return t}},NP=class r{constructor(e,t,n){this.client=e;this.files=t;if(!this.isErrorReportingEnabled()){this._done=!0,nc(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,nc(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()}},RP=class extends _e{_onDidChange=this._register(new ft.EventEmitter);onDidChange=this._onDidChange.event;_tabResources;constructor(e,t){super(),this._tabResources=new Ln(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===xC){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]:[]}},lv=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 Nd(300);let i=o=>this.client.toTsFilePath(o);this.syncedBuffers=new DP(i,{onCaseInsensitiveFileSystem:n}),this.pendingDiagnostics=new IP(i,{onCaseInsensitiveFileSystem:n}),this.synchronizer=new PP(e,i,n),this._tabResources=this._register(new RP(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 xP(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=NP.executeGetErrRequest(this.client,e,()=>{this.pendingGetErr===t&&(this.pendingGetErr=void 0)})}this.pendingDiagnostics.clear()}shouldValidate(e){return jp(e.resource,Pd)||!this.client.configuration.enableProjectDiagnostics&&!this._tabResources.has(e.resource)?!1:this._validate.getValue(e.document)}};var ti=U(require("vscode"));Ml();yt();var tL="typescript.useWorkspaceNode",rL="typescript.lastKnownWorkspaceNode",uS=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?nc(()=>{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?nc(()=>{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(rL)===t)return this.workspaceState.get(tL)}async setUseWorkspaceNodeState(t,n){await this.workspaceState.update(rL,n),await this.workspaceState.update(tL,t)}};var fS=U(require("path")),nL=U(require("vscode"));var dS=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(fS.isAbsolute(e))return[e];let t=Wa.asAbsoluteWorkspacePath(e);return t!==void 0?[t]:(nL.workspace.workspaceFolders||[]).map(n=>fS.join(n.uri.fsPath,e))}};Fn();UC();var uc=U(require("vscode"));dt();Cd();Qt();Bp();ic();var pS=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(()=>uc.window.createOutputChannel(uc.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 Dy({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 xy({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 Cy(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=uc.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"),Za()&&a.push("--enableProjectWideIntelliSenseOnWeb"),{args:a,tsServerLog:c,tsServerTraceDirectory:l}}static isLoggingEnabled(e){return e.tsServerLogLevel!==0}static getTsLocale(e){return e.locale?e.locale:uc.env.language}};var ct=U(require("vscode"));kt();Ml();yt();var vS="typescript.useWorkspaceTsdk",iL="typescript.suppressPromptWorkspaceTsdk",mS=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)&&nc(()=>{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(vS,!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(vS,!0),await ct.workspace.getConfiguration(pn).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 7"),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(vS,!0),this.updateActiveVersion(t)):s===o&&await this.workspaceState.update(iL,!0)}updateActiveVersion(t){let n=this.currentVersion;this._currentVersion=t,n.eq(t)||this._onDidPickNewVersion.fire()}get useWorkspaceTsdkSetting(){return this.workspaceState.get(vS,!1)}get suppressPromptWorkspaceTsdkSetting(){return this.workspaceState.get(iL,!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 oL(r,e,t,n){return i=>{e()===r&&t()&&n(i)}}function gS(r,e=0){switch(typeof r){case"object":return r===null?jl(349,e):Array.isArray(r)?mK(r,e):gK(r,e);case"string":return wP(r,e);case"boolean":return vK(r,e);case"number":return jl(r,e);case"undefined":return 937*31;default:return wP(String(r),617)}}function jl(r,e){return(e<<5)-e+r|0}function vK(r,e){return jl(r?433:863,e)}function wP(r,e){e=jl(149417,e);for(let t=0,n=r.length;t<n;t++)e=jl(r.charCodeAt(t),e);return e}function mK(r,e){return e=jl(104579,e),r.reduce((t,n)=>gS(n,t),e)}function gK(r,e){return e=jl(181387,e),Object.keys(r).sort().reduce((t,n)=>(t=wP(n,t),gS(Reflect.get(r,n),t)),e)}Wh();Cd();var dc;(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})(dc||={});var AP="ts-nul-authority",Ld="^",kP="github.copilot-chat",uv=class extends _e{constructor(t,n,i,o){super();this.context=t;this.loadingIndicator=this._register(new OP(this)),this.logger=i.logger,this.tracer=new cv(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 dS(this._configuration),this._versionManager=this._register(new mS(this._configuration,this.versionProvider,t.workspaceState)),this._register(this._versionManager.onDidPickNewVersion(()=>{this.restartTsServer()})),this._nodeVersionManager=this._register(new uS(this._configuration,t.workspaceState)),this._register(this._nodeVersionManager.onDidPickNewVersion(()=>{this.restartTsServer()})),this.bufferSyncSupport=new lv(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)}),Z.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),y0(this._configuration,l)||this.restartTsServer())},this,this._disposables),this.telemetryReporter=new lS(i.experimentTelemetryReporter,()=>this.serverState.type===1&&this.serverState.tsserverVersion?this.serverState.tsserverVersion:this.apiVersion.fullVersionString),this.diagnosticsManager=this._register(new gy("typescript",this._configuration,this.telemetryReporter,n)),this.typescriptServerSpawner=new pS(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=dc.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 ec(0,1):sn()?this.isProjectWideIntellisenseOnWebEnabled()?new ec(0,1,2):new ec(0,1):this.apiVersion.gte(ve.v400)?new ec(0,1,2):new ec(0,2)}_onDidChangeCapabilities=this._register(new Z.EventEmitter);onDidChangeCapabilities=this._onDidChangeCapabilities.event;isProjectWideIntellisenseOnWebEnabled(){return Za()&&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 Z.EventEmitter);onTsServerStarted=this._onTsServerStarted.event;_onDiagnosticsReceived=this._register(new Z.EventEmitter);onDiagnosticsReceived=this._onDiagnosticsReceived.event;_onConfigDiagnosticsReceived=this._register(new Z.EventEmitter);onConfigDiagnosticsReceived=this._onConfigDiagnosticsReceived.event;_onResendModelsRequested=this._register(new Z.EventEmitter);onResendModelsRequested=this._onResendModelsRequested.event;_onProjectLanguageServiceStateChanged=this._register(new Z.EventEmitter);onProjectLanguageServiceStateChanged=this._onProjectLanguageServiceStateChanged.event;_onDidBeginInstallTypings=this._register(new Z.EventEmitter);onDidBeginInstallTypings=this._onDidBeginInstallTypings.event;_onDidEndInstallTypings=this._register(new Z.EventEmitter);onDidEndInstallTypings=this._onDidEndInstallTypings.event;_onTypesInstallerInitializationFailed=this._register(new Z.EventEmitter);onTypesInstallerInitializationFailed=this._onTypesInstallerInitializationFailed.event;_onSurveyReady=this._register(new Z.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"),dc.None;if(this.hasServerFatallyCrashedTooManyTimes)return this.logger.info("Not starting server: too many crashes"),dc.None;let n=this._versionManager.currentVersion;n.isValid||(Z.window.showWarningMessage(Ls(Z.l10n.t("The path {0} doesn't point to a valid tsserver install. Falling back to bundled TypeScript version.",n.path),Z.l10n.t("The configured path doesn't point to a valid tsserver install. Falling back to bundled TypeScript version."))),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 dc.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=>gS(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&&Z.window.showErrorMessage(Ls(Z.l10n.t("TypeScript language server exited with error. Error message is: {0}",l.message||l.name),Z.l10n.t("TypeScript language server exited with an error. Check the TypeScript output for details."))),this.serverState=new dc.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(oL(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),DE(Array.from(this.watches.values()))}async showVersionPicker(){this._versionManager.promptUserForVersion()}async openTsServerLogFile(){if(this._configuration.tsServerLogLevel===0)return Z.window.showErrorMessage(Z.l10n.t("TS Server logging is off. Please set 'js/ts.tsserver.log' and restart the TS server to enable logging"),{title:Z.l10n.t("Enable logging and restart TS server")}).then(t=>{if(t)return Z.workspace.getConfiguration().update("js/ts.tsserver.log","verbose",!0).then(()=>{this.restartTsServer()})}),!1;if(this.serverState.type!==1||!this.serverState.server.tsServerLog)return Z.window.showWarningMessage(Z.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 Z.workspace.openTextDocument(this.serverState.server.tsServerLog.uri);return await Z.window.showTextDocument(t),!0}catch{}try{return await Z.commands.executeCommand("revealFileInOS",this.serverState.server.tsServerLog.uri),!0}catch{return Z.window.showWarningMessage(Z.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{...XE(this.apiVersion,0,t),allowJs:!0,allowSyntheticDefaultImports:!0,allowNonTsExtensions:!0,resolveJsonModule:!0}}serviceExited(t,n){if(this.resetWatchers(),this.loadingIndicator.reset(),this.serverState=dc.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()!==kP),c=[...new Set(a.map(d=>d.extension.id))].join(", "),l={title:Z.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=Z.window.showErrorMessage(Z.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=Z.window.showErrorMessage(Z.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=Z.window.showWarningMessage(Z.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=Z.window.showWarningMessage(Z.l10n.t("The JS/TS language service crashed 5 times in the last 5 Minutes."),l))))):["vscode-insiders","code-oss"].includes(Z.env.uriScheme)&&(this.numberRestarts=0,this._isPromptingAfterCrash||(a.length?u=Z.window.showWarningMessage(Z.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=Z.window.showWarningMessage(Z.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:Z.l10n.t("Report issue against Yarn PnP")};await Z.window.showWarningMessage(Z.l10n.t("Please report an issue against Yarn PnP"),{modal:!0,detail:Z.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&&Z.env.openExternal(Z.Uri.parse("https://github.com/yarnpkg/berry/issues"))}else f&&n.lt(f)?Z.window.showWarningMessage(Z.l10n.t("Please update your TypeScript version"),{modal:!0,detail:Z.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)}):Z.env.openExternal(Z.Uri.parse("https://github.com/microsoft/vscode/wiki/TypeScript-Issues"))}}),o&&this.startService(!0)}}toTsFilePath(t){if(!Al.has(t.scheme))return t.scheme===Gi&&!sn()?t.fsPath:(this.isProjectWideIntellisenseOnWebEnabled()?"":Ld)+"/"+t.scheme+"/"+(t.authority||AP)+(t.path.startsWith("/")?t.path:"/"+t.path)+(t.fragment?"#"+t.fragment:"")}toOpenTsFilePath(t,n={}){let i=t instanceof Z.Uri?t:t.uri;if(!this.bufferSyncSupport.ensureHasBuffer(i)){!n.suppressAlertOnFailure&&!Al.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 uy().includes(t.scheme);case 0:case 1:return!0}}toResource(t){if(sn()){if(t.startsWith("/lib.")&&t.endsWith(".d.ts"))return Z.Uri.joinPath(this.context.extensionUri,"dist","browser","typescript",t.slice(1));let n=t.match(/^\/([^\/]+)\/([^\/]*)\/(.+)$/);if(n){let i=Z.Uri.parse(n[1]+"://"+(n[2]===AP?"":n[2])+"/"+n[3]);return this.bufferSyncSupport.toVsCodeResource(i)}}if(t.startsWith(Ld)){let n=t.match(/^\^\/([^\/]+)\/([^\/]*)\/(.+)$/);if(n){let i=Z.Uri.parse(n[1]+"://"+(n[2]===AP?"":n[2])+"/"+n[3]);return this.bufferSyncSupport.toVsCodeResource(i)}}return this.bufferSyncSupport.toResource(t)}getWorkspaceRootForResource(t){let n=Z.workspace.workspaceFolders?Array.from(Z.workspace.workspaceFolders):void 0;if(n?.length){if(t.scheme===Dd.notebookCell){for(let i of Z.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 Z.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 Z.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 qs?n.telemetry:{command:t}}),console.error(`A non-recoverable error occurred while executing tsserver command: ${t}`),n instanceof qs&&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 qs&&(this.serverState=new dc.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:hK(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 Z.RelativePattern(Z.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 Z.RelativePattern(Z.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 Tl,s=o.add(Z.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 hK(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 OP=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);Z.window.withProgress({location:Z.ProgressLocation.Window,title:Ls(Z.l10n.t("Initializing '{0}'",n),Z.l10n.t("Initializing project"))},()=>new Promise(i=>{this._task={project:t,resolve:i}}))}getProjectDisplayName(t){let n=this.client.toResource(t),i=Z.workspace.asRelativePath(n),o=60;return i.length>o?"..."+i.slice(-o):i}startedLoadingFile(t,n){this._task||Z.window.withProgress({location:Z.ProgressLocation.Window,title:Ls(Z.l10n.t("Analyzing '{0}' and its dependencies",sL.basename(t)),Z.l10n.t("Analyzing file and its dependencies"))},()=>n)}finishedLoadingProject(t){this._task?.project===t&&(this._task.resolve(),this._task=void 0)}};var Pt=U(require("vscode"));_i();gd();dt();yt();var ql;(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})(ql||={});var hS=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 QE(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=ql.None;dispose(){super.dispose(),this._statusItem?.dispose()}async updateStatus(){let t=this._activeTextEditorManager.activeJsTsEditor?.document;if(!t||!Lo(t)){this.updateState(ql.None);return}if(!this._client.hasCapabilityForResource(t.uri,2)){this.updateState(ql.SyntaxOnly);return}let n=this._client.toOpenTsFilePath(t,{suppressAlertOnFailure:!0});if(!n){this.updateState(ql.None);return}if(!this._ready)return;let i=Nl(t)?0:1,o=new ql.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 ql.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,Dl(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",Vh),this._statusItem.name=Pt.l10n.t("JS/TS IntelliSense Status")),this._statusItem}};var Zt=U(require("vscode"));gd();var LP=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 yK(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&&aL(e,n)}))}})}function aL(r,e){if(!Dl(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 cL(r){let e=[],t=new LP(r.telemetryReporter);return e.push(Zt.commands.registerCommand("js.projectStatus.command",()=>{t.configFileName&&aL(r,t.configFileName);let{message:n}=t.getCurrentHint();return Zt.window.showInformationMessage(n)})),e.push(yK(t,r)),Zt.Disposable.from(...e)}var Xi=U(require("vscode"));kt();yt();var lL=30*1e3,dv=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)},lL))}onEndInstallTypings(e){let t=this._acquiringTypings.get(e);t&&clearTimeout(t),this._acquiringTypings.delete(e)}},yS=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),lL),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 SS=class extends _e{constructor(t){super();this._client=t;this._statusItem=this._register(Fd.languages.createLanguageStatusItem("typescript.version",Vh)),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:yd.id,title:Fd.l10n.t("Select Version"),tooltip:t.path}}};Ti();yt();var CK=new Set([...qy,...RO,...wO,...Hy,...AO,...OO,...kO]),fv=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 uv(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 SS(this.client)),this._register(new hS(this.client,i.commandManager,i.activeJsTsEditorTracker)),this._register(new yS(this.client)),this.typingsStatus=this._register(new dv(this.client)),this._register(cL(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(()=>(dL(),uL)).then(a=>this._register(a.register(this.client,this.fileConfigurationManager,c=>this.handles(c)))),Promise.resolve().then(()=>(pL(),fL)).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 cS(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===Ll.error)return mr.DiagnosticSeverity.Warning;switch(e.category){case Ll.error:return mr.DiagnosticSeverity.Error;case Ll.warning:return mr.DiagnosticSeverity.Warning;case Ll.suggestion:return mr.DiagnosticSeverity.Hint;default:return mr.DiagnosticSeverity.Error}}isStyleCheckDiagnostic(e){return typeof e=="number"&&CK.has(e)}};var vL=U(require("vscode"));Wi();Qa();_i();yt();var pv=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&&(vL.commands.executeCommand("setContext",r.contextName,e),this.isInManagedFileContext=e)}isManagedFile(e){return this.isManagedScriptFile(e)||this.isManagedConfigFile(e)}isManagedScriptFile(e){return Lo(e.document)&&!Al.has(e.document.uri.scheme)}isManagedConfigFile(e){return bd(e.document.fileName)}};Wi();Qa();ic();function mL(r,e,t,n){return new Jr(()=>new fv(EC,r,e,t,n))}function gL(r,e,t,n=()=>Promise.resolve()){let i=[],o=[...EC.map(l=>l.languageIds),...e.plugins.map(l=>l.languages)].flat(),s=!1,a=l=>!s&&PK(o,l)?(s=!0,n().then(()=>{r.value,i.push(new pv(t))}),!0):!1;if(!vv.workspace.textDocuments.some(a)){let l=vv.workspace.onDidOpenTextDocument(u=>{a(u)&&l.dispose()},void 0,i)}return new vv.Disposable(()=>{i.forEach(l=>l.dispose())})}function PK(r,e){return(r.indexOf(e.languageId)>=0||bd(e.fileName))&&!Al.has(e.uri.scheme)}var hL=U(require("vscode"));ic();var _S=class{output=new Jr(()=>hL.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 TL=U(require("fs"));var yL=U(require("fs")),SL=U(require("os")),TS=U(require("path"));ic();function _L(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 xK=new Jr(()=>{let r=`vscode-typescript${process.platform!=="win32"&&process.getuid?process.getuid():""}`;return TS.join(SL.tmpdir(),r)}),YP=new Jr(()=>{let r=TS.join(xK.value,_L(20));return yL.mkdirSync(r,{recursive:!0}),r});function bS(r){return TS.join(YP.value,`${r}-${_L(20)}.tmp`)}var VP=class{constructor(e,t){this._serverId=e;this._tracer=t;this.cancellationPipeName=bS("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{TL.writeFileSync(this.cancellationPipeName+e,"")}catch{}return!0}},bL=new class{create(r,e){return new VP(r,e)}};var Ud=U(require("fs")),EL=U(require("path")),CL=U(require("vscode"));ic();var ES=class{constructor(e){this.context=e}context;getNewLogDirectory(){let e=this.logDirectory.value;if(e)try{return CL.Uri.file(Ud.mkdtempSync(EL.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 PL;(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})(PL||={});var CS=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(),PL.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 IS=U(require("child_process")),DL=U(require("fs")),IL=U(require("path")),Go=U(require("vscode"));yt();Qt();Bp();var jP=8192,IK="Content-Length: ",xL=Buffer.byteLength(IK,"utf8"),NK=Buffer.from(" ","utf8")[0],PS=Buffer.from("\r","utf8")[0],xS=Buffer.from(`
`,"utf8")[0],NL=5e3,RL={seq:0,type:"request",command:"exit"},qP=class{index=0;buffer=Buffer.allocUnsafe(jP);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)/jP)+1)*jP;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]===NK||this.buffer[t]===PS||this.buffer[t]===xS);)t++;if(this.index<t+xL)return e;t+=xL;let n=t;for(;t<this.index&&this.buffer[t]!==PS;)t++;if(t+3>=this.index||this.buffer[t+1]!==xS||this.buffer[t+2]!==PS||this.buffer[t+3]!==xS)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]===PS||this.buffer[n]===xS);)n++;return this.buffer.copy(this.buffer,0,n),this.index=this.index-n,t}},HP=class extends _e{buffer=new qP;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 RK(r,e,t){let n=Object.assign({},r);return t||(n.ELECTRON_RUN_AS_NODE="1"),n.NODE_PATH=IL.join(e,"..","..",".."),n.PATH=n.PATH||process.env.PATH,n}function wK(r,e){let t=[],n=AK(r);if(n){let i=wL()?"--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 AK(r){if(r==="syntax")return;let e=wL()||OK();if(e){let t=parseInt(e);if(!isNaN(t))return t}}function OK(){return process.env[Go.env.remoteName?"TSS_REMOTE_DEBUG":"TSS_DEBUG"]}function wL(){return process.env[Go.env.remoteName?"TSS_REMOTE_DEBUG_BRK":"TSS_DEBUG_BRK"]}var KP=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(RL)}catch{this._process.kill();return}this._killTimeout=setTimeout(()=>this._process.kill(),NL),this._killTimeout.unref?.()}}clearKillTimeout(){this._killTimeout&&(clearTimeout(this._killTimeout),this._killTimeout=void 0)}},BP=class extends _e{constructor(t,n){super();this._process=t;this._useGracefulShutdown=n;this._reader=this._register(new HP(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(RL)+`\r
`,"utf8"),this._process.stdin?.end()}catch{this._process.kill(),this._reader.dispose();return}this._killTimeout=setTimeout(()=>{this._process.kill(),this._reader.dispose()},NL),this._killTimeout.unref?.()}}clearKillTimeout(){this._killTimeout&&(clearTimeout(this._killTimeout),this._killTimeout=void 0),this._reader.dispose()}},DS=class{fork(e,t,n,i,o,s,a){let c=e.tsServerPath;DL.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=RK(process.env,c,!!l),d=[...t],f=wK(n,i),v=i.heapProfile.enabled,m=!l&&e.apiVersion?.gte(ve.v460);m&&d.push("--useNodeIpc");let S=l?IS.spawn(l,[...f,c,...d],{windowsHide:!0,cwd:void 0,env:u}):IS.fork(c,d,{silent:!0,cwd:void 0,env:u,execArgv:f,stdio:m?["pipe","pipe","pipe","ipc"]:void 0});return m?new KP(S,v):new BP(S,v)}};var Vd=U(require("fs")),an=U(require("path")),Qi=U(require("vscode"));Qt();var AL=U(require("vscode"));var Hl=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:AL.l10n.t("Could not load the TypeScript version at this path")}};var NS=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 Hl(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 Hl(e,i,r.getApiVersion(i),t)]}let n=Wa.asAbsoluteWorkspacePath(t);if(n!==void 0){let i=an.join(n,"tsserver.js");return[new Hl(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 Hl(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"));Qa();_i();yt();Ti();var RS=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 bd(e.document.fileName)}};var Vn=U(require("vscode"));kt();var GP="typescript.suggestTS7NoPlugins.dismissed";async function OL(r,e,t){if(r.globalState.get(GP)||!Vn.window.state.active)return;if(Dp()||Ch("experimental.useTsgo",{fallbackSection:"typescript"})){await r.globalState.update(GP,!0);return}if(t.plugins.some(c=>c.extension.id.toLowerCase()!==kP)||!await e.getTreatmentVariable("suggestTS7IfNoPlugins",!1))return;let i={title:Vn.l10n.t("Install")},o={title:Vn.l10n.t("Learn More")},s={title:Vn.l10n.t("Don't Show Again")},a=await Vn.window.showInformationMessage(Vn.l10n.t("Try TypeScript 7 for significantly faster type checking and language features."),{},i,o,s);await r.globalState.update(GP,!0),a===i?await Vn.commands.executeCommand("workbench.extensions.installExtension",NE):a===o&&await Vn.env.openExternal(Vn.Uri.parse("https://aka.ms/typescript7"))}var wS=U(require("fs"));var kL=(()=>{let r;return()=>{if(typeof r>"u")if(process.platform==="win32")r=!0;else if(process.platform!=="darwin")r=!1;else{let e=bS("typescript-case-check");wS.writeFileSync(e,""),r=wS.existsSync(e.toUpperCase())}return r}})();ic();function LL(r){let e=r.extension.packageJSON;return e&&typeof e=="object"?{name:e.name??"",version:e.version??"",aiKey:e.aiKey??""}:null}Lt();yt();function KK(r){let e=new CS;r.subscriptions.push(e);let t=new eF.EventEmitter;r.subscriptions.push(t);let n=new ES(r),i=new NS,o,s=LL(r);if(s){let{name:a,version:c,aiKey:l}=s,u=new QL.default(l);o=new Jh(u),r.subscriptions.push(o);let d=new cy(o,a,c,r.globalState);OL(r,d,e)}return Promise.resolve().then(()=>(zL(),WL)).then(a=>{r.subscriptions.push(a.register())}),r.subscriptions.push(ke([Id("experimental.useTsgo",{fallbackSection:"typescript"}),W0(RE)],()=>{let a=new Tl;return a.add(new xp).register(new ud),a},()=>{let a=new Tl,c=a.add(new xp),l=a.add(new RS),u=mL(r,kL(),{pluginManager:e,commandManager:c,logDirectoryProvider:n,cancellerFactory:bL,versionProvider:i,processFactory:new DS,activeJsTsEditorTracker:l,serviceConfigurationProvider:new zh,experimentTelemetryReporter:o,logger:new _S},d=>{t.fire(d)}).map(d=>a.add(d));return g0(c,u,e,l),Promise.resolve().then(()=>(XL(),JL)).then(d=>{a.add(d.register(new Jr(()=>u.value.serviceClient)))}),a.add(gL(u,e,l)),a})),pw(t.event,e)}function BK(){ZL.rmSync(YP.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