From 0960645f721b9bad6a559516cb85d6aec7a5359f Mon Sep 17 00:00:00 2001 From: jonatanklosko Date: Thu, 5 Oct 2023 13:28:22 +0000 Subject: [PATCH] Update assets --- static/assets/app.js | 248 +++++++++++++++++++++---------------------- 1 file changed, 124 insertions(+), 124 deletions(-) diff --git a/static/assets/app.js b/static/assets/app.js index 426c65b3d..ec5d359c9 100644 --- a/static/assets/app.js +++ b/static/assets/app.js @@ -1,17 +1,17 @@ -import{b as woe}from"./chunk-GNZE3QMP.js";import{a as FN,b as l_,c as HN,d as $S,e as BN,f as qh,g as YS,h as Jo,i as fn,j as Mc,k as xm,l as Em,m as so,n as XS,o as zN,p as UN,q as Yd,r as WN,s as jN}from"./chunk-AC3NSOOG.js";import{$ as Un,$a as Se,$b as IR,$c as k_,$d as JR,$e as hO,$f as BO,$g as kw,$h as Ore,$i as Wre,$j as Vw,$k as kb,A as GN,Aa as cR,Ab as zi,Ac as je,Ad as L_,Ae as Ni,Af as SO,Ag as qO,Ah as au,Ai as Rw,Aj as Vre,Ak as xb,Al as yoe,B as Nc,Ba as dR,Bb as Qh,Bc as Mn,Bd as KR,Be as gi,Bf as U_,Bg as qm,Bh as Zm,Bi as t1,Bj as HP,Bk as Xw,Bl as Coe,C as f_,Ca as wn,Cb as ow,Cc as LR,Cd as Zh,Ce as Vt,Cf as W_,Cg as GO,Ch as Lre,Ci as ob,Cj as Uw,Ck as Qw,Cl as Soe,D as km,Da as la,Db as bR,Dc as nre,Dd as vw,De as jc,Df as j_,Dg as $O,Dh as pf,Di as Kt,Dj as BP,Dk as Jw,Dl as cu,E as $N,Ea as uR,Eb as sw,Ec as hw,Ed as Tt,Ee as No,Ef as wO,Eg as Sre,Eh as xi,Ei as xa,Ej as zP,Ek as iF,El as ka,F as p_,Fa as hR,Fb as aw,Fc as rre,Fd as Kn,Fe as of,Ff as xO,Fg as G_,Fh as Ro,Fi as xP,Fj as Kre,Fk as nF,Fl as Rs,G as YN,Ga as nw,Gb as Pc,Gc as MR,Gd as M_,Ge as wl,Gf as EO,Gg as wre,Gh as lP,Gi as Hre,Gj as _f,Gk as rF,Gl as Os,H as nr,Ha as on,Hb as yR,Hc as ore,Hd as dre,He as F_,Hf as TO,Hg as Gm,Hh as wa,Hi as kl,Hj as Ww,Hk as ioe,I as Ln,Ia as Qd,Ib as CR,Ic as _l,Id as Uc,Ie as ss,If as Bm,Ig as ya,Ih as El,Ii as Ow,Ij as pb,Ik as oF,J as ml,Ja as Ts,Jb as SR,Jc as DR,Jd as ure,Je as ti,Jf as kO,Jg as YO,Jh as qc,Ji as EP,Jj as UP,Jk as noe,K as li,Ka as me,Kb as wR,Kc as x_,Kd as _w,Ke as lO,Kf as zm,Kg as Ls,Kh as Bt,Ki as TP,Kj as i1,Kk as Eb,L as $e,La as Jd,Lb as y_,Lc as E_,Ld as iu,Le as H_,Lf as _a,Lg as $m,Lh as Gn,Li as Pw,Lj as WP,Lk as sF,M as JS,Ma as fe,Mb as xR,Mc as T_,Md as D_,Me as cO,Mf as xl,Mg as XO,Mh as cP,Mi as kP,Mj as mb,Mk as o1,N as XN,Na as fR,Nb as C_,Nc as sre,Nd as qR,Ne as Nr,Nf as IO,Ng as QO,Nh as Z_,Ni as sb,Nj as gb,Nk as aF,O as qt,Oa as gr,Ob as lw,Oc as eu,Od as N_,Oe as dO,Of as ou,Og as uf,Oh as dP,Oi as ab,Oj as jP,Ok as $c,P as QN,Pa as Wn,Pb as Si,Pc as fw,Pd as hre,Pe as Dt,Pf as AO,Pg as JO,Ph as eb,Pi as IP,Pj as jw,Pk as Tb,Q as JN,Qa as pR,Qb as ce,Qc as zc,Qd as O,Qe as uO,Qf as Cw,Qg as Tw,Qh as Mre,Qi as AP,Qj as qre,Qk as Zw,R as ZN,Ra as $h,Rb as nt,Rc as are,Rd as jt,Re as sf,Rf as LO,Rg as hf,Rh as uP,Ri as LP,Rj as vb,Rk as roe,S as ZS,Sa as Ht,Sb as Ke,Sc as Jh,Sd as ef,Se as yw,Sf as MO,Sg as br,Sh as Dre,Si as MP,Sj as _b,Sk as lF,T as m_,Ta as Di,Tb as ft,Tc as Nm,Td as R_,Te as $r,Tf as DO,Tg as ZO,Th as hP,Ti as Bre,Tj as VP,Tk as ooe,U as g_,Ua as mR,Ub as ER,Uc as NR,Ud as GR,Ue as pa,Uf as NO,Ug as eP,Uh as fP,Ui as Fw,Uj as bb,Uk as bf,V as ew,Va as Lo,Vb as TR,Vc as Rm,Vd as fa,Ve as ru,Vf as RO,Vg as tP,Vh as pP,Vi as Il,Vj as KP,Vk as e3,W as Im,Wa as He,Wb as kR,Wc as RR,Wd as tf,We as Vc,Wf as OO,Wg as xre,Wh as mP,Wi as Hw,Wj as Gre,Wk as Ki,X as eR,Xa as rr,Xb as Lr,Xc as Om,Xd as $R,Xe as As,Xf as PO,Xg as iP,Xh as Nre,Xi as DP,Xj as Dl,Xk as cF,Y as Lt,Ya as Et,Yb as Fc,Yc as lre,Yd as YR,Ye as Fm,Yf as Sw,Yg as Ere,Yh as gP,Yi as zre,Yj as yb,Yk as t3,Z as Rc,Za as Zt,Zb as Do,Zc as ha,Zd as XR,Ze as dt,Zf as FO,Zg as nP,Zh as Rre,Zi as Ure,Zj as qP,Zk as dF,_ as tR,_a as Ar,_b as cw,_c as tu,_d as QR,_e as ma,_f as HO,_g as Tre,_h as Aw,_i as NP,_j as $re,_k as i3,a as v,aa as Li,ab as ri,ac as xe,ad as OR,ae as ZR,af as mre,ag as zO,ah as ff,ai as Lw,aj as Ei,ak as Yre,al as uF,b as De,ba as di,bb as Ci,bc as Is,bd as pw,be as nu,bf as fO,bg as UO,bh as ct,bi as Pre,bj as lb,bk as Cb,bl as Yc,c as at,ca as gl,cb as ts,cc as ns,cd as vr,ce as yl,cf as af,cg as WO,ch as qn,ci as Ds,cj as Al,ck as n1,cl as Ib,d as Ut,da as tw,db as xn,dc as Dm,dd as mw,de as O_,df as gre,dg as jO,dh as $_,di as e1,dj as RP,dk as Kw,dl as hF,e as Zo,ea as tre,eb as ca,ec as da,ed as PR,ee as P_,ef as pO,eg as VO,eh as kre,ei as vP,ej as lr,ek as Sb,el as Ta,f as c_,fa as v_,fb as is,fc as rs,fd as Ui,fe as eO,ff as vre,fg as ba,fh as Iw,fi as mf,fj as Ll,fk as GP,fl as s1,g as Io,ga as iR,gb as ks,gc as mi,gd as FR,ge as Cl,gf as lf,gg as Um,gh as rP,gi as tb,gj as Yr,gk as $P,gl as soe,h as Xd,ha as nR,hb as Lm,hc as Yi,hd as HR,he as tO,hf as _re,hg as Wm,hh as Ire,hi as ib,hj as cb,hk as Xre,hl as fF,i as At,ia as ire,ib as Yh,ic as Mr,id as I_,ie as fre,if as mO,ig as jm,ih as Ms,ii as _P,ij as lu,ik as qw,il as aoe,j as d_,ja as rR,jb as Oc,jc as Hc,jd as BR,je as iO,jf as bre,jg as Vm,jh as Ym,ji as Mw,jj as Ea,jk as Gw,jl as loe,k as VN,ka as Gh,kb as lt,kc as Bc,kd as zR,ke as pre,kf as gO,kg as KO,kh as oP,ki as Fre,kj as db,kk as $w,kl as pF,l as ao,la as __,lb as or,lc as S_,ld as UR,le as nO,lf as yre,lg as V_,lh as Y_,li as Oo,lj as ub,lk as Qre,ll as coe,m as Tm,ma as oR,mb as mt,mc as w_,md as WR,me as bw,mf as vO,mg as cf,mh as Ca,mi as gf,mj as OP,mk as YP,ml as mF,n as u_,na as ht,nb as qr,nc as wi,nd as oi,ne as nf,nf as Cre,ng as ww,nh as X_,ni as bP,nj as Qi,nk as XP,nl as gF,o as Vi,oa as Sn,ob as ui,oc as se,od as jR,oe as rO,of as ga,og as Km,oh as Xm,oi as nb,oj as cs,ok as QP,ol as vF,p as QS,pa as Ao,pb as St,pc as dw,pd as cre,pe as Dr,pf as Oe,pg as Rr,ph as Qm,pi as yP,pj as an,pk as Jre,pl as _F,q as Ft,qa as Am,qb as Bi,qc as ua,qd as A_,qe as oO,qf as ke,qg as K_,qh as sP,qi as Gc,qj as Ns,qk as wb,ql as doe,r as ne,ra as mr,rb as Xh,rc as Gr,rd as VR,re as rf,rf as _O,rg as _r,rh as Are,ri as ls,rj as vf,rk as JP,rl as uoe,s as oe,sa as sR,sb as rw,sc as Me,sd as Mt,se as sO,sf as Hm,sg as su,sh as Kc,si as Tl,sj as jre,sk as ZP,sl as hoe,t as Hi,ta as Rt,tb as gR,tc as X,td as jn,te as aO,tf as bO,tg as xw,th as Q_,ti as Dw,tj as Ml,tk as eF,tl as foe,u as KN,ua as es,ub as Mo,uc as uw,ud as Xi,ue as Pm,uf as as,ug as Ew,uh as Jm,ui as Nw,uj as hb,uk as Zre,ul as poe,v as Ce,va as aR,vb as vl,vc as AR,vd as os,ve as lo,vf as va,vg as pn,vh as be,vi as CP,vj as Bw,vk as Yw,vl as moe,w as h_,wa as iw,wb as vR,wc as Ae,wd as sr,we as sn,wf as B_,wg as vi,wh as xt,wi as SP,wj as PP,wk as tF,wl as goe,x as qN,xa as lR,xb as _R,xc as Ze,xd as bl,xe as Wc,xf as z_,xg as df,xh as J_,xi as wP,xj as fb,xk as eoe,xl as voe,y as Dc,ya as b_,yb as Zd,yc as P,yd as Vn,ye as Sl,yf as yO,yg as ar,yh as Sa,yi as rb,yj as zw,yk as r1,yl as _oe,z as zn,za as Mi,zb as Mm,zc as qe,zd as gw,ze as et,zf as CO,zg as q_,zh as aP,zi as Dn,zj as FP,zk as toe,zl as boe}from"./chunk-XDVUM6M6.js";import{a as Re,b as Pt,c as $d,d as aa,e as M,f as gt,g as PN,h as Fi,i as Kh,j as Cn}from"./chunk-3X664NSF.js";var rH=gt(()=>{});var Yb=gt(($b,oH)=>{(function(i,e){typeof $b=="object"?oH.exports=$b=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})($b,function(){var i=i||function(e,t){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof $d=="function")try{n=rH()}catch(S){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(S){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(S){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function S(){}return function(k){var N;return S.prototype=k,N=new S,S.prototype=null,N}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(S){var k=o(this);return S&&k.mixIn(S),(!k.hasOwnProperty("init")||this.init===k.init)&&(k.init=function(){k.$super.init.apply(this,arguments)}),k.init.prototype=k,k.$super=this,k},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var k in S)S.hasOwnProperty(k)&&(this[k]=S[k]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(S,k){S=this.words=S||[],k!=t?this.sigBytes=k:this.sigBytes=S.length*4},toString:function(S){return(S||u).stringify(this)},concat:function(S){var k=this.words,N=S.words,A=this.sigBytes,H=S.sigBytes;if(this.clamp(),A%4)for(var K=0;K>>2]>>>24-K%4*8&255;k[A+K>>>2]|=W<<24-(A+K)%4*8}else for(var re=0;re>>2]=N[re>>>2];return this.sigBytes+=H,this},clamp:function(){var S=this.words,k=this.sigBytes;S[k>>>2]&=4294967295<<32-k%4*8,S.length=e.ceil(k/4)},clone:function(){var S=l.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var k=[],N=0;N>>2]>>>24-H%4*8&255;A.push((K>>>4).toString(16)),A.push((K&15).toString(16))}return A.join("")},parse:function(S){for(var k=S.length,N=[],A=0;A>>3]|=parseInt(S.substr(A,2),16)<<24-A%8*4;return new c.init(N,k/2)}},h=d.Latin1={stringify:function(S){for(var k=S.words,N=S.sigBytes,A=[],H=0;H>>2]>>>24-H%4*8&255;A.push(String.fromCharCode(K))}return A.join("")},parse:function(S){for(var k=S.length,N=[],A=0;A>>2]|=(S.charCodeAt(A)&255)<<24-A%4*8;return new c.init(N,k)}},p=d.Utf8={stringify:function(S){try{return decodeURIComponent(escape(h.stringify(S)))}catch(k){throw new Error("Malformed UTF-8 data")}},parse:function(S){return h.parse(unescape(encodeURIComponent(S)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=p.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var k,N=this._data,A=N.words,H=N.sigBytes,K=this.blockSize,W=K*4,re=H/W;S?re=e.ceil(re):re=e.max((re|0)-this._minBufferSize,0);var ae=re*K,Ne=e.min(ae*4,H);if(ae){for(var he=0;he{(function(i,e){typeof Xb=="object"?sH.exports=Xb=e(Yb()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Xb,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[];(function(){for(var p=0;p<64;p++)a[p]=e.abs(e.sin(p+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,m){for(var g=0;g<16;g++){var b=m+g,S=p[b];p[b]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}var k=this._hash.words,N=p[m+0],A=p[m+1],H=p[m+2],K=p[m+3],W=p[m+4],re=p[m+5],ae=p[m+6],Ne=p[m+7],he=p[m+8],Xe=p[m+9],st=p[m+10],rt=p[m+11],Nt=p[m+12],Z=p[m+13],ye=p[m+14],_e=p[m+15],$=k[0],Q=k[1],ie=k[2],de=k[3];$=c($,Q,ie,de,N,7,a[0]),de=c(de,$,Q,ie,A,12,a[1]),ie=c(ie,de,$,Q,H,17,a[2]),Q=c(Q,ie,de,$,K,22,a[3]),$=c($,Q,ie,de,W,7,a[4]),de=c(de,$,Q,ie,re,12,a[5]),ie=c(ie,de,$,Q,ae,17,a[6]),Q=c(Q,ie,de,$,Ne,22,a[7]),$=c($,Q,ie,de,he,7,a[8]),de=c(de,$,Q,ie,Xe,12,a[9]),ie=c(ie,de,$,Q,st,17,a[10]),Q=c(Q,ie,de,$,rt,22,a[11]),$=c($,Q,ie,de,Nt,7,a[12]),de=c(de,$,Q,ie,Z,12,a[13]),ie=c(ie,de,$,Q,ye,17,a[14]),Q=c(Q,ie,de,$,_e,22,a[15]),$=d($,Q,ie,de,A,5,a[16]),de=d(de,$,Q,ie,ae,9,a[17]),ie=d(ie,de,$,Q,rt,14,a[18]),Q=d(Q,ie,de,$,N,20,a[19]),$=d($,Q,ie,de,re,5,a[20]),de=d(de,$,Q,ie,st,9,a[21]),ie=d(ie,de,$,Q,_e,14,a[22]),Q=d(Q,ie,de,$,W,20,a[23]),$=d($,Q,ie,de,Xe,5,a[24]),de=d(de,$,Q,ie,ye,9,a[25]),ie=d(ie,de,$,Q,K,14,a[26]),Q=d(Q,ie,de,$,he,20,a[27]),$=d($,Q,ie,de,Z,5,a[28]),de=d(de,$,Q,ie,H,9,a[29]),ie=d(ie,de,$,Q,Ne,14,a[30]),Q=d(Q,ie,de,$,Nt,20,a[31]),$=u($,Q,ie,de,re,4,a[32]),de=u(de,$,Q,ie,he,11,a[33]),ie=u(ie,de,$,Q,rt,16,a[34]),Q=u(Q,ie,de,$,ye,23,a[35]),$=u($,Q,ie,de,A,4,a[36]),de=u(de,$,Q,ie,W,11,a[37]),ie=u(ie,de,$,Q,Ne,16,a[38]),Q=u(Q,ie,de,$,st,23,a[39]),$=u($,Q,ie,de,Z,4,a[40]),de=u(de,$,Q,ie,N,11,a[41]),ie=u(ie,de,$,Q,K,16,a[42]),Q=u(Q,ie,de,$,ae,23,a[43]),$=u($,Q,ie,de,Xe,4,a[44]),de=u(de,$,Q,ie,Nt,11,a[45]),ie=u(ie,de,$,Q,_e,16,a[46]),Q=u(Q,ie,de,$,H,23,a[47]),$=h($,Q,ie,de,N,6,a[48]),de=h(de,$,Q,ie,Ne,10,a[49]),ie=h(ie,de,$,Q,ye,15,a[50]),Q=h(Q,ie,de,$,re,21,a[51]),$=h($,Q,ie,de,Nt,6,a[52]),de=h(de,$,Q,ie,K,10,a[53]),ie=h(ie,de,$,Q,st,15,a[54]),Q=h(Q,ie,de,$,A,21,a[55]),$=h($,Q,ie,de,he,6,a[56]),de=h(de,$,Q,ie,_e,10,a[57]),ie=h(ie,de,$,Q,ae,15,a[58]),Q=h(Q,ie,de,$,Z,21,a[59]),$=h($,Q,ie,de,W,6,a[60]),de=h(de,$,Q,ie,rt,10,a[61]),ie=h(ie,de,$,Q,H,15,a[62]),Q=h(Q,ie,de,$,Xe,21,a[63]),k[0]=k[0]+$|0,k[1]=k[1]+Q|0,k[2]=k[2]+ie|0,k[3]=k[3]+de|0},_doFinalize:function(){var p=this._data,m=p.words,g=this._nDataBytes*8,b=p.sigBytes*8;m[b>>>5]|=128<<24-b%32;var S=e.floor(g/4294967296),k=g;m[(b+64>>>9<<4)+15]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,p.sigBytes=(m.length+1)*4,this._process();for(var N=this._hash,A=N.words,H=0;H<4;H++){var K=A[H];A[H]=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360}return N},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function c(p,m,g,b,S,k,N){var A=p+(m&g|~m&b)+S+N;return(A<>>32-k)+m}function d(p,m,g,b,S,k,N){var A=p+(m&b|g&~b)+S+N;return(A<>>32-k)+m}function u(p,m,g,b,S,k,N){var A=p+(m^g^b)+S+N;return(A<>>32-k)+m}function h(p,m,g,b,S,k,N){var A=p+(g^(m|~b))+S+N;return(A<>>32-k)+m}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var cH=gt((Qb,lH)=>{(function(i,e){typeof Qb=="object"?lH.exports=Qb=e(Yb()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Qb,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];(function(){function u(g){for(var b=e.sqrt(g),S=2;S<=b;S++)if(!(g%S))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var p=2,m=0;m<64;)u(p)&&(m<8&&(a[m]=h(e.pow(p,1/2))),l[m]=h(e.pow(p,1/3)),m++),p++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(u,h){for(var p=this._hash.words,m=p[0],g=p[1],b=p[2],S=p[3],k=p[4],N=p[5],A=p[6],H=p[7],K=0;K<64;K++){if(K<16)c[K]=u[h+K]|0;else{var W=c[K-15],re=(W<<25|W>>>7)^(W<<14|W>>>18)^W>>>3,ae=c[K-2],Ne=(ae<<15|ae>>>17)^(ae<<13|ae>>>19)^ae>>>10;c[K]=re+c[K-7]+Ne+c[K-16]}var he=k&N^~k&A,Xe=m&g^m&b^g&b,st=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),rt=(k<<26|k>>>6)^(k<<21|k>>>11)^(k<<7|k>>>25),Nt=H+rt+he+l[K]+c[K],Z=st+Xe;H=A,A=N,N=k,k=S+Nt|0,S=b,b=g,g=m,m=Nt+Z|0}p[0]=p[0]+m|0,p[1]=p[1]+g|0,p[2]=p[2]+b|0,p[3]=p[3]+S|0,p[4]=p[4]+k|0,p[5]=p[5]+N|0,p[6]=p[6]+A|0,p[7]=p[7]+H|0},_doFinalize:function(){var u=this._data,h=u.words,p=this._nDataBytes*8,m=u.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=e.floor(p/4294967296),h[(m+64>>>9<<4)+15]=p,u.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var u=o.clone.call(this);return u._hash=this._hash.clone(),u}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var uH=gt((Jb,dH)=>{(function(i,e){typeof Jb=="object"?dH.exports=Jb=e(Yb()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Jb,function(i){return function(){var e=i,t=e.lib,n=t.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var u=[],h=0;h>>2]>>>24-h%4*8&255,m=l[h+1>>>2]>>>24-(h+1)%4*8&255,g=l[h+2>>>2]>>>24-(h+2)%4*8&255,b=p<<16|m<<8|g,S=0;S<4&&h+S*.75>>6*(3-S)&63));var k=d.charAt(64);if(k)for(;u.length%4;)u.push(k);return u.join("")},parse:function(a){var l=a.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var u=0;u>>6-h%4*2,g=p|m;d[u>>>2]|=g<<24-u%4*8,u++}return n.create(d,u)}}(),i.enc.Base64})});var A3=gt((a9e,DH)=>{DH.exports=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}});var UH=gt((l9e,zH)=>{"use strict";var a4=Object.prototype.hasOwnProperty,BH=Object.prototype.toString,NH=Object.defineProperty,RH=Object.getOwnPropertyDescriptor,OH=function(e){return typeof Array.isArray=="function"?Array.isArray(e):BH.call(e)==="[object Array]"},PH=function(e){if(!e||BH.call(e)!=="[object Object]")return!1;var t=a4.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&a4.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||a4.call(e,r)},FH=function(e,t){NH&&t.name==="__proto__"?NH(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},HH=function(e,t){if(t==="__proto__")if(a4.call(e,t)){if(RH)return RH(e,t).value}else return;return e[t]};zH.exports=function i(){var e,t,n,r,o,s,a=arguments[0],l=1,c=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l{"use strict";var oz={};function ule(i){var e,t,n=oz[i];if(n)return n;for(n=oz[i]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1=56320&&s<=57343)){l+=encodeURIComponent(i[n]+i[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(i[n])}return l}b4.defaultChars=";/?:@&=+$,-_.!~*'()#";b4.componentChars="-_.!~*'()";sz.exports=b4});var w4=gt(Fl=>{"use strict";var _le=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];Fl.REPLACEMENT_CHARACTER="\uFFFD";Fl.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};Fl.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};Fl.isSurrogate=function(i){return i>=55296&&i<=57343};Fl.isSurrogatePair=function(i){return i>=56320&&i<=57343};Fl.getSurrogatePairCodePoint=function(i,e){return(i-55296)*1024+9216+e};Fl.isControlCodePoint=function(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159};Fl.isUndefinedCodePoint=function(i){return i>=64976&&i<=65007||_le.indexOf(i)>-1}});var x4=gt((C8e,Ez)=>{"use strict";Ez.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}});var kz=gt((S8e,Tz)=>{"use strict";var Lf=w4(),dx=x4(),mu=Lf.CODE_POINTS,ble=65536,ux=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ble}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){let t=this.html.charCodeAt(this.pos+1);if(Lf.isSurrogatePair(t))return this.pos++,this._addGap(),Lf.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,mu.EOF;return this._err(dx.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,mu.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===mu.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===mu.CARRIAGE_RETURN?(this.skipNextNewLine=!0,mu.LINE_FEED):(this.skipNextNewLine=!1,Lf.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===mu.LINE_FEED||e===mu.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Lf.isControlCodePoint(e)?this._err(dx.controlCharacterInInputStream):Lf.isUndefinedCodePoint(e)&&this._err(dx.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}};Tz.exports=ux});var Az=gt((w8e,Iz)=>{"use strict";Iz.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])});var R1=gt((x8e,kU)=>{"use strict";var yle=kz(),Ti=w4(),_u=Az(),ve=x4(),V=Ti.CODE_POINTS,gu=Ti.CODE_POINT_SEQUENCES,Cle={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},CU=1,SU=2,wU=4,Sle=CU|SU|wU,Yt="DATA_STATE",Df="RCDATA_STATE",D1="RAWTEXT_STATE",zl="SCRIPT_DATA_STATE",xU="PLAINTEXT_STATE",Lz="TAG_OPEN_STATE",Mz="END_TAG_OPEN_STATE",hx="TAG_NAME_STATE",Dz="RCDATA_LESS_THAN_SIGN_STATE",Nz="RCDATA_END_TAG_OPEN_STATE",Rz="RCDATA_END_TAG_NAME_STATE",Oz="RAWTEXT_LESS_THAN_SIGN_STATE",Pz="RAWTEXT_END_TAG_OPEN_STATE",Fz="RAWTEXT_END_TAG_NAME_STATE",Hz="SCRIPT_DATA_LESS_THAN_SIGN_STATE",Bz="SCRIPT_DATA_END_TAG_OPEN_STATE",zz="SCRIPT_DATA_END_TAG_NAME_STATE",Uz="SCRIPT_DATA_ESCAPE_START_STATE",Wz="SCRIPT_DATA_ESCAPE_START_DASH_STATE",Hs="SCRIPT_DATA_ESCAPED_STATE",jz="SCRIPT_DATA_ESCAPED_DASH_STATE",fx="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",E4="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",Vz="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",Kz="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",qz="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",Hl="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",Gz="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",$z="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",T4="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",Yz="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",Ra="BEFORE_ATTRIBUTE_NAME_STATE",k4="ATTRIBUTE_NAME_STATE",px="AFTER_ATTRIBUTE_NAME_STATE",mx="BEFORE_ATTRIBUTE_VALUE_STATE",I4="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",A4="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",L4="ATTRIBUTE_VALUE_UNQUOTED_STATE",gx="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",nd="SELF_CLOSING_START_TAG_STATE",I1="BOGUS_COMMENT_STATE",Xz="MARKUP_DECLARATION_OPEN_STATE",Qz="COMMENT_START_STATE",Jz="COMMENT_START_DASH_STATE",rd="COMMENT_STATE",Zz="COMMENT_LESS_THAN_SIGN_STATE",eU="COMMENT_LESS_THAN_SIGN_BANG_STATE",tU="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",iU="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",M4="COMMENT_END_DASH_STATE",D4="COMMENT_END_STATE",nU="COMMENT_END_BANG_STATE",rU="DOCTYPE_STATE",N4="BEFORE_DOCTYPE_NAME_STATE",R4="DOCTYPE_NAME_STATE",oU="AFTER_DOCTYPE_NAME_STATE",sU="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",aU="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",vx="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",_x="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",bx="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",lU="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",cU="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",dU="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",A1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",L1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",yx="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Bl="BOGUS_DOCTYPE_STATE",O4="CDATA_SECTION_STATE",uU="CDATA_SECTION_BRACKET_STATE",hU="CDATA_SECTION_END_STATE",Mf="CHARACTER_REFERENCE_STATE",fU="NAMED_CHARACTER_REFERENCE_STATE",pU="AMBIGUOS_AMPERSAND_STATE",mU="NUMERIC_CHARACTER_REFERENCE_STATE",gU="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",vU="DECIMAL_CHARACTER_REFERENCE_START_STATE",_U="HEXADEMICAL_CHARACTER_REFERENCE_STATE",bU="DECIMAL_CHARACTER_REFERENCE_STATE",M1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function qi(i){return i===V.SPACE||i===V.LINE_FEED||i===V.TABULATION||i===V.FORM_FEED}function N1(i){return i>=V.DIGIT_0&&i<=V.DIGIT_9}function Bs(i){return i>=V.LATIN_CAPITAL_A&&i<=V.LATIN_CAPITAL_Z}function vu(i){return i>=V.LATIN_SMALL_A&&i<=V.LATIN_SMALL_Z}function sd(i){return vu(i)||Bs(i)}function Cx(i){return sd(i)||N1(i)}function EU(i){return i>=V.LATIN_CAPITAL_A&&i<=V.LATIN_CAPITAL_F}function TU(i){return i>=V.LATIN_SMALL_A&&i<=V.LATIN_SMALL_F}function wle(i){return N1(i)||EU(i)||TU(i)}function P4(i){return i+32}function mn(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode(i>>>10&1023|55296)+String.fromCharCode(56320|i&1023))}function od(i){return String.fromCharCode(P4(i))}function yU(i,e){let t=_u[++i],n=++i,r=n+t-1;for(;n<=r;){let o=n+r>>>1,s=_u[o];if(se)r=o-1;else return _u[o+t]}return-1}var fo=class i{constructor(){this.preprocessor=new yle,this.tokenQueue=[],this.allowCDATA=!1,this.state=Yt,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:i.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,o=!0,s=e.length,a=0,l=t,c;for(;a0&&(l=this._consume(),r++),l===V.EOF){o=!1;break}if(c=e[a],l!==c&&(n||l!==P4(c))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==gu.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(ve.endTagWithAttributes),e.selfClosing&&this._err(ve.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=i.CHARACTER_TOKEN;qi(e)?t=i.WHITESPACE_CHARACTER_TOKEN:e===V.NULL&&(t=i.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,mn(e))}_emitSeveralCodePoints(e){for(let t=0;t-1;){let o=_u[r],s=o")):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.state=Hs,this._emitChars(Ti.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(ve.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hs,this._emitCodePoint(e))}[E4](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=Vz):sd(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(qz)):(this._emitChars("<"),this._reconsumeInState(Hs))}[Vz](e){sd(e)?(this._createEndTagToken(),this._reconsumeInState(Kz)):(this._emitChars("")):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.state=Hl,this._emitChars(Ti.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(ve.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hl,this._emitCodePoint(e))}[T4](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=Yz,this._emitChars("/")):this._reconsumeInState(Hl)}[Yz](e){qi(e)||e===V.SOLIDUS||e===V.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?Hs:Hl,this._emitCodePoint(e)):Bs(e)?(this.tempBuff.push(P4(e)),this._emitCodePoint(e)):vu(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(Hl)}[Ra](e){qi(e)||(e===V.SOLIDUS||e===V.GREATER_THAN_SIGN||e===V.EOF?this._reconsumeInState(px):e===V.EQUALS_SIGN?(this._err(ve.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=k4):(this._createAttr(""),this._reconsumeInState(k4)))}[k4](e){qi(e)||e===V.SOLIDUS||e===V.GREATER_THAN_SIGN||e===V.EOF?(this._leaveAttrName(px),this._unconsume()):e===V.EQUALS_SIGN?this._leaveAttrName(mx):Bs(e)?this.currentAttr.name+=od(e):e===V.QUOTATION_MARK||e===V.APOSTROPHE||e===V.LESS_THAN_SIGN?(this._err(ve.unexpectedCharacterInAttributeName),this.currentAttr.name+=mn(e)):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentAttr.name+=Ti.REPLACEMENT_CHARACTER):this.currentAttr.name+=mn(e)}[px](e){qi(e)||(e===V.SOLIDUS?this.state=nd:e===V.EQUALS_SIGN?this.state=mx:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(k4)))}[mx](e){qi(e)||(e===V.QUOTATION_MARK?this.state=I4:e===V.APOSTROPHE?this.state=A4:e===V.GREATER_THAN_SIGN?(this._err(ve.missingAttributeValue),this.state=Yt,this._emitCurrentToken()):this._reconsumeInState(L4))}[I4](e){e===V.QUOTATION_MARK?this.state=gx:e===V.AMPERSAND?(this.returnState=I4,this.state=Mf):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentAttr.value+=Ti.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(ve.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[A4](e){e===V.APOSTROPHE?this.state=gx:e===V.AMPERSAND?(this.returnState=A4,this.state=Mf):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentAttr.value+=Ti.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(ve.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[L4](e){qi(e)?this._leaveAttrValue(Ra):e===V.AMPERSAND?(this.returnState=L4,this.state=Mf):e===V.GREATER_THAN_SIGN?(this._leaveAttrValue(Yt),this._emitCurrentToken()):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentAttr.value+=Ti.REPLACEMENT_CHARACTER):e===V.QUOTATION_MARK||e===V.APOSTROPHE||e===V.LESS_THAN_SIGN||e===V.EQUALS_SIGN||e===V.GRAVE_ACCENT?(this._err(ve.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=mn(e)):e===V.EOF?(this._err(ve.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[gx](e){qi(e)?this._leaveAttrValue(Ra):e===V.SOLIDUS?this._leaveAttrValue(nd):e===V.GREATER_THAN_SIGN?(this._leaveAttrValue(Yt),this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInTag),this._emitEOFToken()):(this._err(ve.missingWhitespaceBetweenAttributes),this._reconsumeInState(Ra))}[nd](e){e===V.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInTag),this._emitEOFToken()):(this._err(ve.unexpectedSolidusInTag),this._reconsumeInState(Ra))}[I1](e){e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentToken.data+=Ti.REPLACEMENT_CHARACTER):this.currentToken.data+=mn(e)}[Xz](e){this._consumeSequenceIfMatch(gu.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=Qz):this._consumeSequenceIfMatch(gu.DOCTYPE_STRING,e,!1)?this.state=rU:this._consumeSequenceIfMatch(gu.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=O4:(this._err(ve.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=I1):this._ensureHibernation()||(this._err(ve.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(I1))}[Qz](e){e===V.HYPHEN_MINUS?this.state=Jz:e===V.GREATER_THAN_SIGN?(this._err(ve.abruptClosingOfEmptyComment),this.state=Yt,this._emitCurrentToken()):this._reconsumeInState(rd)}[Jz](e){e===V.HYPHEN_MINUS?this.state=D4:e===V.GREATER_THAN_SIGN?(this._err(ve.abruptClosingOfEmptyComment),this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(rd))}[rd](e){e===V.HYPHEN_MINUS?this.state=M4:e===V.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=Zz):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentToken.data+=Ti.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(ve.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=mn(e)}[Zz](e){e===V.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=eU):e===V.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(rd)}[eU](e){e===V.HYPHEN_MINUS?this.state=tU:this._reconsumeInState(rd)}[tU](e){e===V.HYPHEN_MINUS?this.state=iU:this._reconsumeInState(M4)}[iU](e){e!==V.GREATER_THAN_SIGN&&e!==V.EOF&&this._err(ve.nestedComment),this._reconsumeInState(D4)}[M4](e){e===V.HYPHEN_MINUS?this.state=D4:e===V.EOF?(this._err(ve.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(rd))}[D4](e){e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EXCLAMATION_MARK?this.state=nU:e===V.HYPHEN_MINUS?this.currentToken.data+="-":e===V.EOF?(this._err(ve.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(rd))}[nU](e){e===V.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=M4):e===V.GREATER_THAN_SIGN?(this._err(ve.incorrectlyClosedComment),this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(rd))}[rU](e){qi(e)?this.state=N4:e===V.GREATER_THAN_SIGN?this._reconsumeInState(N4):e===V.EOF?(this._err(ve.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(N4))}[N4](e){qi(e)||(Bs(e)?(this._createDoctypeToken(od(e)),this.state=R4):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this._createDoctypeToken(Ti.REPLACEMENT_CHARACTER),this.state=R4):e===V.GREATER_THAN_SIGN?(this._err(ve.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(ve.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(mn(e)),this.state=R4))}[R4](e){qi(e)?this.state=oU:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):Bs(e)?this.currentToken.name+=od(e):e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentToken.name+=Ti.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=mn(e)}[oU](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(gu.PUBLIC_STRING,e,!1)?this.state=sU:this._consumeSequenceIfMatch(gu.SYSTEM_STRING,e,!1)?this.state=cU:this._ensureHibernation()||(this._err(ve.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[sU](e){qi(e)?this.state=aU:e===V.QUOTATION_MARK?(this._err(ve.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=vx):e===V.APOSTROPHE?(this._err(ve.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=_x):e===V.GREATER_THAN_SIGN?(this._err(ve.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[aU](e){qi(e)||(e===V.QUOTATION_MARK?(this.currentToken.publicId="",this.state=vx):e===V.APOSTROPHE?(this.currentToken.publicId="",this.state=_x):e===V.GREATER_THAN_SIGN?(this._err(ve.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[vx](e){e===V.QUOTATION_MARK?this.state=bx:e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentToken.publicId+=Ti.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(ve.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mn(e)}[_x](e){e===V.APOSTROPHE?this.state=bx:e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentToken.publicId+=Ti.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(ve.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mn(e)}[bx](e){qi(e)?this.state=lU:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.QUOTATION_MARK?(this._err(ve.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=A1):e===V.APOSTROPHE?(this._err(ve.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=L1):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[lU](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.QUOTATION_MARK?(this.currentToken.systemId="",this.state=A1):e===V.APOSTROPHE?(this.currentToken.systemId="",this.state=L1):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[cU](e){qi(e)?this.state=dU:e===V.QUOTATION_MARK?(this._err(ve.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=A1):e===V.APOSTROPHE?(this._err(ve.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=L1):e===V.GREATER_THAN_SIGN?(this._err(ve.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[dU](e){qi(e)||(e===V.QUOTATION_MARK?(this.currentToken.systemId="",this.state=A1):e===V.APOSTROPHE?(this.currentToken.systemId="",this.state=L1):e===V.GREATER_THAN_SIGN?(this._err(ve.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[A1](e){e===V.QUOTATION_MARK?this.state=yx:e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentToken.systemId+=Ti.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(ve.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mn(e)}[L1](e){e===V.APOSTROPHE?this.state=yx:e===V.NULL?(this._err(ve.unexpectedNullCharacter),this.currentToken.systemId+=Ti.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(ve.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mn(e)}[yx](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(ve.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(ve.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(Bl)))}[Bl](e){e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.NULL?this._err(ve.unexpectedNullCharacter):e===V.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[O4](e){e===V.RIGHT_SQUARE_BRACKET?this.state=uU:e===V.EOF?(this._err(ve.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[uU](e){e===V.RIGHT_SQUARE_BRACKET?this.state=hU:(this._emitChars("]"),this._reconsumeInState(O4))}[hU](e){e===V.GREATER_THAN_SIGN?this.state=Yt:e===V.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(O4))}[Mf](e){this.tempBuff=[V.AMPERSAND],e===V.NUMBER_SIGN?(this.tempBuff.push(e),this.state=mU):Cx(e)?this._reconsumeInState(fU):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[fU](e){let t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[V.AMPERSAND];else if(t){let n=this.tempBuff[this.tempBuff.length-1]===V.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(ve.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=pU}[pU](e){Cx(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=mn(e):this._emitCodePoint(e):(e===V.SEMICOLON&&this._err(ve.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[mU](e){this.charRefCode=0,e===V.LATIN_SMALL_X||e===V.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=gU):this._reconsumeInState(vU)}[gU](e){wle(e)?this._reconsumeInState(_U):(this._err(ve.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[vU](e){N1(e)?this._reconsumeInState(bU):(this._err(ve.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[_U](e){EU(e)?this.charRefCode=this.charRefCode*16+e-55:TU(e)?this.charRefCode=this.charRefCode*16+e-87:N1(e)?this.charRefCode=this.charRefCode*16+e-48:e===V.SEMICOLON?this.state=M1:(this._err(ve.missingSemicolonAfterCharacterReference),this._reconsumeInState(M1))}[bU](e){N1(e)?this.charRefCode=this.charRefCode*10+e-48:e===V.SEMICOLON?this.state=M1:(this._err(ve.missingSemicolonAfterCharacterReference),this._reconsumeInState(M1))}[M1](){if(this.charRefCode===V.NULL)this._err(ve.nullCharacterReference),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(ve.characterReferenceOutsideUnicodeRange),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(Ti.isSurrogate(this.charRefCode))this._err(ve.surrogateCharacterReference),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(Ti.isUndefinedCodePoint(this.charRefCode))this._err(ve.noncharacterCharacterReference);else if(Ti.isControlCodePoint(this.charRefCode)||this.charRefCode===V.CARRIAGE_RETURN){this._err(ve.controlCharacterReference);let e=Cle[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};fo.CHARACTER_TOKEN="CHARACTER_TOKEN";fo.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";fo.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";fo.START_TAG_TOKEN="START_TAG_TOKEN";fo.END_TAG_TOKEN="END_TAG_TOKEN";fo.COMMENT_TOKEN="COMMENT_TOKEN";fo.DOCTYPE_TOKEN="DOCTYPE_TOKEN";fo.EOF_TOKEN="EOF_TOKEN";fo.HIBERNATION_TOKEN="HIBERNATION_TOKEN";fo.MODE={DATA:Yt,RCDATA:Df,RAWTEXT:D1,SCRIPT_DATA:zl,PLAINTEXT:xU};fo.getTokenAttr=function(i,e){for(let t=i.attrs.length-1;t>=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null};kU.exports=fo});var bu=gt(Nf=>{"use strict";var Sx=Nf.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};Nf.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};Nf.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var Le=Nf.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};Nf.SPECIAL_ELEMENTS={[Sx.HTML]:{[Le.ADDRESS]:!0,[Le.APPLET]:!0,[Le.AREA]:!0,[Le.ARTICLE]:!0,[Le.ASIDE]:!0,[Le.BASE]:!0,[Le.BASEFONT]:!0,[Le.BGSOUND]:!0,[Le.BLOCKQUOTE]:!0,[Le.BODY]:!0,[Le.BR]:!0,[Le.BUTTON]:!0,[Le.CAPTION]:!0,[Le.CENTER]:!0,[Le.COL]:!0,[Le.COLGROUP]:!0,[Le.DD]:!0,[Le.DETAILS]:!0,[Le.DIR]:!0,[Le.DIV]:!0,[Le.DL]:!0,[Le.DT]:!0,[Le.EMBED]:!0,[Le.FIELDSET]:!0,[Le.FIGCAPTION]:!0,[Le.FIGURE]:!0,[Le.FOOTER]:!0,[Le.FORM]:!0,[Le.FRAME]:!0,[Le.FRAMESET]:!0,[Le.H1]:!0,[Le.H2]:!0,[Le.H3]:!0,[Le.H4]:!0,[Le.H5]:!0,[Le.H6]:!0,[Le.HEAD]:!0,[Le.HEADER]:!0,[Le.HGROUP]:!0,[Le.HR]:!0,[Le.HTML]:!0,[Le.IFRAME]:!0,[Le.IMG]:!0,[Le.INPUT]:!0,[Le.LI]:!0,[Le.LINK]:!0,[Le.LISTING]:!0,[Le.MAIN]:!0,[Le.MARQUEE]:!0,[Le.MENU]:!0,[Le.META]:!0,[Le.NAV]:!0,[Le.NOEMBED]:!0,[Le.NOFRAMES]:!0,[Le.NOSCRIPT]:!0,[Le.OBJECT]:!0,[Le.OL]:!0,[Le.P]:!0,[Le.PARAM]:!0,[Le.PLAINTEXT]:!0,[Le.PRE]:!0,[Le.SCRIPT]:!0,[Le.SECTION]:!0,[Le.SELECT]:!0,[Le.SOURCE]:!0,[Le.STYLE]:!0,[Le.SUMMARY]:!0,[Le.TABLE]:!0,[Le.TBODY]:!0,[Le.TD]:!0,[Le.TEMPLATE]:!0,[Le.TEXTAREA]:!0,[Le.TFOOT]:!0,[Le.TH]:!0,[Le.THEAD]:!0,[Le.TITLE]:!0,[Le.TR]:!0,[Le.TRACK]:!0,[Le.UL]:!0,[Le.WBR]:!0,[Le.XMP]:!0},[Sx.MATHML]:{[Le.MI]:!0,[Le.MO]:!0,[Le.MN]:!0,[Le.MS]:!0,[Le.MTEXT]:!0,[Le.ANNOTATION_XML]:!0},[Sx.SVG]:{[Le.TITLE]:!0,[Le.FOREIGN_OBJECT]:!0,[Le.DESC]:!0}}});var MU=gt((T8e,LU)=>{"use strict";var AU=bu(),Pe=AU.TAG_NAMES,ki=AU.NAMESPACES;function IU(i){switch(i.length){case 1:return i===Pe.P;case 2:return i===Pe.RB||i===Pe.RP||i===Pe.RT||i===Pe.DD||i===Pe.DT||i===Pe.LI;case 3:return i===Pe.RTC;case 6:return i===Pe.OPTION;case 8:return i===Pe.OPTGROUP}return!1}function xle(i){switch(i.length){case 1:return i===Pe.P;case 2:return i===Pe.RB||i===Pe.RP||i===Pe.RT||i===Pe.DD||i===Pe.DT||i===Pe.LI||i===Pe.TD||i===Pe.TH||i===Pe.TR;case 3:return i===Pe.RTC;case 5:return i===Pe.TBODY||i===Pe.TFOOT||i===Pe.THEAD;case 6:return i===Pe.OPTION;case 7:return i===Pe.CAPTION;case 8:return i===Pe.OPTGROUP||i===Pe.COLGROUP}return!1}function F4(i,e){switch(i.length){case 2:if(i===Pe.TD||i===Pe.TH)return e===ki.HTML;if(i===Pe.MI||i===Pe.MO||i===Pe.MN||i===Pe.MS)return e===ki.MATHML;break;case 4:if(i===Pe.HTML)return e===ki.HTML;if(i===Pe.DESC)return e===ki.SVG;break;case 5:if(i===Pe.TABLE)return e===ki.HTML;if(i===Pe.MTEXT)return e===ki.MATHML;if(i===Pe.TITLE)return e===ki.SVG;break;case 6:return(i===Pe.APPLET||i===Pe.OBJECT)&&e===ki.HTML;case 7:return(i===Pe.CAPTION||i===Pe.MARQUEE)&&e===ki.HTML;case 8:return i===Pe.TEMPLATE&&e===ki.HTML;case 13:return i===Pe.FOREIGN_OBJECT&&e===ki.SVG;case 14:return i===Pe.ANNOTATION_XML&&e===ki.MATHML}return!1}var wx=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===Pe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ki.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){let n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){let t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===ki.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){let t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Pe.H1||e===Pe.H2||e===Pe.H3||e===Pe.H4||e===Pe.H5||e===Pe.H6&&t===ki.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Pe.TD||e===Pe.TH&&t===ki.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==Pe.TABLE&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==ki.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==Pe.TBODY&&this.currentTagName!==Pe.TFOOT&&this.currentTagName!==Pe.THEAD&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==ki.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==Pe.TR&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==ki.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){let e=this.items[1];return e&&this.treeAdapter.getTagName(e)===Pe.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===Pe.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===ki.HTML)return!0;if(F4(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===Pe.H1||t===Pe.H2||t===Pe.H3||t===Pe.H4||t===Pe.H5||t===Pe.H6)&&n===ki.HTML)return!0;if(F4(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===ki.HTML)return!0;if((n===Pe.UL||n===Pe.OL)&&r===ki.HTML||F4(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===ki.HTML)return!0;if(n===Pe.BUTTON&&r===ki.HTML||F4(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===ki.HTML){if(n===e)return!0;if(n===Pe.TABLE||n===Pe.TEMPLATE||n===Pe.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===ki.HTML){if(t===Pe.TBODY||t===Pe.THEAD||t===Pe.TFOOT)return!0;if(t===Pe.TABLE||t===Pe.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===ki.HTML){if(n===e)return!0;if(n!==Pe.OPTION&&n!==Pe.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;IU(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;xle(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;IU(this.currentTagName)&&this.currentTagName!==e;)this.pop()}};LU.exports=wx});var NU=gt((k8e,DU)=>{"use strict";var O1=class i{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){let t=[];if(this.length>=3){let n=this.treeAdapter.getAttrList(e).length,r=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let s=this.length-1;s>=0;s--){let a=this.entries[s];if(a.type===i.MARKER_ENTRY)break;let l=a.element,c=this.treeAdapter.getAttrList(l);this.treeAdapter.getTagName(l)===r&&this.treeAdapter.getNamespaceURI(l)===o&&c.length===n&&t.push({idx:s,attrs:c})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){let t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){let r=this.treeAdapter.getAttrList(e),o=r.length,s=Object.create(null);for(let a=0;a=3-1;a--)this.entries.splice(t[a].idx,1),this.length--}}insertMarker(){this.entries.push({type:i.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){let e=this.entries.pop();if(this.length--,e.type===i.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.ELEMENT_ENTRY&&n.element===e)return n}return null}};O1.MARKER_ENTRY="MARKER_ENTRY";O1.ELEMENT_ENTRY="ELEMENT_ENTRY";DU.exports=O1});var Oa=gt((I8e,RU)=>{"use strict";var H4=class{constructor(e){let t={},n=this._getOverriddenMethods(this,t);for(let r of Object.keys(n))typeof n[r]=="function"&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}};H4.install=function(i,e,t){i.__mixins||(i.__mixins=[]);for(let r=0;r{"use strict";var Ele=Oa(),xx=class extends Ele{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){let n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),(r===` +import{b as xoe}from"./chunk-GNZE3QMP.js";import{a as ON,b as a_,c as PN,d as GS,e as FN,f as qh,g as $S,h as Zo,i as fn,j as Dc,k as wm,l as xm,m as so,n as YS,o as HN,p as BN,q as Xd,r as zN,s as UN}from"./chunk-AC3NSOOG.js";import{$ as Un,$a as Se,$b as TR,$c as T_,$d as XR,$e as dO,$f as FO,$g as Tw,$h as Pre,$i as jre,$j as jw,$k as Tb,A as KN,Aa as aR,Ab as Ui,Ac as je,Ad as A_,Ae as Ri,Af as yO,Ag as VO,Ah as lu,Ai as Nw,Aj as Kre,Ak as wb,Al as Coe,B as Rc,Ba as lR,Bb as Qh,Bc as Mn,Bd as jR,Be as gi,Bf as z_,Bg as Km,Bh as Jm,Bi as e1,Bj as PP,Bk as Yw,Bl as Soe,C as h_,Ca as wn,Cb as rw,Cc as IR,Cd as Zh,Ce as Vt,Cf as U_,Cg as KO,Ch as Mre,Ci as rb,Cj as zw,Ck as Xw,Cl as woe,D as Tm,Da as la,Db as vR,Dc as rre,Dd as gw,De as Vc,Df as W_,Dg as qO,Dh as pf,Di as Kt,Dj as FP,Dk as Qw,Dl as du,E as qN,Ea as cR,Eb as ow,Ec as uw,Ed as Tt,Ee as Ro,Ef as CO,Eg as wre,Eh as Ei,Ei as xa,Ej as HP,Ek as eF,El as ka,F as f_,Fa as dR,Fb as sw,Fc as ore,Fd as Kn,Fe as of,Ff as SO,Fg as q_,Fh as Oo,Fi as SP,Fj as qre,Fk as tF,Fl as Rs,G as GN,Ga as iw,Gb as Fc,Gc as AR,Gd as L_,Ge as wl,Gf as wO,Gg as xre,Gh as sP,Gi as Bre,Gj as _f,Gk as iF,Gl as Os,H as nr,Ha as on,Hb as _R,Hc as sre,Hd as ure,He as P_,Hf as xO,Hg as qm,Hh as wa,Hi as kl,Hj as Uw,Hk as noe,I as Ln,Ia as Jd,Ib as bR,Ic as _l,Id as Wc,Ie as as,If as Hm,Ig as ya,Ih as El,Ii as Rw,Ij as fb,Ik as nF,J as ml,Ja as Ts,Jb as yR,Jc as LR,Jd as hre,Je as ti,Jf as EO,Jg as GO,Jh as Gc,Ji as wP,Jj as BP,Jk as roe,K as li,Ka as me,Kb as CR,Kc as w_,Kd as vw,Ke as sO,Kf as Bm,Kg as Ls,Kh as Bt,Ki as xP,Kj as t1,Kk as xb,L as $e,La as Zd,Lb as b_,Lc as x_,Ld as nu,Le as F_,Lf as _a,Lg as Gm,Lh as Gn,Li as Ow,Lj as zP,Lk as rF,M as QS,Ma as fe,Mb as SR,Mc as E_,Md as M_,Me as aO,Mf as xl,Mg as $O,Mh as aP,Mi as EP,Mj as pb,Mk as r1,N as $N,Na as uR,Nb as y_,Nc as are,Nd as VR,Ne as Rr,Nf as TO,Ng as YO,Nh as J_,Ni as ob,Nj as mb,Nk as oF,O as qt,Oa as gr,Ob as aw,Oc as tu,Od as D_,Oe as lO,Of as su,Og as uf,Oh as lP,Oi as sb,Oj as UP,Ok as Yc,P as YN,Pa as Wn,Pb as wi,Pc as hw,Pd as fre,Pe as Dt,Pf as kO,Pg as XO,Ph as Z_,Pi as TP,Pj as Ww,Pk as Eb,Q as XN,Qa as hR,Qb as ce,Qc as Uc,Qd as O,Qe as cO,Qf as yw,Qg as Ew,Qh as Dre,Qi as kP,Qj as Gre,Qk as Jw,R as QN,Ra as $h,Rb as nt,Rc as lre,Rd as jt,Re as sf,Rf as IO,Rg as hf,Rh as cP,Ri as IP,Rj as gb,Rk as ooe,S as JS,Sa as Ht,Sb as Ke,Sc as Jh,Sd as ef,Se as bw,Sf as AO,Sg as br,Sh as Nre,Si as AP,Sj as vb,Sk as sF,T as p_,Ta as Ni,Tb as ft,Tc as Dm,Td as N_,Te as $r,Tf as LO,Tg as QO,Th as dP,Ti as zre,Tj as WP,Tk as soe,U as m_,Ua as fR,Ub as wR,Uc as MR,Ud as KR,Ue as pa,Uf as MO,Ug as JO,Uh as uP,Ui as Pw,Uj as _b,Uk as bf,V as ZS,Va as Mo,Vb as xR,Vc as Nm,Vd as fa,Ve as ou,Vf as DO,Vg as ZO,Vh as hP,Vi as Il,Vj as jP,Vk as Zw,W as km,Wa as He,Wb as ER,Wc as DR,Wd as tf,We as Kc,Wf as NO,Wg as Ere,Wh as fP,Wi as Fw,Wj as $re,Wk as Ki,X as JN,Xa as rr,Xb as Mr,Xc as Rm,Xd as qR,Xe as As,Xf as RO,Xg as eP,Xh as Rre,Xi as LP,Xj as Dl,Xk as aF,Y as Lt,Ya as Et,Yb as Hc,Yc as cre,Yd as GR,Ye as Pm,Yf as Cw,Yg as Tre,Yh as pP,Yi as Ure,Yj as bb,Yk as e3,Z as Oc,Za as Zt,Zb as No,Zc as ha,Zd as $R,Ze as dt,Zf as OO,Zg as tP,Zh as Ore,Zi as Wre,Zj as VP,Zk as lF,_ as ZN,_a as Lr,_b as lw,_c as iu,_d as YR,_e as ma,_f as PO,_g as kre,_h as Iw,_i as MP,_j as Yre,_k as t3,a as v,aa as Mi,ab as ri,ac as xe,ad as NR,ae as QR,af as gre,ag as HO,ah as ff,ai as Aw,aj as Ti,ak as Xre,al as cF,b as De,ba as di,bb as Si,bc as Is,bd as fw,be as ru,bf as uO,bg as BO,bh as ct,bi as Fre,bj as ab,bk as yb,bl as Xc,c as at,ca as gl,cb as is,cc as rs,cd as vr,ce as yl,cf as af,cg as zO,ch as qn,ci as Ds,cj as Al,ck as i1,cl as kb,d as Ut,da as ew,db as xn,dc as Mm,dd as pw,de as R_,df as vre,dg as UO,dh as G_,di as Zm,dj as DP,dk as Vw,dl as dF,e as es,ea as ire,eb as ca,ec as da,ed as RR,ee as O_,ef as hO,eg as WO,eh as Ire,ei as mP,ej as lr,ek as Cb,el as Ta,f as l_,fa as g_,fb as ns,fc as os,fd as Wi,fe as JR,ff as _re,fg as ba,fh as kw,fi as mf,fj as Ll,fk as KP,fl as o1,g as Ao,ga as eR,gb as ks,gc as mi,gd as OR,ge as Cl,gf as lf,gg as zm,gh as iP,gi as eb,gj as Yr,gk as qP,gl as aoe,h as Qd,ha as tR,hb as Am,hc as Yi,hd as PR,he as ZR,hf as bre,hg as Um,hh as Are,hi as tb,hj as lb,hk as Qre,hl as uF,i as At,ia as nre,ib as Yh,ic as Dr,id as k_,ie as pre,if as fO,ig as Wm,ih as Ms,ii as gP,ij as cu,ik as Kw,il as loe,j as c_,ja as iR,jb as Pc,jc as Bc,jd as FR,je as eO,jf as yre,jg as jm,jh as $m,ji as Lw,jj as Ea,jk as qw,jl as coe,k as WN,ka as Gh,kb as lt,kc as zc,kd as HR,ke as mre,kf as pO,kg as jO,kh as nP,ki as Hre,kj as cb,kk as Gw,kl as hF,l as ao,la as v_,lb as or,lc as C_,ld as BR,le as tO,lf as Cre,lg as j_,lh as $_,li as Po,lj as db,lk as Jre,ll as doe,m as Em,ma as nR,mb as mt,mc as S_,md as zR,me as _w,mf as mO,mg as cf,mh as Ca,mi as gf,mj as NP,mk as GP,ml as fF,n as d_,na as ht,nb as qr,nc as xi,nd as oi,ne as nf,nf as Sre,ng as Sw,nh as Y_,ni as vP,nj as Qi,nk as $P,nl as pF,o as Vi,oa as Sn,ob as ui,oc as se,od as UR,oe as iO,of as ga,og as Vm,oh as Ym,oi as ib,oj as ds,ok as YP,ol as mF,p as XS,pa as Lo,pb as St,pc as cw,pd as dre,pe as Nr,pf as Oe,pg as Or,ph as Xm,pi as _P,pj as an,pk as Zre,pl as gF,q as Ft,qa as Im,qb as zi,qc as ua,qd as I_,qe as nO,qf as ke,qg as V_,qh as rP,qi as $c,qj as Ns,qk as Sb,ql as uoe,r as ne,ra as mr,rb as Xh,rc as Gr,rd as WR,re as rf,rf as gO,rg as _r,rh as Lre,ri as cs,rj as vf,rk as XP,rl as hoe,s as oe,sa as rR,sb as nw,sc as Me,sd as Mt,se as rO,sf as Fm,sg as au,sh as qc,si as Tl,sj as Vre,sk as QP,sl as foe,t as Bi,ta as Rt,tb as pR,tc as X,td as jn,te as oO,tf as vO,tg as ww,th as X_,ti as Mw,tj as Ml,tk as JP,tl as poe,u as jN,ua as ts,ub as Do,uc as dw,ud as Xi,ue as Om,uf as ls,ug as xw,uh as Qm,ui as Dw,uj as ub,uk as eoe,ul as moe,v as Ce,va as oR,vb as vl,vc as kR,vd as ss,ve as lo,vf as va,vg as pn,vh as be,vi as bP,vj as Hw,vk as $w,vl as goe,w as u_,wa as tw,wb as mR,wc as Ae,wd as sr,we as sn,wf as H_,wg as vi,wh as xt,wi as yP,wj as RP,wk as ZP,wl as voe,x as VN,xa as sR,xb as gR,xc as Ze,xd as bl,xe as jc,xf as B_,xg as df,xh as Q_,xi as CP,xj as hb,xk as toe,xl as _oe,y as Nc,ya as __,yb as eu,yc as P,yd as Vn,ye as Sl,yf as _O,yg as ar,yh as Sa,yi as nb,yj as Bw,yk as n1,yl as boe,z as zn,za as Di,zb as Lm,zc as qe,zd as mw,ze as et,zf as bO,zg as K_,zh as oP,zi as Dn,zj as OP,zk as ioe,zl as yoe}from"./chunk-XDVUM6M6.js";import{a as Re,b as Pt,c as Yd,d as aa,e as M,f as gt,g as RN,h as Hi,i as Kh,j as Cn}from"./chunk-3X664NSF.js";var x3=gt((r9e,hH)=>{hH.exports=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}});var CH=gt((o9e,yH)=>{"use strict";var Xb=Object.prototype.hasOwnProperty,bH=Object.prototype.toString,fH=Object.defineProperty,pH=Object.getOwnPropertyDescriptor,mH=function(e){return typeof Array.isArray=="function"?Array.isArray(e):bH.call(e)==="[object Array]"},gH=function(e){if(!e||bH.call(e)!=="[object Object]")return!1;var t=Xb.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Xb.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||Xb.call(e,r)},vH=function(e,t){fH&&t.name==="__proto__"?fH(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},_H=function(e,t){if(t==="__proto__")if(Xb.call(e,t)){if(pH)return pH(e,t).value}else return;return e[t]};yH.exports=function i(){var e,t,n,r,o,s,a=arguments[0],l=1,c=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l{"use strict";var BB={};function ule(i){var e,t,n=BB[i];if(n)return n;for(n=BB[i]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e=55296&&o<=57343){if(o>=55296&&o<=56319&&n+1=56320&&s<=57343)){l+=encodeURIComponent(i[n]+i[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(i[n])}return l}l5.defaultChars=";/?:@&=+$,-_.!~*'()#";l5.componentChars="-_.!~*'()";zB.exports=l5});var h5=gt(Fl=>{"use strict";var _le=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];Fl.REPLACEMENT_CHARACTER="\uFFFD";Fl.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};Fl.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};Fl.isSurrogate=function(i){return i>=55296&&i<=57343};Fl.isSurrogatePair=function(i){return i>=56320&&i<=57343};Fl.getSurrogatePairCodePoint=function(i,e){return(i-55296)*1024+9216+e};Fl.isControlCodePoint=function(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159};Fl.isUndefinedCodePoint=function(i){return i>=64976&&i<=65007||_le.indexOf(i)>-1}});var f5=gt((_8e,oz)=>{"use strict";oz.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}});var az=gt((b8e,sz)=>{"use strict";var If=h5(),ox=f5(),mu=If.CODE_POINTS,ble=65536,sx=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ble}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){let t=this.html.charCodeAt(this.pos+1);if(If.isSurrogatePair(t))return this.pos++,this._addGap(),If.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,mu.EOF;return this._err(ox.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,mu.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===mu.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===mu.CARRIAGE_RETURN?(this.skipNextNewLine=!0,mu.LINE_FEED):(this.skipNextNewLine=!1,If.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===mu.LINE_FEED||e===mu.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){If.isControlCodePoint(e)?this._err(ox.controlCharacterInInputStream):If.isUndefinedCodePoint(e)&&this._err(ox.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}};sz.exports=sx});var cz=gt((y8e,lz)=>{"use strict";lz.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])});var N1=gt((C8e,aU)=>{"use strict";var yle=az(),ki=h5(),_u=cz(),_e=f5(),V=ki.CODE_POINTS,gu=ki.CODE_POINT_SEQUENCES,Cle={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},tU=1,iU=2,nU=4,Sle=tU|iU|nU,Yt="DATA_STATE",Lf="RCDATA_STATE",M1="RAWTEXT_STATE",zl="SCRIPT_DATA_STATE",rU="PLAINTEXT_STATE",dz="TAG_OPEN_STATE",uz="END_TAG_OPEN_STATE",ax="TAG_NAME_STATE",hz="RCDATA_LESS_THAN_SIGN_STATE",fz="RCDATA_END_TAG_OPEN_STATE",pz="RCDATA_END_TAG_NAME_STATE",mz="RAWTEXT_LESS_THAN_SIGN_STATE",gz="RAWTEXT_END_TAG_OPEN_STATE",vz="RAWTEXT_END_TAG_NAME_STATE",_z="SCRIPT_DATA_LESS_THAN_SIGN_STATE",bz="SCRIPT_DATA_END_TAG_OPEN_STATE",yz="SCRIPT_DATA_END_TAG_NAME_STATE",Cz="SCRIPT_DATA_ESCAPE_START_STATE",Sz="SCRIPT_DATA_ESCAPE_START_DASH_STATE",Hs="SCRIPT_DATA_ESCAPED_STATE",wz="SCRIPT_DATA_ESCAPED_DASH_STATE",lx="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",p5="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",xz="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",Ez="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",Tz="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",Hl="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",kz="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",Iz="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",m5="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",Az="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",Na="BEFORE_ATTRIBUTE_NAME_STATE",g5="ATTRIBUTE_NAME_STATE",cx="AFTER_ATTRIBUTE_NAME_STATE",dx="BEFORE_ATTRIBUTE_VALUE_STATE",v5="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",_5="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",b5="ATTRIBUTE_VALUE_UNQUOTED_STATE",ux="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",id="SELF_CLOSING_START_TAG_STATE",k1="BOGUS_COMMENT_STATE",Lz="MARKUP_DECLARATION_OPEN_STATE",Mz="COMMENT_START_STATE",Dz="COMMENT_START_DASH_STATE",nd="COMMENT_STATE",Nz="COMMENT_LESS_THAN_SIGN_STATE",Rz="COMMENT_LESS_THAN_SIGN_BANG_STATE",Oz="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",Pz="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",y5="COMMENT_END_DASH_STATE",C5="COMMENT_END_STATE",Fz="COMMENT_END_BANG_STATE",Hz="DOCTYPE_STATE",S5="BEFORE_DOCTYPE_NAME_STATE",w5="DOCTYPE_NAME_STATE",Bz="AFTER_DOCTYPE_NAME_STATE",zz="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",Uz="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",hx="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",fx="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",px="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Wz="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",jz="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",Vz="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",I1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",A1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",mx="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Bl="BOGUS_DOCTYPE_STATE",x5="CDATA_SECTION_STATE",Kz="CDATA_SECTION_BRACKET_STATE",qz="CDATA_SECTION_END_STATE",Af="CHARACTER_REFERENCE_STATE",Gz="NAMED_CHARACTER_REFERENCE_STATE",$z="AMBIGUOS_AMPERSAND_STATE",Yz="NUMERIC_CHARACTER_REFERENCE_STATE",Xz="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Qz="DECIMAL_CHARACTER_REFERENCE_START_STATE",Jz="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Zz="DECIMAL_CHARACTER_REFERENCE_STATE",L1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function qi(i){return i===V.SPACE||i===V.LINE_FEED||i===V.TABULATION||i===V.FORM_FEED}function D1(i){return i>=V.DIGIT_0&&i<=V.DIGIT_9}function Bs(i){return i>=V.LATIN_CAPITAL_A&&i<=V.LATIN_CAPITAL_Z}function vu(i){return i>=V.LATIN_SMALL_A&&i<=V.LATIN_SMALL_Z}function od(i){return vu(i)||Bs(i)}function gx(i){return od(i)||D1(i)}function oU(i){return i>=V.LATIN_CAPITAL_A&&i<=V.LATIN_CAPITAL_F}function sU(i){return i>=V.LATIN_SMALL_A&&i<=V.LATIN_SMALL_F}function wle(i){return D1(i)||oU(i)||sU(i)}function E5(i){return i+32}function mn(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode(i>>>10&1023|55296)+String.fromCharCode(56320|i&1023))}function rd(i){return String.fromCharCode(E5(i))}function eU(i,e){let t=_u[++i],n=++i,r=n+t-1;for(;n<=r;){let o=n+r>>>1,s=_u[o];if(se)r=o-1;else return _u[o+t]}return-1}var po=class i{constructor(){this.preprocessor=new yle,this.tokenQueue=[],this.allowCDATA=!1,this.state=Yt,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:i.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,o=!0,s=e.length,a=0,l=t,c;for(;a0&&(l=this._consume(),r++),l===V.EOF){o=!1;break}if(c=e[a],l!==c&&(n||l!==E5(c))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==gu.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(_e.endTagWithAttributes),e.selfClosing&&this._err(_e.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=i.CHARACTER_TOKEN;qi(e)?t=i.WHITESPACE_CHARACTER_TOKEN:e===V.NULL&&(t=i.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,mn(e))}_emitSeveralCodePoints(e){for(let t=0;t-1;){let o=_u[r],s=o")):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.state=Hs,this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hs,this._emitCodePoint(e))}[p5](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=xz):od(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(Tz)):(this._emitChars("<"),this._reconsumeInState(Hs))}[xz](e){od(e)?(this._createEndTagToken(),this._reconsumeInState(Ez)):(this._emitChars("")):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.state=Hl,this._emitChars(ki.REPLACEMENT_CHARACTER)):e===V.EOF?(this._err(_e.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=Hl,this._emitCodePoint(e))}[m5](e){e===V.SOLIDUS?(this.tempBuff=[],this.state=Az,this._emitChars("/")):this._reconsumeInState(Hl)}[Az](e){qi(e)||e===V.SOLIDUS||e===V.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?Hs:Hl,this._emitCodePoint(e)):Bs(e)?(this.tempBuff.push(E5(e)),this._emitCodePoint(e)):vu(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(Hl)}[Na](e){qi(e)||(e===V.SOLIDUS||e===V.GREATER_THAN_SIGN||e===V.EOF?this._reconsumeInState(cx):e===V.EQUALS_SIGN?(this._err(_e.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=g5):(this._createAttr(""),this._reconsumeInState(g5)))}[g5](e){qi(e)||e===V.SOLIDUS||e===V.GREATER_THAN_SIGN||e===V.EOF?(this._leaveAttrName(cx),this._unconsume()):e===V.EQUALS_SIGN?this._leaveAttrName(dx):Bs(e)?this.currentAttr.name+=rd(e):e===V.QUOTATION_MARK||e===V.APOSTROPHE||e===V.LESS_THAN_SIGN?(this._err(_e.unexpectedCharacterInAttributeName),this.currentAttr.name+=mn(e)):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.name+=ki.REPLACEMENT_CHARACTER):this.currentAttr.name+=mn(e)}[cx](e){qi(e)||(e===V.SOLIDUS?this.state=id:e===V.EQUALS_SIGN?this.state=dx:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(g5)))}[dx](e){qi(e)||(e===V.QUOTATION_MARK?this.state=v5:e===V.APOSTROPHE?this.state=_5:e===V.GREATER_THAN_SIGN?(this._err(_e.missingAttributeValue),this.state=Yt,this._emitCurrentToken()):this._reconsumeInState(b5))}[v5](e){e===V.QUOTATION_MARK?this.state=ux:e===V.AMPERSAND?(this.returnState=v5,this.state=Af):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[_5](e){e===V.APOSTROPHE?this.state=ux:e===V.AMPERSAND?(this.returnState=_5,this.state=Af):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[b5](e){qi(e)?this._leaveAttrValue(Na):e===V.AMPERSAND?(this.returnState=b5,this.state=Af):e===V.GREATER_THAN_SIGN?(this._leaveAttrValue(Yt),this._emitCurrentToken()):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentAttr.value+=ki.REPLACEMENT_CHARACTER):e===V.QUOTATION_MARK||e===V.APOSTROPHE||e===V.LESS_THAN_SIGN||e===V.EQUALS_SIGN||e===V.GRAVE_ACCENT?(this._err(_e.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=mn(e)):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):this.currentAttr.value+=mn(e)}[ux](e){qi(e)?this._leaveAttrValue(Na):e===V.SOLIDUS?this._leaveAttrValue(id):e===V.GREATER_THAN_SIGN?(this._leaveAttrValue(Yt),this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):(this._err(_e.missingWhitespaceBetweenAttributes),this._reconsumeInState(Na))}[id](e){e===V.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInTag),this._emitEOFToken()):(this._err(_e.unexpectedSolidusInTag),this._reconsumeInState(Na))}[k1](e){e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.data+=ki.REPLACEMENT_CHARACTER):this.currentToken.data+=mn(e)}[Lz](e){this._consumeSequenceIfMatch(gu.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=Mz):this._consumeSequenceIfMatch(gu.DOCTYPE_STRING,e,!1)?this.state=Hz:this._consumeSequenceIfMatch(gu.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=x5:(this._err(_e.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=k1):this._ensureHibernation()||(this._err(_e.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(k1))}[Mz](e){e===V.HYPHEN_MINUS?this.state=Dz:e===V.GREATER_THAN_SIGN?(this._err(_e.abruptClosingOfEmptyComment),this.state=Yt,this._emitCurrentToken()):this._reconsumeInState(nd)}[Dz](e){e===V.HYPHEN_MINUS?this.state=C5:e===V.GREATER_THAN_SIGN?(this._err(_e.abruptClosingOfEmptyComment),this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(nd))}[nd](e){e===V.HYPHEN_MINUS?this.state=y5:e===V.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=Nz):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.data+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=mn(e)}[Nz](e){e===V.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=Rz):e===V.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(nd)}[Rz](e){e===V.HYPHEN_MINUS?this.state=Oz:this._reconsumeInState(nd)}[Oz](e){e===V.HYPHEN_MINUS?this.state=Pz:this._reconsumeInState(y5)}[Pz](e){e!==V.GREATER_THAN_SIGN&&e!==V.EOF&&this._err(_e.nestedComment),this._reconsumeInState(C5)}[y5](e){e===V.HYPHEN_MINUS?this.state=C5:e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(nd))}[C5](e){e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EXCLAMATION_MARK?this.state=Fz:e===V.HYPHEN_MINUS?this.currentToken.data+="-":e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(nd))}[Fz](e){e===V.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=y5):e===V.GREATER_THAN_SIGN?(this._err(_e.incorrectlyClosedComment),this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(nd))}[Hz](e){qi(e)?this.state=S5:e===V.GREATER_THAN_SIGN?this._reconsumeInState(S5):e===V.EOF?(this._err(_e.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(S5))}[S5](e){qi(e)||(Bs(e)?(this._createDoctypeToken(rd(e)),this.state=w5):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this._createDoctypeToken(ki.REPLACEMENT_CHARACTER),this.state=w5):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(mn(e)),this.state=w5))}[w5](e){qi(e)?this.state=Bz:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):Bs(e)?this.currentToken.name+=rd(e):e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.name+=ki.REPLACEMENT_CHARACTER):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=mn(e)}[Bz](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(gu.PUBLIC_STRING,e,!1)?this.state=zz:this._consumeSequenceIfMatch(gu.SYSTEM_STRING,e,!1)?this.state=jz:this._ensureHibernation()||(this._err(_e.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[zz](e){qi(e)?this.state=Uz:e===V.QUOTATION_MARK?(this._err(_e.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=hx):e===V.APOSTROPHE?(this._err(_e.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=fx):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[Uz](e){qi(e)||(e===V.QUOTATION_MARK?(this.currentToken.publicId="",this.state=hx):e===V.APOSTROPHE?(this.currentToken.publicId="",this.state=fx):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[hx](e){e===V.QUOTATION_MARK?this.state=px:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.publicId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mn(e)}[fx](e){e===V.APOSTROPHE?this.state=px:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.publicId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mn(e)}[px](e){qi(e)?this.state=Wz:e===V.GREATER_THAN_SIGN?(this.state=Yt,this._emitCurrentToken()):e===V.QUOTATION_MARK?(this._err(_e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this._err(_e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=A1):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[Wz](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.QUOTATION_MARK?(this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this.currentToken.systemId="",this.state=A1):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[jz](e){qi(e)?this.state=Vz:e===V.QUOTATION_MARK?(this._err(_e.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this._err(_e.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=A1):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl))}[Vz](e){qi(e)||(e===V.QUOTATION_MARK?(this.currentToken.systemId="",this.state=I1):e===V.APOSTROPHE?(this.currentToken.systemId="",this.state=A1):e===V.GREATER_THAN_SIGN?(this._err(_e.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=Yt,this._emitCurrentToken()):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Bl)))}[I1](e){e===V.QUOTATION_MARK?this.state=mx:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.systemId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mn(e)}[A1](e){e===V.APOSTROPHE?this.state=mx:e===V.NULL?(this._err(_e.unexpectedNullCharacter),this.currentToken.systemId+=ki.REPLACEMENT_CHARACTER):e===V.GREATER_THAN_SIGN?(this._err(_e.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mn(e)}[mx](e){qi(e)||(e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.EOF?(this._err(_e.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(_e.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(Bl)))}[Bl](e){e===V.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=Yt):e===V.NULL?this._err(_e.unexpectedNullCharacter):e===V.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[x5](e){e===V.RIGHT_SQUARE_BRACKET?this.state=Kz:e===V.EOF?(this._err(_e.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[Kz](e){e===V.RIGHT_SQUARE_BRACKET?this.state=qz:(this._emitChars("]"),this._reconsumeInState(x5))}[qz](e){e===V.GREATER_THAN_SIGN?this.state=Yt:e===V.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(x5))}[Af](e){this.tempBuff=[V.AMPERSAND],e===V.NUMBER_SIGN?(this.tempBuff.push(e),this.state=Yz):gx(e)?this._reconsumeInState(Gz):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Gz](e){let t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[V.AMPERSAND];else if(t){let n=this.tempBuff[this.tempBuff.length-1]===V.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(_e.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=$z}[$z](e){gx(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=mn(e):this._emitCodePoint(e):(e===V.SEMICOLON&&this._err(_e.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[Yz](e){this.charRefCode=0,e===V.LATIN_SMALL_X||e===V.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Xz):this._reconsumeInState(Qz)}[Xz](e){wle(e)?this._reconsumeInState(Jz):(this._err(_e.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Qz](e){D1(e)?this._reconsumeInState(Zz):(this._err(_e.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Jz](e){oU(e)?this.charRefCode=this.charRefCode*16+e-55:sU(e)?this.charRefCode=this.charRefCode*16+e-87:D1(e)?this.charRefCode=this.charRefCode*16+e-48:e===V.SEMICOLON?this.state=L1:(this._err(_e.missingSemicolonAfterCharacterReference),this._reconsumeInState(L1))}[Zz](e){D1(e)?this.charRefCode=this.charRefCode*10+e-48:e===V.SEMICOLON?this.state=L1:(this._err(_e.missingSemicolonAfterCharacterReference),this._reconsumeInState(L1))}[L1](){if(this.charRefCode===V.NULL)this._err(_e.nullCharacterReference),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(_e.characterReferenceOutsideUnicodeRange),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(ki.isSurrogate(this.charRefCode))this._err(_e.surrogateCharacterReference),this.charRefCode=V.REPLACEMENT_CHARACTER;else if(ki.isUndefinedCodePoint(this.charRefCode))this._err(_e.noncharacterCharacterReference);else if(ki.isControlCodePoint(this.charRefCode)||this.charRefCode===V.CARRIAGE_RETURN){this._err(_e.controlCharacterReference);let e=Cle[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};po.CHARACTER_TOKEN="CHARACTER_TOKEN";po.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";po.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";po.START_TAG_TOKEN="START_TAG_TOKEN";po.END_TAG_TOKEN="END_TAG_TOKEN";po.COMMENT_TOKEN="COMMENT_TOKEN";po.DOCTYPE_TOKEN="DOCTYPE_TOKEN";po.EOF_TOKEN="EOF_TOKEN";po.HIBERNATION_TOKEN="HIBERNATION_TOKEN";po.MODE={DATA:Yt,RCDATA:Lf,RAWTEXT:M1,SCRIPT_DATA:zl,PLAINTEXT:rU};po.getTokenAttr=function(i,e){for(let t=i.attrs.length-1;t>=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null};aU.exports=po});var bu=gt(Mf=>{"use strict";var vx=Mf.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};Mf.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};Mf.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var Le=Mf.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};Mf.SPECIAL_ELEMENTS={[vx.HTML]:{[Le.ADDRESS]:!0,[Le.APPLET]:!0,[Le.AREA]:!0,[Le.ARTICLE]:!0,[Le.ASIDE]:!0,[Le.BASE]:!0,[Le.BASEFONT]:!0,[Le.BGSOUND]:!0,[Le.BLOCKQUOTE]:!0,[Le.BODY]:!0,[Le.BR]:!0,[Le.BUTTON]:!0,[Le.CAPTION]:!0,[Le.CENTER]:!0,[Le.COL]:!0,[Le.COLGROUP]:!0,[Le.DD]:!0,[Le.DETAILS]:!0,[Le.DIR]:!0,[Le.DIV]:!0,[Le.DL]:!0,[Le.DT]:!0,[Le.EMBED]:!0,[Le.FIELDSET]:!0,[Le.FIGCAPTION]:!0,[Le.FIGURE]:!0,[Le.FOOTER]:!0,[Le.FORM]:!0,[Le.FRAME]:!0,[Le.FRAMESET]:!0,[Le.H1]:!0,[Le.H2]:!0,[Le.H3]:!0,[Le.H4]:!0,[Le.H5]:!0,[Le.H6]:!0,[Le.HEAD]:!0,[Le.HEADER]:!0,[Le.HGROUP]:!0,[Le.HR]:!0,[Le.HTML]:!0,[Le.IFRAME]:!0,[Le.IMG]:!0,[Le.INPUT]:!0,[Le.LI]:!0,[Le.LINK]:!0,[Le.LISTING]:!0,[Le.MAIN]:!0,[Le.MARQUEE]:!0,[Le.MENU]:!0,[Le.META]:!0,[Le.NAV]:!0,[Le.NOEMBED]:!0,[Le.NOFRAMES]:!0,[Le.NOSCRIPT]:!0,[Le.OBJECT]:!0,[Le.OL]:!0,[Le.P]:!0,[Le.PARAM]:!0,[Le.PLAINTEXT]:!0,[Le.PRE]:!0,[Le.SCRIPT]:!0,[Le.SECTION]:!0,[Le.SELECT]:!0,[Le.SOURCE]:!0,[Le.STYLE]:!0,[Le.SUMMARY]:!0,[Le.TABLE]:!0,[Le.TBODY]:!0,[Le.TD]:!0,[Le.TEMPLATE]:!0,[Le.TEXTAREA]:!0,[Le.TFOOT]:!0,[Le.TH]:!0,[Le.THEAD]:!0,[Le.TITLE]:!0,[Le.TR]:!0,[Le.TRACK]:!0,[Le.UL]:!0,[Le.WBR]:!0,[Le.XMP]:!0},[vx.MATHML]:{[Le.MI]:!0,[Le.MO]:!0,[Le.MN]:!0,[Le.MS]:!0,[Le.MTEXT]:!0,[Le.ANNOTATION_XML]:!0},[vx.SVG]:{[Le.TITLE]:!0,[Le.FOREIGN_OBJECT]:!0,[Le.DESC]:!0}}});var uU=gt((w8e,dU)=>{"use strict";var cU=bu(),Pe=cU.TAG_NAMES,Ii=cU.NAMESPACES;function lU(i){switch(i.length){case 1:return i===Pe.P;case 2:return i===Pe.RB||i===Pe.RP||i===Pe.RT||i===Pe.DD||i===Pe.DT||i===Pe.LI;case 3:return i===Pe.RTC;case 6:return i===Pe.OPTION;case 8:return i===Pe.OPTGROUP}return!1}function xle(i){switch(i.length){case 1:return i===Pe.P;case 2:return i===Pe.RB||i===Pe.RP||i===Pe.RT||i===Pe.DD||i===Pe.DT||i===Pe.LI||i===Pe.TD||i===Pe.TH||i===Pe.TR;case 3:return i===Pe.RTC;case 5:return i===Pe.TBODY||i===Pe.TFOOT||i===Pe.THEAD;case 6:return i===Pe.OPTION;case 7:return i===Pe.CAPTION;case 8:return i===Pe.OPTGROUP||i===Pe.COLGROUP}return!1}function T5(i,e){switch(i.length){case 2:if(i===Pe.TD||i===Pe.TH)return e===Ii.HTML;if(i===Pe.MI||i===Pe.MO||i===Pe.MN||i===Pe.MS)return e===Ii.MATHML;break;case 4:if(i===Pe.HTML)return e===Ii.HTML;if(i===Pe.DESC)return e===Ii.SVG;break;case 5:if(i===Pe.TABLE)return e===Ii.HTML;if(i===Pe.MTEXT)return e===Ii.MATHML;if(i===Pe.TITLE)return e===Ii.SVG;break;case 6:return(i===Pe.APPLET||i===Pe.OBJECT)&&e===Ii.HTML;case 7:return(i===Pe.CAPTION||i===Pe.MARQUEE)&&e===Ii.HTML;case 8:return i===Pe.TEMPLATE&&e===Ii.HTML;case 13:return i===Pe.FOREIGN_OBJECT&&e===Ii.SVG;case 14:return i===Pe.ANNOTATION_XML&&e===Ii.MATHML}return!1}var _x=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===Pe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ii.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){let n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){let t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===Ii.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){let t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Pe.H1||e===Pe.H2||e===Pe.H3||e===Pe.H4||e===Pe.H5||e===Pe.H6&&t===Ii.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Pe.TD||e===Pe.TH&&t===Ii.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==Pe.TABLE&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ii.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==Pe.TBODY&&this.currentTagName!==Pe.TFOOT&&this.currentTagName!==Pe.THEAD&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ii.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==Pe.TR&&this.currentTagName!==Pe.TEMPLATE&&this.currentTagName!==Pe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ii.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){let e=this.items[1];return e&&this.treeAdapter.getTagName(e)===Pe.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===Pe.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ii.HTML)return!0;if(T5(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===Pe.H1||t===Pe.H2||t===Pe.H3||t===Pe.H4||t===Pe.H5||t===Pe.H6)&&n===Ii.HTML)return!0;if(T5(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ii.HTML)return!0;if((n===Pe.UL||n===Pe.OL)&&r===Ii.HTML||T5(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ii.HTML)return!0;if(n===Pe.BUTTON&&r===Ii.HTML||T5(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ii.HTML){if(n===e)return!0;if(n===Pe.TABLE||n===Pe.TEMPLATE||n===Pe.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===Ii.HTML){if(t===Pe.TBODY||t===Pe.THEAD||t===Pe.TFOOT)return!0;if(t===Pe.TABLE||t===Pe.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ii.HTML){if(n===e)return!0;if(n!==Pe.OPTION&&n!==Pe.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;lU(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;xle(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;lU(this.currentTagName)&&this.currentTagName!==e;)this.pop()}};dU.exports=_x});var fU=gt((x8e,hU)=>{"use strict";var R1=class i{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){let t=[];if(this.length>=3){let n=this.treeAdapter.getAttrList(e).length,r=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let s=this.length-1;s>=0;s--){let a=this.entries[s];if(a.type===i.MARKER_ENTRY)break;let l=a.element,c=this.treeAdapter.getAttrList(l);this.treeAdapter.getTagName(l)===r&&this.treeAdapter.getNamespaceURI(l)===o&&c.length===n&&t.push({idx:s,attrs:c})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){let t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){let r=this.treeAdapter.getAttrList(e),o=r.length,s=Object.create(null);for(let a=0;a=3-1;a--)this.entries.splice(t[a].idx,1),this.length--}}insertMarker(){this.entries.push({type:i.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){let e=this.entries.pop();if(this.length--,e.type===i.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.ELEMENT_ENTRY&&n.element===e)return n}return null}};R1.MARKER_ENTRY="MARKER_ENTRY";R1.ELEMENT_ENTRY="ELEMENT_ENTRY";hU.exports=R1});var Ra=gt((E8e,pU)=>{"use strict";var k5=class{constructor(e){let t={},n=this._getOverriddenMethods(this,t);for(let r of Object.keys(n))typeof n[r]=="function"&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}};k5.install=function(i,e,t){i.__mixins||(i.__mixins=[]);for(let r=0;r{"use strict";var Ele=Ra(),bx=class extends Ele{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){let n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),(r===` `||r==="\r"&&this.html[n+1]!==` -`)&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){let n=this.pos;t.dropParsedChunk.call(this);let r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}};OU.exports=xx});var Ix=gt((L8e,FU)=>{"use strict";var PU=Oa(),Tx=R1(),Tle=Ex(),kx=class extends PU{constructor(e){super(e),this.tokenizer=e,this.posTracker=PU.install(e.preprocessor,Tle),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;let e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){let n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(r){t._createDoctypeToken.call(this,r),this.currentToken.location=e.ctLoc},_createCharacterToken(r,o){t._createCharacterToken.call(this,r,o),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(r){t._createAttr.call(this,r),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(r){t._leaveAttrName.call(this,r),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(r){t._leaveAttrValue.call(this,r),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){let r=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=r.startLine,this.currentCharacterToken.location.endCol=r.startCol,this.currentCharacterToken.location.endOffset=r.startOffset),this.currentToken.type===Tx.EOF_TOKEN?(r.endLine=r.startLine,r.endCol=r.startCol,r.endOffset=r.startOffset):(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col+1,r.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){let r=this.currentCharacterToken&&this.currentCharacterToken.location;r&&r.endOffset===-1&&(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col,r.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(Tx.MODE).forEach(r=>{let o=Tx.MODE[r];n[o]=function(s){e.ctLoc=e._getCurrentLocation(),t[o].call(this,s)}}),n}};FU.exports=kx});var BU=gt((M8e,HU)=>{"use strict";var kle=Oa(),Ax=class extends kle{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let n=this.stackTop;n>0;n--)e.onItemPop(this.items[n]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}};HU.exports=Ax});var WU=gt((D8e,UU)=>{"use strict";var Lx=Oa(),zU=R1(),Ile=Ix(),Ale=BU(),Lle=bu(),Mx=Lle.TAG_NAMES,Dx=class extends Lx{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,o=this.treeAdapter.getTagName(e),s=t.type===zU.END_TAG_TOKEN&&o===t.tagName,a={};s?(a.endTag=Object.assign({},r),a.endLine=r.endLine,a.endCol=r.endCol,a.endOffset=r.endOffset):(a.endLine=r.startLine,a.endCol=r.startCol,a.endOffset=r.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;let o=Lx.install(this.tokenizer,Ile);e.posTracker=o.posTracker,Lx.install(this.openElements,Ale,{onItemPop:function(s){e._setEndLocation(s,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let r=this.openElements.stackTop;r>=0;r--)e._setEndLocation(this.openElements.items[r],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===zU.END_TAG_TOKEN&&(n.tagName===Mx.HTML||n.tagName===Mx.BODY&&this.openElements.hasInScope(Mx.BODY)))for(let o=this.openElements.stackTop;o>=0;o--){let s=this.openElements.items[o];if(this.treeAdapter.getTagName(s)===n.tagName){e._setEndLocation(s,n);break}}},_setDocumentType(n){t._setDocumentType.call(this,n);let r=this.treeAdapter.getChildNodes(this.document),o=r.length;for(let s=0;s{"use strict";var Mle=Oa(),Nx=class extends Mle{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){let t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}};jU.exports=Nx});var KU=gt((R8e,VU)=>{"use strict";var Dle=B4(),Nle=Ex(),Rle=Oa(),Rx=class extends Dle{constructor(e,t){super(e,t),this.posTracker=Rle.install(e,Nle),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}};VU.exports=Rx});var GU=gt((O8e,qU)=>{"use strict";var Ole=B4(),Ple=KU(),Fle=Oa(),Ox=class extends Ole{constructor(e,t){super(e,t);let n=Fle.install(e.preprocessor,Ple,t);this.posTracker=n.posTracker}};qU.exports=Ox});var XU=gt((P8e,YU)=>{"use strict";var Hle=B4(),Ble=GU(),zle=Ix(),$U=Oa(),Px=class extends Hle{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),$U.install(this.tokenizer,Ble,e.opts),$U.install(this.tokenizer,zle)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(n,r){e.locBeforeToken=r&&r.beforeToken,e._reportError(n)}}}};YU.exports=Px});var ZU=gt(si=>{"use strict";var{DOCUMENT_MODE:Ule}=bu();si.createDocument=function(){return{nodeName:"#document",mode:Ule.NO_QUIRKS,childNodes:[]}};si.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};si.createElement=function(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}};si.createCommentNode=function(i){return{nodeName:"#comment",data:i,parentNode:null}};var QU=function(i){return{nodeName:"#text",value:i,parentNode:null}},JU=si.appendChild=function(i,e){i.childNodes.push(e),e.parentNode=i},Wle=si.insertBefore=function(i,e,t){let n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i};si.setTemplateContent=function(i,e){i.content=e};si.getTemplateContent=function(i){return i.content};si.setDocumentType=function(i,e,t,n){let r=null;for(let o=0;o{"use strict";eW.exports=function(e,t){return t=t||Object.create(null),[e,t].reduce((n,r)=>(Object.keys(r).forEach(o=>{n[o]=r[o]}),n),Object.create(null))}});var aW=gt(z4=>{"use strict";var{DOCUMENT_MODE:Rf}=bu(),rW="html",jle="about:legacy-compat",Vle="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",oW=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Kle=oW.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),qle=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],sW=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Gle=sW.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function iW(i){let e=i.indexOf('"')!==-1?"'":'"';return e+i+e}function nW(i,e){for(let t=0;t-1)return Rf.QUIRKS;let n=e===null?Kle:oW;if(nW(t,n))return Rf.QUIRKS;if(n=e===null?sW:Gle,nW(t,n))return Rf.LIMITED_QUIRKS}return Rf.NO_QUIRKS};z4.serializeContent=function(i,e,t){let n="!DOCTYPE ";return i&&(n+=i),e?n+=" PUBLIC "+iW(e):t&&(n+=" SYSTEM"),t!==null&&(n+=" "+iW(t)),n}});var cW=gt(ad=>{"use strict";var Fx=R1(),Hx=bu(),pt=Hx.TAG_NAMES,Cr=Hx.NAMESPACES,U4=Hx.ATTRS,lW={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},$le="definitionurl",Yle="definitionURL",Xle={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Qle={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:Cr.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:Cr.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:Cr.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:Cr.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:Cr.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:Cr.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:Cr.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:Cr.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:Cr.XML},"xml:space":{prefix:"xml",name:"space",namespace:Cr.XML},xmlns:{prefix:"",name:"xmlns",namespace:Cr.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:Cr.XMLNS}},Jle=ad.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Zle={[pt.B]:!0,[pt.BIG]:!0,[pt.BLOCKQUOTE]:!0,[pt.BODY]:!0,[pt.BR]:!0,[pt.CENTER]:!0,[pt.CODE]:!0,[pt.DD]:!0,[pt.DIV]:!0,[pt.DL]:!0,[pt.DT]:!0,[pt.EM]:!0,[pt.EMBED]:!0,[pt.H1]:!0,[pt.H2]:!0,[pt.H3]:!0,[pt.H4]:!0,[pt.H5]:!0,[pt.H6]:!0,[pt.HEAD]:!0,[pt.HR]:!0,[pt.I]:!0,[pt.IMG]:!0,[pt.LI]:!0,[pt.LISTING]:!0,[pt.MENU]:!0,[pt.META]:!0,[pt.NOBR]:!0,[pt.OL]:!0,[pt.P]:!0,[pt.PRE]:!0,[pt.RUBY]:!0,[pt.S]:!0,[pt.SMALL]:!0,[pt.SPAN]:!0,[pt.STRONG]:!0,[pt.STRIKE]:!0,[pt.SUB]:!0,[pt.SUP]:!0,[pt.TABLE]:!0,[pt.TT]:!0,[pt.U]:!0,[pt.UL]:!0,[pt.VAR]:!0};ad.causesExit=function(i){let e=i.tagName;return e===pt.FONT&&(Fx.getTokenAttr(i,U4.COLOR)!==null||Fx.getTokenAttr(i,U4.SIZE)!==null||Fx.getTokenAttr(i,U4.FACE)!==null)?!0:Zle[e]};ad.adjustTokenMathMLAttrs=function(i){for(let e=0;e{"use strict";var q=R1(),ice=MU(),dW=NU(),nce=WU(),rce=XU(),uW=Oa(),oce=ZU(),sce=tW(),hW=aW(),Pa=cW(),Sr=x4(),ace=w4(),Cu=bu(),T=Cu.TAG_NAMES,tt=Cu.NAMESPACES,SW=Cu.ATTRS,lce={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:oce},wW="hidden",cce=8,dce=3,xW="INITIAL_MODE",zx="BEFORE_HTML_MODE",Y4="BEFORE_HEAD_MODE",Ff="IN_HEAD_MODE",EW="IN_HEAD_NO_SCRIPT_MODE",X4="AFTER_HEAD_MODE",Fa="IN_BODY_MODE",K4="TEXT_MODE",Br="IN_TABLE_MODE",TW="IN_TABLE_TEXT_MODE",Q4="IN_CAPTION_MODE",V1="IN_COLUMN_GROUP_MODE",ms="IN_TABLE_BODY_MODE",Vl="IN_ROW_MODE",J4="IN_CELL_MODE",Ux="IN_SELECT_MODE",Wx="IN_SELECT_IN_TABLE_MODE",q4="IN_TEMPLATE_MODE",jx="AFTER_BODY_MODE",Z4="IN_FRAMESET_MODE",kW="AFTER_FRAMESET_MODE",IW="AFTER_AFTER_BODY_MODE",AW="AFTER_AFTER_FRAMESET_MODE",uce={[T.TR]:Vl,[T.TBODY]:ms,[T.THEAD]:ms,[T.TFOOT]:ms,[T.CAPTION]:Q4,[T.COLGROUP]:V1,[T.TABLE]:Br,[T.BODY]:Fa,[T.FRAMESET]:Z4},hce={[T.CAPTION]:Br,[T.COLGROUP]:Br,[T.TBODY]:Br,[T.TFOOT]:Br,[T.THEAD]:Br,[T.COL]:V1,[T.TR]:ms,[T.TD]:Vl,[T.TH]:Vl},fW={[xW]:{[q.CHARACTER_TOKEN]:F1,[q.NULL_CHARACTER_TOKEN]:F1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:yce,[q.START_TAG_TOKEN]:F1,[q.END_TAG_TOKEN]:F1,[q.EOF_TOKEN]:F1},[zx]:{[q.CHARACTER_TOKEN]:B1,[q.NULL_CHARACTER_TOKEN]:B1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Cce,[q.END_TAG_TOKEN]:Sce,[q.EOF_TOKEN]:B1},[Y4]:{[q.CHARACTER_TOKEN]:z1,[q.NULL_CHARACTER_TOKEN]:z1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:W4,[q.START_TAG_TOKEN]:wce,[q.END_TAG_TOKEN]:xce,[q.EOF_TOKEN]:z1},[Ff]:{[q.CHARACTER_TOKEN]:U1,[q.NULL_CHARACTER_TOKEN]:U1,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:W4,[q.START_TAG_TOKEN]:cr,[q.END_TAG_TOKEN]:Su,[q.EOF_TOKEN]:U1},[EW]:{[q.CHARACTER_TOKEN]:W1,[q.NULL_CHARACTER_TOKEN]:W1,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:W4,[q.START_TAG_TOKEN]:Ece,[q.END_TAG_TOKEN]:Tce,[q.EOF_TOKEN]:W1},[X4]:{[q.CHARACTER_TOKEN]:j1,[q.NULL_CHARACTER_TOKEN]:j1,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:W4,[q.START_TAG_TOKEN]:kce,[q.END_TAG_TOKEN]:Ice,[q.EOF_TOKEN]:j1},[Fa]:{[q.CHARACTER_TOKEN]:j4,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:mo,[q.END_TAG_TOKEN]:Vx,[q.EOF_TOKEN]:Wl},[K4]:{[q.CHARACTER_TOKEN]:po,[q.NULL_CHARACTER_TOKEN]:po,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:ei,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:ei,[q.END_TAG_TOKEN]:ode,[q.EOF_TOKEN]:sde},[Br]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Kx,[q.END_TAG_TOKEN]:qx,[q.EOF_TOKEN]:Wl},[TW]:{[q.CHARACTER_TOKEN]:gde,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mde,[q.COMMENT_TOKEN]:H1,[q.DOCTYPE_TOKEN]:H1,[q.START_TAG_TOKEN]:H1,[q.END_TAG_TOKEN]:H1,[q.EOF_TOKEN]:H1},[Q4]:{[q.CHARACTER_TOKEN]:j4,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:vde,[q.END_TAG_TOKEN]:_de,[q.EOF_TOKEN]:Wl},[V1]:{[q.CHARACTER_TOKEN]:G4,[q.NULL_CHARACTER_TOKEN]:G4,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:bde,[q.END_TAG_TOKEN]:yde,[q.EOF_TOKEN]:Wl},[ms]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Cde,[q.END_TAG_TOKEN]:Sde,[q.EOF_TOKEN]:Wl},[Vl]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:wde,[q.END_TAG_TOKEN]:xde,[q.EOF_TOKEN]:Wl},[J4]:{[q.CHARACTER_TOKEN]:j4,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ede,[q.END_TAG_TOKEN]:Tde,[q.EOF_TOKEN]:Wl},[Ux]:{[q.CHARACTER_TOKEN]:po,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:LW,[q.END_TAG_TOKEN]:MW,[q.EOF_TOKEN]:Wl},[Wx]:{[q.CHARACTER_TOKEN]:po,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:kde,[q.END_TAG_TOKEN]:Ide,[q.EOF_TOKEN]:Wl},[q4]:{[q.CHARACTER_TOKEN]:j4,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ade,[q.END_TAG_TOKEN]:Lde,[q.EOF_TOKEN]:DW},[jx]:{[q.CHARACTER_TOKEN]:$4,[q.NULL_CHARACTER_TOKEN]:$4,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:bce,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Mde,[q.END_TAG_TOKEN]:Dde,[q.EOF_TOKEN]:P1},[Z4]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Nde,[q.END_TAG_TOKEN]:Rde,[q.EOF_TOKEN]:P1},[kW]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:po,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ode,[q.END_TAG_TOKEN]:Pde,[q.EOF_TOKEN]:P1},[IW]:{[q.CHARACTER_TOKEN]:V4,[q.NULL_CHARACTER_TOKEN]:V4,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:pW,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Fde,[q.END_TAG_TOKEN]:V4,[q.EOF_TOKEN]:P1},[AW]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:pW,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Hde,[q.END_TAG_TOKEN]:ei,[q.EOF_TOKEN]:P1}},Bx=class{constructor(e){this.options=sce(lce,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&uW.install(this,nce),this.options.onParseError&&uW.install(this,rce,{onParseError:this.options.onParseError})}parse(e){let t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(T.TEMPLATE,tt.HTML,[]));let n=this.treeAdapter.createElement("documentmock",tt.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===T.TEMPLATE&&this._pushTmplInsertionMode(q4),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);let r=this.treeAdapter.getFirstChild(n),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,o),o}_bootstrap(e,t){this.tokenizer=new q(this.options),this.stopped=!1,this.insertionMode=xW,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new ice(this.document,this.treeAdapter),this.activeFormattingElements=new dW(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();let t=this.tokenizer.getNextToken();if(t.type===q.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===q.WHITESPACE_CHARACTER_TOKEN&&t.chars[0]===` -`)){if(t.chars.length===1)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){let n=this.pendingScript;this.pendingScript=null,t(n);return}e&&e()}_setupTokenizerCDATAMode(){let e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==tt.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,tt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=K4}switchToPlaintextParsing(){this.insertionMode=K4,this.originalInsertionMode=Fa,this.tokenizer.state=q.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===T.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===tt.HTML){let e=this.treeAdapter.getTagName(this.fragmentContext);e===T.TITLE||e===T.TEXTAREA?this.tokenizer.state=q.MODE.RCDATA:e===T.STYLE||e===T.XMP||e===T.IFRAME||e===T.NOEMBED||e===T.NOFRAMES||e===T.NOSCRIPT?this.tokenizer.state=q.MODE.RAWTEXT:e===T.SCRIPT?this.tokenizer.state=q.MODE.SCRIPT_DATA:e===T.PLAINTEXT&&(this.tokenizer.state=q.MODE.PLAINTEXT)}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){let t=this.treeAdapter.createElement(e,tt.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,tt.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(T.HTML,tt.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){let t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;let n=this.treeAdapter.getNamespaceURI(t);if(n===tt.HTML||this.treeAdapter.getTagName(t)===T.ANNOTATION_XML&&n===tt.MATHML&&e.type===q.START_TAG_TOKEN&&e.tagName===T.SVG)return!1;let r=e.type===q.CHARACTER_TOKEN||e.type===q.NULL_CHARACTER_TOKEN||e.type===q.WHITESPACE_CHARACTER_TOKEN;return(e.type===q.START_TAG_TOKEN&&e.tagName!==T.MGLYPH&&e.tagName!==T.MALIGNMARK||r)&&this._isIntegrationPoint(t,tt.MATHML)||(e.type===q.START_TAG_TOKEN||r)&&this._isIntegrationPoint(t,tt.HTML)?!1:e.type!==q.EOF_TOKEN}_processToken(e){fW[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){fW[Fa][e.type](this,e)}_processTokenInForeignContent(e){e.type===q.CHARACTER_TOKEN?zde(this,e):e.type===q.NULL_CHARACTER_TOKEN?Bde(this,e):e.type===q.WHITESPACE_CHARACTER_TOKEN?po(this,e):e.type===q.COMMENT_TOKEN?$n(this,e):e.type===q.START_TAG_TOKEN?Ude(this,e):e.type===q.END_TAG_TOKEN&&Wde(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===q.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(Sr.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){let n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),o=this.treeAdapter.getAttrList(e);return Pa.isIntegrationPoint(n,r,o,t)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.length;if(e){let t=e,n=null;do if(t--,n=this.activeFormattingElements.entries[t],n.type===dW.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}while(t>0);for(let r=t;r=0;e--){let n=this.openElements.items[e];e===0&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));let r=this.treeAdapter.getTagName(n),o=uce[r];if(o){this.insertionMode=o;break}else if(!t&&(r===T.TD||r===T.TH)){this.insertionMode=J4;break}else if(!t&&r===T.HEAD){this.insertionMode=Ff;break}else if(r===T.SELECT){this._resetInsertionModeForSelect(e);break}else if(r===T.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(r===T.HTML){this.insertionMode=this.headElement?X4:Y4;break}else if(t){this.insertionMode=Fa;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n);if(r===T.TEMPLATE)break;if(r===T.TABLE){this.insertionMode=Wx;return}}this.insertionMode=Ux}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){let t=this.treeAdapter.getTagName(e);return t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){let e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),o=this.treeAdapter.getNamespaceURI(n);if(r===T.TEMPLATE&&o===tt.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}else if(r===T.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){let t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return Cu.SPECIAL_ELEMENTS[n][t]}};NW.exports=Bx;function fce(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagName)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):zs(i,e),t}function pce(i,e){let t=null;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n];if(r===e.element)break;i._isSpecialElement(r)&&(t=r)}return t||(i.openElements.popUntilElementPopped(e.element),i.activeFormattingElements.removeEntry(e)),t}function mce(i,e,t){let n=e,r=i.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==t;o++,s=r){r=i.openElements.getCommonAncestor(s);let a=i.activeFormattingElements.getElementEntry(s),l=a&&o>=dce;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=gce(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(s,n),n=s)}return n}function gce(i,e){let t=i.treeAdapter.getNamespaceURI(e.element),n=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,n),e.element=n,n}function vce(i,e,t){if(i._isElementCausesFosterParenting(e))i._fosterParentElement(t);else{let n=i.treeAdapter.getTagName(e),r=i.treeAdapter.getNamespaceURI(e);n===T.TEMPLATE&&r===tt.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function _ce(i,e,t){let n=i.treeAdapter.getNamespaceURI(t.element),r=t.token,o=i.treeAdapter.createElement(r.tagName,n,r.attrs);i._adoptNodes(e,o),i.treeAdapter.appendChild(e,o),i.activeFormattingElements.insertElementAfterBookmark(o,t.token),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,o)}function cd(i,e){let t;for(let n=0;n0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagName!==T.TEMPLATE&&i._err(Sr.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(T.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode()):i._err(Sr.endTagWithoutMatchingOpenElement)}function U1(i,e){i.openElements.pop(),i.insertionMode=X4,i._processToken(e)}function Ece(i,e){let t=e.tagName;t===T.HTML?mo(i,e):t===T.BASEFONT||t===T.BGSOUND||t===T.HEAD||t===T.LINK||t===T.META||t===T.NOFRAMES||t===T.STYLE?cr(i,e):t===T.NOSCRIPT?i._err(Sr.nestedNoscriptInHead):W1(i,e)}function Tce(i,e){let t=e.tagName;t===T.NOSCRIPT?(i.openElements.pop(),i.insertionMode=Ff):t===T.BR?W1(i,e):i._err(Sr.endTagWithoutMatchingOpenElement)}function W1(i,e){let t=e.type===q.EOF_TOKEN?Sr.openElementsLeftAfterEof:Sr.disallowedContentInNoscriptInHead;i._err(t),i.openElements.pop(),i.insertionMode=Ff,i._processToken(e)}function kce(i,e){let t=e.tagName;t===T.HTML?mo(i,e):t===T.BODY?(i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode=Fa):t===T.FRAMESET?(i._insertElement(e,tt.HTML),i.insertionMode=Z4):t===T.BASE||t===T.BASEFONT||t===T.BGSOUND||t===T.LINK||t===T.META||t===T.NOFRAMES||t===T.SCRIPT||t===T.STYLE||t===T.TEMPLATE||t===T.TITLE?(i._err(Sr.abandonedHeadElementChild),i.openElements.push(i.headElement),cr(i,e),i.openElements.remove(i.headElement)):t===T.HEAD?i._err(Sr.misplacedStartTagForHeadElement):j1(i,e)}function Ice(i,e){let t=e.tagName;t===T.BODY||t===T.HTML||t===T.BR?j1(i,e):t===T.TEMPLATE?Su(i,e):i._err(Sr.endTagWithoutMatchingOpenElement)}function j1(i,e){i._insertFakeElement(T.BODY),i.insertionMode=Fa,i._processToken(e)}function yu(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function j4(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function Ace(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function Lce(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function Mce(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,tt.HTML),i.insertionMode=Z4)}function Ul(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Dce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement();let t=i.openElements.currentTagName;(t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6)&&i.openElements.pop(),i._insertElement(e,tt.HTML)}function mW(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function Nce(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),t||(i.formElement=i.openElements.current))}function Rce(i,e){i.framesetOk=!1;let t=e.tagName;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n],o=i.treeAdapter.getTagName(r),s=null;if(t===T.LI&&o===T.LI?s=T.LI:(t===T.DD||t===T.DT)&&(o===T.DD||o===T.DT)&&(s=o),s){i.openElements.generateImpliedEndTagsWithExclusion(s),i.openElements.popUntilTagNamePopped(s);break}if(o!==T.ADDRESS&&o!==T.DIV&&o!==T.P&&i._isSpecialElement(r))break}i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Oce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.tokenizer.state=q.MODE.PLAINTEXT}function Pce(i,e){i.openElements.hasInScope(T.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(T.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.framesetOk=!1}function Fce(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(T.A);t&&(cd(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function Of(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function Hce(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(T.NOBR)&&(cd(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function gW(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function Bce(i,e){i.treeAdapter.getDocumentMode(i.document)!==Cu.DOCUMENT_MODE.QUIRKS&&i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode=Br}function Pf(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,tt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function zce(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,tt.HTML);let t=q.getTokenAttr(e,SW.TYPE);(!t||t.toLowerCase()!==wW)&&(i.framesetOk=!1),e.ackSelfClosing=!0}function vW(i,e){i._appendElement(e,tt.HTML),e.ackSelfClosing=!0}function Uce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._appendElement(e,tt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function Wce(i,e){e.tagName=T.IMG,Pf(i,e)}function jce(i,e){i._insertElement(e,tt.HTML),i.skipNextNewLine=!0,i.tokenizer.state=q.MODE.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=K4}function Vce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,q.MODE.RAWTEXT)}function Kce(i,e){i.framesetOk=!1,i._switchToTextParsing(e,q.MODE.RAWTEXT)}function _W(i,e){i._switchToTextParsing(e,q.MODE.RAWTEXT)}function qce(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode===Br||i.insertionMode===Q4||i.insertionMode===ms||i.insertionMode===Vl||i.insertionMode===J4?i.insertionMode=Wx:i.insertionMode=Ux}function bW(i,e){i.openElements.currentTagName===T.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML)}function yW(i,e){i.openElements.hasInScope(T.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,tt.HTML)}function Gce(i,e){i.openElements.hasInScope(T.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(T.RTC),i._insertElement(e,tt.HTML)}function $ce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Yce(i,e){i._reconstructActiveFormattingElements(),Pa.adjustTokenMathMLAttrs(e),Pa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,tt.MATHML):i._insertElement(e,tt.MATHML),e.ackSelfClosing=!0}function Xce(i,e){i._reconstructActiveFormattingElements(),Pa.adjustTokenSVGAttrs(e),Pa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,tt.SVG):i._insertElement(e,tt.SVG),e.ackSelfClosing=!0}function fs(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML)}function mo(i,e){let t=e.tagName;switch(t.length){case 1:t===T.I||t===T.S||t===T.B||t===T.U?Of(i,e):t===T.P?Ul(i,e):t===T.A?Fce(i,e):fs(i,e);break;case 2:t===T.DL||t===T.OL||t===T.UL?Ul(i,e):t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6?Dce(i,e):t===T.LI||t===T.DD||t===T.DT?Rce(i,e):t===T.EM||t===T.TT?Of(i,e):t===T.BR?Pf(i,e):t===T.HR?Uce(i,e):t===T.RB?yW(i,e):t===T.RT||t===T.RP?Gce(i,e):t!==T.TH&&t!==T.TD&&t!==T.TR&&fs(i,e);break;case 3:t===T.DIV||t===T.DIR||t===T.NAV?Ul(i,e):t===T.PRE?mW(i,e):t===T.BIG?Of(i,e):t===T.IMG||t===T.WBR?Pf(i,e):t===T.XMP?Vce(i,e):t===T.SVG?Xce(i,e):t===T.RTC?yW(i,e):t!==T.COL&&fs(i,e);break;case 4:t===T.HTML?Ace(i,e):t===T.BASE||t===T.LINK||t===T.META?cr(i,e):t===T.BODY?Lce(i,e):t===T.MAIN||t===T.MENU?Ul(i,e):t===T.FORM?Nce(i,e):t===T.CODE||t===T.FONT?Of(i,e):t===T.NOBR?Hce(i,e):t===T.AREA?Pf(i,e):t===T.MATH?Yce(i,e):t===T.MENU?$ce(i,e):t!==T.HEAD&&fs(i,e);break;case 5:t===T.STYLE||t===T.TITLE?cr(i,e):t===T.ASIDE?Ul(i,e):t===T.SMALL?Of(i,e):t===T.TABLE?Bce(i,e):t===T.EMBED?Pf(i,e):t===T.INPUT?zce(i,e):t===T.PARAM||t===T.TRACK?vW(i,e):t===T.IMAGE?Wce(i,e):t!==T.FRAME&&t!==T.TBODY&&t!==T.TFOOT&&t!==T.THEAD&&fs(i,e);break;case 6:t===T.SCRIPT?cr(i,e):t===T.CENTER||t===T.FIGURE||t===T.FOOTER||t===T.HEADER||t===T.HGROUP||t===T.DIALOG?Ul(i,e):t===T.BUTTON?Pce(i,e):t===T.STRIKE||t===T.STRONG?Of(i,e):t===T.APPLET||t===T.OBJECT?gW(i,e):t===T.KEYGEN?Pf(i,e):t===T.SOURCE?vW(i,e):t===T.IFRAME?Kce(i,e):t===T.SELECT?qce(i,e):t===T.OPTION?bW(i,e):fs(i,e);break;case 7:t===T.BGSOUND?cr(i,e):t===T.DETAILS||t===T.ADDRESS||t===T.ARTICLE||t===T.SECTION||t===T.SUMMARY?Ul(i,e):t===T.LISTING?mW(i,e):t===T.MARQUEE?gW(i,e):t===T.NOEMBED?_W(i,e):t!==T.CAPTION&&fs(i,e);break;case 8:t===T.BASEFONT?cr(i,e):t===T.FRAMESET?Mce(i,e):t===T.FIELDSET?Ul(i,e):t===T.TEXTAREA?jce(i,e):t===T.TEMPLATE?cr(i,e):t===T.NOSCRIPT?i.options.scriptingEnabled?_W(i,e):fs(i,e):t===T.OPTGROUP?bW(i,e):t!==T.COLGROUP&&fs(i,e);break;case 9:t===T.PLAINTEXT?Oce(i,e):fs(i,e);break;case 10:t===T.BLOCKQUOTE||t===T.FIGCAPTION?Ul(i,e):fs(i,e);break;default:fs(i,e)}}function Qce(i){i.openElements.hasInScope(T.BODY)&&(i.insertionMode=jx)}function Jce(i,e){i.openElements.hasInScope(T.BODY)&&(i.insertionMode=jx,i._processToken(e))}function ld(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function Zce(i){let e=i.openElements.tmplCount>0,t=i.formElement;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(T.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(T.FORM):i.openElements.remove(t))}function ede(i){i.openElements.hasInButtonScope(T.P)||i._insertFakeElement(T.P),i._closePElement()}function tde(i){i.openElements.hasInListItemScope(T.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(T.LI),i.openElements.popUntilTagNamePopped(T.LI))}function ide(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function nde(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function CW(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function rde(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(T.BR),i.openElements.pop(),i.framesetOk=!1}function zs(i,e){let t=e.tagName;for(let n=i.openElements.stackTop;n>0;n--){let r=i.openElements.items[n];if(i.treeAdapter.getTagName(r)===t){i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilElementPopped(r);break}if(i._isSpecialElement(r))break}}function Vx(i,e){let t=e.tagName;switch(t.length){case 1:t===T.A||t===T.B||t===T.I||t===T.S||t===T.U?cd(i,e):t===T.P?ede(i,e):zs(i,e);break;case 2:t===T.DL||t===T.UL||t===T.OL?ld(i,e):t===T.LI?tde(i,e):t===T.DD||t===T.DT?ide(i,e):t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6?nde(i,e):t===T.BR?rde(i,e):t===T.EM||t===T.TT?cd(i,e):zs(i,e);break;case 3:t===T.BIG?cd(i,e):t===T.DIR||t===T.DIV||t===T.NAV||t===T.PRE?ld(i,e):zs(i,e);break;case 4:t===T.BODY?Qce(i,e):t===T.HTML?Jce(i,e):t===T.FORM?Zce(i,e):t===T.CODE||t===T.FONT||t===T.NOBR?cd(i,e):t===T.MAIN||t===T.MENU?ld(i,e):zs(i,e);break;case 5:t===T.ASIDE?ld(i,e):t===T.SMALL?cd(i,e):zs(i,e);break;case 6:t===T.CENTER||t===T.FIGURE||t===T.FOOTER||t===T.HEADER||t===T.HGROUP||t===T.DIALOG?ld(i,e):t===T.APPLET||t===T.OBJECT?CW(i,e):t===T.STRIKE||t===T.STRONG?cd(i,e):zs(i,e);break;case 7:t===T.ADDRESS||t===T.ARTICLE||t===T.DETAILS||t===T.SECTION||t===T.SUMMARY||t===T.LISTING?ld(i,e):t===T.MARQUEE?CW(i,e):zs(i,e);break;case 8:t===T.FIELDSET?ld(i,e):t===T.TEMPLATE?Su(i,e):zs(i,e);break;case 10:t===T.BLOCKQUOTE||t===T.FIGCAPTION?ld(i,e):zs(i,e);break;default:zs(i,e)}}function Wl(i,e){i.tmplInsertionModeStackTop>-1?DW(i,e):i.stopped=!0}function ode(i,e){e.tagName===T.SCRIPT&&(i.pendingScript=i.openElements.current),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function sde(i,e){i._err(Sr.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i._processToken(e)}function jl(i,e){let t=i.openElements.currentTagName;t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR?(i.pendingCharacterTokens=[],i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=TW,i._processToken(e)):ps(i,e)}function ade(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,tt.HTML),i.insertionMode=Q4}function lde(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,tt.HTML),i.insertionMode=V1}function cde(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(T.COLGROUP),i.insertionMode=V1,i._processToken(e)}function dde(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,tt.HTML),i.insertionMode=ms}function ude(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(T.TBODY),i.insertionMode=ms,i._processToken(e)}function hde(i,e){i.openElements.hasInTableScope(T.TABLE)&&(i.openElements.popUntilTagNamePopped(T.TABLE),i._resetInsertionMode(),i._processToken(e))}function fde(i,e){let t=q.getTokenAttr(e,SW.TYPE);t&&t.toLowerCase()===wW?i._appendElement(e,tt.HTML):ps(i,e),e.ackSelfClosing=!0}function pde(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,tt.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function Kx(i,e){let t=e.tagName;switch(t.length){case 2:t===T.TD||t===T.TH||t===T.TR?ude(i,e):ps(i,e);break;case 3:t===T.COL?cde(i,e):ps(i,e);break;case 4:t===T.FORM?pde(i,e):ps(i,e);break;case 5:t===T.TABLE?hde(i,e):t===T.STYLE?cr(i,e):t===T.TBODY||t===T.TFOOT||t===T.THEAD?dde(i,e):t===T.INPUT?fde(i,e):ps(i,e);break;case 6:t===T.SCRIPT?cr(i,e):ps(i,e);break;case 7:t===T.CAPTION?ade(i,e):ps(i,e);break;case 8:t===T.COLGROUP?lde(i,e):t===T.TEMPLATE?cr(i,e):ps(i,e);break;default:ps(i,e)}}function qx(i,e){let t=e.tagName;t===T.TABLE?i.openElements.hasInTableScope(T.TABLE)&&(i.openElements.popUntilTagNamePopped(T.TABLE),i._resetInsertionMode()):t===T.TEMPLATE?Su(i,e):t!==T.BODY&&t!==T.CAPTION&&t!==T.COL&&t!==T.COLGROUP&&t!==T.HTML&&t!==T.TBODY&&t!==T.TD&&t!==T.TFOOT&&t!==T.TH&&t!==T.THEAD&&t!==T.TR&&ps(i,e)}function ps(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,i._processTokenInBodyMode(e),i.fosterParentingEnabled=t}function mde(i,e){i.pendingCharacterTokens.push(e)}function gde(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function H1(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t0?(i.openElements.popUntilTagNamePopped(T.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode(),i._processToken(e)):i.stopped=!0}function Mde(i,e){e.tagName===T.HTML?mo(i,e):$4(i,e)}function Dde(i,e){e.tagName===T.HTML?i.fragmentContext||(i.insertionMode=IW):$4(i,e)}function $4(i,e){i.insertionMode=Fa,i._processToken(e)}function Nde(i,e){let t=e.tagName;t===T.HTML?mo(i,e):t===T.FRAMESET?i._insertElement(e,tt.HTML):t===T.FRAME?(i._appendElement(e,tt.HTML),e.ackSelfClosing=!0):t===T.NOFRAMES&&cr(i,e)}function Rde(i,e){e.tagName===T.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagName!==T.FRAMESET&&(i.insertionMode=kW))}function Ode(i,e){let t=e.tagName;t===T.HTML?mo(i,e):t===T.NOFRAMES&&cr(i,e)}function Pde(i,e){e.tagName===T.HTML&&(i.insertionMode=AW)}function Fde(i,e){e.tagName===T.HTML?mo(i,e):V4(i,e)}function V4(i,e){i.insertionMode=Fa,i._processToken(e)}function Hde(i,e){let t=e.tagName;t===T.HTML?mo(i,e):t===T.NOFRAMES&&cr(i,e)}function Bde(i,e){e.chars=ace.REPLACEMENT_CHARACTER,i._insertCharacters(e)}function zde(i,e){i._insertCharacters(e),i.framesetOk=!1}function Ude(i,e){if(Pa.causesExit(e)&&!i.fragmentContext){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==tt.HTML&&!i._isIntegrationPoint(i.openElements.current);)i.openElements.pop();i._processToken(e)}else{let t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===tt.MATHML?Pa.adjustTokenMathMLAttrs(e):n===tt.SVG&&(Pa.adjustTokenSVGTagName(e),Pa.adjustTokenSVGAttrs(e)),Pa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function Wde(i,e){for(let t=i.openElements.stackTop;t>0;t--){let n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===tt.HTML){i._processToken(e);break}if(i.treeAdapter.getTagName(n).toLowerCase()===e.tagName){i.openElements.popUntilElementPopped(n);break}}}});var JW=gt((hEe,QW)=>{var GW=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aue=/\n/g,lue=/^\s*/,cue=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,due=/^:\s*/,uue=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,hue=/^[;\s]*/,fue=/^\s+|\s+$/g,pue=` -`,$W="/",YW="*",Eu="",mue="comment",gue="declaration";QW.exports=function(i,e){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];e=e||{};var t=1,n=1;function r(g){var b=g.match(aue);b&&(t+=b.length);var S=g.lastIndexOf(pue);n=~S?g.length-S:n+g.length}function o(){var g={line:t,column:n};return function(b){return b.position=new s(g),d(),b}}function s(g){this.start=g,this.end={line:t,column:n},this.source=e.source}s.prototype.content=i;var a=[];function l(g){var b=new Error(e.source+":"+t+":"+n+": "+g);if(b.reason=g,b.filename=e.source,b.line=t,b.column=n,b.source=i,e.silent)a.push(b);else throw b}function c(g){var b=g.exec(i);if(b){var S=b[0];return r(S),i=i.slice(S.length),b}}function d(){c(lue)}function u(g){var b;for(g=g||[];b=h();)b!==!1&&g.push(b);return g}function h(){var g=o();if(!($W!=i.charAt(0)||YW!=i.charAt(1))){for(var b=2;Eu!=i.charAt(b)&&(YW!=i.charAt(b)||$W!=i.charAt(b+1));)++b;if(b+=2,Eu===i.charAt(b-1))return l("End of comment missing");var S=i.slice(2,b-2);return n+=2,r(S),i=i.slice(b),n+=2,g({type:mue,comment:S})}}function p(){var g=o(),b=c(cue);if(b){if(h(),!c(due))return l("property missing ':'");var S=c(uue),k=g({type:gue,property:XW(b[0].replace(GW,Eu)),value:S?XW(S[0].replace(GW,Eu)):Eu});return c(hue),k}}function m(){var g=[];u(g);for(var b;b=p();)b!==!1&&(g.push(b),u(g));return g}return d(),m()};function XW(i){return i?i.replace(fue,Eu):Eu}});var ej=gt((fEe,ZW)=>{var vue=JW();function _ue(i,e){var t=null;if(!i||typeof i!="string")return t;for(var n,r=vue(i),o=typeof e=="function",s,a,l=0,c=r.length;l{});var CK=M(()=>{yK()});var Gpe,$pe,j5,V5,ic,f6,p6,m6,g6,v6=M(()=>{Lo();Sl();gl();CK();Ze();Mn();jt();De();ft();Gpe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$pe=function(i,e){return function(t,n){e(t,n,i)}},j5=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},V5=new nt("selectionAnchorSet",!1),ic=class SK{static get(e){return e.getContribution(SK.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=V5.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(je.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new sn().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Di(v("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(je.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};ic.ID="editor.contrib.selectionAnchorController";ic=Gpe([$pe(1,Ke)],ic);f6=class extends se{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2080),weight:100}})}run(e,t){var n;return j5(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.setSelectionAnchor()})}},p6=class extends se{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:V5})}run(e,t){var n;return j5(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.goToSelectionAnchor()})}},m6=class extends se{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:V5,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2089),weight:100}})}run(e,t){var n;return j5(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}},g6=class extends se{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:V5,kbOpts:{kbExpr:O.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return j5(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}};Ae(ic.ID,ic,4);X(f6);X(p6);X(m6);X(g6)});var wK=M(()=>{});var xK=M(()=>{wK()});var Ype,_6,b6,y6,C6,Ga,S6=M(()=>{Dt();Ce();xK();Ze();ri();qe();Mn();jt();Vc();qn();De();Yi();_r();ar();Ype=Oe("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),_6=class extends se{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=Ga.get(t))===null||n===void 0||n.jumpToBracket()}},b6=class extends se{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var r;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(r=Ga.get(t))===null||r===void 0||r.selectToBracket(o)}},y6=class extends se{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=Ga.get(t))===null||n===void 0||n.removeBrackets(this.id)}},C6=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},Ga=class i extends oe{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new ti(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let r=n.getStartPosition(),o=e.bracketPairs.matchBracket(r),s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new je(s.lineNumber,s.column,s.lineNumber,s.column):new je(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let o=r.getStartPosition(),s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){let c=t.bracketPairs.findNextBracket(o);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(P.compareRangesUsingStarts);let[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(o)){let u=a;a=l,l=u}}a&&l&&n.push(new je(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let o=[],s=0;for(let u=0,h=e.length;u1&&o.sort(Se.compare);let a=[],l=0,c=0,d=r.length;for(let u=0,h=o.length;u{qe();Mn();K5=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,r=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(n)))if(this._isMovingLeft){let s=new P(n,r-1,n,r),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new P(n,o,n,o),a)}else{let s=new P(n,o,n,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new P(n,r,n,r),a)}}computeCursorState(e,t){return this._isMovingLeft?new je(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new je(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var q5,w6,x6,E6=M(()=>{Ze();jt();EK();De();q5=class extends se{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],r=t.getSelections();for(let o of r)n.push(new K5(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},w6=class extends q5{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:v("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:O.writable})}},x6=class extends q5{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:v("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:O.writable})}};X(w6);X(x6)});var T6,k6=M(()=>{Ze();E_();sre();qe();jt();De();T6=class extends se{constructor(){super({id:"editor.action.transposeLetters",label:v("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let d=l===c?s.getPosition():T_.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),u=T_.leftPosition(n,d),h=T_.leftPosition(n,u),p=n.getValueInRange(P.fromPositions(h,u)),m=n.getValueInRange(P.fromPositions(u,d)),g=P.fromPositions(h,d);r.push(new _l(g,m+p))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};X(T6)});function L6(i){return i.register(),i}function kK(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(Zt).getFocusedCodeEditor();if(r&&r.hasTextFocus()){let o=r.getOption(35),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}var Xpe,Du,Qpe,TK,Jpe,Zpe,eme,I6,A6,M6=M(()=>{ZS();nr();Ire();Ze();Ar();jt();De();Yi();Ym();ft();Xpe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Du="9_cutcopypaste",Qpe=Nc||document.queryCommandSupported("cut"),TK=Nc||document.queryCommandSupported("copy"),Jpe=typeof navigator.clipboard=="undefined"||JN?document.queryCommandSupported("paste"):!0;Zpe=Qpe?L6(new w_({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Nc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.cutLabel","Cut"),when:O.writable,order:1},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.cutLabel","Cut"),when:O.writable,order:1}]})):void 0,eme=TK?L6(new w_({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Nc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;ns.appendMenuItem(xe.MenubarEditMenu,{submenu:xe.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});ns.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:Du,order:3});ns.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:ce.and(ce.notEquals("resourceScheme","output"),O.editorTextFocus)});ns.appendMenuItem(xe.EditorTitleContext,{submenu:xe.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});ns.appendMenuItem(xe.ExplorerContext,{submenu:xe.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});I6=Jpe?L6(new w_({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Nc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.pasteLabel","Paste"),when:O.writable,order:4},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.pasteLabel","Paste"),when:O.writable,order:4}]})):void 0,A6=class extends se{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(Iw.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),Iw.forceCopyWithSyntaxHighlighting=!1)}};kK(Zpe,"cut");kK(eme,"copy");I6&&(I6.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(Zt),n=i.get(Ms),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&f_?(()=>Xpe(void 0,void 0,void 0,function*(){let s=yield n.readText();if(s!==""){let a=rP.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=r.getOption(35)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),I6.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));TK&&X(A6)});function IK(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>LK(e,t,i.include))||!i.includeSourceActions&&Qe.Source.contains(e))}function AK(i,e){let t=e.kind?new Qe(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>LK(t,n,i.include))||!i.includeSourceActions&&t&&Qe.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function LK(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var tme,Qe,Xn,gd,G5,vd=M(()=>{At();tme=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Qe=class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}};Qe.sep=".";Qe.None=new Qe("@@none@@");Qe.Empty=new Qe("");Qe.QuickFix=new Qe("quickfix");Qe.Refactor=new Qe("refactor");Qe.RefactorExtract=Qe.Refactor.append("extract");Qe.RefactorInline=Qe.Refactor.append("inline");Qe.RefactorMove=Qe.Refactor.append("move");Qe.RefactorRewrite=Qe.Refactor.append("rewrite");Qe.Source=new Qe("source");Qe.SourceOrganizeImports=Qe.Source.append("organizeImports");Qe.SourceFixAll=Qe.Source.append("fixAll");Qe.SurroundWith=Qe.Refactor.append("surround");(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(Xn||(Xn={}));gd=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Qe(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}},G5=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return tme(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(r){Ut(r)}n&&(this.action.edit=n.edit)}return this})}}});function c0(i,e,t,n,r,o){var s;return $5(this,void 0,void 0,function*(){let a=n.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:n.type},c=new aP(e,o),d=ime(i,e,a),u=new ne,h=d.map(m=>$5(this,void 0,void 0,function*(){try{r.report(m);let g=yield m.provideCodeActions(e,t,l,c.token);if(g&&u.add(g),c.token.isCancellationRequested)return MK;let b=((g==null?void 0:g.actions)||[]).filter(k=>k&&AK(a,k)),S=rme(m,b,a.include);return{actions:b.map(k=>new G5(k,m)),documentation:S}}catch(g){if(Zo(g))throw g;return Ut(g),MK}})),p=i.onDidChange(()=>{let m=i.all(e);ha(m,d)||c.cancel()});try{let m=yield Promise.all(h),g=m.map(S=>S.actions).flat(),b=[...vr(m.map(S=>S.documentation)),...nme(i,e,n,g)];return new D6(g,b,u)}finally{p.dispose(),c.dispose()}})}function ime(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>IK(t,new Qe(r))):!0)}function*nme(i,e,t,n){var r,o,s;if(e&&n.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*(r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},n.map(l=>l.action)))}function rme(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new Qe(r.kind),command:r.command}));if(t){let r;for(let o of n)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(let r of e)if(r.kind){for(let o of n)if(o.kind.contains(new Qe(r.kind)))return o.command}}function DK(i,e,t,n,r=et.None){var o;return $5(this,void 0,void 0,function*(){let s=i.get(Kc),a=i.get(ui),l=i.get(Mr),c=i.get(xi);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==s0.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let u=ome(d);c.error(typeof u=="string"?u:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function ome(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var $5,Y5,Yf,X5,Q5,J5,a0,l0,D6,MK,s0,Nu=M(()=>{oi();gi();At();Ce();Sn();Jm();qe();Mn();xt();ts();au();De();Bi();Ro();qc();Hc();vd();$5=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Y5="editor.action.codeAction",Yf="editor.action.quickFix",X5="editor.action.autoFix",Q5="editor.action.refactor",J5="editor.action.sourceAction",a0="editor.action.organizeImports",l0="editor.action.fixAll",D6=class i extends oe{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Ui(e.diagnostics)?Ui(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Ui(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Qe.QuickFix.contains(new Qe(e.kind))&&!!e.isPreferred)}},MK={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(s0||(s0={}));St.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return $5(this,void 0,void 0,function*(){if(!(e instanceof ht))throw Io();let{codeActionProvider:o}=i.get(be),s=i.get(Ci).getModel(e);if(!s)throw Io();let a=je.isISelection(t)?je.liftSelection(t):P.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Io();let l=typeof n=="string"?new Qe(n):void 0,c=yield c0(o,s,a,{type:1,triggerAction:Xn.Default,filter:{includeSourceActions:!0,include:l}},wa.None,et.None),d=[],u=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let h=0;hh.action)}finally{setTimeout(()=>c.dispose(),100)}})})});var sme,ame,d0,RK=M(()=>{rw();Nu();vd();Gn();sme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ame=function(i,e){return function(t,n){e(t,n,i)}},d0=class NK{constructor(e){this.keybindingService=e}getResolver(){let e=new Xh(()=>this.keybindingService.getKeybindings().filter(t=>NK.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===a0?n={kind:Qe.SourceOrganizeImports.value}:t.command===l0&&(n={kind:Qe.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},gd.fromUser(n,{kind:Qe.None,apply:"never"}))}));return t=>{if(t.kind){let n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new Qe(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};d0.codeActionCommands=[Q5,Y5,J5,a0,l0];d0=sme([ame(0,Bt)],d0)});var OK=M(()=>{});var PK=M(()=>{OK()});var FK=M(()=>{});var HK=M(()=>{FK()});var u0=M(()=>{PK();HK()});var BK=M(()=>{});var zK=M(()=>{BK()});var TIe,kIe,IIe,AIe,LIe,MIe,DIe,NIe,RIe,OIe,PIe,FIe,HIe,BIe,zIe,UIe,WIe,jIe,VIe,KIe,qIe,GIe,$Ie,YIe,XIe,QIe,JIe,ZIe,eAe,tAe,iAe,nAe,rAe,Z5=M(()=>{zK();De();_r();TIe=Oe("symbolIcon.arrayForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kIe=Oe("symbolIcon.booleanForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),IIe=Oe("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),AIe=Oe("symbolIcon.colorForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),LIe=Oe("symbolIcon.constantForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),MIe=Oe("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),DIe=Oe("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),NIe=Oe("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),RIe=Oe("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),OIe=Oe("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),PIe=Oe("symbolIcon.fileForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),FIe=Oe("symbolIcon.folderForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),HIe=Oe("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),BIe=Oe("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zIe=Oe("symbolIcon.keyForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),UIe=Oe("symbolIcon.keywordForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),WIe=Oe("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jIe=Oe("symbolIcon.moduleForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),VIe=Oe("symbolIcon.namespaceForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),KIe=Oe("symbolIcon.nullForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qIe=Oe("symbolIcon.numberForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),GIe=Oe("symbolIcon.objectForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$Ie=Oe("symbolIcon.operatorForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),YIe=Oe("symbolIcon.packageForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),XIe=Oe("symbolIcon.propertyForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),QIe=Oe("symbolIcon.referenceForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),JIe=Oe("symbolIcon.snippetForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ZIe=Oe("symbolIcon.stringForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),eAe=Oe("symbolIcon.structForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),tAe=Oe("symbolIcon.textForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),iAe=Oe("symbolIcon.typeParameterForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),nAe=Oe("symbolIcon.unitForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rAe=Oe("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function WK(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:UK,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let n=lme.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new Qe(o.action.kind):Qe.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(o);break}}let r=[];for(let o of n)if(o.actions.length){r.push({kind:"header",group:o.group});for(let s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}var UK,lme,jK=M(()=>{u0();or();vd();Z5();De();UK=Object.freeze({kind:Qe.Empty,title:v("codeAction.widget.id.more","More Actions...")}),lme=Object.freeze([{kind:Qe.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Qe.RefactorExtract,title:v("codeAction.widget.id.extract","Extract..."),icon:lt.wrench},{kind:Qe.RefactorInline,title:v("codeAction.widget.id.inline","Inline..."),icon:lt.wrench},{kind:Qe.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite..."),icon:lt.wrench},{kind:Qe.RefactorMove,title:v("codeAction.widget.id.move","Move..."),icon:lt.wrench},{kind:Qe.SurroundWith,title:v("codeAction.widget.id.surround","Surround With..."),icon:lt.symbolSnippet},{kind:Qe.Source,title:v("codeAction.widget.id.source","Source Action..."),icon:lt.symbolFile},UK])});var VK=M(()=>{});var KK=M(()=>{VK()});var cme,dme,Xf,rc,N6=M(()=>{Ht();dP();or();qt();Ce();qr();Li();KK();GO();Nu();De();Gn();cme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dme=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.Hidden={type:0};class e{constructor(n,r,o,s){this.actions=n,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(Xf||(Xf={}));rc=class qK extends oe{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new $e),this.onClick=this._onClick.event,this._state=Xf.Hidden,this._domNode=fe("div.lightBulbWidget"),this._register(Z_.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(aR(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:r,height:o}=wn(this._domNode),s=this._editor.getOption(64),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(li.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,r;this._preferredKbLabel=Un((n=t.lookupKeybinding(X5))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=Un((r=t.lookupKeybinding(Yf))===null||r===void 0?void 0:r.getLabel()),this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();let r=this._editor.getOptions();if(!r.get(62).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(n),l=o.getOptions().tabSize,c=r.get(48),d=o.getLineContent(s),u=qm(d,l),h=c.spaceWidth*u>22,p=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1),m=s;if(!h){if(s>1&&!p(s-1))m-=1;else if(!p(s+1))m+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new Xf.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:qK._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==Xf.Hidden&&(this.state=Xf.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...mt.asClassNameArray(lt.lightBulb)),this._domNode.classList.add(...mt.asClassNameArray(lt.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...mt.asClassNameArray(lt.lightbulbAutofix)),this._domNode.classList.add(...mt.asClassNameArray(lt.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};rc.ID="editor.contrib.lightbulbWidget";rc._posPref=[0];rc=cme([dme(1,Bt)],rc)});var GK=M(()=>{});var $K=M(()=>{GK()});var ume,hme,Qn,fme,ey,h0=M(()=>{Lo();Dt();Ce();$K();Ze();qe();De();ft();ume=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},hme=function(i,e){return function(t,n){e(t,n,i)}},Qn=class R6{static get(e){return e.getContribution(R6.ID)}constructor(e,t){this._messageWidget=new Hi,this._messageListeners=new ne,this._editor=e,this._visible=R6.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Di(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new ey(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new ss(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new P(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(ey.fadeOut(this._messageWidget.value))}};Qn.ID="editor.contrib.messageController";Qn.MESSAGE_VISIBLE=new nt("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));Qn=ume([hme(1,Ke)],Qn);fme=wi.bindToContribution(Qn.get);Me(new fme({id:"leaveEditorMessage",precondition:Qn.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));ey=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);let s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Ae(Qn.ID,Qn,4)});var YK=M(()=>{});var O6=M(()=>{YK()});function QK(i){return i.replace(/\r\n|\r|\n/g," ")}var XK,P6,z6,U6,F6,H6,B6,ty,iy,JK=M(()=>{Ht();yP();_P();or();Ce();nr();qr();O6();De();Tl();Gn();rb();_r();XK=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},P6=function(i,e){return function(t,n){e(t,n,i)}},z6="acceptSelectedCodeAction",U6="previewSelectedCodeAction",F6=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var r,o;n.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},H6=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let r=new nb(e,p_);return{container:e,icon:t,text:n,keybinding:r}}renderElement(e,t,n){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(n.icon.className=mt.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=ga(e.group.icon.color.id))):(n.icon.className=mt.asClassName(lt.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=QK(e.label),n.keybinding.set(e.keybinding),fR(!!e.keybinding,n.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(z6))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(U6))===null||s===void 0?void 0:s.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:a&&l?this._supportsPreview?n.container.title=v({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};H6=XK([P6(1,Bt)],H6);B6=class extends UIEvent{constructor(){super("acceptSelectedAction")}},ty=class extends UIEvent{constructor(){super("previewSelectedAction")}},iy=class extends oe{constructor(e,t,n,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new ib(e,this.domNode,a,[new H6(t,this._keybindingService),new F6],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?QK(l==null?void 0:l.label):"";return l.disabled&&(c=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(SP),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(c=>c.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);let o=this._allMenuItems.map((c,d)=>{let u=document.getElementById(this._list.getElementID(d));if(u){u.style.width="auto";let h=u.getBoundingClientRect().width;return u.style.width="",h}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],r=this._list.element(n);if(!this.focusCondition(r))return;let o=e?new ty:new B6;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof ty):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};iy=XK([P6(4,Gc),P6(5,Bt)],iy)});var pme,W6,Ru,_d,Ou,f0,ZK=M(()=>{Ht();gf();Ce();O6();De();JK();Yi();ft();Tl();bl();Et();pme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},W6=function(i,e){return function(t,n){e(t,n,i)}},Ru={Visible:new nt("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},_d=rr("actionWidgetService"),Ou=class extends oe{get isVisible(){return Ru.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Hi)}show(e,t,n,r,o,s,a){let l=Ru.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(iy,e,t,n,r);this._contextViewService.showContextView({getAnchor:()=>o,render:d=>(l.set(!0),this._renderWidget(d,c,a!=null?a:[])),onHide:d=>{l.reset(),this._onWidgetClosed(d)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var r;let o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");let s=new ne,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(Rt(l,on.MOUSE_DOWN,m=>m.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(Rt(d,on.POINTER_MOVE,()=>d.remove())),s.add(Rt(d,on.MOUSE_DOWN,()=>d.remove()));let u=0;if(n.length){let m=this._createActionBar(".action-widget-action-bar",n);m&&(o.appendChild(m.getContainer().parentElement),s.add(m),u=m.getContainer().offsetWidth)}let h=(r=this._list.value)===null||r===void 0?void 0:r.layout(u);o.style.width=`${h}px`;let p=s.add(Ts(e));return s.add(p.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let n=fe(e),r=new Oo(n);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};Ou=pme([W6(0,Gc),W6(1,Ke),W6(2,He)],Ou);sr(_d,Ou,1);f0=100+1e3;mi(class extends rs{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:Ru.Visible,keybinding:{weight:f0,primary:9,secondary:[1033]}})}run(i){i.get(_d).hide()}});mi(class extends rs{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:Ru.Visible,keybinding:{weight:f0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(_d);e instanceof Ou&&e.focusPrevious()}});mi(class extends rs{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:Ru.Visible,keybinding:{weight:f0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(_d);e instanceof Ou&&e.focusNext()}});mi(class extends rs{constructor(){super({id:z6,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:Ru.Visible,keybinding:{weight:f0,primary:3,secondary:[2137]}})}run(i){let e=i.get(_d);e instanceof Ou&&e.acceptSelected()}});mi(class extends rs{constructor(){super({id:U6,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:Ru.Visible,keybinding:{weight:f0,primary:2051}})}run(i){let e=i.get(_d);e instanceof Ou&&e.acceptSelected(!0)}})});var j6,mme,Qf,K6,V6,Pu,gme,ny,q6=M(()=>{Dt();At();qt();Ce();lo();ft();qc();vd();Nu();j6=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},mme=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},K6=new nt("supportedCodeAction",""),V6=class extends oe{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new ss),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>nf(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Xn.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){let{lineNumber:r,column:o}=n.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return n}};(function(i){i.Empty={type:0};class e{constructor(n,r,o){this.trigger=n,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(Zo(s))return gme;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Pu||(Pu={}));gme=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),ny=class extends oe{constructor(e,t,n,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new Hi),this._state=Pu.Empty,this._onDidChangeState=this._register(new $e),this.onDidChangeState=this._onDidChangeState.event,Qf.set(this,!1),this._supportedCodeActions=K6.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){j6(this,Qf,"f")||(mme(this,Qf,!0,"f"),super.dispose(),this.setState(Pu.Empty,!0))}_update(){if(j6(this,Qf,"f"))return;this._codeActionOracle.value=void 0,this.setState(Pu.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(88)){let t=this._registry.all(e).flatMap(n=>{var r;return(r=n.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new V6(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Pu.Empty);return}let o=Vt(s=>c0(this._registry,e,n.selection,n.trigger,wa.None,s));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new Pu.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Xn.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!j6(this,Qf,"f")&&this._onDidChangeState.fire(e))}};Qf=new WeakMap});var vme,oc,ry,_me,bme,oy,$a,sy=M(()=>{Ht();At();rw();Ce();ri();xt();Nu();RK();jK();N6();h0();De();ZK();Bi();jn();ft();Et();ob();qc();vd();q6();vme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},oc=function(i,e){return function(t,n){e(t,n,i)}},ry=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},_me=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},bme=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},$a=class eq extends oe{static get(e){return e.getContribution(eq.ID)}constructor(e,t,n,r,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new Hi),this._showDisabled=!1,oy.set(this,!1),this._editor=e,this._model=this._register(new ny(this._editor,o.codeActionProvider,t,n,s)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new Xh(()=>{let u=this._editor.getContribution(rc.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=r.createInstance(d0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){_me(this,oy,!0,"f"),super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){var o;if(!this._editor.hasModel())return;(o=Qn.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return ry(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(DK,e,s0.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Xn.QuickFix,filter:{}})}})}update(e){var t,n,r,o,s,a,l;return ry(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let c;try{c=yield e.actions}catch(d){at(d);return}if(!bme(this,oy,"f"))if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(c,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){let u=this.tryGetValidActionToApply(e.trigger,c);if(u){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(u,!1,!1)}finally{c.dispose()}return}if(e.trigger.context){let h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(h&&h.action.disabled){(s=Qn.get(this._editor))===null||s===void 0||s.showMessage(h.action.disabled,e.trigger.context.position),c.dispose();return}}}let d=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!c.allActions.length||!d&&!c.validActions.length)){(l=Qn.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this.showCodeActionList(c,this.toCoords(e.position),{includeDisabledActions:d,fromLightbulb:!1})}else this._actionWidgetService.isVisible?c.dispose():this._activeCodeActions.value=c})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return ry(this,void 0,void 0,function*(){let r=this._editor.getDomNode();if(!r)return;let o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=Se.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>ry(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,WK(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=wn(this._editor.getDomNode()),r=n.left+t.left,o=n.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;let t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};oy=new WeakMap;$a.ID="editor.contrib.codeActionController";$a=vme([oc(1,t1),oc(2,Ke),oc(3,He),oc(4,be),oc(5,El),oc(6,ui),oc(7,Mt),oc(8,_d),oc(9,He)],$a)});function p0(i){return ce.regex(K6.keys()[0],new RegExp("(\\s|^)"+vl(i.value)+"\\b"))}function Fu(i,e,t,n,r=Xn.Default){if(i.hasModel()){let o=$a.get(i);o==null||o.manualTriggerAtCurrentPosition(e,r,t,n)}}var G6,ay,ly,cy,dy,uy,hy,fy,tq=M(()=>{Si();Ze();jt();Nu();De();ft();vd();sy();q6();G6={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:v("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v("args.schema.apply.first","Always apply the first returned code action."),v("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),v("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};ay=class extends se{constructor(){super({id:Yf,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),kbOpts:{kbExpr:O.textInputFocus,primary:2137,weight:100}})}run(e,t){return Fu(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Xn.QuickFix)}},ly=class extends wi{constructor(){super({id:Y5,precondition:ce.and(O.writable,O.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:G6}]}})}runEditorCommand(e,t,n){let r=gd.fromUser(n,{kind:Qe.Empty,apply:"ifSingle"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):v("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},cy=class extends se{constructor(){super({id:Q5,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),kbOpts:{kbExpr:O.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ce.and(O.writable,p0(Qe.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:G6}]}})}run(e,t,n){let r=gd.fromUser(n,{kind:Qe.Refactor,apply:"never"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):v("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:Qe.Refactor.contains(r.kind)?r.kind:Qe.None,onlyIncludePreferredActions:r.preferred},r.apply,Xn.Refactor)}},dy=class extends se{constructor(){super({id:J5,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ce.and(O.writable,p0(Qe.Source))},description:{description:"Source Action...",args:[{name:"args",schema:G6}]}})}run(e,t,n){let r=gd.fromUser(n,{kind:Qe.Source,apply:"never"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):v("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:Qe.Source.contains(r.kind)?r.kind:Qe.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Xn.SourceAction)}},uy=class extends se{constructor(){super({id:a0,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ce.and(O.writable,p0(Qe.SourceOrganizeImports)),kbOpts:{kbExpr:O.textInputFocus,primary:1581,weight:100}})}run(e,t){return Fu(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:Qe.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Xn.OrganizeImports)}},hy=class extends se{constructor(){super({id:l0,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:ce.and(O.writable,p0(Qe.SourceFixAll))})}run(e,t){return Fu(t,v("fixAll.noneMessage","No fix all action available"),{include:Qe.SourceFixAll,includeSourceActions:!0},"ifSingle",Xn.FixAll)}},fy=class extends se{constructor(){super({id:X5,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ce.and(O.writable,p0(Qe.QuickFix)),kbOpts:{kbExpr:O.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Fu(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Qe.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Xn.AutoFix)}}});var $6=M(()=>{Ze();Are();tq();sy();N6();De();KR();Fc();Ae($a.ID,$a,3);Ae(rc.ID,rc,4);X(ay);X(cy);X(dy);X(uy);X(fy);X(hy);Me(new ly);Lr.as(L_.Configuration).registerConfiguration(Object.assign(Object.assign({},sP),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))});var sc,Y6=M(()=>{xa();ri();qe();Mn();sc=class i{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;let r=t.length,o=e.length;if(n+r>o)return!1;for(let s=0;s=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,r,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=o.getLineContent(a),h=o.getLineContent(c),p=u.lastIndexOf(t,l-1+t.length),m=h.indexOf(n,d-1-n.length);if(p!==-1&&m!==-1)if(a===c)u.substring(p+t.length,m).indexOf(n)>=0&&(p=-1,m=-1);else{let b=u.substring(p+t.length),S=h.substring(0,m);(b.indexOf(n)>=0||S.indexOf(n)>=0)&&(p=-1,m=-1)}let g;p!==-1&&m!==-1?(r&&p+t.length0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=i._createRemoveBlockCommentOperations(new P(a,p+t.length+1,c,m+1),t,n)):(g=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(let b of g)s.addTrackedEditOperation(b.range,b.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return P.isEmpty(e)?r.push(Kt.delete(new P(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(Kt.delete(new P(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(Kt.delete(new P(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return P.isEmpty(e)?o.push(Kt.replace(new P(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(Kt.insert(new Se(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(Kt.insert(new Se(e.endLineNumber,e.endColumn),(r?" ":"")+n))),o}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let o=e.getLanguageIdAtPosition(n,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let r=n[0],o=n[1];return new je(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let r=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new je(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}});var py,iq=M(()=>{Si();xa();ri();qe();Mn();Y6();py=class i{constructor(e,t,n,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,r){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=n-t+1;co?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var m0,X6,Q6,J6,Z6,eE=M(()=>{gl();Ze();qe();jt();Kn();Y6();iq();De();Yi();m0=class extends se{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(Tt);if(!t.hasModel())return;let r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(21),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>P.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d{Ht();Fre();Oc();Ce();nr();Ze();jt();De();Yi();ft();Tl();Gn();jn();sb();yme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Hu=function(i,e){return function(t,n){e(t,n,i)}},Jf=class nq{static get(e){return e.getContribution(nq.ID)}constructor(e,t,n,r,o,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new ne,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){let d=this._contextViewService.getContextViewElement(),u=c.srcElement;u.shadowRoot&&uR(d)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(22)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(22)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(let r of this._editor.getSelections())if(r.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(22)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?xe.SimpleEditorContext:xe.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let n=[],r=this._menuService.createMenu(t,this._contextKeyService),o=r.getActions({arg:e.uri});r.dispose();for(let s of o){let[,a]=s,l=0;for(let c of a)if(c instanceof Dm){let d=this._getMenuActions(e,c.item.submenu);d.length>0&&(n.push(new Lm(c.id,c.label,d)),l++)}else n.push(c),l++;l&&n.push(new ks)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),s=wn(this._editor.getDomNode()),a=s.left+o.left,l=s.top+o.top+o.height;t={x:a,y:l}}let r=this._editor.getOption(123)&&!km;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:o=>{let s=this._keybindingFor(o);if(s)return new Mw(o,o,{label:!0,keybinding:s.getLabel(),isMenu:!0});let a=o;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new Mw(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||kP(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(70),n=0,r=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled=="undefined"?!0:c.enabled,checked:c.checked,run:c.run}),o=(c,d)=>new Lm(`menu-action-${++n}`,c,d,void 0),s=(c,d,u,h,p)=>{if(!d)return r({label:c,enabled:d,run:()=>{}});let m=b=>()=>{this._configurationService.updateValue(u,b)},g=[];for(let b of p)g.push(r({label:b.label,checked:h===b.value,run:m(b.value)}));return o(c,g)},a=[];a.push(r({label:v("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ks),a.push(r({label:v("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(v("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:v("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:v("context.minimap.size.fill","Fill"),value:"fill"},{label:v("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(v("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:v("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:v("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(123)&&!km;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Jf.ID="editor.contrib.contextmenu";Jf=yme([Hu(1,ls),Hu(2,Gc),Hu(3,Ke),Hu(4,Bt),Hu(5,Is),Hu(6,Mt),Hu(7,kl)],Jf);tE=class extends se{constructor(){super({id:"editor.action.showContextMenu",label:v("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Jf.get(t))===null||n===void 0||n.showContextMenu()}};Ae(Jf.ID,Jf,2);X(tE)});var g0,v0,Bu,nE,rE,oE=M(()=>{Ce();Ze();jt();De();g0=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let r=0;r{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;let n=new g0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new v0(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new v0(new g0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new v0(new g0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};Bu.ID="editor.contrib.cursorUndoRedoController";nE=class extends se{constructor(){super({id:"cursorUndo",label:v("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var r;(r=Bu.get(t))===null||r===void 0||r.cursorUndo()}},rE=class extends se{constructor(){super({id:"cursorRedo",label:v("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var r;(r=Bu.get(t))===null||r===void 0||r.cursorRedo()}};Ae(Bu.ID,Bu,0);X(nE);X(rE)});var rq=M(()=>{});var oq=M(()=>{rq()});var my,sq=M(()=>{qe();Mn();my=class{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new P(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new je(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new je(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber{Ce();nr();oq();Ze();ri();qe();Mn();qn();sq();zu=class i extends oe{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(33)||this._editor.getOption(20)||(Zf(e)&&(this._modifierPressed=!0),this._mouseDown&&Zf(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(33)||this._editor.getOption(20)||(Zf(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===i.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(r.length===1)this._dragSelection=r[0];else return}Zf(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new Se(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){let r=this._editor.getSelection();if(r){let{selectionStartLineNumber:o,selectionStartColumn:s}=r;n=[new je(o,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new je(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Zf(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new my(this._dragSelection,t,Zf(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new P(e.lineNumber,e.column,e.lineNumber,e.column),options:i._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};zu.ID="editor.contrib.dragAndDrop";zu.TRIGGER_KEY_VALUE=zn?6:5;zu._DECORATION_OPTIONS=ct.register({description:"dnd-target",className:"dnd-target"});Ae(zu.ID,zu,2)});var Ya,aq=M(()=>{qe();Vc();qn();_r();ar();Ya=class i{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){let e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,r.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){let s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new P(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let r=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){r=i._FIND_MATCH_NO_OVERVIEW_DECORATION;let a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c)),u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let p=1,m=e.length;p=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(o.push({range:new P(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=g.startLineNumber,h=g.endLineNumber)}o.push({range:new P(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;an.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,i._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumbere.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn{qe();gy=class{constructor(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let n=[];for(let s=0;sP.compareRangesUsingStarts(s.range,a.range));let r=[],o=n[0];for(let s=1;s0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function cq(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function dq(i,e,t){let n=e.split(t),r=i[0].split(t),o="";return n.forEach((s,a)=>{o+=aE([r[a]],s)+t}),o.slice(0,-1)}var uq=M(()=>{Si()});function hq(i){if(!i||i.length===0)return new tp(null);let e=[],t=new cE(i);for(let n=0,r=i.length;n=r)break;let s=i.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` -`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(n++,n>=r)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1{uq();vy=class{constructor(e){this.staticValue=e,this.kind=0}},lE=class{constructor(e){this.pieces=e,this.kind=1}},tp=class i{static fromStaticValue(e){return new i([ep.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new vy(""):e.length===1&&e[0].staticValue!==null?this._state=new vy(e[0].staticValue):this._state=new lE(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?aE(e,this._state.staticValue):this._state.staticValue;let n="";for(let r=0,o=this._state.pieces.length;r0){let l=[],c=s.caseOps.length,d=0;for(let u=0,h=a.length;u=c){l.push(a.slice(u));break}switch(s.caseOps[d]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),d++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),d++;break;default:l.push(a[u])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e{oi();Dt();Ce();E_();ri();qe();Mn();Sre();aq();lq();fq();ft();Qa=new nt("findWidgetVisible",!1),NDe=Qa.toNegated(),ip=new nt("findInputFocussed",!1),_0=new nt("replaceInputFocussed",!1),b0={primary:545,mac:{primary:2593}},y0={primary:565,mac:{primary:2613}},C0={primary:560,mac:{primary:2608}},S0={primary:554,mac:{primary:2602}},w0={primary:558,mac:{primary:2606}},Gt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},Xa=19999,Cme=240,_y=class i{constructor(e,t){this._toDispose=new ne,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new ss,this._decorations=new Ya(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new ti(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Vi(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},Cme)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new P(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,Xa);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=k_(r.map(l=>l.range),l=>P.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(39).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===1?(n===1?n=o.getLineCount():n--,r=o.getLineMaxColumn(n)):r--,new Se(n,r)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,r=1):r++,new Se(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Xa?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new $O(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let u="mu";n.ignoreCase&&(u+="i"),n.global&&(u+="g"),n=new RegExp(n.source,u)}let r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(n,a.buildReplaceString(null,c));let d=new x_(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=n.length;ss.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(o=>new je(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),r=this._editor.getSelection();for(let o=0,s=n.length;o{});var mq=M(()=>{pq()});var E0,gq=M(()=>{Ht();mq();Bre();e1();Dt();x0();_r();E0=class i extends Ds{constructor(e,t,n){super(),this._hideSoon=this._register(new ti(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let r={inputActiveOptionBorder:ga(U_),inputActiveOptionForeground:ga(j_),inputActiveOptionBackground:ga(W_)};this.caseSensitive=this._register(new AP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},r))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new LP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.ToggleWholeWordCommand),isChecked:this._state.wholeWord},r))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new MP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.ToggleRegexCommand),isChecked:this._state.isRegex},r))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let s=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,s=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,s=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,s=!0),!this._state.isRevealed&&s&&this._revealTemporarily()})),this._register(Rt(this._domNode,on.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(Rt(this._domNode,"mouseover",o=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};E0.ID="editor.contrib.findOptionsWidget"});function by(i,e){return i===1?!0:i===2?!1:e}var yy,vq=M(()=>{qt();Ce();qe();x0();yy=class extends oe{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return by(this._isRegexOverride,this._isRegex)}get wholeWord(){return by(this._wholeWordOverride,this._wholeWord)}get matchCase(){return by(this._matchCaseOverride,this._matchCase)}get preserveCase(){return by(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new $e),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),typeof n!="undefined"&&(P.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,t,n=!0){var r;let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},s=!1,a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(!((r=e.searchScope)===null||r===void 0)&&r.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(p=>!P.equalsRange(p,u))})||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),typeof e.isSearching!="undefined"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),typeof e.filters!="undefined"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(s=!0,o.isRegex=!0),l!==this.wholeWord&&(s=!0,o.wholeWord=!0),c!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Xa}}});var _q=M(()=>{});var bq=M(()=>{_q()});var Sme,wme,dE,Cy,yq=M(()=>{Ht();IP();zre();e1();or();qt();Ure();De();Sme=v("defaultLabel","input"),wme=v("label.preserveCaseToggle","Preserve Case"),dE=class extends ab{constructor(e){super({icon:lt.preserveCase,title:wme+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},Cy=class extends Ds{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new $e),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new $e),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new $e),this._onInput=this._register(new $e),this._onKeyUp=this._register(new $e),this._onPreserveCaseKeyDown=this._register(new $e),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||Sme;let o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new DP(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new dE(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let p=d.indexOf(document.activeElement);if(p>=0){let m=-1;h.equals(17)?m=(p+1)%d.length:h.equals(15)&&(p===0?m=d.length-1:m=p-1),h.equals(9)?(d[p].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),Qd.stop(h,!0)}}});let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}});function Eq(i,e){if(Sy.includes(e))throw new Error("Cannot register the same widget multiple times");Sy.push(e);let t=new ne,n=new nt(uE,!1).bindTo(i),r=new nt(wq,!0).bindTo(i),o=new nt(xq,!0).bindTo(i),s=()=>{n.set(!0),ac=e},a=()=>{n.set(!1),ac===e&&(ac=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(Ft(()=>{Sy.splice(Sy.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var Cq,Sq,Ey,uE,wq,xq,ac,Sy,wy,xy,hE=M(()=>{Wre();yq();ft();cw();De();Ce();Cq=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Sq=function(i,e){return function(t,n){e(t,n,i)}},Ey=new nt("suggestWidgetVisible",!1,v("suggestWidgetVisible","Whether suggestion are visible")),uE="historyNavigationWidgetFocus",wq="historyNavigationForwardsEnabled",xq="historyNavigationBackwardsEnabled",Sy=[];wy=class extends NP{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(Eq(o,this.inputBox))}};wy=Cq([Sq(3,Ke)],wy);xy=class extends Cy{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(Eq(s,this.inputBox))}};xy=Cq([Sq(3,Ke)],xy);Do.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ce.and(ce.has(uE),ce.equals(xq,!0),Ey.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{ac==null||ac.showPreviousValue()}});Do.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ce.and(ce.has(uE),ce.equals(wq,!0),Ey.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{ac==null||ac.showNextValue()}})});function fE(i){var e,t;return((e=i.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=i.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var Tq=M(()=>{});function Dq(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function Nq(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd{Ht();Lo();IP();Hw();e1();Dt();or();At();Ce();nr();Si();bq();qe();x0();De();hE();Tq();_r();Al();ar();qr();Ew();Li();rb();xme=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Eme=Ei("find-selection",lt.selection,v("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),kq=Ei("find-collapsed",lt.chevronRight,v("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Iq=Ei("find-expanded",lt.chevronDown,v("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Tme=Ei("find-replace",lt.replace,v("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),kme=Ei("find-replace-all",lt.replaceAll,v("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Ime=Ei("find-previous-match",lt.arrowUp,v("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Ame=Ei("find-next-match",lt.arrowDown,v("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Lme=v("label.find","Find"),Mme=v("placeholder.find","Find"),Dme=v("label.previousMatchButton","Previous Match"),Nme=v("label.nextMatchButton","Next Match"),Rme=v("label.toggleSelectionFind","Find in Selection"),Ome=v("label.closeButton","Close"),Pme=v("label.replace","Replace"),Fme=v("placeholder.replace","Replace"),Hme=v("label.replaceButton","Replace"),Bme=v("label.replaceAllButton","Replace All"),zme=v("label.toggleReplaceButton","Toggle Replace"),Ume=v("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Xa),Wme=v("label.matchesLocation","{0} of {1}"),Aq=v("label.noResults","No results"),Ja=419,jme=275,Vme=jme-54,T0=69,Kme=33,Lq="ctrlEnterReplaceAll.windows.donotask",Mq=zn?256:2048,k0=class{constructor(e){this.afterLineNumber=e,this.heightInPx=Kme,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};I0=class i extends Ds{constructor(e,t,n,r,o,s,a,l,c){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=n,this._contextViewProvider=r,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(Lq,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new No(500),this._register(Ft(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(88)&&(this._codeEditor.getOption(88)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(140)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(39)){let u=this._codeEditor.getOption(39).loop;this._state.change({loop:u},!1);let h=this._codeEditor.getOption(39).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new k0(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>xme(this,void 0,void 0,function*(){if(this._isVisible){let d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=ip.bindTo(s),this._findFocusTracker=this._register(Ts(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=_0.bindTo(s),this._replaceFocusTracker=this._register(Ts(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(39).addExtraSpaceOnTop&&(this._viewZone=new k0(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(88)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=la(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,at)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=T0+"px",this._state.matchesCount>=Xa?this._matchesCount.title=Ume:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Xa&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=Mo(Wme,n,t)}else e=Aq;this._matchesCount.appendChild(document.createTextNode(e)),Di(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),T0=Math.max(T0,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===Aq)return n===""?v("ariaSearchNoResultEmpty","{0} found",e):v("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=v("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${r}`:r}return v("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(88);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(39).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(39).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let r=wn(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);let l=cR(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(39).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(r=>{n.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new k0(0));let n=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===n.heightInPx)return;let s=o-n.heightInPx;n.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(81).top,o<=0)return;n.heightInPx=o,this._viewZoneId=r.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!sR(this._domNode))return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,r=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&la(this._domNode)>Ja){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=la(this._findInput.domNode);return}if(Ja+28+r>=n&&(s=!0),Ja+28+r-T0>=n&&(a=!0),Ja+28+r-T0>=n+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${n-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=la(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!P.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(Mq|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Dq(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return Nq(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(Mq|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Dc&&Nc&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(v("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Lq,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return Dq(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return Nq(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new wy(null,this._contextViewProvider,{width:Vme,label:Lme,placeholder:Mme,appendCaseSensitiveLabel:this._keybindingLabelFor(Gt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Gt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Gt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>fE(this._keybindingService),inputBoxStyles:Nw,toggleStyles:Dw},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),GN&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new bd({label:Dme+this._keybindingLabelFor(Gt.PreviousMatchFindAction),icon:Ime,onTrigger:()=>{Rc(this._codeEditor.getAction(Gt.PreviousMatchFindAction)).run().then(void 0,at)}})),this._nextBtn=this._register(new bd({label:Nme+this._keybindingLabelFor(Gt.NextMatchFindAction),icon:Ame,onTrigger:()=>{Rc(this._codeEditor.getAction(Gt.NextMatchFindAction)).run().then(void 0,at)}}));let n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);let r=document.createElement("div");r.className="find-actions",n.appendChild(r),r.appendChild(this._matchesCount),r.appendChild(this._prevBtn.domNode),r.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new ab({icon:Eme,title:Rme+this._keybindingLabelFor(Gt.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:ga(W_),inputActiveOptionBorder:ga(U_),inputActiveOptionForeground:ga(j_)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),r.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new bd({label:Ome+this._keybindingLabelFor(Gt.CloseFindWidgetCommand),icon:lb,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),r.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new xy(null,void 0,{label:Pme,placeholder:Fme,appendPreserveCaseLabel:this._keybindingLabelFor(Gt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>fE(this._keybindingService),inputBoxStyles:Nw,toggleStyles:Dw},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new bd({label:Hme+this._keybindingLabelFor(Gt.ReplaceOneAction),icon:Tme,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new bd({label:Bme+this._keybindingLabelFor(Gt.ReplaceAllAction),icon:kme,onTrigger:()=>{this._controller.replaceAll()}}));let o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);let s=document.createElement("div");s.className="replace-actions",o.appendChild(s),s.appendChild(this._replaceBtn.domNode),s.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new bd({label:zme,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=la(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${Ja}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(o),this._resizeSash=new Il(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=Ja;this._register(this._resizeSash.onDidStart(()=>{a=la(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(cd||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=la(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=la(this._domNode);if(l{this._opts.onTrigger(),n.preventDefault()}),this.onkeydown(this._domNode,n=>{var r,o;if(n.equals(10)||n.equals(3)){this._opts.onTrigger(),n.preventDefault();return}(o=(r=this._opts).onKeyDown)===null||o===void 0||o.call(r,n)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...mt.asClassNameArray(kq)),this._domNode.classList.add(...mt.asClassNameArray(Iq))):(this._domNode.classList.remove(...mt.asClassNameArray(Iq)),this._domNode.classList.add(...mt.asClassNameArray(kq)))}};df((i,e)=>{let t=(g,b)=>{b&&e.addRule(`.monaco-editor ${g} { background-color: ${b}; }`)};t(".findMatch",i.getColor(DO)),t(".currentFindMatch",i.getColor(MO)),t(".findScope",i.getColor(NO));let n=i.getColor(xl);t(".find-widget",n);let r=i.getColor(B_);r&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${r}; }`);let o=i.getColor(z_);o&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${o}; border-right: 1px solid ${o}; border-bottom: 1px solid ${o}; }`);let s=i.getColor(OO);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${su(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(RO);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(PO);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${su(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(as);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(IO);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let u=i.getColor(_O);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);let h=i.getColor(AO);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{let g=i.getColor(ou);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}let p=i.getColor(KO);p&&e.addRule(` +`)&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){let n=this.pos;t.dropParsedChunk.call(this);let r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}};mU.exports=bx});var wx=gt((k8e,vU)=>{"use strict";var gU=Ra(),Cx=N1(),Tle=yx(),Sx=class extends gU{constructor(e){super(e),this.tokenizer=e,this.posTracker=gU.install(e.preprocessor,Tle),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;let e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){let n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(r){t._createDoctypeToken.call(this,r),this.currentToken.location=e.ctLoc},_createCharacterToken(r,o){t._createCharacterToken.call(this,r,o),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(r){t._createAttr.call(this,r),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(r){t._leaveAttrName.call(this,r),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(r){t._leaveAttrValue.call(this,r),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){let r=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=r.startLine,this.currentCharacterToken.location.endCol=r.startCol,this.currentCharacterToken.location.endOffset=r.startOffset),this.currentToken.type===Cx.EOF_TOKEN?(r.endLine=r.startLine,r.endCol=r.startCol,r.endOffset=r.startOffset):(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col+1,r.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){let r=this.currentCharacterToken&&this.currentCharacterToken.location;r&&r.endOffset===-1&&(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col,r.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(Cx.MODE).forEach(r=>{let o=Cx.MODE[r];n[o]=function(s){e.ctLoc=e._getCurrentLocation(),t[o].call(this,s)}}),n}};vU.exports=Sx});var bU=gt((I8e,_U)=>{"use strict";var kle=Ra(),xx=class extends kle{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let n=this.stackTop;n>0;n--)e.onItemPop(this.items[n]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}};_U.exports=xx});var SU=gt((A8e,CU)=>{"use strict";var Ex=Ra(),yU=N1(),Ile=wx(),Ale=bU(),Lle=bu(),Tx=Lle.TAG_NAMES,kx=class extends Ex{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,o=this.treeAdapter.getTagName(e),s=t.type===yU.END_TAG_TOKEN&&o===t.tagName,a={};s?(a.endTag=Object.assign({},r),a.endLine=r.endLine,a.endCol=r.endCol,a.endOffset=r.endOffset):(a.endLine=r.startLine,a.endCol=r.startCol,a.endOffset=r.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;let o=Ex.install(this.tokenizer,Ile);e.posTracker=o.posTracker,Ex.install(this.openElements,Ale,{onItemPop:function(s){e._setEndLocation(s,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let r=this.openElements.stackTop;r>=0;r--)e._setEndLocation(this.openElements.items[r],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===yU.END_TAG_TOKEN&&(n.tagName===Tx.HTML||n.tagName===Tx.BODY&&this.openElements.hasInScope(Tx.BODY)))for(let o=this.openElements.stackTop;o>=0;o--){let s=this.openElements.items[o];if(this.treeAdapter.getTagName(s)===n.tagName){e._setEndLocation(s,n);break}}},_setDocumentType(n){t._setDocumentType.call(this,n);let r=this.treeAdapter.getChildNodes(this.document),o=r.length;for(let s=0;s{"use strict";var Mle=Ra(),Ix=class extends Mle{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){let t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}};wU.exports=Ix});var EU=gt((M8e,xU)=>{"use strict";var Dle=I5(),Nle=yx(),Rle=Ra(),Ax=class extends Dle{constructor(e,t){super(e,t),this.posTracker=Rle.install(e,Nle),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}};xU.exports=Ax});var kU=gt((D8e,TU)=>{"use strict";var Ole=I5(),Ple=EU(),Fle=Ra(),Lx=class extends Ole{constructor(e,t){super(e,t);let n=Fle.install(e.preprocessor,Ple,t);this.posTracker=n.posTracker}};TU.exports=Lx});var LU=gt((N8e,AU)=>{"use strict";var Hle=I5(),Ble=kU(),zle=wx(),IU=Ra(),Mx=class extends Hle{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),IU.install(this.tokenizer,Ble,e.opts),IU.install(this.tokenizer,zle)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(n,r){e.locBeforeToken=r&&r.beforeToken,e._reportError(n)}}}};AU.exports=Mx});var NU=gt(si=>{"use strict";var{DOCUMENT_MODE:Ule}=bu();si.createDocument=function(){return{nodeName:"#document",mode:Ule.NO_QUIRKS,childNodes:[]}};si.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};si.createElement=function(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}};si.createCommentNode=function(i){return{nodeName:"#comment",data:i,parentNode:null}};var MU=function(i){return{nodeName:"#text",value:i,parentNode:null}},DU=si.appendChild=function(i,e){i.childNodes.push(e),e.parentNode=i},Wle=si.insertBefore=function(i,e,t){let n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i};si.setTemplateContent=function(i,e){i.content=e};si.getTemplateContent=function(i){return i.content};si.setDocumentType=function(i,e,t,n){let r=null;for(let o=0;o{"use strict";RU.exports=function(e,t){return t=t||Object.create(null),[e,t].reduce((n,r)=>(Object.keys(r).forEach(o=>{n[o]=r[o]}),n),Object.create(null))}});var UU=gt(A5=>{"use strict";var{DOCUMENT_MODE:Df}=bu(),HU="html",jle="about:legacy-compat",Vle="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",BU=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Kle=BU.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),qle=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],zU=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Gle=zU.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function PU(i){let e=i.indexOf('"')!==-1?"'":'"';return e+i+e}function FU(i,e){for(let t=0;t-1)return Df.QUIRKS;let n=e===null?Kle:BU;if(FU(t,n))return Df.QUIRKS;if(n=e===null?zU:Gle,FU(t,n))return Df.LIMITED_QUIRKS}return Df.NO_QUIRKS};A5.serializeContent=function(i,e,t){let n="!DOCTYPE ";return i&&(n+=i),e?n+=" PUBLIC "+PU(e):t&&(n+=" SYSTEM"),t!==null&&(n+=" "+PU(t)),n}});var jU=gt(sd=>{"use strict";var Dx=N1(),Nx=bu(),pt=Nx.TAG_NAMES,Sr=Nx.NAMESPACES,L5=Nx.ATTRS,WU={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},$le="definitionurl",Yle="definitionURL",Xle={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Qle={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:Sr.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:Sr.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:Sr.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:Sr.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:Sr.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:Sr.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:Sr.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:Sr.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:Sr.XML},"xml:space":{prefix:"xml",name:"space",namespace:Sr.XML},xmlns:{prefix:"",name:"xmlns",namespace:Sr.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:Sr.XMLNS}},Jle=sd.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Zle={[pt.B]:!0,[pt.BIG]:!0,[pt.BLOCKQUOTE]:!0,[pt.BODY]:!0,[pt.BR]:!0,[pt.CENTER]:!0,[pt.CODE]:!0,[pt.DD]:!0,[pt.DIV]:!0,[pt.DL]:!0,[pt.DT]:!0,[pt.EM]:!0,[pt.EMBED]:!0,[pt.H1]:!0,[pt.H2]:!0,[pt.H3]:!0,[pt.H4]:!0,[pt.H5]:!0,[pt.H6]:!0,[pt.HEAD]:!0,[pt.HR]:!0,[pt.I]:!0,[pt.IMG]:!0,[pt.LI]:!0,[pt.LISTING]:!0,[pt.MENU]:!0,[pt.META]:!0,[pt.NOBR]:!0,[pt.OL]:!0,[pt.P]:!0,[pt.PRE]:!0,[pt.RUBY]:!0,[pt.S]:!0,[pt.SMALL]:!0,[pt.SPAN]:!0,[pt.STRONG]:!0,[pt.STRIKE]:!0,[pt.SUB]:!0,[pt.SUP]:!0,[pt.TABLE]:!0,[pt.TT]:!0,[pt.U]:!0,[pt.UL]:!0,[pt.VAR]:!0};sd.causesExit=function(i){let e=i.tagName;return e===pt.FONT&&(Dx.getTokenAttr(i,L5.COLOR)!==null||Dx.getTokenAttr(i,L5.SIZE)!==null||Dx.getTokenAttr(i,L5.FACE)!==null)?!0:Zle[e]};sd.adjustTokenMathMLAttrs=function(i){for(let e=0;e{"use strict";var q=N1(),ice=uU(),VU=fU(),nce=SU(),rce=LU(),KU=Ra(),oce=NU(),sce=OU(),qU=UU(),Oa=jU(),wr=f5(),ace=h5(),Cu=bu(),T=Cu.TAG_NAMES,tt=Cu.NAMESPACES,iW=Cu.ATTRS,lce={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:oce},nW="hidden",cce=8,dce=3,rW="INITIAL_MODE",Ox="BEFORE_HTML_MODE",H5="BEFORE_HEAD_MODE",Of="IN_HEAD_MODE",oW="IN_HEAD_NO_SCRIPT_MODE",B5="AFTER_HEAD_MODE",Pa="IN_BODY_MODE",R5="TEXT_MODE",Br="IN_TABLE_MODE",sW="IN_TABLE_TEXT_MODE",z5="IN_CAPTION_MODE",j1="IN_COLUMN_GROUP_MODE",ms="IN_TABLE_BODY_MODE",Vl="IN_ROW_MODE",U5="IN_CELL_MODE",Px="IN_SELECT_MODE",Fx="IN_SELECT_IN_TABLE_MODE",O5="IN_TEMPLATE_MODE",Hx="AFTER_BODY_MODE",W5="IN_FRAMESET_MODE",aW="AFTER_FRAMESET_MODE",lW="AFTER_AFTER_BODY_MODE",cW="AFTER_AFTER_FRAMESET_MODE",uce={[T.TR]:Vl,[T.TBODY]:ms,[T.THEAD]:ms,[T.TFOOT]:ms,[T.CAPTION]:z5,[T.COLGROUP]:j1,[T.TABLE]:Br,[T.BODY]:Pa,[T.FRAMESET]:W5},hce={[T.CAPTION]:Br,[T.COLGROUP]:Br,[T.TBODY]:Br,[T.TFOOT]:Br,[T.THEAD]:Br,[T.COL]:j1,[T.TR]:ms,[T.TD]:Vl,[T.TH]:Vl},GU={[rW]:{[q.CHARACTER_TOKEN]:P1,[q.NULL_CHARACTER_TOKEN]:P1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:yce,[q.START_TAG_TOKEN]:P1,[q.END_TAG_TOKEN]:P1,[q.EOF_TOKEN]:P1},[Ox]:{[q.CHARACTER_TOKEN]:H1,[q.NULL_CHARACTER_TOKEN]:H1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Cce,[q.END_TAG_TOKEN]:Sce,[q.EOF_TOKEN]:H1},[H5]:{[q.CHARACTER_TOKEN]:B1,[q.NULL_CHARACTER_TOKEN]:B1,[q.WHITESPACE_CHARACTER_TOKEN]:ei,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:wce,[q.END_TAG_TOKEN]:xce,[q.EOF_TOKEN]:B1},[Of]:{[q.CHARACTER_TOKEN]:z1,[q.NULL_CHARACTER_TOKEN]:z1,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:cr,[q.END_TAG_TOKEN]:Su,[q.EOF_TOKEN]:z1},[oW]:{[q.CHARACTER_TOKEN]:U1,[q.NULL_CHARACTER_TOKEN]:U1,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:Ece,[q.END_TAG_TOKEN]:Tce,[q.EOF_TOKEN]:U1},[B5]:{[q.CHARACTER_TOKEN]:W1,[q.NULL_CHARACTER_TOKEN]:W1,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:M5,[q.START_TAG_TOKEN]:kce,[q.END_TAG_TOKEN]:Ice,[q.EOF_TOKEN]:W1},[Pa]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:go,[q.END_TAG_TOKEN]:Bx,[q.EOF_TOKEN]:Wl},[R5]:{[q.CHARACTER_TOKEN]:mo,[q.NULL_CHARACTER_TOKEN]:mo,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:ei,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:ei,[q.END_TAG_TOKEN]:ode,[q.EOF_TOKEN]:sde},[Br]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:zx,[q.END_TAG_TOKEN]:Ux,[q.EOF_TOKEN]:Wl},[sW]:{[q.CHARACTER_TOKEN]:gde,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mde,[q.COMMENT_TOKEN]:F1,[q.DOCTYPE_TOKEN]:F1,[q.START_TAG_TOKEN]:F1,[q.END_TAG_TOKEN]:F1,[q.EOF_TOKEN]:F1},[z5]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:vde,[q.END_TAG_TOKEN]:_de,[q.EOF_TOKEN]:Wl},[j1]:{[q.CHARACTER_TOKEN]:P5,[q.NULL_CHARACTER_TOKEN]:P5,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:bde,[q.END_TAG_TOKEN]:yde,[q.EOF_TOKEN]:Wl},[ms]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Cde,[q.END_TAG_TOKEN]:Sde,[q.EOF_TOKEN]:Wl},[Vl]:{[q.CHARACTER_TOKEN]:jl,[q.NULL_CHARACTER_TOKEN]:jl,[q.WHITESPACE_CHARACTER_TOKEN]:jl,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:wde,[q.END_TAG_TOKEN]:xde,[q.EOF_TOKEN]:Wl},[U5]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ede,[q.END_TAG_TOKEN]:Tde,[q.EOF_TOKEN]:Wl},[Px]:{[q.CHARACTER_TOKEN]:mo,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:dW,[q.END_TAG_TOKEN]:uW,[q.EOF_TOKEN]:Wl},[Fx]:{[q.CHARACTER_TOKEN]:mo,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:kde,[q.END_TAG_TOKEN]:Ide,[q.EOF_TOKEN]:Wl},[O5]:{[q.CHARACTER_TOKEN]:D5,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ade,[q.END_TAG_TOKEN]:Lde,[q.EOF_TOKEN]:hW},[Hx]:{[q.CHARACTER_TOKEN]:F5,[q.NULL_CHARACTER_TOKEN]:F5,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:bce,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Mde,[q.END_TAG_TOKEN]:Dde,[q.EOF_TOKEN]:O1},[W5]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Nde,[q.END_TAG_TOKEN]:Rde,[q.EOF_TOKEN]:O1},[aW]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:mo,[q.COMMENT_TOKEN]:$n,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Ode,[q.END_TAG_TOKEN]:Pde,[q.EOF_TOKEN]:O1},[lW]:{[q.CHARACTER_TOKEN]:N5,[q.NULL_CHARACTER_TOKEN]:N5,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$U,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Fde,[q.END_TAG_TOKEN]:N5,[q.EOF_TOKEN]:O1},[cW]:{[q.CHARACTER_TOKEN]:ei,[q.NULL_CHARACTER_TOKEN]:ei,[q.WHITESPACE_CHARACTER_TOKEN]:yu,[q.COMMENT_TOKEN]:$U,[q.DOCTYPE_TOKEN]:ei,[q.START_TAG_TOKEN]:Hde,[q.END_TAG_TOKEN]:ei,[q.EOF_TOKEN]:O1}},Rx=class{constructor(e){this.options=sce(lce,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&KU.install(this,nce),this.options.onParseError&&KU.install(this,rce,{onParseError:this.options.onParseError})}parse(e){let t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(T.TEMPLATE,tt.HTML,[]));let n=this.treeAdapter.createElement("documentmock",tt.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===T.TEMPLATE&&this._pushTmplInsertionMode(O5),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);let r=this.treeAdapter.getFirstChild(n),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,o),o}_bootstrap(e,t){this.tokenizer=new q(this.options),this.stopped=!1,this.insertionMode=rW,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new ice(this.document,this.treeAdapter),this.activeFormattingElements=new VU(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();let t=this.tokenizer.getNextToken();if(t.type===q.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===q.WHITESPACE_CHARACTER_TOKEN&&t.chars[0]===` +`)){if(t.chars.length===1)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){let n=this.pendingScript;this.pendingScript=null,t(n);return}e&&e()}_setupTokenizerCDATAMode(){let e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==tt.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,tt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=R5}switchToPlaintextParsing(){this.insertionMode=R5,this.originalInsertionMode=Pa,this.tokenizer.state=q.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===T.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===tt.HTML){let e=this.treeAdapter.getTagName(this.fragmentContext);e===T.TITLE||e===T.TEXTAREA?this.tokenizer.state=q.MODE.RCDATA:e===T.STYLE||e===T.XMP||e===T.IFRAME||e===T.NOEMBED||e===T.NOFRAMES||e===T.NOSCRIPT?this.tokenizer.state=q.MODE.RAWTEXT:e===T.SCRIPT?this.tokenizer.state=q.MODE.SCRIPT_DATA:e===T.PLAINTEXT&&(this.tokenizer.state=q.MODE.PLAINTEXT)}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){let t=this.treeAdapter.createElement(e,tt.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,tt.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(T.HTML,tt.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){let t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;let n=this.treeAdapter.getNamespaceURI(t);if(n===tt.HTML||this.treeAdapter.getTagName(t)===T.ANNOTATION_XML&&n===tt.MATHML&&e.type===q.START_TAG_TOKEN&&e.tagName===T.SVG)return!1;let r=e.type===q.CHARACTER_TOKEN||e.type===q.NULL_CHARACTER_TOKEN||e.type===q.WHITESPACE_CHARACTER_TOKEN;return(e.type===q.START_TAG_TOKEN&&e.tagName!==T.MGLYPH&&e.tagName!==T.MALIGNMARK||r)&&this._isIntegrationPoint(t,tt.MATHML)||(e.type===q.START_TAG_TOKEN||r)&&this._isIntegrationPoint(t,tt.HTML)?!1:e.type!==q.EOF_TOKEN}_processToken(e){GU[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){GU[Pa][e.type](this,e)}_processTokenInForeignContent(e){e.type===q.CHARACTER_TOKEN?zde(this,e):e.type===q.NULL_CHARACTER_TOKEN?Bde(this,e):e.type===q.WHITESPACE_CHARACTER_TOKEN?mo(this,e):e.type===q.COMMENT_TOKEN?$n(this,e):e.type===q.START_TAG_TOKEN?Ude(this,e):e.type===q.END_TAG_TOKEN&&Wde(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===q.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(wr.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){let n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),o=this.treeAdapter.getAttrList(e);return Oa.isIntegrationPoint(n,r,o,t)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.length;if(e){let t=e,n=null;do if(t--,n=this.activeFormattingElements.entries[t],n.type===VU.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}while(t>0);for(let r=t;r=0;e--){let n=this.openElements.items[e];e===0&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));let r=this.treeAdapter.getTagName(n),o=uce[r];if(o){this.insertionMode=o;break}else if(!t&&(r===T.TD||r===T.TH)){this.insertionMode=U5;break}else if(!t&&r===T.HEAD){this.insertionMode=Of;break}else if(r===T.SELECT){this._resetInsertionModeForSelect(e);break}else if(r===T.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(r===T.HTML){this.insertionMode=this.headElement?B5:H5;break}else if(t){this.insertionMode=Pa;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n);if(r===T.TEMPLATE)break;if(r===T.TABLE){this.insertionMode=Fx;return}}this.insertionMode=Px}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){let t=this.treeAdapter.getTagName(e);return t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){let e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),o=this.treeAdapter.getNamespaceURI(n);if(r===T.TEMPLATE&&o===tt.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}else if(r===T.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){let t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return Cu.SPECIAL_ELEMENTS[n][t]}};fW.exports=Rx;function fce(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagName)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):zs(i,e),t}function pce(i,e){let t=null;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n];if(r===e.element)break;i._isSpecialElement(r)&&(t=r)}return t||(i.openElements.popUntilElementPopped(e.element),i.activeFormattingElements.removeEntry(e)),t}function mce(i,e,t){let n=e,r=i.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==t;o++,s=r){r=i.openElements.getCommonAncestor(s);let a=i.activeFormattingElements.getElementEntry(s),l=a&&o>=dce;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=gce(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(s,n),n=s)}return n}function gce(i,e){let t=i.treeAdapter.getNamespaceURI(e.element),n=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,n),e.element=n,n}function vce(i,e,t){if(i._isElementCausesFosterParenting(e))i._fosterParentElement(t);else{let n=i.treeAdapter.getTagName(e),r=i.treeAdapter.getNamespaceURI(e);n===T.TEMPLATE&&r===tt.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function _ce(i,e,t){let n=i.treeAdapter.getNamespaceURI(t.element),r=t.token,o=i.treeAdapter.createElement(r.tagName,n,r.attrs);i._adoptNodes(e,o),i.treeAdapter.appendChild(e,o),i.activeFormattingElements.insertElementAfterBookmark(o,t.token),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,o)}function ld(i,e){let t;for(let n=0;n0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagName!==T.TEMPLATE&&i._err(wr.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(T.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode()):i._err(wr.endTagWithoutMatchingOpenElement)}function z1(i,e){i.openElements.pop(),i.insertionMode=B5,i._processToken(e)}function Ece(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.BASEFONT||t===T.BGSOUND||t===T.HEAD||t===T.LINK||t===T.META||t===T.NOFRAMES||t===T.STYLE?cr(i,e):t===T.NOSCRIPT?i._err(wr.nestedNoscriptInHead):U1(i,e)}function Tce(i,e){let t=e.tagName;t===T.NOSCRIPT?(i.openElements.pop(),i.insertionMode=Of):t===T.BR?U1(i,e):i._err(wr.endTagWithoutMatchingOpenElement)}function U1(i,e){let t=e.type===q.EOF_TOKEN?wr.openElementsLeftAfterEof:wr.disallowedContentInNoscriptInHead;i._err(t),i.openElements.pop(),i.insertionMode=Of,i._processToken(e)}function kce(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.BODY?(i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode=Pa):t===T.FRAMESET?(i._insertElement(e,tt.HTML),i.insertionMode=W5):t===T.BASE||t===T.BASEFONT||t===T.BGSOUND||t===T.LINK||t===T.META||t===T.NOFRAMES||t===T.SCRIPT||t===T.STYLE||t===T.TEMPLATE||t===T.TITLE?(i._err(wr.abandonedHeadElementChild),i.openElements.push(i.headElement),cr(i,e),i.openElements.remove(i.headElement)):t===T.HEAD?i._err(wr.misplacedStartTagForHeadElement):W1(i,e)}function Ice(i,e){let t=e.tagName;t===T.BODY||t===T.HTML||t===T.BR?W1(i,e):t===T.TEMPLATE?Su(i,e):i._err(wr.endTagWithoutMatchingOpenElement)}function W1(i,e){i._insertFakeElement(T.BODY),i.insertionMode=Pa,i._processToken(e)}function yu(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function D5(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function Ace(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function Lce(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function Mce(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,tt.HTML),i.insertionMode=W5)}function Ul(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Dce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement();let t=i.openElements.currentTagName;(t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6)&&i.openElements.pop(),i._insertElement(e,tt.HTML)}function YU(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function Nce(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),t||(i.formElement=i.openElements.current))}function Rce(i,e){i.framesetOk=!1;let t=e.tagName;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n],o=i.treeAdapter.getTagName(r),s=null;if(t===T.LI&&o===T.LI?s=T.LI:(t===T.DD||t===T.DT)&&(o===T.DD||o===T.DT)&&(s=o),s){i.openElements.generateImpliedEndTagsWithExclusion(s),i.openElements.popUntilTagNamePopped(s);break}if(o!==T.ADDRESS&&o!==T.DIV&&o!==T.P&&i._isSpecialElement(r))break}i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Oce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.tokenizer.state=q.MODE.PLAINTEXT}function Pce(i,e){i.openElements.hasInScope(T.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(T.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.framesetOk=!1}function Fce(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(T.A);t&&(ld(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function Nf(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function Hce(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(T.NOBR)&&(ld(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,tt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function XU(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function Bce(i,e){i.treeAdapter.getDocumentMode(i.document)!==Cu.DOCUMENT_MODE.QUIRKS&&i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode=Br}function Rf(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,tt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function zce(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,tt.HTML);let t=q.getTokenAttr(e,iW.TYPE);(!t||t.toLowerCase()!==nW)&&(i.framesetOk=!1),e.ackSelfClosing=!0}function QU(i,e){i._appendElement(e,tt.HTML),e.ackSelfClosing=!0}function Uce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._appendElement(e,tt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function Wce(i,e){e.tagName=T.IMG,Rf(i,e)}function jce(i,e){i._insertElement(e,tt.HTML),i.skipNextNewLine=!0,i.tokenizer.state=q.MODE.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=R5}function Vce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,q.MODE.RAWTEXT)}function Kce(i,e){i.framesetOk=!1,i._switchToTextParsing(e,q.MODE.RAWTEXT)}function JU(i,e){i._switchToTextParsing(e,q.MODE.RAWTEXT)}function qce(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML),i.framesetOk=!1,i.insertionMode===Br||i.insertionMode===z5||i.insertionMode===ms||i.insertionMode===Vl||i.insertionMode===U5?i.insertionMode=Fx:i.insertionMode=Px}function ZU(i,e){i.openElements.currentTagName===T.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML)}function eW(i,e){i.openElements.hasInScope(T.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,tt.HTML)}function Gce(i,e){i.openElements.hasInScope(T.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(T.RTC),i._insertElement(e,tt.HTML)}function $ce(i,e){i.openElements.hasInButtonScope(T.P)&&i._closePElement(),i._insertElement(e,tt.HTML)}function Yce(i,e){i._reconstructActiveFormattingElements(),Oa.adjustTokenMathMLAttrs(e),Oa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,tt.MATHML):i._insertElement(e,tt.MATHML),e.ackSelfClosing=!0}function Xce(i,e){i._reconstructActiveFormattingElements(),Oa.adjustTokenSVGAttrs(e),Oa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,tt.SVG):i._insertElement(e,tt.SVG),e.ackSelfClosing=!0}function fs(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,tt.HTML)}function go(i,e){let t=e.tagName;switch(t.length){case 1:t===T.I||t===T.S||t===T.B||t===T.U?Nf(i,e):t===T.P?Ul(i,e):t===T.A?Fce(i,e):fs(i,e);break;case 2:t===T.DL||t===T.OL||t===T.UL?Ul(i,e):t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6?Dce(i,e):t===T.LI||t===T.DD||t===T.DT?Rce(i,e):t===T.EM||t===T.TT?Nf(i,e):t===T.BR?Rf(i,e):t===T.HR?Uce(i,e):t===T.RB?eW(i,e):t===T.RT||t===T.RP?Gce(i,e):t!==T.TH&&t!==T.TD&&t!==T.TR&&fs(i,e);break;case 3:t===T.DIV||t===T.DIR||t===T.NAV?Ul(i,e):t===T.PRE?YU(i,e):t===T.BIG?Nf(i,e):t===T.IMG||t===T.WBR?Rf(i,e):t===T.XMP?Vce(i,e):t===T.SVG?Xce(i,e):t===T.RTC?eW(i,e):t!==T.COL&&fs(i,e);break;case 4:t===T.HTML?Ace(i,e):t===T.BASE||t===T.LINK||t===T.META?cr(i,e):t===T.BODY?Lce(i,e):t===T.MAIN||t===T.MENU?Ul(i,e):t===T.FORM?Nce(i,e):t===T.CODE||t===T.FONT?Nf(i,e):t===T.NOBR?Hce(i,e):t===T.AREA?Rf(i,e):t===T.MATH?Yce(i,e):t===T.MENU?$ce(i,e):t!==T.HEAD&&fs(i,e);break;case 5:t===T.STYLE||t===T.TITLE?cr(i,e):t===T.ASIDE?Ul(i,e):t===T.SMALL?Nf(i,e):t===T.TABLE?Bce(i,e):t===T.EMBED?Rf(i,e):t===T.INPUT?zce(i,e):t===T.PARAM||t===T.TRACK?QU(i,e):t===T.IMAGE?Wce(i,e):t!==T.FRAME&&t!==T.TBODY&&t!==T.TFOOT&&t!==T.THEAD&&fs(i,e);break;case 6:t===T.SCRIPT?cr(i,e):t===T.CENTER||t===T.FIGURE||t===T.FOOTER||t===T.HEADER||t===T.HGROUP||t===T.DIALOG?Ul(i,e):t===T.BUTTON?Pce(i,e):t===T.STRIKE||t===T.STRONG?Nf(i,e):t===T.APPLET||t===T.OBJECT?XU(i,e):t===T.KEYGEN?Rf(i,e):t===T.SOURCE?QU(i,e):t===T.IFRAME?Kce(i,e):t===T.SELECT?qce(i,e):t===T.OPTION?ZU(i,e):fs(i,e);break;case 7:t===T.BGSOUND?cr(i,e):t===T.DETAILS||t===T.ADDRESS||t===T.ARTICLE||t===T.SECTION||t===T.SUMMARY?Ul(i,e):t===T.LISTING?YU(i,e):t===T.MARQUEE?XU(i,e):t===T.NOEMBED?JU(i,e):t!==T.CAPTION&&fs(i,e);break;case 8:t===T.BASEFONT?cr(i,e):t===T.FRAMESET?Mce(i,e):t===T.FIELDSET?Ul(i,e):t===T.TEXTAREA?jce(i,e):t===T.TEMPLATE?cr(i,e):t===T.NOSCRIPT?i.options.scriptingEnabled?JU(i,e):fs(i,e):t===T.OPTGROUP?ZU(i,e):t!==T.COLGROUP&&fs(i,e);break;case 9:t===T.PLAINTEXT?Oce(i,e):fs(i,e);break;case 10:t===T.BLOCKQUOTE||t===T.FIGCAPTION?Ul(i,e):fs(i,e);break;default:fs(i,e)}}function Qce(i){i.openElements.hasInScope(T.BODY)&&(i.insertionMode=Hx)}function Jce(i,e){i.openElements.hasInScope(T.BODY)&&(i.insertionMode=Hx,i._processToken(e))}function ad(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function Zce(i){let e=i.openElements.tmplCount>0,t=i.formElement;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(T.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(T.FORM):i.openElements.remove(t))}function ede(i){i.openElements.hasInButtonScope(T.P)||i._insertFakeElement(T.P),i._closePElement()}function tde(i){i.openElements.hasInListItemScope(T.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(T.LI),i.openElements.popUntilTagNamePopped(T.LI))}function ide(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function nde(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function tW(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function rde(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(T.BR),i.openElements.pop(),i.framesetOk=!1}function zs(i,e){let t=e.tagName;for(let n=i.openElements.stackTop;n>0;n--){let r=i.openElements.items[n];if(i.treeAdapter.getTagName(r)===t){i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilElementPopped(r);break}if(i._isSpecialElement(r))break}}function Bx(i,e){let t=e.tagName;switch(t.length){case 1:t===T.A||t===T.B||t===T.I||t===T.S||t===T.U?ld(i,e):t===T.P?ede(i,e):zs(i,e);break;case 2:t===T.DL||t===T.UL||t===T.OL?ad(i,e):t===T.LI?tde(i,e):t===T.DD||t===T.DT?ide(i,e):t===T.H1||t===T.H2||t===T.H3||t===T.H4||t===T.H5||t===T.H6?nde(i,e):t===T.BR?rde(i,e):t===T.EM||t===T.TT?ld(i,e):zs(i,e);break;case 3:t===T.BIG?ld(i,e):t===T.DIR||t===T.DIV||t===T.NAV||t===T.PRE?ad(i,e):zs(i,e);break;case 4:t===T.BODY?Qce(i,e):t===T.HTML?Jce(i,e):t===T.FORM?Zce(i,e):t===T.CODE||t===T.FONT||t===T.NOBR?ld(i,e):t===T.MAIN||t===T.MENU?ad(i,e):zs(i,e);break;case 5:t===T.ASIDE?ad(i,e):t===T.SMALL?ld(i,e):zs(i,e);break;case 6:t===T.CENTER||t===T.FIGURE||t===T.FOOTER||t===T.HEADER||t===T.HGROUP||t===T.DIALOG?ad(i,e):t===T.APPLET||t===T.OBJECT?tW(i,e):t===T.STRIKE||t===T.STRONG?ld(i,e):zs(i,e);break;case 7:t===T.ADDRESS||t===T.ARTICLE||t===T.DETAILS||t===T.SECTION||t===T.SUMMARY||t===T.LISTING?ad(i,e):t===T.MARQUEE?tW(i,e):zs(i,e);break;case 8:t===T.FIELDSET?ad(i,e):t===T.TEMPLATE?Su(i,e):zs(i,e);break;case 10:t===T.BLOCKQUOTE||t===T.FIGCAPTION?ad(i,e):zs(i,e);break;default:zs(i,e)}}function Wl(i,e){i.tmplInsertionModeStackTop>-1?hW(i,e):i.stopped=!0}function ode(i,e){e.tagName===T.SCRIPT&&(i.pendingScript=i.openElements.current),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function sde(i,e){i._err(wr.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i._processToken(e)}function jl(i,e){let t=i.openElements.currentTagName;t===T.TABLE||t===T.TBODY||t===T.TFOOT||t===T.THEAD||t===T.TR?(i.pendingCharacterTokens=[],i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=sW,i._processToken(e)):ps(i,e)}function ade(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,tt.HTML),i.insertionMode=z5}function lde(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,tt.HTML),i.insertionMode=j1}function cde(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(T.COLGROUP),i.insertionMode=j1,i._processToken(e)}function dde(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,tt.HTML),i.insertionMode=ms}function ude(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(T.TBODY),i.insertionMode=ms,i._processToken(e)}function hde(i,e){i.openElements.hasInTableScope(T.TABLE)&&(i.openElements.popUntilTagNamePopped(T.TABLE),i._resetInsertionMode(),i._processToken(e))}function fde(i,e){let t=q.getTokenAttr(e,iW.TYPE);t&&t.toLowerCase()===nW?i._appendElement(e,tt.HTML):ps(i,e),e.ackSelfClosing=!0}function pde(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,tt.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function zx(i,e){let t=e.tagName;switch(t.length){case 2:t===T.TD||t===T.TH||t===T.TR?ude(i,e):ps(i,e);break;case 3:t===T.COL?cde(i,e):ps(i,e);break;case 4:t===T.FORM?pde(i,e):ps(i,e);break;case 5:t===T.TABLE?hde(i,e):t===T.STYLE?cr(i,e):t===T.TBODY||t===T.TFOOT||t===T.THEAD?dde(i,e):t===T.INPUT?fde(i,e):ps(i,e);break;case 6:t===T.SCRIPT?cr(i,e):ps(i,e);break;case 7:t===T.CAPTION?ade(i,e):ps(i,e);break;case 8:t===T.COLGROUP?lde(i,e):t===T.TEMPLATE?cr(i,e):ps(i,e);break;default:ps(i,e)}}function Ux(i,e){let t=e.tagName;t===T.TABLE?i.openElements.hasInTableScope(T.TABLE)&&(i.openElements.popUntilTagNamePopped(T.TABLE),i._resetInsertionMode()):t===T.TEMPLATE?Su(i,e):t!==T.BODY&&t!==T.CAPTION&&t!==T.COL&&t!==T.COLGROUP&&t!==T.HTML&&t!==T.TBODY&&t!==T.TD&&t!==T.TFOOT&&t!==T.TH&&t!==T.THEAD&&t!==T.TR&&ps(i,e)}function ps(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,i._processTokenInBodyMode(e),i.fosterParentingEnabled=t}function mde(i,e){i.pendingCharacterTokens.push(e)}function gde(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function F1(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t0?(i.openElements.popUntilTagNamePopped(T.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode(),i._processToken(e)):i.stopped=!0}function Mde(i,e){e.tagName===T.HTML?go(i,e):F5(i,e)}function Dde(i,e){e.tagName===T.HTML?i.fragmentContext||(i.insertionMode=lW):F5(i,e)}function F5(i,e){i.insertionMode=Pa,i._processToken(e)}function Nde(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.FRAMESET?i._insertElement(e,tt.HTML):t===T.FRAME?(i._appendElement(e,tt.HTML),e.ackSelfClosing=!0):t===T.NOFRAMES&&cr(i,e)}function Rde(i,e){e.tagName===T.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagName!==T.FRAMESET&&(i.insertionMode=aW))}function Ode(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.NOFRAMES&&cr(i,e)}function Pde(i,e){e.tagName===T.HTML&&(i.insertionMode=cW)}function Fde(i,e){e.tagName===T.HTML?go(i,e):N5(i,e)}function N5(i,e){i.insertionMode=Pa,i._processToken(e)}function Hde(i,e){let t=e.tagName;t===T.HTML?go(i,e):t===T.NOFRAMES&&cr(i,e)}function Bde(i,e){e.chars=ace.REPLACEMENT_CHARACTER,i._insertCharacters(e)}function zde(i,e){i._insertCharacters(e),i.framesetOk=!1}function Ude(i,e){if(Oa.causesExit(e)&&!i.fragmentContext){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==tt.HTML&&!i._isIntegrationPoint(i.openElements.current);)i.openElements.pop();i._processToken(e)}else{let t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===tt.MATHML?Oa.adjustTokenMathMLAttrs(e):n===tt.SVG&&(Oa.adjustTokenSVGTagName(e),Oa.adjustTokenSVGAttrs(e)),Oa.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function Wde(i,e){for(let t=i.openElements.stackTop;t>0;t--){let n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===tt.HTML){i._processToken(e);break}if(i.treeAdapter.getTagName(n).toLowerCase()===e.tagName){i.openElements.popUntilElementPopped(n);break}}}});var DW=gt((cEe,MW)=>{var kW=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aue=/\n/g,lue=/^\s*/,cue=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,due=/^:\s*/,uue=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,hue=/^[;\s]*/,fue=/^\s+|\s+$/g,pue=` +`,IW="/",AW="*",Eu="",mue="comment",gue="declaration";MW.exports=function(i,e){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];e=e||{};var t=1,n=1;function r(g){var b=g.match(aue);b&&(t+=b.length);var S=g.lastIndexOf(pue);n=~S?g.length-S:n+g.length}function o(){var g={line:t,column:n};return function(b){return b.position=new s(g),d(),b}}function s(g){this.start=g,this.end={line:t,column:n},this.source=e.source}s.prototype.content=i;var a=[];function l(g){var b=new Error(e.source+":"+t+":"+n+": "+g);if(b.reason=g,b.filename=e.source,b.line=t,b.column=n,b.source=i,e.silent)a.push(b);else throw b}function c(g){var b=g.exec(i);if(b){var S=b[0];return r(S),i=i.slice(S.length),b}}function d(){c(lue)}function u(g){var b;for(g=g||[];b=h();)b!==!1&&g.push(b);return g}function h(){var g=o();if(!(IW!=i.charAt(0)||AW!=i.charAt(1))){for(var b=2;Eu!=i.charAt(b)&&(AW!=i.charAt(b)||IW!=i.charAt(b+1));)++b;if(b+=2,Eu===i.charAt(b-1))return l("End of comment missing");var S=i.slice(2,b-2);return n+=2,r(S),i=i.slice(b),n+=2,g({type:mue,comment:S})}}function p(){var g=o(),b=c(cue);if(b){if(h(),!c(due))return l("property missing ':'");var S=c(uue),k=g({type:gue,property:LW(b[0].replace(kW,Eu)),value:S?LW(S[0].replace(kW,Eu)):Eu});return c(hue),k}}function m(){var g=[];u(g);for(var b;b=p();)b!==!1&&(g.push(b),u(g));return g}return d(),m()};function LW(i){return i?i.replace(fue,Eu):Eu}});var RW=gt((dEe,NW)=>{var vue=DW();function _ue(i,e){var t=null;if(!i||typeof i!="string")return t;for(var n,r=vue(i),o=typeof e=="function",s,a,l=0,c=r.length;l{});var tK=M(()=>{eK()});var Gpe,$pe,D4,N4,ic,l6,c6,d6,u6,h6=M(()=>{Mo();Sl();gl();tK();Ze();Mn();jt();De();ft();Gpe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$pe=function(i,e){return function(t,n){e(t,n,i)}},D4=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},N4=new nt("selectionAnchorSet",!1),ic=class iK{static get(e){return e.getContribution(iK.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=N4.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(je.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new sn().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Ni(v("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(je.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};ic.ID="editor.contrib.selectionAnchorController";ic=Gpe([$pe(1,Ke)],ic);l6=class extends se{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2080),weight:100}})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.setSelectionAnchor()})}},c6=class extends se{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:N4})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.goToSelectionAnchor()})}},d6=class extends se{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:N4,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2089),weight:100}})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}},u6=class extends se{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:N4,kbOpts:{kbExpr:O.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return D4(this,void 0,void 0,function*(){(n=ic.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}};Ae(ic.ID,ic,4);X(l6);X(c6);X(d6);X(u6)});var nK=M(()=>{});var rK=M(()=>{nK()});var Ype,f6,p6,m6,g6,qa,v6=M(()=>{Dt();Ce();rK();Ze();ri();qe();Mn();jt();Kc();qn();De();Yi();_r();ar();Ype=Oe("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),f6=class extends se{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=qa.get(t))===null||n===void 0||n.jumpToBracket()}},p6=class extends se{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var r;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(r=qa.get(t))===null||r===void 0||r.selectToBracket(o)}},m6=class extends se{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=qa.get(t))===null||n===void 0||n.removeBrackets(this.id)}},g6=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},qa=class i extends oe{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new ti(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let r=n.getStartPosition(),o=e.bracketPairs.matchBracket(r),s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new je(s.lineNumber,s.column,s.lineNumber,s.column):new je(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let o=r.getStartPosition(),s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){let c=t.bracketPairs.findNextBracket(o);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(P.compareRangesUsingStarts);let[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(o)){let u=a;a=l,l=u}}a&&l&&n.push(new je(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let o=[],s=0;for(let u=0,h=e.length;u1&&o.sort(Se.compare);let a=[],l=0,c=0,d=r.length;for(let u=0,h=o.length;u{qe();Mn();R4=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let n=this._selection.startLineNumber,r=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&r===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(n)))if(this._isMovingLeft){let s=new P(n,r-1,n,r),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new P(n,o,n,o),a)}else{let s=new P(n,o,n,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new P(n,r,n,r),a)}}computeCursorState(e,t){return this._isMovingLeft?new je(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new je(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var O4,_6,b6,y6=M(()=>{Ze();jt();oK();De();O4=class extends se{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let n=[],r=t.getSelections();for(let o of r)n.push(new R4(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},_6=class extends O4{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:v("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:O.writable})}},b6=class extends O4{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:v("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:O.writable})}};X(_6);X(b6)});var C6,S6=M(()=>{Ze();x_();are();qe();jt();De();C6=class extends se{constructor(){super({id:"editor.action.transposeLetters",label:v("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=n.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let d=l===c?s.getPosition():E_.rightPosition(n,s.getPosition().lineNumber,s.getPosition().column),u=E_.leftPosition(n,d),h=E_.leftPosition(n,u),p=n.getValueInRange(P.fromPositions(h,u)),m=n.getValueInRange(P.fromPositions(u,d)),g=P.fromPositions(h,d);r.push(new _l(g,m+p))}r.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};X(C6)});function E6(i){return i.register(),i}function aK(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(Zt).getFocusedCodeEditor();if(r&&r.hasTextFocus()){let o=r.getOption(35),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}var Xpe,Du,Qpe,sK,Jpe,Zpe,eme,w6,x6,T6=M(()=>{JS();nr();Are();Ze();Lr();jt();De();Yi();$m();ft();Xpe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Du="9_cutcopypaste",Qpe=Rc||document.queryCommandSupported("cut"),sK=Rc||document.queryCommandSupported("copy"),Jpe=typeof navigator.clipboard=="undefined"||XN?document.queryCommandSupported("paste"):!0;Zpe=Qpe?E6(new S_({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Rc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.cutLabel","Cut"),when:O.writable,order:1},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.cutLabel","Cut"),when:O.writable,order:1}]})):void 0,eme=sK?E6(new S_({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Rc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;rs.appendMenuItem(xe.MenubarEditMenu,{submenu:xe.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});rs.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:Du,order:3});rs.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:ce.and(ce.notEquals("resourceScheme","output"),O.editorTextFocus)});rs.appendMenuItem(xe.EditorTitleContext,{submenu:xe.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});rs.appendMenuItem(xe.ExplorerContext,{submenu:xe.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});w6=Jpe?E6(new S_({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Rc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:xe.EditorContext,group:Du,title:v("actions.clipboard.pasteLabel","Paste"),when:O.writable,order:4},{menuId:xe.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:xe.SimpleEditorContext,group:Du,title:v("actions.clipboard.pasteLabel","Paste"),when:O.writable,order:4}]})):void 0,x6=class extends se{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(kw.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),kw.forceCopyWithSyntaxHighlighting=!1)}};aK(Zpe,"cut");aK(eme,"copy");w6&&(w6.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(Zt),n=i.get(Ms),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&h_?(()=>Xpe(void 0,void 0,void 0,function*(){let s=yield n.readText();if(s!==""){let a=iP.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=r.getOption(35)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),w6.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));sK&&X(x6)});function lK(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>dK(e,t,i.include))||!i.includeSourceActions&&Qe.Source.contains(e))}function cK(i,e){let t=e.kind?new Qe(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>dK(t,n,i.include))||!i.includeSourceActions&&t&&Qe.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function dK(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var tme,Qe,Xn,md,P4,gd=M(()=>{At();tme=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Qe=class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}};Qe.sep=".";Qe.None=new Qe("@@none@@");Qe.Empty=new Qe("");Qe.QuickFix=new Qe("quickfix");Qe.Refactor=new Qe("refactor");Qe.RefactorExtract=Qe.Refactor.append("extract");Qe.RefactorInline=Qe.Refactor.append("inline");Qe.RefactorMove=Qe.Refactor.append("move");Qe.RefactorRewrite=Qe.Refactor.append("rewrite");Qe.Source=new Qe("source");Qe.SourceOrganizeImports=Qe.Source.append("organizeImports");Qe.SourceFixAll=Qe.Source.append("fixAll");Qe.SurroundWith=Qe.Refactor.append("surround");(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(Xn||(Xn={}));md=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Qe(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}},P4=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return tme(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(r){Ut(r)}n&&(this.action.edit=n.edit)}return this})}}});function l0(i,e,t,n,r,o){var s;return F4(this,void 0,void 0,function*(){let a=n.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:n.type},c=new oP(e,o),d=ime(i,e,a),u=new ne,h=d.map(m=>F4(this,void 0,void 0,function*(){try{r.report(m);let g=yield m.provideCodeActions(e,t,l,c.token);if(g&&u.add(g),c.token.isCancellationRequested)return uK;let b=((g==null?void 0:g.actions)||[]).filter(k=>k&&cK(a,k)),S=rme(m,b,a.include);return{actions:b.map(k=>new P4(k,m)),documentation:S}}catch(g){if(es(g))throw g;return Ut(g),uK}})),p=i.onDidChange(()=>{let m=i.all(e);ha(m,d)||c.cancel()});try{let m=yield Promise.all(h),g=m.map(S=>S.actions).flat(),b=[...vr(m.map(S=>S.documentation)),...nme(i,e,n,g)];return new k6(g,b,u)}finally{p.dispose(),c.dispose()}})}function ime(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>lK(t,new Qe(r))):!0)}function*nme(i,e,t,n){var r,o,s;if(e&&n.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*(r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},n.map(l=>l.action)))}function rme(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new Qe(r.kind),command:r.command}));if(t){let r;for(let o of n)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(let r of e)if(r.kind){for(let o of n)if(o.kind.contains(new Qe(r.kind)))return o.command}}function hK(i,e,t,n,r=et.None){var o;return F4(this,void 0,void 0,function*(){let s=i.get(qc),a=i.get(ui),l=i.get(Dr),c=i.get(Ei);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==o0.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let u=ome(d);c.error(typeof u=="string"?u:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function ome(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var F4,H4,Gf,B4,z4,U4,s0,a0,k6,uK,o0,Nu=M(()=>{oi();gi();At();Ce();Sn();Qm();qe();Mn();xt();is();lu();De();zi();Oo();Gc();Bc();gd();F4=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},H4="editor.action.codeAction",Gf="editor.action.quickFix",B4="editor.action.autoFix",z4="editor.action.refactor",U4="editor.action.sourceAction",s0="editor.action.organizeImports",a0="editor.action.fixAll",k6=class i extends oe{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Wi(e.diagnostics)?Wi(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Wi(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Qe.QuickFix.contains(new Qe(e.kind))&&!!e.isPreferred)}},uK={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(o0||(o0={}));St.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return F4(this,void 0,void 0,function*(){if(!(e instanceof ht))throw Ao();let{codeActionProvider:o}=i.get(be),s=i.get(Si).getModel(e);if(!s)throw Ao();let a=je.isISelection(t)?je.liftSelection(t):P.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Ao();let l=typeof n=="string"?new Qe(n):void 0,c=yield l0(o,s,a,{type:1,triggerAction:Xn.Default,filter:{includeSourceActions:!0,include:l}},wa.None,et.None),d=[],u=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let h=0;hh.action)}finally{setTimeout(()=>c.dispose(),100)}})})});var sme,ame,c0,pK=M(()=>{nw();Nu();gd();Gn();sme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ame=function(i,e){return function(t,n){e(t,n,i)}},c0=class fK{constructor(e){this.keybindingService=e}getResolver(){let e=new Xh(()=>this.keybindingService.getKeybindings().filter(t=>fK.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===s0?n={kind:Qe.SourceOrganizeImports.value}:t.command===a0&&(n={kind:Qe.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},md.fromUser(n,{kind:Qe.None,apply:"never"}))}));return t=>{if(t.kind){let n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new Qe(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};c0.codeActionCommands=[z4,H4,U4,s0,a0];c0=sme([ame(0,Bt)],c0)});var mK=M(()=>{});var gK=M(()=>{mK()});var vK=M(()=>{});var _K=M(()=>{vK()});var d0=M(()=>{gK();_K()});var bK=M(()=>{});var yK=M(()=>{bK()});var wIe,xIe,EIe,TIe,kIe,IIe,AIe,LIe,MIe,DIe,NIe,RIe,OIe,PIe,FIe,HIe,BIe,zIe,UIe,WIe,jIe,VIe,KIe,qIe,GIe,$Ie,YIe,XIe,QIe,JIe,ZIe,eAe,tAe,W4=M(()=>{yK();De();_r();wIe=Oe("symbolIcon.arrayForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xIe=Oe("symbolIcon.booleanForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),EIe=Oe("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),TIe=Oe("symbolIcon.colorForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kIe=Oe("symbolIcon.constantForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),IIe=Oe("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),AIe=Oe("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),LIe=Oe("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),MIe=Oe("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),DIe=Oe("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),NIe=Oe("symbolIcon.fileForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),RIe=Oe("symbolIcon.folderForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),OIe=Oe("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),PIe=Oe("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),FIe=Oe("symbolIcon.keyForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),HIe=Oe("symbolIcon.keywordForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),BIe=Oe("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zIe=Oe("symbolIcon.moduleForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),UIe=Oe("symbolIcon.namespaceForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),WIe=Oe("symbolIcon.nullForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jIe=Oe("symbolIcon.numberForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),VIe=Oe("symbolIcon.objectForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),KIe=Oe("symbolIcon.operatorForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qIe=Oe("symbolIcon.packageForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),GIe=Oe("symbolIcon.propertyForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$Ie=Oe("symbolIcon.referenceForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),YIe=Oe("symbolIcon.snippetForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),XIe=Oe("symbolIcon.stringForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),QIe=Oe("symbolIcon.structForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),JIe=Oe("symbolIcon.textForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ZIe=Oe("symbolIcon.typeParameterForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),eAe=Oe("symbolIcon.unitForeground",{dark:ke,light:ke,hcDark:ke,hcLight:ke},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),tAe=Oe("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function SK(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:CK,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let n=lme.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new Qe(o.action.kind):Qe.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(o);break}}let r=[];for(let o of n)if(o.actions.length){r.push({kind:"header",group:o.group});for(let s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}var CK,lme,wK=M(()=>{d0();or();gd();W4();De();CK=Object.freeze({kind:Qe.Empty,title:v("codeAction.widget.id.more","More Actions...")}),lme=Object.freeze([{kind:Qe.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Qe.RefactorExtract,title:v("codeAction.widget.id.extract","Extract..."),icon:lt.wrench},{kind:Qe.RefactorInline,title:v("codeAction.widget.id.inline","Inline..."),icon:lt.wrench},{kind:Qe.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite..."),icon:lt.wrench},{kind:Qe.RefactorMove,title:v("codeAction.widget.id.move","Move..."),icon:lt.wrench},{kind:Qe.SurroundWith,title:v("codeAction.widget.id.surround","Surround With..."),icon:lt.symbolSnippet},{kind:Qe.Source,title:v("codeAction.widget.id.source","Source Action..."),icon:lt.symbolFile},CK])});var xK=M(()=>{});var EK=M(()=>{xK()});var cme,dme,$f,rc,I6=M(()=>{Ht();lP();or();qt();Ce();qr();Mi();EK();KO();Nu();De();Gn();cme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dme=function(i,e){return function(t,n){e(t,n,i)}};(function(i){i.Hidden={type:0};class e{constructor(n,r,o,s){this.actions=n,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})($f||($f={}));rc=class TK extends oe{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new $e),this.onClick=this._onClick.event,this._state=$f.Hidden,this._domNode=fe("div.lightBulbWidget"),this._register(J_.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(oR(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:r,height:o}=wn(this._domNode),s=this._editor.getOption(64),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(li.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,r;this._preferredKbLabel=Un((n=t.lookupKeybinding(B4))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=Un((r=t.lookupKeybinding(Gf))===null||r===void 0?void 0:r.getLabel()),this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();let r=this._editor.getOptions();if(!r.get(62).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(n),l=o.getOptions().tabSize,c=r.get(48),d=o.getLineContent(s),u=Km(d,l),h=c.spaceWidth*u>22,p=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1),m=s;if(!h){if(s>1&&!p(s-1))m-=1;else if(!p(s+1))m+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new $f.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:TK._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==$f.Hidden&&(this.state=$f.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...mt.asClassNameArray(lt.lightBulb)),this._domNode.classList.add(...mt.asClassNameArray(lt.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...mt.asClassNameArray(lt.lightbulbAutofix)),this._domNode.classList.add(...mt.asClassNameArray(lt.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};rc.ID="editor.contrib.lightbulbWidget";rc._posPref=[0];rc=cme([dme(1,Bt)],rc)});var kK=M(()=>{});var IK=M(()=>{kK()});var ume,hme,Qn,fme,j4,u0=M(()=>{Mo();Dt();Ce();IK();Ze();qe();De();ft();ume=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},hme=function(i,e){return function(t,n){e(t,n,i)}},Qn=class A6{static get(e){return e.getContribution(A6.ID)}constructor(e,t){this._messageWidget=new Bi,this._messageListeners=new ne,this._editor=e,this._visible=A6.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Ni(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new j4(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new as(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new P(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(j4.fadeOut(this._messageWidget.value))}};Qn.ID="editor.contrib.messageController";Qn.MESSAGE_VISIBLE=new nt("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));Qn=ume([hme(1,Ke)],Qn);fme=xi.bindToContribution(Qn.get);Me(new fme({id:"leaveEditorMessage",precondition:Qn.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));j4=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);let s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Ae(Qn.ID,Qn,4)});var AK=M(()=>{});var L6=M(()=>{AK()});function MK(i){return i.replace(/\r\n|\r|\n/g," ")}var LK,M6,O6,P6,D6,N6,R6,V4,K4,DK=M(()=>{Ht();_P();gP();or();Ce();nr();qr();L6();De();Tl();Gn();nb();_r();LK=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},M6=function(i,e){return function(t,n){e(t,n,i)}},O6="acceptSelectedCodeAction",P6="previewSelectedCodeAction",D6=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var r,o;n.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},N6=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let r=new ib(e,f_);return{container:e,icon:t,text:n,keybinding:r}}renderElement(e,t,n){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(n.icon.className=mt.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=ga(e.group.icon.color.id))):(n.icon.className=mt.asClassName(lt.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=MK(e.label),n.keybinding.set(e.keybinding),uR(!!e.keybinding,n.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(O6))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(P6))===null||s===void 0?void 0:s.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:a&&l?this._supportsPreview?n.container.title=v({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};N6=LK([M6(1,Bt)],N6);R6=class extends UIEvent{constructor(){super("acceptSelectedAction")}},V4=class extends UIEvent{constructor(){super("previewSelectedAction")}},K4=class extends oe{constructor(e,t,n,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new tb(e,this.domNode,a,[new N6(t,this._keybindingService),new D6],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?MK(l==null?void 0:l.label):"";return l.disabled&&(c=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(yP),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(c=>c.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);let o=this._allMenuItems.map((c,d)=>{let u=document.getElementById(this._list.getElementID(d));if(u){u.style.width="auto";let h=u.getBoundingClientRect().width;return u.style.width="",h}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],r=this._list.element(n);if(!this.focusCondition(r))return;let o=e?new V4:new R6;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof V4):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};K4=LK([M6(4,$c),M6(5,Bt)],K4)});var pme,F6,Ru,vd,Ou,h0,NK=M(()=>{Ht();gf();Ce();L6();De();DK();Yi();ft();Tl();bl();Et();pme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},F6=function(i,e){return function(t,n){e(t,n,i)}},Ru={Visible:new nt("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},vd=rr("actionWidgetService"),Ou=class extends oe{get isVisible(){return Ru.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Bi)}show(e,t,n,r,o,s,a){let l=Ru.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(K4,e,t,n,r);this._contextViewService.showContextView({getAnchor:()=>o,render:d=>(l.set(!0),this._renderWidget(d,c,a!=null?a:[])),onHide:d=>{l.reset(),this._onWidgetClosed(d)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var r;let o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");let s=new ne,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(Rt(l,on.MOUSE_DOWN,m=>m.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(Rt(d,on.POINTER_MOVE,()=>d.remove())),s.add(Rt(d,on.MOUSE_DOWN,()=>d.remove()));let u=0;if(n.length){let m=this._createActionBar(".action-widget-action-bar",n);m&&(o.appendChild(m.getContainer().parentElement),s.add(m),u=m.getContainer().offsetWidth)}let h=(r=this._list.value)===null||r===void 0?void 0:r.layout(u);o.style.width=`${h}px`;let p=s.add(Ts(e));return s.add(p.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let n=fe(e),r=new Po(n);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};Ou=pme([F6(0,$c),F6(1,Ke),F6(2,He)],Ou);sr(vd,Ou,1);h0=100+1e3;mi(class extends os{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:Ru.Visible,keybinding:{weight:h0,primary:9,secondary:[1033]}})}run(i){i.get(vd).hide()}});mi(class extends os{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(vd);e instanceof Ou&&e.focusPrevious()}});mi(class extends os{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(vd);e instanceof Ou&&e.focusNext()}});mi(class extends os{constructor(){super({id:O6,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:3,secondary:[2137]}})}run(i){let e=i.get(vd);e instanceof Ou&&e.acceptSelected()}});mi(class extends os{constructor(){super({id:P6,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:Ru.Visible,keybinding:{weight:h0,primary:2051}})}run(i){let e=i.get(vd);e instanceof Ou&&e.acceptSelected(!0)}})});var H6,mme,Yf,z6,B6,Pu,gme,q4,U6=M(()=>{Dt();At();qt();Ce();lo();ft();Gc();gd();Nu();H6=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},mme=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},z6=new nt("supportedCodeAction",""),B6=class extends oe{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new as),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>nf(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Xn.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){let{lineNumber:r,column:o}=n.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return n}};(function(i){i.Empty={type:0};class e{constructor(n,r,o){this.trigger=n,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(es(s))return gme;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Pu||(Pu={}));gme=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),q4=class extends oe{constructor(e,t,n,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new Bi),this._state=Pu.Empty,this._onDidChangeState=this._register(new $e),this.onDidChangeState=this._onDidChangeState.event,Yf.set(this,!1),this._supportedCodeActions=z6.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){H6(this,Yf,"f")||(mme(this,Yf,!0,"f"),super.dispose(),this.setState(Pu.Empty,!0))}_update(){if(H6(this,Yf,"f"))return;this._codeActionOracle.value=void 0,this.setState(Pu.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(88)){let t=this._registry.all(e).flatMap(n=>{var r;return(r=n.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new B6(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Pu.Empty);return}let o=Vt(s=>l0(this._registry,e,n.selection,n.trigger,wa.None,s));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new Pu.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Xn.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!H6(this,Yf,"f")&&this._onDidChangeState.fire(e))}};Yf=new WeakMap});var vme,oc,G4,_me,bme,$4,Ga,Y4=M(()=>{Ht();At();nw();Ce();ri();xt();Nu();pK();wK();I6();u0();De();NK();zi();jn();ft();Et();rb();Gc();gd();U6();vme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},oc=function(i,e){return function(t,n){e(t,n,i)}},G4=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},_me=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},bme=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},Ga=class RK extends oe{static get(e){return e.getContribution(RK.ID)}constructor(e,t,n,r,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new Bi),this._showDisabled=!1,$4.set(this,!1),this._editor=e,this._model=this._register(new q4(this._editor,o.codeActionProvider,t,n,s)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new Xh(()=>{let u=this._editor.getContribution(rc.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=r.createInstance(c0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){_me(this,$4,!0,"f"),super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){var o;if(!this._editor.hasModel())return;(o=Qn.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return G4(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(hK,e,o0.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Xn.QuickFix,filter:{}})}})}update(e){var t,n,r,o,s,a,l;return G4(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let c;try{c=yield e.actions}catch(d){at(d);return}if(!bme(this,$4,"f"))if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(c,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){let u=this.tryGetValidActionToApply(e.trigger,c);if(u){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(u,!1,!1)}finally{c.dispose()}return}if(e.trigger.context){let h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(h&&h.action.disabled){(s=Qn.get(this._editor))===null||s===void 0||s.showMessage(h.action.disabled,e.trigger.context.position),c.dispose();return}}}let d=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!c.allActions.length||!d&&!c.validActions.length)){(l=Qn.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this.showCodeActionList(c,this.toCoords(e.position),{includeDisabledActions:d,fromLightbulb:!1})}else this._actionWidgetService.isVisible?c.dispose():this._activeCodeActions.value=c})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return G4(this,void 0,void 0,function*(){let r=this._editor.getDomNode();if(!r)return;let o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=Se.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>G4(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,SK(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=wn(this._editor.getDomNode()),r=n.left+t.left,o=n.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;let t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};$4=new WeakMap;Ga.ID="editor.contrib.codeActionController";Ga=vme([oc(1,e1),oc(2,Ke),oc(3,He),oc(4,be),oc(5,El),oc(6,ui),oc(7,Mt),oc(8,vd),oc(9,He)],Ga)});function f0(i){return ce.regex(z6.keys()[0],new RegExp("(\\s|^)"+vl(i.value)+"\\b"))}function Fu(i,e,t,n,r=Xn.Default){if(i.hasModel()){let o=Ga.get(i);o==null||o.manualTriggerAtCurrentPosition(e,r,t,n)}}var W6,X4,Q4,J4,Z4,ey,ty,iy,OK=M(()=>{wi();Ze();jt();Nu();De();ft();gd();Y4();U6();W6={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:v("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v("args.schema.apply.first","Always apply the first returned code action."),v("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),v("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};X4=class extends se{constructor(){super({id:Gf,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),kbOpts:{kbExpr:O.textInputFocus,primary:2137,weight:100}})}run(e,t){return Fu(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Xn.QuickFix)}},Q4=class extends xi{constructor(){super({id:H4,precondition:ce.and(O.writable,O.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:W6}]}})}runEditorCommand(e,t,n){let r=md.fromUser(n,{kind:Qe.Empty,apply:"ifSingle"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):v("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},J4=class extends se{constructor(){super({id:z4,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),kbOpts:{kbExpr:O.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ce.and(O.writable,f0(Qe.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:W6}]}})}run(e,t,n){let r=md.fromUser(n,{kind:Qe.Refactor,apply:"never"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):v("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:Qe.Refactor.contains(r.kind)?r.kind:Qe.None,onlyIncludePreferredActions:r.preferred},r.apply,Xn.Refactor)}},Z4=class extends se{constructor(){super({id:U4,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:ce.and(O.writable,O.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ce.and(O.writable,f0(Qe.Source))},description:{description:"Source Action...",args:[{name:"args",schema:W6}]}})}run(e,t,n){let r=md.fromUser(n,{kind:Qe.Source,apply:"never"});return Fu(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?v("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):v("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:Qe.Source.contains(r.kind)?r.kind:Qe.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Xn.SourceAction)}},ey=class extends se{constructor(){super({id:s0,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ce.and(O.writable,f0(Qe.SourceOrganizeImports)),kbOpts:{kbExpr:O.textInputFocus,primary:1581,weight:100}})}run(e,t){return Fu(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:Qe.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Xn.OrganizeImports)}},ty=class extends se{constructor(){super({id:a0,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:ce.and(O.writable,f0(Qe.SourceFixAll))})}run(e,t){return Fu(t,v("fixAll.noneMessage","No fix all action available"),{include:Qe.SourceFixAll,includeSourceActions:!0},"ifSingle",Xn.FixAll)}},iy=class extends se{constructor(){super({id:B4,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ce.and(O.writable,f0(Qe.QuickFix)),kbOpts:{kbExpr:O.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Fu(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Qe.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Xn.AutoFix)}}});var j6=M(()=>{Ze();Lre();OK();Y4();I6();De();jR();Hc();Ae(Ga.ID,Ga,3);Ae(rc.ID,rc,4);X(X4);X(J4);X(Z4);X(ey);X(iy);X(ty);Me(new Q4);Mr.as(A_.Configuration).registerConfiguration(Object.assign(Object.assign({},rP),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))});var sc,V6=M(()=>{xa();ri();qe();Mn();sc=class i{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;let r=t.length,o=e.length;if(n+r>o)return!1;for(let s=0;s=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,r,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=o.getLineContent(a),h=o.getLineContent(c),p=u.lastIndexOf(t,l-1+t.length),m=h.indexOf(n,d-1-n.length);if(p!==-1&&m!==-1)if(a===c)u.substring(p+t.length,m).indexOf(n)>=0&&(p=-1,m=-1);else{let b=u.substring(p+t.length),S=h.substring(0,m);(b.indexOf(n)>=0||S.indexOf(n)>=0)&&(p=-1,m=-1)}let g;p!==-1&&m!==-1?(r&&p+t.length0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=i._createRemoveBlockCommentOperations(new P(a,p+t.length+1,c,m+1),t,n)):(g=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(let b of g)s.addTrackedEditOperation(b.range,b.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return P.isEmpty(e)?r.push(Kt.delete(new P(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(Kt.delete(new P(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(Kt.delete(new P(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return P.isEmpty(e)?o.push(Kt.replace(new P(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(Kt.insert(new Se(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(Kt.insert(new Se(e.endLineNumber,e.endColumn),(r?" ":"")+n))),o}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let o=e.getLanguageIdAtPosition(n,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let r=n[0],o=n[1];return new je(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let r=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new je(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}});var ny,PK=M(()=>{wi();xa();ri();qe();Mn();V6();ny=class i{constructor(e,t,n,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,r){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=n-t+1;co?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var p0,K6,q6,G6,$6,Y6=M(()=>{gl();Ze();qe();jt();Kn();V6();PK();De();Yi();p0=class extends se{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(Tt);if(!t.hasModel())return;let r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(21),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>P.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d{Ht();Hre();Pc();Ce();nr();Ze();jt();De();Yi();ft();Tl();Gn();jn();ob();yme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Hu=function(i,e){return function(t,n){e(t,n,i)}},Xf=class FK{static get(e){return e.getContribution(FK.ID)}constructor(e,t,n,r,o,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new ne,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){let d=this._contextViewService.getContextViewElement(),u=c.srcElement;u.shadowRoot&&cR(d)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(22)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(22)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(let r of this._editor.getSelections())if(r.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(22)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?xe.SimpleEditorContext:xe.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let n=[],r=this._menuService.createMenu(t,this._contextKeyService),o=r.getActions({arg:e.uri});r.dispose();for(let s of o){let[,a]=s,l=0;for(let c of a)if(c instanceof Mm){let d=this._getMenuActions(e,c.item.submenu);d.length>0&&(n.push(new Am(c.id,c.label,d)),l++)}else n.push(c),l++;l&&n.push(new ks)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),s=wn(this._editor.getDomNode()),a=s.left+o.left,l=s.top+o.top+o.height;t={x:a,y:l}}let r=this._editor.getOption(123)&&!Tm;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:o=>{let s=this._keybindingFor(o);if(s)return new Lw(o,o,{label:!0,keybinding:s.getLabel(),isMenu:!0});let a=o;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new Lw(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||EP(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(70),n=0,r=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled=="undefined"?!0:c.enabled,checked:c.checked,run:c.run}),o=(c,d)=>new Am(`menu-action-${++n}`,c,d,void 0),s=(c,d,u,h,p)=>{if(!d)return r({label:c,enabled:d,run:()=>{}});let m=b=>()=>{this._configurationService.updateValue(u,b)},g=[];for(let b of p)g.push(r({label:b.label,checked:h===b.value,run:m(b.value)}));return o(c,g)},a=[];a.push(r({label:v("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ks),a.push(r({label:v("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(v("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:v("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:v("context.minimap.size.fill","Fill"),value:"fill"},{label:v("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(v("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:v("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:v("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(123)&&!Tm;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Xf.ID="editor.contrib.contextmenu";Xf=yme([Hu(1,cs),Hu(2,$c),Hu(3,Ke),Hu(4,Bt),Hu(5,Is),Hu(6,Mt),Hu(7,kl)],Xf);X6=class extends se{constructor(){super({id:"editor.action.showContextMenu",label:v("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Xf.get(t))===null||n===void 0||n.showContextMenu()}};Ae(Xf.ID,Xf,2);X(X6)});var m0,g0,Bu,J6,Z6,eE=M(()=>{Ce();Ze();jt();De();m0=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let r=0;r{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;let n=new m0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new g0(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new g0(new m0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new g0(new m0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};Bu.ID="editor.contrib.cursorUndoRedoController";J6=class extends se{constructor(){super({id:"cursorUndo",label:v("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var r;(r=Bu.get(t))===null||r===void 0||r.cursorUndo()}},Z6=class extends se{constructor(){super({id:"cursorRedo",label:v("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var r;(r=Bu.get(t))===null||r===void 0||r.cursorRedo()}};Ae(Bu.ID,Bu,0);X(J6);X(Z6)});var HK=M(()=>{});var BK=M(()=>{HK()});var ry,zK=M(()=>{qe();Mn();ry=class{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new P(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new je(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new je(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber{Ce();nr();BK();Ze();ri();qe();Mn();qn();zK();zu=class i extends oe{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(33)||this._editor.getOption(20)||(Qf(e)&&(this._modifierPressed=!0),this._mouseDown&&Qf(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(33)||this._editor.getOption(20)||(Qf(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===i.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(r.length===1)this._dragSelection=r[0];else return}Qf(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new Se(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){let r=this._editor.getSelection();if(r){let{selectionStartLineNumber:o,selectionStartColumn:s}=r;n=[new je(o,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new je(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Qf(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new ry(this._dragSelection,t,Qf(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new P(e.lineNumber,e.column,e.lineNumber,e.column),options:i._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};zu.ID="editor.contrib.dragAndDrop";zu.TRIGGER_KEY_VALUE=zn?6:5;zu._DECORATION_OPTIONS=ct.register({description:"dnd-target",className:"dnd-target"});Ae(zu.ID,zu,2)});var $a,UK=M(()=>{qe();Kc();qn();_r();ar();$a=class i{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){let e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,r.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){let s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new P(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let r=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){r=i._FIND_MATCH_NO_OVERVIEW_DECORATION;let a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c)),u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let p=1,m=e.length;p=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(o.push({range:new P(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=g.startLineNumber,h=g.endLineNumber)}o.push({range:new P(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;an.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,i._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumbere.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn{qe();oy=class{constructor(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let n=[];for(let s=0;sP.compareRangesUsingStarts(s.range,a.range));let r=[],o=n[0];for(let s=1;s0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function jK(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function VK(i,e,t){let n=e.split(t),r=i[0].split(t),o="";return n.forEach((s,a)=>{o+=iE([r[a]],s)+t}),o.slice(0,-1)}var KK=M(()=>{wi()});function qK(i){if(!i||i.length===0)return new Zf(null);let e=[],t=new rE(i);for(let n=0,r=i.length;n=r)break;let s=i.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` +`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(n++,n>=r)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1{KK();sy=class{constructor(e){this.staticValue=e,this.kind=0}},nE=class{constructor(e){this.pieces=e,this.kind=1}},Zf=class i{static fromStaticValue(e){return new i([Jf.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new sy(""):e.length===1&&e[0].staticValue!==null?this._state=new sy(e[0].staticValue):this._state=new nE(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?iE(e,this._state.staticValue):this._state.staticValue;let n="";for(let r=0,o=this._state.pieces.length;r0){let l=[],c=s.caseOps.length,d=0;for(let u=0,h=a.length;u=c){l.push(a.slice(u));break}switch(s.caseOps[d]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),d++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),d++;break;default:l.push(a[u])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e{oi();Dt();Ce();x_();ri();qe();Mn();wre();UK();WK();GK();ft();Xa=new nt("findWidgetVisible",!1),LDe=Xa.toNegated(),ep=new nt("findInputFocussed",!1),v0=new nt("replaceInputFocussed",!1),_0={primary:545,mac:{primary:2593}},b0={primary:565,mac:{primary:2613}},y0={primary:560,mac:{primary:2608}},C0={primary:554,mac:{primary:2602}},S0={primary:558,mac:{primary:2606}},Gt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},Ya=19999,Cme=240,ay=class i{constructor(e,t){this._toDispose=new ne,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new as,this._decorations=new $a(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new ti(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Vi(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},Cme)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new P(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,Ya);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=T_(r.map(l=>l.range),l=>P.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(39).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===1?(n===1?n=o.getLineCount():n--,r=o.getLineMaxColumn(n)):r--,new Se(n,r)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,r=1):r++,new Se(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Ya?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new qO(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let u="mu";n.ignoreCase&&(u+="i"),n.global&&(u+="g"),n=new RegExp(n.source,u)}let r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(n,a.buildReplaceString(null,c));let d=new w_(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=n.length;ss.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(o=>new je(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),r=this._editor.getSelection();for(let o=0,s=n.length;o{});var YK=M(()=>{$K()});var x0,XK=M(()=>{Ht();YK();zre();Zm();Dt();w0();_r();x0=class i extends Ds{constructor(e,t,n){super(),this._hideSoon=this._register(new ti(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let r={inputActiveOptionBorder:ga(z_),inputActiveOptionForeground:ga(W_),inputActiveOptionBackground:ga(U_)};this.caseSensitive=this._register(new kP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},r))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new IP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.ToggleWholeWordCommand),isChecked:this._state.wholeWord},r))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new AP(Object.assign({appendTitle:this._keybindingLabelFor(Gt.ToggleRegexCommand),isChecked:this._state.isRegex},r))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let s=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,s=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,s=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,s=!0),!this._state.isRevealed&&s&&this._revealTemporarily()})),this._register(Rt(this._domNode,on.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(Rt(this._domNode,"mouseover",o=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};x0.ID="editor.contrib.findOptionsWidget"});function ly(i,e){return i===1?!0:i===2?!1:e}var cy,QK=M(()=>{qt();Ce();qe();w0();cy=class extends oe{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ly(this._isRegexOverride,this._isRegex)}get wholeWord(){return ly(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ly(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ly(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new $e),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),typeof n!="undefined"&&(P.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,t,n=!0){var r;let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},s=!1,a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(!((r=e.searchScope)===null||r===void 0)&&r.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(p=>!P.equalsRange(p,u))})||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),typeof e.isSearching!="undefined"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),typeof e.filters!="undefined"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(s=!0,o.isRegex=!0),l!==this.wholeWord&&(s=!0,o.wholeWord=!0),c!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Ya}}});var JK=M(()=>{});var ZK=M(()=>{JK()});var Sme,wme,oE,dy,eq=M(()=>{Ht();TP();Ure();Zm();or();qt();Wre();De();Sme=v("defaultLabel","input"),wme=v("label.preserveCaseToggle","Preserve Case"),oE=class extends sb{constructor(e){super({icon:lt.preserveCase,title:wme+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},dy=class extends Ds{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new $e),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new $e),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new $e),this._onInput=this._register(new $e),this._onKeyUp=this._register(new $e),this._onPreserveCaseKeyDown=this._register(new $e),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||Sme;let o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new LP(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new oE(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let p=d.indexOf(document.activeElement);if(p>=0){let m=-1;h.equals(17)?m=(p+1)%d.length:h.equals(15)&&(p===0?m=d.length-1:m=p-1),h.equals(9)?(d[p].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),Jd.stop(h,!0)}}});let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}});function oq(i,e){if(uy.includes(e))throw new Error("Cannot register the same widget multiple times");uy.push(e);let t=new ne,n=new nt(sE,!1).bindTo(i),r=new nt(nq,!0).bindTo(i),o=new nt(rq,!0).bindTo(i),s=()=>{n.set(!0),ac=e},a=()=>{n.set(!1),ac===e&&(ac=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(Ft(()=>{uy.splice(uy.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var tq,iq,py,sE,nq,rq,ac,uy,hy,fy,aE=M(()=>{jre();eq();ft();lw();De();Ce();tq=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},iq=function(i,e){return function(t,n){e(t,n,i)}},py=new nt("suggestWidgetVisible",!1,v("suggestWidgetVisible","Whether suggestion are visible")),sE="historyNavigationWidgetFocus",nq="historyNavigationForwardsEnabled",rq="historyNavigationBackwardsEnabled",uy=[];hy=class extends MP{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(oq(o,this.inputBox))}};hy=tq([iq(3,Ke)],hy);fy=class extends dy{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(oq(s,this.inputBox))}};fy=tq([iq(3,Ke)],fy);No.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ce.and(ce.has(sE),ce.equals(rq,!0),py.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{ac==null||ac.showPreviousValue()}});No.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ce.and(ce.has(sE),ce.equals(nq,!0),py.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{ac==null||ac.showNextValue()}})});function lE(i){var e,t;return((e=i.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=i.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var sq=M(()=>{});function hq(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function fq(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd{Ht();Mo();TP();Fw();Zm();Dt();or();At();Ce();nr();wi();ZK();qe();w0();De();aE();sq();_r();Al();ar();qr();xw();Mi();nb();xme=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Eme=Ti("find-selection",lt.selection,v("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),aq=Ti("find-collapsed",lt.chevronRight,v("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),lq=Ti("find-expanded",lt.chevronDown,v("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Tme=Ti("find-replace",lt.replace,v("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),kme=Ti("find-replace-all",lt.replaceAll,v("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Ime=Ti("find-previous-match",lt.arrowUp,v("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Ame=Ti("find-next-match",lt.arrowDown,v("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Lme=v("label.find","Find"),Mme=v("placeholder.find","Find"),Dme=v("label.previousMatchButton","Previous Match"),Nme=v("label.nextMatchButton","Next Match"),Rme=v("label.toggleSelectionFind","Find in Selection"),Ome=v("label.closeButton","Close"),Pme=v("label.replace","Replace"),Fme=v("placeholder.replace","Replace"),Hme=v("label.replaceButton","Replace"),Bme=v("label.replaceAllButton","Replace All"),zme=v("label.toggleReplaceButton","Toggle Replace"),Ume=v("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Ya),Wme=v("label.matchesLocation","{0} of {1}"),cq=v("label.noResults","No results"),Qa=419,jme=275,Vme=jme-54,E0=69,Kme=33,dq="ctrlEnterReplaceAll.windows.donotask",uq=zn?256:2048,T0=class{constructor(e){this.afterLineNumber=e,this.heightInPx=Kme,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};k0=class i extends Ds{constructor(e,t,n,r,o,s,a,l,c){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=n,this._contextViewProvider=r,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(dq,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Ro(500),this._register(Ft(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(88)&&(this._codeEditor.getOption(88)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(140)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(39)){let u=this._codeEditor.getOption(39).loop;this._state.change({loop:u},!1);let h=this._codeEditor.getOption(39).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new T0(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>xme(this,void 0,void 0,function*(){if(this._isVisible){let d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=ep.bindTo(s),this._findFocusTracker=this._register(Ts(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=v0.bindTo(s),this._replaceFocusTracker=this._register(Ts(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(39).addExtraSpaceOnTop&&(this._viewZone=new T0(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(88)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=la(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,at)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=E0+"px",this._state.matchesCount>=Ya?this._matchesCount.title=Ume:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Ya&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=Do(Wme,n,t)}else e=cq;this._matchesCount.appendChild(document.createTextNode(e)),Ni(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),E0=Math.max(E0,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===cq)return n===""?v("ariaSearchNoResultEmpty","{0} found",e):v("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=v("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${r}`:r}return v("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(88);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(39).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(39).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let r=wn(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);let l=aR(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(39).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(r=>{n.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new T0(0));let n=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===n.heightInPx)return;let s=o-n.heightInPx;n.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(81).top,o<=0)return;n.heightInPx=o,this._viewZoneId=r.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!rR(this._domNode))return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,r=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&la(this._domNode)>Qa){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=la(this._findInput.domNode);return}if(Qa+28+r>=n&&(s=!0),Qa+28+r-E0>=n&&(a=!0),Qa+28+r-E0>=n+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${n-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=la(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!P.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(uq|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return hq(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return fq(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(uq|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Nc&&Rc&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(v("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(dq,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return hq(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return fq(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new hy(null,this._contextViewProvider,{width:Vme,label:Lme,placeholder:Mme,appendCaseSensitiveLabel:this._keybindingLabelFor(Gt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Gt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Gt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>lE(this._keybindingService),inputBoxStyles:Dw,toggleStyles:Mw},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),KN&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new _d({label:Dme+this._keybindingLabelFor(Gt.PreviousMatchFindAction),icon:Ime,onTrigger:()=>{Oc(this._codeEditor.getAction(Gt.PreviousMatchFindAction)).run().then(void 0,at)}})),this._nextBtn=this._register(new _d({label:Nme+this._keybindingLabelFor(Gt.NextMatchFindAction),icon:Ame,onTrigger:()=>{Oc(this._codeEditor.getAction(Gt.NextMatchFindAction)).run().then(void 0,at)}}));let n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);let r=document.createElement("div");r.className="find-actions",n.appendChild(r),r.appendChild(this._matchesCount),r.appendChild(this._prevBtn.domNode),r.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new sb({icon:Eme,title:Rme+this._keybindingLabelFor(Gt.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:ga(U_),inputActiveOptionBorder:ga(z_),inputActiveOptionForeground:ga(W_)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),r.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new _d({label:Ome+this._keybindingLabelFor(Gt.CloseFindWidgetCommand),icon:ab,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),r.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new fy(null,void 0,{label:Pme,placeholder:Fme,appendPreserveCaseLabel:this._keybindingLabelFor(Gt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>lE(this._keybindingService),inputBoxStyles:Dw,toggleStyles:Mw},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new _d({label:Hme+this._keybindingLabelFor(Gt.ReplaceOneAction),icon:Tme,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new _d({label:Bme+this._keybindingLabelFor(Gt.ReplaceAllAction),icon:kme,onTrigger:()=>{this._controller.replaceAll()}}));let o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);let s=document.createElement("div");s.className="replace-actions",o.appendChild(s),s.appendChild(this._replaceBtn.domNode),s.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new _d({label:zme,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=la(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${Qa}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(o),this._resizeSash=new Il(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=Qa;this._register(this._resizeSash.onDidStart(()=>{a=la(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(cd||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=la(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=la(this._domNode);if(l{this._opts.onTrigger(),n.preventDefault()}),this.onkeydown(this._domNode,n=>{var r,o;if(n.equals(10)||n.equals(3)){this._opts.onTrigger(),n.preventDefault();return}(o=(r=this._opts).onKeyDown)===null||o===void 0||o.call(r,n)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...mt.asClassNameArray(aq)),this._domNode.classList.add(...mt.asClassNameArray(lq))):(this._domNode.classList.remove(...mt.asClassNameArray(lq)),this._domNode.classList.add(...mt.asClassNameArray(aq)))}};df((i,e)=>{let t=(g,b)=>{b&&e.addRule(`.monaco-editor ${g} { background-color: ${b}; }`)};t(".findMatch",i.getColor(LO)),t(".currentFindMatch",i.getColor(AO)),t(".findScope",i.getColor(MO));let n=i.getColor(xl);t(".find-widget",n);let r=i.getColor(H_);r&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${r}; }`);let o=i.getColor(B_);o&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${o}; border-right: 1px solid ${o}; border-bottom: 1px solid ${o}; }`);let s=i.getColor(NO);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${au(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(DO);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(RO);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${au(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(ls);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(TO);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let u=i.getColor(gO);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);let h=i.getColor(kO);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{let g=i.getColor(su);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}let p=i.getColor(jO);p&&e.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${p} !important; } - `);let m=i.getColor(bO);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)})});function pE(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let r=i.getConfiguredWordAtPosition(n.getStartPosition());if(r&&t===!1)return r.word}else if(i.getModel().getValueLengthInRange(n){Dt();Ce();Si();Ze();qO();jt();Vc();x0();gq();vq();Rq();De();Yi();Ym();ft();Tl();Gn();Ro();Ll();lu();ar();Oq=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Za=function(i,e){return function(t,n){e(t,n,i)}},Uu=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qme=524288;dr=class Pq extends oe{get editor(){return this._editor}static get(e){return e.getContribution(Pq.ID)}constructor(e,t,n,r){super(),this._editor=e,this._findWidgetVisible=Qa.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=r,this._updateHistoryDelayer=new No(500),this._state=this._register(new yy),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(o=>this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let o=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(39).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!ip.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=vl(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return Uu(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let r=pE(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=vl(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=pE(this._editor,e.seedSearchStringFromSelection);r&&(n.searchString=r)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let r=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(n.searchString=r)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(n.searchScope=r)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new _y(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return Uu(this,void 0,void 0,function*(){return this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};dr.ID="editor.contrib.findController";dr=Oq([Za(1,Ke),Za(2,Yr),Za(3,Ms)],dr);mE=class extends dr{constructor(e,t,n,r,o,s,a,l){super(e,n,a,l),this._contextViewService=t,this._keybindingService=r,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let n=Object.create(null,{_start:{get:()=>super._start}});return Uu(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let r=this._editor.getSelection(),o=!1;switch(this._editor.getOption(39).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!r&&r.startLineNumber!==r.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new I0(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new E0(this._editor,this._state,this._keybindingService))}};mE=Oq([Za(1,Gc),Za(2,Ke),Za(3,Bt),Za(4,pn),Za(5,xi),Za(6,Yr),Za(7,Ms)],mE);Gme=uw(new dw({id:Gt.StartFindAction,label:v("startFindAction","Find"),alias:"Find",precondition:ce.or(O.focus,ce.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:v({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Gme.addImplementation(0,(i,e,t)=>{let n=dr.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop}):!1});$me={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:v("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. + `);let m=i.getColor(vO);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)})});function cE(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let r=i.getConfiguredWordAtPosition(n.getStartPosition());if(r&&t===!1)return r.word}else if(i.getModel().getValueLengthInRange(n){Dt();Ce();wi();Ze();VO();jt();Kc();w0();XK();QK();pq();De();Yi();$m();ft();Tl();Gn();Oo();Ll();cu();ar();mq=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ja=function(i,e){return function(t,n){e(t,n,i)}},Uu=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qme=524288;dr=class gq extends oe{get editor(){return this._editor}static get(e){return e.getContribution(gq.ID)}constructor(e,t,n,r){super(),this._editor=e,this._findWidgetVisible=Xa.bindTo(t),this._contextKeyService=t,this._storageService=n,this._clipboardService=r,this._updateHistoryDelayer=new Ro(500),this._state=this._register(new cy),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(o=>this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let o=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(39).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!ep.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=vl(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return Uu(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let r=cE(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=vl(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=cE(this._editor,e.seedSearchStringFromSelection);r&&(n.searchString=r)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let r=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(n.searchString=r)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(n.searchScope=r)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new ay(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return Uu(this,void 0,void 0,function*(){return this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};dr.ID="editor.contrib.findController";dr=mq([Ja(1,Ke),Ja(2,Yr),Ja(3,Ms)],dr);dE=class extends dr{constructor(e,t,n,r,o,s,a,l){super(e,n,a,l),this._contextViewService=t,this._keybindingService=r,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let n=Object.create(null,{_start:{get:()=>super._start}});return Uu(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let r=this._editor.getSelection(),o=!1;switch(this._editor.getOption(39).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!r&&r.startLineNumber!==r.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new k0(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new x0(this._editor,this._state,this._keybindingService))}};dE=mq([Ja(1,$c),Ja(2,Ke),Ja(3,Bt),Ja(4,pn),Ja(5,Ei),Ja(6,Yr),Ja(7,Ms)],dE);Gme=dw(new cw({id:Gt.StartFindAction,label:v("startFindAction","Find"),alias:"Find",precondition:ce.or(O.focus,ce.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:v({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Gme.addImplementation(0,(i,e,t)=>{let n=dr.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop}):!1});$me={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:v("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. The flag will not be saved for the future. 0: Do Nothing 1: True @@ -27,74 +27,74 @@ The flag will not be saved for the future. The flag will not be saved for the future. 0: Do Nothing 1: True -2: False`)},findInSelection:{type:"boolean"}}}}]},gE=class extends se{constructor(){super({id:Gt.StartFindWithArgs,label:v("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:$me})}run(e,t,n){return Uu(this,void 0,void 0,function*(){let r=dr.get(t);if(r){let o=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(39).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}})}},vE=class extends se{constructor(){super({id:Gt.StartFindWithSelection,label:v("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}},Ty=class extends se{run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},_E=class extends Ty{constructor(){super({id:Gt.NextMatchFindAction,label:v("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:O.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ce.and(O.focus,ip),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},bE=class extends Ty{constructor(){super({id:Gt.PreviousMatchFindAction,label:v("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:O.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ce.and(O.focus,ip),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},yE=class extends se{constructor(){super({id:Gt.GoToMatchFindAction,label:v("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:Qa}),this._highlightDecorations=[]}run(e,t,n){let r=dr.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(xi).notify({severity:pf.Warning,message:v("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(lr).createInputBox();a.placeholder=v("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let l=d=>{let u=parseInt(d);if(isNaN(u))return;let h=r.getState().matchesCount;if(u>0&&u<=h)return u-1;if(u<0&&u>=-h)return h+u},c=d=>{let u=l(d);if(typeof u=="number"){a.validationMessage=void 0,r.goToMatch(u);let h=r.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(r.goToMatch(d),a.hide()):a.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:vi(q_),position:$r.Full}}}])})}},ky=class extends se{run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.get(t);if(!n)return;let r=pE(t,"single",!1);r&&n.setSearchString(r),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},CE=class extends ky{constructor(){super({id:Gt.NextSelectionMatchFindAction,label:v("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},SE=class extends ky{constructor(){super({id:Gt.PreviousSelectionMatchFindAction,label:v("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},Yme=uw(new dw({id:Gt.StartFindReplaceAction,label:v("startReplace","Replace"),alias:"Replace",precondition:ce.or(O.focus,ce.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:v({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Yme.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(88))return!1;let n=dr.get(e);if(!n)return!1;let r=e.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(39).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop})});Ae(dr.ID,mE,0);X(gE);X(vE);X(_E);X(bE);X(yE);X(CE);X(SE);qs=wi.bindToContribution(dr.get);Me(new qs({id:Gt.CloseFindWidgetCommand,precondition:Qa,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:9,secondary:[1033]}}));Me(new qs({id:Gt.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:b0.primary,mac:b0.mac,win:b0.win,linux:b0.linux}}));Me(new qs({id:Gt.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:y0.primary,mac:y0.mac,win:y0.win,linux:y0.linux}}));Me(new qs({id:Gt.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:C0.primary,mac:C0.mac,win:C0.win,linux:C0.linux}}));Me(new qs({id:Gt.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:S0.primary,mac:S0.mac,win:S0.win,linux:S0.linux}}));Me(new qs({id:Gt.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:w0.primary,mac:w0.mac,win:w0.win,linux:w0.linux}}));Me(new qs({id:Gt.ReplaceOneAction,precondition:Qa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:3094}}));Me(new qs({id:Gt.ReplaceOneAction,precondition:Qa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,_0),primary:3}}));Me(new qs({id:Gt.ReplaceAllAction,precondition:Qa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:2563}}));Me(new qs({id:Gt.ReplaceAllAction,precondition:Qa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,_0),primary:void 0,mac:{primary:2051}}}));Me(new qs({id:Gt.SelectAllMatchesAction,precondition:Qa,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:515}}))});var Fq=M(()=>{});var Hq=M(()=>{Fq()});var Xme,Bq,Uo,zq,A0,ur,wE,L0=M(()=>{Xme={0:" ",1:"u",2:"r"},Bq=65535,Uo=16777215,zq=4278190080,A0=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1<Bq)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new A0(e.length),this._userDefinedStates=new A0(e.length),this._recoveredStates=new A0(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,r)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=r};for(let n=0,r=this._startIndexes.length;nUo||s>Uo)throw new Error("startLineNumber or endLineNumber must not exceed "+Uo);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Uo}getEndLineNumber(e){return this._endIndexes[e]&Uo}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let r=0;r>>24)+((this._endIndexes[e]&zq)>>>16);return t===Bq?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;tArray.isArray(g)?S=>SS=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(d.source===1?g=d:(g=c,g.isCollapsed=d.isCollapsed&&c.endLineNumber===d.endLineNumber,g.source=0),c=o(++a)):(g=d,d.isCollapsed&&d.source===0&&(g.source=2)),d=s(++l);else{let b=l,S=d;for(;;){if(!S||S.startLineNumber>c.endLineNumber){g=c;break}if(S.source===1&&S.endLineNumber>c.endLineNumber)break;S=s(++b)}c=o(++a)}if(g){for(;h&&h.endLineNumberg.startLineNumber&&g.startLineNumber>p&&g.endLineNumber<=n&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),p=g.startLineNumber,h&&u.push(h),h=g)}}return m}},wE=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}});function Uq(i,e,t){let n=[];for(let r of t){let o=i.getRegionAtLine(r);if(o){let s=!o.isCollapsed;if(n.push(o),e>1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c0)for(let o of n){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&cs.isCollapsed!==e&&aa.isCollapsed!==e&&l<=t);r.push(...s)}i.toggleCollapseState(r)}function Wq(i,e,t){let n=[];for(let r of t){let o=i.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&n.push(o[0])}i.toggleCollapseState(n)}function jq(i,e,t,n){let r=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function EE(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let r=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function Ly(i,e,t){let n=i.textModel,r=i.regions,o=[];for(let s=r.length-1;s>=0;s--)if(t!==r.isCollapsed(s)){let a=r.getStartLineNumber(s);e.test(n.getLineContent(a))&&o.push(r.toRegion(s))}i.toggleCollapseState(o)}function My(i,e,t){let n=i.regions,r=[];for(let o=n.length-1;o>=0;o--)t!==n.isCollapsed(o)&&e===n.getType(o)&&r.push(n.toRegion(o));i.toggleCollapseState(r)}function Vq(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let r=n.parentIndex;r!==-1?t=e.regions.getStartLineNumber(r):t=null}return t}function Kq(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,r=0;for(n!==-1&&(r=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function qq(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,r=0;if(n!==-1)r=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex{qt();L0();OP();Ay=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new $e,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new ur(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,r)=>n.regionIndex-r.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let r=0,o=-1,s=-1,a=l=>{for(;rs&&(s=c),r++}};for(let l of e){let c=l.regionIndex,d=this._editorDecorationIds[c];if(d&&!t[d]){t[d]=!0,a(c);let u=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,u),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=r=>{for(let o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;rn&&(n=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(r,o)=>{for(let s of e)if(r=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;let r=[],o=this._textModel.getLineCount();for(let a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>o)continue;let l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&r.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=a.source)!==null&&n!==void 0?n:0})}let s=ur.sanitizeAndMerge(this._regions,r,o);this.updatePost(ur.fromFoldRanges(s))}_getLinesChecksum(e,t){return ub(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){let s=this._regions.toRegion(r);(!t||t(s,o))&&n.push(s),o++,r=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=r,l=this._regions.length;a0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=r,a=this._regions.length;s=e.startLineNumber&&i<=e.endLineNumber}function $q(i,e){let t=k_(i,n=>e=0&&i[t].endLineNumber>=e?i[t]:null}var Dy,Yq=M(()=>{oi();qt();qe();mre();Dy=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new $e,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||hO(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n0}isHidden(e){return $q(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!Qme(s,r))&&(r=$q(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}});function t1e(i,e,t,n=e1e){let r=i.getOptions().tabSize,o=new TE(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let d=i.getLineContent(c),u=qm(d,r),h=a[a.length-1];if(u===-1){e&&(h.endAbove=c);continue}let p;if(s&&(p=d.match(s)))if(p[1]){let m=a.length-1;for(;m>0&&a[m].indent!==-2;)m--;if(m>0){a.length=m+1,h=a[m],o.insertFirst(c,h.line,u),h.line=c,h.indent=u,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>u){do a.pop(),h=a[a.length-1];while(h.indent>u);let m=h.endAbove-1;m-c>=1&&o.insertFirst(c,m,u)}h.indent===u?h.endAbove=c:a.push({indent:u,endAbove:c,line:c})}return o.toIndentRanges(i)}var Jme,Zme,ju,TE,e1e,kE=M(()=>{GO();L0();Jme=5e3,Zme="indent",ju=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=Zme}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(t1e(this.editorModel,n,r,this.foldingRangesLimit))}},TE=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Uo||t>Uo)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)n[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new ur(n,r)}else{this._foldingRangesLimit.update(this._length,t);let n=0,r=this._indentOccurrences.length;for(let l=0;lt){r=l;break}n+=c}}let o=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let d=this._startIndexes[l],u=e.getLineContent(d),h=qm(u,o);(h{}}});var i1e,IE,AE,Xq,Qq,LE,Ur,Jq=M(()=>{or();Vc();qn();De();_r();Al();ar();qr();i1e=Oe("editor.foldBackground",{light:Rr(Cw,.3),dark:Rr(Cw,.3),hcDark:null,hcLight:null},v("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Oe("editorGutter.foldingControlForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));IE=Ei("folding-expanded",lt.chevronDown,v("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),AE=Ei("folding-collapsed",lt.chevronRight,v("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),Xq=Ei("folding-manual-collapsed",AE,v("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),Qq=Ei("folding-manual-expanded",IE,v("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),LE={color:vi(i1e),position:pa.Inline},Ur=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};Ur.COLLAPSED_VISUAL_DECORATION=ct.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(AE)});Ur.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ct.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:LE,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(AE)});Ur.MANUALLY_COLLAPSED_VISUAL_DECORATION=ct.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Xq)});Ur.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ct.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:LE,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Xq)});Ur.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Ur.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:LE,isWholeLine:!0});Ur.EXPANDED_VISUAL_DECORATION=ct.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+mt.asClassName(IE)});Ur.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ct.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(IE)});Ur.MANUALLY_EXPANDED_VISUAL_DECORATION=ct.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+mt.asClassName(Qq)});Ur.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ct.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Qq)});Ur.NO_CONTROLS_EXPANDED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Ur.HIDDEN_RANGE_DECORATION=ct.register({description:"folding-hidden-range-decoration",stickiness:1})});function o1e(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,n1e,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},Ut));return Promise.all(r).then(o=>n)}function s1e(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new ME(e),r,o=[];for(let s of t)if(!r)r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}n.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return n.toIndentRanges()}var n1e,r1e,Vu,ME,DE=M(()=>{At();Ce();L0();n1e={},r1e="syntax",Vu=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=r1e,this.disposables=new ne,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return o1e(this.providers,this.editorModel,e).then(t=>{var n,r;return t?s1e(t,this.foldingRangesLimit):(r=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}};ME=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,r){if(e>Uo||t>Uo)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=r,this._types[o]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=0;re){n=a;break}t+=l}}let r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a{Dt();gi();At();gl();Ce();Si();Li();Hq();db();Ze();jt();br();Kn();Gq();Yq();kE();De();ft();Jq();L0();DE();Ro();Ns();ml();xt();qt();Bi();Sn();ts();jn();l1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},M0=function(i,e){return function(t,n){e(t,n,i)}},c1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Jn=new nt("foldingEnabled",!1),el=class D0 extends oe{static get(e){return e.getContribution(D0.ID)}static getFoldingRangeProviders(e,t){var n,r;let o=e.foldingRangeProvider.ordered(t);return(r=(n=D0._foldingRangeSelector)===null||n===void 0?void 0:n.call(D0,o,t))!==null&&r!==void 0?r:o}constructor(e,t,n,r,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new ne),this.editor=e,this._foldingLimitReporter=new N0(e);let a=this.editor.getOptions();this._isEnabled=a.get(41),this._useFoldingProviders=a.get(42)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(46),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(44),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Ur(e),this.foldingDecorationProvider.showFoldingControls=a.get(106),this.foldingDecorationProvider.showFoldingHighlights=a.get(43),this.foldingEnabled=Jn.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(41)&&(this._isEnabled=this.editor.getOptions().get(41),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(45)&&this.onModelChanged(),l.hasChanged(106)||l.hasChanged(43)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(106),this.foldingDecorationProvider.showFoldingHighlights=c.get(43),this.triggerFoldingModelChanged()}l.hasChanged(42)&&(this._useFoldingProviders=this.editor.getOptions().get(42)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(46)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(46)),l.hasChanged(44)&&(this._foldingImportsByDefault=this.editor.getOptions().get(44))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new Ay(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new Dy(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new No(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new ti(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new ju(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=D0.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new Vu(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new Ln(!0),n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=Vt(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(uf.Imports.value,!0);d&&(s=Ea.capture(this.editor),this._currentModelHasFoldedImports=d)}let a=this.editor.getSelections(),l=a?a.map(d=>d.startLineNumber):[];e.update(o,l),s==null||s.restore(this.editor);let c=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=c)}return e})}).then(void 0,e=>(at(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let r=[];for(let o of n){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(t.toggleCollapseState(r),this.reveal(n[0].getPosition()))}}}).then(void 0,at)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<5)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==n)return;if(r){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(r||a){let l=e.event.altKey,c=[];if(l){let d=h=>!h.containedBy(s)&&!s.containedBy(h),u=t.getRegionsInside(null,d);for(let h of u)h.isCollapsed&&c.push(h);c.length===0&&(c=u)}else{let d=e.event.middleButton||e.event.shiftKey;if(d)for(let u of t.getRegionsInside(s))u.isCollapsed===a&&c.push(u);(a||!d||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};el.ID="editor.contrib.folding";el=l1e([M0(1,Ke),M0(2,Tt),M0(3,xi),M0(4,an),M0(5,be)],el);N0=class{constructor(e){this.editor=e,this._onDidChange=new $e,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Rn=class extends se{runEditorCommand(e,t,n){let r=e.get(Tt),o=el.get(t);if(!o)return;let s=o.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(o,a,t,n,r);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};NE=class extends Rn{constructor(){super({id:"editor.unfold",label:v("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: +2: False`)},findInSelection:{type:"boolean"}}}}]},uE=class extends se{constructor(){super({id:Gt.StartFindWithArgs,label:v("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:$me})}run(e,t,n){return Uu(this,void 0,void 0,function*(){let r=dr.get(t);if(r){let o=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(39).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}})}},hE=class extends se{constructor(){super({id:Gt.StartFindWithSelection,label:v("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}},my=class extends se{run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},fE=class extends my{constructor(){super({id:Gt.NextMatchFindAction,label:v("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:O.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:ce.and(O.focus,ep),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},pE=class extends my{constructor(){super({id:Gt.PreviousMatchFindAction,label:v("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:O.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:ce.and(O.focus,ep),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},mE=class extends se{constructor(){super({id:Gt.GoToMatchFindAction,label:v("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:Xa}),this._highlightDecorations=[]}run(e,t,n){let r=dr.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(Ei).notify({severity:pf.Warning,message:v("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(lr).createInputBox();a.placeholder=v("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let l=d=>{let u=parseInt(d);if(isNaN(u))return;let h=r.getState().matchesCount;if(u>0&&u<=h)return u-1;if(u<0&&u>=-h)return h+u},c=d=>{let u=l(d);if(typeof u=="number"){a.validationMessage=void 0,r.goToMatch(u);let h=r.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(r.goToMatch(d),a.hide()):a.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:vi(K_),position:$r.Full}}}])})}},gy=class extends se{run(e,t){return Uu(this,void 0,void 0,function*(){let n=dr.get(t);if(!n)return;let r=cE(t,"single",!1);r&&n.setSearchString(r),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},gE=class extends gy{constructor(){super({id:Gt.NextSelectionMatchFindAction,label:v("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},vE=class extends gy{constructor(){super({id:Gt.PreviousSelectionMatchFindAction,label:v("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},Yme=dw(new cw({id:Gt.StartFindReplaceAction,label:v("startReplace","Replace"),alias:"Replace",precondition:ce.or(O.focus,ce.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:v({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Yme.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(88))return!1;let n=dr.get(e);if(!n)return!1;let r=e.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(39).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop})});Ae(dr.ID,dE,0);X(uE);X(hE);X(fE);X(pE);X(mE);X(gE);X(vE);qs=xi.bindToContribution(dr.get);Me(new qs({id:Gt.CloseFindWidgetCommand,precondition:Xa,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:9,secondary:[1033]}}));Me(new qs({id:Gt.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:_0.primary,mac:_0.mac,win:_0.win,linux:_0.linux}}));Me(new qs({id:Gt.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:b0.primary,mac:b0.mac,win:b0.win,linux:b0.linux}}));Me(new qs({id:Gt.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:y0.primary,mac:y0.mac,win:y0.win,linux:y0.linux}}));Me(new qs({id:Gt.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:C0.primary,mac:C0.mac,win:C0.win,linux:C0.linux}}));Me(new qs({id:Gt.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:S0.primary,mac:S0.mac,win:S0.win,linux:S0.linux}}));Me(new qs({id:Gt.ReplaceOneAction,precondition:Xa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:3094}}));Me(new qs({id:Gt.ReplaceOneAction,precondition:Xa,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,v0),primary:3}}));Me(new qs({id:Gt.ReplaceAllAction,precondition:Xa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:2563}}));Me(new qs({id:Gt.ReplaceAllAction,precondition:Xa,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:ce.and(O.focus,v0),primary:void 0,mac:{primary:2051}}}));Me(new qs({id:Gt.SelectAllMatchesAction,precondition:Xa,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:O.focus,primary:515}}))});var vq=M(()=>{});var _q=M(()=>{vq()});var Xme,bq,Wo,yq,I0,ur,_E,A0=M(()=>{Xme={0:" ",1:"u",2:"r"},bq=65535,Wo=16777215,yq=4278190080,I0=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1<bq)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new I0(e.length),this._userDefinedStates=new I0(e.length),this._recoveredStates=new I0(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,r)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=r};for(let n=0,r=this._startIndexes.length;nWo||s>Wo)throw new Error("startLineNumber or endLineNumber must not exceed "+Wo);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Wo}getEndLineNumber(e){return this._endIndexes[e]&Wo}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let r=0;r>>24)+((this._endIndexes[e]&yq)>>>16);return t===bq?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;tArray.isArray(g)?S=>SS=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(d.source===1?g=d:(g=c,g.isCollapsed=d.isCollapsed&&c.endLineNumber===d.endLineNumber,g.source=0),c=o(++a)):(g=d,d.isCollapsed&&d.source===0&&(g.source=2)),d=s(++l);else{let b=l,S=d;for(;;){if(!S||S.startLineNumber>c.endLineNumber){g=c;break}if(S.source===1&&S.endLineNumber>c.endLineNumber)break;S=s(++b)}c=o(++a)}if(g){for(;h&&h.endLineNumberg.startLineNumber&&g.startLineNumber>p&&g.endLineNumber<=n&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),p=g.startLineNumber,h&&u.push(h),h=g)}}return m}},_E=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}});function Cq(i,e,t){let n=[];for(let r of t){let o=i.getRegionAtLine(r);if(o){let s=!o.isCollapsed;if(n.push(o),e>1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c0)for(let o of n){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&cs.isCollapsed!==e&&aa.isCollapsed!==e&&l<=t);r.push(...s)}i.toggleCollapseState(r)}function Sq(i,e,t){let n=[];for(let r of t){let o=i.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&n.push(o[0])}i.toggleCollapseState(n)}function wq(i,e,t,n){let r=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function yE(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let r=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function by(i,e,t){let n=i.textModel,r=i.regions,o=[];for(let s=r.length-1;s>=0;s--)if(t!==r.isCollapsed(s)){let a=r.getStartLineNumber(s);e.test(n.getLineContent(a))&&o.push(r.toRegion(s))}i.toggleCollapseState(o)}function yy(i,e,t){let n=i.regions,r=[];for(let o=n.length-1;o>=0;o--)t!==n.isCollapsed(o)&&e===n.getType(o)&&r.push(n.toRegion(o));i.toggleCollapseState(r)}function xq(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let r=n.parentIndex;r!==-1?t=e.regions.getStartLineNumber(r):t=null}return t}function Eq(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,r=0;for(n!==-1&&(r=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function Tq(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,r=0;if(n!==-1)r=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex{qt();A0();NP();_y=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new $e,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new ur(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,r)=>n.regionIndex-r.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let r=0,o=-1,s=-1,a=l=>{for(;rs&&(s=c),r++}};for(let l of e){let c=l.regionIndex,d=this._editorDecorationIds[c];if(d&&!t[d]){t[d]=!0,a(c);let u=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,u),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=r=>{for(let o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;rn&&(n=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(r,o)=>{for(let s of e)if(r=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;let r=[],o=this._textModel.getLineCount();for(let a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>o)continue;let l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&r.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=a.source)!==null&&n!==void 0?n:0})}let s=ur.sanitizeAndMerge(this._regions,r,o);this.updatePost(ur.fromFoldRanges(s))}_getLinesChecksum(e,t){return db(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){let s=this._regions.toRegion(r);(!t||t(s,o))&&n.push(s),o++,r=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=r,l=this._regions.length;a0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=r,a=this._regions.length;s=e.startLineNumber&&i<=e.endLineNumber}function Iq(i,e){let t=T_(i,n=>e=0&&i[t].endLineNumber>=e?i[t]:null}var Cy,Aq=M(()=>{oi();qt();qe();gre();Cy=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new $e,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||dO(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n0}isHidden(e){return Iq(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!Qme(s,r))&&(r=Iq(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}});function t1e(i,e,t,n=e1e){let r=i.getOptions().tabSize,o=new CE(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let d=i.getLineContent(c),u=Km(d,r),h=a[a.length-1];if(u===-1){e&&(h.endAbove=c);continue}let p;if(s&&(p=d.match(s)))if(p[1]){let m=a.length-1;for(;m>0&&a[m].indent!==-2;)m--;if(m>0){a.length=m+1,h=a[m],o.insertFirst(c,h.line,u),h.line=c,h.indent=u,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>u){do a.pop(),h=a[a.length-1];while(h.indent>u);let m=h.endAbove-1;m-c>=1&&o.insertFirst(c,m,u)}h.indent===u?h.endAbove=c:a.push({indent:u,endAbove:c,line:c})}return o.toIndentRanges(i)}var Jme,Zme,ju,CE,e1e,SE=M(()=>{KO();A0();Jme=5e3,Zme="indent",ju=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=Zme}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(t1e(this.editorModel,n,r,this.foldingRangesLimit))}},CE=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Wo||t>Wo)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)n[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new ur(n,r)}else{this._foldingRangesLimit.update(this._length,t);let n=0,r=this._indentOccurrences.length;for(let l=0;lt){r=l;break}n+=c}}let o=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let d=this._startIndexes[l],u=e.getLineContent(d),h=Km(u,o);(h{}}});var i1e,wE,xE,Lq,Mq,EE,Ur,Dq=M(()=>{or();Kc();qn();De();_r();Al();ar();qr();i1e=Oe("editor.foldBackground",{light:Or(yw,.3),dark:Or(yw,.3),hcDark:null,hcLight:null},v("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Oe("editorGutter.foldingControlForeground",{dark:Fm,light:Fm,hcDark:Fm,hcLight:Fm},v("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));wE=Ti("folding-expanded",lt.chevronDown,v("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),xE=Ti("folding-collapsed",lt.chevronRight,v("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),Lq=Ti("folding-manual-collapsed",xE,v("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),Mq=Ti("folding-manual-expanded",wE,v("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),EE={color:vi(i1e),position:pa.Inline},Ur=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};Ur.COLLAPSED_VISUAL_DECORATION=ct.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(xE)});Ur.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ct.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:EE,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(xE)});Ur.MANUALLY_COLLAPSED_VISUAL_DECORATION=ct.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Lq)});Ur.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ct.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:EE,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Lq)});Ur.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Ur.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:EE,isWholeLine:!0});Ur.EXPANDED_VISUAL_DECORATION=ct.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+mt.asClassName(wE)});Ur.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ct.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(wE)});Ur.MANUALLY_EXPANDED_VISUAL_DECORATION=ct.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+mt.asClassName(Mq)});Ur.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ct.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:mt.asClassName(Mq)});Ur.NO_CONTROLS_EXPANDED_RANGE_DECORATION=ct.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Ur.HIDDEN_RANGE_DECORATION=ct.register({description:"folding-hidden-range-decoration",stickiness:1})});function o1e(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,n1e,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},Ut));return Promise.all(r).then(o=>n)}function s1e(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new TE(e),r,o=[];for(let s of t)if(!r)r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}n.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return n.toIndentRanges()}var n1e,r1e,Vu,TE,kE=M(()=>{At();Ce();A0();n1e={},r1e="syntax",Vu=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=r1e,this.disposables=new ne,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return o1e(this.providers,this.editorModel,e).then(t=>{var n,r;return t?s1e(t,this.foldingRangesLimit):(r=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}};TE=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,r){if(e>Wo||t>Wo)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=r,this._types[o]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=0;re){n=a;break}t+=l}}let r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a{Dt();gi();At();gl();Ce();wi();Mi();_q();cb();Ze();jt();br();Kn();kq();Aq();SE();De();ft();Dq();A0();kE();Oo();Ns();ml();xt();qt();zi();Sn();is();jn();l1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},L0=function(i,e){return function(t,n){e(t,n,i)}},c1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Jn=new nt("foldingEnabled",!1),Za=class M0 extends oe{static get(e){return e.getContribution(M0.ID)}static getFoldingRangeProviders(e,t){var n,r;let o=e.foldingRangeProvider.ordered(t);return(r=(n=M0._foldingRangeSelector)===null||n===void 0?void 0:n.call(M0,o,t))!==null&&r!==void 0?r:o}constructor(e,t,n,r,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new ne),this.editor=e,this._foldingLimitReporter=new D0(e);let a=this.editor.getOptions();this._isEnabled=a.get(41),this._useFoldingProviders=a.get(42)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(46),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(44),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Ur(e),this.foldingDecorationProvider.showFoldingControls=a.get(106),this.foldingDecorationProvider.showFoldingHighlights=a.get(43),this.foldingEnabled=Jn.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(41)&&(this._isEnabled=this.editor.getOptions().get(41),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(45)&&this.onModelChanged(),l.hasChanged(106)||l.hasChanged(43)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(106),this.foldingDecorationProvider.showFoldingHighlights=c.get(43),this.triggerFoldingModelChanged()}l.hasChanged(42)&&(this._useFoldingProviders=this.editor.getOptions().get(42)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(46)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(46)),l.hasChanged(44)&&(this._foldingImportsByDefault=this.editor.getOptions().get(44))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new _y(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new Cy(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Ro(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new ti(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new ju(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=M0.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new Vu(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new Ln(!0),n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=Vt(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(uf.Imports.value,!0);d&&(s=Ea.capture(this.editor),this._currentModelHasFoldedImports=d)}let a=this.editor.getSelections(),l=a?a.map(d=>d.startLineNumber):[];e.update(o,l),s==null||s.restore(this.editor);let c=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=c)}return e})}).then(void 0,e=>(at(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let r=[];for(let o of n){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(t.toggleCollapseState(r),this.reveal(n[0].getPosition()))}}}).then(void 0,at)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<5)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==n)return;if(r){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(r||a){let l=e.event.altKey,c=[];if(l){let d=h=>!h.containedBy(s)&&!s.containedBy(h),u=t.getRegionsInside(null,d);for(let h of u)h.isCollapsed&&c.push(h);c.length===0&&(c=u)}else{let d=e.event.middleButton||e.event.shiftKey;if(d)for(let u of t.getRegionsInside(s))u.isCollapsed===a&&c.push(u);(a||!d||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Za.ID="editor.contrib.folding";Za=l1e([L0(1,Ke),L0(2,Tt),L0(3,Ei),L0(4,an),L0(5,be)],Za);D0=class{constructor(e){this.editor=e,this._onDidChange=new $e,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Rn=class extends se{runEditorCommand(e,t,n){let r=e.get(Tt),o=Za.get(t);if(!o)return;let s=o.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(o,a,t,n,r);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};IE=class extends Rn{constructor(){super({id:"editor.unfold",label:v("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to unfold. If not set, defaults to 1. * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. - `,constraint:Zq,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=r&&r.levels||1,s=this.getLineNumbers(r,n);r&&r.direction==="up"?xE(t,!1,o,s):Wu(t,!1,o,s)}},RE=class extends Rn{constructor(){super({id:"editor.unfoldRecursively",label:v("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2142),weight:100}})}invoke(e,t,n,r){Wu(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}},OE=class extends Rn{constructor(){super({id:"editor.fold",label:v("foldAction.label","Fold"),alias:"Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: + `,constraint:Nq,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=r&&r.levels||1,s=this.getLineNumbers(r,n);r&&r.direction==="up"?bE(t,!1,o,s):Wu(t,!1,o,s)}},AE=class extends Rn{constructor(){super({id:"editor.unfoldRecursively",label:v("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2142),weight:100}})}invoke(e,t,n,r){Wu(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}},LE=class extends Rn{constructor(){super({id:"editor.fold",label:v("foldAction.label","Fold"),alias:"Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to fold. * 'direction': If 'up', folds given number of levels up otherwise folds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. - `,constraint:Zq,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=this.getLineNumbers(r,n),s=r&&r.levels,a=r&&r.direction;typeof s!="number"&&typeof a!="string"?Wq(t,!0,o):a==="up"?xE(t,!0,s||1,o):Wu(t,!0,s||1,o)}},PE=class extends Rn{constructor(){super({id:"editor.toggleFold",label:v("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2090),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);Uq(t,1,r)}},FE=class extends Rn{constructor(){super({id:"editor.foldRecursively",label:v("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2140),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);Wu(t,!0,Number.MAX_VALUE,r)}},HE=class extends Rn{constructor(){super({id:"editor.foldAllBlockComments",label:v("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2138),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())My(t,uf.Comment.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+vl(a.blockCommentStartToken));Ly(t,l,!0)}}}},BE=class extends Rn{constructor(){super({id:"editor.foldAllMarkerRegions",label:v("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2077),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())My(t,uf.Region.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);Ly(t,l,!0)}}}},zE=class extends Rn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:v("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2078),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())My(t,uf.Region.value,!1);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);Ly(t,l,!1)}}}},UE=class extends Rn{constructor(){super({id:"editor.foldAllExcept",label:v("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2136),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);EE(t,!0,r)}},WE=class extends Rn{constructor(){super({id:"editor.unfoldAllExcept",label:v("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2134),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);EE(t,!1,r)}},jE=class extends Rn{constructor(){super({id:"editor.foldAll",label:v("foldAllAction.label","Fold All"),alias:"Fold All",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2069),weight:100}})}invoke(e,t,n){Wu(t,!0)}},VE=class extends Rn{constructor(){super({id:"editor.unfoldAll",label:v("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2088),weight:100}})}invoke(e,t,n){Wu(t,!1)}},Ku=class i extends Rn{getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,n){jq(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}};Ku.ID_PREFIX="editor.foldLevel";Ku.ID=i=>Ku.ID_PREFIX+i;KE=class extends Rn{constructor(){super({id:"editor.gotoParentFold",label:v("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Vq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},qE=class extends Rn{constructor(){super({id:"editor.gotoPreviousFold",label:v("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Kq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},GE=class extends Rn{constructor(){super({id:"editor.gotoNextFold",label:v("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=qq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},$E=class extends Rn{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:v("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2135),weight:100}})}invoke(e,t,n){var r;let o=[],s=n.getSelections();if(s){for(let a of s){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(o.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(o.length>0){o.sort((l,c)=>l.startLineNumber-c.startLineNumber);let a=ur.sanitizeAndMerge(t.regions,o,(r=n.getModel())===null||r===void 0?void 0:r.getLineCount());t.updatePost(ur.fromFoldRanges(a))}}}},YE=class extends Rn{constructor(){super({id:"editor.removeManualFoldingRanges",label:v("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2137),weight:100}})}invoke(e,t,n){let r=n.getSelections();if(r){let o=[];for(let s of r){let{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}};Ae(el.ID,el,0);X(NE);X(RE);X(OE);X(FE);X(jE);X(VE);X(HE);X(BE);X(zE);X(UE);X(WE);X(PE);X(KE);X(qE);X(GE);X($E);X(YE);for(let i=1;i<=7;i++)AR(new Ku({id:Ku.ID(i),label:v("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2048|21+i),weight:100}}));St.registerCommand("_executeFoldingRangeProvider",function(i,...e){return c1e(this,void 0,void 0,function*(){let[t]=e;if(!(t instanceof ht))throw Io();let n=i.get(be),r=i.get(Ci).getModel(t);if(!r)throw Io();let o=i.get(Mt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(Tt),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(p,m)=>{}},c=new ju(r,s,l),d=c;if(a!=="indentation"){let p=el.getFoldingRangeProviders(n,r);p.length&&(d=new Vu(r,p,()=>{},l,c))}let u=yield d.compute(et.None),h=[];try{if(u)for(let p=0;p{Ze();jre();De();XE=class extends se{constructor(){super({id:"editor.action.fontZoomIn",label:v("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){vf.setZoomLevel(vf.getZoomLevel()+1)}},QE=class extends se{constructor(){super({id:"editor.action.fontZoomOut",label:v("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){vf.setZoomLevel(vf.getZoomLevel()-1)}},JE=class extends se{constructor(){super({id:"editor.action.fontZoomReset",label:v("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){vf.setZoomLevel(0)}};X(XE);X(QE);X(JE)});var n7=gt(qu=>{oi();gi();At();gl();Ce();Ze();Ar();fw();qe();jt();hb();xt();Kre();Vre();De();Bi();ft();Et();qc();var eG=qu&&qu.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ry=qu&&qu.__param||function(i,e){return function(t,n){e(t,n,i)}},i7=qu&&qu.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},R0=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new ne,this._sessionDisposables=new ne,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(54)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(54)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new eu;for(let r of t.autoFormatTriggerCharacters)n.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{let o=r.charCodeAt(r.length-1);n.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=new Ni,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a{r.token.isCancellationRequested||Ui(s)&&(FP.execute(this._editor,s,!0),HP(s))}).finally(()=>{o.dispose()})}};R0.ID="editor.contrib.autoFormat";R0=eG([Ry(1,be),Ry(2,Ml)],R0);var O0=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new ne,this._callOnModel=new ne,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(53)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(Uw,this.editor,e,2,wa.None,et.None).catch(at))}};O0.ID="editor.contrib.formatOnPaste";O0=eG([Ry(1,be),Ry(2,He)],O0);var e7=class extends se{constructor(){super({id:"editor.action.formatDocument",label:v("formatDocument.label","Format Document"),alias:"Format Document",precondition:ce.and(O.notInCompositeEditor,O.writable,O.hasDocumentFormattingProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return i7(this,void 0,void 0,function*(){if(t.hasModel()){let n=e.get(He);yield e.get(El).showWhile(n.invokeFunction(BP,t,1,wa.None,et.None),250)}})}},t7=class extends se{constructor(){super({id:"editor.action.formatSelection",label:v("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ce.and(O.writable,O.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2084),weight:100},contextMenuOpts:{when:O.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return i7(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(He),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new P(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);yield e.get(El).showWhile(n.invokeFunction(Uw,t,o,1,wa.None,et.None),250)})}};Ae(R0.ID,R0,2);Ae(O0.ID,O0,2);X(e7);X(t7);St.registerCommand("editor.action.format",i=>i7(void 0,void 0,void 0,function*(){let e=i.get(Zt).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(ui);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var np,yd,Wo,lc=M(()=>{np=class{constructor(e,t,n,r){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}},yd=class{constructor(e,t,n,r,o,s){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}},Wo=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});function iG(i){tG=i}function ys(){return tG}function d1e(i){let e=new Array,n={},r="";function o(a){if("length"in a)for(let l of a)l&&o(l);else"text"in a?(r+=`%c${a.text}`,e.push(a.style),a.data&&Object.assign(n,a.data)):"data"in a&&Object.assign(n,a.data)}o(i);let s=[r,...e];return Object.keys(n).length>0&&s.push(n),s}function Oy(i){return tl(i,{color:"black"})}function P0(i){return tl(p1e(`${i}: `,10),{color:"black",bold:!0})}function tl(i,e={color:"black"}){function t(r){return Object.entries(r).reduce((o,[s,a])=>`${o}${s}:${a};`,"")}let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:i,style:t(n)}}function Fy(i,e){switch(typeof i){case"number":return""+i;case"string":return i.length+2<=e?`"${i}"`:`"${i.substr(0,e-7)}"+...`;case"boolean":return i?"true":"false";case"undefined":return"undefined";case"object":return i===null?"null":Array.isArray(i)?u1e(i,e):h1e(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function u1e(i,e){let t="[ ",n=!0;for(let r of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${Fy(r,e-t.length)}`}return t+=" ]",t}function h1e(i,e){let t="{ ",n=!0;for(let[r,o]of Object.entries(i)){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${r}: ${Fy(o,e-t.length)}`}return t+=" }",t}function f1e(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function p1e(i,e){for(;i.length{Py=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return d1e([Oy(f1e("| ",this.indentation)),e])}formatInfo(e){return e.didChange?[Oy(" "),tl(Fy(e.oldValue,70),{color:"red",strikeThrough:!0}),Oy(" "),tl(Fy(e.newValue,60),{color:"green"})]:[Oy(" (unchanged)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([P0("observable value changed"),tl(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return tl(" (changed deps: "+[...e].map(t=>t.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleDerivedRecomputed(e,t){let n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([P0("derived recomputed"),tl(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n)])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([P0("observable from event triggered"),tl(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}handleAutorunCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleAutorunTriggered(e){let t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([P0("autorun"),tl(e.debugName,{color:"BlueViolet"}),this.formatChanges(t)])),t.clear()}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([P0("transaction"),tl(t,{color:"BlueViolet"})])),this.indentation++}handleEndTransaction(){this.indentation--}}});function rG(i){nG=i}function dn(i,e){var t,n;let r=new Hy(i,e);try{(t=ys())===null||t===void 0||t.handleBeginTransaction(r),i(r)}finally{r.finish(),(n=ys())===null||n===void 0||n.handleEndTransaction()}}function o7(i,e,t){i?e(i):dn(e,t)}function zy(i){let e=i.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),r=n?n[1]:void 0;return r==null?void 0:r.trim()}function Gs(i,e){return new By(i,e)}function H0(i,e){return new r7(i,e)}var nG,F0,cc,Hy,By,r7,Gu=M(()=>{rp();F0=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e){return nG(()=>{let t=zy(e);return t!==void 0?t:`${this.debugName} (mapped)`},t=>e(this.read(t),t))}},cc=class extends F0{constructor(){super(...arguments),this.observers=new Set}addObserver(e){let t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}};Hy=class{constructor(e,t){this.fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():zy(this.fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){let e=this.updatingObservers;this.updatingObservers=null;for(let{observer:t,observable:n}of e)t.endUpdate(n)}};By=class extends cc{constructor(e,t){super(),this.debugName=e,this._value=t}get(){return this._value}set(e,t,n){var r;if(this._value===e)return;let o;t||(t=o=new Hy(()=>{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(r=ys())===null||r===void 0||r.handleObservableChanged(this,{oldValue:s,newValue:e,change:n,didChange:!0});for(let a of this.observers)t.updateObserver(a,this),a.handleChange(this,n)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};r7=class extends By{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}});function wr(i,e){return new Uy(i,e,void 0,void 0)}function oG(i,e,t){return new Uy(i,t,e.createEmptyChangeSummary,e.handleChange)}var Uy,s7=M(()=>{At();Gu();rp();rG(wr);Uy=class extends cc{get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(e,t,n,r){var o,s;super(),this._debugName=e,this.computeFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=ys())===null||s===void 0||s.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}get(){var e;if(this.observers.size===0){let t=this.computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){this.state=3;for(let t of this.dependencies)if(t.reportChanges(),this.state===2)break}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;let r=this.state!==0,o=this.value;this.state=3;let s=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this.computeFn(this,s)}finally{for(let l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}let a=r&&o!==this.value;if((t=ys())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:a}),a)for(let l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;let t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(let n of this.observers)n.handlePossibleChange(this);if(t)for(let n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){let t=[...this.observers];for(let n of t)n.endUpdate(this)}if(this.updateCount<0)throw new Xd}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(let t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){let n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary):!0,r=this.state===3;if(n&&(this.state===1||r)&&(this.state=2,r))for(let o of this.observers)o.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){let t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}});function un(i,e){return new Wy(i,e,void 0,void 0)}function sG(i,e){return aG(e,i)}function aG(i,e){let t=new ne,n=un(e,r=>{t.clear(),i(r,t)});return Ft(()=>{n.dispose(),t.dispose()})}var Wy,a7=M(()=>{kR();Ce();rp();Wy=class{constructor(e,t,n,r){var o,s;this.debugName=e,this.runFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=ys())===null||s===void 0||s.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3,(e=ys())===null||e===void 0||e.handleAutorunTriggered(this);try{let r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this.runFn(this,r)}finally{for(let r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,TR(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}};(function(i){i.Observer=Wy})(un||(un={}))});function Vy(i){return new l7(i)}function $s(i,e){return new jy(i,e)}function lG(i,e){return new c7(i,e)}function cG(i){return new d7(i)}function dG(i,e){let t=new u7(e!=null?e:!1);return i.addObserver(t),e&&i.reportChanges(),Ft(()=>{i.removeObserver(t)})}var l7,jy,c7,d7,u7,uG=M(()=>{Ce();Gu();rp();l7=class extends F0{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};jy=class extends cc{constructor(e,t){super(),this.event=e,this.getValue=t,this.hasValue=!1,this.handleEvent=n=>{var r;let o=this.getValue(n),s=!this.hasValue||this.value!==o;(r=ys())===null||r===void 0||r.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:o,change:void 0,didChange:s}),s&&(this.value=o,this.hasValue&&dn(a=>{for(let l of this.observers)a.updateObserver(l,this),l.handleChange(this,void 0)},()=>{let a=this.getDebugName();return"Event fired"+(a?`: ${a}`:"")}),this.hasValue=!0)}}getDebugName(){return zy(this.getValue)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this.getValue(void 0)}};(function(i){i.Observer=jy})($s||($s={}));c7=class extends cc{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{dn(n=>{for(let r of this.observers)n.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}};d7=class extends cc{constructor(e){super(),this.debugName=e}trigger(e,t){if(!e){dn(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}};u7=class{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,this.counter===0&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}});var m1e,Ys=M(()=>{Gu();s7();a7();uG();rp();m1e=!1;m1e&&iG(new Py)});var Ky,qy,Gy,$y=M(()=>{Ky="editor.action.inlineSuggest.commit",qy="editor.action.inlineSuggest.showPrevious",Gy="editor.action.inlineSuggest.showNext"});var In,Yy=M(()=>{Ys();Si();nre();ft();Ce();De();In=class i extends oe{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=i.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=i.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=i.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=i.suppressSuggestions.bindTo(this.contextKeyService),this._register(un("update context key: inlineCompletionVisible, suppressSuggestions",n=>{let r=this.model.read(n),o=r==null?void 0:r.selectedInlineCompletion.read(n),s=r==null?void 0:r.ghostText.read(n),a=r==null?void 0:r.selectedSuggestItem.read(n);this.inlineCompletionVisible.set(a===void 0&&s!==void 0&&!s.isEmpty()),s&&o&&this.suppressSuggestions.set(o.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(un("update context key: inlineCompletionSuggestsIndentation, inlineCompletionSuggestsIndentationLessThanTabSize",n=>{let r=this.model.read(n),o=!1,s=!0,a=r==null?void 0:r.ghostText.read(n);if(r!=null&&r.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],d=c[0],u=r.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let p=Mm(d);p===-1&&(p=d.length-1),o=p>0;let m=r.textModel.getOptions().tabSize;s=LR.visibleColumnFromColumn(d,p+1,m){});var fG=M(()=>{hG()});function pG(i,e){let t=new h7(i),n=e.map(r=>{let o=P.lift(r.range);return{startOffset:t.getOffset(o.getStartPosition()),endOffset:t.getOffset(o.getEndPosition()),text:r.text}});n.sort((r,o)=>o.startOffset-r.startOffset);for(let r of n)i=i.substring(0,r.startOffset)+r.text+i.substring(r.endOffset);return i}function mG(){return g1e}function gG(i,e){let t=new ne,n=i.createDecorationsCollection();return t.add(un(`Apply decorations from ${e.debugName}`,r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}function B0(i,e){return new Se(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function z0(i){let e=1,t=1;for(let n of i)n===` -`?(e++,t=1):t++;return new Se(e,t)}var h7,g1e,Xy,op=M(()=>{At();Ce();Ys();ri();qe();h7=class{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tt)throw new Xd(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new P(e,this.startColumn,e,this.endColumnExclusive)}}});var sp,ap,Qy,Jy=M(()=>{op();sp=class{constructor(e,t){this.lineNumber=e,this.parts=t}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return pG(n,this.parts.map(o=>({range:{startLineNumber:1,endLineNumber:1,startColumn:o.column,endColumn:o.column},text:o.lines.join(` -`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}},ap=class{constructor(e,t,n){this.column=e,this.lines=t,this.preview=n}},Qy=class{constructor(e,t,n,r=0){this.lineNumber=e,this.columnRange=t,this.newLines=n,this.additionalReservedLineCount=r,this.parts=[new ap(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(` -`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}}});function b1e(i,e,t,n,r){let o=n.get(31),s=n.get(113),a="none",l=n.get(90),c=n.get(49),d=n.get(48),u=n.get(64),h=new A_(1e4);h.appendString('
');for(let g=0,b=t.length;g');let N=y_(k),A=wR(k),H=iP.createEmpty(k,r);gb(new mb(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,k,!1,N,A,0,H,S.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==oP.OFF,null),h),h.appendString("
")}h.appendString(""),pb(i,d);let p=h.build(),m=vG?vG.createHTML(p):p;i.innerHTML=m}var v1e,_1e,Zy,f7,vG,_G=M(()=>{Ww();qt();Ce();Ys();Si();fG();UP();Qm();ri();qe();VR();os();Vc();Ere();WP();jP();Jy();op();v1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_1e=function(i,e){return function(t,n){e(t,n,i)}},Zy=class extends oe{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Gs("isDisposed",!1),this.currentTextModel=$s(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=wr("uiState",r=>{if(this.isDisposed.read(r))return;let o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;let s=this.model.ghostText.read(r);if(!s)return;let a=s instanceof Qy?s.columnRange:void 0,l=[],c=[];function d(g,b){if(c.length>0){let S=c[c.length-1];b&&S.decorations.push(new i1(S.content.length+1,S.content.length+1+g[0].length,b,0)),S.content+=g[0],g=g.slice(1)}for(let S of g)c.push({content:S,decorations:b?[new i1(1,S.length+1,b,0)]:[]})}let u=o.getLineContent(s.lineNumber),h,p=0;for(let g of s.parts){let b=g.lines;h===void 0?(l.push({column:g.column,text:b[0],preview:g.preview}),b=b.slice(1)):d([u.substring(p,g.column-1)],void 0),b.length>0&&(d(b,"ghost-text"),h===void 0&&g.column<=u.length&&(h=g.column)),p=g.column-1}h!==void 0&&d([u.substring(p)],void 0);let m=h!==void 0?new Xy(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:m,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=wr("decorations",r=>{let o=this.uiState.read(r);if(!o)return[];let s=[];o.replacedRange&&s.push({range:o.replacedRange.toRange(o.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(let a of o.inlineTexts)s.push({range:P.fromPositions(new Se(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:ru.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new f7(this.editor,this.languageService.languageIdCodec,wr("lines",r=>{let o=this.uiState.read(r);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(Ft(()=>{this.isDisposed.set(!0,void 0)})),this._register(gG(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};Zy=v1e([_1e(2,Xi)],Zy);f7=class extends oe{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=lG("editorOptionChanged",li.filter(this.editor.onDidChangeConfiguration,r=>r.hasChanged(31)||r.hasChanged(113)||r.hasChanged(95)||r.hasChanged(90)||r.hasChanged(49)||r.hasChanged(48)||r.hasChanged(64))),this._register(un("update view zone",r=>{let o=this.lines.read(r);this.editorOptionsChanged.read(r),o?this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){let r=this.editor.getModel();if(!r)return;let{tabSize:o}=r.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,n);if(a>0){let l=document.createElement("div");b1e(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};vG=_f("editorGhostText",{createHTML:i=>i})});var bG=M(()=>{});var yG=M(()=>{bG()});var CG=M(()=>{});var SG=M(()=>{CG()});var y1e,e2,U0,wG=M(()=>{gf();qre();Oc();or();qr();qt();Ce();Li();SG();De();y1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},e2=class extends oe{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new XN),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new ne,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new U0(()=>{var r;return(r=this.toggleMenuActionViewItem)===null||r===void 0?void 0:r.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Oo(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(r,o)=>{var s;if(r.id===U0.ID)return this.toggleMenuActionViewItem=new jw(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:mt.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:lt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let a=n.actionViewItemProvider(r,o);if(a)return a}if(r instanceof Lm){let a=new jw(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(r=>{this.actionBar.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var t,n;let r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return Un(r==null?void 0:r.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},U0=class i extends is{constructor(e,t){t=t||v("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return y1e(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};U0.ID="toolbar.toggle.more"});var C1e,W0,t2,xG=M(()=>{Ht();wG();Oc();oi();Ce();De();Yi();ft();Tl();Gn();Hc();C1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},W0=function(i,e){return function(t,n){e(t,n,i)}},t2=class extends e2{constructor(e,t,n,r,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=s.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0})),this._options=t,this._menuService=n,this._contextKeyService=r,this._contextMenuService=o,this._sessionDisposables=this._store.add(new ne),t!=null&&t.telemetrySource&&this._store.add(this.actionBar.onDidRun(l=>a.publicLog2("workbenchActionExecuted",{id:l.action.id,from:t.telemetrySource})))}setActions(e,t=[],n){var r,o,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,u=[],h=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let p=0;p=this._options.maxNumberOfItems&&(a[m]=void 0,u[m]=g)}}mw(a),mw(u),super.setActions(a,ks.join(u,l)),c.length>0&&this._sessionDisposables.add(Rt(this.getElement(),"contextmenu",p=>{var m,g,b,S;let k=this.getItemAction(p.target);if(!k)return;p.preventDefault(),p.stopPropagation();let N=!1;if(d===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){N=!0;for(let K=0;Kthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>p,getActions:()=>H,menuId:(b=this._options)===null||b===void 0?void 0:b.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(S=this._options)===null||S===void 0?void 0:S.menuOptions),contextKeyService:this._contextKeyService})}))}};t2=C1e([W0(2,Is),W0(3,Ke),W0(4,ls),W0(5,Bt),W0(6,Mr)],t2)});var v7,Xs,i2,S1e,w1e,Qs,m7,g7,n2=M(()=>{Ht();gf();yP();Oc();oi();Dt();or();Ce();Ys();a7();nr();qr();yG();ri();br();$y();De();bb();xG();Yi();Bi();ft();Tl();Et();Gn();Hc();Al();v7=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Xs=function(i,e){return function(t,n){e(t,n,i)}},i2=class extends oe{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=$s(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=wr("position",r=>{var o,s,a;let l=(o=this.model.read(r))===null||o===void 0?void 0:o.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;let c=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);let d=new Se(l.lineNumber,Math.min(c,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=d,d}),this._register(sG("setup content widget",(r,o)=>{let s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;let a=o.add(this.instantiationService.createInstance(Qs,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var c;return(c=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&c!==void 0?c:[]})));e.addContentWidget(a),o.add(Ft(()=>e.removeContentWidget(a))),o.add(un("request explicit",l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==ya.Explicit&&s.triggerExplicitly()}))}))}};i2=v7([Xs(2,He)],i2);S1e=Ei("inline-suggestion-hints-next",lt.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),w1e=Ei("inline-suggestion-hints-previous",lt.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Qs=class p7 extends oe{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){let r=new is(e,t,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,n,r,o,s,a,l,c,d,u){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${p7.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=$h("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[$h("div",{style:{display:"flex"}},[$h("div@actionBar",{className:"custom-actions"}),$h("div@toolBar")])]),this.previousAction=this.createCommandAction(qy,v("previous","Previous"),mt.asClassName(w1e)),this.availableSuggestionCountAction=new is("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(Gy,v("next","Next"),mt.asClassName(S1e)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(xe.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new ti(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new ti(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];let h=this._register(new Oo(this.nodes.actionBar));h.push(this.previousAction,{icon:!0,label:!1}),h.push(this.availableSuggestionCountAction),h.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(g7,this.nodes.toolBar,xe.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:p=>p.startsWith("primary")},actionViewItemProvider:(p,m)=>p instanceof da?l.createInstance(m7,p,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(p=>{p7._dropDownVisible=p})),this._register(un("update position",p=>{this._position.read(p),this.editor.layoutContentWidget(this)})),this._register(un("counts",p=>{let m=this._suggestionCount.read(p),g=this._currentSuggestionIdx.read(p);m!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${g+1}/${m}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),m!==void 0&&m>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(un("extra commands",p=>{let m=this._extraCommands.read(p);if(ha(this.lastCommands,m))return;this.lastCommands=m;let g=m.map(b=>({class:void 0,id:b.id,enabled:!0,tooltip:b.tooltip||"",label:b.title,run:S=>this._commandService.executeCommand(b.id)}));for(let[b,S]of this.inlineCompletionsActionsMenus.getActions())for(let k of S)k instanceof da&&g.push(k);g.length>0&&g.unshift(new ks),this.toolBar.setAdditionalSecondaryActions(g)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Qs._dropDownVisible=!1;Qs.id=0;Qs=v7([Xs(6,ui),Xs(7,He),Xs(8,Bt),Xs(9,Ke),Xs(10,Is)],Qs);m7=class extends _b{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=$h("div.keybinding").root;new nb(t,p_,Object.assign({disableTitle:!0},bP)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},g7=class extends t2{constructor(e,t,n,r,o,s,a,l){super(e,Object.assign({resetMenu:t},n),r,o,s,a,l),this.menuId=t,this.options2=n,this.menuService=r,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,r,o,s,a;let l=[],c=[];vb(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(o=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),c.push(...this.additionalActions),this.setActions(l,c)}setAdditionalSecondaryActions(e){ha(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};g7=v7([Xs(3,Is),Xs(4,Ke),Xs(5,ls),Xs(6,Bt),Xs(7,Mr)],g7)});function x1e(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function E1e(i,e){if((il==null?void 0:il.originalValue)===i&&(il==null?void 0:il.newValue)===e)return il==null?void 0:il.changes;{let t=TG(i,e,!0);if(t){let n=EG(t);if(n>0){let r=TG(i,e,!1);r&&EG(r)5e3||e.length>5e3)return;function n(c){let d=0;for(let u=0,h=c.length;ud&&(d=p)}return d}let r=Math.max(n(i),n(e));function o(c){if(c<0)throw new Error("unexpected");return r+c+1}function s(c){let d=0,u=0,h=new Int32Array(c.length);for(let p=0,m=c.length;pa},{getElements:()=>l}).ComputeDiff(!1).changes}var $u,il,_7=M(()=>{Gre();Si();qe();Jy();op();$u=class i{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){let n=t?this.range.intersectRanges(t):this.range;if(!n)return this;let r=e.getValueInRange(n,1),o=Pc(r,this.text),s=B0(this.range.getStartPosition(),z0(r.substring(0,o))),a=this.text.substring(o),l=P.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&x1e(this.range,e.range)}computeGhostText(e,t,n,r=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=zi(s).length;if(o.range.startColumn-1<=a){let m=zi(o.text).length,g=s.substring(o.range.startColumn-1,a),b=P.fromPositions(o.range.getStartPosition().delta(0,g.length),o.range.getEndPosition()),S=o.text.startsWith(g)?o.text.substring(g.length):o.text.substring(m);o=new i(b,S)}let c=e.getValueInRange(o.range),d=E1e(c,o.text);if(!d)return;let u=o.range.startLineNumber,h=new Array;if(t==="prefix"){let m=d.filter(g=>g.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==c.length)return}let p=o.text.length-r;for(let m of d){let g=o.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===o.range.startLineNumber&&g0)return;if(m.modifiedLength===0)continue;let b=m.modifiedStart+m.modifiedLength,S=Math.max(m.modifiedStart,Math.min(b,p)),k=o.text.substring(m.modifiedStart,S),N=o.text.substring(S,Math.max(m.modifiedStart,b));if(k.length>0){let A=Zd(k);h.push(new ap(g,A,!1))}if(N.length>0){let A=Zd(N);h.push(new ap(g,A,!0))}}return new sp(u,h)}}});function kG(i,e){let t=new pO,n=new gO(t,c=>e.getLanguageConfiguration(c)),r=new mO(new b7([i]),n),o=vO(r,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=af(d,c.openingBracket.length),c.child&&(l(c.child,d),d=af(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=af(d,c.closingBracket.length);else{let h=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=h}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(d,af(d,c.length));else if(c.kind===4)for(let u of c.children)l(u,d),d=af(d,u.length)}}return l(o,fO),s}var b7,IG=M(()=>{yre();gre();Cre();vre();bre();b7=class{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}});function AG(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var r2,Cd,On,o2,Co,Yu,y7,Js,j0,lp,jo,Xu=M(()=>{r2=class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,n=this.value.charCodeAt(e),r;if(r=i._table[n],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(i.isDigitCharacter(n)){r=8;do t+=1,n=this.value.charCodeAt(e+t);while(i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}if(i.isVariableCharacter(n)){r=9;do n=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(n)||i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof i._table[n]=="undefined"&&!i.isDigitCharacter(n)&&!i.isVariableCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}};r2._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};Cd=class{constructor(){this._children=[]}appendChild(e){return e instanceof On&&this._children[this._children.length-1]instanceof On?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.slice(0);o.splice(r,1,...t),n._children=o,function s(a,l){for(let c of a)c.parent=l,s(c.children,c)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof lp)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},On=class i extends Cd{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},o2=class extends Cd{},Co=class i extends o2{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Yu?this._children[0]:void 0}clone(){let e=new i(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},Yu=class i extends Cd{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof On&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new i;return this.options.forEach(e.appendChild,e),e}},y7=class i extends Cd{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof Js&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let t="";for(let n of this._children)if(n instanceof Js){let r=e[n.index]||"";r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return""}clone(){let e=new i;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},Js=class i extends Cd{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((n,r)=>r===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},j0=class i extends o2{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new On(t)],!0):!1}clone(){let e=new i(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};lp=class i extends Cd{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof Co&&(e.push(n),t=!t||t.indexr===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return AG([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof Co&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof j0&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new i;return this._children=this.children.map(t=>t.clone()),e}walk(e){AG(this.children,e)}},jo=class{constructor(){this._scanner=new r2,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new lp;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n!=null?n:!1,t!=null?t:!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,o=[];t.walk(l=>(l instanceof Co&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let d=r.get(l.index);if(!d)return;let u=new Co(l.index);u.transform=l.transform;for(let h of d){let p=h.clone();u.appendChild(p),p instanceof Co&&r.has(p.index)&&!c.has(p.index)&&(c.add(p.index),s(p,c),c.delete(p.index))}t.replace(l,[u])},a=new Set;for(let l of o)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new Co(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new On(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Co(Number(t)):new j0(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let o=new Co(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new On("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new Yu;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;n.push(r)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new On(n.join(""))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let o=new j0(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new On("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){let t=new y7,n="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new On(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(r)if(n){if(this._accept(4))return e.appendChild(new Js(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Js(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){let o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Js(Number(r),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){let o=this._until(1);if(o){let s=this._until(4);if(s)return e.appendChild(new Js(Number(r),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new On(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function DG(i,e,t,n,r=et.None,o){return LG(this,void 0,void 0,function*(){let s=T1e(e,t),a=i.all(t),l=yield Promise.all(a.map(u=>LG(this,void 0,void 0,function*(){try{let h=yield u.provideInlineCompletions(t,e,n,r);return{provider:u,completions:h}}catch(h){Ut(h)}return{provider:u,completions:void 0}}))),c=new Map,d=[];for(let u of l){let h=u.completions;if(!h)continue;let p=new S7(h,u.provider);d.push(p);for(let m of h.items){let g=w7.from(m,p,s,t,o);c.set(g.hash(),g)}}return new C7(Array.from(c.values()),new Set(c.keys()),d)})}function T1e(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new P(i.lineNumber,t.startColumn,i.lineNumber,n):P.fromPositions(i,i.with(void 0,n))}function MG(i,e,t,n){let o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,s=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),i),a=s==null?void 0:s.sliceAndInflate(e.column-1,o.length,0);return a?kG(a,n):i}var LG,C7,S7,w7,NG=M(()=>{kR();gi();At();qe();IG();op();Xu();LG=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};C7=class{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},S7=class{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}},w7=class i{static from(e,t,n,r,o){let s,a,l=e.range?P.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=MG(s,l.getStartPosition(),r,o);let c=s.length-e.insertText.length;c!==0&&(l=new P(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){let c=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=MG(e.insertText.snippet,l.getStartPosition(),r,o);let u=e.insertText.snippet.length-c;u!==0&&(l=new P(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}let d=new jo().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof On?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else ER(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||mG(),e,t)}constructor(e,t,n,r,o,s,a,l){this.filterText=e,this.command=t,this.range=n,this.insertText=r,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` + `,constraint:Nq,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,r){let o=this.getLineNumbers(r,n),s=r&&r.levels,a=r&&r.direction;typeof s!="number"&&typeof a!="string"?Sq(t,!0,o):a==="up"?bE(t,!0,s||1,o):Wu(t,!0,s||1,o)}},ME=class extends Rn{constructor(){super({id:"editor.toggleFold",label:v("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2090),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);Cq(t,1,r)}},DE=class extends Rn{constructor(){super({id:"editor.foldRecursively",label:v("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2140),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);Wu(t,!0,Number.MAX_VALUE,r)}},NE=class extends Rn{constructor(){super({id:"editor.foldAllBlockComments",label:v("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2138),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())yy(t,uf.Comment.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+vl(a.blockCommentStartToken));by(t,l,!0)}}}},RE=class extends Rn{constructor(){super({id:"editor.foldAllMarkerRegions",label:v("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2077),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())yy(t,uf.Region.value,!0);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);by(t,l,!0)}}}},OE=class extends Rn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:v("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2078),weight:100}})}invoke(e,t,n,r,o){if(t.regions.hasTypes())yy(t,uf.Region.value,!1);else{let s=n.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){let l=new RegExp(a.markers.start);by(t,l,!1)}}}},PE=class extends Rn{constructor(){super({id:"editor.foldAllExcept",label:v("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2136),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);yE(t,!0,r)}},FE=class extends Rn{constructor(){super({id:"editor.unfoldAllExcept",label:v("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2134),weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);yE(t,!1,r)}},HE=class extends Rn{constructor(){super({id:"editor.foldAll",label:v("foldAllAction.label","Fold All"),alias:"Fold All",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2069),weight:100}})}invoke(e,t,n){Wu(t,!0)}},BE=class extends Rn{constructor(){super({id:"editor.unfoldAll",label:v("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2088),weight:100}})}invoke(e,t,n){Wu(t,!1)}},Ku=class i extends Rn{getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,n){wq(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}};Ku.ID_PREFIX="editor.foldLevel";Ku.ID=i=>Ku.ID_PREFIX+i;zE=class extends Rn{constructor(){super({id:"editor.gotoParentFold",label:v("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=xq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},UE=class extends Rn{constructor(){super({id:"editor.gotoPreviousFold",label:v("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Eq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},WE=class extends Rn{constructor(){super({id:"editor.gotoNextFold",label:v("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,weight:100}})}invoke(e,t,n){let r=this.getSelectedLines(n);if(r.length>0){let o=Tq(r[0],t);o!==null&&n.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},jE=class extends Rn{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:v("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2135),weight:100}})}invoke(e,t,n){var r;let o=[],s=n.getSelections();if(s){for(let a of s){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(o.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(o.length>0){o.sort((l,c)=>l.startLineNumber-c.startLineNumber);let a=ur.sanitizeAndMerge(t.regions,o,(r=n.getModel())===null||r===void 0?void 0:r.getLineCount());t.updatePost(ur.fromFoldRanges(a))}}}},VE=class extends Rn{constructor(){super({id:"editor.removeManualFoldingRanges",label:v("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2137),weight:100}})}invoke(e,t,n){let r=n.getSelections();if(r){let o=[];for(let s of r){let{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}};Ae(Za.ID,Za,0);X(IE);X(AE);X(LE);X(DE);X(HE);X(BE);X(NE);X(RE);X(OE);X(PE);X(FE);X(ME);X(zE);X(UE);X(WE);X(jE);X(VE);for(let i=1;i<=7;i++)kR(new Ku({id:Ku.ID(i),label:v("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:Jn,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2048|21+i),weight:100}}));St.registerCommand("_executeFoldingRangeProvider",function(i,...e){return c1e(this,void 0,void 0,function*(){let[t]=e;if(!(t instanceof ht))throw Ao();let n=i.get(be),r=i.get(Si).getModel(t);if(!r)throw Ao();let o=i.get(Mt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(Tt),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(p,m)=>{}},c=new ju(r,s,l),d=c;if(a!=="indentation"){let p=Za.getFoldingRangeProviders(n,r);p.length&&(d=new Vu(r,p,()=>{},l,c))}let u=yield d.compute(et.None),h=[];try{if(u)for(let p=0;p{Ze();Vre();De();KE=class extends se{constructor(){super({id:"editor.action.fontZoomIn",label:v("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){vf.setZoomLevel(vf.getZoomLevel()+1)}},qE=class extends se{constructor(){super({id:"editor.action.fontZoomOut",label:v("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){vf.setZoomLevel(vf.getZoomLevel()-1)}},GE=class extends se{constructor(){super({id:"editor.action.fontZoomReset",label:v("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){vf.setZoomLevel(0)}};X(KE);X(qE);X(GE)});var JE=gt(qu=>{oi();gi();At();gl();Ce();Ze();Lr();hw();qe();jt();ub();xt();qre();Kre();De();zi();ft();Et();Gc();var Rq=qu&&qu.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wy=qu&&qu.__param||function(i,e){return function(t,n){e(t,n,i)}},QE=qu&&qu.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},N0=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new ne,this._sessionDisposables=new ne,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(54)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(54)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new tu;for(let r of t.autoFormatTriggerCharacters)n.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{let o=r.charCodeAt(r.length-1);n.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=new Ri,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a{r.token.isCancellationRequested||Wi(s)&&(OP.execute(this._editor,s,!0),PP(s))}).finally(()=>{o.dispose()})}};N0.ID="editor.contrib.autoFormat";N0=Rq([wy(1,be),wy(2,Ml)],N0);var R0=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new ne,this._callOnModel=new ne,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(53)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(zw,this.editor,e,2,wa.None,et.None).catch(at))}};R0.ID="editor.contrib.formatOnPaste";R0=Rq([wy(1,be),wy(2,He)],R0);var YE=class extends se{constructor(){super({id:"editor.action.formatDocument",label:v("formatDocument.label","Format Document"),alias:"Format Document",precondition:ce.and(O.notInCompositeEditor,O.writable,O.hasDocumentFormattingProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return QE(this,void 0,void 0,function*(){if(t.hasModel()){let n=e.get(He);yield e.get(El).showWhile(n.invokeFunction(FP,t,1,wa.None,et.None),250)}})}},XE=class extends se{constructor(){super({id:"editor.action.formatSelection",label:v("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:ce.and(O.writable,O.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2084),weight:100},contextMenuOpts:{when:O.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return QE(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(He),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new P(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);yield e.get(El).showWhile(n.invokeFunction(zw,t,o,1,wa.None,et.None),250)})}};Ae(N0.ID,N0,2);Ae(R0.ID,R0,2);X(YE);X(XE);St.registerCommand("editor.action.format",i=>QE(void 0,void 0,void 0,function*(){let e=i.get(Zt).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(ui);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var tp,bd,jo,lc=M(()=>{tp=class{constructor(e,t,n,r){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}},bd=class{constructor(e,t,n,r,o,s){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}},jo=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});function Pq(i){Oq=i}function ys(){return Oq}function d1e(i){let e=new Array,n={},r="";function o(a){if("length"in a)for(let l of a)l&&o(l);else"text"in a?(r+=`%c${a.text}`,e.push(a.style),a.data&&Object.assign(n,a.data)):"data"in a&&Object.assign(n,a.data)}o(i);let s=[r,...e];return Object.keys(n).length>0&&s.push(n),s}function xy(i){return el(i,{color:"black"})}function O0(i){return el(p1e(`${i}: `,10),{color:"black",bold:!0})}function el(i,e={color:"black"}){function t(r){return Object.entries(r).reduce((o,[s,a])=>`${o}${s}:${a};`,"")}let n={color:e.color};return e.strikeThrough&&(n["text-decoration"]="line-through"),e.bold&&(n["font-weight"]="bold"),{text:i,style:t(n)}}function Ty(i,e){switch(typeof i){case"number":return""+i;case"string":return i.length+2<=e?`"${i}"`:`"${i.substr(0,e-7)}"+...`;case"boolean":return i?"true":"false";case"undefined":return"undefined";case"object":return i===null?"null":Array.isArray(i)?u1e(i,e):h1e(i,e);case"symbol":return i.toString();case"function":return`[[Function${i.name?" "+i.name:""}]]`;default:return""+i}}function u1e(i,e){let t="[ ",n=!0;for(let r of i){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${Ty(r,e-t.length)}`}return t+=" ]",t}function h1e(i,e){let t="{ ",n=!0;for(let[r,o]of Object.entries(i)){if(n||(t+=", "),t.length-5>e){t+="...";break}n=!1,t+=`${r}: ${Ty(o,e-t.length)}`}return t+=" }",t}function f1e(i,e){let t="";for(let n=1;n<=e;n++)t+=i;return t}function p1e(i,e){for(;i.length{Ey=class{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return d1e([xy(f1e("| ",this.indentation)),e])}formatInfo(e){return e.didChange?[xy(" "),el(Ty(e.oldValue,70),{color:"red",strikeThrough:!0}),xy(" "),el(Ty(e.newValue,60),{color:"green"})]:[xy(" (unchanged)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([O0("observable value changed"),el(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(e.size!==0)return el(" (changed deps: "+[...e].map(t=>t.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleDerivedRecomputed(e,t){let n=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([O0("derived recomputed"),el(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(n)])),n.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([O0("observable from event triggered"),el(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}handleAutorunCreated(e){let t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(n,r)=>(this.changedObservablesSets.get(e).add(n),t.apply(e,[n,r]))}handleAutorunTriggered(e){let t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([O0("autorun"),el(e.debugName,{color:"BlueViolet"}),this.formatChanges(t)])),t.clear()}handleBeginTransaction(e){let t=e.getDebugName();t===void 0&&(t=""),console.log(...this.textToConsoleArgs([O0("transaction"),el(t,{color:"BlueViolet"})])),this.indentation++}handleEndTransaction(){this.indentation--}}});function Hq(i){Fq=i}function dn(i,e){var t,n;let r=new ky(i,e);try{(t=ys())===null||t===void 0||t.handleBeginTransaction(r),i(r)}finally{r.finish(),(n=ys())===null||n===void 0||n.handleEndTransaction()}}function e7(i,e,t){i?e(i):dn(e,t)}function Ay(i){let e=i.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),r=n?n[1]:void 0;return r==null?void 0:r.trim()}function Gs(i,e){return new Iy(i,e)}function F0(i,e){return new ZE(i,e)}var Fq,P0,cc,ky,Iy,ZE,Gu=M(()=>{ip();P0=class{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e){return Fq(()=>{let t=Ay(e);return t!==void 0?t:`${this.debugName} (mapped)`},t=>e(this.read(t),t))}},cc=class extends P0{constructor(){super(...arguments),this.observers=new Set}addObserver(e){let t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}};ky=class{constructor(e,t){this.fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():Ay(this.fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){let e=this.updatingObservers;this.updatingObservers=null;for(let{observer:t,observable:n}of e)t.endUpdate(n)}};Iy=class extends cc{constructor(e,t){super(),this.debugName=e,this._value=t}get(){return this._value}set(e,t,n){var r;if(this._value===e)return;let o;t||(t=o=new ky(()=>{},()=>`Setting ${this.debugName}`));try{let s=this._value;this._setValue(e),(r=ys())===null||r===void 0||r.handleObservableChanged(this,{oldValue:s,newValue:e,change:n,didChange:!0});for(let a of this.observers)t.updateObserver(a,this),a.handleChange(this,n)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}};ZE=class extends Iy{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}});function xr(i,e){return new Ly(i,e,void 0,void 0)}function Bq(i,e,t){return new Ly(i,t,e.createEmptyChangeSummary,e.handleChange)}var Ly,t7=M(()=>{At();Gu();ip();Hq(xr);Ly=class extends cc{get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(e,t,n,r){var o,s;super(),this._debugName=e,this.computeFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=ys())===null||s===void 0||s.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}get(){var e;if(this.observers.size===0){let t=this.computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){this.state=3;for(let t of this.dependencies)if(t.reportChanges(),this.state===2)break}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;let r=this.state!==0,o=this.value;this.state=3;let s=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this.computeFn(this,s)}finally{for(let l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}let a=r&&o!==this.value;if((t=ys())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:a}),a)for(let l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;let t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(let n of this.observers)n.handlePossibleChange(this);if(t)for(let n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){let t=[...this.observers];for(let n of t)n.endUpdate(this)}if(this.updateCount<0)throw new Qd}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(let t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){let n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary):!0,r=this.state===3;if(n&&(this.state===1||r)&&(this.state=2,r))for(let o of this.observers)o.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){let t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}});function un(i,e){return new My(i,e,void 0,void 0)}function zq(i,e){return Uq(e,i)}function Uq(i,e){let t=new ne,n=un(e,r=>{t.clear(),i(r,t)});return Ft(()=>{n.dispose(),t.dispose()})}var My,i7=M(()=>{ER();Ce();ip();My=class{constructor(e,t,n,r){var o,s;this.debugName=e,this.runFn=t,this.createChangeSummary=n,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=ys())===null||s===void 0||s.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(let e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t;if(this.state===3)return;let n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3,(e=ys())===null||e===void 0||e.handleAutorunTriggered(this);try{let r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this.runFn(this,r)}finally{for(let r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(let e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,xR(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);let t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}};(function(i){i.Observer=My})(un||(un={}))});function Ny(i){return new n7(i)}function $s(i,e){return new Dy(i,e)}function Wq(i,e){return new r7(i,e)}function jq(i){return new o7(i)}function Vq(i,e){let t=new s7(e!=null?e:!1);return i.addObserver(t),e&&i.reportChanges(),Ft(()=>{i.removeObserver(t)})}var n7,Dy,r7,o7,s7,Kq=M(()=>{Ce();Gu();ip();n7=class extends P0{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}};Dy=class extends cc{constructor(e,t){super(),this.event=e,this.getValue=t,this.hasValue=!1,this.handleEvent=n=>{var r;let o=this.getValue(n),s=!this.hasValue||this.value!==o;(r=ys())===null||r===void 0||r.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:o,change:void 0,didChange:s}),s&&(this.value=o,this.hasValue&&dn(a=>{for(let l of this.observers)a.updateObserver(l,this),l.handleChange(this,void 0)},()=>{let a=this.getDebugName();return"Event fired"+(a?`: ${a}`:"")}),this.hasValue=!0)}}getDebugName(){return Ay(this.getValue)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this.getValue(void 0)}};(function(i){i.Observer=Dy})($s||($s={}));r7=class extends cc{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{dn(n=>{for(let r of this.observers)n.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}};o7=class extends cc{constructor(e){super(),this.debugName=e}trigger(e,t){if(!e){dn(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(let n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}};s7=class{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,this.counter===0&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}});var m1e,Ys=M(()=>{Gu();t7();i7();Kq();ip();m1e=!1;m1e&&Pq(new Ey)});var Ry,Oy,Py,Fy=M(()=>{Ry="editor.action.inlineSuggest.commit",Oy="editor.action.inlineSuggest.showPrevious",Py="editor.action.inlineSuggest.showNext"});var In,Hy=M(()=>{Ys();wi();rre();ft();Ce();De();In=class i extends oe{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=i.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=i.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=i.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=i.suppressSuggestions.bindTo(this.contextKeyService),this._register(un("update context key: inlineCompletionVisible, suppressSuggestions",n=>{let r=this.model.read(n),o=r==null?void 0:r.selectedInlineCompletion.read(n),s=r==null?void 0:r.ghostText.read(n),a=r==null?void 0:r.selectedSuggestItem.read(n);this.inlineCompletionVisible.set(a===void 0&&s!==void 0&&!s.isEmpty()),s&&o&&this.suppressSuggestions.set(o.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(un("update context key: inlineCompletionSuggestsIndentation, inlineCompletionSuggestsIndentationLessThanTabSize",n=>{let r=this.model.read(n),o=!1,s=!0,a=r==null?void 0:r.ghostText.read(n);if(r!=null&&r.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],d=c[0],u=r.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let p=Lm(d);p===-1&&(p=d.length-1),o=p>0;let m=r.textModel.getOptions().tabSize;s=IR.visibleColumnFromColumn(d,p+1,m){});var Gq=M(()=>{qq()});function $q(i,e){let t=new a7(i),n=e.map(r=>{let o=P.lift(r.range);return{startOffset:t.getOffset(o.getStartPosition()),endOffset:t.getOffset(o.getEndPosition()),text:r.text}});n.sort((r,o)=>o.startOffset-r.startOffset);for(let r of n)i=i.substring(0,r.startOffset)+r.text+i.substring(r.endOffset);return i}function Yq(){return g1e}function Xq(i,e){let t=new ne,n=i.createDecorationsCollection();return t.add(un(`Apply decorations from ${e.debugName}`,r=>{let o=e.read(r);n.set(o)})),t.add({dispose:()=>{n.clear()}}),t}function H0(i,e){return new Se(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function B0(i){let e=1,t=1;for(let n of i)n===` +`?(e++,t=1):t++;return new Se(e,t)}var a7,g1e,By,np=M(()=>{At();Ce();Ys();ri();qe();a7=class{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tt)throw new Qd(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new P(e,this.startColumn,e,this.endColumnExclusive)}}});var rp,op,zy,Uy=M(()=>{np();rp=class{constructor(e,t){this.lineNumber=e,this.parts=t}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return $q(n,this.parts.map(o=>({range:{startLineNumber:1,endLineNumber:1,startColumn:o.column,endColumn:o.column},text:o.lines.join(` +`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}},op=class{constructor(e,t,n){this.column=e,this.lines=t,this.preview=n}},zy=class{constructor(e,t,n,r=0){this.lineNumber=e,this.columnRange=t,this.newLines=n,this.additionalReservedLineCount=r,this.parts=[new op(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}}});function b1e(i,e,t,n,r){let o=n.get(31),s=n.get(113),a="none",l=n.get(90),c=n.get(49),d=n.get(48),u=n.get(64),h=new I_(1e4);h.appendString('
');for(let g=0,b=t.length;g');let N=b_(k),A=CR(k),H=eP.createEmpty(k,r);mb(new pb(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,k,!1,N,A,0,H,S.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==nP.OFF,null),h),h.appendString("
")}h.appendString(""),fb(i,d);let p=h.build(),m=Qq?Qq.createHTML(p):p;i.innerHTML=m}var v1e,_1e,Wy,l7,Qq,Jq=M(()=>{Uw();qt();Ce();Ys();wi();Gq();BP();Xm();ri();qe();WR();ss();Kc();Tre();zP();UP();Uy();np();v1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_1e=function(i,e){return function(t,n){e(t,n,i)}},Wy=class extends oe{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Gs("isDisposed",!1),this.currentTextModel=$s(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=xr("uiState",r=>{if(this.isDisposed.read(r))return;let o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;let s=this.model.ghostText.read(r);if(!s)return;let a=s instanceof zy?s.columnRange:void 0,l=[],c=[];function d(g,b){if(c.length>0){let S=c[c.length-1];b&&S.decorations.push(new t1(S.content.length+1,S.content.length+1+g[0].length,b,0)),S.content+=g[0],g=g.slice(1)}for(let S of g)c.push({content:S,decorations:b?[new t1(1,S.length+1,b,0)]:[]})}let u=o.getLineContent(s.lineNumber),h,p=0;for(let g of s.parts){let b=g.lines;h===void 0?(l.push({column:g.column,text:b[0],preview:g.preview}),b=b.slice(1)):d([u.substring(p,g.column-1)],void 0),b.length>0&&(d(b,"ghost-text"),h===void 0&&g.column<=u.length&&(h=g.column)),p=g.column-1}h!==void 0&&d([u.substring(p)],void 0);let m=h!==void 0?new By(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:m,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=xr("decorations",r=>{let o=this.uiState.read(r);if(!o)return[];let s=[];o.replacedRange&&s.push({range:o.replacedRange.toRange(o.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(let a of o.inlineTexts)s.push({range:P.fromPositions(new Se(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:ou.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new l7(this.editor,this.languageService.languageIdCodec,xr("lines",r=>{let o=this.uiState.read(r);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(Ft(()=>{this.isDisposed.set(!0,void 0)})),this._register(Xq(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};Wy=v1e([_1e(2,Xi)],Wy);l7=class extends oe{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=Wq("editorOptionChanged",li.filter(this.editor.onDidChangeConfiguration,r=>r.hasChanged(31)||r.hasChanged(113)||r.hasChanged(95)||r.hasChanged(90)||r.hasChanged(49)||r.hasChanged(48)||r.hasChanged(64))),this._register(un("update view zone",r=>{let o=this.lines.read(r);this.editorOptionsChanged.read(r),o?this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){let r=this.editor.getModel();if(!r)return;let{tabSize:o}=r.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,n);if(a>0){let l=document.createElement("div");b1e(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};Qq=_f("editorGhostText",{createHTML:i=>i})});var Zq=M(()=>{});var eG=M(()=>{Zq()});var tG=M(()=>{});var iG=M(()=>{tG()});var y1e,jy,z0,nG=M(()=>{gf();Gre();Pc();or();qr();qt();Ce();Mi();iG();De();y1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jy=class extends oe{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new $N),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new ne,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new z0(()=>{var r;return(r=this.toggleMenuActionViewItem)===null||r===void 0?void 0:r.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Po(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(r,o)=>{var s;if(r.id===z0.ID)return this.toggleMenuActionViewItem=new Ww(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:mt.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:lt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let a=n.actionViewItemProvider(r,o);if(a)return a}if(r instanceof Am){let a=new Ww(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(r=>{this.actionBar.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var t,n;let r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return Un(r==null?void 0:r.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},z0=class i extends ns{constructor(e,t){t=t||v("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return y1e(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};z0.ID="toolbar.toggle.more"});var C1e,U0,Vy,rG=M(()=>{Ht();nG();Pc();oi();Ce();De();Yi();ft();Tl();Gn();Bc();C1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},U0=function(i,e){return function(t,n){e(t,n,i)}},Vy=class extends jy{constructor(e,t,n,r,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=s.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0})),this._options=t,this._menuService=n,this._contextKeyService=r,this._contextMenuService=o,this._sessionDisposables=this._store.add(new ne),t!=null&&t.telemetrySource&&this._store.add(this.actionBar.onDidRun(l=>a.publicLog2("workbenchActionExecuted",{id:l.action.id,from:t.telemetrySource})))}setActions(e,t=[],n){var r,o,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,u=[],h=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let p=0;p=this._options.maxNumberOfItems&&(a[m]=void 0,u[m]=g)}}pw(a),pw(u),super.setActions(a,ks.join(u,l)),c.length>0&&this._sessionDisposables.add(Rt(this.getElement(),"contextmenu",p=>{var m,g,b,S;let k=this.getItemAction(p.target);if(!k)return;p.preventDefault(),p.stopPropagation();let N=!1;if(d===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){N=!0;for(let K=0;Kthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>p,getActions:()=>H,menuId:(b=this._options)===null||b===void 0?void 0:b.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(S=this._options)===null||S===void 0?void 0:S.menuOptions),contextKeyService:this._contextKeyService})}))}};Vy=C1e([U0(2,Is),U0(3,Ke),U0(4,cs),U0(5,Bt),U0(6,Dr)],Vy)});var h7,Xs,Ky,S1e,w1e,Qs,d7,u7,qy=M(()=>{Ht();gf();_P();Pc();oi();Dt();or();Ce();Ys();i7();nr();qr();eG();ri();br();Fy();De();_b();rG();Yi();zi();ft();Tl();Et();Gn();Bc();Al();h7=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Xs=function(i,e){return function(t,n){e(t,n,i)}},Ky=class extends oe{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=$s(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=xr("position",r=>{var o,s,a;let l=(o=this.model.read(r))===null||o===void 0?void 0:o.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;let c=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);let d=new Se(l.lineNumber,Math.min(c,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=d,d}),this._register(zq("setup content widget",(r,o)=>{let s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;let a=o.add(this.instantiationService.createInstance(Qs,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var c;return(c=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&c!==void 0?c:[]})));e.addContentWidget(a),o.add(Ft(()=>e.removeContentWidget(a))),o.add(un("request explicit",l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==ya.Explicit&&s.triggerExplicitly()}))}))}};Ky=h7([Xs(2,He)],Ky);S1e=Ti("inline-suggestion-hints-next",lt.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),w1e=Ti("inline-suggestion-hints-previous",lt.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Qs=class c7 extends oe{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){let r=new ns(e,t,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,n,r,o,s,a,l,c,d,u){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${c7.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=$h("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[$h("div",{style:{display:"flex"}},[$h("div@actionBar",{className:"custom-actions"}),$h("div@toolBar")])]),this.previousAction=this.createCommandAction(Oy,v("previous","Previous"),mt.asClassName(w1e)),this.availableSuggestionCountAction=new ns("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(Py,v("next","Next"),mt.asClassName(S1e)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(xe.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new ti(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new ti(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];let h=this._register(new Po(this.nodes.actionBar));h.push(this.previousAction,{icon:!0,label:!1}),h.push(this.availableSuggestionCountAction),h.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(u7,this.nodes.toolBar,xe.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:p=>p.startsWith("primary")},actionViewItemProvider:(p,m)=>p instanceof da?l.createInstance(d7,p,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(p=>{c7._dropDownVisible=p})),this._register(un("update position",p=>{this._position.read(p),this.editor.layoutContentWidget(this)})),this._register(un("counts",p=>{let m=this._suggestionCount.read(p),g=this._currentSuggestionIdx.read(p);m!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${g+1}/${m}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),m!==void 0&&m>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(un("extra commands",p=>{let m=this._extraCommands.read(p);if(ha(this.lastCommands,m))return;this.lastCommands=m;let g=m.map(b=>({class:void 0,id:b.id,enabled:!0,tooltip:b.tooltip||"",label:b.title,run:S=>this._commandService.executeCommand(b.id)}));for(let[b,S]of this.inlineCompletionsActionsMenus.getActions())for(let k of S)k instanceof da&&g.push(k);g.length>0&&g.unshift(new ks),this.toolBar.setAdditionalSecondaryActions(g)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Qs._dropDownVisible=!1;Qs.id=0;Qs=h7([Xs(6,ui),Xs(7,He),Xs(8,Bt),Xs(9,Ke),Xs(10,Is)],Qs);d7=class extends vb{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=$h("div.keybinding").root;new ib(t,f_,Object.assign({disableTitle:!0},vP)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},u7=class extends Vy{constructor(e,t,n,r,o,s,a,l){super(e,Object.assign({resetMenu:t},n),r,o,s,a,l),this.menuId=t,this.options2=n,this.menuService=r,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,r,o,s,a;let l=[],c=[];gb(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(o=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),c.push(...this.additionalActions),this.setActions(l,c)}setAdditionalSecondaryActions(e){ha(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};u7=h7([Xs(3,Is),Xs(4,Ke),Xs(5,cs),Xs(6,Bt),Xs(7,Dr)],u7)});function x1e(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function E1e(i,e){if((tl==null?void 0:tl.originalValue)===i&&(tl==null?void 0:tl.newValue)===e)return tl==null?void 0:tl.changes;{let t=sG(i,e,!0);if(t){let n=oG(t);if(n>0){let r=sG(i,e,!1);r&&oG(r)5e3||e.length>5e3)return;function n(c){let d=0;for(let u=0,h=c.length;ud&&(d=p)}return d}let r=Math.max(n(i),n(e));function o(c){if(c<0)throw new Error("unexpected");return r+c+1}function s(c){let d=0,u=0,h=new Int32Array(c.length);for(let p=0,m=c.length;pa},{getElements:()=>l}).ComputeDiff(!1).changes}var $u,tl,f7=M(()=>{$re();wi();qe();Uy();np();$u=class i{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){let n=t?this.range.intersectRanges(t):this.range;if(!n)return this;let r=e.getValueInRange(n,1),o=Fc(r,this.text),s=H0(this.range.getStartPosition(),B0(r.substring(0,o))),a=this.text.substring(o),l=P.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&x1e(this.range,e.range)}computeGhostText(e,t,n,r=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=Ui(s).length;if(o.range.startColumn-1<=a){let m=Ui(o.text).length,g=s.substring(o.range.startColumn-1,a),b=P.fromPositions(o.range.getStartPosition().delta(0,g.length),o.range.getEndPosition()),S=o.text.startsWith(g)?o.text.substring(g.length):o.text.substring(m);o=new i(b,S)}let c=e.getValueInRange(o.range),d=E1e(c,o.text);if(!d)return;let u=o.range.startLineNumber,h=new Array;if(t==="prefix"){let m=d.filter(g=>g.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==c.length)return}let p=o.text.length-r;for(let m of d){let g=o.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===o.range.startLineNumber&&g0)return;if(m.modifiedLength===0)continue;let b=m.modifiedStart+m.modifiedLength,S=Math.max(m.modifiedStart,Math.min(b,p)),k=o.text.substring(m.modifiedStart,S),N=o.text.substring(S,Math.max(m.modifiedStart,b));if(k.length>0){let A=eu(k);h.push(new op(g,A,!1))}if(N.length>0){let A=eu(N);h.push(new op(g,A,!0))}}return new rp(u,h)}}});function aG(i,e){let t=new hO,n=new pO(t,c=>e.getLanguageConfiguration(c)),r=new fO(new p7([i]),n),o=mO(r,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=af(d,c.openingBracket.length),c.child&&(l(c.child,d),d=af(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=af(d,c.closingBracket.length);else{let h=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=h}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(d,af(d,c.length));else if(c.kind===4)for(let u of c.children)l(u,d),d=af(d,u.length)}}return l(o,uO),s}var p7,lG=M(()=>{Cre();vre();Sre();_re();yre();p7=class{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}});function cG(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var Gy,yd,On,$y,So,Yu,m7,Js,W0,sp,Vo,Xu=M(()=>{Gy=class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,n=this.value.charCodeAt(e),r;if(r=i._table[n],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(i.isDigitCharacter(n)){r=8;do t+=1,n=this.value.charCodeAt(e+t);while(i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}if(i.isVariableCharacter(n)){r=9;do n=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(n)||i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof i._table[n]=="undefined"&&!i.isDigitCharacter(n)&&!i.isVariableCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}};Gy._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};yd=class{constructor(){this._children=[]}appendChild(e){return e instanceof On&&this._children[this._children.length-1]instanceof On?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.slice(0);o.splice(r,1,...t),n._children=o,function s(a,l){for(let c of a)c.parent=l,s(c.children,c)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof sp)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},On=class i extends yd{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},$y=class extends yd{},So=class i extends $y{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Yu?this._children[0]:void 0}clone(){let e=new i(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},Yu=class i extends yd{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof On&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new i;return this.options.forEach(e.appendChild,e),e}},m7=class i extends yd{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof Js&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let t="";for(let n of this._children)if(n instanceof Js){let r=e[n.index]||"";r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return""}clone(){let e=new i;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},Js=class i extends yd{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((n,r)=>r===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},W0=class i extends $y{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new On(t)],!0):!1}clone(){let e=new i(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};sp=class i extends yd{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof So&&(e.push(n),t=!t||t.indexr===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return cG([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof So&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof W0&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new i;return this._children=this.children.map(t=>t.clone()),e}walk(e){cG(this.children,e)}},Vo=class{constructor(){this._scanner=new Gy,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new sp;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n!=null?n:!1,t!=null?t:!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,o=[];t.walk(l=>(l instanceof So&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let d=r.get(l.index);if(!d)return;let u=new So(l.index);u.transform=l.transform;for(let h of d){let p=h.clone();u.appendChild(p),p instanceof So&&r.has(p.index)&&!c.has(p.index)&&(c.add(p.index),s(p,c),c.delete(p.index))}t.replace(l,[u])},a=new Set;for(let l of o)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new So(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new On(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new So(Number(t)):new W0(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let o=new So(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new On("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new Yu;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;n.push(r)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new On(n.join(""))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let o=new W0(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new On("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){let t=new m7,n="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new On(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(r)if(n){if(this._accept(4))return e.appendChild(new Js(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Js(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){let o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Js(Number(r),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){let o=this._until(1);if(o){let s=this._until(4);if(s)return e.appendChild(new Js(Number(r),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Js(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new On(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function hG(i,e,t,n,r=et.None,o){return dG(this,void 0,void 0,function*(){let s=T1e(e,t),a=i.all(t),l=yield Promise.all(a.map(u=>dG(this,void 0,void 0,function*(){try{let h=yield u.provideInlineCompletions(t,e,n,r);return{provider:u,completions:h}}catch(h){Ut(h)}return{provider:u,completions:void 0}}))),c=new Map,d=[];for(let u of l){let h=u.completions;if(!h)continue;let p=new v7(h,u.provider);d.push(p);for(let m of h.items){let g=_7.from(m,p,s,t,o);c.set(g.hash(),g)}}return new g7(Array.from(c.values()),new Set(c.keys()),d)})}function T1e(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new P(i.lineNumber,t.startColumn,i.lineNumber,n):P.fromPositions(i,i.with(void 0,n))}function uG(i,e,t,n){let o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,s=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),i),a=s==null?void 0:s.sliceAndInflate(e.column-1,o.length,0);return a?aG(a,n):i}var dG,g7,v7,_7,fG=M(()=>{ER();gi();At();qe();lG();np();Xu();dG=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};g7=class{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},v7=class{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}},_7=class i{static from(e,t,n,r,o){let s,a,l=e.range?P.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=uG(s,l.getStartPosition(),r,o);let c=s.length-e.insertText.length;c!==0&&(l=new P(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){let c=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=uG(e.insertText.snippet,l.getStartPosition(),r,o);let u=e.insertText.snippet.length-c;u!==0&&(l=new P(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}let d=new Vo().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof On?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else wR(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||Yq(),e,t)}constructor(e,t,n,r,o,s,a,l){this.filterText=e,this.command=t,this.range=n,this.insertText=r,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` `),r=e.replace(/\r\n|\r/g,` -`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}});function A1e(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}function L1e(i,e,t){return!i||!e?i===e:t(i,e)}function OG(i){return i.startLineNumber===i.endLineNumber?new Se(1,1+i.endColumn-i.startColumn):new Se(1+i.endLineNumber-i.startLineNumber,i.endColumn)}var k1e,RG,I1e,s2,x7,E7,T7,a2,PG=M(()=>{gi();Cl();Ce();Ys();Gu();ri();br();Kn();xt();_7();NG();k1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},RG=function(i,e){return function(t,n){e(t,n,i)}},I1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},s2=class extends oe{constructor(e,t,n,r,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new Hi),this.inlineCompletions=H0("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=H0("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var r,o;let s=new x7(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((r=this._updateOperation.value)===null||r===void 0)&&r.request.satisfies(s))return this._updateOperation.value.promise;if(!((o=a.get())===null||o===void 0)&&o.request.satisfies(s))return Promise.resolve(!0);let l=!!this._updateOperation.value;this._updateOperation.clear();let c=new Ni,d=(()=>I1e(this,void 0,void 0,function*(){if((l||t.triggerKind===ya.Automatic)&&(yield A1e(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let p=new Date,m=yield DG(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,c.token,this.languageConfigurationService);if(c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let g=new Date;this._debounceValue.update(this.textModel,g.getTime()-p.getTime());let b=new T7(m,s,this.textModel,this.versionId);if(n){let S=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!m.has(S)&&b.prepend(n.inlineCompletion,S.range,!0)}return this._updateOperation.clear(),dn(S=>{a.set(b,S)}),!0}))(),u=new E7(s,c,d);return this._updateOperation.value=u,d}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};s2=k1e([RG(3,be),RG(4,Tt)],s2);x7=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&L1e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===ya.Automatic||this.context.triggerKind===ya.Explicit)&&this.versionId===e.versionId}};E7=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},T7=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,r){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=wr("ranges",s=>{this.versionId.read(s);let a=!1;for(let l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});let o=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new a2(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[]),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let r=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new a2(e,r,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},a2=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,r){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=r!=null?r:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new $u(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){let r=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==r.range.startLineNumber)return!1;let o=e.getValueInRange(r.range,1).toLowerCase(),s=r.text.toLowerCase(),a=Math.max(0,t.column-r.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),u=o.substring(a),h=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=h&&(d=d.trimStart(),d.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!QR(u,c)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new $u(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return OG(this._getUpdatedRange(e)).isBefore(OG(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){let t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}}});function FG(){return cp}function K0(i,e,t,n=dc.default,r={triggerKind:0},o=et.None){return V0(this,void 0,void 0,function*(){let s=new Ln(!0);t=t.clone();let a=e.getWordAtPosition(t),l=a?new P(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):P.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],u=new ne,h=[],p=!1,m=(b,S,k)=>{var N,A,H;let K=!1;if(!S)return K;for(let W of S.suggestions)if(!n.kindFilter.has(W.kind)){if(!n.showDeprecated&&(!((N=W==null?void 0:W.tags)===null||N===void 0)&&N.includes(1)))continue;W.range||(W.range=c),W.sortText||(W.sortText=typeof W.label=="string"?W.label:W.label.label),!p&&W.insertTextRules&&W.insertTextRules&4&&(p=jo.guessNeedsClipboard(W.insertText)),d.push(new k7(t,W,S,b)),K=!0}return u_(S)&&u.add(S),h.push({providerName:(A=b._debugDisplayName)!==null&&A!==void 0?A:"unknown_provider",elapsedProvider:(H=S.duration)!==null&&H!==void 0?H:-1,elapsedOverall:k.elapsed()}),K},g=(()=>V0(this,void 0,void 0,function*(){if(!cp||n.kindFilter.has(27))return;let b=n.providerItemsToReuse.get(cp);if(b){b.forEach(N=>d.push(N));return}if(n.providerFilter.size>0&&!n.providerFilter.has(cp))return;let S=new Ln(!0),k=yield cp.provideCompletionItems(e,t,r,o);m(cp,k,S)}))();for(let b of i.orderedGroups(e)){let S=!1;if(yield Promise.all(b.map(k=>V0(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(k)){let N=n.providerItemsToReuse.get(k);N.forEach(A=>d.push(A)),S=S||N.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(k)))try{let N=new Ln(!0),A=yield k.provideCompletionItems(e,t,r,o);S=m(k,A,N)||S}catch(N){Ut(N)}}))),S||o.isCancellationRequested)break}return yield g,o.isCancellationRequested?(u.dispose(),Promise.reject(new c_)):new I7(d.sort(N1e(n.snippetSortOrder)),p,{entries:h,elapsed:s.elapsed()},u)})}function A7(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLowe.sortTextLow)return 1}return i.textLabele.textLabel?1:i.completion.kind-e.completion.kind}function M1e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return A7(i,e)}function D1e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return A7(i,e)}function N1e(i){return l2.get(i)}function HG(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var V0,it,rl,k7,dc,cp,I7,l2,nl,Qu=M(()=>{gi();At();Cl();Ce();ml();Li();Sn();ri();qe();ca();Xu();De();Yi();Bi();ft();xt();hE();V0=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},it={Visible:Ey,HasFocusedSuggestion:new nt("suggestWidgetHasFocusedSuggestion",!1,v("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new nt("suggestWidgetDetailsVisible",!1,v("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new nt("suggestWidgetMultipleSuggestions",!1,v("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new nt("suggestionMakesTextEdit",!0,v("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new nt("acceptSuggestionOnEnter",!0,v("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new nt("suggestionHasInsertAndReplaceRange",!1,v("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new nt("suggestionInsertMode",void 0,{type:"string",description:v("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new nt("suggestionCanResolve",!1,v("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},rl=new xe("suggestWidgetStatusBar"),k7=class{constructor(e,t,n,r){var o;this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=yl.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,P.isIRange(t.range)?(this.editStart=new Se(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Se(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Se(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||P.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Se(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Se(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Se(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||P.spansMultipleLines(t.range.insert)||P.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return V0(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,t.dispose()},n=>{Zo(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}},dc=class{constructor(e=2,t=new Set,n=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=r,this.showDeprecated=o}};dc.default=new dc;I7=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};l2=new Map;l2.set(0,M1e);l2.set(2,D1e);l2.set(1,A7);St.registerCommand("_executeCompletionItemProvider",(i,...e)=>V0(void 0,void 0,void 0,function*(){let[t,n,r,o]=e;Lt(ht.isUri(t)),Lt(Se.isIPosition(n)),Lt(typeof r=="string"||!r),Lt(typeof o=="number"||!o);let{completionProvider:s}=i.get(be),a=yield i.get(xn).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(n),u=yield K0(s,a.object.textEditorModel,d,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(let h of u.items)c.length<(o!=null?o:0)&&c.push(h.resolve(et.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>u.disposable.dispose(),100)}}finally{a.dispose()}}));nl=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}});var BG=M(()=>{});var zG=M(()=>{BG()});function L7(i,e=Dc){return iO(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var UG=M(()=>{pre();nr()});var Sd,q0=M(()=>{Sd=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let r=0;r{UG();oR();lo();Si();q0();Kn();Xu();De();sb();R1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O1e=function(i,e){return function(t,n){e(t,n,i)}},nBe=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),G0=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},$0=class{constructor(e,t,n,r){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=r}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(n=o.value,r=o.multiline)}if(n&&r&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=zi(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof On&&(a=zi(Zd(c.value).pop())),!0));let l=Pc(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},Y0=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Gh(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=Gh(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return rR(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(rf(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},X0=class{constructor(e,t,n,r){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(r=>!gR(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},Q0=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(r){if(t==="LINE_COMMENT")return r.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};Q0=R1e([O1e(2,Tt)],Q0);uc=class i{constructor(){this._date=new Date}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),r=n>0?"-":"+",o=Math.trunc(Math.abs(n/60)),s=o<10?"0"+o:o,a=Math.abs(n)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}};uc.dayNames=[v("Sunday","Sunday"),v("Monday","Monday"),v("Tuesday","Tuesday"),v("Wednesday","Wednesday"),v("Thursday","Thursday"),v("Friday","Friday"),v("Saturday","Saturday")];uc.dayNamesShort=[v("SundayShort","Sun"),v("MondayShort","Mon"),v("TuesdayShort","Tue"),v("WednesdayShort","Wed"),v("ThursdayShort","Thu"),v("FridayShort","Fri"),v("SaturdayShort","Sat")];uc.monthNames=[v("January","January"),v("February","February"),v("March","March"),v("April","April"),v("May","May"),v("June","June"),v("July","July"),v("August","August"),v("September","September"),v("October","October"),v("November","November"),v("December","December")];uc.monthNamesShort=[v("JanuaryShort","Jan"),v("FebruaryShort","Feb"),v("MarchShort","Mar"),v("AprilShort","Apr"),v("MayShort","May"),v("JuneShort","Jun"),v("JulyShort","Jul"),v("AugustShort","Aug"),v("SeptemberShort","Sep"),v("OctoberShort","Oct"),v("NovemberShort","Nov"),v("DecemberShort","Dec")];J0=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=TP(this._workspaceService.getWorkspace());if(!EP(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(Ow(e))return Gh(e.uri.path);let t=Gh(e.configPath.path);return t.endsWith(Pw)&&(t=t.substr(0,t.length-Pw.length-1)),t}_resoveWorkspacePath(e){if(Ow(e))return L7(e.uri.fsPath);let t=Gh(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?L7(n):"/"}},Z0=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return Sd()}}});var P1e,F1e,eg,jG,dp,M7=M(()=>{oi();Ce();Si();zG();xa();qe();Mn();Kn();qn();yb();sb();Xu();WG();P1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},F1e=function(i,e){return function(t,n){e(t,n,i)}},eg=class i{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=pw(t.placeholders,Co.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let r=this._snippet.offset(n),o=this._snippet.fullLen(n),s=P.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let r=[];for(let o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){let s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(r=>{let o=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new je(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(a);for(let d of this._snippet.enclosingPlaceholders(a)){let u=this._placeholderDecorations.get(d);r.changeDecorationOptions(u,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n!=null?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof Co){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let r of t){if(r.isFinalTabstop)break;n||(n=[],e.set(r.index,n));let o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Yu,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let r of this._placeholderGroups[this._placeholderGroupsIdx]){let o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);let s=o._snippet.placeholderInfo.last.index;for(let l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);let a=this._placeholderDecorations.get(r);n.removeDecoration(a),this._placeholderDecorations.delete(r);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),u=P.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),h=n.addDecoration(u,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=pw(this._snippet.placeholders,Co.compareByIndex)})}};eg._decor={active:ct.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:ct.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:ct.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:ct.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};jG={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},dp=class ol{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=zi(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof On)||c.parent instanceof Yu||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(n){let h=r.offset(c);if(h===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:r.toString();let p=l.charCodeAt(h-1);(p===10||p===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let p=1;pA.get(kl)),m=e.invokeWithinContext(A=>new Y0(A.get(Dl),h)),g=()=>a,b=h.getValueInRange(ol.adjustSelection(h,e.getSelection(),n,0)),S=h.getValueInRange(ol.adjustSelection(h,e.getSelection(),0,r)),k=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),N=e.getSelections().map((A,H)=>({selection:A,idx:H})).sort((A,H)=>P.compareRangesUsingStarts(A.selection,H.selection));for(let{selection:A,idx:H}of N){let K=ol.adjustSelection(h,A,n,0),W=ol.adjustSelection(h,A,0,r);b!==h.getValueInRange(K)&&(K=A),S!==h.getValueInRange(W)&&(W=A);let re=A.setStartPosition(K.startLineNumber,K.startColumn).setEndPosition(W.endLineNumber,W.endColumn),ae=new jo().parse(t,!0,o),Ne=re.getStartPosition(),he=ol.adjustWhitespace(h,Ne,s||H>0&&k!==h.getLineFirstNonWhitespaceColumn(A.positionLineNumber),ae);ae.resolveVariables(new G0([m,new X0(g,H,N.length,e.getOption(76)==="spread"),new $0(h,A,H,l),new Q0(h,A,c),new uc,new J0(p),new Z0])),d[H]=Kt.replace(re,ae.toString()),d[H].identifier={major:H,minor:0},d[H]._isTracked=!0,u[H]=new eg(e,ae,he)}return{edits:d,snippets:u}}static createEditsAndSnippetsFromEdits(e,t,n,r,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new jo,u=new lp,h=new G0([e.invokeWithinContext(m=>new Y0(m.get(Dl),c)),new X0(()=>o,0,e.getSelections().length,e.getOption(76)==="spread"),new $0(c,e.getSelection(),0,s),new Q0(c,e.getSelection(),a),new uc,new J0(e.invokeWithinContext(m=>m.get(kl))),new Z0]);t=t.sort((m,g)=>P.compareRangesUsingStarts(m.range,g.range));let p=0;for(let m=0;m0){let H=t[m-1].range,K=P.fromPositions(H.getEndPosition(),g.getStartPosition()),W=new On(c.getValueInRange(K));u.appendChild(W),p+=W.value.length}let S=d.parseFragment(b,u);ol.adjustWhitespace(c,g.getStartPosition(),!0,u,new Set(S)),u.resolveVariables(h);let k=u.toString(),N=k.slice(p);p=k.length;let A=Kt.replace(g,N);A.identifier={major:m,minor:0},A._isTracked=!0,l.push(A)}return d.ensureFinalTabstop(u,n,!0),{edits:l,snippets:[new eg(e,u,"")]}}constructor(e,t,n=jG,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){Vi(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?ol.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):ol.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let r=n.filter(o=>!!o.identifier);for(let o=0;oje.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=jG){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=ol.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;lje.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let r=n.move(e);t.push(...r)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length{o.push(...r.get(s))})}e.sort(P.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(P.compareRangesUsingStarts);for(let o=0;o0}};dp=P1e([F1e(3,Tt)],dp)});var H1e,c2,VG,Zi,d2,up=M(()=>{Ce();Li();Ze();ri();jt();Kn();xt();Qu();De();ft();S_();M7();H1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},c2=function(i,e){return function(t,n){e(t,n,i)}},VG={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},Zi=class tg{static get(e){return e.getContribution(tg.ID)}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new ne,this._modelVersionId=-1,this._inSnippet=tg.InSnippetMode.bindTo(r),this._hasNextTabstop=tg.HasNextTabstop.bindTo(r),this._hasPrevTabstop=tg.HasPrevTabstop.bindTo(r)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?VG:Object.assign(Object.assign({},VG),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Lt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new dp(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(o,s)=>{if(!this._session||o!==this._editor.getModel()||!Se.equals(this._editor.getPosition(),s))return;let{activeChoice:a}=this._session;if(!a||a.choice.options.length===0)return;let l=o.getValueInRange(a.range),c=!!a.choice.options.find(u=>u.value===l),d=[];for(let u=0;ur.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:e}=this._session;if(!e||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask(()=>{HG(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};Zi.ID="snippetController2";Zi.InSnippetMode=new nt("inSnippetMode",!1,v("inSnippetMode","Whether the editor in current in snippet mode"));Zi.HasNextTabstop=new nt("hasNextTabstop",!1,v("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Zi.HasPrevTabstop=new nt("hasPrevTabstop",!1,v("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Zi=H1e([c2(1,Bc),c2(2,be),c2(3,Ke),c2(4,Tt)],Zi);Ae(Zi.ID,Zi,4);d2=wi.bindToContribution(Zi.get);Me(new d2({id:"jumpToNextSnippetPlaceholder",precondition:ce.and(Zi.InSnippetMode,Zi.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:2}}));Me(new d2({id:"jumpToPrevSnippetPlaceholder",precondition:ce.and(Zi.InSnippetMode,Zi.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:1026}}));Me(new d2({id:"leaveSnippet",precondition:Zi.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:9,secondary:[1033]}}));Me(new d2({id:"acceptSnippet",precondition:Zi.InSnippetMode,handler:i=>i.finish()}))});var B1e,D7,hp,So,u2,KG=M(()=>{oi();At();Ce();Ys();Gu();s7();Li();xa();ri();qe();br();Kn();Jy();PG();op();up();Bi();Et();B1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},D7=function(i,e){return function(t,n){e(t,n,i)}},hp=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(So||(So={}));u2=class extends oe{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(e,t,n,r,o,s,a,l,c,d,u,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(s2,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Gs("isActive",!1),this._forceUpdate=cG("forceUpdate"),this._selectedInlineCompletionId=Gs("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._preserveCurrentCompletionReasons=new Set([So.Redo,So.Undo,So.AcceptWord]),this._fetchInlineCompletions=oG("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ya.Automatic}),handleChange:(m,g)=>(m.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(m.change)?g.preserveCurrentCompletion=!0:m.didChange(this._forceUpdate)&&(g.inlineCompletionTriggerKind=m.change),!0)},(m,g)=>{if(this._forceUpdate.read(m),!(this._enabled.read(m)&&this.selectedSuggestItem.read(m)||this._isActive.read(m))){this._source.cancelUpdate();return}this.textModelVersionId.read(m);let S=this.selectedInlineCompletion.get(),k=g.preserveCurrentCompletion||S!=null&&S.forwardStable?S:void 0,N=this._source.suggestWidgetInlineCompletions.get(),A=this.selectedSuggestItem.read(m);if(N&&!A){let W=this._source.inlineCompletions.get();dn(re=>{W&&N.request.versionId>W.request.versionId&&this._source.inlineCompletions.set(N.clone(),re),this._source.clearSuggestWidgetInlineCompletions(re)})}let H=this.cursorPosition.read(m),K={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:A==null?void 0:A.toSelectedSuggestionInfo()};return this._source.fetch(H,K,k)}),this._filteredInlineCompletionItems=wr("filteredInlineCompletionItems",m=>{let g=this._source.inlineCompletions.read(m);if(!g)return[];let b=this.cursorPosition.read(m);return g.inlineCompletions.filter(k=>k.isVisible(this.textModel,b,m))}),this.selectedInlineCompletionIndex=wr("selectedCachedCompletionIndex",m=>{let g=this._selectedInlineCompletionId.read(m),b=this._filteredInlineCompletionItems.read(m),S=this._selectedInlineCompletionId===void 0?-1:b.findIndex(k=>k.semanticId===g);return S===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):S}),this.selectedInlineCompletion=wr("selectedCachedCompletion",m=>{let g=this._filteredInlineCompletionItems.read(m),b=this.selectedInlineCompletionIndex.read(m);return g[b]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=wr("selectedInlineCompletionsCount",m=>{if(this.lastTriggerKind.read(m)===ya.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=wr("ghostTextAndCompletion",m=>{var g;let b=this.textModel,S=this.selectedSuggestItem.read(m);if(S){let k=this._source.suggestWidgetInlineCompletions.read(m),N=k?k.inlineCompletions:[this.selectedInlineCompletion.read(m)].filter(eR),A=S.toSingleTextEdit().removeCommonPrefix(b),H=BR(N,st=>{let rt=st.toSingleTextEdit(m);return rt=rt.removeCommonPrefix(b,P.fromPositions(rt.range.getStartPosition(),S.range.getEndPosition())),rt.augments(A)?{edit:rt,completion:st}:void 0});if(!this._suggestPreviewEnabled.read(m)&&!H)return;let W=(g=H==null?void 0:H.edit)!==null&&g!==void 0?g:A,re=H?H.edit.text.length-A.text.length:0,ae=this._suggestPreviewMode.read(m),Ne=this.cursorPosition.read(m),he=W.computeGhostText(b,ae,Ne,re);return{ghostText:he!=null?he:new sp(W.range.endLineNumber,[]),completion:H==null?void 0:H.completion,suggestItem:S}}else{if(!this._isActive.read(m))return;let k=this.selectedInlineCompletion.read(m);if(!k)return;let N=k.toSingleTextEdit(m),A=this._inlineSuggestMode.read(m),H=this.cursorPosition.read(m),K=N.computeGhostText(b,A,H);return K?{ghostText:K,completion:k,suggestItem:void 0}:void 0}}),this.ghostText=wr("ghostText",m=>{let g=this.state.read(m);if(g)return g.ghostText}),this._register(dG(this._fetchInlineCompletions,!0));let p;this._register(un("call handleItemDidShow",m=>{var g,b;let S=this.state.read(m),k=S==null?void 0:S.completion;if((k==null?void 0:k.semanticId)!==(p==null?void 0:p.semanticId)&&(p=k,k)){let N=k.inlineCompletion,A=N.source;(b=(g=A.provider).handleItemDidShow)===null||b===void 0||b.call(g,A.inlineCompletions,N.sourceInlineCompletion,N.insertText)}}))}trigger(e){return hp(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return hp(this,void 0,void 0,function*(){o7(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,ya.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){o7(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_deltaSelectedInlineCompletionIndex(e){return hp(this,void 0,void 0,function*(){yield this.triggerExplicitly(),this._isNavigatingCurrentInlineCompletion=!0;try{let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}finally{this._isNavigatingCurrentInlineCompletion=!1}})}next(){return hp(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return hp(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t,n;return hp(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Xd;let r=this.ghostText.get(),o=(t=this.selectedInlineCompletion.get())===null||t===void 0?void 0:t.toInlineCompletion(void 0);!r||!o||(e.pushUndoStop(),o.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[Kt.replaceMove(o.range,""),...o.additionalTextEdits]),e.setPosition(o.snippetInfo.range.getStartPosition()),(n=Zi.get(e))===null||n===void 0||n.insert(o.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[Kt.replaceMove(o.range,o.insertText),...o.additionalTextEdits]),o.command&&(yield this._commandService.executeCommand(o.command.id,...o.command.arguments||[]).then(void 0,Ut)),dn(s=>{this._source.clear(s),this._isActive.set(!1,s)}))})}acceptNextWord(e){this._acceptNext(e,(t,n)=>{let r=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let d=/\s+/g.exec(n);return d&&d.index!==void 0&&d.index+d[0].length{let r=n.match(/\n/);return r&&r.index!==void 0?r.index+1:n.length})}_acceptNext(e,t){var n;if(e.getModel()!==this.textModel)throw new Xd;let r=this.ghostText.get(),o=(n=this.selectedInlineCompletion.get())===null||n===void 0?void 0:n.toInlineCompletion(void 0);if(!r||!o)return;if(o.snippetInfo||o.filterText!==o.insertText){this.accept(e);return}if(r.parts.length===0)return;let s=r.parts[0],a=new Se(r.lineNumber,s.column),l=s.lines.join(` -`),c=t(a,l);if(c===l.length&&r.parts.length===1){this.accept(e);return}let d=l.substring(0,c);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[Kt.replace(P.fromPositions(a),d)]);let u=z0(d);e.setPosition(B0(a,u))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let u=P.fromPositions(o.range.getStartPosition(),B0(a,z0(d))),h=e.getModel().getValueInRange(u,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,h.length)}}};u2=B1e([D7(9,He),D7(10,ui),D7(11,Tt)],u2)});var z1e,qG,ig,f2,N7,R7,ng,fp,O7=M(()=>{Dt();Ce();tf();Hre();br();jn();bl();Et();lu();z1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qG=function(i,e){return function(t,n){e(t,n,i)}},ig=class{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;let r=n[0].score[0];for(let o=0;ol&&u.type===n[c].completion.kind&&u.insertText===n[c].completion.insertText&&(l=u.touch,a=c),n[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(let[n,r]of e)r.touch=t,r.type=typeof r.type=="number"?r.type:Gm.fromString(r.type),this._cache.set(n,r);this._seq=this._cache.size}},R7=class extends ig{constructor(){super("recentlyUsedByPrefix"),this._trie=xP.forStrings(),this._seq=0}memorize(e,t,n){let{word:r}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${r}`;this._trie.set(o,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:r}=e.getWordUntilPosition(t);if(!r)return super.select(e,t,n);let o=`${e.getLanguageId()}/${r}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;ae.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,n]of e)n.type=typeof n.type=="number"?n.type:Gm.fromString(n.type),this._trie.set(t,n)}}},ng=class h2{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new ne,this._persistSoon=new ti(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===cb.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var n;let r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==r){this._saveState();let o=h2._strategyCtors.get(r)||f2;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${h2._storagePrefix}/${r}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch(s){}}return this._strategy}_saveState(){if(this._strategy){let t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${h2._storagePrefix}/${this._strategy.name}`,n,t,1)}}};ng._strategyCtors=new Map([["recentlyUsedByPrefix",R7],["recentlyUsed",N7],["first",f2]]);ng._storagePrefix="suggest/memories";ng=z1e([qG(0,Yr),qG(1,Mt)],ng);fp=rr("ISuggestMemories");sr(fp,ng,1)});var U1e,W1e,pp,$G=M(()=>{ft();U1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},W1e=function(i,e){return function(t,n){e(t,n,i)}},pp=class GG{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=GG.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(119)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){let e=this._editor.getOption(119)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let n=this._editor.getModel(),r=this._editor.getSelection(),o=n.getWordAtPosition(r.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===r.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};pp.AtEnd=new nt("atEndOfWord",!1);pp=U1e([W1e(1,Ke)],pp)});var j1e,V1e,wd,YG=M(()=>{ft();j1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V1e=function(i,e){return function(t,n){e(t,n,i)}},wd=class p2{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=p2.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(p2._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let r=n;for(let o=t.items.length;o>0&&(r=(r+t.items.length+(e?1:-1))%t.items.length,!(r===n||!t.items[r].completion.additionalTextEdits));o--);return r}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=p2._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};wd.OtherSuggestions=new nt("hasOtherSuggestions",!1);wd=j1e([V1e(1,Ke)],wd)});var m2,XG=M(()=>{oi();Ce();fw();m2=class{constructor(e,t,n,r){this._disposables=new ne,this._disposables.add(n.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(o=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(o=>{if(this._active&&!t.isFrozen()&&n.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&r(this._active.item)}}))}_onItem(e){if(!e||!Ui(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new eu;for(let n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}});var K1e,xd,P7=M(()=>{qN();ri();qe();K1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xd=class i{provideSelectionRanges(e,t){return K1e(this,void 0,void 0,function*(){let n=[];for(let r of t){let o=[];n.push(o);let s=new Map;yield new Promise(a=>i._bracketsRightYield(a,0,e,r,s)),yield new Promise(a=>i._bracketsLeftYield(a,0,e,r,s,o))}return n})}static _bracketsRightYield(e,t,n,r,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!r){e();break}let l=n.bracketPairs.findNextBracket(r);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,n,r,o));break}if(l.bracketInfo.isOpeningBracket){let d=l.bracketInfo.bracketText,u=s.has(d)?s.get(d):0;s.set(d,u+1)}else{let d=l.bracketInfo.getOpeningBrackets()[0].bracketText,u=s.has(d)?s.get(d):0;if(u-=1,s.set(d,Math.max(0,u)),u<0){let h=o.get(d);h||(h=new h_,o.set(d,h)),h.push(l.range)}}r=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,r,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!r){e();break}let c=n.bracketPairs.findPrevBracket(r);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,n,r,o,s));break}if(c.bracketInfo.isOpeningBracket){let u=c.bracketInfo.bracketText,h=a.has(u)?a.get(u):0;if(h-=1,a.set(u,Math.max(0,h)),h<0){let p=o.get(u);if(p){let m=p.shift();p.size===0&&o.delete(u);let g=P.fromPositions(c.range.getEndPosition(),m.getStartPosition()),b=P.fromPositions(c.range.getStartPosition(),m.getEndPosition());s.push({range:g}),s.push({range:b}),i._addBracketLeading(n,b,s)}}}else{let u=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+1)}r=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;let r=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(r);o!==0&&o!==t.startColumn&&(n.push({range:P.fromPositions(new Se(r,o),t.getEndPosition())}),n.push({range:P.fromPositions(new Se(r,1),t.getEndPosition())}));let s=r-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(n.push({range:P.fromPositions(new Se(s,a),t.getEndPosition())}),n.push({range:P.fromPositions(new Se(s,1),t.getEndPosition())}))}}};xd._maxDuration=30;xd._maxRounds=2});var q1e,Ed,F7=M(()=>{oi();qe();P7();q1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ed=class i{static create(e,t){return q1e(this,void 0,void 0,function*(){if(!t.getOption(114).localityBonus||!t.hasModel())return i.None;let n=t.getModel(),r=t.getPosition();if(!e.canComputeWordRanges(n.uri))return i.None;let[o]=yield new xd().provideSelectionRanges(n,[r]);if(o.length===0)return i.None;let s=yield e.computeWordRanges(n.uri,o[0].range);if(!s)return i.None;let a=n.getWordUntilPosition(r);return delete s[a.word],new class extends i{distance(l,c){if(!r.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let d=typeof c.label=="string"?c.label:c.label.label,u=s[d];if(PR(u))return 2<<20;let h=tu(u,P.fromPositions(l),P.compareRangesUsingStarts),p=h>=0?u[h]:u[Math.max(0,~h-1)],m=o.length;for(let g of o){if(!P.containsRange(g.range,p))break;m-=1}return m}}})}};Ed.None=new class extends Ed{distance(){return 0}}});var rg,mp,H7=M(()=>{oi();Cl();Si();rg=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},mp=class i{constructor(e,t,n,r,o,s,a=O_.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=r,this._options=o,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=i._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=i._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;let e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext,r="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?P_:eO;for(let c=0;c=p)d.score=yl.Default;else if(typeof d.completion.filterText=="string"){let g=l(r,o,m,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;bR(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=ZR(r,o,m,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{let g=l(r,o,m,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;d.score=g}}d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?OR(e.length-.85,e,(c,d)=>c-d):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return i._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return i._compareCompletionItems(e,t)}}});function Y1e(i,e,t){if(!e.getContextKeyValue(In.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(In.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}function X1e(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(In.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}var G1e,Ju,$1e,hc,g2,JG=M(()=>{Dt();gi();At();qt();Ce();Si();Mn();hb();F7();Ym();jn();ft();S_();Hc();H7();Qu();xt();Cl();Li();Yy();up();G1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ju=function(i,e){return function(t,n){e(t,n,i)}},$1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},hc=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);let r=t.getWordAtPosition(n);return!(!r||r.endColumn!==n.column&&r.startColumn+1!==n.column||!isNaN(Number(r.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}};g2=class QG{constructor(e,t,n,r,o,s,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=r,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._toDispose=new ne,this._triggerCharacterListener=new ne,this._triggerQuickSuggest=new ss,this._triggerState=void 0,this._completionDisposables=new ne,this._onDidCancel=new $e,this._onDidTrigger=new $e,this._onDidSuggest=new $e,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new je(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{c||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Vi(this._triggerCharacterListener),Vi([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(88)||!this._editor.hasModel()||!this._editor.getOption(117))return;let e=new Map;for(let n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let r of n.triggerCharacters||[]){let o=e.get(r);o||(o=new Set,o.add(FG()),e.set(r,o)),o.add(n)}let t=n=>{var r;if(!X1e(this._editor,this._contextKeyService,this._configurationService)||hc.shouldAutoTrigger(this._editor))return;if(!n){let a=this._editor.getPosition();n=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let o="";SR(n.charCodeAt(n.length-1))?CR(n.charCodeAt(n.length-2))&&(o=n.substr(n.length-2)):o=n.charAt(n.length-1);let s=e.get(o);if(s){let a=new Map;if(this._completionModel)for(let[l,c]of this._completionModel.getItemsByProvider())s.has(l)||a.set(l,c);this.trigger({auto:!0,triggerKind:1,triggerCharacter:o,retrigger:!!this._completionModel,clipboardText:(r=this._completionModel)===null||r===void 0?void 0:r.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;let t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;nl.isAllOff(this._editor.getOption(86))||this._editor.getOption(114).snippetsPreventQuickSuggestions&&(!((e=Zi.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!hc.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=this._editor.getOption(86);if(!nl.isAllOff(r)){if(!nl.isAllOn(r)){t.tokenization.tokenizeIfCheap(n.lineNumber);let o=t.tokenization.getLineTokens(n.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(nl.valueFor(r,s)!=="on")return}Y1e(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(87)))}_refilterCompletionItems(){Lt(this._editor.hasModel()),Lt(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new hc(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(n)}trigger(e){var t,n,r,o,s,a;if(!this._editor.hasModel())return;let l=this._editor.getModel(),c=new hc(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=c;let d={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Ni;let u=this._editor.getOption(108),h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}let{itemKind:p,showDeprecated:m}=QG._createSuggestFilter(this._editor),g=new dc(h,(o=(r=e.completionOptions)===null||r===void 0?void 0:r.kindFilter)!==null&&o!==void 0?o:p,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,m),b=Ed.create(this._editorWorkerService,this._editor),S=K0(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),g,d,this._requestToken.token);Promise.all([S,b]).then(([k,N])=>$1e(this,void 0,void 0,function*(){var A;if((A=this._requestToken)===null||A===void 0||A.dispose(),!this._editor.hasModel())return;let H=e==null?void 0:e.clipboardText;if(!H&&k.needsClipboard&&(H=yield this._clipboardService.readText()),this._triggerState===void 0)return;let K=this._editor.getModel(),W=new hc(K,this._editor.getPosition(),e),re=Object.assign(Object.assign({},O_.default),{firstMatchCanBeWeak:!this._editor.getOption(114).matchOnWordStartOnly});this._completionModel=new mp(k.items,this._context.column,{leadingLineContent:W.leadingLineContent,characterCountDelta:W.column-this._context.column},N,this._editor.getOption(114),this._editor.getOption(108),re,H),this._completionDisposables.add(k.disposable),this._onNewContext(W),this._reportDurationsTelemetry(k.durations)})).catch(at)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){let t=new Set;e.getOption(108)==="none"&&t.add(27);let r=e.getOption(114);return r.showMethods||t.add(0),r.showFunctions||t.add(1),r.showConstructors||t.add(2),r.showFields||t.add(3),r.showVariables||t.add(4),r.showClasses||t.add(5),r.showStructs||t.add(6),r.showInterfaces||t.add(7),r.showModules||t.add(8),r.showProperties||t.add(9),r.showEvents||t.add(10),r.showOperators||t.add(11),r.showUnits||t.add(12),r.showValues||t.add(13),r.showConstants||t.add(14),r.showEnums||t.add(15),r.showEnumMembers||t.add(16),r.showKeywords||t.add(17),r.showWords||t.add(18),r.showColors||t.add(19),r.showFiles||t.add(20),r.showReferences||t.add(21),r.showColors||t.add(22),r.showFolders||t.add(23),r.showTypeParameters||t.add(24),r.showSnippets||t.add(27),r.showUsers||t.add(25),r.showIssues||t.add(26),{itemKind:t,showDeprecated:r.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(zi(e.leadingLineContent)!==zi(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(hc.shouldAutoTrigger(this._editor)&&this._context){let n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,n=new Set;for(let[r,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?n.add(r):t.set(r,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let r=hc.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(r&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};g2=G1e([Ju(1,Ml),Ju(2,Ms),Ju(3,Mr),Ju(4,Bc),Ju(5,Ke),Ju(6,Mt),Ju(7,be)],g2)});var og,ZG=M(()=>{Ce();og=class i{constructor(e,t){this._disposables=new ne,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let n=e.getSelections(),r=n.length,o=!1;for(let a=0;ai._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e{});var t$=M(()=>{e$()});var Q1e,fc,Vo,gp=M(()=>{yw();Ar();XP();Bi();ft();Et();Ro();ar();Kw();Kn();xt();Q1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fc=function(i,e){return function(t,n){e(t,n,i)}},Vo=class extends YP{constructor(e,t,n,r,o,s,a,l,c,d,u,h,p){super(e,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),n,o,s,a,l,c,d,u,h,p),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){sf(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Vo=Q1e([fc(4,He),fc(5,Zt),fc(6,ui),fc(7,Ke),fc(8,pn),fc(9,xi),fc(10,Cb),fc(11,Tt),fc(12,be)],Vo)});var J1e,B7,z7,v2,n$=M(()=>{Ht();gf();Ce();De();bb();Yi();ft();Et();J1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},B7=function(i,e){return function(t,n){e(t,n,i)}},z7=class i extends _b{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,i.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}},v2=class{constructor(e,t,n,r,o){this._menuId=t,this._menuService=r,this._contextKeyService=o,this._menuDisposables=new ne,this.element=me(e,fe(".suggest-status-bar"));let s=a=>a instanceof da?n.createInstance(z7,a,void 0):void 0;this._leftActions=new Oo(this.element,{actionViewItemProvider:s}),this._rightActions=new Oo(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){let e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{let n=[],r=[];for(let[o,s]of e.getActions())o==="left"?n.push(...s):r.push(...s);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(r)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};v2=J1e([B7(2,He),B7(3,Is),B7(4,Ke)],v2)});var vp,U7=M(()=>{Ht();Hw();qt();Ce();vp=class{constructor(){this._onDidWillResize=new $e,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new $e,this.onDidResize=this._onDidResize.event,this._sashListener=new ne,this._size=new Mi(0,0),this._minSize=new Mi(0,0),this._maxSize=new Mi(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Il(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Il(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Il(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Fw.North}),this._southSash=new Il(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Fw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(li.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(li.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(r=>{e&&(n=r.currentX-r.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(r=>{e&&(n=-(r.currentX-r.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(r=>{e&&(t=-(r.currentY-r.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(r=>{e&&(t=r.currentY-r.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(li.any(this._eastSash.onDidReset,this._westSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(li.any(this._northSash.onDidReset,this._southSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,r){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=r?3:0}layout(e=this.size.height,t=this.size.width){let{height:n,width:r}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(n,Math.min(o,e)),t=Math.max(r,Math.min(s,t));let a=new Mi(t,e);Mi.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}});var r$=M(()=>{});var o$=M(()=>{r$()});function e0e(i,e,t){return a$(this,void 0,void 0,function*(){try{return yield i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:t0e(t)})}catch(n){return at(n),!1}})}function t0e(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var Z1e,s$,a$,io,Zu=M(()=>{Nre();Ww();At();qt();Ce();o$();UP();os();vw();Xre();cs();Z1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},s$=function(i,e){return function(t,n){e(t,n,i)}},a$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},io=class l${constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new $e,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let r=new ne,o=r.add(mP(e,Object.assign(Object.assign({},this._getRenderOptions(e,r)),t),n));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,r)=>a$(this,void 0,void 0,function*(){var o,s,a;let l;n?l=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=Zh);let c=yield $P(this._languageService,r,l),d=document.createElement("span");if(d.innerHTML=(a=(s=l$._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){let u=this._options.editor.getOption(48);pb(d,u)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>e0e(this._openerService,n,e.isTrusted),disposables:t}}}};io._ttpTokenizer=_f("tokenizeToString",{createHTML(i){return i}});io=Z1e([s$(1,Xi),s$(2,Qi)],io)});function sg(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var i0e,n0e,_2,b2,W7=M(()=>{Ht();tb();or();qr();qt();Sl();Ce();Zu();U7();De();Et();i0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},n0e=function(i,e){return function(t,n){e(t,n,i)}};_2=class{constructor(e,t){this._editor=e,this._onDidClose=new $e,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new $e,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new ne,this._renderDisposeable=new ne,this._borderWidth=1,this._size=new Mi(330,0),this.domNode=fe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(io,{editor:e}),this._body=fe(".body"),this._scrollbar=new mf(this._body,{alwaysConsumeMouseWheel:!0}),me(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=me(this._body,fe(".header")),this._close=me(this._header,fe("span"+mt.asCSSSelector(lt.close))),this._close.title=v("details.close","Close"),this._type=me(this._header,fe("p.type")),this._docs=me(this._body,fe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(48),n=t.getMassagedFontFamily(),r=e.get(115)||t.fontSize,o=e.get(116)||t.lineHeight,s=t.fontWeight,a=`${r}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/r}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(116)||this._editor.getOption(48).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=v("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var n,r;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} +`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}});function A1e(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}function L1e(i,e,t){return!i||!e?i===e:t(i,e)}function mG(i){return i.startLineNumber===i.endLineNumber?new Se(1,1+i.endColumn-i.startColumn):new Se(1+i.endLineNumber-i.startLineNumber,i.endColumn)}var k1e,pG,I1e,Yy,b7,y7,C7,Xy,gG=M(()=>{gi();Cl();Ce();Ys();Gu();ri();br();Kn();xt();f7();fG();k1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},pG=function(i,e){return function(t,n){e(t,n,i)}},I1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Yy=class extends oe{constructor(e,t,n,r,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new Bi),this.inlineCompletions=F0("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=F0("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var r,o;let s=new b7(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((r=this._updateOperation.value)===null||r===void 0)&&r.request.satisfies(s))return this._updateOperation.value.promise;if(!((o=a.get())===null||o===void 0)&&o.request.satisfies(s))return Promise.resolve(!0);let l=!!this._updateOperation.value;this._updateOperation.clear();let c=new Ri,d=(()=>I1e(this,void 0,void 0,function*(){if((l||t.triggerKind===ya.Automatic)&&(yield A1e(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let p=new Date,m=yield hG(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,c.token,this.languageConfigurationService);if(c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let g=new Date;this._debounceValue.update(this.textModel,g.getTime()-p.getTime());let b=new C7(m,s,this.textModel,this.versionId);if(n){let S=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!m.has(S)&&b.prepend(n.inlineCompletion,S.range,!0)}return this._updateOperation.clear(),dn(S=>{a.set(b,S)}),!0}))(),u=new y7(s,c,d);return this._updateOperation.value=u,d}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};Yy=k1e([pG(3,be),pG(4,Tt)],Yy);b7=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&L1e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===ya.Automatic||this.context.triggerKind===ya.Explicit)&&this.versionId===e.versionId}};y7=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},C7=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,r){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=xr("ranges",s=>{this.versionId.read(s);let a=!1;for(let l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});let o=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new Xy(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[]),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let r=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new Xy(e,r,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},Xy=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,r){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=r!=null?r:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new $u(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){let r=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==r.range.startLineNumber)return!1;let o=e.getValueInRange(r.range,1).toLowerCase(),s=r.text.toLowerCase(),a=Math.max(0,t.column-r.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),u=o.substring(a),h=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=h&&(d=d.trimStart(),d.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!YR(u,c)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new $u(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return mG(this._getUpdatedRange(e)).isBefore(mG(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){let t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}}});function vG(){return ap}function V0(i,e,t,n=dc.default,r={triggerKind:0},o=et.None){return j0(this,void 0,void 0,function*(){let s=new Ln(!0);t=t.clone();let a=e.getWordAtPosition(t),l=a?new P(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):P.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],u=new ne,h=[],p=!1,m=(b,S,k)=>{var N,A,H;let K=!1;if(!S)return K;for(let W of S.suggestions)if(!n.kindFilter.has(W.kind)){if(!n.showDeprecated&&(!((N=W==null?void 0:W.tags)===null||N===void 0)&&N.includes(1)))continue;W.range||(W.range=c),W.sortText||(W.sortText=typeof W.label=="string"?W.label:W.label.label),!p&&W.insertTextRules&&W.insertTextRules&4&&(p=Vo.guessNeedsClipboard(W.insertText)),d.push(new S7(t,W,S,b)),K=!0}return d_(S)&&u.add(S),h.push({providerName:(A=b._debugDisplayName)!==null&&A!==void 0?A:"unknown_provider",elapsedProvider:(H=S.duration)!==null&&H!==void 0?H:-1,elapsedOverall:k.elapsed()}),K},g=(()=>j0(this,void 0,void 0,function*(){if(!ap||n.kindFilter.has(27))return;let b=n.providerItemsToReuse.get(ap);if(b){b.forEach(N=>d.push(N));return}if(n.providerFilter.size>0&&!n.providerFilter.has(ap))return;let S=new Ln(!0),k=yield ap.provideCompletionItems(e,t,r,o);m(ap,k,S)}))();for(let b of i.orderedGroups(e)){let S=!1;if(yield Promise.all(b.map(k=>j0(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(k)){let N=n.providerItemsToReuse.get(k);N.forEach(A=>d.push(A)),S=S||N.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(k)))try{let N=new Ln(!0),A=yield k.provideCompletionItems(e,t,r,o);S=m(k,A,N)||S}catch(N){Ut(N)}}))),S||o.isCancellationRequested)break}return yield g,o.isCancellationRequested?(u.dispose(),Promise.reject(new l_)):new w7(d.sort(N1e(n.snippetSortOrder)),p,{entries:h,elapsed:s.elapsed()},u)})}function x7(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLowe.sortTextLow)return 1}return i.textLabele.textLabel?1:i.completion.kind-e.completion.kind}function M1e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return x7(i,e)}function D1e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return x7(i,e)}function N1e(i){return Qy.get(i)}function _G(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var j0,it,nl,S7,dc,ap,w7,Qy,il,Qu=M(()=>{gi();At();Cl();Ce();ml();Mi();Sn();ri();qe();ca();Xu();De();Yi();zi();ft();xt();aE();j0=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},it={Visible:py,HasFocusedSuggestion:new nt("suggestWidgetHasFocusedSuggestion",!1,v("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new nt("suggestWidgetDetailsVisible",!1,v("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new nt("suggestWidgetMultipleSuggestions",!1,v("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new nt("suggestionMakesTextEdit",!0,v("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new nt("acceptSuggestionOnEnter",!0,v("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new nt("suggestionHasInsertAndReplaceRange",!1,v("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new nt("suggestionInsertMode",void 0,{type:"string",description:v("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new nt("suggestionCanResolve",!1,v("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},nl=new xe("suggestWidgetStatusBar"),S7=class{constructor(e,t,n,r){var o;this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=yl.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,P.isIRange(t.range)?(this.editStart=new Se(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Se(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Se(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||P.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Se(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Se(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Se(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||P.spansMultipleLines(t.range.insert)||P.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return j0(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,t.dispose()},n=>{es(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}},dc=class{constructor(e=2,t=new Set,n=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=r,this.showDeprecated=o}};dc.default=new dc;w7=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};Qy=new Map;Qy.set(0,M1e);Qy.set(2,D1e);Qy.set(1,x7);St.registerCommand("_executeCompletionItemProvider",(i,...e)=>j0(void 0,void 0,void 0,function*(){let[t,n,r,o]=e;Lt(ht.isUri(t)),Lt(Se.isIPosition(n)),Lt(typeof r=="string"||!r),Lt(typeof o=="number"||!o);let{completionProvider:s}=i.get(be),a=yield i.get(xn).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(n),u=yield V0(s,a.object.textEditorModel,d,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(let h of u.items)c.length<(o!=null?o:0)&&c.push(h.resolve(et.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>u.disposable.dispose(),100)}}finally{a.dispose()}}));il=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}});var bG=M(()=>{});var yG=M(()=>{bG()});function E7(i,e=Nc){return eO(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var CG=M(()=>{mre();nr()});var Cd,K0=M(()=>{Cd=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let r=0;r{CG();nR();lo();wi();K0();Kn();Xu();De();ob();R1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O1e=function(i,e){return function(t,n){e(t,n,i)}},eBe=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),q0=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},G0=class{constructor(e,t,n,r){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=r}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(n=o.value,r=o.multiline)}if(n&&r&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=Ui(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof On&&(a=Ui(eu(c.value).pop())),!0));let l=Fc(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},$0=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Gh(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=Gh(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return iR(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(rf(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},Y0=class{constructor(e,t,n,r){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(r=>!pR(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},X0=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(r){if(t==="LINE_COMMENT")return r.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};X0=R1e([O1e(2,Tt)],X0);uc=class i{constructor(){this._date=new Date}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),r=n>0?"-":"+",o=Math.trunc(Math.abs(n/60)),s=o<10?"0"+o:o,a=Math.abs(n)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}};uc.dayNames=[v("Sunday","Sunday"),v("Monday","Monday"),v("Tuesday","Tuesday"),v("Wednesday","Wednesday"),v("Thursday","Thursday"),v("Friday","Friday"),v("Saturday","Saturday")];uc.dayNamesShort=[v("SundayShort","Sun"),v("MondayShort","Mon"),v("TuesdayShort","Tue"),v("WednesdayShort","Wed"),v("ThursdayShort","Thu"),v("FridayShort","Fri"),v("SaturdayShort","Sat")];uc.monthNames=[v("January","January"),v("February","February"),v("March","March"),v("April","April"),v("May","May"),v("June","June"),v("July","July"),v("August","August"),v("September","September"),v("October","October"),v("November","November"),v("December","December")];uc.monthNamesShort=[v("JanuaryShort","Jan"),v("FebruaryShort","Feb"),v("MarchShort","Mar"),v("AprilShort","Apr"),v("MayShort","May"),v("JuneShort","Jun"),v("JulyShort","Jul"),v("AugustShort","Aug"),v("SeptemberShort","Sep"),v("OctoberShort","Oct"),v("NovemberShort","Nov"),v("DecemberShort","Dec")];Q0=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=xP(this._workspaceService.getWorkspace());if(!wP(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(Rw(e))return Gh(e.uri.path);let t=Gh(e.configPath.path);return t.endsWith(Ow)&&(t=t.substr(0,t.length-Ow.length-1)),t}_resoveWorkspacePath(e){if(Rw(e))return E7(e.uri.fsPath);let t=Gh(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?E7(n):"/"}},J0=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return Cd()}}});var P1e,F1e,Z0,wG,lp,T7=M(()=>{oi();Ce();wi();yG();xa();qe();Mn();Kn();qn();bb();ob();Xu();SG();P1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},F1e=function(i,e){return function(t,n){e(t,n,i)}},Z0=class i{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=fw(t.placeholders,So.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let r=this._snippet.offset(n),o=this._snippet.fullLen(n),s=P.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let r=[];for(let o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){let s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(r=>{let o=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new je(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(a);for(let d of this._snippet.enclosingPlaceholders(a)){let u=this._placeholderDecorations.get(d);r.changeDecorationOptions(u,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n!=null?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof So){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let r of t){if(r.isFinalTabstop)break;n||(n=[],e.set(r.index,n));let o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Yu,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let r of this._placeholderGroups[this._placeholderGroupsIdx]){let o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);let s=o._snippet.placeholderInfo.last.index;for(let l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);let a=this._placeholderDecorations.get(r);n.removeDecoration(a),this._placeholderDecorations.delete(r);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),u=P.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),h=n.addDecoration(u,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=fw(this._snippet.placeholders,So.compareByIndex)})}};Z0._decor={active:ct.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:ct.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:ct.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:ct.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};wG={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},lp=class rl{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=Ui(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof On)||c.parent instanceof Yu||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(n){let h=r.offset(c);if(h===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:r.toString();let p=l.charCodeAt(h-1);(p===10||p===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let p=1;pA.get(kl)),m=e.invokeWithinContext(A=>new $0(A.get(Dl),h)),g=()=>a,b=h.getValueInRange(rl.adjustSelection(h,e.getSelection(),n,0)),S=h.getValueInRange(rl.adjustSelection(h,e.getSelection(),0,r)),k=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),N=e.getSelections().map((A,H)=>({selection:A,idx:H})).sort((A,H)=>P.compareRangesUsingStarts(A.selection,H.selection));for(let{selection:A,idx:H}of N){let K=rl.adjustSelection(h,A,n,0),W=rl.adjustSelection(h,A,0,r);b!==h.getValueInRange(K)&&(K=A),S!==h.getValueInRange(W)&&(W=A);let re=A.setStartPosition(K.startLineNumber,K.startColumn).setEndPosition(W.endLineNumber,W.endColumn),ae=new Vo().parse(t,!0,o),Ne=re.getStartPosition(),he=rl.adjustWhitespace(h,Ne,s||H>0&&k!==h.getLineFirstNonWhitespaceColumn(A.positionLineNumber),ae);ae.resolveVariables(new q0([m,new Y0(g,H,N.length,e.getOption(76)==="spread"),new G0(h,A,H,l),new X0(h,A,c),new uc,new Q0(p),new J0])),d[H]=Kt.replace(re,ae.toString()),d[H].identifier={major:H,minor:0},d[H]._isTracked=!0,u[H]=new Z0(e,ae,he)}return{edits:d,snippets:u}}static createEditsAndSnippetsFromEdits(e,t,n,r,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new Vo,u=new sp,h=new q0([e.invokeWithinContext(m=>new $0(m.get(Dl),c)),new Y0(()=>o,0,e.getSelections().length,e.getOption(76)==="spread"),new G0(c,e.getSelection(),0,s),new X0(c,e.getSelection(),a),new uc,new Q0(e.invokeWithinContext(m=>m.get(kl))),new J0]);t=t.sort((m,g)=>P.compareRangesUsingStarts(m.range,g.range));let p=0;for(let m=0;m0){let H=t[m-1].range,K=P.fromPositions(H.getEndPosition(),g.getStartPosition()),W=new On(c.getValueInRange(K));u.appendChild(W),p+=W.value.length}let S=d.parseFragment(b,u);rl.adjustWhitespace(c,g.getStartPosition(),!0,u,new Set(S)),u.resolveVariables(h);let k=u.toString(),N=k.slice(p);p=k.length;let A=Kt.replace(g,N);A.identifier={major:m,minor:0},A._isTracked=!0,l.push(A)}return d.ensureFinalTabstop(u,n,!0),{edits:l,snippets:[new Z0(e,u,"")]}}constructor(e,t,n=wG,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){Vi(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?rl.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):rl.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let r=n.filter(o=>!!o.identifier);for(let o=0;oje.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=wG){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=rl.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;lje.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let r=n.move(e);t.push(...r)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length{o.push(...r.get(s))})}e.sort(P.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(P.compareRangesUsingStarts);for(let o=0;o0}};lp=P1e([F1e(3,Tt)],lp)});var H1e,Jy,xG,Zi,Zy,cp=M(()=>{Ce();Mi();Ze();ri();jt();Kn();xt();Qu();De();ft();C_();T7();H1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Jy=function(i,e){return function(t,n){e(t,n,i)}},xG={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},Zi=class eg{static get(e){return e.getContribution(eg.ID)}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new ne,this._modelVersionId=-1,this._inSnippet=eg.InSnippetMode.bindTo(r),this._hasNextTabstop=eg.HasNextTabstop.bindTo(r),this._hasPrevTabstop=eg.HasPrevTabstop.bindTo(r)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?xG:Object.assign(Object.assign({},xG),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Lt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new lp(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(o,s)=>{if(!this._session||o!==this._editor.getModel()||!Se.equals(this._editor.getPosition(),s))return;let{activeChoice:a}=this._session;if(!a||a.choice.options.length===0)return;let l=o.getValueInRange(a.range),c=!!a.choice.options.find(u=>u.value===l),d=[];for(let u=0;ur.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:e}=this._session;if(!e||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask(()=>{_G(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};Zi.ID="snippetController2";Zi.InSnippetMode=new nt("inSnippetMode",!1,v("inSnippetMode","Whether the editor in current in snippet mode"));Zi.HasNextTabstop=new nt("hasNextTabstop",!1,v("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Zi.HasPrevTabstop=new nt("hasPrevTabstop",!1,v("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Zi=H1e([Jy(1,zc),Jy(2,be),Jy(3,Ke),Jy(4,Tt)],Zi);Ae(Zi.ID,Zi,4);Zy=xi.bindToContribution(Zi.get);Me(new Zy({id:"jumpToNextSnippetPlaceholder",precondition:ce.and(Zi.InSnippetMode,Zi.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:2}}));Me(new Zy({id:"jumpToPrevSnippetPlaceholder",precondition:ce.and(Zi.InSnippetMode,Zi.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:1026}}));Me(new Zy({id:"leaveSnippet",precondition:Zi.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:O.editorTextFocus,primary:9,secondary:[1033]}}));Me(new Zy({id:"acceptSnippet",precondition:Zi.InSnippetMode,handler:i=>i.finish()}))});var B1e,k7,dp,wo,e2,EG=M(()=>{oi();At();Ce();Ys();Gu();t7();Mi();xa();ri();qe();br();Kn();Uy();gG();np();cp();zi();Et();B1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},k7=function(i,e){return function(t,n){e(t,n,i)}},dp=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(wo||(wo={}));e2=class extends oe{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(e,t,n,r,o,s,a,l,c,d,u,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=u,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(Yy,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Gs("isActive",!1),this._forceUpdate=jq("forceUpdate"),this._selectedInlineCompletionId=Gs("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._preserveCurrentCompletionReasons=new Set([wo.Redo,wo.Undo,wo.AcceptWord]),this._fetchInlineCompletions=Bq("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ya.Automatic}),handleChange:(m,g)=>(m.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(m.change)?g.preserveCurrentCompletion=!0:m.didChange(this._forceUpdate)&&(g.inlineCompletionTriggerKind=m.change),!0)},(m,g)=>{if(this._forceUpdate.read(m),!(this._enabled.read(m)&&this.selectedSuggestItem.read(m)||this._isActive.read(m))){this._source.cancelUpdate();return}this.textModelVersionId.read(m);let S=this.selectedInlineCompletion.get(),k=g.preserveCurrentCompletion||S!=null&&S.forwardStable?S:void 0,N=this._source.suggestWidgetInlineCompletions.get(),A=this.selectedSuggestItem.read(m);if(N&&!A){let W=this._source.inlineCompletions.get();dn(re=>{W&&N.request.versionId>W.request.versionId&&this._source.inlineCompletions.set(N.clone(),re),this._source.clearSuggestWidgetInlineCompletions(re)})}let H=this.cursorPosition.read(m),K={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:A==null?void 0:A.toSelectedSuggestionInfo()};return this._source.fetch(H,K,k)}),this._filteredInlineCompletionItems=xr("filteredInlineCompletionItems",m=>{let g=this._source.inlineCompletions.read(m);if(!g)return[];let b=this.cursorPosition.read(m);return g.inlineCompletions.filter(k=>k.isVisible(this.textModel,b,m))}),this.selectedInlineCompletionIndex=xr("selectedCachedCompletionIndex",m=>{let g=this._selectedInlineCompletionId.read(m),b=this._filteredInlineCompletionItems.read(m),S=this._selectedInlineCompletionId===void 0?-1:b.findIndex(k=>k.semanticId===g);return S===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):S}),this.selectedInlineCompletion=xr("selectedCachedCompletion",m=>{let g=this._filteredInlineCompletionItems.read(m),b=this.selectedInlineCompletionIndex.read(m);return g[b]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=xr("selectedInlineCompletionsCount",m=>{if(this.lastTriggerKind.read(m)===ya.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=xr("ghostTextAndCompletion",m=>{var g;let b=this.textModel,S=this.selectedSuggestItem.read(m);if(S){let k=this._source.suggestWidgetInlineCompletions.read(m),N=k?k.inlineCompletions:[this.selectedInlineCompletion.read(m)].filter(JN),A=S.toSingleTextEdit().removeCommonPrefix(b),H=FR(N,st=>{let rt=st.toSingleTextEdit(m);return rt=rt.removeCommonPrefix(b,P.fromPositions(rt.range.getStartPosition(),S.range.getEndPosition())),rt.augments(A)?{edit:rt,completion:st}:void 0});if(!this._suggestPreviewEnabled.read(m)&&!H)return;let W=(g=H==null?void 0:H.edit)!==null&&g!==void 0?g:A,re=H?H.edit.text.length-A.text.length:0,ae=this._suggestPreviewMode.read(m),Ne=this.cursorPosition.read(m),he=W.computeGhostText(b,ae,Ne,re);return{ghostText:he!=null?he:new rp(W.range.endLineNumber,[]),completion:H==null?void 0:H.completion,suggestItem:S}}else{if(!this._isActive.read(m))return;let k=this.selectedInlineCompletion.read(m);if(!k)return;let N=k.toSingleTextEdit(m),A=this._inlineSuggestMode.read(m),H=this.cursorPosition.read(m),K=N.computeGhostText(b,A,H);return K?{ghostText:K,completion:k,suggestItem:void 0}:void 0}}),this.ghostText=xr("ghostText",m=>{let g=this.state.read(m);if(g)return g.ghostText}),this._register(Vq(this._fetchInlineCompletions,!0));let p;this._register(un("call handleItemDidShow",m=>{var g,b;let S=this.state.read(m),k=S==null?void 0:S.completion;if((k==null?void 0:k.semanticId)!==(p==null?void 0:p.semanticId)&&(p=k,k)){let N=k.inlineCompletion,A=N.source;(b=(g=A.provider).handleItemDidShow)===null||b===void 0||b.call(g,A.inlineCompletions,N.sourceInlineCompletion,N.insertText)}}))}trigger(e){return dp(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return dp(this,void 0,void 0,function*(){e7(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,ya.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){e7(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_deltaSelectedInlineCompletionIndex(e){return dp(this,void 0,void 0,function*(){yield this.triggerExplicitly(),this._isNavigatingCurrentInlineCompletion=!0;try{let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}finally{this._isNavigatingCurrentInlineCompletion=!1}})}next(){return dp(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return dp(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t,n;return dp(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Qd;let r=this.ghostText.get(),o=(t=this.selectedInlineCompletion.get())===null||t===void 0?void 0:t.toInlineCompletion(void 0);!r||!o||(e.pushUndoStop(),o.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[Kt.replaceMove(o.range,""),...o.additionalTextEdits]),e.setPosition(o.snippetInfo.range.getStartPosition()),(n=Zi.get(e))===null||n===void 0||n.insert(o.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[Kt.replaceMove(o.range,o.insertText),...o.additionalTextEdits]),o.command&&(yield this._commandService.executeCommand(o.command.id,...o.command.arguments||[]).then(void 0,Ut)),dn(s=>{this._source.clear(s),this._isActive.set(!1,s)}))})}acceptNextWord(e){this._acceptNext(e,(t,n)=>{let r=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let d=/\s+/g.exec(n);return d&&d.index!==void 0&&d.index+d[0].length{let r=n.match(/\n/);return r&&r.index!==void 0?r.index+1:n.length})}_acceptNext(e,t){var n;if(e.getModel()!==this.textModel)throw new Qd;let r=this.ghostText.get(),o=(n=this.selectedInlineCompletion.get())===null||n===void 0?void 0:n.toInlineCompletion(void 0);if(!r||!o)return;if(o.snippetInfo||o.filterText!==o.insertText){this.accept(e);return}if(r.parts.length===0)return;let s=r.parts[0],a=new Se(r.lineNumber,s.column),l=s.lines.join(` +`),c=t(a,l);if(c===l.length&&r.parts.length===1){this.accept(e);return}let d=l.substring(0,c);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[Kt.replace(P.fromPositions(a),d)]);let u=B0(d);e.setPosition(H0(a,u))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let u=P.fromPositions(o.range.getStartPosition(),H0(a,B0(d))),h=e.getModel().getValueInRange(u,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,h.length)}}};e2=B1e([k7(9,He),k7(10,ui),k7(11,Tt)],e2)});var z1e,TG,tg,i2,I7,A7,ig,up,L7=M(()=>{Dt();Ce();tf();Bre();br();jn();bl();Et();cu();z1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},TG=function(i,e){return function(t,n){e(t,n,i)}},tg=class{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;let r=n[0].score[0];for(let o=0;ol&&u.type===n[c].completion.kind&&u.insertText===n[c].completion.insertText&&(l=u.touch,a=c),n[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(let[n,r]of e)r.touch=t,r.type=typeof r.type=="number"?r.type:qm.fromString(r.type),this._cache.set(n,r);this._seq=this._cache.size}},A7=class extends tg{constructor(){super("recentlyUsedByPrefix"),this._trie=SP.forStrings(),this._seq=0}memorize(e,t,n){let{word:r}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${r}`;this._trie.set(o,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:r}=e.getWordUntilPosition(t);if(!r)return super.select(e,t,n);let o=`${e.getLanguageId()}/${r}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;ae.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,n]of e)n.type=typeof n.type=="number"?n.type:qm.fromString(n.type),this._trie.set(t,n)}}},ig=class t2{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new ne,this._persistSoon=new ti(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===lb.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var n;let r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==r){this._saveState();let o=t2._strategyCtors.get(r)||i2;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${t2._storagePrefix}/${r}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch(s){}}return this._strategy}_saveState(){if(this._strategy){let t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${t2._storagePrefix}/${this._strategy.name}`,n,t,1)}}};ig._strategyCtors=new Map([["recentlyUsedByPrefix",A7],["recentlyUsed",I7],["first",i2]]);ig._storagePrefix="suggest/memories";ig=z1e([TG(0,Yr),TG(1,Mt)],ig);up=rr("ISuggestMemories");sr(up,ig,1)});var U1e,W1e,hp,IG=M(()=>{ft();U1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},W1e=function(i,e){return function(t,n){e(t,n,i)}},hp=class kG{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=kG.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(119)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){let e=this._editor.getOption(119)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let n=this._editor.getModel(),r=this._editor.getSelection(),o=n.getWordAtPosition(r.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===r.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};hp.AtEnd=new nt("atEndOfWord",!1);hp=U1e([W1e(1,Ke)],hp)});var j1e,V1e,Sd,AG=M(()=>{ft();j1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V1e=function(i,e){return function(t,n){e(t,n,i)}},Sd=class n2{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=n2.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(n2._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let r=n;for(let o=t.items.length;o>0&&(r=(r+t.items.length+(e?1:-1))%t.items.length,!(r===n||!t.items[r].completion.additionalTextEdits));o--);return r}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=n2._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Sd.OtherSuggestions=new nt("hasOtherSuggestions",!1);Sd=j1e([V1e(1,Ke)],Sd)});var r2,LG=M(()=>{oi();Ce();hw();r2=class{constructor(e,t,n,r){this._disposables=new ne,this._disposables.add(n.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(o=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(o=>{if(this._active&&!t.isFrozen()&&n.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&r(this._active.item)}}))}_onItem(e){if(!e||!Wi(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new tu;for(let n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}});var K1e,wd,M7=M(()=>{VN();ri();qe();K1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},wd=class i{provideSelectionRanges(e,t){return K1e(this,void 0,void 0,function*(){let n=[];for(let r of t){let o=[];n.push(o);let s=new Map;yield new Promise(a=>i._bracketsRightYield(a,0,e,r,s)),yield new Promise(a=>i._bracketsLeftYield(a,0,e,r,s,o))}return n})}static _bracketsRightYield(e,t,n,r,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!r){e();break}let l=n.bracketPairs.findNextBracket(r);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,n,r,o));break}if(l.bracketInfo.isOpeningBracket){let d=l.bracketInfo.bracketText,u=s.has(d)?s.get(d):0;s.set(d,u+1)}else{let d=l.bracketInfo.getOpeningBrackets()[0].bracketText,u=s.has(d)?s.get(d):0;if(u-=1,s.set(d,Math.max(0,u)),u<0){let h=o.get(d);h||(h=new u_,o.set(d,h)),h.push(l.range)}}r=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,r,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!r){e();break}let c=n.bracketPairs.findPrevBracket(r);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,n,r,o,s));break}if(c.bracketInfo.isOpeningBracket){let u=c.bracketInfo.bracketText,h=a.has(u)?a.get(u):0;if(h-=1,a.set(u,Math.max(0,h)),h<0){let p=o.get(u);if(p){let m=p.shift();p.size===0&&o.delete(u);let g=P.fromPositions(c.range.getEndPosition(),m.getStartPosition()),b=P.fromPositions(c.range.getStartPosition(),m.getEndPosition());s.push({range:g}),s.push({range:b}),i._addBracketLeading(n,b,s)}}}else{let u=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+1)}r=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;let r=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(r);o!==0&&o!==t.startColumn&&(n.push({range:P.fromPositions(new Se(r,o),t.getEndPosition())}),n.push({range:P.fromPositions(new Se(r,1),t.getEndPosition())}));let s=r-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(n.push({range:P.fromPositions(new Se(s,a),t.getEndPosition())}),n.push({range:P.fromPositions(new Se(s,1),t.getEndPosition())}))}}};wd._maxDuration=30;wd._maxRounds=2});var q1e,xd,D7=M(()=>{oi();qe();M7();q1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xd=class i{static create(e,t){return q1e(this,void 0,void 0,function*(){if(!t.getOption(114).localityBonus||!t.hasModel())return i.None;let n=t.getModel(),r=t.getPosition();if(!e.canComputeWordRanges(n.uri))return i.None;let[o]=yield new wd().provideSelectionRanges(n,[r]);if(o.length===0)return i.None;let s=yield e.computeWordRanges(n.uri,o[0].range);if(!s)return i.None;let a=n.getWordUntilPosition(r);return delete s[a.word],new class extends i{distance(l,c){if(!r.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let d=typeof c.label=="string"?c.label:c.label.label,u=s[d];if(RR(u))return 2<<20;let h=iu(u,P.fromPositions(l),P.compareRangesUsingStarts),p=h>=0?u[h]:u[Math.max(0,~h-1)],m=o.length;for(let g of o){if(!P.containsRange(g.range,p))break;m-=1}return m}}})}};xd.None=new class extends xd{distance(){return 0}}});var ng,fp,N7=M(()=>{oi();Cl();wi();ng=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},fp=class i{constructor(e,t,n,r,o,s,a=R_.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=r,this._options=o,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=i._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=i._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;let e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext,r="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?O_:JR;for(let c=0;c=p)d.score=yl.Default;else if(typeof d.completion.filterText=="string"){let g=l(r,o,m,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;vR(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=QR(r,o,m,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{let g=l(r,o,m,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;d.score=g}}d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?NR(e.length-.85,e,(c,d)=>c-d):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return i._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return i._compareCompletionItems(e,t)}}});function Y1e(i,e,t){if(!e.getContextKeyValue(In.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(In.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}function X1e(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(In.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}var G1e,Ju,$1e,hc,o2,DG=M(()=>{Dt();gi();At();qt();Ce();wi();Mn();ub();D7();$m();jn();ft();C_();Bc();N7();Qu();xt();Cl();Mi();Hy();cp();G1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ju=function(i,e){return function(t,n){e(t,n,i)}},$1e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},hc=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);let r=t.getWordAtPosition(n);return!(!r||r.endColumn!==n.column&&r.startColumn+1!==n.column||!isNaN(Number(r.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}};o2=class MG{constructor(e,t,n,r,o,s,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=r,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._toDispose=new ne,this._triggerCharacterListener=new ne,this._triggerQuickSuggest=new as,this._triggerState=void 0,this._completionDisposables=new ne,this._onDidCancel=new $e,this._onDidTrigger=new $e,this._onDidSuggest=new $e,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new je(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{c||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Vi(this._triggerCharacterListener),Vi([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(88)||!this._editor.hasModel()||!this._editor.getOption(117))return;let e=new Map;for(let n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let r of n.triggerCharacters||[]){let o=e.get(r);o||(o=new Set,o.add(vG()),e.set(r,o)),o.add(n)}let t=n=>{var r;if(!X1e(this._editor,this._contextKeyService,this._configurationService)||hc.shouldAutoTrigger(this._editor))return;if(!n){let a=this._editor.getPosition();n=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let o="";yR(n.charCodeAt(n.length-1))?bR(n.charCodeAt(n.length-2))&&(o=n.substr(n.length-2)):o=n.charAt(n.length-1);let s=e.get(o);if(s){let a=new Map;if(this._completionModel)for(let[l,c]of this._completionModel.getItemsByProvider())s.has(l)||a.set(l,c);this.trigger({auto:!0,triggerKind:1,triggerCharacter:o,retrigger:!!this._completionModel,clipboardText:(r=this._completionModel)===null||r===void 0?void 0:r.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;let t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;il.isAllOff(this._editor.getOption(86))||this._editor.getOption(114).snippetsPreventQuickSuggestions&&(!((e=Zi.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!hc.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=this._editor.getOption(86);if(!il.isAllOff(r)){if(!il.isAllOn(r)){t.tokenization.tokenizeIfCheap(n.lineNumber);let o=t.tokenization.getLineTokens(n.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(il.valueFor(r,s)!=="on")return}Y1e(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(87)))}_refilterCompletionItems(){Lt(this._editor.hasModel()),Lt(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new hc(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(n)}trigger(e){var t,n,r,o,s,a;if(!this._editor.hasModel())return;let l=this._editor.getModel(),c=new hc(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=c;let d={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Ri;let u=this._editor.getOption(108),h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}let{itemKind:p,showDeprecated:m}=MG._createSuggestFilter(this._editor),g=new dc(h,(o=(r=e.completionOptions)===null||r===void 0?void 0:r.kindFilter)!==null&&o!==void 0?o:p,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,m),b=xd.create(this._editorWorkerService,this._editor),S=V0(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),g,d,this._requestToken.token);Promise.all([S,b]).then(([k,N])=>$1e(this,void 0,void 0,function*(){var A;if((A=this._requestToken)===null||A===void 0||A.dispose(),!this._editor.hasModel())return;let H=e==null?void 0:e.clipboardText;if(!H&&k.needsClipboard&&(H=yield this._clipboardService.readText()),this._triggerState===void 0)return;let K=this._editor.getModel(),W=new hc(K,this._editor.getPosition(),e),re=Object.assign(Object.assign({},R_.default),{firstMatchCanBeWeak:!this._editor.getOption(114).matchOnWordStartOnly});this._completionModel=new fp(k.items,this._context.column,{leadingLineContent:W.leadingLineContent,characterCountDelta:W.column-this._context.column},N,this._editor.getOption(114),this._editor.getOption(108),re,H),this._completionDisposables.add(k.disposable),this._onNewContext(W),this._reportDurationsTelemetry(k.durations)})).catch(at)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){let t=new Set;e.getOption(108)==="none"&&t.add(27);let r=e.getOption(114);return r.showMethods||t.add(0),r.showFunctions||t.add(1),r.showConstructors||t.add(2),r.showFields||t.add(3),r.showVariables||t.add(4),r.showClasses||t.add(5),r.showStructs||t.add(6),r.showInterfaces||t.add(7),r.showModules||t.add(8),r.showProperties||t.add(9),r.showEvents||t.add(10),r.showOperators||t.add(11),r.showUnits||t.add(12),r.showValues||t.add(13),r.showConstants||t.add(14),r.showEnums||t.add(15),r.showEnumMembers||t.add(16),r.showKeywords||t.add(17),r.showWords||t.add(18),r.showColors||t.add(19),r.showFiles||t.add(20),r.showReferences||t.add(21),r.showColors||t.add(22),r.showFolders||t.add(23),r.showTypeParameters||t.add(24),r.showSnippets||t.add(27),r.showUsers||t.add(25),r.showIssues||t.add(26),{itemKind:t,showDeprecated:r.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Ui(e.leadingLineContent)!==Ui(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(hc.shouldAutoTrigger(this._editor)&&this._context){let n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,n=new Set;for(let[r,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?n.add(r):t.set(r,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let r=hc.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(r&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};o2=G1e([Ju(1,Ml),Ju(2,Ms),Ju(3,Dr),Ju(4,zc),Ju(5,Ke),Ju(6,Mt),Ju(7,be)],o2)});var rg,NG=M(()=>{Ce();rg=class i{constructor(e,t){this._disposables=new ne,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let n=e.getSelections(),r=n.length,o=!1;for(let a=0;ai._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e{});var OG=M(()=>{RG()});var Q1e,fc,Ko,pp=M(()=>{bw();Lr();$P();zi();ft();Et();Oo();ar();Vw();Kn();xt();Q1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fc=function(i,e){return function(t,n){e(t,n,i)}},Ko=class extends GP{constructor(e,t,n,r,o,s,a,l,c,d,u,h,p){super(e,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),n,o,s,a,l,c,d,u,h,p),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){sf(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Ko=Q1e([fc(4,He),fc(5,Zt),fc(6,ui),fc(7,Ke),fc(8,pn),fc(9,Ei),fc(10,yb),fc(11,Tt),fc(12,be)],Ko)});var J1e,R7,O7,s2,FG=M(()=>{Ht();gf();Ce();De();_b();Yi();ft();Et();J1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},R7=function(i,e){return function(t,n){e(t,n,i)}},O7=class i extends vb{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,i.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}},s2=class{constructor(e,t,n,r,o){this._menuId=t,this._menuService=r,this._contextKeyService=o,this._menuDisposables=new ne,this.element=me(e,fe(".suggest-status-bar"));let s=a=>a instanceof da?n.createInstance(O7,a,void 0):void 0;this._leftActions=new Po(this.element,{actionViewItemProvider:s}),this._rightActions=new Po(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){let e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{let n=[],r=[];for(let[o,s]of e.getActions())o==="left"?n.push(...s):r.push(...s);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(r)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};s2=J1e([R7(2,He),R7(3,Is),R7(4,Ke)],s2)});var mp,P7=M(()=>{Ht();Fw();qt();Ce();mp=class{constructor(){this._onDidWillResize=new $e,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new $e,this.onDidResize=this._onDidResize.event,this._sashListener=new ne,this._size=new Di(0,0),this._minSize=new Di(0,0),this._maxSize=new Di(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Il(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Il(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Il(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Pw.North}),this._southSash=new Il(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Pw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(li.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(li.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(r=>{e&&(n=r.currentX-r.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(r=>{e&&(n=-(r.currentX-r.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(r=>{e&&(t=-(r.currentY-r.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(r=>{e&&(t=r.currentY-r.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(li.any(this._eastSash.onDidReset,this._westSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(li.any(this._northSash.onDidReset,this._southSash.onDidReset)(r=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,r){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=r?3:0}layout(e=this.size.height,t=this.size.width){let{height:n,width:r}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(n,Math.min(o,e)),t=Math.max(r,Math.min(s,t));let a=new Di(t,e);Di.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}});var HG=M(()=>{});var BG=M(()=>{HG()});function e0e(i,e,t){return UG(this,void 0,void 0,function*(){try{return yield i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:t0e(t)})}catch(n){return at(n),!1}})}function t0e(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var Z1e,zG,UG,io,Zu=M(()=>{Rre();Uw();At();qt();Ce();BG();BP();ss();gw();Qre();ds();Z1e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zG=function(i,e){return function(t,n){e(t,n,i)}},UG=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},io=class WG{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new $e,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let r=new ne,o=r.add(fP(e,Object.assign(Object.assign({},this._getRenderOptions(e,r)),t),n));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,r)=>UG(this,void 0,void 0,function*(){var o,s,a;let l;n?l=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=Zh);let c=yield qP(this._languageService,r,l),d=document.createElement("span");if(d.innerHTML=(a=(s=WG._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(c))!==null&&a!==void 0?a:c,this._options.editor){let u=this._options.editor.getOption(48);fb(d,u)}else this._options.codeBlockFontFamily&&(d.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(d.style.fontSize=this._options.codeBlockFontSize),d}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>e0e(this._openerService,n,e.isTrusted),disposables:t}}}};io._ttpTokenizer=_f("tokenizeToString",{createHTML(i){return i}});io=Z1e([zG(1,Xi),zG(2,Qi)],io)});function og(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var i0e,n0e,a2,l2,F7=M(()=>{Ht();eb();or();qr();qt();Sl();Ce();Zu();P7();De();Et();i0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},n0e=function(i,e){return function(t,n){e(t,n,i)}};a2=class{constructor(e,t){this._editor=e,this._onDidClose=new $e,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new $e,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new ne,this._renderDisposeable=new ne,this._borderWidth=1,this._size=new Di(330,0),this.domNode=fe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(io,{editor:e}),this._body=fe(".body"),this._scrollbar=new mf(this._body,{alwaysConsumeMouseWheel:!0}),me(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=me(this._body,fe(".header")),this._close=me(this._header,fe("span"+mt.asCSSSelector(lt.close))),this._close.title=v("details.close","Close"),this._type=me(this._header,fe("p.type")),this._docs=me(this._body,fe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(48),n=t.getMassagedFontFamily(),r=e.get(115)||t.fontSize,o=e.get(116)||t.lineHeight,s=t.fontWeight,a=`${r}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/r}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(116)||this._editor.getOption(48).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=v("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var n,r;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} `,a+=`prefix: ${(n=e.word)!==null&&n!==void 0?n:"(no prefix)"} `,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} `,a+=`distance: ${e.distance} (localityBonus-setting) `,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} `,a+=`commit_chars: ${(r=e.completion.commitCharacters)===null||r===void 0?void 0:r.join("")} -`,s=new sn().appendCodeblock("empty",a),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!sg(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),o){let a=o.length>1e5?`${o.substr(0,1e5)}\u2026`:o;this._type.textContent=a,this._type.title=a,gr(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else mr(this._type),this._type.title="",Wn(this._type),this.domNode.classList.add("no-type");if(mr(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),mr(this._docs);let a=this._markdownRenderer.render(s);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){let n=new Mi(e,t);Mi.equals(n,this._size)||(this._size=n,dR(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};_2=i0e([n0e(1,He)],_2);b2=class{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new ne,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new vp,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,r,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(n&&r){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=r.width-a.dimension.width,l=!0),a.north&&(o=r.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:n.top+o,left:n.left+s})}a.done&&(n=void 0,r=void 0,o=0,s=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var n;let r=e.getBoundingClientRect();this._anchorBox=r,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(n=this._userSize)!==null&&n!==void 0?n:this.widget.size,t)}_placeAtAnchor(e,t,n){var r;let o=b_(document.body),s=this.widget.getLayoutInfo(),a=new Mi(220,2*s.lineHeight),l=e.top,c=function(){let N=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),A=-s.borderWidth+e.left+e.width,H=new Mi(N,o.height-e.top-s.borderHeight-s.verticalPadding),K=H.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:A,fit:N-t.width,maxSizeTop:H,maxSizeBottom:K,minSize:a.with(Math.min(N,a.width))}}(),d=function(){let N=e.left-s.borderWidth-s.horizontalPadding,A=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),H=new Mi(N,o.height-e.top-s.borderHeight-s.verticalPadding),K=H.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:A,fit:N-t.width,maxSizeTop:H,maxSizeBottom:K,minSize:a.with(Math.min(N,a.width))}}(),u=function(){let N=e.left,A=-s.borderWidth+e.top+e.height,H=new Mi(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:A,left:N,fit:H.height-t.height,maxSizeBottom:H,maxSizeTop:H,minSize:a.with(H.width)}}(),h=[c,d,u],p=(r=h.find(N=>N.fit>=0))!==null&&r!==void 0?r:h.sort((N,A)=>A.fit-N.fit)[0],m=e.top+e.height-s.borderHeight,g,b=t.height,S=Math.max(p.maxSizeTop.height,p.maxSizeBottom.height);b>S&&(b=S);let k;n?b<=p.maxSizeTop.height?(g=!0,k=p.maxSizeTop):(g=!1,k=p.maxSizeBottom):b<=p.maxSizeBottom.height?(g=!1,k=p.maxSizeBottom):(g=!0,k=p.maxSizeTop),this._applyTopLeft({left:p.left,top:g?p.top:m-b}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,p===c,g,p!==c),this._resizable.minSize=p.minSize,this._resizable.maxSize=k,this._resizable.layout(b,Math.min(k.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}});var Zs,j7=M(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(Zs||(Zs={}))});function ag(i,e,t,n){let r=n===Zs.ROOT_FOLDER?["rootfolder-icon"]:n===Zs.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===Ao.data)o=Pm.parseMetaData(t).get(Pm.META_DATA_LABEL);else{let s=t.path.match(r0e);s?(o=y2(s[2].toLowerCase()),s[1]&&r.push(`${y2(s[1].toLowerCase())}-name-dir-icon`)):o=y2(t.authority.toLowerCase())}if(n===Zs.FOLDER)r.push(`${o}-name-folder-icon`);else{if(o){if(r.push(`${o}-name-file-icon`),r.push("name-file-icon"),o.length<=255){let a=o.split(".");for(let l=1;l{Am();lo();vw();j7();r0e=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function q7(i){return`suggest-aria-id:${i}`}function K7(i){return i.replace(/\r\n|\r|\n/g,"")}var s0e,V7,lg,a0e,l0e,S2,d$=M(()=>{Ht();JP();or();qr();qt();Cl();Ce();Sn();br();c$();ts();os();De();j7();Al();ar();W7();s0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V7=function(i,e){return function(t,n){e(t,n,i)}};a0e=Ei("suggest-more-info",lt.chevronRight,v("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),l0e=new(lg=class C2{extract(e,t){if(e.textLabel.match(C2._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(C2._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){let n=C2._regexRelaxed.exec(e.completion.documentation);if(n&&(n.index===0||n.index+n[0].length===e.completion.documentation.length))return t[0]=n[0],!0}return!1}},lg._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,lg._regexStrict=new RegExp(`^${lg._regexRelaxed.source}$`,"i"),lg),S2=class{constructor(e,t,n,r){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=r,this._onDidToggleDetails=new $e,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new ne,n=e;n.classList.add("show-file-icons");let r=me(e,fe(".icon")),o=me(r,fe("span.colorspan")),s=me(e,fe(".contents")),a=me(s,fe(".main")),l=me(a,fe(".icon-label.codicon")),c=me(a,fe("span.left")),d=me(a,fe("span.right")),u=new wb(c,{supportHighlights:!0,supportIcons:!0});t.add(u);let h=me(c,fe("span.signature-label")),p=me(c,fe("span.qualifier-label")),m=me(d,fe("span.details-label")),g=me(d,fe("span.readMore"+mt.asCSSSelector(a0e)));g.title=v("readMore","Read More");let b=()=>{let S=this._editor.getOptions(),k=S.get(48),N=k.getMassagedFontFamily(),A=k.fontFeatureSettings,H=S.get(115)||k.fontSize,K=S.get(116)||k.lineHeight,W=k.fontWeight,re=k.letterSpacing,ae=`${H}px`,Ne=`${K}px`,he=`${re}px`;n.style.fontSize=ae,n.style.fontWeight=W,n.style.letterSpacing=he,a.style.fontFamily=N,a.style.fontFeatureSettings=A,a.style.lineHeight=Ne,r.style.height=Ne,r.style.width=Ne,g.style.height=Ne,g.style.width=Ne};return b(),t.add(this._editor.onDidChangeConfiguration(S=>{(S.hasChanged(48)||S.hasChanged(115)||S.hasChanged(116))&&b()})),{root:n,left:c,right:d,icon:r,colorspan:o,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:p,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,n){let{completion:r}=e;n.root.id=q7(t),n.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:nu(e.score)},s=[];if(r.kind===19&&l0e.extract(e,s))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=s[0];else if(r.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";let a=ag(this._modelService,this._languageService,ht.from({scheme:"fake",path:e.textLabel}),Zs.FILE),l=ag(this._modelService,this._languageService,ht.from({scheme:"fake",path:r.detail}),Zs.FILE);o.extraClasses=a.length>l.length?a:l}else r.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",o.extraClasses=[ag(this._modelService,this._languageService,ht.from({scheme:"fake",path:e.textLabel}),Zs.FOLDER),ag(this._modelService,this._languageService,ht.from({scheme:"fake",path:r.detail}),Zs.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...mt.asClassNameArray(Gm.toIcon(r.kind))));r.tags&&r.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,o),typeof r.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=K7(r.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=K7(r.label.detail||""),n.detailsLabel.textContent=K7(r.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(114).showInlineDetails?gr(n.detailsLabel):Wn(n.detailsLabel),sg(e)?(n.right.classList.add("can-expand-details"),gr(n.readMore),n.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},n.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Wn(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};S2=s0e([V7(1,Ci),V7(2,Xi),V7(3,pn)],S2)});var c0e,w2,d0e,x2,u0e,G7,_p,Y7,u$=M(()=>{Ht();u0();_P();Dt();At();qt();Ce();Rre();Si();t$();gp();n$();Z5();De();ft();Et();lu();_r();Ew();ar();U7();Qu();W7();d$();rb();c0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},w2=function(i,e){return function(t,n){e(t,n,i)}},d0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Oe("editorSuggestWidget.background",{dark:xl,light:xl,hcDark:xl,hcLight:xl},v("editorSuggestWidgetBackground","Background color of the suggest widget."));Oe("editorSuggestWidget.border",{dark:ou,light:ou,hcDark:ou,hcLight:ou},v("editorSuggestWidgetBorder","Border color of the suggest widget."));x2=Oe("editorSuggestWidget.foreground",{dark:_a,light:_a,hcDark:_a,hcLight:_a},v("editorSuggestWidgetForeground","Foreground color of the suggest widget."));Oe("editorSuggestWidget.selectedForeground",{dark:Wm,light:Wm,hcDark:Wm,hcLight:Wm},v("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));Oe("editorSuggestWidget.selectedIconForeground",{dark:jm,light:jm,hcDark:jm,hcLight:jm},v("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));u0e=Oe("editorSuggestWidget.selectedBackground",{dark:Vm,light:Vm,hcDark:Vm,hcLight:Vm},v("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));Oe("editorSuggestWidget.highlightForeground",{dark:ba,light:ba,hcDark:ba,hcLight:ba},v("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));Oe("editorSuggestWidget.focusHighlightForeground",{dark:Um,light:Um,hcDark:Um,hcLight:Um},v("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));Oe("editorSuggestWidgetStatus.foreground",{dark:Rr(x2,.5),light:Rr(x2,.5),hcDark:Rr(x2,.5),hcLight:Rr(x2,.5)},v("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));G7=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Vo}`}restore(){var e;let t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{let n=JSON.parse(t);if(Mi.is(n))return Mi.lift(n)}catch(n){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},_p=class $7{constructor(e,t,n,r,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Hi,this._pendingShowDetails=new Hi,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new ss,this._disposables=new ne,this._onDidSelect=new JS,this._onDidFocus=new JS,this._onDidHide=new $e,this._onDidShow=new $e,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new $e,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new vp,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Y7(this,e),this._persistedSize=new G7(t,e);class s{constructor(p,m,g=!1,b=!1){this.persistedSize=p,this.currentSize=m,this.persistHeight=g,this.persistWidth=b}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var p,m,g,b;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){let{itemHeight:S,defaultSize:k}=this.getLayoutInfo(),N=Math.round(S/2),{width:A,height:H}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-H)<=N)&&(H=(m=(p=a.persistedSize)===null||p===void 0?void 0:p.height)!==null&&m!==void 0?m:k.height),(!a.persistWidth||Math.abs(a.currentSize.width-A)<=N)&&(A=(b=(g=a.persistedSize)===null||g===void 0?void 0:g.width)!==null&&b!==void 0?b:k.width),this._persistedSize.store(new Mi(A,H))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=me(this.element.domNode,fe(".message")),this._listElement=me(this.element.domNode,fe(".tree"));let l=o.createInstance(_2,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new b2(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(114).showIcons);c();let d=o.createInstance(S2,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new ib("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>v("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let p=h.textLabel;if(typeof h.completion.label!="string"){let{detail:S,description:k}=h.completion.label;S&&k?p=v("label.full","{0}{1}, {2}",p,S,k):S?p=v("label.detail","{0}{1}",p,S):k&&(p=v("label.desc","{0}, {1}",p,k))}if(!h.isResolved||!this._isDetailsVisible())return p;let{documentation:m,detail:g}=h.completion,b=Mo("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return v("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",p,b)}}}),this._list.style(wP({listInactiveFocusBackground:u0e,listInactiveFocusOutline:va})),this._status=o.createInstance(v2,this.element.domNode,rl);let u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(114).showStatusBar);u(),this._disposables.add(r.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(r.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(114)&&(u(),c())})),this._ctxSuggestWidgetVisible=it.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=it.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=it.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=it.HasFocusedSuggestion.bindTo(n),this._disposables.add(es(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element=="undefined"||typeof e.index=="undefined"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){let n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=su(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);let n=e.elements[0],r=e.indexes[0];n!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(r),this._currentSuggestionDetails=Vt(o=>d0e(this,void 0,void 0,function*(){let s=wl(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=o.onCancellationRequested(()=>s.dispose()),l=yield n.resolve(o);return s.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{r>=this._list.length||n!==this._list.element(r)||(this._ignoreFocusEvents=!0,this._list.splice(r,1,[n]),this._list.setFocus([r]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:q7(r)}))}).catch(at)),this._onDidFocus.fire({item:n,index:r,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Wn(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=$7.LOADING_MESSAGE,Wn(this._listElement,this._status.element),gr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=$7.NO_SUGGESTIONS_MESSAGE,Wn(this._listElement,this._status.element),gr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Wn(this._messageElement),gr(this._listElement,this._status.element),this._show();break;case 4:Wn(this._messageElement),gr(this._listElement,this._status.element),this._show();break;case 5:Wn(this._messageElement),gr(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=wl(()=>this._setState(1),t)))}showSuggestions(e,t,n,r,o){var s,a;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(a=this._currentSuggestionDetails)===null||a===void 0||a.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}let l=this._completionModel.items.length,c=l===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(l>1),c){this._setState(r?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=iw(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(sg(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=iw(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();let t=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightc&&(l=c);let d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:l,u=s.statusBarHeight+this._list.contentHeight+s.borderHeight,h=s.itemHeight+s.statusBarHeight,p=wn(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=p.top+m.top+m.height,b=Math.min(o.height-g-s.verticalPadding,u),S=p.top+m.top-s.verticalPadding,k=Math.min(S,u),N=Math.min(Math.max(k,b)+s.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),aN&&(a=N);let A=150;a>b||this._forceRenderingAbove&&S>A?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),N=k):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),N=b),this.element.preferredSize=new Mi(d,s.defaultSize.height),this.element.maxSize=new Mi(c,N),this.element.minSize=new Mi(220,h),this._cappedHeight=a===u?{wanted:(r=(n=this._cappedHeight)===null||n===void 0?void 0:n.wanted)!==null&&r!==void 0?r:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){let{width:n,height:r}=this.element.maxSize;e=Math.min(n,e),t=Math.min(r,t);let{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=`${t-o}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){let e=this.editor.getOption(48),t=gP(this.editor.getOption(116)||e.lineHeight,8,1e3),n=!this.editor.getOption(114).showStatusBar||this._state===2||this._state===1?0:t,r=this._details.widget.borderWidth,o=2*r;return{itemHeight:t,statusBarHeight:n,borderWidth:r,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Mi(430,n+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};_p.LOADING_MESSAGE=v("suggestWidget.loading","Loading...");_p.NO_SUGGESTIONS_MESSAGE=v("suggestWidget.noSuggestions","No suggestions.");_p=c0e([w2(1,Yr),w2(2,Ke),w2(3,pn),w2(4,He)],_p);Y7=class{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){let{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:r}=this._widget.getLayoutInfo();return new Mi(t+2*n+r,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}});var h0e,bp,f0e,X7,Ko,Q7,cg,wo,xr,E2=M(()=>{Lo();oi();Dt();gi();At();qt();tre();Ce();nr();ml();Li();db();Ze();xa();ri();qe();jt();up();Xu();O7();$G();De();Bi();ft();Et();S_();Qu();YG();XG();JG();ZG();u$();Hc();lo();OP();h0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},bp=function(i,e){return function(t,n){e(t,n,i)}},f0e=!1,X7=class{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){let r=e.getOffsetAt(t),o=e.getPositionAt(r+1);this._marker=e.deltaDecorations([],[{range:P.fromPositions(t,o),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){let t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}},Ko=class h${static get(e){return e.getContribution(h$.ID)}constructor(e,t,n,r,o,s,a){this._memoryService=t,this._commandService=n,this._contextKeyService=r,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new Hi,this._toDispose=new ne,this._selectors=new Q7(u=>u.priority),this._telemetryGate=0,this.editor=e,this.model=o.createInstance(g2,this.editor),this._selectors.register({priority:0,select:(u,h,p)=>this._memoryService.select(u,h,p)});let l=it.InsertMode.bindTo(r);l.set(e.getOption(114).insertMode),this.model.onDidTrigger(()=>l.set(e.getOption(114).insertMode)),this.widget=this._toDispose.add(new H_(()=>{let u=this._instantiationService.createInstance(_p,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(b=>this._insertSuggestion(b,0),this));let h=new m2(this.editor,u,this.model,b=>this._insertSuggestion(b,2));this._toDispose.add(h);let p=it.MakesTextEdit.bindTo(this._contextKeyService),m=it.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=it.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Ft(()=>{p.reset(),m.reset(),g.reset()})),this._toDispose.add(u.onDidFocus(({item:b})=>{let S=this.editor.getPosition(),k=b.editStart.column,N=S.column,A=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!b.completion.additionalTextEdits&&!(b.completion.insertTextRules&4)&&N-k===b.completion.insertText.length&&(A=this.editor.getModel().getValueInRange({startLineNumber:S.lineNumber,startColumn:k,endLineNumber:S.lineNumber,endColumn:N})!==b.completion.insertText),p.set(A),m.set(!Se.equals(b.editInsertEnd,b.editReplaceEnd)),g.set(!!b.provider.resolveCompletionItem||!!b.completion.documentation||b.completion.detail!==b.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(b=>{if(b.toKeyCodeChord().equals(new tw(!0,!1,!1,!1,33))||zn&&b.toKeyCodeChord().equals(new tw(!1,!1,!1,!0,33))){b.stopPropagation();return}b.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new H_(()=>this._toDispose.add(new og(this.editor,this.model)))),this._alternatives=this._toDispose.add(new H_(()=>this._toDispose.add(new wd(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(pp,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new X7(this.editor.getModel(),u.position)})),this._toDispose.add(this.model.onDidSuggest(u=>{if(u.triggerOptions.shy)return;let h=-1;for(let m of this._selectors.itemsOrderedByPriorityDesc)if(h=m.select(this.editor.getModel(),this.editor.getPosition(),u.completionModel.items),h!==-1)break;h===-1&&(h=0);let p=!1;if(u.triggerOptions.auto){let m=this.editor.getOption(114);m.selectionMode==="never"||m.selectionMode==="always"?p=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?p=u.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(p=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,p)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{f0e||(this.model.cancel(),this.model.clear())}));let c=it.AcceptSuggestionsOnEnter.bindTo(r),d=()=>{let u=this.editor.getOption(1);c.set(u==="on"||u==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>d())),d()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;let n=Zi.get(this.editor);if(!n)return;let r=this.editor.getModel(),o=r.getAlternativeVersionId(),{item:s}=e,a=[],l=new Ni;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));if(this._memoryService.memorize(r,this.editor.getPosition(),s),Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let u=Ea.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(h=>Kt.replaceMove(P.lift(h.range),h.text))),u.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){let u=new Ln(!0),h,p=r.onDidChangeContent(S=>{if(S.isFlush){l.cancel(),p.dispose();return}for(let k of S.changes){let N=P.getEndPosition(k.range);(!h||Se.isBefore(N,h))&&(h=N)}}),m=t;t|=2;let g=!1,b=this.editor.onWillType(()=>{b.dispose(),g=!0,m&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested||h&&s.completion.additionalTextEdits.some(k=>Se.isBefore(h,P.getStartPosition(k.range))))return!1;g&&this.editor.pushUndoStop();let S=Ea.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(k=>Kt.replaceMove(P.lift(k.range),k.text))),S.restoreRelativeVerticalPositionOfCursor(this.editor),(g||!(m&2))&&this.editor.pushUndoStop(),!0}).then(S=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",u.elapsed(),S),p.dispose(),b.dispose()}))}let{insertText:d}=s.completion;s.completion.insertTextRules&4||(d=jo.escape(d)),this.model.cancel(),n.insert(d,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command&&(s.completion.command.id===cg.id?this.model.trigger({auto:!0,retrigger:!0}):a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(u=>{s.completion.extensionId?Ut(u):at(u)}))),t&4&&this._alternatives.value.set(e,u=>{for(l.cancel();r.canUndo();){o!==r.getAlternativeVersionId()&&r.undo(),this._insertSuggestion(u,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,r,e),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n){var r;if(this._telemetryGate++%100!==0)return;let o=e.extensionId?e.extensionId.value:((r=n.item.provider._debugDisplayName)!==null&&r!==void 0?r:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:o,kind:e.completion.kind,basenameHash:ub(Dr(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:oO(t.uri)})}getOverwriteInfo(e,t){Lt(this.editor.hasModel());let n=this.editor.getOption(114).insertMode==="replace";t&&(n=!n);let r=e.position.column-e.editStart.column,o=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:r+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(Ui(e.completion.additionalTextEdits)){let t=v("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Di(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;let t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},r=o=>{if(o.completion.insertTextRules&4||o.completion.additionalTextEdits)return!0;let s=this.editor.getPosition(),a=o.editStart.column,l=s.column;return l-a!==o.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:s.lineNumber,startColumn:a,endLineNumber:s.lineNumber,endColumn:l})!==o.completion.insertText};li.once(this.model.onDidTrigger)(o=>{let s=[];li.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Vi(s),n()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Vi(s),a.items.length===0){n();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!r(c)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,s)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){let n=this.widget.value.getFocusedItem(),r=0;e&&(r|=4),t&&(r|=8),this._insertSuggestion(n,r)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Ko.ID="editor.contrib.suggestController";Ko=h0e([bp(1,fp),bp(2,ui),bp(3,Ke),bp(4,He),bp(5,Bc),bp(6,Mr)],Ko);Q7=class{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},cg=class i extends se{constructor(){super({id:i.id,label:v("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ce.and(O.writable,O.hasCompletionItemProvider,it.Visible.toNegated()),kbOpts:{kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){let r=Ko.get(t);if(!r)return;let o;n&&typeof n=="object"&&n.auto===!0&&(o=!0),r.triggerSuggest(void 0,o,void 0)}};cg.id="editor.action.triggerSuggest";Ae(Ko.ID,Ko,2);X(cg);wo=100+90,xr=wi.bindToContribution(Ko.get);Me(new xr({id:"acceptSelectedSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ce.and(it.Visible,O.textInputFocus),weight:wo},{primary:3,kbExpr:ce.and(it.Visible,O.textInputFocus,it.AcceptSuggestionsOnEnter,it.MakesTextEdit),weight:wo}],menuOpts:[{menuId:rl,title:v("accept.insert","Insert"),group:"left",order:1,when:it.HasInsertAndReplaceRange.toNegated()},{menuId:rl,title:v("accept.insert","Insert"),group:"left",order:1,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("insert"))},{menuId:rl,title:v("accept.replace","Replace"),group:"left",order:1,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("replace"))}]}));Me(new xr({id:"acceptAlternativeSelectedSuggestion",precondition:ce.and(it.Visible,O.textInputFocus,it.HasFocusedSuggestion),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:rl,group:"left",order:2,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("insert")),title:v("accept.replace","Replace")},{menuId:rl,group:"left",order:2,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("replace")),title:v("accept.insert","Insert")}]}));St.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");Me(new xr({id:"hideSuggestWidget",precondition:it.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:9,secondary:[1033]}}));Me(new xr({id:"selectNextSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));Me(new xr({id:"selectNextPageSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:12,secondary:[2060]}}));Me(new xr({id:"selectLastSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));Me(new xr({id:"selectPrevSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));Me(new xr({id:"selectPrevPageSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:11,secondary:[2059]}}));Me(new xr({id:"selectFirstSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));Me(new xr({id:"focusSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));Me(new xr({id:"focusAndAcceptSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));Me(new xr({id:"toggleSuggestionDetails",precondition:ce.and(it.Visible,it.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:rl,group:"right",order:1,when:ce.and(it.DetailsVisible,it.CanResolve),title:v("detail.more","show less")},{menuId:rl,group:"right",order:1,when:ce.and(it.DetailsVisible.toNegated(),it.CanResolve),title:v("detail.less","show more")}]}));Me(new xr({id:"toggleExplainMode",precondition:it.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));Me(new xr({id:"toggleSuggestionFocus",precondition:it.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:2570,mac:{primary:778}}}));Me(new xr({id:"insertBestCompletion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),pp.AtEnd,it.Visible.toNegated(),wd.OtherSuggestions.toNegated(),Zi.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(g_(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:wo,primary:2}}));Me(new xr({id:"insertNextSuggestion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),wd.OtherSuggestions,it.Visible.toNegated(),Zi.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:2}}));Me(new xr({id:"insertPrevSuggestion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),wd.OtherSuggestions,it.Visible.toNegated(),Zi.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:wo,kbExpr:O.textInputFocus,primary:1026}}));X(class extends se{constructor(){super({id:"editor.action.resetSuggestSize",label:v("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){var t;(t=Ko.get(e))===null||t===void 0||t.resetWidgetSize()}})});function p0e(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var T2,k2,f$=M(()=>{qt();Ce();ri();qe();br();Xu();M7();E2();Ys();_7();oi();T2=class extends oe{get selectedItem(){return this._selectedItem}constructor(e,t,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=Gs("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(e.onKeyDown(o=>{o.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(o=>{o.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let r=Ko.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(a,l,c)=>{var d;dn(b=>this.checkModelVersion(b));let u=this.editor.getModel();if(!u)return-1;let h=(d=this.suggestControllerPreselector())===null||d===void 0?void 0:d.removeCommonPrefix(u);if(!h)return-1;let p=Se.lift(l),m=c.map((b,S)=>{let N=k2.fromSuggestion(r,u,p,b,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(u),A=h.augments(N);return{index:S,valid:A,prefixLength:N.text.length,suggestItem:b}}).filter(b=>b&&b.valid&&b.prefixLength>0),g=WR(m,zR(b=>b.prefixLength,UR));return g?g.index:-1}}));let o=!1,s=()=>{o||(o=!0,this._register(r.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(r.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(r.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(li.once(r.model.onDidTrigger)(a=>{s()}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!p0e(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,dn(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){let e=Ko.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),r=this.editor.getModel();if(!(!t||!n||!r))return k2.fromSuggestion(e,r,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){let e=Ko.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){let e=Ko.get(this.editor);e==null||e.forceRenderingAbove()}},k2=class i{static fromSuggestion(e,t,n,r,o){let{insertText:s}=r.completion,a=!1;if(r.completion.insertTextRules&4){let c=new jo().parse(s);c.children.length<100&&dp.adjustWhitespace(t,n,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(r,o);return new i(P.fromPositions(n.delta(0,-l.overwriteBefore),n.delta(0,Math.max(l.overwriteAfter,0))),s,r.completion.kind,a)}constructor(e,t,n,r){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=r}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new YO(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new $u(this.range,this.insertText)}}});var m0e,eh,Er,I2=M(()=>{Lo();qt();Ce();Ys();Gu();R_();ri();Ns();xt();$y();_G();Yy();n2();KG();f$();Zre();Bi();jn();ft();Et();m0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eh=function(i,e){return function(t,n){e(t,n,i)}},Er=class p$ extends oe{static get(e){return e.getContribution(p$.ID)}constructor(e,t,n,r,o,s,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.configurationService=r,this.commandService=o,this.debounceService=s,this.languageFeaturesService=a,this.audioCueService=l,this.model=H0("inlineCompletionModel",void 0),this.textModelVersionId=Gs("textModelVersionId",-1),this.cursorPosition=Gs("cursorPosition",new Se(1,1)),this.suggestWidgetAdaptor=this._register(new T2(this.editor,()=>{var u,h;return(h=(u=this.model.get())===null||u===void 0?void 0:u.selectedInlineCompletion.get())===null||h===void 0?void 0:h.toSingleTextEdit(void 0)},u=>this.updateObservables(u,So.Other))),this._enabled=$s(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(Zy,this.editor,{ghostText:this.model.map((u,h)=>u==null?void 0:u.ghostText.read(h)),minReservedLineCount:Vy(0),targetTextModel:this.model.map(u=>u==null?void 0:u.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new In(this.contextKeyService,this.model)),this._register(li.runAndSubscribe(e.onDidChangeModel,()=>dn(u=>{this.model.set(void 0,u),this.updateObservables(u,So.Other);let h=e.getModel();if(h){let p=t.createInstance(u2,h,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,$s(e.onDidChangeConfiguration,()=>e.getOption(114).preview),$s(e.onDidChangeConfiguration,()=>e.getOption(114).previewMode),$s(e.onDidChangeConfiguration,()=>e.getOption(60).mode),this._enabled);this.model.set(p,u)}})));let c=u=>{var h;return u.isUndoing?So.Undo:u.isRedoing?So.Redo:!((h=this.model.get())===null||h===void 0)&&h.isAcceptingPartially?So.AcceptWord:So.Other};this._register(e.onDidChangeModelContent(u=>dn(h=>this.updateObservables(h,c(u))))),this._register(e.onDidChangeCursorPosition(u=>dn(h=>{var p;this.updateObservables(h,So.Other),u.reason===3&&((p=this.model.get())===null||p===void 0||p.stop(h))}))),this._register(e.onDidType(()=>dn(u=>{var h;this.updateObservables(u,So.Other),this._enabled.get()&&((h=this.model.get())===null||h===void 0||h.trigger(u))}))),this._register(this.commandService.onDidExecuteCommand(u=>{new Set([ef.Tab.id,ef.DeleteLeft.id,ef.DeleteRight.id,Ky,"acceptSelectedSuggestion"]).has(u.commandId)&&e.hasTextFocus()&&this._enabled.get()&&dn(p=>{var m;(m=this.model.get())===null||m===void 0||m.trigger(p)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(60).keepOnBlur||Qs.dropDownVisible||dn(u=>{var h;(h=this.model.get())===null||h===void 0||h.stop(u)})})),this._register(un("forceRenderingAbove",u=>{var h;let p=(h=this.model.read(u))===null||h===void 0?void 0:h.state.read(u);p!=null&&p.suggestItem?p.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(Ft(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let d;this._register(un("play audio cue & read suggestion",u=>{let h=this.model.read(u),p=h==null?void 0:h.state.read(u);if(!h||!p||!p.completion){d=void 0;return}if(p.completion.semanticId!==d){if(d=p.completion.semanticId,h.isNavigatingCurrentInlineCompletion)return;this.audioCueService.playAudioCue(eF.inlineSuggestion).then(()=>{if(this.editor.getOption(6)){let m=h.textModel.getLineContent(p.ghostText.lineNumber);Di(p.ghostText.renderForScreenReader(m))}})}})),this._register(new i2(this.editor,this.model,this.instantiationService))}updateObservables(e,t){var n,r;let o=this.editor.getModel();this.textModelVersionId.set((n=o==null?void 0:o.getVersionId())!==null&&n!==void 0?n:-1,e,t),this.cursorPosition.set((r=this.editor.getPosition())!==null&&r!==void 0?r:new Se(1,1),e)}shouldShowHoverAt(e){var t;let n=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return n?n.parts.some(r=>e.containsPosition(new Se(n.lineNumber,r.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};Er.ID="editor.contrib.inlineCompletionsController";Er=m0e([eh(1,He),eh(2,Ke),eh(3,Mt),eh(4,ui),eh(5,an),eh(6,be),eh(7,ZP)],Er)});var Td,dg,ug,A2,L2,M2,D2,hg,fg,m$=M(()=>{Ys();Ze();jt();$y();Yy();I2();De();Yi();jn();ft();Td=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},dg=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var n;return Td(this,void 0,void 0,function*(){let r=Er.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.next()})}};dg.ID=Gy;ug=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var n;return Td(this,void 0,void 0,function*(){let r=Er.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.previous()})}};ug.ID=qy;A2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:O.writable})}run(e,t){var n;return Td(this,void 0,void 0,function*(){let r=Er.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.triggerExplicitly()})}},L2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:v("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065},menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var n;return Td(this,void 0,void 0,function*(){let r=Er.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextWord(r.editor)})}},M2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:v("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var n;return Td(this,void 0,void 0,function*(){let r=Er.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextLine(r.editor)})}},D2=class extends se{constructor(){super({id:Ky,label:v("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:In.inlineSuggestionVisible,menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ce.and(In.inlineSuggestionVisible,O.tabMovesFocus.toNegated(),In.inlineSuggestionHasIndentationLessThanTabSize)}})}run(e,t){var n;return Td(this,void 0,void 0,function*(){let r=Er.get(t);r&&((n=r.model.get())===null||n===void 0||n.accept(r.editor),r.editor.focus())})}},hg=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:In.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Td(this,void 0,void 0,function*(){let n=Er.get(t);dn(r=>{var o;(o=n==null?void 0:n.model.get())===null||o===void 0||o.stop(r)})})}};hg.ID="editor.action.inlineSuggest.hide";fg=class i extends rs{constructor(){super({id:i.ID,title:v("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:xe.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ce.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return Td(this,void 0,void 0,function*(){let n=e.get(Mt),o=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",o)})}};fg.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"});var g0e,pg,J7,N2,g$=M(()=>{Ht();Sl();Ce();Ys();qe();os();lc();I2();n2();Zu();De();Kw();Et();cs();Hc();g0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},pg=function(i,e){return function(t,n){e(t,n,i)}},J7=class{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},N2=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=r,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=Er.get(this._editor);if(!t)return null;let n=e.target;if(n.type===8){let r=n.detail;if(t.shouldShowHoverAtViewZone(r.viewZoneId))return new yd(1e3,this,P.fromPositions(this._editor.getModel().validatePosition(r.positionBefore||r.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new yd(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new yd(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(60).showToolbar==="always")return[];let n=Er.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new J7(this,e.range,n)]:[]}renderHoverParts(e,t){let n=new ne,r=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,r,n);let o=r.controller.model.get(),s=this._instantiationService.createInstance(Qs,this._editor,!1,Vy(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.selectedInlineCompletion.map(a=>{var l;return(l=a==null?void 0:a.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]}));return e.fragment.appendChild(s.getDomNode()),o.triggerExplicitly(),n.add(s),n}renderScreenReaderText(e,t,n){let r=fe,o=r("div.hover-row.markdown-hover"),s=me(o,r("div.hover-contents",{"aria-live":"assertive"})),a=n.add(new io({editor:this._editor},this._languageService,this._openerService)),l=c=>{n.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let d=v("inlineSuggestionFollows","Suggestion:"),u=n.add(a.render(new sn().appendText(d).appendCodeblock("text",c)));s.replaceChildren(u.element)};n.add(un("update hover",c=>{var d;let u=(d=t.controller.model.read(c))===null||d===void 0?void 0:d.ghostText.read(c);if(u){let h=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(h))}else Jd(s)})),e.fragment.appendChild(o)}};N2=g0e([pg(1,Xi),pg(2,Qi),pg(3,Cb),pg(4,He),pg(5,Mr)],N2)});var Z7=M(()=>{Ze();lc();m$();g$();I2();Yi();Ae(Er.ID,Er,3);X(A2);X(dg);X(ug);X(L2);X(M2);X(D2);X(hg);mi(fg);Wo.register(N2)});var v$=M(()=>{});var _$=M(()=>{v$()});var v0e,_0e,b0e,y0e,R2,yp,mg=M(()=>{Ht();Dt();or();Ce();Si();qr();_$();qe();qn();Et();v0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_0e=function(i,e){return function(t,n){e(t,n,i)}},b0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},y0e=ct.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:C_,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),R2=class i extends oe{constructor(e,t,n,r,o){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=fe(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=fe("span.icon");this.domNode.append(t),t.classList.add(...mt.asClassNameArray(lt.loading),"codicon-modifier-spin");let n=()=>{let r=this.editor.getOption(64);this.domNode.style.height=`${r}px`,this.domNode.style.width=`${Math.ceil(.8*r)}px`};n(),this._register(this.editor.onDidChangeConfiguration(r=>{(r.hasChanged(50)||r.hasChanged(64))&&n()})),this._register(Rt(this.domNode,on.CLICK,r=>{this.delegate.cancel()}))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};R2.baseId="editor.widget.inlineProgressWidget";yp=class extends oe{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Hi),this._currentWidget=new Hi,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return b0e(this,void 0,void 0,function*(){let r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=wl(()=>{let o=P.fromPositions(e);this._currentDecorations.set([{range:o,options:y0e}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(R2,this.id,this._editor,o,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};yp=v0e([_0e(2,He)],yp)});var b$=M(()=>{});var y$=M(()=>{b$()});var C$=M(()=>{});var S$=M(()=>{C$()});var w$,C0e,S0e,eT,tT,O2,P2,x$=M(()=>{Ht();Hw();ma();pP();Ce();yw();S$();qe();qn();w$=new dt(new As(0,122,204)),C0e={showArrow:!0,showFrame:!0,className:"",frameColor:w$,arrowColor:w$,keepEditorSelection:!1},S0e="vs.editor.contrib.zoneWidget",eT=class{constructor(e,t,n,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},tT=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},O2=class i{constructor(e){this._editor=e,this._ruleName=i._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),nw(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){nw(this._ruleName),hR(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:P.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};O2._IdGenerator=new hP(".arrow-decoration-");P2=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new ne,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=uO(t),sf(this.options,C0e,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{let r=this._getWidth(n);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(r)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new O2(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){let n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;let r=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(r))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){let e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){let n=P.isIRange(e)?P.lift(e):P.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:ct.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){let e=this.editor.getOption(64),t=0;if(this.options.showArrow){let n=Math.round(e/3);t+=2*n}if(this.options.showFrame){let n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){let n=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(64);if(!this.options.allowUnlimitedHeight){let h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new eT(s,n.lineNumber,n.column,t,p=>this._onViewZoneTop(p),p=>this._onViewZoneHeight(p),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new tT(S0e+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){let h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}let d=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);let u=this.editor.getModel();if(u){let h=u.validateRange(new P(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===u.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Il(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){let n=(t.currentY-e.startY)/this.editor.getOption(64),r=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+r;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){let e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}});function k$(i){let e=i.get(Zt).getFocusedCodeEditor();return e instanceof Vo?e.getParentEditor():e}var E$,T$,iT,Pn,gg,w0e,Cp,I$,F2,H2,A$,L$,DKe,NKe,RKe,OKe,kd,PKe,FKe,HKe,BKe,zKe,th=M(()=>{Ht();gf();Oc();or();qr();ma();qt();yw();y$();Ze();Ar();gp();x$();De();bb();ft();bl();Et();_r();E$=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},T$=function(i,e){return function(t,n){e(t,n,i)}},iT=rr("IPeekViewService");sr(iT,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let n=()=>{let r=this._widgets.get(i);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}},1);(function(i){i.inPeekEditor=new nt("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Pn||(Pn={}));gg=class{constructor(e,t){e instanceof Vo&&Pn.inPeekEditor.bindTo(t)}dispose(){}};gg.ID="editor.contrib.referenceController";gg=E$([T$(1,Ke)],gg);Ae(gg.ID,gg,0);w0e={headerBackgroundColor:dt.white,primaryHeadingColor:dt.fromHex("#333333"),secondaryHeadingColor:dt.fromHex("#6c6c6cb3")},Cp=class extends P2{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new $e,this.onDidClose=this._onDidClose.event,sf(this.options,w0e,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=fe(".head"),this._bodyElement=fe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=fe(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),es(this._titleElement,"click",o=>this._onTitleClick(o))),me(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=fe("span.filename"),this._secondaryHeading=fe("span.dirname"),this._metaHeading=fe("span.meta"),me(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let n=fe(".peekview-actions");me(this._headElement,n);let r=this._getActionBarOptions();this._actionbarWidget=new Oo(n,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new is("peekview.close",v("label.close","Close"),mt.asClassName(lt.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:VP.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:mr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,gr(this._metaHeading)):Wn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let n=Math.ceil(this.editor.getOption(64)*1.2),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Cp=E$([T$(2,He)],Cp);I$=Oe("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:dt.black,hcLight:dt.white},v("peekViewTitleBackground","Background color of the peek view title area.")),F2=Oe("peekViewTitleLabel.foreground",{dark:dt.white,light:dt.black,hcDark:dt.white,hcLight:_a},v("peekViewTitleForeground","Color of the peek view title.")),H2=Oe("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),A$=Oe("peekView.border",{dark:Bm,light:Bm,hcDark:as,hcLight:as},v("peekViewBorder","Color of the peek view borders and arrow.")),L$=Oe("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:dt.black,hcLight:dt.white},v("peekViewResultsBackground","Background color of the peek view result list.")),DKe=Oe("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:dt.white,hcLight:_a},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),NKe=Oe("peekViewResult.fileForeground",{dark:dt.white,light:"#1E1E1E",hcDark:dt.white,hcLight:_a},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),RKe=Oe("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),OKe=Oe("peekViewResult.selectionForeground",{dark:dt.white,light:"#6C6C6C",hcDark:dt.white,hcLight:_a},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),kd=Oe("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:dt.black,hcLight:dt.white},v("peekViewEditorBackground","Background color of the peek view editor.")),PKe=Oe("peekViewEditorGutter.background",{dark:kd,light:kd,hcDark:kd,hcLight:kd},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),FKe=Oe("peekViewEditorStickyScroll.background",{dark:kd,light:kd,hcDark:kd,hcLight:kd},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),HKe=Oe("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),BKe=Oe("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),zKe=Oe("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:va,hcLight:va},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var E0e,qo,nT,pc,Wr,Sp=M(()=>{At();qt();pP();Ce();tf();lo();Si();qe();De();E0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qo=class{constructor(e,t,n,r){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=r,this.id=fP.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;let t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?v({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,Dr(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",Dr(this.uri),this.range.startLineNumber,this.range.startColumn)}},nT=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let n=this._modelReference.object.textEditorModel;if(!n)return;let{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:r,column:o-t}),c=new P(r,l.startColumn,r,o),d=new P(s,a,s,1073741824),u=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),p=n.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+p,highlight:{start:u.length,end:u.length+h.length}}}},pc=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new GR}dispose(){Vi(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?v("aria.fileReferences.1","1 symbol in {0}, full path {1}",Dr(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Dr(this.uri),this.uri.fsPath)}resolve(e){return E0e(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{let n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new nT(n))}catch(n){at(n)}return this})}},Wr=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new $e,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[n]=e;e.sort(i._compareReferences);let r;for(let o of e)if((!r||!bw.isEqual(r.uri,o.uri,!0))&&(r=new pc(this,o.uri),this.groups.push(r)),r.children.length===0||i._compareReferences(o,r.children[r.children.length-1])!==0){let s=new qo(n===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){Vi(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?v("aria.result.0","No results found"):this.references.length===1?v("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?v("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.length,s=n.parent.groups.length;return s===1||t&&r+10?(t?r=(r+1)%o:r=(r+o-1)%o,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%s,n.parent.groups[r].children[0]):(r=(r+s-1)%s,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}nearestReference(e,t){let n=this.references.map((r,o)=>({idx:o,prefixLen:Pc(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLeno.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(let n of this.references)if(n.uri.toString()===e.toString()&&P.containsPosition(n.range,t))return n}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return bw.compare(e.uri,t.uri)||P.compareRangesUsingStarts(e.range,t.range)}}});var M$=M(()=>{});var D$=M(()=>{M$()});var V2,K2,B2,z2,U2,W2,rT,wp,oT,xp,j2,R$=M(()=>{Ht();ioe();Jre();JP();Cl();Ce();lo();ca();De();Et();Gn();yb();rb();Sp();V2=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},K2=function(i,e){return function(t,n){e(t,n,i)}},B2=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Wr||e instanceof pc}getChildren(e){if(e instanceof Wr)return e.groups;if(e instanceof pc)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};B2=V2([K2(0,xn)],B2);z2=class{getHeight(){return 23}getTemplateId(e){return e instanceof pc?wp.id:xp.id}},U2=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof qo){let n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return Dr(e.uri)}};U2=V2([K2(0,Bt)],U2);W2=class{getId(e){return e instanceof qo?e.id:e.uri}},rT=class extends oe{constructor(e,t){super(),this._labelService=t;let n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new wb(n,{supportHighlights:!0})),this.badge=new rF(me(n,fe(".count")),{},CP),e.appendChild(n)}set(e,t){let n=rf(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(v("referencesCount","{0} references",r)):this.badge.setTitleFormat(v("referenceCount","{0} reference",r))}};rT=V2([K2(1,Dl)],rT);wp=class N${constructor(e){this._instantiationService=e,this.templateId=N$.id}renderTemplate(e){return this._instantiationService.createInstance(rT,e)}renderElement(e,t,n){n.set(e.element,nu(e.filterData))}disposeTemplate(e){e.dispose()}};wp.id="FileReferencesRenderer";wp=V2([K2(0,He)],wp);oT=class{constructor(e){this.label=new QP(e)}set(e,t){var n;let r=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!r||!r.value)this.label.set(`${Dr(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:s}=r;t&&!yl.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,nu(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}},xp=class i{constructor(){this.templateId=i.id}renderTemplate(e){return new oT(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}};xp.id="OneReferenceRenderer";j2=class{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var T0e,mc,O$,q2,G2,sT,$2,P$=M(()=>{Ht();eoe();ma();qt();Ce();Am();lo();D$();gp();qe();qn();Kn();vw();os();ca();R$();th();De();Et();Gn();yb();nF();ar();Tre();Sp();T0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mc=function(i,e){return function(t,n){e(t,n,i)}},O$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},q2=class i{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new ne,this._callOnModelChange=new ne,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();let e=this._editor.getModel();if(e){for(let t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));let t=[],n=[];for(let r=0,o=e.children.length;r{let o=r.deltaDecorations([],t);for(let s=0;s{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(sT,"ReferencesWidget",this._treeContainer,new z2,[this._instantiationService.createInstance(wp),this._instantiationService.createInstance(xp)],this._instantiationService.createInstance(B2),n),this._splitView.addView({onDidChange:li.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},Yw.Distribute),this._splitView.addView({onDidChange:li.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},Yw.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let r=(o,s)=>{o instanceof qo&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")}),Wn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Mi(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=v("noResults","No results"),gr(this._messageContainer),Promise.resolve(void 0)):(Wn(this._messageContainer),this._decorationsManager=new q2(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{let{event:t,target:n}=e;if(t.detail!==2)return;let r=this._getFocusedReference();r&&this._onDidSelectReference.fire({element:{uri:r.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),gr(this._treeContainer),gr(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){let[e]=this._tree.getFocus();if(e instanceof qo)return e;if(e instanceof pc&&e.children.length>0)return e.children[0]}revealReference(e){return O$(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return O$(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ao.inMemory?this.setTitle(rO(e.uri),this._uriLabel.getUriLabel(rf(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));let n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));let r=yield n;if(!this._model){r.dispose();return}Vi(this._previewModelReference);let o=r.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=P.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()})}};$2=T0e([mc(3,pn),mc(4,xn),mc(5,He),mc(6,iT),mc(7,Dl),mc(8,nP),mc(9,Bt),mc(10,Xi),mc(11,Tt)],$2)});function nh(i,e){let t=k$(i);if(!t)return;let n=sl.get(t);n&&e(n)}var k0e,Ep,F$,ih,sl,lT=M(()=>{Dt();At();gl();Ce();Ar();ri();qe();th();De();Bi();jn();ft();Et();cw();nF();Ro();lu();Sp();P$();k0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ep=function(i,e){return function(t,n){e(t,n,i)}},F$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},ih=new nt("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),sl=class aT{static get(e){return e.getContribution(aT.ID)}constructor(e,t,n,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new ne,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=ih.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));let o="peekViewLayout",s=G2.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance($2,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{let{element:c,kind:d}=l;if(c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));let a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,u=new Se(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(84)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return F$(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;let r=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(r),yield this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return F$(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;let r=P.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:r,selectionSource:"code.jump",pinned:t}},this._editor).then(o=>{var s;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(r),this._widget.focusOnReferenceTree();else{let a=aT.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(r,Vt(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,at(o)})}openReference(e,t,n){t||this.closeWidget();let{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:n}},this._editor,t)}};sl.ID="editor.contrib.referencesController";sl=k0e([Ep(2,Ke),Ep(3,Zt),Ep(4,xi),Ep(5,He),Ep(6,Yr),Ep(7,Mt)],sl);Do.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:di(2089,60),when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Do.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.goToNextOrPreviousReference(!0)})}});Do.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.goToNextOrPreviousReference(!1)})}});St.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");St.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");St.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");St.registerCommand("closeReferenceSearch",i=>nh(i,e=>e.closeWidget()));Do.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:ce.and(Pn.inPeekEditor,ce.not("config.editor.stablePeek"))});Do.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:ce.and(ih,ce.not("config.editor.stablePeek"))});Do.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ce.and(ih,Xw,Qw.negate(),Jw.negate()),handler(i){var e;let n=(e=i.get(xb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof qo&&nh(i,r=>r.revealReference(n[0]))}});Do.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ce.and(ih,Xw,Qw.negate(),Jw.negate()),handler(i){var e;let n=(e=i.get(xb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof qo&&nh(i,r=>r.openReference(n[0],!0,!0))}});St.registerCommand("openReference",i=>{var e;let n=(e=i.get(xb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof qo&&nh(i,r=>r.openReference(n[0],!1,!0))})});var H$,vg,uT,_g,cT,dT,B$=M(()=>{qt();Ce();lo();Ze();Ar();qe();De();ft();bl();Et();Gn();cw();Ro();H$=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},vg=function(i,e){return function(t,n){e(t,n,i)}},uT=new nt("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),_g=rr("ISymbolNavigationService"),cT=class{constructor(e,t,n,r){this._editorService=t,this._notificationService=n,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=uT.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){let t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();let n=new dT(this._editorService),r=n.onDidChange(o=>{if(this._ignoreEditorChange)return;let s=this._editorService.getActiveCodeEditor();if(!s)return;let a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,d=!1;for(let u of t.references)if(nf(u.uri,a.uri))c=!0,d=d||P.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=QS(n,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;let t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:P.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();let t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};cT=H$([vg(0,Ke),vg(1,Zt),vg(2,xi),vg(3,Bt)],cT);sr(_g,cT,1);Me(new class extends wi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:uT,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(_g).revealNext(e)}});Do.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:uT,primary:9,handler(i){i.get(_g).reset()}});dT=class{constructor(e){this._listener=new Map,this._disposables=new ne,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Vi(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,QS(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};dT=H$([vg(0,Zt)],dT)});function bg(i,e,t,n){return hT(this,void 0,void 0,function*(){let o=t.ordered(i).map(a=>Promise.resolve(n(a,i,e)).then(void 0,l=>{Ut(l)})),s=yield Promise.all(o);return vr(s.flat())})}function rh(i,e,t,n){return bg(e,t,i,(r,o,s)=>r.provideDefinition(o,s,n))}function fT(i,e,t,n){return bg(e,t,i,(r,o,s)=>r.provideDeclaration(o,s,n))}function pT(i,e,t,n){return bg(e,t,i,(r,o,s)=>r.provideImplementation(o,s,n))}function mT(i,e,t,n){return bg(e,t,i,(r,o,s)=>r.provideTypeDefinition(o,s,n))}function yg(i,e,t,n,r){return bg(e,t,i,(o,s,a)=>hT(this,void 0,void 0,function*(){let l=yield o.provideReferences(s,a,{includeDeclaration:!0},r);if(!n||!l||l.length!==2)return l;let c=yield o.provideReferences(s,a,{includeDeclaration:!1},r);return c&&c.length===1?c:l}))}function Cg(i){return hT(this,void 0,void 0,function*(){let e=yield i(),t=new Wr(e,""),n=t.references.map(r=>r.link);return t.dispose(),n})}var hT,Y2=M(()=>{oi();gi();At();Ze();xt();Sp();hT=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Gr("_executeDefinitionProvider",(i,e,t)=>{let n=i.get(be),r=rh(n.definitionProvider,e,t,et.None);return Cg(()=>r)});Gr("_executeTypeDefinitionProvider",(i,e,t)=>{let n=i.get(be),r=mT(n.typeDefinitionProvider,e,t,et.None);return Cg(()=>r)});Gr("_executeDeclarationProvider",(i,e,t)=>{let n=i.get(be),r=fT(n.declarationProvider,e,t,et.None);return Cg(()=>r)});Gr("_executeReferenceProvider",(i,e,t)=>{let n=i.get(be),r=yg(n.referenceProvider,e,t,!1,et.None);return Cg(()=>r)});Gr("_executeImplementationProvider",(i,e,t)=>{let n=i.get(be),r=pT(n.implementationProvider,e,t,et.None);return Cg(()=>r)})});var Cs,gT,vT,_T,bT,yT,CT,ST,wT,oh,Ss,gc,z$,X2,Q2,J2,Z2,kT,Sg=M(()=>{ZS();Lo();Dt();gl();nr();Li();Sn();au();zw();Ze();Ar();gp();ri();qe();jt();br();lT();Sp();B$();h0();th();De();Yi();Bi();ft();Et();Ro();qc();Y2();xt();Tm();Cs=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};ns.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});oh=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||Se.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},Ss=class i extends ua{static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(let n of ao.wrap(t.menu))(n.id===xe.EditorContext||n.id===xe.EditorContextPeek)&&(n.when=ce.and(e.precondition,n.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,r){if(!t.hasModel())return Promise.resolve(void 0);let o=e.get(xi),s=e.get(Zt),a=e.get(El),l=e.get(_g),c=e.get(be),d=e.get(He),u=t.getModel(),h=t.getPosition(),p=oh.is(n)?n:new oh(u,h),m=new Sa(t,5),g=jc(this._getLocationModel(c,p.model,p.position,m.token),m.token).then(b=>Cs(this,void 0,void 0,function*(){var S;if(!b||m.token.isCancellationRequested)return;Di(b.ariaMessage);let k;if(b.referenceAt(u.uri,h)){let A=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(A)&&i._allSymbolNavigationCommands.has(A)&&(k=i._allSymbolNavigationCommands.get(A))}let N=b.references.length;if(N===0){if(!this.configuration.muteMessage){let A=u.getWordAtPosition(h);(S=Qn.get(t))===null||S===void 0||S.showMessage(this._getNoResultFoundMessage(A),h)}}else if(N===1&&k)i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(A=>k.runEditorCommand(A,t,n,r).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,b,r)}),b=>{o.error(b)}).finally(()=>{m.dispose()});return a.showWhile(g,250),g}_onResult(e,t,n,r,o){return Cs(this,void 0,void 0,function*(){let s=this._getGoToPreference(n);if(!(n instanceof Vo)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(n,r,o);else{let a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",c=yield this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,r,o):r.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,n,r,o){return Cs(this,void 0,void 0,function*(){let s;if(XO(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;let a=yield t.openCodeEditor({resource:n.uri,options:{selection:P.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(a){if(o){let l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}})}_openInPeek(e,t,n){let r=sl.get(e);r&&e.hasModel()?r.toggleWidget(n!=null?n:e.getSelection(),Vt(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};Ss._allSymbolNavigationCommands=new Map;Ss._activeAlternativeCommands=new Set;gc=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield rh(e.definitionProvider,t,n,r),v("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("noResultWord","No definition found for '{0}'",e.word):v("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}},z$=f_&&!ZN()?2118:70;mi((gT=class xT extends gc{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:xT.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:ce.and(O.hasDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:z$,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.1},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),St.registerCommandAlias("editor.action.goToDeclaration",xT.id)}},gT.id="editor.action.revealDefinition",gT));mi((vT=class ET extends gc{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:ET.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ce.and(O.hasDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:di(2089,z$),weight:100}}),St.registerCommandAlias("editor.action.openDeclarationToTheSide",ET.id)}},vT.id="editor.action.revealDefinitionAside",vT));mi((_T=class TT extends gc{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:TT.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:ce.and(O.hasDefinitionProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:xe.EditorContextPeek,group:"peek",order:2}}),St.registerCommandAlias("editor.action.previewDeclaration",TT.id)}},_T.id="editor.action.peekDefinition",_T));X2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield fT(e.declarationProvider,t,n,r),v("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}};mi((bT=class U$ extends X2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:U$.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:ce.and(O.hasDeclarationProvider,O.isInWalkThroughSnippet.toNegated()),menu:[{id:xe.EditorContext,group:"navigation",order:1.3},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}},bT.id="editor.action.revealDeclaration",bT));mi(class extends X2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:ce.and(O.hasDeclarationProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:3}})}});Q2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield mT(e.typeDefinitionProvider,t,n,r),v("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}};mi((yT=class W$ extends Q2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:W$.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:ce.and(O.hasTypeDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:0,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.4},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},yT.ID="editor.action.goToTypeDefinition",yT));mi((CT=class j$ extends Q2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:j$.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:ce.and(O.hasTypeDefinitionProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:4}})}},CT.ID="editor.action.peekTypeDefinition",CT));J2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield pT(e.implementationProvider,t,n,r),v("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}};mi((ST=class V$ extends J2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:V$.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:ce.and(O.hasImplementationProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:2118,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.45},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},ST.ID="editor.action.goToImplementation",ST));mi((wT=class K$ extends J2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:K$.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:ce.and(O.hasImplementationProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:3142,weight:100},menu:{id:xe.EditorContextPeek,group:"peek",order:5}})}},wT.ID="editor.action.peekImplementation",wT));Z2=class extends Ss{_getNoResultFoundMessage(e){return e?v("references.no","No references found for '{0}'",e.word):v("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}};mi(class extends Z2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:ce.and(O.hasReferenceProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:1094,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.45},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield yg(e.referenceProvider,t,n,!0,r),v("ref.title","References"))})}});mi(class extends Z2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:ce.and(O.hasReferenceProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield yg(e.referenceProvider,t,n,!1,r),v("ref.title","References"))})}});kT=class extends Ss{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ce.and(Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(56).multipleReferences}_getAlternativeCommand(){return""}};St.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ht},{name:"position",description:"The position at which to start",constraint:Se.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(i,e,t,n,r,o,s)=>Cs(void 0,void 0,void 0,function*(){Lt(ht.isUri(e)),Lt(Se.isIPosition(t)),Lt(Array.isArray(n)),Lt(typeof r=="undefined"||typeof r=="string"),Lt(typeof s=="undefined"||typeof s=="boolean");let a=i.get(Zt),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Bw(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let d=new class extends kT{_getNoResultFoundMessage(u){return o||super._getNoResultFoundMessage(u)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},n,r);c.get(He).invokeFunction(d.run.bind(d),l)})})});St.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ht},{name:"position",description:"The position at which to start",constraint:Se.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(i,e,t,n,r)=>Cs(void 0,void 0,void 0,function*(){i.get(ui).executeCommand("editor.action.goToLocations",e,t,n,r,void 0,!0)})});St.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{Lt(ht.isUri(e)),Lt(Se.isIPosition(t));let n=i.get(be),r=i.get(Zt);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!Bw(o)||!o.hasModel())return;let s=sl.get(o);if(!s)return;let a=Vt(c=>yg(n.referenceProvider,o.getModel(),Se.lift(t),!1,c).then(d=>new Wr(d,v("ref.title","References")))),l=new P(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});St.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});var q$=M(()=>{});var G$=M(()=>{q$()});function IT(i,e){return!!i[e]}function $$(i){return i==="altKey"?zn?new Tp(57,"metaKey",6,"altKey"):new Tp(5,"ctrlKey",6,"altKey"):zn?new Tp(6,"altKey",57,"metaKey"):new Tp(6,"altKey",5,"ctrlKey")}var wg,eC,Tp,al,xg=M(()=>{qt();Ce();nr();wg=class{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=IT(e.event,t.triggerModifier),this.hasSideBySideModifier=IT(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},eC=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=IT(e,t.triggerModifier)}},Tp=class{constructor(e,t,n,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};al=class extends oe{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new $e),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new $e),this.onExecute=this._onExecute.event,this._onCancel=this._register(new $e),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=$$(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(75)){let r=$$(this._editor.getOption(75));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new wg(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new wg(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new wg(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new eC(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new eC(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){let t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}});var I0e,AT,Y$,Id,iC=M(()=>{Dt();At();Sl();Ce();Li();G$();au();Ze();qe();os();ca();xg();th();De();ft();Sg();Y2();xt();qn();I0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},AT=function(i,e){return function(t,n){e(t,n,i)}},Y$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Id=class tC{constructor(e,t,n,r){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=r,this.toUnhook=new ne,this.toUnhookForKeyboard=new ne,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new al(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,Un(a))})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{at(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(tC.ID)}startFindDefinitionFromCursor(e){return Y$(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}let n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return Y$(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();let n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;let r=new J_(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Vt(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){at(a);return}if(!o||!o.length||!r.validate(this.editor)){this.removeLinkDecorations();return}let s=o[0].originSelectionRange?P.lift(o[0].originSelectionRange):new P(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(o.length>1){let a=s;for(let{originSelectionRange:l}of o)l&&(a=P.plusRange(a,l));this.addDecoration(a,new sn().appendText(v("multipleResults","Click to show {0} definitions.",o.length)))}else{let a=o[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}let{object:{textEditorModel:c}}=l,{startLineNumber:d}=a.range;if(d<1||d>c.getLineCount()){l.dispose();return}let u=this.getPreviewValue(c,d,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(s,u?new sn().appendCodeblock(h||"",u):void 0),l.dispose()})}})}getPreviewValue(e,t,n){let r=n.range;return r.endLineNumber-r.startLineNumber>=tC.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,n){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{let r=!t&&this.editor.getOption(85)&&!this.isInPeekEditor(n);return new gc({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){let t=e.get(Ke);return Pn.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};Id.ID="editor.contrib.gotodefinitionatposition";Id.MAX_SOURCE_PREVIEW_LINES=8;Id=I0e([AT(1,xn),AT(2,Xi),AT(3,be)],Id);Ae(Id.ID,Id,2)});var X$,nC,rC,LT,DT,MT,Q$=M(()=>{oi();qt();Ce();qN();Si();Sn();qe();bl();Et();ob();jn();X$=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nC=function(i,e){return function(t,n){e(t,n,i)}},rC=class{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}},LT=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._dispoables=new ne,this._markers=[],this._nextIdx=-1,ht.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=ow(a.resource.toString(),l.resource.toString());return c===0&&(r==="position"?c=P.compareRangesUsingStarts(a,l)||Dn.compare(a.severity,l.severity):c=Dn.compare(a.severity,l.severity)||P.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:ht.isUri(e)?e:void 0,severities:Dn.Error|Dn.Warning|Dn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){let e=this._markers[this._nextIdx];return e&&new rC(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=tu(this._markers,{resource:e.uri},(s,a)=>ow(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;sr.resource.toString()===e.toString());if(!(n<0)){for(;n{});var Z$=M(()=>{J$()});var eY=M(()=>{});var tY=M(()=>{eY()});var oC,iY=M(()=>{tY();or();qr();Lre();(function(i){function e(t){switch(t){case Zm.Ignore:return"severity-ignore "+mt.asClassName(lt.info);case Zm.Info:return mt.asClassName(lt.info);case Zm.Warning:return mt.asClassName(lt.warning);case Zm.Error:return mt.asClassName(lt.error);default:return""}}i.className=e})(oC||(oC={}))});var A0e,kp,NT,sh,nY,rY,oY,RT,L0e,sC,M0e,OT,D0e,N0e,aY=M(()=>{Ht();tb();oi();ma();qt();Ce();lo();Si();Z$();qe();th();De();bb();Yi();ft();Et();yb();ob();cs();iY();_r();ar();A0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},kp=function(i,e){return function(t,n){e(t,n,i)}},NT=class{constructor(e,t,n,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new ne,this._editor=t;let s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(es(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new vP(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Vi(this._disposables)}update(e){let{source:t,message:n,relatedInformation:r,code:o}=e,s=((t==null?void 0:t.length)||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);let a=Zd(n);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);mr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(let h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){let h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){let p=document.createElement("span");p.innerText=t,p.classList.add("source"),h.appendChild(p)}if(o)if(typeof o=="string"){let p=document.createElement("span");p.innerText=`(${o})`,p.classList.add("code"),h.appendChild(p)}else{this._codeLink=fe("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};let p=me(this._codeLink,fe("span"));p.innerText=o.value,h.appendChild(this._codeLink)}}if(mr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Ui(r)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(let p of r){let m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(p.resource)}(${p.startLineNumber}, ${p.startColumn}): `,g.title=this._labelService.getUriLabel(p.resource),this._relatedDiagnostics.set(g,p);let b=document.createElement("span");b.innerText=p.message,m.appendChild(g),m.appendChild(b),this._lines+=1,h.appendChild(m)}}let c=this._editor.getOption(48),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Dn.Error:t=v("Error","Error");break;case Dn.Warning:t=v("Warning","Warning");break;case Dn.Info:t=v("Info","Info");break;case Dn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(n=`${r.getLineContent(e.startLineNumber)}, ${n}`),n}},sh=class sY extends Cp{constructor(e,t,n,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=n,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new ne,this._onDidSelectRelatedInformation=new $e,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Dn.Warning,this._backgroundColor=dt.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(N0e);let t=RT,n=L0e;this._severity===Dn.Warning?(t=sC,n=M0e):this._severity===Dn.Info&&(t=OT,n=D0e);let r=e.getColor(t),o=e.getColor(n);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor(F2),secondaryHeadingColor:e.getColor(H2)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(r=>this.editor.focus()));let t=[],n=this._menuService.createMenu(sY.TitleMenu,this._contextKeyService);vb(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=me(e,fe(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new NT(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let r=P.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(Dr(a.uri),l)}this._icon.className=`codicon ${oC.className(Dn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};sh.TitleMenu=new xe("gotoErrorTitleMenu");sh=A0e([kp(1,pn),kp(2,Qi),kp(3,Is),kp(4,He),kp(5,Ke),kp(6,Dl)],sh);nY=K_(wO,xO),rY=K_(EO,TO),oY=K_(Bm,kO),RT=Oe("editorMarkerNavigationError.background",{dark:nY,light:nY,hcDark:as,hcLight:as},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),L0e=Oe("editorMarkerNavigationError.headerBackground",{dark:Rr(RT,.1),light:Rr(RT,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),sC=Oe("editorMarkerNavigationWarning.background",{dark:rY,light:rY,hcDark:as,hcLight:as},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),M0e=Oe("editorMarkerNavigationWarning.headerBackground",{dark:Rr(sC,.1),light:Rr(sC,.1),hcDark:"#0C141F",hcLight:Rr(sC,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),OT=Oe("editorMarkerNavigationInfo.background",{dark:oY,light:oY,hcDark:as,hcLight:as},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),D0e=Oe("editorMarkerNavigationInfo.headerBackground",{dark:Rr(OT,.1),light:Rr(OT,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),N0e=Oe("editorMarkerNavigation.background",{dark:zm,light:zm,hcDark:zm,hcLight:zm},v("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var R0e,aC,lY,vc,Ip,ah,Eg,PT,FT,cY,O0e,cC=M(()=>{or();Ce();Ze();Ar();ri();qe();jt();Q$();De();Yi();ft();Et();Al();aY();R0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},aC=function(i,e){return function(t,n){e(t,n,i)}},lY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},vc=class lC{static get(e){return e.getContribution(lC.ID)}constructor(e,t,n,r,o){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new ne,this._editor=e,this._widgetVisible=cY.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(sh,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var r,o,s;(!(!((r=this._model)===null||r===void 0)&&r.selected)||!P.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,n.position))&&((s=this._model)===null||s===void 0||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:P.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){let t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new Se(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,r;return lY(this,void 0,void 0,function*(){if(this._editor.hasModel()){let o=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();let s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&((n=lC.get(s))===null||n===void 0||n.close(),(r=lC.get(s))===null||r===void 0||r.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};vc.ID="editor.contrib.markerController";vc=R0e([aC(1,DT),aC(2,Ke),aC(3,Zt),aC(4,He)],vc);Ip=class extends se{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return lY(this,void 0,void 0,function*(){t.hasModel()&&((n=vc.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}},ah=class i extends Ip{constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:578,weight:100},menuOpts:{menuId:sh.TitleMenu,title:i.LABEL,icon:Ei("marker-navigation-next",lt.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};ah.ID="editor.action.marker.next";ah.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");Eg=class i extends Ip{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:1602,weight:100},menuOpts:{menuId:sh.TitleMenu,title:i.LABEL,icon:Ei("marker-navigation-previous",lt.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};Eg.ID="editor.action.marker.prev";Eg.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");PT=class extends Ip{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:66,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},FT=class extends Ip{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:1090,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Ae(vc.ID,vc,4);X(ah);X(Eg);X(PT);X(FT);cY=new nt("markersNavigationVisible",!1),O0e=wi.bindToContribution(vc.get);Me(new O0e({id:"closeMarkersNavigation",precondition:cY,handler:i=>i.close(),kbOpts:{weight:100+50,kbExpr:O.focus,primary:9,secondary:[1033]}}))});var dY=M(()=>{});var uY=M(()=>{dY()});var dC,Ap,uC,HT=M(()=>{Ht();iR();tb();Ce();uY();dC=fe,Ap=class extends oe{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new mf(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},uC=class i extends oe{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionContainer=me(e,dC("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=me(this.actionContainer,dC("a.action")),this.action.setAttribute("role","button"),t.iconClass&&me(this.action,dC(`span.icon.${t.iconClass}`));let r=me(this.action,dC("span"));r.textContent=n?`${t.label} (${n})`:t.label,this._register(Rt(this.actionContainer,on.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(Rt(this.actionContainer,on.KEY_DOWN,o=>{let s=new v_(o);(s.equals(3)||s.equals(10))&&(o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}});var P0e,F0e,BT,Lp,zT=M(()=>{Dt();At();qt();Ce();P0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},F0e=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},BT=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}},Lp=class extends oe{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new $e),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new ti(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new ti(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new ti(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(58).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=dO(e=>this._computer.computeAsync(e)),P0e(this,void 0,void 0,function*(){var e,t,n,r;try{try{for(var o=!0,s=F0e(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){r=a.value,o=!1;let l=r;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){at(l)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;let e=this._state===0,t=this._state===4;this._onResult.fire(new BT(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}});function fY(i,e,t,n,r,o){let s=t+r/2,a=n+o/2,l=Math.max(Math.abs(i-s)-r/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}var KT,hC,hY,Tg,fC,WT,jT,Ad,kg,VT,qT=M(()=>{Ht();HT();oi();Ce();ri();qe();qn();br();zT();lc();ft();Et();Gn();Qu();Dt();jt();KT=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},hC=function(i,e){return function(t,n){e(t,n,i)}},hY=fe,Tg=class UT extends oe{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._widget=this._register(this._instantiationService.createInstance(Ad,this._editor)),this._currentResult=null,this._participants=[];for(let r of Wo.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,o)=>r.hoverOrdinal-o.hoverOrdinal),this._computer=new VT(this._editor,this._participants),this._hoverOperation=this._register(new Lp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{if(!this._computer.anchor)return;let o=r.hasLoadingMessage?this._addLoadingMessage(r.value):r.value;this._withResult(new fC(this._computer.anchor,o,r.isComplete))})),this._register(es(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(hf.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(e){let t=[];for(let r of this._participants)if(r.suggestHoverAnchor){let o=r.suggestHoverAnchor(e);o&&t.push(o)}let n=e.target;if(n.type===6&&t.push(new np(0,n.range,e.event.posx,e.event.posy)),n.type===7){let r=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTexto.priority-r.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,r){this._startShowingOrUpdateHover(new np(0,e,void 0,void 0),t,n,r,null)}_startShowingOrUpdateHover(e,t,n,r,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):!1:this._editor.getOption(58).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,r,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}isVisible(){return this._widget.isVisible}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(let t of this._participants)if(t.createLoadingMessage){let n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){let{showAtPosition:n,showAtSecondaryPosition:r,highlightRange:o}=UT.computeHoverRanges(this._editor,e.range,t),s=new ne,a=s.add(new kg(this._keybindingService)),l=document.createDocumentFragment(),c=null,d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(let h of this._participants){let p=t.filter(m=>m.owner===h);p.length>0&&s.add(h.renderHoverParts(d,p))}let u=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){let h=this._editor.createDecorationsCollection();h.set([{range:o,options:UT._DECORATION_OPTIONS}]),s.add(Ft(()=>{h.clear()}))}this._widget.showAt(l,new jT(c,n,r,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,u,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,n){let r=1;if(e.hasModel()){let c=e._getViewModel(),d=c.coordinatesConverter,u=d.convertModelRangeToViewRange(t),h=new Se(u.startLineNumber,c.getLineMinColumn(u.startLineNumber));r=d.convertViewPositionToModelPosition(h).column}let o=t.startLineNumber,s=t.startColumn,a=n[0].range,l=null;for(let c of n)a=P.plusRange(a,c.range),c.range.startLineNumber===o&&c.range.endLineNumber===o&&(s=Math.max(Math.min(s,c.range.startColumn),r)),c.forceShowAtRange&&(l=c.range);return{showAtPosition:l?l.getStartPosition():new Se(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new Se(o,s),highlightRange:a}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}escape(){this._widget.escape()}};Tg._DECORATION_OPTIONS=ct.register({description:"content-hover-highlight",className:"hoverHighlight"});Tg=KT([hC(1,He),hC(2,Bt)],Tg);fC=class{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){let t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new WT(this,this.anchor,t,this.isComplete)}},WT=class extends fC{constructor(e,t,n,r){super(t,n,r),this.original=e}filter(e){return this.original.filter(e)}},jT=class{constructor(e,t,n,r,o,s,a,l,c,d){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=r,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=c,this.disposables=d,this.closestMouseDistance=void 0}},Ad=class pY extends oe{get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=O.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=O.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new Ap),this._focusTracker=this._register(Ts(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this),this._register(this._focusTracker.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(this._focusTracker.onDidBlur(()=>{this._hoverFocusedKey.set(!1)}))}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return pY.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(it.Visible.key)&&(e=!0);let t=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:t}}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX=="undefined"||typeof this._visibleData.initialMousePosY=="undefined")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;let n=wn(this.getDomNode());typeof this._visibleData.closestMouseDistance=="undefined"&&(this._visibleData.closestMouseDistance=fY(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));let r=fY(e,t,n.left,n.top,n.width,n.height);return r>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,r),!0)}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){let e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:n}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${n/t}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}showAt(e,t){var n;this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout()}hide(){if(this._visibleData){let e=this._visibleData.stoleFocus;this._setVisibleData(null),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();let e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){let n=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==n&&(this._hover.contentsDomNode.style.paddingBottom=n,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-this._horizontalScrollingBy})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+this._horizontalScrollingBy})}pageUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};Ad.ID="editor.contrib.contentHoverWidget";Ad=KT([hC(1,Ke)],Ad);kg=class extends oe{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=hY("div.hover-row.status-bar"),this.actionsElement=me(this.hoverElement,hY("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(uC.render(this.actionsElement,e,n))}append(e){let t=me(this.actionsElement,e);return this._hasContent=!0,t}};kg=KT([hC(0,Bt)],kg);VT=class i{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];let n=e.getModel(),r=t.range.startLineNumber;if(r>n.getLineCount())return[];let o=n.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){let t=this._anchor;if(!this._editor.hasModel()||!t)return Nr.EMPTY;let n=i._getLineDecorations(this._editor,t);return Nr.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,n,e):Nr.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return vr(t)}}});var mY,lh,GT,gY=M(()=>{Ht();oi();Sl();Ce();Zu();zT();HT();mY=fe,lh=class i extends oe{constructor(e,t,n){super(),this._renderDisposeables=this._register(new ne),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new Ap),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new io({editor:this._editor},t,n)),this._computer=new GT(this._editor),this._hoverOperation=this._register(new Lp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();let n=document.createDocumentFragment();for(let r of t){let o=mY("div.hover-row.markdown-hover"),s=me(o,mY("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),n.appendChild(o)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));let t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(64),s=this._hover.containerDomNode.clientHeight,a=n-r-(s-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}};lh.ID="editor.contrib.modesGlyphHoverWidget";GT=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){let e=r=>({value:r}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(let r of t){if(!r.options.glyphMarginClassName)continue;let o=r.options.glyphMarginHoverMessage;!o||Wc(o)||n.push(...I_(o).map(e))}return n}}});function B0e(i,e,t,n,r){return H0e(this,void 0,void 0,function*(){try{let o=yield Promise.resolve(i.provideHover(t,n,r));if(o&&U0e(o))return new $T(i,o,e)}catch(o){Ut(o)}})}function Ig(i,e,t,n){let o=i.ordered(e).map((s,a)=>B0e(s,a,e,t,n));return Nr.fromPromises(o).coalesce()}function z0e(i,e,t,n){return Ig(i,e,t,n).map(r=>r.hover).toPromise()}function U0e(i){let e=typeof i.range!="undefined",t=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return e&&t}var H0e,$T,YT=M(()=>{Dt();gi();At();Ze();xt();H0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$T=class{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}};Gr("_executeHoverProvider",(i,e,t)=>{let n=i.get(be);return z0e(n.hoverProvider,e,t,et.None)})});function XT(i,e,t,n,r){e.sort((s,a)=>s.ordinal-a.ordinal);let o=new ne;for(let s of e)for(let a of s.contents){if(Wc(a))continue;let l=vY("div.hover-row.markdown-hover"),c=me(l,vY("div.hover-contents")),d=o.add(new io({editor:t},n,r));o.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",i.onContentsChanged()}));let u=o.add(d.render(a));c.appendChild(u.element),i.fragment.appendChild(l)}return o}var W0e,pC,vY,no,Mp,mC=M(()=>{Ht();oi();Dt();Sl();Ce();Zu();ri();qe();os();YT();De();jn();cs();xt();W0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},pC=function(i,e){return function(t,n){e(t,n,i)}},vY=fe,no=class{constructor(e,t,n,r,o){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=r,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Mp=class{constructor(e,t,n,r,o){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=r,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new no(this,e.range,[new sn().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[],a=1e3,l=n.getLineLength(r),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(113),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;d>=0&&l>d&&e.range.startColumn>=d&&(h=!0,s.push(new no(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof u=="number"&&l>=u&&s.push(new no(this,e.range,[{value:v("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let p=!1;for(let m of t){let g=m.range.startLineNumber===r?m.range.startColumn:1,b=m.range.endLineNumber===r?m.range.endColumn:o,S=m.options.hoverMessage;if(!S||Wc(S))continue;m.options.beforeContentClassName&&(p=!0);let k=new P(e.range.startLineNumber,g,e.range.startLineNumber,b);s.push(new no(this,k,I_(S),p,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return Nr.EMPTY;let r=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(r))return Nr.EMPTY;let o=new Se(e.range.startLineNumber,e.range.startColumn);return Ig(this._languageFeaturesService.hoverProvider,r,o,n).filter(s=>!Wc(s.hover.contents)).map(s=>{let a=s.hover.range?P.lift(s.hover.range):e.range;return new no(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return XT(e,t,this._editor,this._languageService,this._openerService)}};Mp=W0e([pC(1,Xi),pC(2,Qi),pC(3,Mt),pC(4,be)],Mp)});var j0e,QT,ws,JT,_Y,gC,bY=M(()=>{Ht();oi();Dt();At();Ce();lo();qe();xt();$re();Nu();sy();vd();cC();De();ob();cs();qc();j0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},QT=function(i,e){return function(t,n){e(t,n,i)}},ws=fe,JT=class{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},_Y={type:1,filter:{include:Qe.QuickFix},triggerAction:Xn.QuickFixHover},gC=class{constructor(e,t,n,r){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[];for(let a of t){let l=a.range.startLineNumber===r?a.range.startColumn:1,c=a.range.endLineNumber===r?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(n.uri,a);if(!d)continue;let u=new P(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new JT(this,u,d))}return s}renderHoverParts(e,t){if(!t.length)return oe.None;let n=new ne;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,n)));let r=t.length===1?t[0]:t.sort((o,s)=>Dn.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,r,n),n}renderMarkerHover(e,t){let n=ws("div.hover-row"),r=me(n,ws("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);let c=me(r,ws("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=ws("span");if(o){let m=me(d,ws("span"));m.innerText=o}let u=me(d,ws("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(Rt(u,"click",m=>{this._openerService.open(a.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));let h=me(u,ws("span"));h.innerText=a.value;let p=me(r,d);p.style.opacity="0.6",p.style.paddingLeft="6px"}else{let d=me(r,ws("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(Ui(l))for(let{message:d,resource:u,startLineNumber:h,startColumn:p}of l){let m=me(r,ws("div"));m.style.marginTop="8px";let g=me(m,ws("a"));g.innerText=`${Dr(u)}(${h}, ${p}): `,g.style.cursor="pointer",t.add(Rt(g,"click",S=>{S.stopPropagation(),S.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:p}}}).catch(at)}));let b=me(m,ws("span"));b.innerText=d,this._editor.applyFontInfo(b)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Dn.Error||t.marker.severity===Dn.Warning||t.marker.severity===Dn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:ah.ID,run:()=>{var r;e.hide(),(r=vc.get(this._editor))===null||r===void 0||r.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(88)){let r=e.statusBar.append(ws("div"));this.recentMarkerCodeActionsInfo&&(Rw.makeKey(this.recentMarkerCodeActionsInfo.marker)===Rw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?oe.None:n.add(wl(()=>r.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));r.textContent||(r.textContent=String.fromCharCode(160));let s=this.getCodeActions(t.marker);n.add(Ft(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=v("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;n.add(Ft(()=>{l||a.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:Yf,run:c=>{l=!0;let d=$a.get(this._editor),u=wn(c);e.hide(),d==null||d.showCodeActions(_Y,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},at)}}getCodeActions(e){return Vt(t=>c0(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new P(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),_Y,wa.None,t))}};gC=j0e([QT(1,qP),QT(2,Qi),QT(3,be)],gC)});var yY=M(()=>{});var CY=M(()=>{yY()});var V0e,vC,hr,ZT,ek,tk,ik,nk,rk,ok,sk,ak,lk,ck,_C=M(()=>{gl();Ce();Ze();qe();jt();os();iC();qT();gY();De();Et();cs();_r();ar();lc();mC();bY();n2();Gn();CY();V0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},vC=function(i,e){return function(t,n){e(t,n,i)}},hr=class SY{static get(e){return e.getContribution(SY.ID)}constructor(e,t,n,r,o){this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=r,this._keybindingService=o,this._toUnhook=new ne,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){let e=()=>this._hideWidgets(),t=this._editor.getOption(58);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;let t=e.target;if(t.type===9&&t.detail===Ad.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===lh.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;let n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(n)||this._hideWidgets()}_onEditorMouseMove(e){var t,n,r,o,s,a,l,c;let d=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&d.type===9&&d.detail===Ad.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((o=(r=e.event.browserEvent.view)===null||r===void 0?void 0:r.getSelection())===null||o===void 0)&&o.isCollapsed)||!this._isHoverSticky&&d.type===9&&d.detail===Ad.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible())||this._isHoverSticky&&d.type===12&&d.detail===lh.ID||this._isHoverSticky&&(!((a=this._contentWidget)===null||a===void 0)&&a.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(l=this._glyphWidget)===null||l===void 0||l.hide();return}if(d.type===2&&d.position){(c=this._contentWidget)===null||c===void 0||c.hide(),this._glyphWidget||(this._glyphWidget=new lh(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(d.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;let n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),r=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible());e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!r&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible())||Qs.dropDownVisible||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Tg,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,n,r){this._getOrCreateContentWidget().startShowingAtRange(e,t,n,r)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}escape(){var e;(e=this._contentWidget)===null||e===void 0||e.escape()}isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible()}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};hr.ID="editor.contrib.hover";hr=V0e([vC(1,He),vC(2,Qi),vC(3,Xi),vC(4,Bt)],hr);ZT=class extends se{constructor(){super({id:"editor.action.showHover",label:v({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;let r=hr.get(t);if(!r)return;let o=t.getPosition(),s=new P(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(n!=null&&n.focus);r.isHoverVisible()?r.focus():r.showContentHover(s,1,1,a)}},ek=class extends se{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let n=hr.get(t);if(!n)return;let r=t.getPosition();if(!r)return;let o=new P(r.lineNumber,r.column,r.lineNumber,r.column),s=Id.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{n.showContentHover(o,1,1,!0)})}},tk=class extends se{constructor(){super({id:"editor.action.scrollUpHover",label:v({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:16,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollUp()}},ik=class extends se{constructor(){super({id:"editor.action.scrollDownHover",label:v({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:18,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollDown()}},nk=class extends se{constructor(){super({id:"editor.action.scrollLeftHover",label:v({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:15,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollLeft()}},rk=class extends se{constructor(){super({id:"editor.action.scrollRightHover",label:v({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:17,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollRight()}},ok=class extends se{constructor(){super({id:"editor.action.pageUpHover",label:v({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){let n=hr.get(t);n&&n.pageUp()}},sk=class extends se{constructor(){super({id:"editor.action.pageDownHover",label:v({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){let n=hr.get(t);n&&n.pageDown()}},ak=class extends se{constructor(){super({id:"editor.action.goToTopHover",label:v({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){let n=hr.get(t);n&&n.goToTop()}},lk=class extends se{constructor(){super({id:"editor.action.goToBottomHover",label:v({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){let n=hr.get(t);n&&n.goToBottom()}},ck=class extends se{constructor(){super({id:"editor.action.escapeFocusHover",label:v({key:"escapeFocusHover",comment:["Action that allows to escape from the hover widget with the escape command when the hover widget is focused."]},"Escape Focus Hover"),alias:"Escape Focus Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:9,weight:100}})}run(e,t){let n=hr.get(t);n&&n.escape()}};Ae(hr.ID,hr,2);X(ZT);X(ek);X(tk);X(ik);X(nk);X(rk);X(ok);X(sk);X(ak);X(lk);X(ck);Wo.register(Mp);Wo.register(gC);df((i,e)=>{let t=i.getColor(FO);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))})});function Tr(i,e){let t=0;for(let n=0;n{});function xY(i,e,t,n,r){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let o=e.getLanguageConfiguration(i.getLanguageId()).indentationRules;if(!o)return[];for(n=Math.min(n,i.getLineCount());t<=n&&o.unIndentedLinePattern;){let b=i.getLineContent(t);if(!o.unIndentedLinePattern.test(b))break;t++}if(t>n-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(b,S)=>(S=S||1,Uc.shiftIndent(b,b.length+S,s,a,l)),d=(b,S)=>(S=S||1,Uc.unshiftIndent(b,b.length+S,s,a,l)),u=[],h,p=i.getLineContent(t),m=p;if(r!=null){h=r;let b=zi(p);m=h+p.substring(b.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(m)&&(h=d(h),m=h+p.substring(b.length)),p!==m&&u.push(Kt.replaceMove(new je(t,1,t,b.length+1),hw(h,a,l)))}else h=zi(p);let g=h;o.increaseIndentPattern&&o.increaseIndentPattern.test(m)?(g=c(g),h=c(h)):o.indentNextLinePattern&&o.indentNextLinePattern.test(m)&&(g=c(g)),t++;for(let b=t;b<=n;b++){let S=i.getLineContent(b),k=zi(S),N=g+S.substring(k.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(N)&&(g=d(g),h=d(h)),k!==g&&u.push(Kt.replaceMove(new je(b,1,b,k.length+1),hw(g,a,l))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(S))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(N)?(h=c(h),g=h):o.indentNextLinePattern&&o.indentNextLinePattern.test(N)?g=c(g):g=h)}return u}function EY(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let r="";for(let s=0;s{Ce();Si();Ze();_w();xa();qe();Mn();jt();Kn();ts();dk();De();Ll();rre();qR();K0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},q0e=function(i,e){return function(t,n){e(t,n,i)}};bC=class i extends se{constructor(){super({id:i.ID,label:v("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:O.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new pk(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}};bC.ID="editor.action.indentationToSpaces";yC=class i extends se{constructor(){super({id:i.ID,label:v("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:O.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new mk(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}};yC.ID="editor.action.indentationToTabs";Ag=class extends se{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let n=e.get(lr),r=e.get(Ci),o=t.getModel();if(!o)return;let s=r.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),a=o.getOptions(),l=[1,2,3,4,5,6,7,8].map(d=>({id:d.toString(),label:d.toString(),description:d===s.tabSize&&d===a.tabSize?v("configuredTabSize","Configured Tab Size"):d===s.tabSize?v("defaultTabSize","Default Tab Size"):d===a.tabSize?v("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:v({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[c]}).then(d=>{if(d&&o&&!o.isDisposed()){let u=parseInt(d.label,10);this.displaySizeOnly?o.updateOptions({tabSize:u}):o.updateOptions({tabSize:u,indentSize:u,insertSpaces:this.insertSpaces})}})},50)}},CC=class i extends Ag{constructor(){super(!1,!1,{id:i.ID,label:v("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}};CC.ID="editor.action.indentUsingTabs";SC=class i extends Ag{constructor(){super(!0,!1,{id:i.ID,label:v("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}};SC.ID="editor.action.indentUsingSpaces";wC=class i extends Ag{constructor(){super(!0,!0,{id:i.ID,label:v("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}};wC.ID="editor.action.changeTabDisplaySize";xC=class i extends se{constructor(){super({id:i.ID,label:v("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){let n=e.get(Ci),r=t.getModel();if(!r)return;let o=n.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget);r.detectIndentation(o.insertSpaces,o.tabSize)}};xC.ID="editor.action.detectIndentation";uk=class extends se{constructor(){super({id:"editor.action.reindentlines",label:v("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:O.writable})}run(e,t){let n=e.get(Tt),r=t.getModel();if(!r)return;let o=xY(r,n,1,r.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},hk=class extends se{constructor(){super({id:"editor.action.reindentselectedlines",label:v("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:O.writable})}run(e,t){let n=e.get(Tt),r=t.getModel();if(!r)return;let o=t.getSelections();if(o===null)return;let s=[];for(let a of o){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;let d=xY(r,n,l,c);s.push(...d)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},fk=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(let r of this._edits)t.addEditOperation(P.lift(r.range),r.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},Lg=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new ne,this.callOnModel=new ne,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(10)<4||this.editor.getOption(53))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;let n=this.editor.getModel();if(!n||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let r=this.editor.getOption(10),{tabSize:o,indentSize:s,insertSpaces:a}=n.getOptions(),l=[],c={shiftIndent:p=>Uc.shiftIndent(p,p.length+1,o,s,a),unshiftIndent:p=>Uc.unshiftIndent(p,p.length+1,o,s,a)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(n,d)){d++;continue}break}if(d>e.endLineNumber)return;let u=n.getLineContent(d);if(!/\S/.test(u.substring(0,e.startColumn-1))){let p=iu(r,n,n.getLanguageId(),d,c,this._languageConfigurationService);if(p!==null){let m=zi(u),g=Tr(p,o),b=Tr(m,o);if(g!==b){let S=ch(g,o,a);l.push({range:new P(d,1,d,m.length+1),text:S}),u=S+u.substr(m.length)}else{let S=D_(n,d,this._languageConfigurationService);if(S===0||S===8)return}}}let h=d;for(;dn.tokenization.getLineTokens(g),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(g,b)=>n.getLanguageIdAtPosition(g,b)},getLineContent:g=>g===h?u:n.getLineContent(g)},n.getLanguageId(),d+1,c,this._languageConfigurationService);if(m!==null){let g=Tr(m,o),b=Tr(zi(n.getLineContent(d+1)),o);if(g!==b){let S=g-b;for(let k=d+1;k<=e.endLineNumber;k++){let N=n.getLineContent(k),A=zi(N),K=Tr(A,o)+S,W=ch(K,o,a);W!==A&&l.push({range:new P(k,1,k,A.length+1),text:W})}}}}if(l.length>0){this.editor.pushUndoStop();let p=new fk(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",p),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;let r=e.tokenization.getLineTokens(t);if(r.getCount()>0){let o=r.findTokenIndexAtOffset(n);if(o>=0&&r.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Lg.ID="editor.contrib.autoIndentOnPaste";Lg=K0e([q0e(1,Tt)],Lg);pk=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),EY(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},mk=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),EY(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};Ae(Lg.ID,Lg,2);X(bC);X(yC);X(CC);X(SC);X(wC);X(xC);X(uk);X(hk)});function TY(i){return ht.from({scheme:Ao.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var EC,Mg,vk,Dg,_k=M(()=>{At();Ce();ri();qe();Am();Sn();EC=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Mg=class{constructor(e,t){this.range=e,this.direction=t}},vk=class i{constructor(e,t,n){this.hint=e,this.anchor=t,this.provider=n,this._isResolved=!1}with(e){let t=new i(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return EC(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,n;return EC(this,void 0,void 0,function*(){try{let r=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=r==null?void 0:r.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(n=r==null?void 0:r.label)!==null&&n!==void 0?n:this.hint.label,this._isResolved=!0}catch(r){Ut(r),this._isResolved=!1}})}},Dg=class i{static create(e,t,n,r){return EC(this,void 0,void 0,function*(){let o=[],s=e.ordered(t).reverse().map(a=>n.map(l=>EC(this,void 0,void 0,function*(){try{let c=yield a.provideInlayHints(t,l,r);c!=null&&c.hints.length&&o.push([c,a])}catch(c){Ut(c)}})));if(yield Promise.all(s.flat()),r.isCancellationRequested||t.isDisposed())throw new c_;return new i(n,o,t)})}constructor(e,t,n){this._disposables=new ne,this.ranges=e,this.provider=new Set;let r=[];for(let[o,s]of t){this._disposables.add(o),this.provider.add(s);for(let a of o.hints){let l=n.validatePosition(a.position),c="before",d=i._getRangeAtPosition(n,l),u;d.getStartPosition().isBefore(l)?(u=P.fromPositions(d.getStartPosition(),l),c="after"):(u=P.fromPositions(l,d.getEndPosition()),c="before"),r.push(new vk(a,new Mg(u,c),s))}}this.items=r.sort((o,s)=>Se.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let n=t.lineNumber,r=e.getWordAtPosition(t);if(r)return new P(n,r.startColumn,n,r.endColumn);e.tokenization.tokenizeIfCheap(n);let o=e.tokenization.getLineTokens(n),s=t.column-1,a=o.findTokenIndexAtOffset(s),l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&aIR(m)?m.command.id:Sd()));for(let m of Ss.all())h.has(m.desc.id)&&u.push(new is(m.desc.id,da.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>Ng(this,void 0,void 0,function*(){let g=yield o.createModelReference(d.uri);try{let b=new oh(g.object.textEditorModel,P.getStartPosition(d.range)),S=n.item.anchor.range;yield l.invokeFunction(m.runEditorCommand.bind(m),e,b,S)}finally{g.dispose()}})));if(n.part.command){let{command:m}=n.part;u.push(new ks),u.push(new is(m.id,m.title,void 0,!0,()=>Ng(this,void 0,void 0,function*(){var g;try{yield a.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(b){c.notify({severity:pf.Error,source:n.item.provider.displayName,message:b})}})))}let p=e.getOption(123);s.showContextMenu({domForShadowRoot:p&&(r=e.getDomNode())!==null&&r!==void 0?r:void 0,getAnchor:()=>{let m=wn(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function TC(i,e,t,n){return Ng(this,void 0,void 0,function*(){let o=yield i.get(xn).createModelReference(n.uri);yield t.invokeWithinContext(s=>Ng(this,void 0,void 0,function*(){let a=e.hasSideBySideModifier,l=s.get(Ke),c=Pn.inPeekEditor.getValue(l),d=!a&&t.getOption(85)&&!c;return new gc({openToSide:a,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new oh(o.object.textEditorModel,P.getStartPosition(n.range)),P.lift(n.range))})),o.dispose()})}var Ng,bk=M(()=>{Ht();Oc();gi();q0();qe();ca();Sg();th();Yi();Bi();ft();Tl();Et();Ro();Ng=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}});function $0e(i){let e="\xA0";return i.replace(/[ \t]/g,e)}var G0e,Dp,Np,yk,IY,Rp,Ck,_c,xk=M(()=>{Ht();oi();Dt();gi();At();Ce();tf();Li();Sn();GP();db();Qm();xa();qe();br();Vc();qn();Ns();xt();ca();xg();_k();bk();Bi();bl();Et();Ro();_r();ar();G0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Dp=function(i,e){return function(t,n){e(t,n,i)}},Np=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},yk=class i{constructor(){this._entries=new fa(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let n=i._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},IY=rr("IInlayHintsCache");sr(IY,yk,1);Rp=class{constructor(e,t){this.item=e,this.index=t}get part(){let e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}},Ck=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},_c=class Sk{static get(e){var t;return(t=e.getContribution(Sk.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,n,r,o,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=r,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new ne,this._sessionDisposables=new ne,this._decorationsMetadata=new Map,this._ruleFactory=new Sb(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(136)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(136);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;let n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(Ft(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let r,o=new Set,s=new ti(()=>Np(this,void 0,void 0,function*(){let a=Date.now();r==null||r.dispose(!0),r=new Ni;let l=t.onWillDispose(()=>r==null?void 0:r.cancel());try{let c=r.token,d=yield Dg.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(s.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){d.dispose();return}for(let u of d.provider)typeof u.onDidChangeInlayHints=="function"&&!o.has(u)&&(o.add(u),this._sessionDisposables.add(u.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(d),this._updateHintsDecorators(d.ranges,d.items),this._cacheHintsForFastRestore(t)}catch(c){at(c)}finally{r.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(s),this._sessionDisposables.add(Ft(()=>r==null?void 0:r.dispose(!0))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!s.isScheduled())&&s.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{let l=Math.max(s.delay,1250);s.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(pR.getInstance().event(c=>{if(!this._editor.hasModel())return;let d=c.altKey&&c.ctrlKey&&!(c.shiftKey||c.metaKey)?l:a;if(d!==this._activeRenderMode){this._activeRenderMode=d;let u=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(u);this._updateHintsDecorators([u.getFullModelRange()],h),s.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>s.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){let e=new ne,t=e.add(new al(this._editor)),n=new ne;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(r=>{let[o]=r,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){n.clear();return}let l=new Ni;n.add(Ft(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new Ck(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,d=new P(c,1,c,a.getLineMaxColumn(c)),u=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],u),n.add(Ft(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],u)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(r=>Np(this,void 0,void 0,function*(){let o=this._getInlayHintLabelPart(r);if(o){let s=o.part;s.location?this._instaService.invokeFunction(TC,r,this._editor,s.location):JO.is(s.command)&&(yield this._invokeCommand(s.command,o.item))}}))),e}_getInlineHintsForRange(e){let t=new Set;for(let n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>Np(this,void 0,void 0,function*(){if(t.event.detail!==2)return;let n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),yield n.item.resolve(et.None),Ui(n.item.hint.textEdits))){let r=n.item.hint.textEdits.map(o=>Kt.replace(P.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",r),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>Np(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;let t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(kY,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;let n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(n instanceof ff&&(n==null?void 0:n.attachedData)instanceof Rp)return n.attachedData}_invokeCommand(e,t){var n;return Np(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(n=e.arguments)!==null&&n!==void 0?n:[])}catch(r){this._notificationService.notify({severity:pf.Error,source:t.provider.displayName,message:r})}})}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[n,r]of this._decorationsMetadata){if(t.has(r.item))continue;let o=e.getDecorationRange(n);if(o){let s=new Mg(o,r.item.anchor.direction),a=r.item.with({anchor:s});t.set(r.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=[];for(let o of n.sort(P.compareRangesUsingStarts)){let s=t.validateRange(new P(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));r.length===0||!P.areIntersectingOrTouching(r[r.length-1],s)?r.push(s):r[r.length-1]=P.plusRange(r[r.length-1],s)}return r}_updateHintsDecorators(e,t){var n,r;let o=[],s=(g,b,S,k,N)=>{let A={content:S,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:b.className,cursorStops:k,attachedData:N};o.push({item:g,classNameRef:b,decoration:{range:g.anchor.range,options:{description:"InlayHint",showIfCollapsed:g.anchor.range.isEmpty(),collapseOnReplaceEdit:!g.anchor.range.isEmpty(),stickiness:0,[g.anchor.direction]:this._activeRenderMode===0?A:void 0}}})},a=(g,b)=>{let S=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(g,S,"\u200A",b?ru.Right:ru.None)},{fontSize:l,fontFamily:c,padding:d,isUniform:u}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,c);for(let g of t){g.hint.paddingLeft&&a(g,!1);let b=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let S=0;SSk._MAX_DECORATORS)break}let p=[];for(let g of e)for(let{id:b}of(r=this._editor.getDecorationsInRange(g))!==null&&r!==void 0?r:[]){let S=this._decorationsMetadata.get(b);S&&(p.push(b),S.classNameRef.dispose(),this._decorationsMetadata.delete(b))}let m=Ea.capture(this._editor);this._editor.changeDecorations(g=>{let b=g.deltaDecorations(p,o.map(S=>S.decoration));for(let S=0;Sn)&&(o=n);let s=e.fontFamily||r;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===r&&o===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};_c.ID="editor.contrib.InlayHints";_c._MAX_DECORATORS=1500;_c=G0e([Dp(1,be),Dp(2,an),Dp(3,IY),Dp(4,ui),Dp(5,xi),Dp(6,He)],_c);St.registerCommand("_executeInlayHintProvider",(i,...e)=>Np(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(ht.isUri(t)),Lt(P.isIRange(n));let{inlayHintsProvider:r}=i.get(be),o=yield i.get(xn).createModelReference(t);try{let s=yield Dg.create(r,o.object.textEditorModel,[P.lift(n)],et.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}}))});var Y0e,Rg,AY,X0e,kC,IC,LY=M(()=>{Dt();Sl();ri();qn();lc();os();ca();YT();mC();xk();jn();cs();xt();De();nr();_k();oi();Y0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Rg=function(i,e){return function(t,n){e(t,n,i)}},AY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},X0e=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},kC=class extends yd{constructor(e,t,n,r){super(10,t,e.item.anchor.range,n,r,!0),this.part=e}},IC=class extends Mp{constructor(e,t,n,r,o,s){super(e,t,n,r,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!_c.get(this._editor)||e.target.type!==6)return null;let r=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return r instanceof ff&&r.attachedData instanceof Rp?new kC(r.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof kC?new Nr(r=>AY(this,void 0,void 0,function*(){var o,s,a,l;let{part:c}=e;if(yield c.item.resolve(n),n.isCancellationRequested)return;let d;typeof c.item.hint.tooltip=="string"?d=new sn().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&r.emitOne(new no(this,e.range,[d],!1,0)),Ui(c.item.hint.textEdits)&&r.emitOne(new no(this,e.range,[new sn().appendText(v("hint.dbl","Double-click to insert"))],!1,10001));let u;if(typeof c.part.tooltip=="string"?u=new sn().appendText(c.part.tooltip):c.part.tooltip&&(u=c.part.tooltip),u&&r.emitOne(new no(this,e.range,[u],!1,1)),c.part.location||c.part.command){let b,k=this._editor.getOption(75)==="altKey"?zn?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):zn?v("links.navigate.kb.alt.mac","option + click"):v("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?b=new sn().appendText(v("hint.defAndCommand","Go to Definition ({0}), right click for more",k)):c.part.location?b=new sn().appendText(v("hint.def","Go to Definition ({0})",k)):c.part.command&&(b=new sn(`[${v("hint.cmd","Execute Command")}](${TY(c.part.command)} "${c.part.command.title}") (${k})`,{isTrusted:!0})),b&&r.emitOne(new no(this,e.range,[b],!1,1e4))}let h=yield this._resolveInlayHintLabelPartHover(c,n);try{for(var p=!0,m=X0e(h),g;g=yield m.next(),o=g.done,!o;p=!0){l=g.value,p=!1;let b=l;r.emitOne(b)}}catch(b){s={error:b}}finally{try{!p&&!o&&(a=m.return)&&(yield a.call(m))}finally{if(s)throw s.error}}})):Nr.EMPTY}_resolveInlayHintLabelPartHover(e,t){return AY(this,void 0,void 0,function*(){if(!e.part.location)return Nr.EMPTY;let{uri:n,range:r}=e.part.location,o=yield this._resolverService.createModelReference(n);try{let s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?Ig(this._languageFeaturesService.hoverProvider,s,new Se(r.startLineNumber,r.startColumn),t).filter(a=>!Wc(a.hover.contents)).map(a=>new no(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Nr.EMPTY}finally{o.dispose()}})}};IC=Y0e([Rg(1,Xi),Rg(2,Qi),Rg(3,Mt),Rg(4,xn),Rg(5,be)],IC)});var Ek=M(()=>{Ze();lc();xk();LY();Ae(_c.ID,_c,1);Wo.register(IC)});var AC,MY=M(()=>{Mn();AC=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new je(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new je(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var DY=M(()=>{});var NY=M(()=>{DY()});var Ak=gt(Og=>{Dt();At();au();Ze();qe();Mn();jt();qn();hb();De();MY();NY();var Q0e=Og&&Og.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},J0e=Og&&Og.__param||function(i,e){return function(t,n){e(t,n,i)}},Ld=class Tk{static get(e){return e.getContribution(Tk.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();let r=this.editor.getSelection(),o=this.editor.getModel();if(!o||!r)return;let s=r;if(s.startLineNumber!==s.endLineNumber)return;let a=new J_(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Vt(c=>this.editorWorkerService.navigateValueSet(l,s,t)),this.currentRequest.then(c=>{var d;if(!c||!c.range||!c.value||!a.validate(this.editor))return;let u=P.lift(c.range),h=c.range,p=c.value.length-(s.endColumn-s.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+c.value.length},p>1&&(s=new je(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+p-1));let m=new AC(u,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:Tk.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=of(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(at)}).catch(at)):Promise.resolve(void 0)}};Ld.ID="editor.contrib.inPlaceReplaceController";Ld.DECORATION=ct.register({description:"in-place-replace",className:"valueSetReplacement"});Ld=Q0e([J0e(1,Ml)],Ld);var kk=class extends se{constructor(){super({id:"editor.action.inPlaceReplace.up",label:v("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=Ld.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},Ik=class extends se{constructor(){super({id:"editor.action.inPlaceReplace.down",label:v("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=Ld.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Ae(Ld.ID,Ld,4);X(kk);X(Ik)});var Lk,Mk=M(()=>{Ze();RR();jt();De();Lk=class extends se{constructor(){super({id:"expandLineSelection",label:v("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:O.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;let r=t._getViewModel();r.model.pushStackElement(),r.setCursorStates(n.source,3,Rm.expandLineSelection(r,r.getCursorStates())),r.revealPrimaryCursor(n.source,!0)}};X(Lk)});function Z0e(i,e){e.sort((s,a)=>s.lineNumber===a.lineNumber?s.column-a.column:s.lineNumber-a.lineNumber);for(let s=e.length-2;s>=0;s--)e[s].lineNumber===e[s+1].lineNumber&&e.splice(s,1);let t=[],n=0,r=0,o=e.length;for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineContent(s),c=l.length+1,d=0;if(r{Si();xa();qe();LC=class{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let n=Z0e(e,this._cursors);for(let r=0,o=n.length;r{qe();Mn();Pg=class{constructor(e,t,n){this._selection=e,this._isCopyingDown=t,this._noop=n||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let n=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,n.startLineNumber1e5?`${o.substr(0,1e5)}\u2026`:o;this._type.textContent=a,this._type.title=a,gr(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else mr(this._type),this._type.title="",Wn(this._type),this.domNode.classList.add("no-type");if(mr(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),mr(this._docs);let a=this._markdownRenderer.render(s);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){let n=new Di(e,t);Di.equals(n,this._size)||(this._size=n,lR(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};a2=i0e([n0e(1,He)],a2);l2=class{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new ne,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new mp,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,r,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(n&&r){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=r.width-a.dimension.width,l=!0),a.north&&(o=r.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:n.top+o,left:n.left+s})}a.done&&(n=void 0,r=void 0,o=0,s=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var n;let r=e.getBoundingClientRect();this._anchorBox=r,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(n=this._userSize)!==null&&n!==void 0?n:this.widget.size,t)}_placeAtAnchor(e,t,n){var r;let o=__(document.body),s=this.widget.getLayoutInfo(),a=new Di(220,2*s.lineHeight),l=e.top,c=function(){let N=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),A=-s.borderWidth+e.left+e.width,H=new Di(N,o.height-e.top-s.borderHeight-s.verticalPadding),K=H.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:A,fit:N-t.width,maxSizeTop:H,maxSizeBottom:K,minSize:a.with(Math.min(N,a.width))}}(),d=function(){let N=e.left-s.borderWidth-s.horizontalPadding,A=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),H=new Di(N,o.height-e.top-s.borderHeight-s.verticalPadding),K=H.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:A,fit:N-t.width,maxSizeTop:H,maxSizeBottom:K,minSize:a.with(Math.min(N,a.width))}}(),u=function(){let N=e.left,A=-s.borderWidth+e.top+e.height,H=new Di(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:A,left:N,fit:H.height-t.height,maxSizeBottom:H,maxSizeTop:H,minSize:a.with(H.width)}}(),h=[c,d,u],p=(r=h.find(N=>N.fit>=0))!==null&&r!==void 0?r:h.sort((N,A)=>A.fit-N.fit)[0],m=e.top+e.height-s.borderHeight,g,b=t.height,S=Math.max(p.maxSizeTop.height,p.maxSizeBottom.height);b>S&&(b=S);let k;n?b<=p.maxSizeTop.height?(g=!0,k=p.maxSizeTop):(g=!1,k=p.maxSizeBottom):b<=p.maxSizeBottom.height?(g=!1,k=p.maxSizeBottom):(g=!0,k=p.maxSizeTop),this._applyTopLeft({left:p.left,top:g?p.top:m-b}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,p===c,g,p!==c),this._resizable.minSize=p.minSize,this._resizable.maxSize=k,this._resizable.layout(b,Math.min(k.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}});var Zs,H7=M(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(Zs||(Zs={}))});function sg(i,e,t,n){let r=n===Zs.ROOT_FOLDER?["rootfolder-icon"]:n===Zs.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===Lo.data)o=Om.parseMetaData(t).get(Om.META_DATA_LABEL);else{let s=t.path.match(r0e);s?(o=c2(s[2].toLowerCase()),s[1]&&r.push(`${c2(s[1].toLowerCase())}-name-dir-icon`)):o=c2(t.authority.toLowerCase())}if(n===Zs.FOLDER)r.push(`${o}-name-folder-icon`);else{if(o){if(r.push(`${o}-name-file-icon`),r.push("name-file-icon"),o.length<=255){let a=o.split(".");for(let l=1;l{Im();lo();gw();H7();r0e=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function U7(i){return`suggest-aria-id:${i}`}function z7(i){return i.replace(/\r\n|\r|\n/g,"")}var s0e,B7,ag,a0e,l0e,u2,VG=M(()=>{Ht();XP();or();qr();qt();Cl();Ce();Sn();br();jG();is();ss();De();H7();Al();ar();F7();s0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},B7=function(i,e){return function(t,n){e(t,n,i)}};a0e=Ti("suggest-more-info",lt.chevronRight,v("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),l0e=new(ag=class d2{extract(e,t){if(e.textLabel.match(d2._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(d2._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){let n=d2._regexRelaxed.exec(e.completion.documentation);if(n&&(n.index===0||n.index+n[0].length===e.completion.documentation.length))return t[0]=n[0],!0}return!1}},ag._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,ag._regexStrict=new RegExp(`^${ag._regexRelaxed.source}$`,"i"),ag),u2=class{constructor(e,t,n,r){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=r,this._onDidToggleDetails=new $e,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new ne,n=e;n.classList.add("show-file-icons");let r=me(e,fe(".icon")),o=me(r,fe("span.colorspan")),s=me(e,fe(".contents")),a=me(s,fe(".main")),l=me(a,fe(".icon-label.codicon")),c=me(a,fe("span.left")),d=me(a,fe("span.right")),u=new Sb(c,{supportHighlights:!0,supportIcons:!0});t.add(u);let h=me(c,fe("span.signature-label")),p=me(c,fe("span.qualifier-label")),m=me(d,fe("span.details-label")),g=me(d,fe("span.readMore"+mt.asCSSSelector(a0e)));g.title=v("readMore","Read More");let b=()=>{let S=this._editor.getOptions(),k=S.get(48),N=k.getMassagedFontFamily(),A=k.fontFeatureSettings,H=S.get(115)||k.fontSize,K=S.get(116)||k.lineHeight,W=k.fontWeight,re=k.letterSpacing,ae=`${H}px`,Ne=`${K}px`,he=`${re}px`;n.style.fontSize=ae,n.style.fontWeight=W,n.style.letterSpacing=he,a.style.fontFamily=N,a.style.fontFeatureSettings=A,a.style.lineHeight=Ne,r.style.height=Ne,r.style.width=Ne,g.style.height=Ne,g.style.width=Ne};return b(),t.add(this._editor.onDidChangeConfiguration(S=>{(S.hasChanged(48)||S.hasChanged(115)||S.hasChanged(116))&&b()})),{root:n,left:c,right:d,icon:r,colorspan:o,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:p,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,n){let{completion:r}=e;n.root.id=U7(t),n.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:ru(e.score)},s=[];if(r.kind===19&&l0e.extract(e,s))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=s[0];else if(r.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";let a=sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:e.textLabel}),Zs.FILE),l=sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:r.detail}),Zs.FILE);o.extraClasses=a.length>l.length?a:l}else r.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",o.extraClasses=[sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:e.textLabel}),Zs.FOLDER),sg(this._modelService,this._languageService,ht.from({scheme:"fake",path:r.detail}),Zs.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...mt.asClassNameArray(qm.toIcon(r.kind))));r.tags&&r.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,o),typeof r.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=z7(r.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=z7(r.label.detail||""),n.detailsLabel.textContent=z7(r.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(114).showInlineDetails?gr(n.detailsLabel):Wn(n.detailsLabel),og(e)?(n.right.classList.add("can-expand-details"),gr(n.readMore),n.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},n.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Wn(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};u2=s0e([B7(1,Si),B7(2,Xi),B7(3,pn)],u2)});var c0e,h2,d0e,f2,u0e,W7,gp,V7,KG=M(()=>{Ht();d0();gP();Dt();At();qt();Ce();Ore();wi();OG();pp();FG();W4();De();ft();Et();cu();_r();xw();ar();P7();Qu();F7();VG();nb();c0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},h2=function(i,e){return function(t,n){e(t,n,i)}},d0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Oe("editorSuggestWidget.background",{dark:xl,light:xl,hcDark:xl,hcLight:xl},v("editorSuggestWidgetBackground","Background color of the suggest widget."));Oe("editorSuggestWidget.border",{dark:su,light:su,hcDark:su,hcLight:su},v("editorSuggestWidgetBorder","Border color of the suggest widget."));f2=Oe("editorSuggestWidget.foreground",{dark:_a,light:_a,hcDark:_a,hcLight:_a},v("editorSuggestWidgetForeground","Foreground color of the suggest widget."));Oe("editorSuggestWidget.selectedForeground",{dark:Um,light:Um,hcDark:Um,hcLight:Um},v("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));Oe("editorSuggestWidget.selectedIconForeground",{dark:Wm,light:Wm,hcDark:Wm,hcLight:Wm},v("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));u0e=Oe("editorSuggestWidget.selectedBackground",{dark:jm,light:jm,hcDark:jm,hcLight:jm},v("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));Oe("editorSuggestWidget.highlightForeground",{dark:ba,light:ba,hcDark:ba,hcLight:ba},v("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));Oe("editorSuggestWidget.focusHighlightForeground",{dark:zm,light:zm,hcDark:zm,hcLight:zm},v("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));Oe("editorSuggestWidgetStatus.foreground",{dark:Or(f2,.5),light:Or(f2,.5),hcDark:Or(f2,.5),hcLight:Or(f2,.5)},v("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));W7=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Ko}`}restore(){var e;let t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{let n=JSON.parse(t);if(Di.is(n))return Di.lift(n)}catch(n){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},gp=class j7{constructor(e,t,n,r,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Bi,this._pendingShowDetails=new Bi,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new as,this._disposables=new ne,this._onDidSelect=new QS,this._onDidFocus=new QS,this._onDidHide=new $e,this._onDidShow=new $e,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new $e,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new mp,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new V7(this,e),this._persistedSize=new W7(t,e);class s{constructor(p,m,g=!1,b=!1){this.persistedSize=p,this.currentSize=m,this.persistHeight=g,this.persistWidth=b}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new s(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var p,m,g,b;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){let{itemHeight:S,defaultSize:k}=this.getLayoutInfo(),N=Math.round(S/2),{width:A,height:H}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-H)<=N)&&(H=(m=(p=a.persistedSize)===null||p===void 0?void 0:p.height)!==null&&m!==void 0?m:k.height),(!a.persistWidth||Math.abs(a.currentSize.width-A)<=N)&&(A=(b=(g=a.persistedSize)===null||g===void 0?void 0:g.width)!==null&&b!==void 0?b:k.width),this._persistedSize.store(new Di(A,H))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=me(this.element.domNode,fe(".message")),this._listElement=me(this.element.domNode,fe(".tree"));let l=o.createInstance(a2,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new l2(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(114).showIcons);c();let d=o.createInstance(u2,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new tb("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>v("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let p=h.textLabel;if(typeof h.completion.label!="string"){let{detail:S,description:k}=h.completion.label;S&&k?p=v("label.full","{0}{1}, {2}",p,S,k):S?p=v("label.detail","{0}{1}",p,S):k&&(p=v("label.desc","{0}, {1}",p,k))}if(!h.isResolved||!this._isDetailsVisible())return p;let{documentation:m,detail:g}=h.completion,b=Do("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return v("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",p,b)}}}),this._list.style(CP({listInactiveFocusBackground:u0e,listInactiveFocusOutline:va})),this._status=o.createInstance(s2,this.element.domNode,nl);let u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(114).showStatusBar);u(),this._disposables.add(r.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(r.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(114)&&(u(),c())})),this._ctxSuggestWidgetVisible=it.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=it.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=it.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=it.HasFocusedSuggestion.bindTo(n),this._disposables.add(ts(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element=="undefined"||typeof e.index=="undefined"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){let n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=au(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);let n=e.elements[0],r=e.indexes[0];n!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(r),this._currentSuggestionDetails=Vt(o=>d0e(this,void 0,void 0,function*(){let s=wl(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=o.onCancellationRequested(()=>s.dispose()),l=yield n.resolve(o);return s.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{r>=this._list.length||n!==this._list.element(r)||(this._ignoreFocusEvents=!0,this._list.splice(r,1,[n]),this._list.setFocus([r]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:U7(r)}))}).catch(at)),this._onDidFocus.fire({item:n,index:r,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Wn(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=j7.LOADING_MESSAGE,Wn(this._listElement,this._status.element),gr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=j7.NO_SUGGESTIONS_MESSAGE,Wn(this._listElement,this._status.element),gr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Wn(this._messageElement),gr(this._listElement,this._status.element),this._show();break;case 4:Wn(this._messageElement),gr(this._listElement,this._status.element),this._show();break;case 5:Wn(this._messageElement),gr(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=wl(()=>this._setState(1),t)))}showSuggestions(e,t,n,r,o){var s,a;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(a=this._currentSuggestionDetails)===null||a===void 0||a.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}let l=this._completionModel.items.length,c=l===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(l>1),c){this._setState(r?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=tw(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(og(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=tw(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();let t=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightc&&(l=c);let d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:l,u=s.statusBarHeight+this._list.contentHeight+s.borderHeight,h=s.itemHeight+s.statusBarHeight,p=wn(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=p.top+m.top+m.height,b=Math.min(o.height-g-s.verticalPadding,u),S=p.top+m.top-s.verticalPadding,k=Math.min(S,u),N=Math.min(Math.max(k,b)+s.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),aN&&(a=N);let A=150;a>b||this._forceRenderingAbove&&S>A?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),N=k):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),N=b),this.element.preferredSize=new Di(d,s.defaultSize.height),this.element.maxSize=new Di(c,N),this.element.minSize=new Di(220,h),this._cappedHeight=a===u?{wanted:(r=(n=this._cappedHeight)===null||n===void 0?void 0:n.wanted)!==null&&r!==void 0?r:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){let{width:n,height:r}=this.element.maxSize;e=Math.min(n,e),t=Math.min(r,t);let{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=`${t-o}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){let e=this.editor.getOption(48),t=pP(this.editor.getOption(116)||e.lineHeight,8,1e3),n=!this.editor.getOption(114).showStatusBar||this._state===2||this._state===1?0:t,r=this._details.widget.borderWidth,o=2*r;return{itemHeight:t,statusBarHeight:n,borderWidth:r,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Di(430,n+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};gp.LOADING_MESSAGE=v("suggestWidget.loading","Loading...");gp.NO_SUGGESTIONS_MESSAGE=v("suggestWidget.noSuggestions","No suggestions.");gp=c0e([h2(1,Yr),h2(2,Ke),h2(3,pn),h2(4,He)],gp);V7=class{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){let{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:r}=this._widget.getLayoutInfo();return new Di(t+2*n+r,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}});var h0e,vp,f0e,K7,qo,q7,lg,xo,Er,p2=M(()=>{Mo();oi();Dt();gi();At();qt();ire();Ce();nr();ml();Mi();cb();Ze();xa();ri();qe();jt();cp();Xu();L7();IG();De();zi();ft();Et();C_();Qu();AG();LG();DG();NG();KG();Bc();lo();NP();h0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},vp=function(i,e){return function(t,n){e(t,n,i)}},f0e=!1,K7=class{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){let r=e.getOffsetAt(t),o=e.getPositionAt(r+1);this._marker=e.deltaDecorations([],[{range:P.fromPositions(t,o),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){let t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}},qo=class qG{static get(e){return e.getContribution(qG.ID)}constructor(e,t,n,r,o,s,a){this._memoryService=t,this._commandService=n,this._contextKeyService=r,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new Bi,this._toDispose=new ne,this._selectors=new q7(u=>u.priority),this._telemetryGate=0,this.editor=e,this.model=o.createInstance(o2,this.editor),this._selectors.register({priority:0,select:(u,h,p)=>this._memoryService.select(u,h,p)});let l=it.InsertMode.bindTo(r);l.set(e.getOption(114).insertMode),this.model.onDidTrigger(()=>l.set(e.getOption(114).insertMode)),this.widget=this._toDispose.add(new F_(()=>{let u=this._instantiationService.createInstance(gp,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(b=>this._insertSuggestion(b,0),this));let h=new r2(this.editor,u,this.model,b=>this._insertSuggestion(b,2));this._toDispose.add(h);let p=it.MakesTextEdit.bindTo(this._contextKeyService),m=it.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=it.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Ft(()=>{p.reset(),m.reset(),g.reset()})),this._toDispose.add(u.onDidFocus(({item:b})=>{let S=this.editor.getPosition(),k=b.editStart.column,N=S.column,A=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!b.completion.additionalTextEdits&&!(b.completion.insertTextRules&4)&&N-k===b.completion.insertText.length&&(A=this.editor.getModel().getValueInRange({startLineNumber:S.lineNumber,startColumn:k,endLineNumber:S.lineNumber,endColumn:N})!==b.completion.insertText),p.set(A),m.set(!Se.equals(b.editInsertEnd,b.editReplaceEnd)),g.set(!!b.provider.resolveCompletionItem||!!b.completion.documentation||b.completion.detail!==b.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(b=>{if(b.toKeyCodeChord().equals(new ew(!0,!1,!1,!1,33))||zn&&b.toKeyCodeChord().equals(new ew(!1,!1,!1,!0,33))){b.stopPropagation();return}b.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new F_(()=>this._toDispose.add(new rg(this.editor,this.model)))),this._alternatives=this._toDispose.add(new F_(()=>this._toDispose.add(new Sd(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(hp,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new K7(this.editor.getModel(),u.position)})),this._toDispose.add(this.model.onDidSuggest(u=>{if(u.triggerOptions.shy)return;let h=-1;for(let m of this._selectors.itemsOrderedByPriorityDesc)if(h=m.select(this.editor.getModel(),this.editor.getPosition(),u.completionModel.items),h!==-1)break;h===-1&&(h=0);let p=!1;if(u.triggerOptions.auto){let m=this.editor.getOption(114);m.selectionMode==="never"||m.selectionMode==="always"?p=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?p=u.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(p=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,p)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{f0e||(this.model.cancel(),this.model.clear())}));let c=it.AcceptSuggestionsOnEnter.bindTo(r),d=()=>{let u=this.editor.getOption(1);c.set(u==="on"||u==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>d())),d()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;let n=Zi.get(this.editor);if(!n)return;let r=this.editor.getModel(),o=r.getAlternativeVersionId(),{item:s}=e,a=[],l=new Ri;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));if(this._memoryService.memorize(r,this.editor.getPosition(),s),Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let u=Ea.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(h=>Kt.replaceMove(P.lift(h.range),h.text))),u.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){let u=new Ln(!0),h,p=r.onDidChangeContent(S=>{if(S.isFlush){l.cancel(),p.dispose();return}for(let k of S.changes){let N=P.getEndPosition(k.range);(!h||Se.isBefore(N,h))&&(h=N)}}),m=t;t|=2;let g=!1,b=this.editor.onWillType(()=>{b.dispose(),g=!0,m&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested||h&&s.completion.additionalTextEdits.some(k=>Se.isBefore(h,P.getStartPosition(k.range))))return!1;g&&this.editor.pushUndoStop();let S=Ea.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(k=>Kt.replaceMove(P.lift(k.range),k.text))),S.restoreRelativeVerticalPositionOfCursor(this.editor),(g||!(m&2))&&this.editor.pushUndoStop(),!0}).then(S=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",u.elapsed(),S),p.dispose(),b.dispose()}))}let{insertText:d}=s.completion;s.completion.insertTextRules&4||(d=Vo.escape(d)),this.model.cancel(),n.insert(d,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command&&(s.completion.command.id===lg.id?this.model.trigger({auto:!0,retrigger:!0}):a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(u=>{s.completion.extensionId?Ut(u):at(u)}))),t&4&&this._alternatives.value.set(e,u=>{for(l.cancel();r.canUndo();){o!==r.getAlternativeVersionId()&&r.undo(),this._insertSuggestion(u,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,r,e),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n){var r;if(this._telemetryGate++%100!==0)return;let o=e.extensionId?e.extensionId.value:((r=n.item.provider._debugDisplayName)!==null&&r!==void 0?r:"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:o,kind:e.completion.kind,basenameHash:db(Nr(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:nO(t.uri)})}getOverwriteInfo(e,t){Lt(this.editor.hasModel());let n=this.editor.getOption(114).insertMode==="replace";t&&(n=!n);let r=e.position.column-e.editStart.column,o=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,s=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:r+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(Wi(e.completion.additionalTextEdits)){let t=v("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Ni(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;let t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},r=o=>{if(o.completion.insertTextRules&4||o.completion.additionalTextEdits)return!0;let s=this.editor.getPosition(),a=o.editStart.column,l=s.column;return l-a!==o.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:s.lineNumber,startColumn:a,endLineNumber:s.lineNumber,endColumn:l})!==o.completion.insertText};li.once(this.model.onDidTrigger)(o=>{let s=[];li.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Vi(s),n()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Vi(s),a.items.length===0){n();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!r(c)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,s)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){let n=this.widget.value.getFocusedItem(),r=0;e&&(r|=4),t&&(r|=8),this._insertSuggestion(n,r)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};qo.ID="editor.contrib.suggestController";qo=h0e([vp(1,up),vp(2,ui),vp(3,Ke),vp(4,He),vp(5,zc),vp(6,Dr)],qo);q7=class{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},lg=class i extends se{constructor(){super({id:i.id,label:v("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:ce.and(O.writable,O.hasCompletionItemProvider,it.Visible.toNegated()),kbOpts:{kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){let r=qo.get(t);if(!r)return;let o;n&&typeof n=="object"&&n.auto===!0&&(o=!0),r.triggerSuggest(void 0,o,void 0)}};lg.id="editor.action.triggerSuggest";Ae(qo.ID,qo,2);X(lg);xo=100+90,Er=xi.bindToContribution(qo.get);Me(new Er({id:"acceptSelectedSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:ce.and(it.Visible,O.textInputFocus),weight:xo},{primary:3,kbExpr:ce.and(it.Visible,O.textInputFocus,it.AcceptSuggestionsOnEnter,it.MakesTextEdit),weight:xo}],menuOpts:[{menuId:nl,title:v("accept.insert","Insert"),group:"left",order:1,when:it.HasInsertAndReplaceRange.toNegated()},{menuId:nl,title:v("accept.insert","Insert"),group:"left",order:1,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("insert"))},{menuId:nl,title:v("accept.replace","Replace"),group:"left",order:1,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("replace"))}]}));Me(new Er({id:"acceptAlternativeSelectedSuggestion",precondition:ce.and(it.Visible,O.textInputFocus,it.HasFocusedSuggestion),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:nl,group:"left",order:2,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("insert")),title:v("accept.replace","Replace")},{menuId:nl,group:"left",order:2,when:ce.and(it.HasInsertAndReplaceRange,it.InsertMode.isEqualTo("replace")),title:v("accept.insert","Insert")}]}));St.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");Me(new Er({id:"hideSuggestWidget",precondition:it.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:9,secondary:[1033]}}));Me(new Er({id:"selectNextSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));Me(new Er({id:"selectNextPageSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:12,secondary:[2060]}}));Me(new Er({id:"selectLastSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));Me(new Er({id:"selectPrevSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));Me(new Er({id:"selectPrevPageSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:11,secondary:[2059]}}));Me(new Er({id:"selectFirstSuggestion",precondition:ce.and(it.Visible,ce.or(it.MultipleSuggestions,it.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));Me(new Er({id:"focusSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));Me(new Er({id:"focusAndAcceptSuggestion",precondition:ce.and(it.Visible,it.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));Me(new Er({id:"toggleSuggestionDetails",precondition:ce.and(it.Visible,it.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:nl,group:"right",order:1,when:ce.and(it.DetailsVisible,it.CanResolve),title:v("detail.more","show less")},{menuId:nl,group:"right",order:1,when:ce.and(it.DetailsVisible.toNegated(),it.CanResolve),title:v("detail.less","show more")}]}));Me(new Er({id:"toggleExplainMode",precondition:it.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));Me(new Er({id:"toggleSuggestionFocus",precondition:it.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2570,mac:{primary:778}}}));Me(new Er({id:"insertBestCompletion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),hp.AtEnd,it.Visible.toNegated(),Sd.OtherSuggestions.toNegated(),Zi.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(m_(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:xo,primary:2}}));Me(new Er({id:"insertNextSuggestion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),Sd.OtherSuggestions,it.Visible.toNegated(),Zi.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:2}}));Me(new Er({id:"insertPrevSuggestion",precondition:ce.and(O.textInputFocus,ce.equals("config.editor.tabCompletion","on"),Sd.OtherSuggestions,it.Visible.toNegated(),Zi.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:xo,kbExpr:O.textInputFocus,primary:1026}}));X(class extends se{constructor(){super({id:"editor.action.resetSuggestSize",label:v("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){var t;(t=qo.get(e))===null||t===void 0||t.resetWidgetSize()}})});function p0e(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var m2,g2,GG=M(()=>{qt();Ce();ri();qe();br();Xu();T7();p2();Ys();f7();oi();m2=class extends oe{get selectedItem(){return this._selectedItem}constructor(e,t,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=Gs("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(e.onKeyDown(o=>{o.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(o=>{o.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let r=qo.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(a,l,c)=>{var d;dn(b=>this.checkModelVersion(b));let u=this.editor.getModel();if(!u)return-1;let h=(d=this.suggestControllerPreselector())===null||d===void 0?void 0:d.removeCommonPrefix(u);if(!h)return-1;let p=Se.lift(l),m=c.map((b,S)=>{let N=g2.fromSuggestion(r,u,p,b,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(u),A=h.augments(N);return{index:S,valid:A,prefixLength:N.text.length,suggestItem:b}}).filter(b=>b&&b.valid&&b.prefixLength>0),g=zR(m,HR(b=>b.prefixLength,BR));return g?g.index:-1}}));let o=!1,s=()=>{o||(o=!0,this._register(r.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(r.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(r.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(li.once(r.model.onDidTrigger)(a=>{s()}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!p0e(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,dn(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){let e=qo.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),r=this.editor.getModel();if(!(!t||!n||!r))return g2.fromSuggestion(e,r,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){let e=qo.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){let e=qo.get(this.editor);e==null||e.forceRenderingAbove()}},g2=class i{static fromSuggestion(e,t,n,r,o){let{insertText:s}=r.completion,a=!1;if(r.completion.insertTextRules&4){let c=new Vo().parse(s);c.children.length<100&&lp.adjustWhitespace(t,n,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(r,o);return new i(P.fromPositions(n.delta(0,-l.overwriteBefore),n.delta(0,Math.max(l.overwriteAfter,0))),s,r.completion.kind,a)}constructor(e,t,n,r){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=r}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new GO(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new $u(this.range,this.insertText)}}});var m0e,eh,Tr,v2=M(()=>{Mo();qt();Ce();Ys();Gu();N_();ri();Ns();xt();Fy();Jq();Hy();qy();EG();GG();eoe();zi();jn();ft();Et();m0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eh=function(i,e){return function(t,n){e(t,n,i)}},Tr=class $G extends oe{static get(e){return e.getContribution($G.ID)}constructor(e,t,n,r,o,s,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.configurationService=r,this.commandService=o,this.debounceService=s,this.languageFeaturesService=a,this.audioCueService=l,this.model=F0("inlineCompletionModel",void 0),this.textModelVersionId=Gs("textModelVersionId",-1),this.cursorPosition=Gs("cursorPosition",new Se(1,1)),this.suggestWidgetAdaptor=this._register(new m2(this.editor,()=>{var u,h;return(h=(u=this.model.get())===null||u===void 0?void 0:u.selectedInlineCompletion.get())===null||h===void 0?void 0:h.toSingleTextEdit(void 0)},u=>this.updateObservables(u,wo.Other))),this._enabled=$s(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(Wy,this.editor,{ghostText:this.model.map((u,h)=>u==null?void 0:u.ghostText.read(h)),minReservedLineCount:Ny(0),targetTextModel:this.model.map(u=>u==null?void 0:u.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new In(this.contextKeyService,this.model)),this._register(li.runAndSubscribe(e.onDidChangeModel,()=>dn(u=>{this.model.set(void 0,u),this.updateObservables(u,wo.Other);let h=e.getModel();if(h){let p=t.createInstance(e2,h,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,$s(e.onDidChangeConfiguration,()=>e.getOption(114).preview),$s(e.onDidChangeConfiguration,()=>e.getOption(114).previewMode),$s(e.onDidChangeConfiguration,()=>e.getOption(60).mode),this._enabled);this.model.set(p,u)}})));let c=u=>{var h;return u.isUndoing?wo.Undo:u.isRedoing?wo.Redo:!((h=this.model.get())===null||h===void 0)&&h.isAcceptingPartially?wo.AcceptWord:wo.Other};this._register(e.onDidChangeModelContent(u=>dn(h=>this.updateObservables(h,c(u))))),this._register(e.onDidChangeCursorPosition(u=>dn(h=>{var p;this.updateObservables(h,wo.Other),u.reason===3&&((p=this.model.get())===null||p===void 0||p.stop(h))}))),this._register(e.onDidType(()=>dn(u=>{var h;this.updateObservables(u,wo.Other),this._enabled.get()&&((h=this.model.get())===null||h===void 0||h.trigger(u))}))),this._register(this.commandService.onDidExecuteCommand(u=>{new Set([ef.Tab.id,ef.DeleteLeft.id,ef.DeleteRight.id,Ry,"acceptSelectedSuggestion"]).has(u.commandId)&&e.hasTextFocus()&&this._enabled.get()&&dn(p=>{var m;(m=this.model.get())===null||m===void 0||m.trigger(p)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(60).keepOnBlur||Qs.dropDownVisible||dn(u=>{var h;(h=this.model.get())===null||h===void 0||h.stop(u)})})),this._register(un("forceRenderingAbove",u=>{var h;let p=(h=this.model.read(u))===null||h===void 0?void 0:h.state.read(u);p!=null&&p.suggestItem?p.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(Ft(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let d;this._register(un("play audio cue & read suggestion",u=>{let h=this.model.read(u),p=h==null?void 0:h.state.read(u);if(!h||!p||!p.completion){d=void 0;return}if(p.completion.semanticId!==d){if(d=p.completion.semanticId,h.isNavigatingCurrentInlineCompletion)return;this.audioCueService.playAudioCue(JP.inlineSuggestion).then(()=>{if(this.editor.getOption(6)){let m=h.textModel.getLineContent(p.ghostText.lineNumber);Ni(p.ghostText.renderForScreenReader(m))}})}})),this._register(new Ky(this.editor,this.model,this.instantiationService))}updateObservables(e,t){var n,r;let o=this.editor.getModel();this.textModelVersionId.set((n=o==null?void 0:o.getVersionId())!==null&&n!==void 0?n:-1,e,t),this.cursorPosition.set((r=this.editor.getPosition())!==null&&r!==void 0?r:new Se(1,1),e)}shouldShowHoverAt(e){var t;let n=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return n?n.parts.some(r=>e.containsPosition(new Se(n.lineNumber,r.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};Tr.ID="editor.contrib.inlineCompletionsController";Tr=m0e([eh(1,He),eh(2,Ke),eh(3,Mt),eh(4,ui),eh(5,an),eh(6,be),eh(7,QP)],Tr)});var Ed,cg,dg,_2,b2,y2,C2,ug,hg,YG=M(()=>{Ys();Ze();jt();Fy();Hy();v2();De();Yi();jn();ft();Ed=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},cg=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.next()})}};cg.ID=Py;dg=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.previous()})}};dg.ID=Oy;_2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:O.writable})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.triggerExplicitly()})}},b2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:v("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065},menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextWord(r.editor)})}},y2=class extends se{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:v("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:ce.and(O.writable,In.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);(n=r==null?void 0:r.model.get())===null||n===void 0||n.acceptNextLine(r.editor)})}},C2=class extends se{constructor(){super({id:Ry,label:v("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:In.inlineSuggestionVisible,menuOpts:[{menuId:xe.InlineSuggestionToolbar,title:v("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:ce.and(In.inlineSuggestionVisible,O.tabMovesFocus.toNegated(),In.inlineSuggestionHasIndentationLessThanTabSize)}})}run(e,t){var n;return Ed(this,void 0,void 0,function*(){let r=Tr.get(t);r&&((n=r.model.get())===null||n===void 0||n.accept(r.editor),r.editor.focus())})}},ug=class i extends se{constructor(){super({id:i.ID,label:v("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:In.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Ed(this,void 0,void 0,function*(){let n=Tr.get(t);dn(r=>{var o;(o=n==null?void 0:n.model.get())===null||o===void 0||o.stop(r)})})}};ug.ID="editor.action.inlineSuggest.hide";hg=class i extends os{constructor(){super({id:i.ID,title:v("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:xe.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:ce.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return Ed(this,void 0,void 0,function*(){let n=e.get(Mt),o=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",o)})}};hg.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"});var g0e,fg,G7,S2,XG=M(()=>{Ht();Sl();Ce();Ys();qe();ss();lc();v2();qy();Zu();De();Vw();Et();ds();Bc();g0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fg=function(i,e){return function(t,n){e(t,n,i)}},G7=class{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},S2=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=r,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=Tr.get(this._editor);if(!t)return null;let n=e.target;if(n.type===8){let r=n.detail;if(t.shouldShowHoverAtViewZone(r.viewZoneId))return new bd(1e3,this,P.fromPositions(this._editor.getModel().validatePosition(r.positionBefore||r.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new bd(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new bd(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(60).showToolbar==="always")return[];let n=Tr.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new G7(this,e.range,n)]:[]}renderHoverParts(e,t){let n=new ne,r=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,r,n);let o=r.controller.model.get(),s=this._instantiationService.createInstance(Qs,this._editor,!1,Ny(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.selectedInlineCompletion.map(a=>{var l;return(l=a==null?void 0:a.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]}));return e.fragment.appendChild(s.getDomNode()),o.triggerExplicitly(),n.add(s),n}renderScreenReaderText(e,t,n){let r=fe,o=r("div.hover-row.markdown-hover"),s=me(o,r("div.hover-contents",{"aria-live":"assertive"})),a=n.add(new io({editor:this._editor},this._languageService,this._openerService)),l=c=>{n.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let d=v("inlineSuggestionFollows","Suggestion:"),u=n.add(a.render(new sn().appendText(d).appendCodeblock("text",c)));s.replaceChildren(u.element)};n.add(un("update hover",c=>{var d;let u=(d=t.controller.model.read(c))===null||d===void 0?void 0:d.ghostText.read(c);if(u){let h=this._editor.getModel().getLineContent(u.lineNumber);l(u.renderForScreenReader(h))}else Zd(s)})),e.fragment.appendChild(o)}};S2=g0e([fg(1,Xi),fg(2,Qi),fg(3,yb),fg(4,He),fg(5,Dr)],S2)});var $7=M(()=>{Ze();lc();YG();XG();v2();Yi();Ae(Tr.ID,Tr,3);X(_2);X(cg);X(dg);X(b2);X(y2);X(C2);X(ug);mi(hg);jo.register(S2)});var QG=M(()=>{});var JG=M(()=>{QG()});var v0e,_0e,b0e,y0e,w2,_p,pg=M(()=>{Ht();Dt();or();Ce();wi();qr();JG();qe();qn();Et();v0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_0e=function(i,e){return function(t,n){e(t,n,i)}},b0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},y0e=ct.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:y_,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),w2=class i extends oe{constructor(e,t,n,r,o){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=fe(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=fe("span.icon");this.domNode.append(t),t.classList.add(...mt.asClassNameArray(lt.loading),"codicon-modifier-spin");let n=()=>{let r=this.editor.getOption(64);this.domNode.style.height=`${r}px`,this.domNode.style.width=`${Math.ceil(.8*r)}px`};n(),this._register(this.editor.onDidChangeConfiguration(r=>{(r.hasChanged(50)||r.hasChanged(64))&&n()})),this._register(Rt(this.domNode,on.CLICK,r=>{this.delegate.cancel()}))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};w2.baseId="editor.widget.inlineProgressWidget";_p=class extends oe{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Bi),this._currentWidget=new Bi,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return b0e(this,void 0,void 0,function*(){let r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=wl(()=>{let o=P.fromPositions(e);this._currentDecorations.set([{range:o,options:y0e}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(w2,this.id,this._editor,o,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};_p=v0e([_0e(2,He)],_p)});var ZG=M(()=>{});var e$=M(()=>{ZG()});var t$=M(()=>{});var i$=M(()=>{t$()});var n$,C0e,S0e,Y7,X7,x2,E2,r$=M(()=>{Ht();Fw();ma();hP();Ce();bw();i$();qe();qn();n$=new dt(new As(0,122,204)),C0e={showArrow:!0,showFrame:!0,className:"",frameColor:n$,arrowColor:n$,keepEditorSelection:!1},S0e="vs.editor.contrib.zoneWidget",Y7=class{constructor(e,t,n,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},X7=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},x2=class i{constructor(e){this._editor=e,this._ruleName=i._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),iw(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){iw(this._ruleName),dR(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:P.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};x2._IdGenerator=new dP(".arrow-decoration-");E2=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new ne,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=cO(t),sf(this.options,C0e,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{let r=this._getWidth(n);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(r)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new x2(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){let n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;let r=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(r))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){let e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){let n=P.isIRange(e)?P.lift(e):P.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:ct.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){let e=this.editor.getOption(64),t=0;if(this.options.showArrow){let n=Math.round(e/3);t+=2*n}if(this.options.showFrame){let n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){let n=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(64);if(!this.options.allowUnlimitedHeight){let h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new Y7(s,n.lineNumber,n.column,t,p=>this._onViewZoneTop(p),p=>this._onViewZoneHeight(p),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new X7(S0e+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){let h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}let d=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);let u=this.editor.getModel();if(u){let h=u.validateRange(new P(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===u.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Il(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){let n=(t.currentY-e.startY)/this.editor.getOption(64),r=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+r;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){let e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}});function a$(i){let e=i.get(Zt).getFocusedCodeEditor();return e instanceof Ko?e.getParentEditor():e}var o$,s$,Q7,Pn,mg,w0e,bp,l$,T2,k2,c$,d$,AKe,LKe,MKe,DKe,Td,NKe,RKe,OKe,PKe,FKe,th=M(()=>{Ht();gf();Pc();or();qr();ma();qt();bw();e$();Ze();Lr();pp();r$();De();_b();ft();bl();Et();_r();o$=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},s$=function(i,e){return function(t,n){e(t,n,i)}},Q7=rr("IPeekViewService");sr(Q7,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let n=()=>{let r=this._widgets.get(i);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}},1);(function(i){i.inPeekEditor=new nt("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Pn||(Pn={}));mg=class{constructor(e,t){e instanceof Ko&&Pn.inPeekEditor.bindTo(t)}dispose(){}};mg.ID="editor.contrib.referenceController";mg=o$([s$(1,Ke)],mg);Ae(mg.ID,mg,0);w0e={headerBackgroundColor:dt.white,primaryHeadingColor:dt.fromHex("#333333"),secondaryHeadingColor:dt.fromHex("#6c6c6cb3")},bp=class extends E2{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new $e,this.onDidClose=this._onDidClose.event,sf(this.options,w0e,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=fe(".head"),this._bodyElement=fe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=fe(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),ts(this._titleElement,"click",o=>this._onTitleClick(o))),me(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=fe("span.filename"),this._secondaryHeading=fe("span.dirname"),this._metaHeading=fe("span.meta"),me(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let n=fe(".peekview-actions");me(this._headElement,n);let r=this._getActionBarOptions();this._actionbarWidget=new Po(n,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new ns("peekview.close",v("label.close","Close"),mt.asClassName(lt.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:WP.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:mr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,gr(this._metaHeading)):Wn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let n=Math.ceil(this.editor.getOption(64)*1.2),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};bp=o$([s$(2,He)],bp);l$=Oe("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:dt.black,hcLight:dt.white},v("peekViewTitleBackground","Background color of the peek view title area.")),T2=Oe("peekViewTitleLabel.foreground",{dark:dt.white,light:dt.black,hcDark:dt.white,hcLight:_a},v("peekViewTitleForeground","Color of the peek view title.")),k2=Oe("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),c$=Oe("peekView.border",{dark:Hm,light:Hm,hcDark:ls,hcLight:ls},v("peekViewBorder","Color of the peek view borders and arrow.")),d$=Oe("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:dt.black,hcLight:dt.white},v("peekViewResultsBackground","Background color of the peek view result list.")),AKe=Oe("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:dt.white,hcLight:_a},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),LKe=Oe("peekViewResult.fileForeground",{dark:dt.white,light:"#1E1E1E",hcDark:dt.white,hcLight:_a},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),MKe=Oe("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),DKe=Oe("peekViewResult.selectionForeground",{dark:dt.white,light:"#6C6C6C",hcDark:dt.white,hcLight:_a},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Td=Oe("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:dt.black,hcLight:dt.white},v("peekViewEditorBackground","Background color of the peek view editor.")),NKe=Oe("peekViewEditorGutter.background",{dark:Td,light:Td,hcDark:Td,hcLight:Td},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),RKe=Oe("peekViewEditorStickyScroll.background",{dark:Td,light:Td,hcDark:Td,hcLight:Td},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),OKe=Oe("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),PKe=Oe("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),FKe=Oe("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:va,hcLight:va},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var E0e,Go,J7,pc,Wr,yp=M(()=>{At();qt();hP();Ce();tf();lo();wi();qe();De();E0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Go=class{constructor(e,t,n,r){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=r,this.id=uP.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;let t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?v({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,Nr(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",Nr(this.uri),this.range.startLineNumber,this.range.startColumn)}},J7=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let n=this._modelReference.object.textEditorModel;if(!n)return;let{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:r,column:o-t}),c=new P(r,l.startColumn,r,o),d=new P(s,a,s,1073741824),u=n.getValueInRange(c).replace(/^\s+/,""),h=n.getValueInRange(e),p=n.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+p,highlight:{start:u.length,end:u.length+h.length}}}},pc=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new KR}dispose(){Vi(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?v("aria.fileReferences.1","1 symbol in {0}, full path {1}",Nr(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Nr(this.uri),this.uri.fsPath)}resolve(e){return E0e(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{let n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new J7(n))}catch(n){at(n)}return this})}},Wr=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new $e,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[n]=e;e.sort(i._compareReferences);let r;for(let o of e)if((!r||!_w.isEqual(r.uri,o.uri,!0))&&(r=new pc(this,o.uri),this.groups.push(r)),r.children.length===0||i._compareReferences(o,r.children[r.children.length-1])!==0){let s=new Go(n===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){Vi(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new i(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?v("aria.result.0","No results found"):this.references.length===1?v("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?v("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.length,s=n.parent.groups.length;return s===1||t&&r+10?(t?r=(r+1)%o:r=(r+o-1)%o,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%s,n.parent.groups[r].children[0]):(r=(r+s-1)%s,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}nearestReference(e,t){let n=this.references.map((r,o)=>({idx:o,prefixLen:Fc(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLeno.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(let n of this.references)if(n.uri.toString()===e.toString()&&P.containsPosition(n.range,t))return n}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return _w.compare(e.uri,t.uri)||P.compareRangesUsingStarts(e.range,t.range)}}});var u$=M(()=>{});var h$=M(()=>{u$()});var N2,R2,I2,A2,L2,M2,Z7,Cp,eT,Sp,D2,p$=M(()=>{Ht();noe();Zre();XP();Cl();Ce();lo();ca();De();Et();Gn();bb();nb();yp();N2=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},R2=function(i,e){return function(t,n){e(t,n,i)}},I2=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Wr||e instanceof pc}getChildren(e){if(e instanceof Wr)return e.groups;if(e instanceof pc)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};I2=N2([R2(0,xn)],I2);A2=class{getHeight(){return 23}getTemplateId(e){return e instanceof pc?Cp.id:Sp.id}},L2=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Go){let n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return Nr(e.uri)}};L2=N2([R2(0,Bt)],L2);M2=class{getId(e){return e instanceof Go?e.id:e.uri}},Z7=class extends oe{constructor(e,t){super(),this._labelService=t;let n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new Sb(n,{supportHighlights:!0})),this.badge=new iF(me(n,fe(".count")),{},bP),e.appendChild(n)}set(e,t){let n=rf(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(v("referencesCount","{0} references",r)):this.badge.setTitleFormat(v("referenceCount","{0} reference",r))}};Z7=N2([R2(1,Dl)],Z7);Cp=class f${constructor(e){this._instantiationService=e,this.templateId=f$.id}renderTemplate(e){return this._instantiationService.createInstance(Z7,e)}renderElement(e,t,n){n.set(e.element,ru(e.filterData))}disposeTemplate(e){e.dispose()}};Cp.id="FileReferencesRenderer";Cp=N2([R2(0,He)],Cp);eT=class{constructor(e){this.label=new YP(e)}set(e,t){var n;let r=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!r||!r.value)this.label.set(`${Nr(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:s}=r;t&&!yl.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,ru(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}},Sp=class i{constructor(){this.templateId=i.id}renderTemplate(e){return new eT(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}};Sp.id="OneReferenceRenderer";D2=class{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var T0e,mc,m$,O2,P2,tT,F2,g$=M(()=>{Ht();toe();ma();qt();Ce();Im();lo();h$();pp();qe();qn();Kn();gw();ss();ca();p$();th();De();Et();Gn();bb();tF();ar();kre();yp();T0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mc=function(i,e){return function(t,n){e(t,n,i)}},m$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},O2=class i{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new ne,this._callOnModelChange=new ne,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();let e=this._editor.getModel();if(e){for(let t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));let t=[],n=[];for(let r=0,o=e.children.length;r{let o=r.deltaDecorations([],t);for(let s=0;s{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(tT,"ReferencesWidget",this._treeContainer,new A2,[this._instantiationService.createInstance(Cp),this._instantiationService.createInstance(Sp)],this._instantiationService.createInstance(I2),n),this._splitView.addView({onDidChange:li.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},$w.Distribute),this._splitView.addView({onDidChange:li.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},$w.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let r=(o,s)=>{o instanceof Go&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")}),Wn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Di(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=v("noResults","No results"),gr(this._messageContainer),Promise.resolve(void 0)):(Wn(this._messageContainer),this._decorationsManager=new O2(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{let{event:t,target:n}=e;if(t.detail!==2)return;let r=this._getFocusedReference();r&&this._onDidSelectReference.fire({element:{uri:r.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),gr(this._treeContainer),gr(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){let[e]=this._tree.getFocus();if(e instanceof Go)return e;if(e instanceof pc&&e.children.length>0)return e.children[0]}revealReference(e){return m$(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return m$(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Lo.inMemory?this.setTitle(iO(e.uri),this._uriLabel.getUriLabel(rf(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));let n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));let r=yield n;if(!this._model){r.dispose();return}Vi(this._previewModelReference);let o=r.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=P.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()})}};F2=T0e([mc(3,pn),mc(4,xn),mc(5,He),mc(6,Q7),mc(7,Dl),mc(8,tP),mc(9,Bt),mc(10,Xi),mc(11,Tt)],F2)});function nh(i,e){let t=a$(i);if(!t)return;let n=ol.get(t);n&&e(n)}var k0e,wp,v$,ih,ol,nT=M(()=>{Dt();At();gl();Ce();Lr();ri();qe();th();De();zi();jn();ft();Et();lw();tF();Oo();cu();yp();g$();k0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wp=function(i,e){return function(t,n){e(t,n,i)}},v$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},ih=new nt("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),ol=class iT{static get(e){return e.getContribution(iT.ID)}constructor(e,t,n,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new ne,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=ih.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),r&&e.containsPosition(r))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));let o="peekViewLayout",s=P2.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(F2,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{let{element:c,kind:d}=l;if(c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));let a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,u=new Se(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(84)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return v$(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;let r=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(r),yield this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return v$(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;let r=P.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:r,selectionSource:"code.jump",pinned:t}},this._editor).then(o=>{var s;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(r),this._widget.focusOnReferenceTree();else{let a=iT.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(r,Vt(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,at(o)})}openReference(e,t,n){t||this.closeWidget();let{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:n}},this._editor,t)}};ol.ID="editor.contrib.referencesController";ol=k0e([wp(2,Ke),wp(3,Zt),wp(4,Ei),wp(5,He),wp(6,Yr),wp(7,Mt)],ol);No.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:di(2089,60),when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});No.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.goToNextOrPreviousReference(!0)})}});No.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:ce.or(ih,Pn.inPeekEditor),handler(i){nh(i,e=>{e.goToNextOrPreviousReference(!1)})}});St.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");St.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");St.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");St.registerCommand("closeReferenceSearch",i=>nh(i,e=>e.closeWidget()));No.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:ce.and(Pn.inPeekEditor,ce.not("config.editor.stablePeek"))});No.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:ce.and(ih,ce.not("config.editor.stablePeek"))});No.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ce.and(ih,Yw,Xw.negate(),Qw.negate()),handler(i){var e;let n=(e=i.get(wb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Go&&nh(i,r=>r.revealReference(n[0]))}});No.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ce.and(ih,Yw,Xw.negate(),Qw.negate()),handler(i){var e;let n=(e=i.get(wb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Go&&nh(i,r=>r.openReference(n[0],!0,!0))}});St.registerCommand("openReference",i=>{var e;let n=(e=i.get(wb).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Go&&nh(i,r=>r.openReference(n[0],!1,!0))})});var _$,gg,sT,vg,rT,oT,b$=M(()=>{qt();Ce();lo();Ze();Lr();qe();De();ft();bl();Et();Gn();lw();Oo();_$=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},gg=function(i,e){return function(t,n){e(t,n,i)}},sT=new nt("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),vg=rr("ISymbolNavigationService"),rT=class{constructor(e,t,n,r){this._editorService=t,this._notificationService=n,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=sT.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){let t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();let n=new oT(this._editorService),r=n.onDidChange(o=>{if(this._ignoreEditorChange)return;let s=this._editorService.getActiveCodeEditor();if(!s)return;let a=s.getModel(),l=s.getPosition();if(!a||!l)return;let c=!1,d=!1;for(let u of t.references)if(nf(u.uri,a.uri))c=!0,d=d||P.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=XS(n,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;let t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:P.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();let t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};rT=_$([gg(0,Ke),gg(1,Zt),gg(2,Ei),gg(3,Bt)],rT);sr(vg,rT,1);Me(new class extends xi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:sT,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(vg).revealNext(e)}});No.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:sT,primary:9,handler(i){i.get(vg).reset()}});oT=class{constructor(e){this._listener=new Map,this._disposables=new ne,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Vi(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,XS(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};oT=_$([gg(0,Zt)],oT)});function _g(i,e,t,n){return aT(this,void 0,void 0,function*(){let o=t.ordered(i).map(a=>Promise.resolve(n(a,i,e)).then(void 0,l=>{Ut(l)})),s=yield Promise.all(o);return vr(s.flat())})}function rh(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideDefinition(o,s,n))}function lT(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideDeclaration(o,s,n))}function cT(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideImplementation(o,s,n))}function dT(i,e,t,n){return _g(e,t,i,(r,o,s)=>r.provideTypeDefinition(o,s,n))}function bg(i,e,t,n,r){return _g(e,t,i,(o,s,a)=>aT(this,void 0,void 0,function*(){let l=yield o.provideReferences(s,a,{includeDeclaration:!0},r);if(!n||!l||l.length!==2)return l;let c=yield o.provideReferences(s,a,{includeDeclaration:!1},r);return c&&c.length===1?c:l}))}function yg(i){return aT(this,void 0,void 0,function*(){let e=yield i(),t=new Wr(e,""),n=t.references.map(r=>r.link);return t.dispose(),n})}var aT,H2=M(()=>{oi();gi();At();Ze();xt();yp();aT=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};Gr("_executeDefinitionProvider",(i,e,t)=>{let n=i.get(be),r=rh(n.definitionProvider,e,t,et.None);return yg(()=>r)});Gr("_executeTypeDefinitionProvider",(i,e,t)=>{let n=i.get(be),r=dT(n.typeDefinitionProvider,e,t,et.None);return yg(()=>r)});Gr("_executeDeclarationProvider",(i,e,t)=>{let n=i.get(be),r=lT(n.declarationProvider,e,t,et.None);return yg(()=>r)});Gr("_executeReferenceProvider",(i,e,t)=>{let n=i.get(be),r=bg(n.referenceProvider,e,t,!1,et.None);return yg(()=>r)});Gr("_executeImplementationProvider",(i,e,t)=>{let n=i.get(be),r=cT(n.implementationProvider,e,t,et.None);return yg(()=>r)})});var Cs,uT,hT,fT,pT,mT,gT,vT,_T,oh,Ss,gc,y$,B2,z2,U2,W2,ST,Cg=M(()=>{JS();Mo();Dt();gl();nr();Mi();Sn();lu();Bw();Ze();Lr();pp();ri();qe();jt();br();nT();yp();b$();u0();th();De();Yi();zi();ft();Et();Oo();Gc();H2();xt();Em();Cs=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};rs.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});oh=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||Se.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},Ss=class i extends ua{static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(let n of ao.wrap(t.menu))(n.id===xe.EditorContext||n.id===xe.EditorContextPeek)&&(n.when=ce.and(e.precondition,n.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,r){if(!t.hasModel())return Promise.resolve(void 0);let o=e.get(Ei),s=e.get(Zt),a=e.get(El),l=e.get(vg),c=e.get(be),d=e.get(He),u=t.getModel(),h=t.getPosition(),p=oh.is(n)?n:new oh(u,h),m=new Sa(t,5),g=Vc(this._getLocationModel(c,p.model,p.position,m.token),m.token).then(b=>Cs(this,void 0,void 0,function*(){var S;if(!b||m.token.isCancellationRequested)return;Ni(b.ariaMessage);let k;if(b.referenceAt(u.uri,h)){let A=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(A)&&i._allSymbolNavigationCommands.has(A)&&(k=i._allSymbolNavigationCommands.get(A))}let N=b.references.length;if(N===0){if(!this.configuration.muteMessage){let A=u.getWordAtPosition(h);(S=Qn.get(t))===null||S===void 0||S.showMessage(this._getNoResultFoundMessage(A),h)}}else if(N===1&&k)i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(A=>k.runEditorCommand(A,t,n,r).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,b,r)}),b=>{o.error(b)}).finally(()=>{m.dispose()});return a.showWhile(g,250),g}_onResult(e,t,n,r,o){return Cs(this,void 0,void 0,function*(){let s=this._getGoToPreference(n);if(!(n instanceof Ko)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(n,r,o);else{let a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",c=yield this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,r,o):r.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,n,r,o){return Cs(this,void 0,void 0,function*(){let s;if($O(n)&&(s=n.targetSelectionRange),s||(s=n.range),!s)return;let a=yield t.openCodeEditor({resource:n.uri,options:{selection:P.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(a){if(o){let l=a.getModel(),c=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}})}_openInPeek(e,t,n){let r=ol.get(e);r&&e.hasModel()?r.toggleWidget(n!=null?n:e.getSelection(),Vt(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};Ss._allSymbolNavigationCommands=new Map;Ss._activeAlternativeCommands=new Set;gc=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield rh(e.definitionProvider,t,n,r),v("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("noResultWord","No definition found for '{0}'",e.word):v("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}},y$=h_&&!QN()?2118:70;mi((uT=class bT extends gc{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:bT.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:ce.and(O.hasDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:y$,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.1},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),St.registerCommandAlias("editor.action.goToDeclaration",bT.id)}},uT.id="editor.action.revealDefinition",uT));mi((hT=class yT extends gc{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:yT.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ce.and(O.hasDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:di(2089,y$),weight:100}}),St.registerCommandAlias("editor.action.openDeclarationToTheSide",yT.id)}},hT.id="editor.action.revealDefinitionAside",hT));mi((fT=class CT extends gc{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:CT.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:ce.and(O.hasDefinitionProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:xe.EditorContextPeek,group:"peek",order:2}}),St.registerCommandAlias("editor.action.previewDeclaration",CT.id)}},fT.id="editor.action.peekDefinition",fT));B2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield lT(e.declarationProvider,t,n,r),v("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}};mi((pT=class C$ extends B2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:C$.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:ce.and(O.hasDeclarationProvider,O.isInWalkThroughSnippet.toNegated()),menu:[{id:xe.EditorContext,group:"navigation",order:1.3},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}},pT.id="editor.action.revealDeclaration",pT));mi(class extends B2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:ce.and(O.hasDeclarationProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:3}})}});z2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield dT(e.typeDefinitionProvider,t,n,r),v("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}};mi((mT=class S$ extends z2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:S$.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:ce.and(O.hasTypeDefinitionProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:0,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.4},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},mT.ID="editor.action.goToTypeDefinition",mT));mi((gT=class w$ extends z2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:w$.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:ce.and(O.hasTypeDefinitionProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:4}})}},gT.ID="editor.action.peekTypeDefinition",gT));U2=class extends Ss{_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield cT(e.implementationProvider,t,n,r),v("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}};mi((vT=class x$ extends U2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:x$.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:ce.and(O.hasImplementationProvider,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:2118,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.45},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},vT.ID="editor.action.goToImplementation",vT));mi((_T=class E$ extends U2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:E$.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:ce.and(O.hasImplementationProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:3142,weight:100},menu:{id:xe.EditorContextPeek,group:"peek",order:5}})}},_T.ID="editor.action.peekImplementation",_T));W2=class extends Ss{_getNoResultFoundMessage(e){return e?v("references.no","No references found for '{0}'",e.word):v("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}};mi(class extends W2{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:ce.and(O.hasReferenceProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),keybinding:{when:O.editorTextFocus,primary:1094,weight:100},menu:[{id:xe.EditorContext,group:"navigation",order:1.45},{id:xe.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield bg(e.referenceProvider,t,n,!0,r),v("ref.title","References"))})}});mi(class extends W2{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:ce.and(O.hasReferenceProvider,Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated()),menu:{id:xe.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(yield bg(e.referenceProvider,t,n,!1,r),v("ref.title","References"))})}});ST=class extends Ss{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ce.and(Pn.notInPeekEditor,O.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,r){return Cs(this,void 0,void 0,function*(){return new Wr(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(56).multipleReferences}_getAlternativeCommand(){return""}};St.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ht},{name:"position",description:"The position at which to start",constraint:Se.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(i,e,t,n,r,o,s)=>Cs(void 0,void 0,void 0,function*(){Lt(ht.isUri(e)),Lt(Se.isIPosition(t)),Lt(Array.isArray(n)),Lt(typeof r=="undefined"||typeof r=="string"),Lt(typeof s=="undefined"||typeof s=="boolean");let a=i.get(Zt),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Hw(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let d=new class extends ST{_getNoResultFoundMessage(u){return o||super._getNoResultFoundMessage(u)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},n,r);c.get(He).invokeFunction(d.run.bind(d),l)})})});St.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:ht},{name:"position",description:"The position at which to start",constraint:Se.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(i,e,t,n,r)=>Cs(void 0,void 0,void 0,function*(){i.get(ui).executeCommand("editor.action.goToLocations",e,t,n,r,void 0,!0)})});St.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{Lt(ht.isUri(e)),Lt(Se.isIPosition(t));let n=i.get(be),r=i.get(Zt);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!Hw(o)||!o.hasModel())return;let s=ol.get(o);if(!s)return;let a=Vt(c=>bg(n.referenceProvider,o.getModel(),Se.lift(t),!1,c).then(d=>new Wr(d,v("ref.title","References")))),l=new P(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});St.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});var T$=M(()=>{});var k$=M(()=>{T$()});function wT(i,e){return!!i[e]}function I$(i){return i==="altKey"?zn?new xp(57,"metaKey",6,"altKey"):new xp(5,"ctrlKey",6,"altKey"):zn?new xp(6,"altKey",57,"metaKey"):new xp(6,"altKey",5,"ctrlKey")}var Sg,j2,xp,sl,wg=M(()=>{qt();Ce();nr();Sg=class{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=wT(e.event,t.triggerModifier),this.hasSideBySideModifier=wT(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},j2=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=wT(e,t.triggerModifier)}},xp=class{constructor(e,t,n,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};sl=class extends oe{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new $e),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new $e),this.onExecute=this._onExecute.event,this._onCancel=this._register(new $e),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=I$(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(75)){let r=I$(this._editor.getOption(75));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new Sg(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new Sg(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new Sg(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new j2(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new j2(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){let t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}});var I0e,xT,A$,kd,K2=M(()=>{Dt();At();Sl();Ce();Mi();k$();lu();Ze();qe();ss();ca();wg();th();De();ft();Cg();H2();xt();qn();I0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xT=function(i,e){return function(t,n){e(t,n,i)}},A$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kd=class V2{constructor(e,t,n,r){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=r,this.toUnhook=new ne,this.toUnhookForKeyboard=new ne,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new sl(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,Un(a))})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{at(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(V2.ID)}startFindDefinitionFromCursor(e){return A$(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}let n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return A$(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();let n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;let r=new Q_(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Vt(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){at(a);return}if(!o||!o.length||!r.validate(this.editor)){this.removeLinkDecorations();return}let s=o[0].originSelectionRange?P.lift(o[0].originSelectionRange):new P(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(o.length>1){let a=s;for(let{originSelectionRange:l}of o)l&&(a=P.plusRange(a,l));this.addDecoration(a,new sn().appendText(v("multipleResults","Click to show {0} definitions.",o.length)))}else{let a=o[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}let{object:{textEditorModel:c}}=l,{startLineNumber:d}=a.range;if(d<1||d>c.getLineCount()){l.dispose();return}let u=this.getPreviewValue(c,d,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(s,u?new sn().appendCodeblock(h||"",u):void 0),l.dispose()})}})}getPreviewValue(e,t,n){let r=n.range;return r.endLineNumber-r.startLineNumber>=V2.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,n){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{let r=!t&&this.editor.getOption(85)&&!this.isInPeekEditor(n);return new gc({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){let t=e.get(Ke);return Pn.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};kd.ID="editor.contrib.gotodefinitionatposition";kd.MAX_SOURCE_PREVIEW_LINES=8;kd=I0e([xT(1,xn),xT(2,Xi),xT(3,be)],kd);Ae(kd.ID,kd,2)});var L$,q2,G2,ET,kT,TT,M$=M(()=>{oi();qt();Ce();VN();wi();Sn();qe();bl();Et();rb();jn();L$=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},q2=function(i,e){return function(t,n){e(t,n,i)}},G2=class{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}},ET=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._dispoables=new ne,this._markers=[],this._nextIdx=-1,ht.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=rw(a.resource.toString(),l.resource.toString());return c===0&&(r==="position"?c=P.compareRangesUsingStarts(a,l)||Dn.compare(a.severity,l.severity):c=Dn.compare(a.severity,l.severity)||P.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:ht.isUri(e)?e:void 0,severities:Dn.Error|Dn.Warning|Dn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){let e=this._markers[this._nextIdx];return e&&new G2(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=iu(this._markers,{resource:e.uri},(s,a)=>rw(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;sr.resource.toString()===e.toString());if(!(n<0)){for(;n{});var N$=M(()=>{D$()});var R$=M(()=>{});var O$=M(()=>{R$()});var $2,P$=M(()=>{O$();or();qr();Mre();(function(i){function e(t){switch(t){case Jm.Ignore:return"severity-ignore "+mt.asClassName(lt.info);case Jm.Info:return mt.asClassName(lt.info);case Jm.Warning:return mt.asClassName(lt.warning);case Jm.Error:return mt.asClassName(lt.error);default:return""}}i.className=e})($2||($2={}))});var A0e,Ep,IT,sh,F$,H$,B$,AT,L0e,Y2,M0e,LT,D0e,N0e,U$=M(()=>{Ht();eb();oi();ma();qt();Ce();lo();wi();N$();qe();th();De();_b();Yi();ft();Et();bb();rb();ds();P$();_r();ar();A0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ep=function(i,e){return function(t,n){e(t,n,i)}},IT=class{constructor(e,t,n,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new ne,this._editor=t;let s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(ts(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new mP(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Vi(this._disposables)}update(e){let{source:t,message:n,relatedInformation:r,code:o}=e,s=((t==null?void 0:t.length)||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);let a=eu(n);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);mr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(let h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){let h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){let p=document.createElement("span");p.innerText=t,p.classList.add("source"),h.appendChild(p)}if(o)if(typeof o=="string"){let p=document.createElement("span");p.innerText=`(${o})`,p.classList.add("code"),h.appendChild(p)}else{this._codeLink=fe("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};let p=me(this._codeLink,fe("span"));p.innerText=o.value,h.appendChild(this._codeLink)}}if(mr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Wi(r)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(let p of r){let m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(p.resource)}(${p.startLineNumber}, ${p.startColumn}): `,g.title=this._labelService.getUriLabel(p.resource),this._relatedDiagnostics.set(g,p);let b=document.createElement("span");b.innerText=p.message,m.appendChild(g),m.appendChild(b),this._lines+=1,h.appendChild(m)}}let c=this._editor.getOption(48),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Dn.Error:t=v("Error","Error");break;case Dn.Warning:t=v("Warning","Warning");break;case Dn.Info:t=v("Info","Info");break;case Dn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(n=`${r.getLineContent(e.startLineNumber)}, ${n}`),n}},sh=class z$ extends bp{constructor(e,t,n,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=n,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new ne,this._onDidSelectRelatedInformation=new $e,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Dn.Warning,this._backgroundColor=dt.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(N0e);let t=AT,n=L0e;this._severity===Dn.Warning?(t=Y2,n=M0e):this._severity===Dn.Info&&(t=LT,n=D0e);let r=e.getColor(t),o=e.getColor(n);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor(T2),secondaryHeadingColor:e.getColor(k2)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(r=>this.editor.focus()));let t=[],n=this._menuService.createMenu(z$.TitleMenu,this._contextKeyService);gb(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=me(e,fe(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new IT(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let r=P.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(Nr(a.uri),l)}this._icon.className=`codicon ${$2.className(Dn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};sh.TitleMenu=new xe("gotoErrorTitleMenu");sh=A0e([Ep(1,pn),Ep(2,Qi),Ep(3,Is),Ep(4,He),Ep(5,Ke),Ep(6,Dl)],sh);F$=V_(CO,SO),H$=V_(wO,xO),B$=V_(Hm,EO),AT=Oe("editorMarkerNavigationError.background",{dark:F$,light:F$,hcDark:ls,hcLight:ls},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),L0e=Oe("editorMarkerNavigationError.headerBackground",{dark:Or(AT,.1),light:Or(AT,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Y2=Oe("editorMarkerNavigationWarning.background",{dark:H$,light:H$,hcDark:ls,hcLight:ls},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),M0e=Oe("editorMarkerNavigationWarning.headerBackground",{dark:Or(Y2,.1),light:Or(Y2,.1),hcDark:"#0C141F",hcLight:Or(Y2,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),LT=Oe("editorMarkerNavigationInfo.background",{dark:B$,light:B$,hcDark:ls,hcLight:ls},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),D0e=Oe("editorMarkerNavigationInfo.headerBackground",{dark:Or(LT,.1),light:Or(LT,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),N0e=Oe("editorMarkerNavigation.background",{dark:Bm,light:Bm,hcDark:Bm,hcLight:Bm},v("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var R0e,X2,W$,vc,Tp,ah,xg,MT,DT,j$,O0e,J2=M(()=>{or();Ce();Ze();Lr();ri();qe();jt();M$();De();Yi();ft();Et();Al();U$();R0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},X2=function(i,e){return function(t,n){e(t,n,i)}},W$=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},vc=class Q2{static get(e){return e.getContribution(Q2.ID)}constructor(e,t,n,r,o){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new ne,this._editor=e,this._widgetVisible=j$.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(sh,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var r,o,s;(!(!((r=this._model)===null||r===void 0)&&r.selected)||!P.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,n.position))&&((s=this._model)===null||s===void 0||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;let n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:P.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){let t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new Se(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,r;return W$(this,void 0,void 0,function*(){if(this._editor.hasModel()){let o=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();let s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&((n=Q2.get(s))===null||n===void 0||n.close(),(r=Q2.get(s))===null||r===void 0||r.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};vc.ID="editor.contrib.markerController";vc=R0e([X2(1,kT),X2(2,Ke),X2(3,Zt),X2(4,He)],vc);Tp=class extends se{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return W$(this,void 0,void 0,function*(){t.hasModel()&&((n=vc.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}},ah=class i extends Tp{constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:578,weight:100},menuOpts:{menuId:sh.TitleMenu,title:i.LABEL,icon:Ti("marker-navigation-next",lt.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};ah.ID="editor.action.marker.next";ah.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");xg=class i extends Tp{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:1602,weight:100},menuOpts:{menuId:sh.TitleMenu,title:i.LABEL,icon:Ti("marker-navigation-previous",lt.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};xg.ID="editor.action.marker.prev";xg.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");MT=class extends Tp{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:66,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},DT=class extends Tp{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:1090,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Ae(vc.ID,vc,4);X(ah);X(xg);X(MT);X(DT);j$=new nt("markersNavigationVisible",!1),O0e=xi.bindToContribution(vc.get);Me(new O0e({id:"closeMarkersNavigation",precondition:j$,handler:i=>i.close(),kbOpts:{weight:100+50,kbExpr:O.focus,primary:9,secondary:[1033]}}))});var V$=M(()=>{});var K$=M(()=>{V$()});var Z2,kp,eC,NT=M(()=>{Ht();eR();eb();Ce();K$();Z2=fe,kp=class extends oe{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new mf(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},eC=class i extends oe{static render(e,t,n){return new i(e,t,n)}constructor(e,t,n){super(),this.actionContainer=me(e,Z2("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=me(this.actionContainer,Z2("a.action")),this.action.setAttribute("role","button"),t.iconClass&&me(this.action,Z2(`span.icon.${t.iconClass}`));let r=me(this.action,Z2("span"));r.textContent=n?`${t.label} (${n})`:t.label,this._register(Rt(this.actionContainer,on.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(Rt(this.actionContainer,on.KEY_DOWN,o=>{let s=new g_(o);(s.equals(3)||s.equals(10))&&(o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}});var P0e,F0e,RT,Ip,OT=M(()=>{Dt();At();qt();Ce();P0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},F0e=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},RT=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}},Ip=class extends oe{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new $e),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new ti(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new ti(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new ti(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(58).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=lO(e=>this._computer.computeAsync(e)),P0e(this,void 0,void 0,function*(){var e,t,n,r;try{try{for(var o=!0,s=F0e(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){r=a.value,o=!1;let l=r;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){at(l)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;let e=this._state===0,t=this._state===4;this._onResult.fire(new RT(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}});function G$(i,e,t,n,r,o){let s=t+r/2,a=n+o/2,l=Math.max(Math.abs(i-s)-r/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}var zT,tC,q$,Eg,iC,FT,HT,Id,Tg,BT,UT=M(()=>{Ht();NT();oi();Ce();ri();qe();qn();br();OT();lc();ft();Et();Gn();Qu();Dt();jt();zT=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tC=function(i,e){return function(t,n){e(t,n,i)}},q$=fe,Eg=class PT extends oe{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._widget=this._register(this._instantiationService.createInstance(Id,this._editor)),this._currentResult=null,this._participants=[];for(let r of jo.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,o)=>r.hoverOrdinal-o.hoverOrdinal),this._computer=new BT(this._editor,this._participants),this._hoverOperation=this._register(new Ip(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{if(!this._computer.anchor)return;let o=r.hasLoadingMessage?this._addLoadingMessage(r.value):r.value;this._withResult(new iC(this._computer.anchor,o,r.isComplete))})),this._register(ts(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(hf.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(e){let t=[];for(let r of this._participants)if(r.suggestHoverAnchor){let o=r.suggestHoverAnchor(e);o&&t.push(o)}let n=e.target;if(n.type===6&&t.push(new tp(0,n.range,e.event.posx,e.event.posy)),n.type===7){let r=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTexto.priority-r.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,r){this._startShowingOrUpdateHover(new tp(0,e,void 0,void 0),t,n,r,null)}_startShowingOrUpdateHover(e,t,n,r,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):!1:this._editor.getOption(58).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,r,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}isVisible(){return this._widget.isVisible}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(let t of this._participants)if(t.createLoadingMessage){let n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){let{showAtPosition:n,showAtSecondaryPosition:r,highlightRange:o}=PT.computeHoverRanges(this._editor,e.range,t),s=new ne,a=s.add(new Tg(this._keybindingService)),l=document.createDocumentFragment(),c=null,d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(let h of this._participants){let p=t.filter(m=>m.owner===h);p.length>0&&s.add(h.renderHoverParts(d,p))}let u=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){let h=this._editor.createDecorationsCollection();h.set([{range:o,options:PT._DECORATION_OPTIONS}]),s.add(Ft(()=>{h.clear()}))}this._widget.showAt(l,new HT(c,n,r,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,u,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,n){let r=1;if(e.hasModel()){let c=e._getViewModel(),d=c.coordinatesConverter,u=d.convertModelRangeToViewRange(t),h=new Se(u.startLineNumber,c.getLineMinColumn(u.startLineNumber));r=d.convertViewPositionToModelPosition(h).column}let o=t.startLineNumber,s=t.startColumn,a=n[0].range,l=null;for(let c of n)a=P.plusRange(a,c.range),c.range.startLineNumber===o&&c.range.endLineNumber===o&&(s=Math.max(Math.min(s,c.range.startColumn),r)),c.forceShowAtRange&&(l=c.range);return{showAtPosition:l?l.getStartPosition():new Se(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new Se(o,s),highlightRange:a}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}escape(){this._widget.escape()}};Eg._DECORATION_OPTIONS=ct.register({description:"content-hover-highlight",className:"hoverHighlight"});Eg=zT([tC(1,He),tC(2,Bt)],Eg);iC=class{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){let t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new FT(this,this.anchor,t,this.isComplete)}},FT=class extends iC{constructor(e,t,n,r){super(t,n,r),this.original=e}filter(e){return this.original.filter(e)}},HT=class{constructor(e,t,n,r,o,s,a,l,c,d){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=r,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=c,this.disposables=d,this.closestMouseDistance=void 0}},Id=class $$ extends oe{get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=O.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=O.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new kp),this._focusTracker=this._register(Ts(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this),this._register(this._focusTracker.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(this._focusTracker.onDidBlur(()=>{this._hoverFocusedKey.set(!1)}))}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return $$.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(it.Visible.key)&&(e=!0);let t=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:t}}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX=="undefined"||typeof this._visibleData.initialMousePosY=="undefined")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;let n=wn(this.getDomNode());typeof this._visibleData.closestMouseDistance=="undefined"&&(this._visibleData.closestMouseDistance=G$(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));let r=G$(e,t,n.left,n.top,n.width,n.height);return r>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,r),!0)}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){let e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:n}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${n/t}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}showAt(e,t){var n;this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout()}hide(){if(this._visibleData){let e=this._visibleData.stoleFocus;this._setVisibleData(null),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();let e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){let n=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==n&&(this._hover.contentsDomNode.style.paddingBottom=n,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-this._horizontalScrollingBy})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+this._horizontalScrollingBy})}pageUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};Id.ID="editor.contrib.contentHoverWidget";Id=zT([tC(1,Ke)],Id);Tg=class extends oe{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=q$("div.hover-row.status-bar"),this.actionsElement=me(this.hoverElement,q$("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(eC.render(this.actionsElement,e,n))}append(e){let t=me(this.actionsElement,e);return this._hasContent=!0,t}};Tg=zT([tC(0,Bt)],Tg);BT=class i{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];let n=e.getModel(),r=t.range.startLineNumber;if(r>n.getLineCount())return[];let o=n.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){let t=this._anchor;if(!this._editor.hasModel()||!t)return Rr.EMPTY;let n=i._getLineDecorations(this._editor,t);return Rr.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,n,e):Rr.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return vr(t)}}});var Y$,lh,WT,X$=M(()=>{Ht();oi();Sl();Ce();Zu();OT();NT();Y$=fe,lh=class i extends oe{constructor(e,t,n){super(),this._renderDisposeables=this._register(new ne),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new kp),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new io({editor:this._editor},t,n)),this._computer=new WT(this._editor),this._hoverOperation=this._register(new Ip(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();let n=document.createDocumentFragment();for(let r of t){let o=Y$("div.hover-row.markdown-hover"),s=me(o,Y$("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),n.appendChild(o)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));let t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(64),s=this._hover.containerDomNode.clientHeight,a=n-r-(s-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}};lh.ID="editor.contrib.modesGlyphHoverWidget";WT=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){let e=r=>({value:r}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(let r of t){if(!r.options.glyphMarginClassName)continue;let o=r.options.glyphMarginHoverMessage;!o||jc(o)||n.push(...k_(o).map(e))}return n}}});function B0e(i,e,t,n,r){return H0e(this,void 0,void 0,function*(){try{let o=yield Promise.resolve(i.provideHover(t,n,r));if(o&&U0e(o))return new jT(i,o,e)}catch(o){Ut(o)}})}function kg(i,e,t,n){let o=i.ordered(e).map((s,a)=>B0e(s,a,e,t,n));return Rr.fromPromises(o).coalesce()}function z0e(i,e,t,n){return kg(i,e,t,n).map(r=>r.hover).toPromise()}function U0e(i){let e=typeof i.range!="undefined",t=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return e&&t}var H0e,jT,VT=M(()=>{Dt();gi();At();Ze();xt();H0e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jT=class{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}};Gr("_executeHoverProvider",(i,e,t)=>{let n=i.get(be);return z0e(n.hoverProvider,e,t,et.None)})});function KT(i,e,t,n,r){e.sort((s,a)=>s.ordinal-a.ordinal);let o=new ne;for(let s of e)for(let a of s.contents){if(jc(a))continue;let l=Q$("div.hover-row.markdown-hover"),c=me(l,Q$("div.hover-contents")),d=o.add(new io({editor:t},n,r));o.add(d.onDidRenderAsync(()=>{c.className="hover-contents code-hover-contents",i.onContentsChanged()}));let u=o.add(d.render(a));c.appendChild(u.element),i.fragment.appendChild(l)}return o}var W0e,nC,Q$,no,Ap,rC=M(()=>{Ht();oi();Dt();Sl();Ce();Zu();ri();qe();ss();VT();De();jn();ds();xt();W0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nC=function(i,e){return function(t,n){e(t,n,i)}},Q$=fe,no=class{constructor(e,t,n,r,o){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=r,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Ap=class{constructor(e,t,n,r,o){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=r,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new no(this,e.range,[new sn().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[],a=1e3,l=n.getLineLength(r),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(113),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;d>=0&&l>d&&e.range.startColumn>=d&&(h=!0,s.push(new no(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof u=="number"&&l>=u&&s.push(new no(this,e.range,[{value:v("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let p=!1;for(let m of t){let g=m.range.startLineNumber===r?m.range.startColumn:1,b=m.range.endLineNumber===r?m.range.endColumn:o,S=m.options.hoverMessage;if(!S||jc(S))continue;m.options.beforeContentClassName&&(p=!0);let k=new P(e.range.startLineNumber,g,e.range.startLineNumber,b);s.push(new no(this,k,k_(S),p,a++))}return s}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return Rr.EMPTY;let r=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(r))return Rr.EMPTY;let o=new Se(e.range.startLineNumber,e.range.startColumn);return kg(this._languageFeaturesService.hoverProvider,r,o,n).filter(s=>!jc(s.hover.contents)).map(s=>{let a=s.hover.range?P.lift(s.hover.range):e.range;return new no(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return KT(e,t,this._editor,this._languageService,this._openerService)}};Ap=W0e([nC(1,Xi),nC(2,Qi),nC(3,Mt),nC(4,be)],Ap)});var j0e,qT,ws,GT,J$,oC,Z$=M(()=>{Ht();oi();Dt();At();Ce();lo();qe();xt();Yre();Nu();Y4();gd();J2();De();rb();ds();Gc();j0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qT=function(i,e){return function(t,n){e(t,n,i)}},ws=fe,GT=class{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},J$={type:1,filter:{include:Qe.QuickFix},triggerAction:Xn.QuickFixHover},oC=class{constructor(e,t,n,r){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let n=this._editor.getModel(),r=e.range.startLineNumber,o=n.getLineMaxColumn(r),s=[];for(let a of t){let l=a.range.startLineNumber===r?a.range.startColumn:1,c=a.range.endLineNumber===r?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(n.uri,a);if(!d)continue;let u=new P(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new GT(this,u,d))}return s}renderHoverParts(e,t){if(!t.length)return oe.None;let n=new ne;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,n)));let r=t.length===1?t[0]:t.sort((o,s)=>Dn.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,r,n),n}renderMarkerHover(e,t){let n=ws("div.hover-row"),r=me(n,ws("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);let c=me(r,ws("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=ws("span");if(o){let m=me(d,ws("span"));m.innerText=o}let u=me(d,ws("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(Rt(u,"click",m=>{this._openerService.open(a.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));let h=me(u,ws("span"));h.innerText=a.value;let p=me(r,d);p.style.opacity="0.6",p.style.paddingLeft="6px"}else{let d=me(r,ws("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(Wi(l))for(let{message:d,resource:u,startLineNumber:h,startColumn:p}of l){let m=me(r,ws("div"));m.style.marginTop="8px";let g=me(m,ws("a"));g.innerText=`${Nr(u)}(${h}, ${p}): `,g.style.cursor="pointer",t.add(Rt(g,"click",S=>{S.stopPropagation(),S.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:p}}}).catch(at)}));let b=me(m,ws("span"));b.innerText=d,this._editor.applyFontInfo(b)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Dn.Error||t.marker.severity===Dn.Warning||t.marker.severity===Dn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:ah.ID,run:()=>{var r;e.hide(),(r=vc.get(this._editor))===null||r===void 0||r.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(88)){let r=e.statusBar.append(ws("div"));this.recentMarkerCodeActionsInfo&&(Nw.makeKey(this.recentMarkerCodeActionsInfo.marker)===Nw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?oe.None:n.add(wl(()=>r.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));r.textContent||(r.textContent=String.fromCharCode(160));let s=this.getCodeActions(t.marker);n.add(Ft(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=v("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;n.add(Ft(()=>{l||a.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:Gf,run:c=>{l=!0;let d=Ga.get(this._editor),u=wn(c);e.hide(),d==null||d.showCodeActions(J$,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},at)}}getCodeActions(e){return Vt(t=>l0(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new P(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),J$,wa.None,t))}};oC=j0e([qT(1,VP),qT(2,Qi),qT(3,be)],oC)});var eY=M(()=>{});var tY=M(()=>{eY()});var V0e,sC,hr,$T,YT,XT,QT,JT,ZT,ek,tk,ik,nk,rk,aC=M(()=>{gl();Ce();Ze();qe();jt();ss();K2();UT();X$();De();Et();ds();_r();ar();lc();rC();Z$();qy();Gn();tY();V0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},sC=function(i,e){return function(t,n){e(t,n,i)}},hr=class iY{static get(e){return e.getContribution(iY.ID)}constructor(e,t,n,r,o){this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=r,this._keybindingService=o,this._toUnhook=new ne,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){let e=()=>this._hideWidgets(),t=this._editor.getOption(58);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;let t=e.target;if(t.type===9&&t.detail===Id.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===lh.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;let n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(n)||this._hideWidgets()}_onEditorMouseMove(e){var t,n,r,o,s,a,l,c;let d=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&d.type===9&&d.detail===Id.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((o=(r=e.event.browserEvent.view)===null||r===void 0?void 0:r.getSelection())===null||o===void 0)&&o.isCollapsed)||!this._isHoverSticky&&d.type===9&&d.detail===Id.ID&&(!((s=this._contentWidget)===null||s===void 0)&&s.isColorPickerVisible())||this._isHoverSticky&&d.type===12&&d.detail===lh.ID||this._isHoverSticky&&(!((a=this._contentWidget)===null||a===void 0)&&a.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(l=this._glyphWidget)===null||l===void 0||l.hide();return}if(d.type===2&&d.position){(c=this._contentWidget)===null||c===void 0||c.hide(),this._glyphWidget||(this._glyphWidget=new lh(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(d.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;let n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),r=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible());e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!r&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible())||Qs.dropDownVisible||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Eg,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,n,r){this._getOrCreateContentWidget().startShowingAtRange(e,t,n,r)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}escape(){var e;(e=this._contentWidget)===null||e===void 0||e.escape()}isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible()}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};hr.ID="editor.contrib.hover";hr=V0e([sC(1,He),sC(2,Qi),sC(3,Xi),sC(4,Bt)],hr);$T=class extends se{constructor(){super({id:"editor.action.showHover",label:v({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:di(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;let r=hr.get(t);if(!r)return;let o=t.getPosition(),s=new P(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(n!=null&&n.focus);r.isHoverVisible()?r.focus():r.showContentHover(s,1,1,a)}},YT=class extends se{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let n=hr.get(t);if(!n)return;let r=t.getPosition();if(!r)return;let o=new P(r.lineNumber,r.column,r.lineNumber,r.column),s=kd.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{n.showContentHover(o,1,1,!0)})}},XT=class extends se{constructor(){super({id:"editor.action.scrollUpHover",label:v({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:16,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollUp()}},QT=class extends se{constructor(){super({id:"editor.action.scrollDownHover",label:v({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:18,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollDown()}},JT=class extends se{constructor(){super({id:"editor.action.scrollLeftHover",label:v({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:15,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollLeft()}},ZT=class extends se{constructor(){super({id:"editor.action.scrollRightHover",label:v({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:17,weight:100}})}run(e,t){let n=hr.get(t);n&&n.scrollRight()}},ek=class extends se{constructor(){super({id:"editor.action.pageUpHover",label:v({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){let n=hr.get(t);n&&n.pageUp()}},tk=class extends se{constructor(){super({id:"editor.action.pageDownHover",label:v({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){let n=hr.get(t);n&&n.pageDown()}},ik=class extends se{constructor(){super({id:"editor.action.goToTopHover",label:v({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){let n=hr.get(t);n&&n.goToTop()}},nk=class extends se{constructor(){super({id:"editor.action.goToBottomHover",label:v({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){let n=hr.get(t);n&&n.goToBottom()}},rk=class extends se{constructor(){super({id:"editor.action.escapeFocusHover",label:v({key:"escapeFocusHover",comment:["Action that allows to escape from the hover widget with the escape command when the hover widget is focused."]},"Escape Focus Hover"),alias:"Escape Focus Hover",precondition:O.hoverFocused,kbOpts:{kbExpr:O.hoverFocused,primary:9,weight:100}})}run(e,t){let n=hr.get(t);n&&n.escape()}};Ae(hr.ID,hr,2);X($T);X(YT);X(XT);X(QT);X(JT);X(ZT);X(ek);X(tk);X(ik);X(nk);X(rk);jo.register(Ap);jo.register(oC);df((i,e)=>{let t=i.getColor(OO);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))})});function kr(i,e){let t=0;for(let n=0;n{});function rY(i,e,t,n,r){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let o=e.getLanguageConfiguration(i.getLanguageId()).indentationRules;if(!o)return[];for(n=Math.min(n,i.getLineCount());t<=n&&o.unIndentedLinePattern;){let b=i.getLineContent(t);if(!o.unIndentedLinePattern.test(b))break;t++}if(t>n-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(b,S)=>(S=S||1,Wc.shiftIndent(b,b.length+S,s,a,l)),d=(b,S)=>(S=S||1,Wc.unshiftIndent(b,b.length+S,s,a,l)),u=[],h,p=i.getLineContent(t),m=p;if(r!=null){h=r;let b=Ui(p);m=h+p.substring(b.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(m)&&(h=d(h),m=h+p.substring(b.length)),p!==m&&u.push(Kt.replaceMove(new je(t,1,t,b.length+1),uw(h,a,l)))}else h=Ui(p);let g=h;o.increaseIndentPattern&&o.increaseIndentPattern.test(m)?(g=c(g),h=c(h)):o.indentNextLinePattern&&o.indentNextLinePattern.test(m)&&(g=c(g)),t++;for(let b=t;b<=n;b++){let S=i.getLineContent(b),k=Ui(S),N=g+S.substring(k.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(N)&&(g=d(g),h=d(h)),k!==g&&u.push(Kt.replaceMove(new je(b,1,b,k.length+1),uw(g,a,l))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(S))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(N)?(h=c(h),g=h):o.indentNextLinePattern&&o.indentNextLinePattern.test(N)?g=c(g):g=h)}return u}function oY(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let r="";for(let s=0;s{Ce();wi();Ze();vw();xa();qe();Mn();jt();Kn();is();ok();De();Ll();ore();VR();K0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},q0e=function(i,e){return function(t,n){e(t,n,i)}};lC=class i extends se{constructor(){super({id:i.ID,label:v("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:O.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new ck(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}};lC.ID="editor.action.indentationToSpaces";cC=class i extends se{constructor(){super({id:i.ID,label:v("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:O.writable})}run(e,t){let n=t.getModel();if(!n)return;let r=n.getOptions(),o=t.getSelection();if(!o)return;let s=new dk(o,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}};cC.ID="editor.action.indentationToTabs";Ig=class extends se{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let n=e.get(lr),r=e.get(Si),o=t.getModel();if(!o)return;let s=r.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),a=o.getOptions(),l=[1,2,3,4,5,6,7,8].map(d=>({id:d.toString(),label:d.toString(),description:d===s.tabSize&&d===a.tabSize?v("configuredTabSize","Configured Tab Size"):d===s.tabSize?v("defaultTabSize","Default Tab Size"):d===a.tabSize?v("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:v({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:l[c]}).then(d=>{if(d&&o&&!o.isDisposed()){let u=parseInt(d.label,10);this.displaySizeOnly?o.updateOptions({tabSize:u}):o.updateOptions({tabSize:u,indentSize:u,insertSpaces:this.insertSpaces})}})},50)}},dC=class i extends Ig{constructor(){super(!1,!1,{id:i.ID,label:v("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}};dC.ID="editor.action.indentUsingTabs";uC=class i extends Ig{constructor(){super(!0,!1,{id:i.ID,label:v("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}};uC.ID="editor.action.indentUsingSpaces";hC=class i extends Ig{constructor(){super(!0,!0,{id:i.ID,label:v("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}};hC.ID="editor.action.changeTabDisplaySize";fC=class i extends se{constructor(){super({id:i.ID,label:v("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){let n=e.get(Si),r=t.getModel();if(!r)return;let o=n.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget);r.detectIndentation(o.insertSpaces,o.tabSize)}};fC.ID="editor.action.detectIndentation";sk=class extends se{constructor(){super({id:"editor.action.reindentlines",label:v("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:O.writable})}run(e,t){let n=e.get(Tt),r=t.getModel();if(!r)return;let o=rY(r,n,1,r.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},ak=class extends se{constructor(){super({id:"editor.action.reindentselectedlines",label:v("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:O.writable})}run(e,t){let n=e.get(Tt),r=t.getModel();if(!r)return;let o=t.getSelections();if(o===null)return;let s=[];for(let a of o){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;let d=rY(r,n,l,c);s.push(...d)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},lk=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(let r of this._edits)t.addEditOperation(P.lift(r.range),r.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},Ag=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new ne,this.callOnModel=new ne,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(10)<4||this.editor.getOption(53))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;let n=this.editor.getModel();if(!n||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let r=this.editor.getOption(10),{tabSize:o,indentSize:s,insertSpaces:a}=n.getOptions(),l=[],c={shiftIndent:p=>Wc.shiftIndent(p,p.length+1,o,s,a),unshiftIndent:p=>Wc.unshiftIndent(p,p.length+1,o,s,a)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(n,d)){d++;continue}break}if(d>e.endLineNumber)return;let u=n.getLineContent(d);if(!/\S/.test(u.substring(0,e.startColumn-1))){let p=nu(r,n,n.getLanguageId(),d,c,this._languageConfigurationService);if(p!==null){let m=Ui(u),g=kr(p,o),b=kr(m,o);if(g!==b){let S=ch(g,o,a);l.push({range:new P(d,1,d,m.length+1),text:S}),u=S+u.substr(m.length)}else{let S=M_(n,d,this._languageConfigurationService);if(S===0||S===8)return}}}let h=d;for(;dn.tokenization.getLineTokens(g),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(g,b)=>n.getLanguageIdAtPosition(g,b)},getLineContent:g=>g===h?u:n.getLineContent(g)},n.getLanguageId(),d+1,c,this._languageConfigurationService);if(m!==null){let g=kr(m,o),b=kr(Ui(n.getLineContent(d+1)),o);if(g!==b){let S=g-b;for(let k=d+1;k<=e.endLineNumber;k++){let N=n.getLineContent(k),A=Ui(N),K=kr(A,o)+S,W=ch(K,o,a);W!==A&&l.push({range:new P(k,1,k,A.length+1),text:W})}}}}if(l.length>0){this.editor.pushUndoStop();let p=new lk(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",p),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;let r=e.tokenization.getLineTokens(t);if(r.getCount()>0){let o=r.findTokenIndexAtOffset(n);if(o>=0&&r.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Ag.ID="editor.contrib.autoIndentOnPaste";Ag=K0e([q0e(1,Tt)],Ag);ck=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),oY(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},dk=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),oY(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};Ae(Ag.ID,Ag,2);X(lC);X(cC);X(dC);X(uC);X(hC);X(fC);X(sk);X(ak)});function sY(i){return ht.from({scheme:Lo.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var pC,Lg,hk,Mg,fk=M(()=>{At();Ce();ri();qe();Im();Sn();pC=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Lg=class{constructor(e,t){this.range=e,this.direction=t}},hk=class i{constructor(e,t,n){this.hint=e,this.anchor=t,this.provider=n,this._isResolved=!1}with(e){let t=new i(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return pC(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,n;return pC(this,void 0,void 0,function*(){try{let r=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=r==null?void 0:r.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(n=r==null?void 0:r.label)!==null&&n!==void 0?n:this.hint.label,this._isResolved=!0}catch(r){Ut(r),this._isResolved=!1}})}},Mg=class i{static create(e,t,n,r){return pC(this,void 0,void 0,function*(){let o=[],s=e.ordered(t).reverse().map(a=>n.map(l=>pC(this,void 0,void 0,function*(){try{let c=yield a.provideInlayHints(t,l,r);c!=null&&c.hints.length&&o.push([c,a])}catch(c){Ut(c)}})));if(yield Promise.all(s.flat()),r.isCancellationRequested||t.isDisposed())throw new l_;return new i(n,o,t)})}constructor(e,t,n){this._disposables=new ne,this.ranges=e,this.provider=new Set;let r=[];for(let[o,s]of t){this._disposables.add(o),this.provider.add(s);for(let a of o.hints){let l=n.validatePosition(a.position),c="before",d=i._getRangeAtPosition(n,l),u;d.getStartPosition().isBefore(l)?(u=P.fromPositions(d.getStartPosition(),l),c="after"):(u=P.fromPositions(l,d.getEndPosition()),c="before"),r.push(new hk(a,new Lg(u,c),s))}}this.items=r.sort((o,s)=>Se.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let n=t.lineNumber,r=e.getWordAtPosition(t);if(r)return new P(n,r.startColumn,n,r.endColumn);e.tokenization.tokenizeIfCheap(n);let o=e.tokenization.getLineTokens(n),s=t.column-1,a=o.findTokenIndexAtOffset(s),l=o.getStartOffset(a),c=o.getEndOffset(a);return c-l===1&&(l===s&&a>1?(l=o.getStartOffset(a-1),c=o.getEndOffset(a-1)):c===s&&aTR(m)?m.command.id:Cd()));for(let m of Ss.all())h.has(m.desc.id)&&u.push(new ns(m.desc.id,da.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>Dg(this,void 0,void 0,function*(){let g=yield o.createModelReference(d.uri);try{let b=new oh(g.object.textEditorModel,P.getStartPosition(d.range)),S=n.item.anchor.range;yield l.invokeFunction(m.runEditorCommand.bind(m),e,b,S)}finally{g.dispose()}})));if(n.part.command){let{command:m}=n.part;u.push(new ks),u.push(new ns(m.id,m.title,void 0,!0,()=>Dg(this,void 0,void 0,function*(){var g;try{yield a.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(b){c.notify({severity:pf.Error,source:n.item.provider.displayName,message:b})}})))}let p=e.getOption(123);s.showContextMenu({domForShadowRoot:p&&(r=e.getDomNode())!==null&&r!==void 0?r:void 0,getAnchor:()=>{let m=wn(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function mC(i,e,t,n){return Dg(this,void 0,void 0,function*(){let o=yield i.get(xn).createModelReference(n.uri);yield t.invokeWithinContext(s=>Dg(this,void 0,void 0,function*(){let a=e.hasSideBySideModifier,l=s.get(Ke),c=Pn.inPeekEditor.getValue(l),d=!a&&t.getOption(85)&&!c;return new gc({openToSide:a,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new oh(o.object.textEditorModel,P.getStartPosition(n.range)),P.lift(n.range))})),o.dispose()})}var Dg,pk=M(()=>{Ht();Pc();gi();K0();qe();ca();Cg();th();Yi();zi();ft();Tl();Et();Oo();Dg=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}});function $0e(i){let e="\xA0";return i.replace(/[ \t]/g,e)}var G0e,Lp,Mp,mk,lY,Dp,gk,_c,bk=M(()=>{Ht();oi();Dt();gi();At();Ce();tf();Mi();Sn();KP();cb();Xm();xa();qe();br();Kc();qn();Ns();xt();ca();wg();fk();pk();zi();bl();Et();Oo();_r();ar();G0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Lp=function(i,e){return function(t,n){e(t,n,i)}},Mp=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},mk=class i{constructor(){this._entries=new fa(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let n=i._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},lY=rr("IInlayHintsCache");sr(lY,mk,1);Dp=class{constructor(e,t){this.item=e,this.index=t}get part(){let e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}},gk=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},_c=class vk{static get(e){var t;return(t=e.getContribution(vk.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,n,r,o,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=r,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new ne,this._sessionDisposables=new ne,this._decorationsMetadata=new Map,this._ruleFactory=new Cb(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(136)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(136);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;let n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(Ft(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let r,o=new Set,s=new ti(()=>Mp(this,void 0,void 0,function*(){let a=Date.now();r==null||r.dispose(!0),r=new Ri;let l=t.onWillDispose(()=>r==null?void 0:r.cancel());try{let c=r.token,d=yield Mg.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),c);if(s.delay=this._debounceInfo.update(t,Date.now()-a),c.isCancellationRequested){d.dispose();return}for(let u of d.provider)typeof u.onDidChangeInlayHints=="function"&&!o.has(u)&&(o.add(u),this._sessionDisposables.add(u.onDidChangeInlayHints(()=>{s.isScheduled()||s.schedule()})));this._sessionDisposables.add(d),this._updateHintsDecorators(d.ranges,d.items),this._cacheHintsForFastRestore(t)}catch(c){at(c)}finally{r.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(s),this._sessionDisposables.add(Ft(()=>r==null?void 0:r.dispose(!0))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||!s.isScheduled())&&s.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(a=>{let l=Math.max(s.delay,1250);s.schedule(l)})),e.enabled==="on")this._activeRenderMode=0;else{let a,l;e.enabled==="onUnlessPressed"?(a=0,l=1):(a=1,l=0),this._activeRenderMode=a,this._sessionDisposables.add(hR.getInstance().event(c=>{if(!this._editor.hasModel())return;let d=c.altKey&&c.ctrlKey&&!(c.shiftKey||c.metaKey)?l:a;if(d!==this._activeRenderMode){this._activeRenderMode=d;let u=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(u);this._updateHintsDecorators([u.getFullModelRange()],h),s.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>s.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){let e=new ne,t=e.add(new sl(this._editor)),n=new ne;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(r=>{let[o]=r,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){n.clear();return}let l=new Ri;n.add(Ft(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new gk(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,d=new P(c,1,c,a.getLineMaxColumn(c)),u=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],u),n.add(Ft(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],u)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(r=>Mp(this,void 0,void 0,function*(){let o=this._getInlayHintLabelPart(r);if(o){let s=o.part;s.location?this._instaService.invokeFunction(mC,r,this._editor,s.location):XO.is(s.command)&&(yield this._invokeCommand(s.command,o.item))}}))),e}_getInlineHintsForRange(e){let t=new Set;for(let n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>Mp(this,void 0,void 0,function*(){if(t.event.detail!==2)return;let n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),yield n.item.resolve(et.None),Wi(n.item.hint.textEdits))){let r=n.item.hint.textEdits.map(o=>Kt.replace(P.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",r),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>Mp(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;let t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(aY,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;let n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(n instanceof ff&&(n==null?void 0:n.attachedData)instanceof Dp)return n.attachedData}_invokeCommand(e,t){var n;return Mp(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(n=e.arguments)!==null&&n!==void 0?n:[])}catch(r){this._notificationService.notify({severity:pf.Error,source:t.provider.displayName,message:r})}})}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[n,r]of this._decorationsMetadata){if(t.has(r.item))continue;let o=e.getDecorationRange(n);if(o){let s=new Lg(o,r.item.anchor.direction),a=r.item.with({anchor:s});t.set(r.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=[];for(let o of n.sort(P.compareRangesUsingStarts)){let s=t.validateRange(new P(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));r.length===0||!P.areIntersectingOrTouching(r[r.length-1],s)?r.push(s):r[r.length-1]=P.plusRange(r[r.length-1],s)}return r}_updateHintsDecorators(e,t){var n,r;let o=[],s=(g,b,S,k,N)=>{let A={content:S,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:b.className,cursorStops:k,attachedData:N};o.push({item:g,classNameRef:b,decoration:{range:g.anchor.range,options:{description:"InlayHint",showIfCollapsed:g.anchor.range.isEmpty(),collapseOnReplaceEdit:!g.anchor.range.isEmpty(),stickiness:0,[g.anchor.direction]:this._activeRenderMode===0?A:void 0}}})},a=(g,b)=>{let S=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(g,S,"\u200A",b?ou.Right:ou.None)},{fontSize:l,fontFamily:c,padding:d,isUniform:u}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,c);for(let g of t){g.hint.paddingLeft&&a(g,!1);let b=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let S=0;Svk._MAX_DECORATORS)break}let p=[];for(let g of e)for(let{id:b}of(r=this._editor.getDecorationsInRange(g))!==null&&r!==void 0?r:[]){let S=this._decorationsMetadata.get(b);S&&(p.push(b),S.classNameRef.dispose(),this._decorationsMetadata.delete(b))}let m=Ea.capture(this._editor);this._editor.changeDecorations(g=>{let b=g.deltaDecorations(p,o.map(S=>S.decoration));for(let S=0;Sn)&&(o=n);let s=e.fontFamily||r;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===r&&o===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};_c.ID="editor.contrib.InlayHints";_c._MAX_DECORATORS=1500;_c=G0e([Lp(1,be),Lp(2,an),Lp(3,lY),Lp(4,ui),Lp(5,Ei),Lp(6,He)],_c);St.registerCommand("_executeInlayHintProvider",(i,...e)=>Mp(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(ht.isUri(t)),Lt(P.isIRange(n));let{inlayHintsProvider:r}=i.get(be),o=yield i.get(xn).createModelReference(t);try{let s=yield Mg.create(r,o.object.textEditorModel,[P.lift(n)],et.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}}))});var Y0e,Ng,cY,X0e,gC,vC,dY=M(()=>{Dt();Sl();ri();qn();lc();ss();ca();VT();rC();bk();jn();ds();xt();De();nr();fk();oi();Y0e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ng=function(i,e){return function(t,n){e(t,n,i)}},cY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},X0e=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof __values=="function"?__values(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},gC=class extends bd{constructor(e,t,n,r){super(10,t,e.item.anchor.range,n,r,!0),this.part=e}},vC=class extends Ap{constructor(e,t,n,r,o,s){super(e,t,n,r,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!_c.get(this._editor)||e.target.type!==6)return null;let r=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return r instanceof ff&&r.attachedData instanceof Dp?new gC(r.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof gC?new Rr(r=>cY(this,void 0,void 0,function*(){var o,s,a,l;let{part:c}=e;if(yield c.item.resolve(n),n.isCancellationRequested)return;let d;typeof c.item.hint.tooltip=="string"?d=new sn().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&r.emitOne(new no(this,e.range,[d],!1,0)),Wi(c.item.hint.textEdits)&&r.emitOne(new no(this,e.range,[new sn().appendText(v("hint.dbl","Double-click to insert"))],!1,10001));let u;if(typeof c.part.tooltip=="string"?u=new sn().appendText(c.part.tooltip):c.part.tooltip&&(u=c.part.tooltip),u&&r.emitOne(new no(this,e.range,[u],!1,1)),c.part.location||c.part.command){let b,k=this._editor.getOption(75)==="altKey"?zn?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):zn?v("links.navigate.kb.alt.mac","option + click"):v("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?b=new sn().appendText(v("hint.defAndCommand","Go to Definition ({0}), right click for more",k)):c.part.location?b=new sn().appendText(v("hint.def","Go to Definition ({0})",k)):c.part.command&&(b=new sn(`[${v("hint.cmd","Execute Command")}](${sY(c.part.command)} "${c.part.command.title}") (${k})`,{isTrusted:!0})),b&&r.emitOne(new no(this,e.range,[b],!1,1e4))}let h=yield this._resolveInlayHintLabelPartHover(c,n);try{for(var p=!0,m=X0e(h),g;g=yield m.next(),o=g.done,!o;p=!0){l=g.value,p=!1;let b=l;r.emitOne(b)}}catch(b){s={error:b}}finally{try{!p&&!o&&(a=m.return)&&(yield a.call(m))}finally{if(s)throw s.error}}})):Rr.EMPTY}_resolveInlayHintLabelPartHover(e,t){return cY(this,void 0,void 0,function*(){if(!e.part.location)return Rr.EMPTY;let{uri:n,range:r}=e.part.location,o=yield this._resolverService.createModelReference(n);try{let s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?kg(this._languageFeaturesService.hoverProvider,s,new Se(r.startLineNumber,r.startColumn),t).filter(a=>!jc(a.hover.contents)).map(a=>new no(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Rr.EMPTY}finally{o.dispose()}})}};vC=Y0e([Ng(1,Xi),Ng(2,Qi),Ng(3,Mt),Ng(4,xn),Ng(5,be)],vC)});var yk=M(()=>{Ze();lc();bk();dY();Ae(_c.ID,_c,1);jo.register(vC)});var _C,uY=M(()=>{Mn();_C=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new je(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new je(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var hY=M(()=>{});var fY=M(()=>{hY()});var xk=gt(Rg=>{Dt();At();lu();Ze();qe();Mn();jt();qn();ub();De();uY();fY();var Q0e=Rg&&Rg.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},J0e=Rg&&Rg.__param||function(i,e){return function(t,n){e(t,n,i)}},Ad=class Ck{static get(e){return e.getContribution(Ck.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();let r=this.editor.getSelection(),o=this.editor.getModel();if(!o||!r)return;let s=r;if(s.startLineNumber!==s.endLineNumber)return;let a=new Q_(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Vt(c=>this.editorWorkerService.navigateValueSet(l,s,t)),this.currentRequest.then(c=>{var d;if(!c||!c.range||!c.value||!a.validate(this.editor))return;let u=P.lift(c.range),h=c.range,p=c.value.length-(s.endColumn-s.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+c.value.length},p>1&&(s=new je(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+p-1));let m=new _C(u,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:Ck.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=of(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(at)}).catch(at)):Promise.resolve(void 0)}};Ad.ID="editor.contrib.inPlaceReplaceController";Ad.DECORATION=ct.register({description:"in-place-replace",className:"valueSetReplacement"});Ad=Q0e([J0e(1,Ml)],Ad);var Sk=class extends se{constructor(){super({id:"editor.action.inPlaceReplace.up",label:v("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=Ad.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},wk=class extends se{constructor(){super({id:"editor.action.inPlaceReplace.down",label:v("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=Ad.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Ae(Ad.ID,Ad,4);X(Sk);X(wk)});var Ek,Tk=M(()=>{Ze();DR();jt();De();Ek=class extends se{constructor(){super({id:"expandLineSelection",label:v("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:O.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;let r=t._getViewModel();r.model.pushStackElement(),r.setCursorStates(n.source,3,Nm.expandLineSelection(r,r.getCursorStates())),r.revealPrimaryCursor(n.source,!0)}};X(Ek)});function Z0e(i,e){e.sort((s,a)=>s.lineNumber===a.lineNumber?s.column-a.column:s.lineNumber-a.lineNumber);for(let s=e.length-2;s>=0;s--)e[s].lineNumber===e[s+1].lineNumber&&e.splice(s,1);let t=[],n=0,r=0,o=e.length;for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineContent(s),c=l.length+1,d=0;if(r{wi();xa();qe();bC=class{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let n=Z0e(e,this._cursors);for(let r=0,o=n.length;r{qe();Mn();Og=class{constructor(e,t,n){this._selection=e,this._isCopyingDown=t,this._noop=n||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let n=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,n.startLineNumber{Si();_w();qe();Mn();lre();Kn();dk();qR();dre();ege=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tge=function(i,e){return function(t,n){e(t,n,i)}},MC=class{constructor(e,t,n,r){this._languageConfigurationService=r,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let n=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let r=this._selection;r.startLineNumbere.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,u)=>e.getLanguageIdAtPosition(d,u)},getLineContent:null};if(r.startLineNumber===r.endLineNumber&&e.getLineMaxColumn(r.startLineNumber)===1){let d=r.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new P(1,1,1,1),null):(t.addEditOperation(new P(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new P(u,1,u,e.getLineMaxColumn(u)),null)),r=new je(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=r.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new P(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,r)){let p=this.matchEnterRule(e,l,o,d,r.startLineNumber-1);if(p!==null){let g=zi(e.getLineContent(d)),b=p+Tr(g,o);h=ch(b,o,a)+this.trimLeft(u)}else{c.getLineContent=b=>b===r.startLineNumber?e.getLineContent(d):e.getLineContent(b);let g=iu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber,l,this._languageConfigurationService);if(g!==null){let b=zi(e.getLineContent(d)),S=Tr(g,o),k=Tr(b,o);S!==k&&(h=ch(S,o,a)+this.trimLeft(u))}}t.addEditOperation(new P(r.startLineNumber,1,r.startLineNumber,1),h+` -`);let m=this.matchEnterRuleMovingDown(e,l,o,r.startLineNumber,d,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,m);else{c.getLineContent=b=>b===r.startLineNumber?h:b>=r.startLineNumber+1&&b<=r.endLineNumber+1?e.getLineContent(b-1):e.getLineContent(b);let g=iu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber+1,l,this._languageConfigurationService);if(g!==null){let b=zi(e.getLineContent(r.startLineNumber)),S=Tr(g,o),k=Tr(b,o);if(S!==k){let N=S-k;this.getIndentEditsOfMovingBlock(e,t,r,o,a,N)}}}}else t.addEditOperation(new P(r.startLineNumber,1,r.startLineNumber,1),h+` +`+o),this._selectionId=t.trackSelection(n),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let r=n.startLineNumber,o=n.startColumn,s=n.endLineNumber,a=n.endColumn;this._startLineNumberDelta!==0&&(r=r+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,a=1),n=je.createWithDirection(r,o,s,a,this._selectionDirection)}return n}}});var ege,tge,yC,gY=M(()=>{wi();vw();qe();Mn();cre();Kn();ok();VR();ure();ege=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tge=function(i,e){return function(t,n){e(t,n,i)}},yC=class{constructor(e,t,n,r){this._languageConfigurationService=r,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let n=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let r=this._selection;r.startLineNumbere.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,u)=>e.getLanguageIdAtPosition(d,u)},getLineContent:null};if(r.startLineNumber===r.endLineNumber&&e.getLineMaxColumn(r.startLineNumber)===1){let d=r.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new P(1,1,1,1),null):(t.addEditOperation(new P(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new P(u,1,u,e.getLineMaxColumn(u)),null)),r=new je(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=r.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new P(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,r)){let p=this.matchEnterRule(e,l,o,d,r.startLineNumber-1);if(p!==null){let g=Ui(e.getLineContent(d)),b=p+kr(g,o);h=ch(b,o,a)+this.trimLeft(u)}else{c.getLineContent=b=>b===r.startLineNumber?e.getLineContent(d):e.getLineContent(b);let g=nu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber,l,this._languageConfigurationService);if(g!==null){let b=Ui(e.getLineContent(d)),S=kr(g,o),k=kr(b,o);S!==k&&(h=ch(S,o,a)+this.trimLeft(u))}}t.addEditOperation(new P(r.startLineNumber,1,r.startLineNumber,1),h+` +`);let m=this.matchEnterRuleMovingDown(e,l,o,r.startLineNumber,d,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,m);else{c.getLineContent=b=>b===r.startLineNumber?h:b>=r.startLineNumber+1&&b<=r.endLineNumber+1?e.getLineContent(b-1):e.getLineContent(b);let g=nu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),r.startLineNumber+1,l,this._languageConfigurationService);if(g!==null){let b=Ui(e.getLineContent(r.startLineNumber)),S=kr(g,o),k=kr(b,o);if(S!==k){let N=S-k;this.getIndentEditsOfMovingBlock(e,t,r,o,a,N)}}}}else t.addEditOperation(new P(r.startLineNumber,1,r.startLineNumber,1),h+` `)}else if(d=r.startLineNumber-1,u=e.getLineContent(d),t.addEditOperation(new P(d,1,d+1,1),null),t.addEditOperation(new P(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),` -`+u),this.shouldAutoIndent(e,r)){c.getLineContent=p=>p===d?e.getLineContent(r.startLineNumber):e.getLineContent(p);let h=this.matchEnterRule(e,l,o,r.startLineNumber,r.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,h);else{let p=iu(this._autoIndent,c,e.getLanguageIdAtPosition(r.startLineNumber,1),d,l,this._languageConfigurationService);if(p!==null){let m=zi(e.getLineContent(r.startLineNumber)),g=Tr(p,o),b=Tr(m,o);if(g!==b){let S=g-b;this.getIndentEditsOfMovingBlock(e,t,r,o,a,S)}}}}}this._selectionId=t.trackSelection(r)}buildIndentConverter(e,t,n){return{shiftIndent:r=>Uc.shiftIndent(r,r.length+1,e,t,n),unshiftIndent:r=>Uc.unshiftIndent(r,r.length+1,e,t,n)}}parseEnterResult(e,t,n,r,o){if(o){let s=o.indentation;o.indentAction===Om.None||o.indentAction===Om.Indent?s=o.indentation+o.appendText:o.indentAction===Om.IndentOutdent?s=o.indentation:o.indentAction===Om.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(r);if(this.trimLeft(a).indexOf(this.trimLeft(s))>=0){let l=zi(e.getLineContent(r)),c=zi(s),d=D_(e,r,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));let u=Tr(c,n),h=Tr(l,n);return u-h}}return null}matchEnterRuleMovingDown(e,t,n,r,o,s){if(Qh(s)>=0){let a=e.getLineMaxColumn(o),l=M_(this._autoIndent,e,new P(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,l)}else{let a=r-1;for(;a>=1;){let d=e.getLineContent(a);if(Qh(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=M_(this._autoIndent,e,new P(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}}matchEnterRule(e,t,n,r,o,s){let a=o;for(;a>=1;){let d;if(a===o&&s!==void 0?d=s:d=e.getLineContent(a),Qh(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=M_(this._autoIndent,e,new P(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1),r=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==r||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,r,o,s){for(let a=n.startLineNumber;a<=n.endLineNumber;a++){let l=e.getLineContent(a),c=zi(l),u=Tr(c,r)+s,h=ch(u,r,o);h!==c&&(t.addEditOperation(new P(a,1,a,c.length+1),h),a===n.endLineNumber&&n.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=r)return null;let o=[];for(let a=n;a<=r;a++)o.push(i.getLineContent(a));let s=o.slice(0);return s.sort(dh.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:n,endLineNumber:r,before:o,after:s}}function ige(i,e,t){let n=FY(i,e,t);return n?Kt.replace(new P(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(` -`)):null}var dh,HY=M(()=>{xa();qe();dh=class i{static getCollator(){return i._COLLATOR||(i._COLLATOR=new Intl.Collator),i._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let n=ige(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,n){if(e===null)return!1;let r=FY(e,t,n);if(!r)return!1;for(let o=0,s=r.before.length;o{gl();R_();Ze();E_();RY();hre();xa();ri();qe();Mn();jt();OY();PY();HY();De();Yi();Kn();DC=class extends se{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let n=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));n.sort((s,a)=>P.compareRangesUsingStarts(s.selection,a.selection));let r=n[0];for(let s=1;snew Se(a.positionLineNumber,a.positionColumn)));let o=t.getSelection();if(o===null)return;let s=new LC(o,r);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};OC.ID="editor.action.trimTrailingWhitespace";zk=class extends se{constructor(){super({id:"editor.action.deleteLines",label:v("lines.delete","Delete Line"),alias:"Delete Line",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),r=t.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let o=0,s=[],a=[];for(let l=0,c=n.length;l1&&(u-=1,p=r.getLineMaxColumn(u)),s.push(Kt.replace(new je(u,p,h,m),"")),a.push(new je(u-o,d.positionColumn,u-o,d.positionColumn)),o+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(o=>{let s=o.endLineNumber;return o.startLineNumbero.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);let n=[],r=t[0];for(let o=1;o=t[o].startLineNumber?r.endLineNumber=t[o].endLineNumber:(n.push(r),r=t[o]);return n.push(r),n}},Uk=class extends se{constructor(){super({id:"editor.action.indentLines",label:v("lines.indent","Indent Line"),alias:"Indent Line",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2142,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,N_.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},Wk=class extends se{constructor(){super({id:"editor.action.outdentLines",label:v("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2140,weight:100}})}run(e,t){ef.Outdent.runEditorCommand(e,t,null)}},jk=class extends se{constructor(){super({id:"editor.action.insertLineBefore",label:v("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3075,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,N_.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}},Vk=class extends se{constructor(){super({id:"editor.action.insertLineAfter",label:v("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2051,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,N_.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}},PC=class extends se{run(e,t){if(!t.hasModel())return;let n=t.getSelection(),r=this._getRangesToDelete(t),o=[];for(let l=0,c=r.length-1;lKt.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},Kk=class extends PC{constructor(){super({id:"deleteAllLeft",label:v("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,r=[],o=0;return t.forEach(s=>{let a;if(s.endColumn===1&&o>0){let l=s.startLineNumber-o;a=new je(l,s.startColumn,l,s.startColumn)}else a=new je(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?n=a:r.push(a)}),n&&r.unshift(n),r}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let n=t,r=e.getModel();return r===null?[]:(n.sort(P.compareRangesUsingStarts),n=n.map(o=>{if(o.isEmpty())if(o.startColumn===1){let s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:r.getLineContent(s).length+1;return new P(s,a,o.startLineNumber,1)}else return new P(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new P(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),n)}},qk=class extends PC{constructor(){super({id:"deleteAllRight",label:v("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,r=[];for(let o=0,s=t.length,a=0;o{if(o.isEmpty()){let s=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new P(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new P(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return r.sort(P.compareRangesUsingStarts),r}},Gk=class extends se{constructor(){super({id:"editor.action.joinLines",label:v("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getSelection();if(r===null)return;n.sort(P.compareRangesUsingStarts);let o=[],s=n.reduce((h,p)=>h.isEmpty()?h.endLineNumber===p.startLineNumber?(r.equalsSelection(h)&&(r=p),p):p.startLineNumber>h.endLineNumber+1?(o.push(h),p):new je(h.startLineNumber,h.startColumn,p.endLineNumber,p.endColumn):p.startLineNumber>h.endLineNumber?(o.push(h),p):new je(h.startLineNumber,h.startColumn,p.endLineNumber,p.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],d=r,u=0;for(let h=0,p=o.length;h=1){let Ne=!0;H===""&&(Ne=!1),Ne&&(H.charAt(H.length-1)===" "||H.charAt(H.length-1)===" ")&&(Ne=!1,H=H.replace(/[\s\uFEFF\xA0]+$/g," "));let he=re.substr(ae-1);H+=(Ne?" ":"")+he,Ne?S=he.length+1:S=he.length}else S=0}let K=new P(g,b,k,N);if(!K.isEmpty()){let W;m.isEmpty()?(l.push(Kt.replace(K,H)),W=new je(K.startLineNumber-u,H.length-S+1,g-u,H.length-S+1)):m.startLineNumber===m.endLineNumber?(l.push(Kt.replace(K,H)),W=new je(m.startLineNumber-u,m.startColumn,m.endLineNumber-u,m.endColumn)):(l.push(Kt.replace(K,H)),W=new je(m.startLineNumber-u,m.startColumn,m.startLineNumber-u,H.length-A)),P.intersectRanges(K,r)!==null?d=W:c.push(W)}u+=K.endLineNumber-K.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},$k=class extends se{constructor(){super({id:"editor.action.transpose",label:v("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:O.writable})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=[];for(let s=0,a=n.length;s=d){if(c.lineNumber===r.getLineCount())continue;let u=new P(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new _l(new je(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let u=new P(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new x_(u,h,new je(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},Md=class extends se{run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=t.getOption(126),s=[];for(let a of n)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let d=new P(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=r.getValueInRange(d);s.push(Kt.replace(d,this._modifyText(u,o)))}else{let l=r.getValueInRange(a);s.push(Kt.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},Yk=class extends Md{constructor(){super({id:"editor.action.transformToUppercase",label:v("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:O.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},Xk=class extends Md{constructor(){super({id:"editor.action.transformToLowercase",label:v("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:O.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},bc=class{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return this.get()!==null}},Fg=class i extends Md{constructor(){super({id:"editor.action.transformToTitlecase",label:v("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:O.writable})}_modifyText(e,t){let n=i.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,r=>r.toLocaleUpperCase()):e}};Fg.titleBoundary=new bc("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");uh=class i extends Md{constructor(){super({id:"editor.action.transformToSnakecase",label:v("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:O.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get();return!n||!r?e:e.replace(n,"$1_$2").replace(r,"$1_$2$3").toLocaleLowerCase()}};uh.caseBoundary=new bc("(\\p{Ll})(\\p{Lu})","gmu");uh.singleLetters=new bc("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");Hg=class i extends Md{constructor(){super({id:"editor.action.transformToCamelcase",label:v("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:O.writable})}_modifyText(e,t){let n=i.wordBoundary.get();if(!n)return e;let r=e.split(n);return r.shift()+r.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}};Hg.wordBoundary=new bc("[_\\s-]","gm");hh=class i extends Md{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:v("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:O.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get(),o=i.underscoreBoundary.get();return!n||!r||!o?e:e.replace(o,"$1-$3").replace(n,"$1-$2").replace(r,"$1-$2").toLocaleLowerCase()}};hh.caseBoundary=new bc("(\\p{Ll})(\\p{Lu})","gmu");hh.singleLetters=new bc("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");hh.underscoreBoundary=new bc("(\\S)(_)(\\S)","gm");X(Dk);X(Nk);X(Rk);X(Ok);X(Pk);X(Fk);X(Hk);X(Bk);X(OC);X(zk);X(Uk);X(Wk);X(jk);X(Vk);X(Kk);X(qk);X(Gk);X($k);X(Yk);X(Xk);uh.caseBoundary.isSupported()&&uh.singleLetters.isSupported()&&X(uh);Hg.wordBoundary.isSupported()&&X(Hg);Fg.titleBoundary.isSupported()&&X(Fg);hh.isSupported()&&X(hh)});var BY=M(()=>{});var zY=M(()=>{BY()});function WY(i,e,t,n){let r=i.ordered(e);return F_(r.map(o=>()=>Jk(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,n)}catch(s){Ut(s);return}})),o=>!!o&&Ui(o==null?void 0:o.ranges))}var nge,FC,Jk,UY,rge,Dd,eI,oge,Pet,iI=M(()=>{oi();Dt();gi();ma();At();qt();Ce();Si();Sn();Ze();Ar();ri();qe();jt();qn();Kn();De();ft();xt();_r();Ns();ml();zY();nge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FC=function(i,e){return function(t,n){e(t,n,i)}},Jk=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},UY=new nt("LinkedEditingInputVisible",!1),rge="linked-editing-decoration",Dd=class Zk extends oe{static get(e){return e.getContribution(Zk.ID)}constructor(e,t,n,r,o){super(),this.languageConfigurationService=r,this._syncRangesToken=0,this._localToDispose=this._register(new ne),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=UY.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new ne),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(67)||s.hasChanged(89))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(67)||this._editor.getOption(89))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(li.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let r=new No(this._debounceInformation.get(t)),o=()=>{var l;this._rangeUpdateTriggerPromise=r.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},s=new No(0),a=l=>{this._rangeSyncTriggerPromise=s.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{o()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let c=this._currentDecorations.getRange(0);if(c&&l.changes.every(d=>c.intersectRanges(d.range))){a(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{r.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();let r=t.getValueInRange(n);if(this._currentWordPattern){let s=r.match(this._currentWordPattern);if((s?s[0].length:0)!==r.length)return this.clearRanges()}let o=[];for(let s=1,a=this._currentDecorations.length;s1){this.clearRanges();return}let n=this._editor.getModel(),r=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===r){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let s=this._currentDecorations.getRange(0);if(s&&s.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=r;let o=Vt(s=>Jk(this,void 0,void 0,function*(){try{let a=new Ln(!1),l=yield WY(this._providers,n,t,s);if(this._debounceInformation.update(n,a.elapsed()),o!==this._currentRequest||(this._currentRequest=null,r!==n.getVersionId()))return;let c=[];l!=null&&l.ranges&&(c=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let d=!1;for(let h=0,p=c.length;h({range:h,options:Zk.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){Zo(a)||at(a),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};Dd.ID="editor.contrib.linkedEditing";Dd.DECORATION=ct.register({description:"linked-editing",stickiness:0,className:rge});Dd=nge([FC(1,Ke),FC(2,be),FC(3,Tt),FC(4,an)],Dd);eI=class extends se{constructor(){super({id:"editor.action.linkedEditing",label:v("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:ce.and(O.writable,O.hasRenameProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let n=e.get(Zt),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return ht.isUri(r)&&Se.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},at):super.runCommand(e,t)}run(e,t){let n=Dd.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}},oge=wi.bindToContribution(Dd.get);Me(new oge({id:"cancelLinkedEditingInput",precondition:UY,handler:i=>i.clearRanges(),kbOpts:{kbExpr:O.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));Pet=Oe("editor.linkedEditingBackground",{dark:dt.fromHex("#f00").transparent(.3),light:dt.fromHex("#f00").transparent(.3),hcDark:dt.fromHex("#f00").transparent(.3),hcLight:dt.white},v("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Gr("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:n}=i.get(be);return WY(n,e,t,et.None)});Ae(Dd.ID,Dd,1);X(eI)});var jY=M(()=>{});var VY=M(()=>{jY()});function rI(i,e,t){let n=[],r=i.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,t)).then(a=>{a&&(n[s]=[a,o])},Ut));return Promise.all(r).then(()=>{let o=new HC(vr(n));return t.isCancellationRequested?(o.dispose(),new HC([])):o})}var KY,nI,HC,qY=M(()=>{oi();gi();At();Ce();Li();Sn();qe();ts();Bi();xt();KY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},nI=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return KY(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}},HC=class i{constructor(e){this._disposables=new ne;let t=[];for(let[n,r]of e){let o=n.links.map(s=>new nI(s,r));t=i._union(t,o),u_(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let n=[],r,o,s,a;for(r=0,s=0,o=e.length,a=t.length;rKY(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht),typeof n!="number"&&(n=0);let{linkProvider:r}=i.get(be),o=i.get(Ci).getModel(t);if(!o)return[];let s=yield rI(r,o,et.None);if(!s)return[];for(let l=0;l{Dt();gi();At();Sl();Ce();Am();nr();lo();ml();Sn();VY();Ze();qn();Ns();xt();xg();qY();De();Ro();cs();sge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},BC=function(i,e){return function(t,n){e(t,n,i)}},age=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Op=class $Y extends oe{static get(e){return e.getContribution($Y.ID)}constructor(e,t,n,r,o){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=r,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new ti(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new al(e));this._register(s.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(s.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(s.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(68)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return age(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(68))return;let e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Vt(t=>rI(this.providers,e,t));try{let t=new Ln(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){at(t)}finally{this.computePromise=null}}})}updateDecorations(e){let t=this.editor.getOption(75)==="altKey",n=[],r=Object.keys(this.currentOccurrences);for(let s of r){let a=this.currentOccurrences[s];n.push(a.decorationId)}let o=[];if(e)for(let s of e)o.push(zC.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(n,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l{r.activate(o,n),this.activeLinkDecorationId=r.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(75)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;let{link:r}=e;r.resolve(et.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===Ao.file&&o.startsWith(`${Ao.file}:`)){let a=ht.parse(o);if(a.scheme===Ao.file){let l=nO(a),c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(o=sO(s,c))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{let s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(v("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):s==="missing"?this.notificationService.warn(v("missing.url","Failed to open this link because its target is missing.")):at(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;let t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(let n of t){let r=this.currentOccurrences[n.id];if(r)return r}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};Op.ID="editor.linkDetector";Op=sge([BC(1,Qi),BC(2,xi),BC(3,be),BC(4,an)],Op);GY={general:ct.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:ct.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},zC=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,n){let r=Object.assign({},n?GY.active:GY.general);return r.hoverMessage=lge(e,t),r}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!1))}};oI=class extends se{constructor(){super({id:"editor.action.openLink",label:v("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=Op.get(t);if(!n||!t.hasModel())return;let r=t.getSelections();for(let o of r){let s=n.getLinkOccurrence(o.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}};Ae(Op.ID,Op,1);X(oI)});var Bg,aI=M(()=>{Ce();Ze();Bg=class extends oe{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let n=this._editor.getOption(113);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};Bg.ID="editor.contrib.longLinesHelper";Ae(Bg.ID,Bg,2)});var YY=M(()=>{});var XY=M(()=>{YY()});function QY(i){return i===$m.Write?hge:i===$m.Text?fge:gge}function JY(i){return i?mge:pge}var UC,WC,cge,dge,uge,hge,fge,pge,mge,gge,lI=M(()=>{XY();Vc();qn();br();De();_r();ar();UC=Oe("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},v("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Oe("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},v("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Oe("editor.wordHighlightTextBackground",{light:UC,dark:UC,hcDark:UC,hcLight:UC},v("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);WC=Oe("editor.wordHighlightBorder",{light:null,dark:null,hcDark:va,hcLight:va},v("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));Oe("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:va,hcLight:va},v("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));Oe("editor.wordHighlightTextBorder",{light:WC,dark:WC,hcDark:WC,hcLight:WC},v("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));cge=Oe("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),dge=Oe("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},v("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),uge=Oe("editorOverviewRuler.wordHighlightTextForeground",{dark:cf,light:cf,hcDark:cf,hcLight:cf},v("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),hge=ct.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:vi(dge),position:$r.Center},minimap:{color:vi(Km),position:pa.Inline}}),fge=ct.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:vi(uge),position:$r.Center},minimap:{color:vi(Km),position:pa.Inline}}),pge=ct.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:vi(cf),position:$r.Center},minimap:{color:vi(Km),position:pa.Inline}}),mge=ct.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),gge=ct.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:vi(cge),position:$r.Center},minimap:{color:vi(Km),position:pa.Inline}});df((i,e)=>{let t=i.getColor(LO);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function Rd(i,e){let t=e.filter(n=>!i.find(r=>r.equals(n)));if(t.length>=1){let n=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),r=t.length===1?v("cursorAdded","Cursor added: {0}",n):v("cursorsAdded","Cursors added: {0}",n);mR(r)}}function tX(i,e,t){let n=ZY(i,e[0],!t);for(let r=1,o=e.length;r{Lo();Dt();gl();Ce();Ze();RR();qe();Mn();jt();Iy();De();Yi();ft();xt();lI();Et();vge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_ge=function(i,e){return function(t,n){e(t,n,i)}};cI=class extends se{constructor(){super({id:"editor.action.insertCursorAbove",label:v("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Rm.addCursorUp(o,s,r)),o.revealTopMostCursor(n.source),Rd(s,o.getCursorStates())}},dI=class extends se{constructor(){super({id:"editor.action.insertCursorBelow",label:v("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Rm.addCursorDown(o,s,r)),o.revealBottomMostCursor(n.source),Rd(s,o.getCursorStates())}},uI=class extends se{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:v("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let r=e.startLineNumber;r1&&n.push(new je(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),a=[];r.forEach(l=>this.getCursorsForSelection(l,n,a)),a.length>0&&t.setSelections(a),Rd(s,o.getCursorStates())}},hI=class extends se{constructor(){super({id:"editor.action.addCursorsToBottom",label:v("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=t.getModel().getLineCount(),o=[];for(let l=n[0].startLineNumber;l<=r;l++)o.push(new je(l,n[0].startColumn,l,n[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),Rd(a,s.getCursorStates())}},fI=class extends se{constructor(){super({id:"editor.action.addCursorsToTop",label:v("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=[];for(let a=n[0].startLineNumber;a>=1;a--)r.push(new je(a,n[0].startColumn,a,n[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();r.length>0&&t.setSelections(r),Rd(s,o.getCursorStates())}},Pp=class{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}},jC=class i{static create(e,t){if(!e.hasModel())return null;let n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new i(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let r=!1,o,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(r=!0,o=!0,s=!0):(o=n.wholeWord,s=n.matchCase);let l=e.getSelection(),c,d=null;if(l.isEmpty()){let u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;c=u.word,d=new je(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` -`);return new i(e,t,r,c,o,s,d)}constructor(e,t,n,r,o,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=r,this.wholeWord=o,this.matchCase=s,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new Pp(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new Pp(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return n?new je(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new Pp(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new Pp(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return n?new je(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824)}},fh=class i extends oe{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new ne),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=jC.create(this._editor,e);if(!t)return;this._session=t;let n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(r=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(r=>{(r.matchCase||r.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){let e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new je(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let r=e.getState().matchCase;if(!tX(this._editor.getModel(),t,r)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l0&&n.isRegex){let r=this._editor.getModel();n.searchScope?t=r.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(126):null,!1,1073741824):t=r.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(126):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){let r=this._editor.getSelection();for(let o=0,s=t.length;onew je(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};fh.ID="editor.contrib.multiCursorController";Nd=class extends se{run(e,t){let n=fh.get(t);if(!n)return;let r=t._getViewModel();if(r){let o=r.getCursorStates(),s=dr.get(t);if(s)this._run(n,s);else{let a=e.get(He).createInstance(dr,t);this._run(n,a),a.dispose()}Rd(o,r.getCursorStates())}}},pI=class extends Nd{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:v("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2082,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},mI=class extends Nd{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:v("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},gI=class extends Nd{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:v("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:di(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},vI=class extends Nd{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:v("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}},_I=class extends Nd{constructor(){super({id:"editor.action.selectHighlights",label:v("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:3114,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},bI=class extends Nd{constructor(){super({id:"editor.action.changeAll",label:v("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:ce.and(O.writable,O.editorTextFocus),kbOpts:{kbExpr:O.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},yI=class{constructor(e,t,n,r,o){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=r,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(P.compareRangesUsingStarts)),this._cachedFindMatches}},zg=class eX extends oe{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(104),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new ti(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(r=>{this._isEnabled=e.getOption(104)})),this._register(e.onDidChangeCursorSelection(r=>{this._isEnabled&&(r.selection.isEmpty()?r.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(r=>{this._setState(null)})),this._register(e.onDidChangeModelContent(r=>{this._isEnabled&&this.updateSoon.schedule()}));let n=dr.get(e);n&&this._register(n.getState().onFindReplaceStateChange(r=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(eX._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;let r=n.getSelection();if(r.startLineNumber!==r.endLineNumber)return null;let o=fh.get(n);if(!o)return null;let s=dr.get(n);if(!s)return null;let a=o.getSession(s);if(!a){let d=n.getSelections();if(d.length>1){let h=s.getState().matchCase;if(!tX(n.getModel(),d,h))return null}a=jC.create(n,s)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;let l=s.getState(),c=l.matchCase;if(l.isRevealed){let d=l.searchString;c||(d=d.toLowerCase());let u=a.searchText;if(c||(u=u.toLowerCase()),d===u&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new yI(n.getModel(),a.searchText,a.matchCase,a.wholeWord?n.getOption(126):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let n=this.state.findMatches(),r=this.editor.getSelections();r.sort(P.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=n.length,u=r.length;l=u)o.push(h),l++;else{let p=P.compareRangesUsingStarts(h,r[c]);p<0?((r[c].isEmpty()||!P.areIntersecting(h,r[c]))&&o.push(h),l++):(p>0||l++,c++)}}let s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(78),a=o.map(l=>({range:l,options:JY(s)}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};zg.ID="editor.contrib.selectionHighlighter";zg=vge([_ge(1,be)],zg);CI=class extends se{constructor(){super({id:"editor.action.focusNextCursor",label:v("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:v("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.shift();s&&(o.push(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Rd(o,r.getCursorStates()))}},SI=class extends se{constructor(){super({id:"editor.action.focusPreviousCursor",label:v("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:v("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.pop();s&&(o.unshift(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Rd(o,r.getCursorStates()))}};Ae(fh.ID,fh,4);Ae(zg.ID,zg,1);X(cI);X(dI);X(uI);X(pI);X(mI);X(gI);X(vI);X(_I);X(bI);X(hI);X(fI);X(CI);X(SI)});function xI(i,e,t,n,r){return iX(this,void 0,void 0,function*(){let o=i.ordered(e);for(let s of o)try{let a=yield s.provideSignatureHelp(e,t,r,n);if(a)return a}catch(a){Ut(a)}})}var iX,yc,VC=M(()=>{gi();At();Li();Sn();ri();br();xt();ca();Bi();ft();iX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},yc={Visible:new nt("parameterHintsVisible",!1),MultipleSignatures:new nt("parameterHintsMultipleSignatures",!1)};St.registerCommand("_executeSignatureHelpProvider",(i,...e)=>iX(void 0,void 0,void 0,function*(){let[t,n,r]=e;Lt(ht.isUri(t)),Lt(Se.isIPosition(n)),Lt(typeof r=="string"||!r);let o=i.get(be),s=yield i.get(xn).createModelReference(t);try{let a=yield xI(o.signatureHelpProvider,s.object.textEditorModel,Se.lift(n),{triggerKind:Ls.Invoke,isRetrigger:!1,triggerCharacter:r},et.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}}))});function yge(i,e){switch(e.triggerKind){case Ls.Invoke:return e;case Ls.ContentChange:return i;case Ls.TriggerCharacter:default:return e}}var bge,Od,Ug,nX=M(()=>{Dt();At();qt();Ce();fw();br();VC();bge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i.Default={type:0};class e{constructor(r,o){this.request=r,this.previouslyActiveHints=o,this.type=2}}i.Pending=e;class t{constructor(r){this.hints=r,this.type=1}}i.Active=t})(Od||(Od={}));Ug=class i extends oe{constructor(e,t,n=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new $e),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Od.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Hi),this.triggerChars=new eu,this.retriggerChars=new eu,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new No(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(r=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(r=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(r=>this.onCursorChange(r))),this._register(this.editor.onDidChangeModelContent(r=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(r=>this.onDidType(r))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=Od.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let n=this.editor.getModel();if(!n||!this.providers.has(n))return;let r=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(r),t).catch(at)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,r=this.editor.getOption(83).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,r=this.editor.getOption(83).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new Od.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return bge(this,void 0,void 0,function*(){let t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let r=this._pendingTriggers.reduce(yge);this._pendingTriggers=[];let o={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new Od.Pending(Vt(l=>xI(this.providers,s,a,o,l)),n);try{let l=yield this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new Od.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=Od.Default),at(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let n of t.signatureHelpTriggerCharacters||[])if(n.length){let r=n.charCodeAt(0);this.triggerChars.add(r),this.retriggerChars.add(r)}for(let n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:Ls.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(83).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};Ug.DEFAULT_DELAY=120});var rX=M(()=>{});var oX=M(()=>{rX()});var Cge,EI,xo,Sge,wge,Wg,aX=M(()=>{Ht();Lo();tb();or();qt();Ce();Si();Li();oX();os();Zu();VC();De();ft();cs();_r();Al();qr();Cge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EI=function(i,e){return function(t,n){e(t,n,i)}},xo=fe,Sge=Ei("parameter-hints-next",lt.chevronDown,v("parameterHintsNextIcon","Icon for show next parameter hint.")),wge=Ei("parameter-hints-previous",lt.chevronUp,v("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Wg=class sX extends oe{constructor(e,t,n,r,o){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new ne),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new io({editor:e},o,r)),this.keyVisible=yc.Visible.bindTo(n),this.keyMultipleSignatures=yc.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){let e=xo(".editor-widget.parameter-hints-widget"),t=me(e,xo(".phwrapper"));t.tabIndex=-1;let n=me(t,xo(".controls")),r=me(n,xo(".button"+mt.asCSSSelector(wge))),o=me(n,xo(".overloads")),s=me(n,xo(".button"+mt.asCSSSelector(Sge)));this._register(Rt(r,"click",h=>{Qd.stop(h),this.previous()})),this._register(Rt(s,"click",h=>{Qd.stop(h),this.next()}));let a=xo(".body"),l=new mf(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=me(a,xo(".signature")),d=me(a,xo(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:o,docs:d,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));let u=()=>{if(!this.domNodes)return;let h=this.editor.getOption(48);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};u(),this._register(li.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(h=>h.hasChanged(48)).on(u,null)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;let n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let r=e.signatures[e.activeSignature];if(!r)return;let o=me(this.domNodes.signature,xo(".code")),s=this.editor.getOption(48);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;let a=r.parameters.length>0,l=(t=r.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(o,r,l);else{let u=me(o,xo("span"));u.textContent=r.label}let c=r.parameters[l];if(c!=null&&c.documentation){let u=xo("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{let h=this.renderMarkdownDocs(c.documentation);u.appendChild(h.element)}me(this.domNodes.docs,xo("p",{},u))}if(r.documentation!==void 0)if(typeof r.documentation=="string")me(this.domNodes.docs,xo("p",{},r.documentation));else{let u=this.renderMarkdownDocs(r.documentation);me(this.domNodes.docs,u.element)}let d=this.hasDocs(r,c);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,c){let u="",h=r.parameters[l];Array.isArray(h.label)?u=r.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),r.documentation&&(u+=typeof r.documentation=="string"?`, ${r.documentation}`:`, ${r.documentation.value}`),this.announcedLabel!==u&&(Di(v("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var n;(n=this.domNodes)===null||n===void 0||n.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Rc(t.documentation).length>0||t&&typeof t.documentation=="object"&&Rc(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Rc(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Rc(e.documentation.value).length>0)}renderParameters(e,t,n){let[r,o]=this.getParameterLabelOffsets(t,n),s=document.createElement("span");s.textContent=t.label.substring(0,r);let a=document.createElement("span");a.textContent=t.label.substring(r,o),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(o),me(e,s,a,l)}getParameterLabelOffsets(e,t){let n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){let r=new RegExp(`(\\W|^)${vl(n.label)}(?=\\W|$)`,"g");r.test(e.label);let o=r.lastIndex-n.label.length;return o>=0?[o,r.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return sX.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};Wg.ID="editor.widget.parameterHintsWidget";Wg=Cge([EI(2,Ke),EI(3,Qi),EI(4,Xi)],Wg);Oe("editorHoverWidget.highlightForeground",{dark:ba,light:ba,hcDark:ba,hcLight:ba},v("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var xge,lX,ph,TI,kI,II,AI=M(()=>{rw();Ce();Ze();jt();br();xt();nX();VC();De();ft();Et();aX();xge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lX=function(i,e){return function(t,n){e(t,n,i)}},ph=class cX extends oe{static get(e){return e.getContribution(cX.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new Ug(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(r=>{var o;r?(this.widget.value.show(),this.widget.value.render(r)):(o=this.widget.rawValue)===null||o===void 0||o.hide()})),this.widget=new Xh(()=>this._register(t.createInstance(Wg,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};ph.ID="editor.controller.parameterHints";ph=xge([lX(1,He),lX(2,be)],ph);TI=class extends se{constructor(){super({id:"editor.action.triggerParameterHints",label:v("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:O.hasSignatureHelpProvider,kbOpts:{kbExpr:O.editorTextFocus,primary:3082,weight:100}})}run(e,t){let n=ph.get(t);n==null||n.trigger({triggerKind:Ls.Invoke})}};Ae(ph.ID,ph,2);X(TI);kI=100+75,II=wi.bindToContribution(ph.get);Me(new II({id:"closeParameterHints",precondition:yc.Visible,handler:i=>i.cancel(),kbOpts:{weight:kI,kbExpr:O.focus,primary:9,secondary:[1033]}}));Me(new II({id:"showPrevParameterHint",precondition:ce.and(yc.Visible,yc.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:kI,kbExpr:O.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));Me(new II({id:"showNextParameterHint",precondition:ce.and(yc.Visible,yc.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:kI,kbExpr:O.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var dX=M(()=>{});var uX=M(()=>{dX()});var Ege,LI,jg,KC,hX=M(()=>{Ce();uX();ri();De();ft();Gn();_r();ar();Ege=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},LI=function(i,e){return function(t,n){e(t,n,i)}},jg=new nt("renameInputVisible",!1,v("renameInputVisible","Whether the rename input widget is visible")),KC=class{constructor(e,t,n,r,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=r,this._disposables=new ne,this.allowEditorOverflow=!0,this._visibleContextKey=jg.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(48)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",v("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,n,r,o;if(!this._input||!this._domNode)return;let s=e.getColor(B_),a=e.getColor(z_);this._domNode.style.backgroundColor=String((t=e.getColor(xl))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.border=a?`1px solid ${a}`:"",this._domNode.style.color=String((n=e.getColor(CO))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((r=e.getColor(yO))!==null&&r!==void 0?r:"");let l=e.getColor(SO);this._input.style.borderWidth=l?"1px":"0px",this._input.style.borderStyle=l?"solid":"none",this._input.style.borderColor=(o=l==null?void 0:l.toString())!==null&&o!==void 0?o:"none"}_updateFont(){if(!this._input||!this._label)return;let e=this._editor.getOption(48);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;let[n,r]=this._acceptKeybindings;return this._label.innerText=v({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(n))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(r))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,n,r,o,s){this._domNode.classList.toggle("preview",o),this._position=new Se(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",r.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);let a=new ne;return new Promise(l=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(c),!0),this._currentAcceptInput=c=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:o&&c})},a.add(s.onCancellationRequested(()=>this.cancelInput(!0))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!document.hasFocus()))),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};KC=Ege([LI(2,pn),LI(3,Bt),LI(4,Ke)],KC)});function kge(i,e,t,n){return gh(this,void 0,void 0,function*(){let r=new Vg(e,t,i),o=yield r.resolveRenameLocation(et.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:r.provideRenameEdits(n,et.None)})}var Tge,mh,gh,Vg,vh,MI,DI,NI=M(()=>{Lo();Dt();gi();At();Ce();Li();Sn();au();Ze();Jm();Ar();ri();qe();jt();noe();h0();De();KR();ft();Et();S_();Ro();qc();Fc();hX();xt();Tge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mh=function(i,e){return function(t,n){e(t,n,i)}},gh=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Vg=class{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return gh(this,void 0,void 0,function*(){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` +`+u),this.shouldAutoIndent(e,r)){c.getLineContent=p=>p===d?e.getLineContent(r.startLineNumber):e.getLineContent(p);let h=this.matchEnterRule(e,l,o,r.startLineNumber,r.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,r,o,a,h);else{let p=nu(this._autoIndent,c,e.getLanguageIdAtPosition(r.startLineNumber,1),d,l,this._languageConfigurationService);if(p!==null){let m=Ui(e.getLineContent(r.startLineNumber)),g=kr(p,o),b=kr(m,o);if(g!==b){let S=g-b;this.getIndentEditsOfMovingBlock(e,t,r,o,a,S)}}}}}this._selectionId=t.trackSelection(r)}buildIndentConverter(e,t,n){return{shiftIndent:r=>Wc.shiftIndent(r,r.length+1,e,t,n),unshiftIndent:r=>Wc.unshiftIndent(r,r.length+1,e,t,n)}}parseEnterResult(e,t,n,r,o){if(o){let s=o.indentation;o.indentAction===Rm.None||o.indentAction===Rm.Indent?s=o.indentation+o.appendText:o.indentAction===Rm.IndentOutdent?s=o.indentation:o.indentAction===Rm.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(r);if(this.trimLeft(a).indexOf(this.trimLeft(s))>=0){let l=Ui(e.getLineContent(r)),c=Ui(s),d=M_(e,r,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));let u=kr(c,n),h=kr(l,n);return u-h}}return null}matchEnterRuleMovingDown(e,t,n,r,o,s){if(Qh(s)>=0){let a=e.getLineMaxColumn(o),l=L_(this._autoIndent,e,new P(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,l)}else{let a=r-1;for(;a>=1;){let d=e.getLineContent(a);if(Qh(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=L_(this._autoIndent,e,new P(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}}matchEnterRule(e,t,n,r,o,s){let a=o;for(;a>=1;){let d;if(a===o&&s!==void 0?d=s:d=e.getLineContent(a),Qh(d)>=0)break;a--}if(a<1||r>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=L_(this._autoIndent,e,new P(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,r,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let n=e.getLanguageIdAtPosition(t.startLineNumber,1),r=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==r||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,r,o,s){for(let a=n.startLineNumber;a<=n.endLineNumber;a++){let l=e.getLineContent(a),c=Ui(l),u=kr(c,r)+s,h=ch(u,r,o);h!==c&&(t.addEditOperation(new P(a,1,a,c.length+1),h),a===n.endLineNumber&&n.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=r)return null;let o=[];for(let a=n;a<=r;a++)o.push(i.getLineContent(a));let s=o.slice(0);return s.sort(dh.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:n,endLineNumber:r,before:o,after:s}}function ige(i,e,t){let n=vY(i,e,t);return n?Kt.replace(new P(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(` +`)):null}var dh,_Y=M(()=>{xa();qe();dh=class i{static getCollator(){return i._COLLATOR||(i._COLLATOR=new Intl.Collator),i._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){let n=ige(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,n){if(e===null)return!1;let r=vY(e,t,n);if(!r)return!1;for(let o=0,s=r.before.length;o{gl();N_();Ze();x_();pY();fre();xa();ri();qe();Mn();jt();mY();gY();_Y();De();Yi();Kn();CC=class extends se{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let n=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));n.sort((s,a)=>P.compareRangesUsingStarts(s.selection,a.selection));let r=n[0];for(let s=1;snew Se(a.positionLineNumber,a.positionColumn)));let o=t.getSelection();if(o===null)return;let s=new bC(o,r);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};xC.ID="editor.action.trimTrailingWhitespace";Ok=class extends se{constructor(){super({id:"editor.action.deleteLines",label:v("lines.delete","Delete Line"),alias:"Delete Line",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let n=this._getLinesToRemove(t),r=t.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let o=0,s=[],a=[];for(let l=0,c=n.length;l1&&(u-=1,p=r.getLineMaxColumn(u)),s.push(Kt.replace(new je(u,p,h,m),"")),a.push(new je(u-o,d.positionColumn,u-o,d.positionColumn)),o+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(o=>{let s=o.endLineNumber;return o.startLineNumbero.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);let n=[],r=t[0];for(let o=1;o=t[o].startLineNumber?r.endLineNumber=t[o].endLineNumber:(n.push(r),r=t[o]);return n.push(r),n}},Pk=class extends se{constructor(){super({id:"editor.action.indentLines",label:v("lines.indent","Indent Line"),alias:"Indent Line",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2142,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,D_.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},Fk=class extends se{constructor(){super({id:"editor.action.outdentLines",label:v("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2140,weight:100}})}run(e,t){ef.Outdent.runEditorCommand(e,t,null)}},Hk=class extends se{constructor(){super({id:"editor.action.insertLineBefore",label:v("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:3075,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,D_.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}},Bk=class extends se{constructor(){super({id:"editor.action.insertLineAfter",label:v("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:2051,weight:100}})}run(e,t){let n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,D_.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}},EC=class extends se{run(e,t){if(!t.hasModel())return;let n=t.getSelection(),r=this._getRangesToDelete(t),o=[];for(let l=0,c=r.length-1;lKt.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},zk=class extends EC{constructor(){super({id:"deleteAllLeft",label:v("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null,r=[],o=0;return t.forEach(s=>{let a;if(s.endColumn===1&&o>0){let l=s.startLineNumber-o;a=new je(l,s.startColumn,l,s.startColumn)}else a=new je(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?n=a:r.push(a)}),n&&r.unshift(n),r}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let n=t,r=e.getModel();return r===null?[]:(n.sort(P.compareRangesUsingStarts),n=n.map(o=>{if(o.isEmpty())if(o.startColumn===1){let s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:r.getLineContent(s).length+1;return new P(s,a,o.startLineNumber,1)}else return new P(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new P(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),n)}},Uk=class extends EC{constructor(){super({id:"deleteAllRight",label:v("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null,r=[];for(let o=0,s=t.length,a=0;o{if(o.isEmpty()){let s=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new P(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new P(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return r.sort(P.compareRangesUsingStarts),r}},Wk=class extends se{constructor(){super({id:"editor.action.joinLines",label:v("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:O.writable,kbOpts:{kbExpr:O.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getSelection();if(r===null)return;n.sort(P.compareRangesUsingStarts);let o=[],s=n.reduce((h,p)=>h.isEmpty()?h.endLineNumber===p.startLineNumber?(r.equalsSelection(h)&&(r=p),p):p.startLineNumber>h.endLineNumber+1?(o.push(h),p):new je(h.startLineNumber,h.startColumn,p.endLineNumber,p.endColumn):p.startLineNumber>h.endLineNumber?(o.push(h),p):new je(h.startLineNumber,h.startColumn,p.endLineNumber,p.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],d=r,u=0;for(let h=0,p=o.length;h=1){let Ne=!0;H===""&&(Ne=!1),Ne&&(H.charAt(H.length-1)===" "||H.charAt(H.length-1)===" ")&&(Ne=!1,H=H.replace(/[\s\uFEFF\xA0]+$/g," "));let he=re.substr(ae-1);H+=(Ne?" ":"")+he,Ne?S=he.length+1:S=he.length}else S=0}let K=new P(g,b,k,N);if(!K.isEmpty()){let W;m.isEmpty()?(l.push(Kt.replace(K,H)),W=new je(K.startLineNumber-u,H.length-S+1,g-u,H.length-S+1)):m.startLineNumber===m.endLineNumber?(l.push(Kt.replace(K,H)),W=new je(m.startLineNumber-u,m.startColumn,m.endLineNumber-u,m.endColumn)):(l.push(Kt.replace(K,H)),W=new je(m.startLineNumber-u,m.startColumn,m.startLineNumber-u,H.length-A)),P.intersectRanges(K,r)!==null?d=W:c.push(W)}u+=K.endLineNumber-K.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},jk=class extends se{constructor(){super({id:"editor.action.transpose",label:v("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:O.writable})}run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=[];for(let s=0,a=n.length;s=d){if(c.lineNumber===r.getLineCount())continue;let u=new P(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new _l(new je(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let u=new P(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=r.getValueInRange(u).split("").reverse().join("");o.push(new w_(u,h,new je(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},Ld=class extends se{run(e,t){let n=t.getSelections();if(n===null)return;let r=t.getModel();if(r===null)return;let o=t.getOption(126),s=[];for(let a of n)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let d=new P(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=r.getValueInRange(d);s.push(Kt.replace(d,this._modifyText(u,o)))}else{let l=r.getValueInRange(a);s.push(Kt.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},Vk=class extends Ld{constructor(){super({id:"editor.action.transformToUppercase",label:v("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:O.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},Kk=class extends Ld{constructor(){super({id:"editor.action.transformToLowercase",label:v("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:O.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},bc=class{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return this.get()!==null}},Pg=class i extends Ld{constructor(){super({id:"editor.action.transformToTitlecase",label:v("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:O.writable})}_modifyText(e,t){let n=i.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,r=>r.toLocaleUpperCase()):e}};Pg.titleBoundary=new bc("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");uh=class i extends Ld{constructor(){super({id:"editor.action.transformToSnakecase",label:v("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:O.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get();return!n||!r?e:e.replace(n,"$1_$2").replace(r,"$1_$2$3").toLocaleLowerCase()}};uh.caseBoundary=new bc("(\\p{Ll})(\\p{Lu})","gmu");uh.singleLetters=new bc("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");Fg=class i extends Ld{constructor(){super({id:"editor.action.transformToCamelcase",label:v("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:O.writable})}_modifyText(e,t){let n=i.wordBoundary.get();if(!n)return e;let r=e.split(n);return r.shift()+r.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}};Fg.wordBoundary=new bc("[_\\s-]","gm");hh=class i extends Ld{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:v("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:O.writable})}_modifyText(e,t){let n=i.caseBoundary.get(),r=i.singleLetters.get(),o=i.underscoreBoundary.get();return!n||!r||!o?e:e.replace(o,"$1-$3").replace(n,"$1-$2").replace(r,"$1-$2").toLocaleLowerCase()}};hh.caseBoundary=new bc("(\\p{Ll})(\\p{Lu})","gmu");hh.singleLetters=new bc("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");hh.underscoreBoundary=new bc("(\\S)(_)(\\S)","gm");X(kk);X(Ik);X(Ak);X(Lk);X(Mk);X(Dk);X(Nk);X(Rk);X(xC);X(Ok);X(Pk);X(Fk);X(Hk);X(Bk);X(zk);X(Uk);X(Wk);X(jk);X(Vk);X(Kk);uh.caseBoundary.isSupported()&&uh.singleLetters.isSupported()&&X(uh);Fg.wordBoundary.isSupported()&&X(Fg);Pg.titleBoundary.isSupported()&&X(Pg);hh.isSupported()&&X(hh)});var bY=M(()=>{});var yY=M(()=>{bY()});function SY(i,e,t,n){let r=i.ordered(e);return P_(r.map(o=>()=>Gk(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,n)}catch(s){Ut(s);return}})),o=>!!o&&Wi(o==null?void 0:o.ranges))}var nge,TC,Gk,CY,rge,Md,Yk,oge,Net,Qk=M(()=>{oi();Dt();gi();ma();At();qt();Ce();wi();Sn();Ze();Lr();ri();qe();jt();qn();Kn();De();ft();xt();_r();Ns();ml();yY();nge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},TC=function(i,e){return function(t,n){e(t,n,i)}},Gk=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},CY=new nt("LinkedEditingInputVisible",!1),rge="linked-editing-decoration",Md=class $k extends oe{static get(e){return e.getContribution($k.ID)}constructor(e,t,n,r,o){super(),this.languageConfigurationService=r,this._syncRangesToken=0,this._localToDispose=this._register(new ne),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=CY.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new ne),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(67)||s.hasChanged(89))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){let t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(67)||this._editor.getOption(89))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(li.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let r=new Ro(this._debounceInformation.get(t)),o=()=>{var l;this._rangeUpdateTriggerPromise=r.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},s=new Ro(0),a=l=>{this._rangeSyncTriggerPromise=s.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{o()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){let c=this._currentDecorations.getRange(0);if(c&&l.changes.every(d=>c.intersectRanges(d.range))){a(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{r.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();let r=t.getValueInRange(n);if(this._currentWordPattern){let s=r.match(this._currentWordPattern);if((s?s[0].length:0)!==r.length)return this.clearRanges()}let o=[];for(let s=1,a=this._currentDecorations.length;s1){this.clearRanges();return}let n=this._editor.getModel(),r=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===r){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){let s=this._currentDecorations.getRange(0);if(s&&s.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=r;let o=Vt(s=>Gk(this,void 0,void 0,function*(){try{let a=new Ln(!1),l=yield SY(this._providers,n,t,s);if(this._debounceInformation.update(n,a.elapsed()),o!==this._currentRequest||(this._currentRequest=null,r!==n.getVersionId()))return;let c=[];l!=null&&l.ranges&&(c=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let d=!1;for(let h=0,p=c.length;h({range:h,options:$k.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){es(a)||at(a),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};Md.ID="editor.contrib.linkedEditing";Md.DECORATION=ct.register({description:"linked-editing",stickiness:0,className:rge});Md=nge([TC(1,Ke),TC(2,be),TC(3,Tt),TC(4,an)],Md);Yk=class extends se{constructor(){super({id:"editor.action.linkedEditing",label:v("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:ce.and(O.writable,O.hasRenameProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let n=e.get(Zt),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return ht.isUri(r)&&Se.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},at):super.runCommand(e,t)}run(e,t){let n=Md.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}},oge=xi.bindToContribution(Md.get);Me(new oge({id:"cancelLinkedEditingInput",precondition:CY,handler:i=>i.clearRanges(),kbOpts:{kbExpr:O.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));Net=Oe("editor.linkedEditingBackground",{dark:dt.fromHex("#f00").transparent(.3),light:dt.fromHex("#f00").transparent(.3),hcDark:dt.fromHex("#f00").transparent(.3),hcLight:dt.white},v("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Gr("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:n}=i.get(be);return SY(n,e,t,et.None)});Ae(Md.ID,Md,1);X(Yk)});var wY=M(()=>{});var xY=M(()=>{wY()});function Zk(i,e,t){let n=[],r=i.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,t)).then(a=>{a&&(n[s]=[a,o])},Ut));return Promise.all(r).then(()=>{let o=new kC(vr(n));return t.isCancellationRequested?(o.dispose(),new kC([])):o})}var EY,Jk,kC,TY=M(()=>{oi();gi();At();Ce();Mi();Sn();qe();is();zi();xt();EY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Jk=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return EY(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}},kC=class i{constructor(e){this._disposables=new ne;let t=[];for(let[n,r]of e){let o=n.links.map(s=>new Jk(s,r));t=i._union(t,o),d_(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let n=[],r,o,s,a;for(r=0,s=0,o=e.length,a=t.length;rEY(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht),typeof n!="number"&&(n=0);let{linkProvider:r}=i.get(be),o=i.get(Si).getModel(t);if(!o)return[];let s=yield Zk(r,o,et.None);if(!s)return[];for(let l=0;l{Dt();gi();At();Sl();Ce();Im();nr();lo();ml();Sn();xY();Ze();qn();Ns();xt();wg();TY();De();Oo();ds();sge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},IC=function(i,e){return function(t,n){e(t,n,i)}},age=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Np=class IY extends oe{static get(e){return e.getContribution(IY.ID)}constructor(e,t,n,r,o){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=r,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new ti(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new sl(e));this._register(s.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(s.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(s.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(68)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return age(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(68))return;let e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Vt(t=>Zk(this.providers,e,t));try{let t=new Ln(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){at(t)}finally{this.computePromise=null}}})}updateDecorations(e){let t=this.editor.getOption(75)==="altKey",n=[],r=Object.keys(this.currentOccurrences);for(let s of r){let a=this.currentOccurrences[s];n.push(a.decorationId)}let o=[];if(e)for(let s of e)o.push(AC.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(n,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l{r.activate(o,n),this.activeLinkDecorationId=r.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(75)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;let t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;let{link:r}=e;r.resolve(et.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===Lo.file&&o.startsWith(`${Lo.file}:`)){let a=ht.parse(o);if(a.scheme===Lo.file){let l=tO(a),c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(o=rO(s,c))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{let s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(v("invalid.url","Failed to open this link because it is not well-formed: {0}",r.url.toString())):s==="missing"?this.notificationService.warn(v("missing.url","Failed to open this link because its target is missing.")):at(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;let t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(let n of t){let r=this.currentOccurrences[n.id];if(r)return r}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};Np.ID="editor.linkDetector";Np=sge([IC(1,Qi),IC(2,Ei),IC(3,be),IC(4,an)],Np);kY={general:ct.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:ct.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},AC=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,n){let r=Object.assign({},n?kY.active:kY.general);return r.hoverMessage=lge(e,t),r}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,i._getOptions(this.link,t,!1))}};eI=class extends se{constructor(){super({id:"editor.action.openLink",label:v("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let n=Np.get(t);if(!n||!t.hasModel())return;let r=t.getSelections();for(let o of r){let s=n.getLinkOccurrence(o.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}};Ae(Np.ID,Np,1);X(eI)});var Hg,iI=M(()=>{Ce();Ze();Hg=class extends oe{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let n=this._editor.getOption(113);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};Hg.ID="editor.contrib.longLinesHelper";Ae(Hg.ID,Hg,2)});var AY=M(()=>{});var LY=M(()=>{AY()});function MY(i){return i===Gm.Write?hge:i===Gm.Text?fge:gge}function DY(i){return i?mge:pge}var LC,MC,cge,dge,uge,hge,fge,pge,mge,gge,nI=M(()=>{LY();Kc();qn();br();De();_r();ar();LC=Oe("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},v("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Oe("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},v("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Oe("editor.wordHighlightTextBackground",{light:LC,dark:LC,hcDark:LC,hcLight:LC},v("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);MC=Oe("editor.wordHighlightBorder",{light:null,dark:null,hcDark:va,hcLight:va},v("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));Oe("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:va,hcLight:va},v("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));Oe("editor.wordHighlightTextBorder",{light:MC,dark:MC,hcDark:MC,hcLight:MC},v("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));cge=Oe("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),dge=Oe("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},v("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),uge=Oe("editorOverviewRuler.wordHighlightTextForeground",{dark:cf,light:cf,hcDark:cf,hcLight:cf},v("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),hge=ct.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:vi(dge),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}}),fge=ct.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:vi(uge),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}}),pge=ct.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:vi(cf),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}}),mge=ct.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),gge=ct.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:vi(cge),position:$r.Center},minimap:{color:vi(Vm),position:pa.Inline}});df((i,e)=>{let t=i.getColor(IO);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function Nd(i,e){let t=e.filter(n=>!i.find(r=>r.equals(n)));if(t.length>=1){let n=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),r=t.length===1?v("cursorAdded","Cursor added: {0}",n):v("cursorsAdded","Cursors added: {0}",n);fR(r)}}function OY(i,e,t){let n=NY(i,e[0],!t);for(let r=1,o=e.length;r{Mo();Dt();gl();Ce();Ze();DR();qe();Mn();jt();vy();De();Yi();ft();xt();nI();Et();vge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},_ge=function(i,e){return function(t,n){e(t,n,i)}};rI=class extends se{constructor(){super({id:"editor.action.insertCursorAbove",label:v("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Nm.addCursorUp(o,s,r)),o.revealTopMostCursor(n.source),Nd(s,o.getCursorStates())}},oI=class extends se{constructor(){super({id:"editor.action.insertCursorBelow",label:v("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let r=!0;n&&n.logicalLine===!1&&(r=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(n.source,3,Nm.addCursorDown(o,s,r)),o.revealBottomMostCursor(n.source),Nd(s,o.getCursorStates())}},sI=class extends se{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:v("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let r=e.startLineNumber;r1&&n.push(new je(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let n=t.getModel(),r=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),a=[];r.forEach(l=>this.getCursorsForSelection(l,n,a)),a.length>0&&t.setSelections(a),Nd(s,o.getCursorStates())}},aI=class extends se{constructor(){super({id:"editor.action.addCursorsToBottom",label:v("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=t.getModel().getLineCount(),o=[];for(let l=n[0].startLineNumber;l<=r;l++)o.push(new je(l,n[0].startColumn,l,n[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),Nd(a,s.getCursorStates())}},lI=class extends se{constructor(){super({id:"editor.action.addCursorsToTop",label:v("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getSelections(),r=[];for(let a=n[0].startLineNumber;a>=1;a--)r.push(new je(a,n[0].startColumn,a,n[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();r.length>0&&t.setSelections(r),Nd(s,o.getCursorStates())}},Rp=class{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}},DC=class i{static create(e,t){if(!e.hasModel())return null;let n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new i(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let r=!1,o,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(r=!0,o=!0,s=!0):(o=n.wholeWord,s=n.matchCase);let l=e.getSelection(),c,d=null;if(l.isEmpty()){let u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;c=u.word,d=new je(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` +`);return new i(e,t,r,c,o,s,d)}constructor(e,t,n,r,o,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=r,this.wholeWord=o,this.matchCase=s,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new Rp(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;let e=this._getNextMatch();if(!e)return null;let t=this._editor.getSelections();return new Rp(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return n?new je(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new Rp(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;let e=this._getPreviousMatch();if(!e)return null;let t=this._editor.getSelections();return new Rp(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let r=this.currentMatch;return this.currentMatch=null,r}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1);return n?new je(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();let t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(126):null,!1,1073741824)}},fh=class i extends oe{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new ne),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=DC.create(this._editor,e);if(!t)return;this._session=t;let n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(r=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(r=>{(r.matchCase||r.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){let e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;let n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new je(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){let t=this._editor.getSelections();if(t.length>1){let r=e.getState().matchCase;if(!OY(this._editor.getModel(),t,r)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l0&&n.isRegex){let r=this._editor.getModel();n.searchScope?t=r.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(126):null,!1,1073741824):t=r.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(126):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){let r=this._editor.getSelection();for(let o=0,s=t.length;onew je(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};fh.ID="editor.contrib.multiCursorController";Dd=class extends se{run(e,t){let n=fh.get(t);if(!n)return;let r=t._getViewModel();if(r){let o=r.getCursorStates(),s=dr.get(t);if(s)this._run(n,s);else{let a=e.get(He).createInstance(dr,t);this._run(n,a),a.dispose()}Nd(o,r.getCursorStates())}}},cI=class extends Dd{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:v("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2082,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},dI=class extends Dd{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:v("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},uI=class extends Dd{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:v("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:di(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},hI=class extends Dd{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:v("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}},fI=class extends Dd{constructor(){super({id:"editor.action.selectHighlights",label:v("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:3114,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:v({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},pI=class extends Dd{constructor(){super({id:"editor.action.changeAll",label:v("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:ce.and(O.writable,O.editorTextFocus),kbOpts:{kbExpr:O.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},mI=class{constructor(e,t,n,r,o){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=r,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(P.compareRangesUsingStarts)),this._cachedFindMatches}},Bg=class RY extends oe{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(104),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new ti(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(r=>{this._isEnabled=e.getOption(104)})),this._register(e.onDidChangeCursorSelection(r=>{this._isEnabled&&(r.selection.isEmpty()?r.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(r=>{this._setState(null)})),this._register(e.onDidChangeModelContent(r=>{this._isEnabled&&this.updateSoon.schedule()}));let n=dr.get(e);n&&this._register(n.getState().onFindReplaceStateChange(r=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(RY._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;let r=n.getSelection();if(r.startLineNumber!==r.endLineNumber)return null;let o=fh.get(n);if(!o)return null;let s=dr.get(n);if(!s)return null;let a=o.getSession(s);if(!a){let d=n.getSelections();if(d.length>1){let h=s.getState().matchCase;if(!OY(n.getModel(),d,h))return null}a=DC.create(n,s)}if(!a||a.currentMatch||/^[ \t]+$/.test(a.searchText)||a.searchText.length>200)return null;let l=s.getState(),c=l.matchCase;if(l.isRevealed){let d=l.searchString;c||(d=d.toLowerCase());let u=a.searchText;if(c||(u=u.toLowerCase()),d===u&&a.matchCase===l.matchCase&&a.wholeWord===l.wholeWord&&!l.isRegex)return null}return new mI(n.getModel(),a.searchText,a.matchCase,a.wholeWord?n.getOption(126):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;let t=this.editor.getModel();if(t.isTooLargeForTokenization())return;let n=this.state.findMatches(),r=this.editor.getSelections();r.sort(P.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=n.length,u=r.length;l=u)o.push(h),l++;else{let p=P.compareRangesUsingStarts(h,r[c]);p<0?((r[c].isEmpty()||!P.areIntersecting(h,r[c]))&&o.push(h),l++):(p>0||l++,c++)}}let s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(78),a=o.map(l=>({range:l,options:DY(s)}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};Bg.ID="editor.contrib.selectionHighlighter";Bg=vge([_ge(1,be)],Bg);gI=class extends se{constructor(){super({id:"editor.action.focusNextCursor",label:v("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:v("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.shift();s&&(o.push(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Nd(o,r.getCursorStates()))}},vI=class extends se{constructor(){super({id:"editor.action.focusPreviousCursor",label:v("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:v("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,n){if(!t.hasModel())return;let r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();let o=Array.from(r.getCursorStates()),s=o.pop();s&&(o.unshift(s),r.setCursorStates(n.source,3,o),r.revealPrimaryCursor(n.source,!0),Nd(o,r.getCursorStates()))}};Ae(fh.ID,fh,4);Ae(Bg.ID,Bg,1);X(rI);X(oI);X(sI);X(cI);X(dI);X(uI);X(hI);X(fI);X(pI);X(aI);X(lI);X(gI);X(vI)});function bI(i,e,t,n,r){return PY(this,void 0,void 0,function*(){let o=i.ordered(e);for(let s of o)try{let a=yield s.provideSignatureHelp(e,t,r,n);if(a)return a}catch(a){Ut(a)}})}var PY,yc,NC=M(()=>{gi();At();Mi();Sn();ri();br();xt();ca();zi();ft();PY=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},yc={Visible:new nt("parameterHintsVisible",!1),MultipleSignatures:new nt("parameterHintsMultipleSignatures",!1)};St.registerCommand("_executeSignatureHelpProvider",(i,...e)=>PY(void 0,void 0,void 0,function*(){let[t,n,r]=e;Lt(ht.isUri(t)),Lt(Se.isIPosition(n)),Lt(typeof r=="string"||!r);let o=i.get(be),s=yield i.get(xn).createModelReference(t);try{let a=yield bI(o.signatureHelpProvider,s.object.textEditorModel,Se.lift(n),{triggerKind:Ls.Invoke,isRetrigger:!1,triggerCharacter:r},et.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}}))});function yge(i,e){switch(e.triggerKind){case Ls.Invoke:return e;case Ls.ContentChange:return i;case Ls.TriggerCharacter:default:return e}}var bge,Rd,zg,FY=M(()=>{Dt();At();qt();Ce();hw();br();NC();bge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i.Default={type:0};class e{constructor(r,o){this.request=r,this.previouslyActiveHints=o,this.type=2}}i.Pending=e;class t{constructor(r){this.hints=r,this.type=1}}i.Active=t})(Rd||(Rd={}));zg=class i extends oe{constructor(e,t,n=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new $e),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Rd.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Bi),this.triggerChars=new tu,this.retriggerChars=new tu,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Ro(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(r=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(r=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(r=>this.onCursorChange(r))),this._register(this.editor.onDidChangeModelContent(r=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(r=>this.onDidType(r))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=Rd.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let n=this.editor.getModel();if(!n||!this.providers.has(n))return;let r=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(r),t).catch(at)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,r=this.editor.getOption(83).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,r=this.editor.getOption(83).cycle;if((e<2||n)&&!r){this.cancel();return}this.updateActiveSignature(n&&r?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new Rd.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return bge(this,void 0,void 0,function*(){let t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let r=this._pendingTriggers.reduce(yge);this._pendingTriggers=[];let o={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new Rd.Pending(Vt(l=>bI(this.providers,s,a,o,l)),n);try{let l=yield this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new Rd.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=Rd.Default),at(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();let e=this.editor.getModel();if(e)for(let t of this.providers.ordered(e)){for(let n of t.signatureHelpTriggerCharacters||[])if(n.length){let r=n.charCodeAt(0);this.triggerChars.add(r),this.retriggerChars.add(r)}for(let n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:Ls.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Ls.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(83).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};zg.DEFAULT_DELAY=120});var HY=M(()=>{});var BY=M(()=>{HY()});var Cge,yI,Eo,Sge,wge,Ug,UY=M(()=>{Ht();Mo();eb();or();qt();Ce();wi();Mi();BY();ss();Zu();NC();De();ft();ds();_r();Al();qr();Cge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},yI=function(i,e){return function(t,n){e(t,n,i)}},Eo=fe,Sge=Ti("parameter-hints-next",lt.chevronDown,v("parameterHintsNextIcon","Icon for show next parameter hint.")),wge=Ti("parameter-hints-previous",lt.chevronUp,v("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Ug=class zY extends oe{constructor(e,t,n,r,o){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new ne),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new io({editor:e},o,r)),this.keyVisible=yc.Visible.bindTo(n),this.keyMultipleSignatures=yc.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){let e=Eo(".editor-widget.parameter-hints-widget"),t=me(e,Eo(".phwrapper"));t.tabIndex=-1;let n=me(t,Eo(".controls")),r=me(n,Eo(".button"+mt.asCSSSelector(wge))),o=me(n,Eo(".overloads")),s=me(n,Eo(".button"+mt.asCSSSelector(Sge)));this._register(Rt(r,"click",h=>{Jd.stop(h),this.previous()})),this._register(Rt(s,"click",h=>{Jd.stop(h),this.next()}));let a=Eo(".body"),l=new mf(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=me(a,Eo(".signature")),d=me(a,Eo(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:o,docs:d,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));let u=()=>{if(!this.domNodes)return;let h=this.editor.getOption(48);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};u(),this._register(li.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(h=>h.hasChanged(48)).on(u,null)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;let n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let r=e.signatures[e.activeSignature];if(!r)return;let o=me(this.domNodes.signature,Eo(".code")),s=this.editor.getOption(48);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;let a=r.parameters.length>0,l=(t=r.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(o,r,l);else{let u=me(o,Eo("span"));u.textContent=r.label}let c=r.parameters[l];if(c!=null&&c.documentation){let u=Eo("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{let h=this.renderMarkdownDocs(c.documentation);u.appendChild(h.element)}me(this.domNodes.docs,Eo("p",{},u))}if(r.documentation!==void 0)if(typeof r.documentation=="string")me(this.domNodes.docs,Eo("p",{},r.documentation));else{let u=this.renderMarkdownDocs(r.documentation);me(this.domNodes.docs,u.element)}let d=this.hasDocs(r,c);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,c){let u="",h=r.parameters[l];Array.isArray(h.label)?u=r.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),r.documentation&&(u+=typeof r.documentation=="string"?`, ${r.documentation}`:`, ${r.documentation.value}`),this.announcedLabel!==u&&(Ni(v("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){let t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var n;(n=this.domNodes)===null||n===void 0||n.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Oc(t.documentation).length>0||t&&typeof t.documentation=="object"&&Oc(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Oc(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Oc(e.documentation.value).length>0)}renderParameters(e,t,n){let[r,o]=this.getParameterLabelOffsets(t,n),s=document.createElement("span");s.textContent=t.label.substring(0,r);let a=document.createElement("span");a.textContent=t.label.substring(r,o),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(o),me(e,s,a,l)}getParameterLabelOffsets(e,t){let n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){let r=new RegExp(`(\\W|^)${vl(n.label)}(?=\\W|$)`,"g");r.test(e.label);let o=r.lastIndex-n.label.length;return o>=0?[o,r.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return zY.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};Ug.ID="editor.widget.parameterHintsWidget";Ug=Cge([yI(2,Ke),yI(3,Qi),yI(4,Xi)],Ug);Oe("editorHoverWidget.highlightForeground",{dark:ba,light:ba,hcDark:ba,hcLight:ba},v("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var xge,WY,ph,CI,SI,wI,xI=M(()=>{nw();Ce();Ze();jt();br();xt();FY();NC();De();ft();Et();UY();xge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},WY=function(i,e){return function(t,n){e(t,n,i)}},ph=class jY extends oe{static get(e){return e.getContribution(jY.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new zg(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(r=>{var o;r?(this.widget.value.show(),this.widget.value.render(r)):(o=this.widget.rawValue)===null||o===void 0||o.hide()})),this.widget=new Xh(()=>this._register(t.createInstance(Ug,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};ph.ID="editor.controller.parameterHints";ph=xge([WY(1,He),WY(2,be)],ph);CI=class extends se{constructor(){super({id:"editor.action.triggerParameterHints",label:v("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:O.hasSignatureHelpProvider,kbOpts:{kbExpr:O.editorTextFocus,primary:3082,weight:100}})}run(e,t){let n=ph.get(t);n==null||n.trigger({triggerKind:Ls.Invoke})}};Ae(ph.ID,ph,2);X(CI);SI=100+75,wI=xi.bindToContribution(ph.get);Me(new wI({id:"closeParameterHints",precondition:yc.Visible,handler:i=>i.cancel(),kbOpts:{weight:SI,kbExpr:O.focus,primary:9,secondary:[1033]}}));Me(new wI({id:"showPrevParameterHint",precondition:ce.and(yc.Visible,yc.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:SI,kbExpr:O.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));Me(new wI({id:"showNextParameterHint",precondition:ce.and(yc.Visible,yc.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:SI,kbExpr:O.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var VY=M(()=>{});var KY=M(()=>{VY()});var Ege,EI,Wg,RC,qY=M(()=>{Ce();KY();ri();De();ft();Gn();_r();ar();Ege=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EI=function(i,e){return function(t,n){e(t,n,i)}},Wg=new nt("renameInputVisible",!1,v("renameInputVisible","Whether the rename input widget is visible")),RC=class{constructor(e,t,n,r,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=r,this._disposables=new ne,this.allowEditorOverflow=!0,this._visibleContextKey=Wg.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(48)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",v("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,n,r,o;if(!this._input||!this._domNode)return;let s=e.getColor(H_),a=e.getColor(B_);this._domNode.style.backgroundColor=String((t=e.getColor(xl))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=s?` 0 0 8px 2px ${s}`:"",this._domNode.style.border=a?`1px solid ${a}`:"",this._domNode.style.color=String((n=e.getColor(bO))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((r=e.getColor(_O))!==null&&r!==void 0?r:"");let l=e.getColor(yO);this._input.style.borderWidth=l?"1px":"0px",this._input.style.borderStyle=l?"solid":"none",this._input.style.borderColor=(o=l==null?void 0:l.toString())!==null&&o!==void 0?o:"none"}_updateFont(){if(!this._input||!this._label)return;let e=this._editor.getOption(48);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;let[n,r]=this._acceptKeybindings;return this._label.innerText=v({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(n))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(r))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,n,r,o,s){this._domNode.classList.toggle("preview",o),this._position=new Se(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",r.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);let a=new ne;return new Promise(l=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(c),!0),this._currentAcceptInput=c=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:o&&c})},a.add(s.onCancellationRequested(()=>this.cancelInput(!0))),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!document.hasFocus()))),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};RC=Ege([EI(2,pn),EI(3,Bt),EI(4,Ke)],RC)});function kge(i,e,t,n){return gh(this,void 0,void 0,function*(){let r=new jg(e,t,i),o=yield r.resolveRenameLocation(et.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:r.provideRenameEdits(n,et.None)})}var Tge,mh,gh,jg,vh,TI,kI,II=M(()=>{Mo();Dt();gi();At();Ce();Mi();Sn();lu();Ze();Qm();Lr();ri();qe();jt();roe();u0();De();jR();ft();Et();C_();Oo();Gc();Hc();qY();xt();Tge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mh=function(i,e){return function(t,n){e(t,n,i)}},gh=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jg=class{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return gh(this,void 0,void 0,function*(){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` `):void 0}:{range:P.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` `):void 0}})}provideRenameEdits(e,t){return gh(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,n,r){return gh(this,void 0,void 0,function*(){let o=this._providers[t];if(!o)return{edits:[],rejectReason:n.join(` -`)};let s=yield o.provideRenameEdits(this.model,this.position,e,r);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),r)}else return this._provideRenameEdits(e,t+1,n.concat(v("no result","No result.")),r);return s})}};vh=class fX{static get(e){return e.getContribution(fX.ID)}constructor(e,t,n,r,o,s,a,l){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=r,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new ne,this._cts=new Ni,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(KC,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return gh(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new Ni,!this.editor.hasModel())return;let n=this.editor.getPosition(),r=new Vg(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!r.hasProvider())return;let o=new Sa(this.editor,5,void 0,this._cts.token),s;try{let m=r.resolveRenameLocation(o.token);this._progressService.showWhile(m,250),s=yield m}catch(m){(e=Qn.get(this.editor))===null||e===void 0||e.showMessage(m||v("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{o.dispose()}if(!s)return;if(s.rejectReason){(t=Qn.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,n);return}if(o.token.isCancellationRequested)return;let a=new Sa(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!P.isEmpty(l)&&!P.spansMultipleLines(l)&&P.containsRange(s.range,l)&&(c=Math.max(0,l.startColumn-s.range.startColumn),d=Math.min(s.range.endColumn,l.endColumn)-s.range.startColumn);let u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=yield this._renameInputField.getInput(s.range,s.text,c,d,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();let p=jc(r.provideRenameEdits(h.newName,a.token),a.token).then(m=>gh(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(P.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:v("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,h.newName),code:"undoredo.rename",quotableLabel:v("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&Di(v("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(v("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(v("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{a.dispose()});return this._progressService.showWhile(p,250),p})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};vh.ID="editor.contrib.renameController";vh=Tge([mh(1,He),mh(2,xi),mh(3,Kc),mh(4,El),mh(5,Bc),mh(6,oF),mh(7,be)],vh);MI=class extends se{constructor(){super({id:"editor.action.rename",label:v("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ce.and(O.writable,O.hasRenameProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(Zt),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return ht.isUri(r)&&Se.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},at):super.runCommand(e,t)}run(e,t){let n=vh.get(t);return n?n.run():Promise.resolve()}};Ae(vh.ID,vh,4);X(MI);DI=wi.bindToContribution(vh.get);Me(new DI({id:"acceptRenameInput",precondition:jg,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:3}}));Me(new DI({id:"acceptRenameInputWithPreview",precondition:ce.and(jg,ce.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:1024+3}}));Me(new DI({id:"cancelRenameInput",precondition:jg,handler:i=>i.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:O.focus,primary:9,secondary:[1033]}}));Gr("_executeDocumentRenameProvider",function(i,e,t,...n){let[r]=n;Lt(typeof r=="string");let{renameProvider:o}=i.get(be);return kge(o,e,t,r)});Gr("_executePrepareRename",function(i,e,t){return gh(this,void 0,void 0,function*(){let{renameProvider:n}=i.get(be),o=yield new Vg(e,t,n).resolveRenameLocation(et.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})});Lr.as(L_.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:v("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function Ige(i){for(let e=0,t=i.length;e{cre();nr()});function Kg(i){return i&&!!i.data}function FI(i){return i&&Array.isArray(i.edits)}function HI(i,e){return i.has(e)}function Mge(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function BI(i,e,t,n,r){return Pd(this,void 0,void 0,function*(){let o=Mge(i,e),s=yield Promise.all(o.map(a=>Pd(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?n:null,r)}catch(d){c=d,l=null}return(!l||!Kg(l)&&!FI(l))&&(l=null),new OI(a,l,c)})));for(let a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null})}function Dge(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function mX(i,e){return i.has(e)}function gX(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function qC(i,e,t,n){return Pd(this,void 0,void 0,function*(){let r=gX(i,e),o=yield Promise.all(r.map(s=>Pd(this,void 0,void 0,function*(){let a;try{a=yield s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){Ut(l),a=null}return(!a||!Kg(a))&&(a=null),new PI(s,a)})));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null})}var Pd,OI,PI,zI=M(()=>{gi();At();Sn();ts();Bi();Li();pX();qe();xt();Pd=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};OI=class{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}};PI=class{constructor(e,t){this.provider=e,this.tokens=t}};St.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>Pd(void 0,void 0,void 0,function*(){let[t]=e;Lt(t instanceof ht);let n=i.get(Ci).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(be),o=Dge(r,n);return o?o[0].getLegend():i.get(ui).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));St.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>Pd(void 0,void 0,void 0,function*(){let[t]=e;Lt(t instanceof ht);let n=i.get(Ci).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(be);if(!HI(r,n))return i.get(ui).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let o=yield BI(r,n,null,null,et.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!Kg(a))return;let l=RI({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));St.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>Pd(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht);let r=i.get(Ci).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(be),s=gX(o,r);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!P.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=yield qC(o,r,P.lift(n),et.None);if(a)return a.provider.getLegend()}));St.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>Pd(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht),Lt(P.isIRange(n));let r=i.get(Ci).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(be),s=yield qC(o,r,P.lift(n),et.None);if(!(!s||!s.tokens))return RI({id:0,type:"full",data:s.tokens.data})}))});function Gg(i,e,t){var n;let r=(n=t.getValue(qg,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||n===void 0?void 0:n.enabled;return typeof r=="boolean"?r:e.getColorTheme().semanticHighlighting}var qg,UI=M(()=>{qg="editor.semanticHighlighting"});var vX,ll,WI,$g,jI,VI=M(()=>{Ce();At();ts();jn();Dt();gi();ar();sF();zI();Ns();ml();xt();aF();Tb();UI();vX=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ll=function(i,e){return function(t,n){e(t,n,i)}},WI=class extends oe{constructor(e,t,n,r,o,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new $g(d,e,n,o,s)},l=(d,u)=>{u.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(let d of t.getModels()){let u=this._watchers[d.uri.toString()];Gg(d,n,r)?u||a(d):u&&l(d,u)}};this._register(t.onModelAdded(d=>{Gg(d,n,r)&&a(d)})),this._register(t.onModelRemoved(d=>{let u=this._watchers[d.uri.toString()];u&&l(d,u)})),this._register(r.onDidChangeConfiguration(d=>{d.affectsConfiguration(qg)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};WI=vX([ll(0,o1),ll(1,Ci),ll(2,pn),ll(3,Mt),ll(4,an),ll(5,be)],WI);$g=class _h extends oe{constructor(e,t,n,r,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:_h.REQUEST_MIN_DELAY,max:_h.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new ti(()=>this._fetchDocumentSemanticTokensNow(),_h.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let s=()=>{Vi(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(let a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!HI(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Ni,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=BI(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new Ln(!1);r.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{let{provider:c,tokens:d}=l,u=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,u,o)}},l=>{l&&(Zo(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||at(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,r,o){o=Math.min(o,n.length-r,e.length-t);for(let s=0;s{(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(FI(t)){if(!o){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:o.data};else{let a=0;for(let h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;let l=o.data,c=new Uint32Array(l.length+a),d=l.length,u=c.length;for(let h=t.edits.length-1;h>=0;h--){let p=t.edits[h];if(p.start>l.length){n.warnInvalidEditStart(o.resultId,t.resultId,h,p.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let m=d-(p.start+p.deleteCount);m>0&&(_h._copy(l,d-m,c,u-m,m),u-=m),p.data&&(_h._copy(p.data,0,c,u-p.data.length,p.data.length),u-=p.data.length),d=p.start}d>0&&_h._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(Kg(t)){this._currentDocumentResponse=new jI(e,t.resultId,t.data);let a=Eb(t,n,this._model.getLanguageId());if(r.length>0)for(let l of r)for(let c of a)for(let d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};$g.REQUEST_MIN_DELAY=300;$g.REQUEST_MAX_DELAY=2e3;$g=vX([ll(1,o1),ll(2,pn),ll(3,an),ll(4,be)],$g);jI=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};$c(WI)});var Nge,Yg,Xg,KI=M(()=>{Dt();Ce();Ze();zI();UI();sF();jn();ar();Ns();ml();xt();aF();Nge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Yg=function(i,e){return function(t,n){e(t,n,i)}},Xg=class extends oe{constructor(e,t,n,r,o,s){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=r,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new ti(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(qg)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){let n=e.getVersionId(),r=Vt(s=>Promise.resolve(qC(this._provider,e,t,s))),o=new Ln(!1);return r.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==n)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,Eb(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};Xg.ID="editor.contrib.viewportSemanticTokens";Xg=Nge([Yg(1,o1),Yg(2,pn),Yg(3,Mt),Yg(4,an),Yg(5,be)],Xg);Ae(Xg.ID,Xg,1)});var GC,_X=M(()=>{Si();qe();GC=class{provideSelectionRanges(e,t){let n=[];for(let r of t){let o=[];n.push(o),this._addInWordRanges(o,e,r),this._addWordRanges(o,e,r),this._addWhitespaceLine(o,e,r),o.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){let r=t.getWordAtPosition(n);if(!r)return;let{word:o,startColumn:s}=r,a=n.column-s,l=a,c=a,d=0;for(;l>=0;l--){let u=o.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(sw(u)&&aw(d))break;d=u}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new P(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}});function yX(i,e,t,n,r){return YC(this,void 0,void 0,function*(){let o=i.all(e).concat(new GC);o.length===1&&o.unshift(new xd);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,r)).then(c=>{if(Ui(c)&&c.length===t.length)for(let d=0;d{if(l.length===0)return[];l.sort((h,p)=>Se.isBefore(h.getStartPosition(),p.getStartPosition())?1:Se.isBefore(p.getStartPosition(),h.getStartPosition())||Se.isBefore(h.getEndPosition(),p.getEndPosition())?-1:Se.isBefore(p.getEndPosition(),h.getEndPosition())?1:0);let c=[],d;for(let h of l)(!d||P.containsRange(h,d)&&!P.equalsRange(h,d))&&(c.push(h),d=h);if(!n.selectLeadingAndTrailingWhitespace)return c;let u=[c[0]];for(let h=1;h{oi();gi();At();Ze();ri();qe();Mn();jt();P7();_X();De();Yi();Bi();xt();ca();Li();Sn();Rge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Oge=function(i,e){return function(t,n){e(t,n,i)}},YC=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qI=class i{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let n=new i(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}},Fp=class bX{static get(e){return e.getContribution(bX.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return YC(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||(yield yX(this._languageFeaturesService.selectionRangeProvider,n,t.map(o=>o.getPosition()),this._editor.getOption(109),et.None).then(o=>{var s;if(!(!Ui(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!ha(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new qI(0,a)),(s=this._selectionListener)===null||s===void 0||s.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(o=>o.mov(e));let r=this._state.map(o=>je.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}})}};Fp.ID="editor.contrib.smartSelectController";Fp=Rge([Oge(1,be)],Fp);$C=class extends se{constructor(e,t){super(t),this._forward=e}run(e,t){return YC(this,void 0,void 0,function*(){let n=Fp.get(t);n&&(yield n.run(this._forward))})}},GI=class extends $C{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:v("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};St.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");$I=class extends $C{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:v("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Ae(Fp.ID,Fp,4);X(GI);X($I);St.registerCommand("_executeSelectionRangeProvider",function(i,...e){return YC(this,void 0,void 0,function*(){let[t,n]=e;Lt(ht.isUri(t));let r=i.get(be).selectionRangeProvider,o=yield i.get(xn).createModelReference(t);try{return yX(r,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0},et.None)}finally{o.dispose()}})})});var CX,SX=M(()=>{De();CX=Object.freeze({View:{value:v("view","View"),original:"View"},Help:{value:v("help","Help"),original:"Help"},Test:{value:v("test","Test"),original:"Test"},File:{value:v("file","File"),original:"File"},Preferences:{value:v("preferences","Preferences"),original:"Preferences"},Developer:{value:v({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}})});var wX=M(()=>{});var xX=M(()=>{wX()});var Qg,EX,XC,TX=M(()=>{Ht();ire();Ww();Ce();xX();gp();ri();VR();WP();jP();Qg=class{constructor(e,t){this.lineNumbers=e,this.lastLineRelativePosition=t}},EX=_f("stickyScrollViewLayer",{createHTML:i=>i}),XC=class extends oe{constructor(e){super(),this._editor=e,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new ne),this._lineNumbers=[],this._lastLineRelativePosition=0,this._hoverOnLine=-1,this._hoverOnColumn=-1,this._layoutInfo=this._editor.getLayoutInfo(),this._rootDomNode=document.createElement("div"),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Vo),this._rootDomNode.style.width=`${this._layoutInfo.width-this._layoutInfo.minimap.minimapCanvasOuterWidth-this._layoutInfo.verticalScrollbarWidth}px`}get hoverOnLine(){return this._hoverOnLine}get hoverOnColumn(){return this._hoverOnColumn}get lineNumbers(){return this._lineNumbers}getCurrentLines(){return this._lineNumbers}setState(e){mr(this._rootDomNode),this._disposableStore.clear(),this._lineNumbers.length=0;let t=this._editor.getOption(64);e.lineNumbers.length*t+e.lastLineRelativePosition>0?(this._lastLineRelativePosition=e.lastLineRelativePosition,this._lineNumbers=e.lineNumbers):(this._lastLineRelativePosition=0,this._lineNumbers=[]),this._renderRootNode()}_renderRootNode(){if(!this._editor._getViewModel())return;for(let[r,o]of this._lineNumbers.entries()){let s=this._renderChildNode(r,o);this._rootDomNode.appendChild(s)}let e=this._editor.getOption(64),t=this._lineNumbers.length*e+this._lastLineRelativePosition;this._rootDomNode.style.display=t>0?"block":"none",this._rootDomNode.style.height=t.toString()+"px",this._rootDomNode.setAttribute("role","list"),this._editor.getOption(70).side==="left"&&(this._rootDomNode.style.marginLeft=this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth+"px")}_renderChildNode(e,t){let n=document.createElement("div"),r=this._editor._getViewModel(),o=r.coordinatesConverter.convertModelPositionToViewPosition(new Se(t,1)).lineNumber,s=r.getViewLineRenderingData(o),a=this._editor.getLayoutInfo(),l=a.width-a.minimap.minimapCanvasOuterWidth-a.verticalScrollbarWidth,c=this._editor.getOption(70).side,d=this._editor.getOption(64),u=this._editor.getOption(65),h;try{h=i1.filter(s.inlineDecorations,o,s.minColumn,s.maxColumn)}catch(N){h=[]}let p=new mb(!0,!0,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,0,s.tokens,h,s.tabSize,s.startVisibleColumn,1,1,1,500,"none",!0,!0,null),m=new A_(2e3);gb(p,m);let g;EX?g=EX.createHTML(m.build()):g=m.build();let b=document.createElement("span");b.className="sticky-line",b.classList.add(`stickyLine${t}`),b.style.lineHeight=`${d}px`,b.innerHTML=g;let S=document.createElement("span");S.className="sticky-line",S.style.lineHeight=`${d}px`,c==="left"?S.style.width=`${a.contentLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(S.style.width=`${a.contentLeft}px`);let k=document.createElement("span");return u.renderType===1||u.renderType===3&&t%10===0?k.innerText=t.toString():u.renderType===2&&(k.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),k.className="sticky-line-number",k.style.lineHeight=`${d}px`,k.style.width=`${a.lineNumbersWidth}px`,c==="left"?k.style.paddingLeft=`${a.lineNumbersLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(k.style.paddingLeft=`${a.lineNumbersLeft}px`),S.appendChild(k),this._editor.applyFontInfo(b),this._editor.applyFontInfo(k),n.appendChild(S),n.appendChild(b),n.className="sticky-line-root",n.setAttribute("role","listitem"),n.tabIndex=0,n.style.lineHeight=`${d}px`,n.style.width=`${l}px`,n.style.height=`${d}px`,n.style.zIndex="0",e===this._lineNumbers.length-1&&(n.style.position="relative",n.style.zIndex="-1",n.style.top=this._lastLineRelativePosition+"px"),this._disposableStore.add(Rt(n,"mouseover",N=>{if(this._editor.hasModel()){let H=new nR(N).target.innerText;this._hoverOnLine=t,this._hoverOnColumn=this._editor.getModel().getLineContent(t).indexOf(H)+1||-1}})),n}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}}});var Pge,XI,Fge,Fd,Hp,Jg,Zg,bh,QI,ev=M(()=>{oi();gi();At();Tm();tf();ri();qe();Ns();Et();bl();ts();Ce();xt();Pge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},XI=function(i,e){return function(t,n){e(t,n,i)}},Fge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Fd=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let r=n;for(let o=0;t.children.get(r)!==void 0;o++)r=`${n}_${o}`;return r}static empty(e){return e.children.size===0}},Hp=class extends Fd{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},Jg=class extends Fd{constructor(e,t,n,r){super(),this.id=e,this.parent=t,this.label=n,this.order=r,this.children=new Map}},Zg=class i extends Fd{static create(e,t,n){let r=new Ni(n),o=new i(t.uri),s=e.ordered(t),a=s.map((c,d)=>{var u;let h=Fd.findId(`provider_${d}`,o),p=new Jg(h,o,(u=c.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,r.token)).then(m=>{for(let g of m||[])i._makeOutlineElement(g,p);return p},m=>(Ut(m),p)).then(m=>{Fd.empty(m)?m.remove():o._groups.set(h,m)})}),l=e.onDidChange(()=>{let c=e.ordered(t);ha(c,s)||r.cancel()});return Promise.all(a).then(()=>r.token.isCancellationRequested&&!n.isCancellationRequested?i.create(e,t,n):o._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(e,t){let n=Fd.findId(e,t),r=new Hp(n,t,e);if(e.children)for(let o of e.children)i._makeOutlineElement(o,r);t.children.set(r.id,r)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(let[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=ao.first(this._groups.values());for(let[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof Hp?e.push(t.symbol):e.push(...ao.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>P.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((n,r)=>Se.compare(P.getStartPosition(n.range),P.getStartPosition(r.range))||Se.compare(P.getEndPosition(r.range),P.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(let r of t)e.push({kind:r.kind,tags:r.tags,name:r.name,detail:r.detail,containerName:r.containerName||n,range:r.range,selectionRange:r.selectionRange,children:void 0}),r.children&&i._flattenDocumentSymbols(e,r.children,r.name)}},bh=rr("IOutlineModelService"),QI=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new ne,this._cache=new fa(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(r=>{this._cache.delete(r.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return Fge(this,void 0,void 0,function*(){let n=this._languageFeaturesService.documentSymbolProvider,r=n.ordered(e),o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!ha(o.provider,r)){let a=new Ni;o={versionId:e.getVersionId(),provider:r,promiseCnt:0,source:a,promise:Zg.create(n,e,a.token),model:void 0},this._cache.set(e.id,o);let l=Date.now();o.promise.then(c=>{o.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(o.model)return o.model;o.promiseCnt+=1;let s=t.onCancellationRequested(()=>{--o.promiseCnt===0&&(o.source.cancel(),this._cache.delete(e.id))});try{return yield o.promise}finally{s.dispose()}})}};QI=Pge([XI(0,be),XI(1,an),XI(2,Ci)],QI);sr(bh,QI,1)});var Cc,yh,Ch,QC=M(()=>{Cc=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},yh=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},Ch=class{constructor(e,t,n,r){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=r}}});var t9,iv,kX,tv,Hd,JC,ZC,JI,e9,ZI,eA,IX=M(()=>{Ce();xt();ev();Dt();Ny();DE();kE();Kn();At();QC();Tm();t9=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},iv=function(i,e){return function(t,n){e(t,n,i)}},kX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(tv||(tv={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(Hd||(Hd={}));JC=class{constructor(e,t,n,r){this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=new No(300);let o=new JI(n),s=new eA(this._editor,n),a=new ZI(this._editor,t);switch(r){case tv.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(a);break;case tv.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case tv.INDENTATION_MODEL:this._modelProviders.push(a);break}this._store=new ne}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,n){return kX(this,void 0,void 0,function*(){return this._store.clear(),this._store.add({dispose:()=>{var r;this._cancelModelPromise(),(r=this._updateScheduler)===null||r===void 0||r.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>kX(this,void 0,void 0,function*(){for(let r of this._modelProviders){let{statusPromise:o,modelPromise:s}=r.computeStickyModel(e,t,n);this._modelPromise=s;let a=yield o;if(this._modelPromise!==s)return null;switch(a){case Hd.CANCELED:return this._store.clear(),null;case Hd.VALID:return r.stickyModel}}return null}))})}};JC=t9([iv(1,Tt),iv(2,be)],JC);ZC=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Hd.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let r=Vt(o=>this.createModelFromProvider(e,t,o));return{statusPromise:r.then(o=>this.isModelValid(o)?n.isCancellationRequested?Hd.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,o),Hd.VALID):this._invalid()).then(void 0,o=>(at(o),Hd.CANCELED)),modelPromise:r}}isModelValid(e){return!0}isProviderValid(e){return!0}},JI=class extends ZC{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return Zg.create(this._languageFeaturesService.documentSymbolProvider,e,n)}createStickyModel(e,t,n,r){var o;let{stickyOutlineElement:s,providerID:a}=this._stickyModelFromOutlineModel(r,(o=this._stickyModel)===null||o===void 0?void 0:o.outlineProviderId);return new Ch(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(ao.first(e.children.values())instanceof Jg){let a=ao.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,d;for(let[u,h]of e.children.entries()){let p=this._findSumOfRangesOfGroup(h);p>c&&(d=h,c=p,l=h.id)}t=l,n=d.children}}else n=e.children;let r=[],o=Array.from(n.values()).sort((a,l)=>{let c=new Cc(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new Cc(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,d)});for(let a of o)r.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new yh(void 0,r,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let n=[];for(let o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(let s of o.children.values())n.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));n.sort((o,s)=>this._comparator(o.range,s.range));let r=new Cc(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new yh(r,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(let n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Hp?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};JI=t9([iv(0,be)],JI);e9=class extends ZC{constructor(e){super(),this._foldingLimitReporter=new N0(e)}createStickyModel(e,t,n,r){let o=this._fromFoldingRegions(r);return new Ch(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],r=new yh(void 0,[],void 0);for(let o=0;o0}createModelFromProvider(e,t,n){let r=el.getFoldingRangeProviders(this._languageFeaturesService,e);return new Vu(e,r,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};eA=t9([iv(1,be)],eA)});var Hge,AX,LX,tA,i9,MX=M(()=>{Ce();xt();gi();Dt();oi();lo();qt();Kn();IX();QC();Hge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},AX=function(i,e){return function(t,n){e(t,n,i)}},LX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},tA=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},i9=class extends oe{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._store.add(new $e),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=new ne,this._updateSoon=this._register(new ti(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(111)&&this.readConfiguration()})),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){if(this._options=this._editor.getOption(111),!this._options.enabled){this._sessionStore.clear();return}this._stickyModelProvider=new JC(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel),this._sessionStore.add(this._editor.onDidChangeModel(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update()}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}update(){var e;return LX(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new Ni,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return LX(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider)return;let t=this._editor.getModel(),n=t.getVersionId(),o=(this._model?!nf(this._model.uri,t.uri):!1)?setTimeout(()=>{e.isCancellationRequested||(this._model=new Ch(t.uri,t.getVersionId(),void 0,void 0),this._onDidChangeStickyScroll.fire())},75):void 0;this._model=yield this._stickyModelProvider.update(t,n,e),clearTimeout(o)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,r,o){if(t.children.length===0)return;let s=o,a=[];for(let d=0;dd-u)),c=this.updateIndex(tu(a,e.startLineNumber+r,(d,u)=>d-u));for(let d=l;d<=c;d++){let u=t.children[d];if(!u)return;if(u.range){let h=u.range.startLineNumber,p=u.range.endLineNumber;e.startLineNumber<=p+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,n.push(new tA(h,p-1,r+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,r+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,r,o)}}getCandidateStickyLinesIntersecting(e){var t,n;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let r=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,r,0,-1);let o=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(o)for(let s of o)r=r.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return r}};i9=Hge([AX(1,be),AX(2,Tt)],i9)});var Bge,Bp,DX,xs,iA=M(()=>{Ce();xt();TX();MX();Et();Tl();Yi();ft();jt();xg();qe();Y2();bk();ri();gi();Kn();Ns();Ht();QC();Bge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bp=function(i,e){return function(t,n){e(t,n,i)}},DX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xs=class NX extends oe{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=r,this._contextKeyService=a,this._sessionStore=new ne,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._stickyScrollWidget=new XC(this._editor),this._stickyLineCandidateProvider=new i9(this._editor,n,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new Qg([],0),this._readConfiguration(),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(111)&&this._readConfiguration()})),this._register(Rt(this._stickyScrollWidget.getDomNode(),on.CONTEXT_MENU,c=>DX(this,void 0,void 0,function*(){this._onContextMenu(c)}))),this._stickyScrollFocusedContextKey=O.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=O.stickyScrollVisible.bindTo(this._contextKeyService);let l=this._register(Ts(this._stickyScrollWidget.getDomNode()));this._register(l.onDidBlur(c=>{let d=this._stickyScrollWidget.getDomNode().clientHeight;this._positionRevealed===!1&&d===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(l.onDidFocus(c=>{this.focus()})),this._register(this._createClickLinkGesture()),this._register(Rt(this._stickyScrollWidget.getDomNode(),on.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(NX.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}if(this._stickyScrollFocusedContextKey.get()===!0)return;this._focused=!0,this._focusDisposableStore=new ne,this._stickyScrollFocusedContextKey.set(!0);let t=this._stickyScrollWidget.getDomNode();t.lastElementChild.focus(),this._stickyElements=t.children,this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyElements.item(this._focusedStickyElementIndex).focus()}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._positionRevealed=!0,this._editor.revealPosition(e),this._editor.setSelection(P.fromPositions(e)),this._editor.focus()}_createClickLinkGesture(){let e=new ne,t=new ne;e.add(t);let n=new al(this._editor,!0);return e.add(n),e.add(n.onMouseMoveOrRelevantKeyDown(([r,o])=>{if(!this._editor.hasModel()||!r.hasTriggerModifier){t.clear();return}let s=r.target;if(s.detail===this._stickyScrollWidget.getId()&&s.element.innerText===s.element.innerHTML){let a=s.element.innerText;if(this._stickyScrollWidget.hoverOnColumn===-1)return;let l=this._stickyScrollWidget.hoverOnLine,c=this._stickyScrollWidget.hoverOnColumn,d=new P(l,c,l,c+a.length);if(!d.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=d,t.clear();else if(s.element.style.textDecoration==="underline")return;let u=new Ni;t.add(Ft(()=>u.dispose(!0)));let h;rh(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Se(l,c+1),u.token).then(p=>{if(!u.token.isCancellationRequested)if(p.length!==0){this._candidateDefinitionsLength=p.length;let m=s.element;h!==m?(t.clear(),h=m,h.style.textDecoration="underline",t.add(Ft(()=>{h.style.textDecoration="none"}))):h||(h=m,h.style.textDecoration="underline",t.add(Ft(()=>{h.style.textDecoration="none"})))}else t.clear()})}else t.clear()})),e.add(n.onCancel(()=>{t.clear()})),e.add(n.onExecute(r=>DX(this,void 0,void 0,function*(){r.target.detail===this._stickyScrollWidget.getId()&&(r.hasTriggerModifier?(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:1})),this._instaService.invokeFunction(TC,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})):r.isRightClick||(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:this._stickyScrollWidget.hoverOnColumn})))}))),e}_onContextMenu(e){this._contextMenuService.showContextMenu({menuId:xe.StickyScrollContext,getAnchor:()=>e})}_readConfiguration(){let e=this._editor.getOption(111);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(()=>this._renderStickyScroll())),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>this._renderStickyScroll())),this._enabled=!0);this._editor.getOption(65).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>this._renderStickyScroll()))}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let n of t)for(let r of e.ranges)if(n>=r.fromLineNumber&&n<=r.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){let e=this._editor.getLayoutInfo(),t=e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth;this._stickyScrollWidget.getDomNode().style.width=`${t}px`;let n=e.height/this._editor.getOption(64);this._maxStickyLines=Math.round(n*.25)}_renderStickyScroll(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._stickyLineCandidateProvider.getVersionId();if(t===void 0||t===e.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.lineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._stickyElements=this._stickyScrollWidget.getDomNode().children,this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyElements.length-1,this._focusedStickyElementIndex!==-1&&this._stickyElements.item(this._focusedStickyElementIndex).focus();else{let n=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyElements.length===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(n)||(this._focusedStickyElementIndex=this._stickyElements.length-1),this._stickyElements.item(this._focusedStickyElementIndex).focus())}}findScrollWidgetState(){let e=this._editor.getOption(64),t=Math.min(this._maxStickyLines,this._editor.getOption(111).maxLineCount),n=this._editor.getScrollTop(),r=0,o=[],s=this._editor.getVisibleRanges();if(s.length!==0){let a=new Cc(s[0].startLineNumber,s[s.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(let c of l){let d=c.startLineNumber,u=c.endLineNumber,h=c.nestingDepth;if(u-d>0){let p=(h-1)*e,m=h*e,g=this._editor.getBottomForLineNumber(d)-n,b=this._editor.getTopForLineNumber(u)-n,S=this._editor.getBottomForLineNumber(u)-n;if(p>b&&p<=S){o.push(d),r=S-m;break}else m>g&&m<=S&&o.push(d);if(o.length===t)break}}}return new Qg(o,r)}dispose(){super.dispose(),this._sessionStore.dispose()}};xs.ID="store.contrib.stickyScrollController";xs=Bge([Bp(1,ls),Bp(2,be),Bp(3,He),Bp(4,Tt),Bp(5,an),Bp(6,Ke)],xs)});var zge,n9,c9,r9,o9,s9,a9,l9,RX=M(()=>{Ze();De();SX();Yi();jn();ft();jt();iA();zge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},n9=class extends rs{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:v("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:v({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:CX.View,toggled:{condition:ce.equals("config.editor.stickyScroll.enabled",!0),title:v("stickyScroll","Sticky Scroll"),mnemonicTitle:v({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:xe.CommandPalette},{id:xe.MenubarViewMenu,group:"5_editor",order:2},{id:xe.StickyScrollContext}]})}run(e){return zge(this,void 0,void 0,function*(){let t=e.get(Mt),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)})}},c9=100,r9=class extends ua{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:v("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:v({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ce.and(ce.has("config.editor.stickyScroll.enabled"),O.stickyScrollVisible),menu:[{id:xe.CommandPalette}]})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focus()}},o9=class extends ua{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:v("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:c9,primary:18}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focusNext()}},s9=class extends ua{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:v("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:c9,primary:16}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focusPrevious()}},a9=class extends ua{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:v("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:c9,primary:3}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.goToFocused()}},l9=class extends ua{constructor(){super({id:"editor.action.selectEditor",title:{value:v("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:c9,primary:9}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.selectEditor()}}});var nA=M(()=>{Ze();RX();iA();Yi();Ae(xs.ID,xs,1);mi(n9);mi(r9);mi(s9);mi(o9);mi(a9);mi(l9)});var aA,Sh,Uge,rA,oA,sA,d9,lA=M(()=>{gi();Cl();Tm();Ce();Ze();Ar();qe();xt();H7();Qu();O7();F7();Ym();Et();aA=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Sh=function(i,e){return function(t,n){e(t,n,i)}},Uge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},rA=class{constructor(e,t,n,r,o,s){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=r,this.command=o,this.completion=s}},oA=class extends KN{constructor(e,t,n,r,o,s){super(o.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=r,this._suggestMemoryService=s}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&l.resolve(et.None)}return t}};oA=aA([Sh(5,fp)],oA);sA=class{constructor(e,t,n,r){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=n,this._suggestMemoryService=r}provideInlineCompletions(e,t,n,r){var o;return Uge(this,void 0,void 0,function*(){if(n.selectedSuggestionInfo)return;let s=this._getEditorOption(86,e);if(nl.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(nl.valueFor(s,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c!=null&&c.word||(d=this._getTriggerCharacterInfo(e,t)),!(c!=null&&c.word)&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let u,h=e.getValueInRange(new P(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,c))){let p=new rg(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=p,this._lastResult.acquire(),u=this._lastResult}else{let p=yield K0(this._languageFeatureService.completionProvider,e,t,new dc(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},r),m;p.needsClipboard&&(m=yield this._clipboardService.readText());let g=new mp(p.items,t.column,new rg(h,0),Ed.None,this._getEditorOption(114,e),this._getEditorOption(108,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);u=new oA(e,t.lineNumber,c,g,p,this._suggestMemoryService)}return this._lastResult=u,u})}handleItemDidShow(e,t){t.completion.resolve(et.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;let r=e.getValueInRange(P.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((n=s.triggerCharacters)===null||n===void 0)&&n.includes(r)&&o.add(s);if(o.size!==0)return{providers:o,ch:r}}};sA=aA([Sh(1,be),Sh(2,Ms),Sh(3,fp)],sA);d9=class zp{constructor(e,t,n,r){if(++zp._counter===1){let o=r.createInstance(sA,(s,a)=>{var l;return((l=n.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(s)});zp._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--zp._counter===0&&((e=zp._disposable)===null||e===void 0||e.dispose(),zp._disposable=void 0)}};d9._counter=0;d9=aA([Sh(1,be),Sh(2,Zt),Sh(3,He)],d9);Ae("suggest.inlineCompletionsProvider",d9,0)});var OX=M(()=>{});var PX=M(()=>{OX()});var FX=M(()=>{});var HX=M(()=>{FX()});var BX=M(()=>{});var zX=M(()=>{BX()});var Wge,jge,u9,UX=M(()=>{Ht();kre();iR();dP();qt();Ce();cs();zX();Wge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jge=function(i,e){return function(t,n){e(t,n,i)}},u9=class extends oe{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},r){var o;super(),this._link=t,this._enabled=!0,this.el=me(e,fe("a.monaco-link",{tabIndex:(o=t.tabIndex)!==null&&o!==void 0?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");let s=this._register(new $_(this.el,"click")),a=this._register(new $_(this.el,"keypress")),l=li.chain(a.event).map(u=>new v_(u)).filter(u=>u.keyCode===3).event,c=this._register(new $_(this.el,cP.Tap)).event;this._register(Z_.addTarget(this.el));let d=li.any(s.event,l,c);this._register(d(u=>{this.enabled&&(Qd.stop(u,!0),n!=null&&n.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};u9=Wge([jge(3,Qi)],u9)});var WX,jX,Vge,h9,cA,VX=M(()=>{HX();Ht();gf();Oc();Ce();Zu();Et();UX();Al();qr();WX=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jX=function(i,e){return function(t,n){e(t,n,i)}},Vge=26,h9=class extends oe{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(cA))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,Vge)}};h9=WX([jX(1,He)],h9);cA=class extends oe{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(io,{}),this.element=fe("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=fe("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){mr(this.element)}show(e){mr(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=me(this.element,fe("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(fe(`div${mt.asCSSSelector(e.icon)}`));let r=me(this.element,fe("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=me(this.element,fe("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(u9,this.messageActionsContainer,Object.assign(Object.assign({},s),{tabIndex:-1}),{}));let o=me(this.element,fe("div.action-container"));this.actionBar=this._register(new Oo(o)),this.actionBar.push(this._register(new is("banner.close","Close Banner",mt.asClassName(lb),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};cA=WX([jX(0,He)],cA)});function qge(i,e){return{nonBasicASCII:e.nonBasicASCII===Y_?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Y_?!i:e.includeComments,includeStrings:e.includeStrings===Y_?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}function pA(i){return`U+${i.toString(16).padStart(4,"0")}`}function dA(i){let e=`\`${pA(i)}\``;return lw.isInvisibleCharacter(i)||(e+=` "${`${Gge(i)}`}"`),e}function Gge(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function KX(i,e){return Zw.computeUnicodeHighlightReason(i,e)}function $ge(i,e){return Zn(this,void 0,void 0,function*(){let t=i.getValue(Ca.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let r of e)n[String.fromCodePoint(r)]=!0;yield i.updateValue(Ca.allowedCharacters,n,2)})}function Yge(i,e){var t;return Zn(this,void 0,void 0,function*(){let n=(t=i.inspect(Ca.allowedLocales).user)===null||t===void 0?void 0:t.value,r;typeof n=="object"&&n?r=Object.assign({},n):r={};for(let o of e)r[o]=!0;yield i.updateValue(Ca.allowedLocales,r,2)})}function Xge(i){throw new Error(`Unexpected value: ${i}`)}var vA,Up,Zn,Kge,Wp,uA,hA,fA,jp,mA,gA,Bd,Vp,Kp,nv,_A=M(()=>{Dt();or();Sl();Ce();nr();Si();PX();Ze();Qm();qn();roe();hb();os();Qre();lc();mC();VX();De();jn();Et();cs();Ll();Al();ooe();vA=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Up=function(i,e){return function(t,n){e(t,n,i)}},Zn=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Kge=Ei("extensions-warning-message",lt.warning,v("warningIcon","Icon shown with a warning message in the extensions editor.")),Wp=class extends oe{constructor(e,t,n,r){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;let s=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount),a;if(o.nonBasicAsciiCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new Kp};else if(o.ambiguousCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Bd};else if(o.invisibleCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Vp};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Kge,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(r.createInstance(h9,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(121),this._register(n.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(121)&&(this._options=e.getOption(121),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=qge(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?$N:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new uA(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new hA(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Wp.ID="editor.contrib.unicodeHighlighter";Wp=vA([Up(1,Ml),Up(2,lF),Up(3,He)],Wp);uA=class extends oe{constructor(e,t,n,r){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new ti(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let r of t.ranges)n.push({range:r,options:jp.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!qw(t,e))return null;let n=t.getValueInRange(e.range);return{reason:KX(n,this._options),inComment:Gw(t,e),inString:$w(t,e)}}};uA=vA([Up(3,Ml)],uA);hA=class extends oe{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new ti(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let r of e){let o=Zw.computeUnicodeHighlights(this._model,this._options,r);for(let s of o.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||o.hasMore}if(!n.hasMore)for(let r of n.ranges)t.push({range:r,options:jp.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return qw(t,e)?{reason:KX(n,this._options),inComment:Gw(t,e),inString:$w(t,e)}:null}},fA=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=this._editor.getContribution(Wp.ID);if(!r)return[];let o=[],s=300;for(let a of t){let l=r.getDecorationInfo(a);if(!l)continue;let d=n.getValueInRange(a.range).codePointAt(0),u=dA(d),h;switch(l.reason.kind){case 0:{y_(l.reason.confusableWith)?h=v("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",u,dA(l.reason.confusableWith.codePointAt(0))):h=v("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",u,dA(l.reason.confusableWith.codePointAt(0)));break}case 1:h=v("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",u);break;case 2:h=v("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",u);break}let p={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},m=v("unicodeHighlight.adjustSettings","Adjust settings"),g=`command:${nv.ID}?${encodeURIComponent(JSON.stringify(p))}`,b=new sn("",!0).appendMarkdown(h).appendText(" ").appendLink(g,m);o.push(new no(this,a.range,[b],!1,s++))}return o}renderHoverParts(e,t){return XT(e,t,this._editor,this._languageService,this._openerService)}};fA=vA([Up(1,Xi),Up(2,Qi)],fA);jp=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,r=this.map.get(n);return r||(r=ct.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,r)),r}};jp.instance=new jp;mA=class extends se{constructor(){super({id:Bd.ID,label:v("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.includeComments,!1,2)})}},gA=class extends se{constructor(){super({id:Bd.ID,label:v("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.includeStrings,!1,2)})}},Bd=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.ambiguousCharacters,!1,2)})}};Bd.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";Vp=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.invisibleCharacters,!1,2)})}};Vp.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";Kp=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.nonBasicASCII,!1,2)})}};Kp.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";nv=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,n){return Zn(this,void 0,void 0,function*(){let{codePoint:r,reason:o,inString:s,inComment:a}=n,l=String.fromCodePoint(r),c=e.get(lr),d=e.get(Mt);function u(m){return lw.isInvisibleCharacter(m)?v("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",pA(m)):v("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${pA(m)} "${l}"`)}let h=[];if(o.kind===0)for(let m of o.notAmbiguousInLocales)h.push({label:v("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>Zn(this,void 0,void 0,function*(){Yge(d,[m])})});if(h.push({label:u(r),run:()=>$ge(d,[r])}),a){let m=new mA;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(s){let m=new gA;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}if(o.kind===0){let m=new Bd;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===1){let m=new Vp;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===2){let m=new Kp;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else Xge(o);let p=yield c.pick(h,{title:v("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});p&&(yield p.run())})}};nv.ID="editor.action.unicodeHighlight.showExcludeOptions";X(Bd);X(Vp);X(Kp);X(nv);Ae(Wp.ID,Wp,1);Wo.register(fA)});function Zge(i,e,t){i.setModelProperty(e.uri,GX,t)}function eve(i,e){return i.getModelProperty(e.uri,GX)}var Qge,qX,Jge,GX,rv,bA=M(()=>{Ce();lo();Ze();Ar();De();e3();Qge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qX=function(i,e){return function(t,n){e(t,n,i)}},Jge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},GX="ignoreUnusualLineTerminators";rv=class extends oe{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(122),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(122)&&(this._config=this._editor.getOption(122),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(r=>{r.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return Jge(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||eve(this._codeEditorService,e)===!0||this._editor.getOption(88))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=yield this._dialogService.confirm({title:v("unusualLineTerminators.title","Unusual Line Terminators"),message:v("unusualLineTerminators.message","Detected unusual line terminators"),detail:v("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Dr(e.uri)),primaryButton:v({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:v("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){Zge(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};rv.ID="editor.contrib.unusualLineTerminatorsDetector";rv=Qge([qX(1,bf),qX(2,Zt)],rv);Ae(rv.ID,rv,1)});function YX(i,e,t,n){let r=i.ordered(e);return F_(r.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,n)).then(void 0,Ut)),Ui)}function ive(i,e,t,n){return i.has(e)?new yA(e,t,n,i):new CA(e,t,n)}var tve,$X,m9,f9,yA,CA,SA,wh,p9,wA,xA,EA,TA=M(()=>{Lo();oi();Dt();gi();At();Ce();Ze();qe();jt();br();De();ft();xt();lI();tve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$X=function(i,e){return function(t,n){e(t,n,i)}},m9=new nt("hasWordHighlights",!1);f9=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Vt(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new P(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let r=t.startLineNumber,o=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=n.length;!l&&c=s&&(l=!0)}return l}cancel(){this.result.cancel()}},yA=class extends f9{constructor(e,t,n,r){super(e,t,n),this._providers=r}_compute(e,t,n,r){return YX(this._providers,e,t.getPosition(),r).then(o=>o||[])}},CA=class extends f9{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,r){return of(250,r).then(()=>{if(!t.isEmpty())return[];let o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,n,!1).map(a=>({range:a.range,kind:$m.Text}))})}isValid(e,t,n){let r=t.isEmpty();return this._selectionIsEmpty!==r?!1:super.isValid(e,t,n)}};Gr("_executeDocumentHighlights",(i,e,t)=>{let n=i.get(be);return YX(n.documentHighlightProvider,e,t,et.None)});SA=class{constructor(e,t,n){this.toUnhook=new ne,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=m9.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(78),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(r=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(r)})),this.toUnhook.add(e.onDidChangeModelContent(r=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(r=>{let o=this.editor.getOption(78);this.occurrencesHighlight!==o&&(this.occurrencesHighlight=o,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(P.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);Di(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);Di(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,n=e.endColumn,r=this._getWord();if(!r||r.startColumn>t||r.endColumn{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},at)}}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(let t of this.workerRequestValue)t.range&&e.push({range:t.range,options:QY(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}dispose(){this._stopAll(),this.toUnhook.dispose()}},wh=class XX extends oe{static get(e){return e.getContribution(XX.ID)}constructor(e,t,n){super(),this.wordHighlighter=null;let r=()=>{e.hasModel()&&(this.wordHighlighter=new SA(e,n.documentHighlightProvider,t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),r()})),r()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};wh.ID="editor.contrib.wordHighlighter";wh=tve([$X(1,Ke),$X(2,be)],wh);p9=class extends se{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=wh.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},wA=class extends p9{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:v("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:m9,kbOpts:{kbExpr:O.editorTextFocus,primary:65,weight:100}})}},xA=class extends p9{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:v("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:m9,kbOpts:{kbExpr:O.editorTextFocus,primary:1089,weight:100}})}},EA=class extends se{constructor(){super({id:"editor.action.wordHighlight.trigger",label:v("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:m9.toNegated(),kbOpts:{kbExpr:O.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let r=wh.get(t);r&&r.restoreViewState(!0)}};Ae(wh.ID,wh,0);X(wA);X(xA);X(EA)});var xh,cl,dl,kA,IA,AA,LA,MA,DA,NA,RA,OA,PA,FA,HA,BA,zA,UA,WA,Eh,ov,sv,jA,VA,KA,qA,GA,$A,YA,g9=M(()=>{Ze();E_();Qm();ore();NR();are();ri();qe();Mn();jt();Kn();De();Kw();ft();toe();xh=class extends wi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let r=zc(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=new Se(l.positionLineNumber,l.positionColumn),d=this._move(r,o,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>MR.fromModelSelection(l))),a.length===1){let l=new Se(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,n){return n?new je(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new je(t.lineNumber,t.column,t.lineNumber,t.column)}},cl=class extends xh{_move(e,t,n,r){return Jh.moveWordLeft(e,t,n,r)}},dl=class extends xh{_move(e,t,n,r){return Jh.moveWordRight(e,t,n,r)}},kA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},IA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},AA=class extends cl{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(n1,r1))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},LA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},MA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},DA=class extends cl{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(n1,r1))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},NA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,r){return super._move(zc(Xm.wordSeparators.defaultValue),t,n,r)}},RA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,r){return super._move(zc(Xm.wordSeparators.defaultValue),t,n,r)}},OA=class extends dl{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},PA=class extends dl{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(n1,r1))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},FA=class extends dl{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},HA=class extends dl{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},BA=class extends dl{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(n1,r1))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},zA=class extends dl{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},UA=class extends dl{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,r){return super._move(zc(Xm.wordSeparators.defaultValue),t,n,r)}},WA=class extends dl{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,r){return super._move(zc(Xm.wordSeparators.defaultValue),t,n,r)}},Eh=class extends wi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let r=e.get(Tt);if(!t.hasModel())return;let o=zc(t.getOption(126)),s=t.getModel(),a=t.getSelections(),l=t.getOption(5),c=t.getOption(9),d=r.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(p=>{let m=this._delete({wordSeparators:o,model:s,selection:p,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(7),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new _l(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},ov=class extends Eh{_delete(e,t){let n=Jh.deleteWordLeft(e,t);return n||new P(1,1,1,1)}},sv=class extends Eh{_delete(e,t){let n=Jh.deleteWordRight(e,t);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new P(r,o,r,o)}},jA=class extends ov{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:O.writable})}},VA=class extends ov{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:O.writable})}},KA=class extends ov{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},qA=class extends sv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:O.writable})}},GA=class extends sv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:O.writable})}},$A=class extends sv{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},YA=class extends se{constructor(){super({id:"deleteInsideWord",precondition:O.writable,label:v("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let r=zc(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=Jh.deleteInsideWord(r,o,l);return new _l(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};Me(new kA);Me(new IA);Me(new AA);Me(new LA);Me(new MA);Me(new DA);Me(new OA);Me(new PA);Me(new FA);Me(new HA);Me(new BA);Me(new zA);Me(new NA);Me(new RA);Me(new UA);Me(new WA);Me(new jA);Me(new VA);Me(new KA);Me(new qA);Me(new GA);Me(new $A);X(YA)});var XA,QA,v9,JA,ZA,_9,eL,tL,iL=M(()=>{Ze();NR();qe();jt();g9();Bi();XA=class extends Eh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=Nm.deleteWordPartLeft(e);return n||new P(1,1,1,1)}},QA=class extends Eh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=Nm.deleteWordPartRight(e);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new P(r,o,r,o)}},v9=class extends xh{_move(e,t,n,r){return Nm.moveWordPartLeft(e,t,n)}},JA=class extends v9{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};St.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");ZA=class extends v9{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};St.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");_9=class extends xh{_move(e,t,n,r){return Nm.moveWordPartRight(e,t,n)}},eL=class extends _9{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},tL=class extends _9{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};Me(new XA);Me(new QA);Me(new JA);Me(new ZA);Me(new eL);Me(new tL)});var av,nL=M(()=>{Ce();Ze();h0();De();av=class extends oe{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=Qn.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(v("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(v("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}};av.ID="editor.contrib.readOnlyMessageController";Ae(av.ID,av,2)});var QX=M(()=>{});var JX=M(()=>{QX()});var Th,rL=M(()=>{Lo();Yre();De();Yi();ft();Th=class i extends rs{constructor(){super({id:i.ID,title:{value:v({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(e){let t=e.get(Ke).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!Vw.getTabFocusMode(t);Vw.setTabFocusMode(r,t),r?Di(v("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Di(v("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Th.ID="editor.action.toggleTabFocusMode";mi(Th)});var sL=gt(lv=>{JX();Ht();Ore();Lo();e1();Ce();nr();Si();Sn();Ze();jt();rL();ft();Et();Gn();cs();Yc();var ZX=lv&&lv.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},b9=lv&&lv.__param||function(i,e){return function(t,n){e(t,n,i)}},eQ=new nt("accessibilityHelpWidgetVisible",!1),kh=class tQ extends oe{static get(e){return e.getContribution(tQ.ID)}constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(qp,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};kh.ID="editor.contrib.accessibilityHelpController";kh=ZX([b9(1,He)],kh);function nve(i,e){return!i||i.length===0?Ki.noSelection:i.length===1?e?Mo(Ki.singleSelectionRange,i[0].positionLineNumber,i[0].positionColumn,e):Mo(Ki.singleSelection,i[0].positionLineNumber,i[0].positionColumn):e?Mo(Ki.multiSelectionRange,i.length,e):i.length>0?Mo(Ki.multiSelection,i.length):""}var qp=class y9 extends Ds{constructor(e,t,n,r){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=r,this._editor=e,this._isVisibleKey=eQ.bindTo(this._contextKeyService),this._domNode=Aw(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-modal","true"),this._domNode.setAttribute("aria-hidden","true");let o=me(this._domNode.domNode,fe("h1",void 0,Ki.accessibilityHelpTitle));o.id="help-dialog-heading",this._domNode.setAttribute("aria-labelledby",o.id),this._contentDomNode=Aw(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._contentDomNode.domNode.id="help-dialog-content",this._domNode.appendChild(this._contentDomNode),this._contentDomNode.setAttribute("aria-describedby",this._contentDomNode.domNode.id),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(es(this._contentDomNode.domNode,"keydown",s=>{if(this._isVisible&&(s.equals(2083)&&(Di(Ki.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),mr(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Di(Ki.openingDocs);let a=this._editor.getRawOptions().accessibilityHelpUrl;typeof a=="undefined"&&(a="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(ht.parse(a)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return y9.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,n){let r=this._keybindingService.lookupKeybinding(e);return r?Mo(t,r.getAriaLabel()):Mo(n,e)}_buildContent(){let e=this._contentDomNode.domNode,t=this._editor.getOptions(),n=this._editor.getSelections(),r=0;if(n){let c=this._editor.getModel();c&&n.forEach(d=>{r+=c.getValueLengthInRange(d)})}me(e,fe("p",void 0,nve(n,r)));let o=me(e,fe("p"));t.get(59)?t.get(88)?o.textContent=Ki.readonlyDiffEditor:o.textContent=Ki.editableDiffEditor:t.get(88)?o.textContent=Ki.readonlyEditor:o.textContent=Ki.editableEditor;let s=me(e,fe("ul")),a=zn?Ki.changeConfigToOnMac:Ki.changeConfigToOnWinLinux;switch(t.get(2)){case 0:me(s,fe("li",void 0,a));break;case 2:me(s,fe("li",void 0,Ki.auto_on));break;case 1:me(s,fe("li",void 0,Ki.auto_off,a));break}t.get(139)?me(s,fe("li",void 0,this._descriptionForCommand(Th.ID,Ki.tabFocusModeOnMsg,Ki.tabFocusModeOnMsgNoKb))):me(s,fe("li",void 0,this._descriptionForCommand(Th.ID,Ki.tabFocusModeOffMsg,Ki.tabFocusModeOffMsgNoKb)));let l=zn?Ki.openDocMac:Ki.openDocWinLinux;me(s,fe("li",void 0,l)),me(e,fe("p",void 0,Ki.outroMsg))}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,mr(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(y9.WIDTH,e.width-40)),n=Math.max(5,Math.min(y9.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(n);let r=Math.round((e.height-n)/2);this._domNode.setTop(r);let o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}};qp.ID="editor.contrib.accessibilityHelpWidget";qp.WIDTH=500;qp.HEIGHT=300;qp=ZX([b9(1,Ke),b9(2,Bt),b9(3,Qi)],qp);var oL=class extends se{constructor(){super({id:"editor.action.showAccessibilityHelp",label:Ki.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=kh.get(t);n==null||n.show()}};Ae(kh.ID,kh,4);X(oL);var rve=wi.bindToContribution(kh.get);Me(new rve({id:"closeAccessibilityHelp",precondition:eQ,handler:i=>i.hide(),kbOpts:{weight:100+100,kbExpr:O.focus,primary:9,secondary:[1033]}}))});var iQ=M(()=>{});var nQ=M(()=>{iQ()});var lL=gt(cv=>{nQ();Ht();ma();Ce();Ze();br();_re();xre();os();hF();Yc();var ove=cv&&cv.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},rQ=cv&&cv.__param||function(i,e){return function(t,n){e(t,n,i)}},Gp=class oQ extends oe{static get(e){return e.getContribution(oQ.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(hf.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new C9(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Gp.ID="editor.contrib.inspectTokens";Gp=ove([rQ(1,Ib),rQ(2,Xi)],Gp);var aL=class extends se{constructor(){super({id:"editor.action.inspectTokens",label:cF.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=Gp.get(t);n==null||n.launch()}};function sve(i){let e="";for(let t=0,n=i.length;tZO,tokenize:(r,o,s)=>eP(e,s),tokenizeEncoded:(r,o,s)=>tP(n,s)}}var C9=class i extends oe{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=ave(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let r=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){r=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(n{De();Fc();Ce();Gn();s1();Ll();lve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},sQ=function(i,e){return function(t,n){e(t,n,i)}},dv=class S9{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Lr.as(Ta.Quickaccess)}provide(e){let t=new ne;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let r=this.registry.getQuickAccessProvider(n.substr(S9.PREFIX.length));r&&r.prefix&&r.prefix!==S9.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==S9.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,r=n||"\u2026";return{prefix:n,label:r,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:v("helpPickAriaLabel","{0}, {1}",r,t.description),description:t.description}})}};dv.PREFIX="?";dv=lve([sQ(0,lr),sQ(1,Bt)],dv)});var cL=M(()=>{Fc();s1();Yc();aQ();Lr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:dv,prefix:"",helpEntries:[{description:dF.helpQuickAccessActionLabel}]})});var $p,dL=M(()=>{VN();Ce();Li();zw();Vc();qO();ar();Lo();$p=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;let r=new ne;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=r.add(new Hi);return o.value=this.doProvide(e,t),r.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),r}doProvide(e,t){let n=new ne,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){let o={editor:r},s=fb(r);if(s){let a=Un(r.saveViewState());n.add(s.onDidChangeCursorPosition(()=>{a=Un(r.saveViewState())})),o.restoreViewState=()=>{a&&r===this.activeTextEditorControl&&r.restoreViewState(a)},n.add(d_(t.onCancellationRequested)(()=>{var l;return(l=o.restoreViewState)===null||l===void 0?void 0:l.call(o)}))}n.add(Ft(()=>this.clearDecorations(r))),n.add(this.provideWithTextEditor(o,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&Di(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return PP(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let r=[];this.rangeHighlightDecorationId&&(r.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let o=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:vi(q_),position:$r.Full}}}],[s,a]=n.deltaDecorations(r,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}});var uv,lQ=M(()=>{Ce();zw();dL();De();uv=class i extends $p{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=v("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,oe.None}provideWithTextEditor(e,t,n){let r=e.editor,o=new ne;o.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(r,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(r,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(r,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(r,l.lineNumber)){this.clearDecorations(r);return}let d=this.toRange(l.lineNumber,l.column);r.revealRangeInCenter(d,0),this.addDecorations(r,d)};s(),o.add(t.onDidChangeValue(()=>s()));let a=fb(r);return a&&a.getOptions().get(65).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(Ft(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),r=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:r+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?v("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):v("gotoLineLabel","Go to line {0}.",t);let r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?v("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):v("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let r=this.getModel(e);if(!r)return!1;let o={lineNumber:t,column:n};return r.validatePosition(o).equals(o)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}};uv.PREFIX=":"});var cve,dve,hv,fv,uL=M(()=>{lQ();Fc();s1();Ar();Li();Yc();qt();Ze();jt();Ll();cve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dve=function(i,e){return function(t,n){e(t,n,i)}},hv=class extends uv{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){return Un(this.editorService.getFocusedCodeEditor())}};hv=cve([dve(0,Zt)],hv);fv=class i extends se{constructor(){super({id:i.ID,label:t3.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(lr).quickAccess.show(hv.PREFIX)}};fv.ID="editor.action.gotoLine";X(fv);Lr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:hv,prefix:hv.PREFIX,helpEntries:[{description:t3.gotoLineActionLabel,commandId:fv.ID}]})});function x9(i,e,t=0,n=0){let r=e;return r.values&&r.values.length>1?uve(i,r.values,t,n):hQ(i,e,t,n)}function uve(i,e,t,n){let r=0,o=[];for(let s of e){let[a,l]=hQ(i,s,t,n);if(typeof a!="number")return uQ;r+=a,o.push(...l)}return[r,hve(o)]}function hQ(i,e,t,n){let r=P_(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?[r[0],nu(r)]:uQ}function hve(i){let e=i.sort((r,o)=>r.start-o.start),t=[],n;for(let r of e)!n||!fve(n,r)?(n=r,t.push(r)):(n.start=Math.min(n.start,r.start),n.end=Math.max(n.end,r.end));return t}function fve(i,e){return!(i.end=0,s=cQ(i),a,l=i.split(fQ);if(l.length>1)for(let c of l){let d=cQ(c),{pathNormalized:u,normalized:h,normalizedLowercase:p}=dQ(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:p,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:r,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function dQ(i){let e;Dc?e=i.replace(/\//g,__):e=i.replace(/\\/g,__);let t=_R(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function hL(i){return Array.isArray(i)?w9(i.map(e=>e.original).join(fQ)):w9(i.original)}var uQ,tdt,fQ,pQ=M(()=>{Cl();oR();nr();Si();uQ=[void 0,[]];tdt=Object.freeze({score:0});fQ=" "});var pve,mQ,pv,Go,fL,pL,gQ=M(()=>{Dt();gi();or();qr();pQ();Ce();Si();qe();br();ev();dL();De();xt();oi();pve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mQ=function(i,e){return function(t,n){e(t,n,i)}},pv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Go=class mL extends $p{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,v("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),oe.None}provideWithTextEditor(e,t,n){let r=e.editor,o=this.getModel(r);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,n):this.doProvideWithoutEditorSymbols(e,o,t,n):oe.None}doProvideWithoutEditorSymbols(e,t,n,r){let o=new ne;return this.provideLabelPick(n,v("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),pv(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||r.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,n,r))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return pv(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new cO,r=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(r.dispose(),n.complete(!0))}));return t.add(Ft(()=>n.complete(!1))),n.p})}doProvideWithEditorSymbols(e,t,n,r){var o;let s=e.editor,a=new ne;a.add(n.onDidAccept(u=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:u.inBackground}),u.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,r),c,d=u=>pv(this,void 0,void 0,function*(){c==null||c.dispose(!0),n.busy=!1,c=new Ni(r),n.busy=!0;try{let h=w9(n.value.substr(mL.PREFIX.length).trim()),p=yield this.doGetSymbolPicks(l,h,void 0,c.token);if(r.isCancellationRequested)return;if(p.length>0){if(n.items=p,u&&h.original.length===0){let m=HR(p,g=>!!(g.type!=="separator"&&g.range&&P.containsPosition(g.range.decoration,u)));m&&(n.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(n,v("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,v("noSymbolResults","No editor symbols"))}finally{r.isCancellationRequested||(n.busy=!1)}});return a.add(n.onDidChangeValue(()=>d(void 0))),d((o=s.getSelection())===null||o===void 0?void 0:o.getPosition()),a.add(n.onDidChangeActive(()=>{let[u]=n.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}doGetSymbolPicks(e,t,n,r){var o,s;return pv(this,void 0,void 0,function*(){let a=yield e;if(r.isCancellationRequested)return[];let l=t.original.indexOf(mL.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=hL(t.values[0]),u=hL(t.values.slice(1))):d=t;let h,p=(s=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||s===void 0?void 0:s.call(o);p&&(h=[{iconClass:p==="right"?mt.asClassName(lt.splitHorizontal):mt.asClassName(lt.splitVertical),tooltip:p==="right"?v("openToSide","Open to the Side"):v("openToBottom","Open to the Bottom")}]);let m=[];for(let S=0;Sc){let Xe=!1;if(d!==t&&([W,re]=x9(A,Object.assign(Object.assign({},t),{values:void 0}),c,H),typeof W=="number"&&(Xe=!0)),typeof W!="number"&&([W,re]=x9(A,d,c,H),typeof W!="number"))continue;if(!Xe&&u){if(K&&u.original.length>0&&([ae,Ne]=x9(K,u)),typeof ae!="number")continue;typeof W=="number"&&(W+=ae)}}let he=k.tags&&k.tags.indexOf(1)>=0;m.push({index:S,kind:k.kind,score:W,label:A,ariaLabel:N,description:K,highlights:he?void 0:{label:re,description:Ne},range:{selection:P.collapseToStart(k.selectionRange),decoration:k.range},strikethrough:he,buttons:h})}let g=m.sort((S,k)=>l?this.compareByKindAndScore(S,k):this.compareByScore(S,k)),b=[];if(l){let A=function(){k&&typeof S=="number"&&N>0&&(k.label=Mo(pL[S]||fL,N))},S,k,N=0;for(let H of g)S!==H.kind?(A(),S=H.kind,N=1,k={type:"separator"},b.push(k)):N++,b.push(H);A()}else g.length>0&&(b=[{label:v("symbols","symbols ({0})",m.length),type:"separator"},...g]);return b})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){let n=pL[e.kind]||fL,r=pL[t.kind]||fL,o=n.localeCompare(r);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return pv(this,void 0,void 0,function*(){let n=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}};Go.PREFIX="@";Go.SCOPE_PREFIX=":";Go.PREFIX_BY_CATEGORY=`${Go.PREFIX}${Go.SCOPE_PREFIX}`;Go=pve([mQ(0,be),mQ(1,bh)],Go);fL=v("property","properties ({0})"),pL={5:v("method","methods ({0})"),11:v("function","functions ({0})"),8:v("_constructor","constructors ({0})"),12:v("variable","variables ({0})"),4:v("class","classes ({0})"),22:v("struct","structs ({0})"),23:v("event","events ({0})"),24:v("operator","operators ({0})"),10:v("interface","interfaces ({0})"),2:v("namespace","namespaces ({0})"),3:v("package","packages ({0})"),25:v("typeParameter","type parameters ({0})"),1:v("modules","modules ({0})"),6:v("property","properties ({0})"),9:v("enum","enumerations ({0})"),21:v("enumMember","enumeration members ({0})"),14:v("string","strings ({0})"),0:v("file","files ({0})"),17:v("array","arrays ({0})"),15:v("number","numbers ({0})"),16:v("boolean","booleans ({0})"),18:v("object","objects ({0})"),19:v("key","keys ({0})"),7:v("field","fields ({0})"),13:v("constant","constants ({0})")}});var mve,gL,vL,mv,_L=M(()=>{u0();Z5();gQ();Fc();s1();Ar();Li();Yc();qt();Ze();jt();Ll();ev();xt();mve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},gL=function(i,e){return function(t,n){e(t,n,i)}},vL=class extends Go{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){return Un(this.editorService.getFocusedCodeEditor())}};vL=mve([gL(0,Zt),gL(1,be),gL(2,bh)],vL);mv=class i extends se{constructor(){super({id:i.ID,label:kb.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:O.hasDocumentSymbolProvider,kbOpts:{kbExpr:O.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(lr).quickAccess.show(Go.PREFIX,{itemActivation:RP.NONE})}};mv.ID="editor.action.quickOutline";X(mv);Lr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:vL,prefix:Go.PREFIX,helpEntries:[{description:kb.quickOutlineActionLabel,prefix:Go.PREFIX,commandId:mv.ID},{description:kb.quickOutlineByCategoryActionLabel,prefix:Go.PREFIX_BY_CATEGORY}]})});function bL(i,e){return e&&(i.stack||i.stacktrace)?v("stackTrace.format","{0}: {1}",_Q(i),vQ(i.stack)||vQ(i.stacktrace)):_Q(i)}function vQ(i){return Array.isArray(i)?i.join(` -`):i}function _Q(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?v("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function yL(i=null,e=!1){if(!i)return v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=vr(i),n=yL(t[0],e);return t.length>1?v("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(m_(i))return i;if(i.detail){let t=i.detail;if(t.error)return bL(t.error,e);if(t.exception)return bL(t.exception,e)}return i.stack?bL(i,e):i.message?i.message:v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var bQ=M(()=>{oi();Li();De()});function CL(i){let e=i;return Array.isArray(e.items)}function yQ(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var gv,Yp,E9,CQ=M(()=>{Dt();gi();Ce();Li();gv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(Yp||(Yp={}));E9=class extends oe{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var r;let o=new ne;e.canAcceptInBackground=!!(!((r=this.options)===null||r===void 0)&&r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=o.add(new Hi),l=()=>gv(this,void 0,void 0,function*(){let c=a.value=new ne;s==null||s.dispose(!0),e.busy=!1,s=new Ni(t);let d=s.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,c,d,n),p=(g,b)=>{var S;let k,N;if(CL(g)?(k=g.items,N=g.active):k=g,k.length===0){if(b)return!1;(u.length>0||e.hideInput)&&(!((S=this.options)===null||S===void 0)&&S.noResultsPick)&&(tR(this.options.noResultsPick)?k=[this.options.noResultsPick(u)]:k=[this.options.noResultsPick])}return e.items=k,N&&(e.activeItems=[N]),!0},m=g=>gv(this,void 0,void 0,function*(){let b=!1,S=!1;yield Promise.all([(()=>gv(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield of(g.mergeDelay),d.isCancellationRequested)||S||(b=p(g.picks,!0))}))(),(()=>gv(this,void 0,void 0,function*(){e.busy=!0;try{let k=yield g.additionalPicks;if(d.isCancellationRequested)return;let N,A;CL(g.picks)?(N=g.picks.items,A=g.picks.active):N=g.picks;let H,K;if(CL(k)?(H=k.items,K=k.active):H=k,H.length>0||!b){let W;if(!A&&!K){let re=e.activeItems[0];re&&N.indexOf(re)!==-1&&(W=re)}p({items:[...N,...H],active:A||K||W})}}finally{d.isCancellationRequested||(e.busy=!1),S=!0}}))()])});if(h!==null)if(yQ(h))yield m(h);else if(!(h instanceof Promise))p(h);else{e.busy=!0;try{let g=yield h;if(d.isCancellationRequested)return;yQ(g)?yield m(g):p(g)}finally{d.isCancellationRequested||(e.busy=!1)}}});return o.add(e.onDidChangeValue(()=>l())),l(),o.add(e.onDidAccept(c=>{let[d]=e.selectedItems;typeof(d==null?void 0:d.accept)=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))})),o.add(e.onDidTriggerItemButton(({button:c,item:d})=>gv(this,void 0,void 0,function*(){var u,h;if(typeof d.trigger=="function"){let p=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(p>=0){let m=d.trigger(p,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case Yp.NO_ACTION:break;case Yp.CLOSE_PICKER:e.hide();break;case Yp.REFRESH_PICKER:l();break;case Yp.REMOVE_ITEM:{let b=e.items.indexOf(d);if(b!==-1){let S=e.items.slice(),k=S.splice(b,1),N=e.activeItems.filter(H=>H!==k[0]),A=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=S,N&&(e.activeItems=N),e.keepScrollPosition=A}break}}}}}))),o}}});var SQ,Ih,SL,Xp,Ah,wQ=M(()=>{bQ();At();Cl();Ce();tf();Li();De();Bi();jn();e3();Et();Gn();CQ();lu();Hc();SQ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ih=function(i,e){return function(t,n){e(t,n,i)}},SL=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Xp=class T9 extends E9{constructor(e,t,n,r,o,s){super(T9.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=r,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(Ah)),this.options=e}_getPicks(e,t,n,r){var o,s;return SL(this,void 0,void 0,function*(){let a=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];let l=[];for(let p of a){let m=Un(T9.WORD_FILTER(e,p.label)),g=p.commandAlias?Un(T9.WORD_FILTER(e,p.commandAlias)):void 0;m||g?(p.highlights={label:m,detail:this.options.showAlias?g:void 0},l.push(p)):e===p.commandId&&l.push(p)}let c=new Map;for(let p of l){let m=c.get(p.label);m?(p.description=p.commandId,m.description=m.commandId):c.set(p.label,p)}l.sort((p,m)=>{let g=this.commandsHistory.peek(p.commandId),b=this.commandsHistory.peek(m.commandId);if(g&&b)return g>b?-1:1;if(g)return-1;if(b)return 1;if(this.options.suggestedCommandIds){let S=this.options.suggestedCommandIds.has(p.commandId),k=this.options.suggestedCommandIds.has(m.commandId);if(S&&k)return 0;if(S)return-1;if(k)return 1}return p.label.localeCompare(m.label)});let d=[],u=!1,h=!!this.options.suggestedCommandIds;for(let p=0;pSL(this,void 0,void 0,function*(){let p=yield this.getAdditionalCommandPicks(a,l,e,n);return n.isCancellationRequested?[]:p.map(m=>this.toCommandPick(m,r))}))()}:d})}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),r=n?v("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:()=>SL(this,void 0,void 0,function*(){var o;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(o=t==null?void 0:t.from)!==null&&o!==void 0?o:"quick open"});try{yield this.commandService.executeCommand(e.commandId)}catch(s){Zo(s)||this.dialogService.error(v("canNotRun","Command '{0}' resulted in an error",e.label),yL(s))}})})}};Xp.PREFIX=">";Xp.WORD_FILTER=$R(YR,JR,XR);Xp=SQ([Ih(1,He),Ih(2,Bt),Ih(3,ui),Ih(4,Mr),Ih(5,bf)],Xp);Ah=class _n extends oe{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=_n.getConfiguredCommandHistoryLength(this.configurationService),_n.cache&&_n.cache.limit!==this.configuredCommandsHistoryLength&&(_n.cache.limit=this.configuredCommandsHistoryLength,_n.saveState(this.storageService)))}load(){let e=this.storageService.get(_n.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(r){}let n=_n.cache=new fa(this.configuredCommandsHistoryLength,1);if(t){let r;t.usesLRU?r=t.entries:r=t.entries.sort((o,s)=>o.value-s.value),r.forEach(o=>n.set(o.key,o.value))}_n.counter=this.storageService.getNumber(_n.PREF_KEY_COUNTER,0,_n.counter)}push(e){_n.cache&&(_n.cache.set(e,_n.counter++),_n.saveState(this.storageService))}peek(e){var t;return(t=_n.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!_n.cache)return;let t={usesLRU:!0,entries:[]};_n.cache.forEach((n,r)=>t.entries.push({key:r,value:n})),e.store(_n.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(_n.PREF_KEY_COUNTER,_n.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,n;let o=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof o=="number"?o:_n.DEFAULT_COMMANDS_HISTORY_LENGTH}};Ah.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Ah.PREF_KEY_CACHE="commandPalette.mru.cache";Ah.PREF_KEY_COUNTER="commandPalette.mru.counter";Ah.counter=1;Ah=SQ([Ih(0,Yr),Ih(1,Mt)],Ah)});var k9,xQ=M(()=>{fre();wQ();k9=class extends Xp{constructor(e,t,n,r,o,s){super(e,t,n,r,o,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:tO(n.label)||n.id});return t}}});var gve,Qp,EQ,vv,_v,wL=M(()=>{Fc();s1();Yc();Ar();xQ();Li();Et();Gn();Bi();Hc();e3();Ze();jt();Ll();gve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Qp=function(i,e){return function(t,n){e(t,n,i)}},EQ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},vv=class extends k9{get activeTextEditorControl(){return Un(this.codeEditorService.getFocusedCodeEditor())}constructor(e,t,n,r,o,s){super({showAlias:!1},e,n,r,o,s),this.codeEditorService=t}getCommandPicks(){return EQ(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return EQ(this,void 0,void 0,function*(){return[]})}};vv=gve([Qp(0,He),Qp(1,Zt),Qp(2,Bt),Qp(3,ui),Qp(4,Mr),Qp(5,bf)],vv);_v=class i extends se{constructor(){super({id:i.ID,label:i3.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(lr).quickAccess.show(vv.PREFIX)}};_v.ID="editor.action.quickCommand";X(_v);Lr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:vv,prefix:vv.PREFIX,helpEntries:[{description:i3.quickCommandHelp,commandId:_v.ID}]})});var vve,Jp,xL,EL=M(()=>{Ze();Ar();lT();jn();ft();Et();Ro();lu();vve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Jp=function(i,e){return function(t,n){e(t,n,i)}},xL=class extends sl{constructor(e,t,n,r,o,s,a){super(!0,e,t,n,r,o,s,a)}};xL=vve([Jp(1,Ke),Jp(2,Zt),Jp(3,xi),Jp(4,He),Jp(5,Yr),Jp(6,Mt)],xL);Ae(sl.ID,xL,4)});function Tve(){return import("./jsonMode-GEC4TCVR.js")}var _ve,bve,yve,Cve,TQ,Sve,bv,wve,xve,Eve,kQ,TL=M(()=>{Os();Os();_ve=Object.defineProperty,bve=Object.getOwnPropertyDescriptor,yve=Object.getOwnPropertyNames,Cve=Object.prototype.hasOwnProperty,TQ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yve(e))!Cve.call(i,r)&&r!==t&&_ve(i,r,{get:()=>e[r],enumerable:!(n=bve(e,r))||n.enumerable});return i},Sve=(i,e,t)=>(TQ(i,e,"default"),t&&TQ(t,e,"default")),bv={};Sve(bv,Rs);wve=class{constructor(i,e,t){Cn(this,"_onDidChange",new bv.Emitter);Cn(this,"_diagnosticsOptions");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},xve={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Eve={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},kQ=new wve("json",xve,Eve);bv.languages.json={jsonDefaults:kQ};bv.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});bv.languages.onLanguage("json",()=>{Tve().then(i=>i.setupMode(kQ))})});function J(i){let e=i.id;AQ[e]=i,yv.languages.register(i);let t=LQ.getOrCreate(e);yv.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),yv.languages.onLanguageEncountered(e,async()=>{let n=await t.load();yv.languages.setLanguageConfiguration(e,n.conf)})}var kve,Ive,Ave,Lve,IQ,Mve,yv,AQ,kL,LQ,We=M(()=>{Os();kve=Object.defineProperty,Ive=Object.getOwnPropertyDescriptor,Ave=Object.getOwnPropertyNames,Lve=Object.prototype.hasOwnProperty,IQ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ave(e))!Lve.call(i,r)&&r!==t&&kve(i,r,{get:()=>e[r],enumerable:!(n=Ive(e,r))||n.enumerable});return i},Mve=(i,e,t)=>(IQ(i,e,"default"),t&&IQ(t,e,"default")),yv={};Mve(yv,Rs);AQ={},kL={},LQ=class{constructor(i){Cn(this,"_languageId");Cn(this,"_loadingTriggered");Cn(this,"_lazyLoadPromise");Cn(this,"_lazyLoadPromiseResolve");Cn(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return kL[i]||(kL[i]=new LQ(i)),kL[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,AQ[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}}});var IL=M(()=>{We();J({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>import("./elixir-JBWZGNRS.js")})});var AL=M(()=>{We();J({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>import("./markdown-VWG2RHDG.js")})});var LL=M(()=>{We();J({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>import("./javascript-6XN522EU.js")})});var ML=M(()=>{We();J({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>import("./sql-6HLO5RC2.js")})});var DL=M(()=>{We();J({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>import("./css-F6V6XVLU.js")})});var NL=M(()=>{We();J({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>import("./html-CVACNE45.js")})});var RL=M(()=>{We();J({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\import("./xml-ISFE4NDY.js")})});var OL=M(()=>{We();J({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>import("./dockerfile-WFOPSGAE.js")})});var sJ=gt(O9=>{"use strict";Object.defineProperty(O9,"__esModule",{value:!0});O9.default=void 0;var Ai=(Os(),Kh(Rs)),l_e=(_w(),Kh(ure));function c_e(i,e){return f_e(i)||h_e(i,e)||u_e(i,e)||d_e()}function d_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u_e(i,e){if(i){if(typeof i=="string")return JQ(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return JQ(i,e)}}function JQ(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=new Array(e);t"\x80"&&(i.toUpperCase()!=i.toLowerCase()||g_e.test(i))}function R9(i,e){if(!(this instanceof R9))return new R9(i,e);this.line=i,this.ch=e}function __e(i,e,t){i.dispatch(e,t)}function Av(i){return function(){}}var eJ,tJ;String.prototype.normalize?(eJ=function(e){return e.normalize("NFD").toLowerCase()},tJ=function(e){return e.normalize("NFD")}):(eJ=function(e){return e.toLowerCase()},tJ=function(e){return e});var rJ=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};rJ.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},o=this.string.substr(this.pos,e.length);if(r(o)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};function Es(i){return new R9(i.lineNumber-1,i.column-1)}function er(i){return new Ai.Position(i.line+1,i.ch+1)}var b_e=function(){function i(e,t,n,r){iJ(this,i),this.cm=e,this.id=t,this.lineNumber=n+1,this.column=r+1,e.marks[this.id]=this}return nJ(i,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return Es(this)}}]),i}();function oJ(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=!0,n=Ai.KeyCode[i.keyCode];i.key&&(n=i.key,t=!1);var r=n,o=e;switch(i.keyCode){case Ai.KeyCode.Shift:case Ai.KeyCode.Meta:case Ai.KeyCode.Alt:case Ai.KeyCode.Ctrl:return r;case Ai.KeyCode.Escape:o=!0,r="Esc";break;case Ai.KeyCode.Space:o=!0;break}return n.startsWith("Key")||n.startsWith("KEY_")?r=n[n.length-1].toLowerCase():n.startsWith("Digit")?r=n.slice(5,6):n.startsWith("Numpad")?r=n.slice(6,7):n.endsWith("Arrow")?(o=!0,r=n.substring(0,n.length-5)):(n.startsWith("US_")||n.startsWith("Bracket")||!r)&&(r=i.browserEvent.key),!o&&!i.altKey&&!i.ctrlKey&&!i.metaKey?r=i.key||i.browserEvent.key:(i.altKey&&(r="Alt-".concat(r)),i.ctrlKey&&(r="Ctrl-".concat(r)),i.metaKey&&(r="Meta-".concat(r)),i.shiftKey&&(r="Shift-".concat(r))),r.length===1&&t&&(r="'".concat(r,"'")),r}var tn=function(){function i(e){iJ(this,i),y_e.call(this),this.editor=e,this.state={keyMap:"vim"},this.marks={},this.$uid=0,this.disposables=[],this.listeners={},this.curOp={},this.attached=!1,this.statusBar=null,this.options={},this.addLocalListeners(),this.ctxInsert=this.editor.createContextKey("insertMode",!0)}return nJ(i,[{key:"attach",value:function(){i.keyMap.vim.attach(this)}},{key:"addLocalListeners",value:function(){this.disposables.push(this.editor.onDidChangeCursorPosition(this.handleCursorChange),this.editor.onDidChangeModelContent(this.handleChange),this.editor.onKeyDown(this.handleKeyDown))}},{key:"handleReplaceMode",value:function(t,n){var r=!1,o=t,s=this.editor.getPosition(),a=new Ai.Range(s.lineNumber,s.column,s.lineNumber,s.column+1),l=!0;if(t.startsWith("'"))o=t[1];else if(o==="Enter")o=` -`;else if(o==="Backspace"){var c=this.replaceStack.pop();if(!c)return;r=!0,o=c,a=new Ai.Range(s.lineNumber,s.column,s.lineNumber,s.column-1)}else return;n.preventDefault(),n.stopPropagation(),this.replaceStack||(this.replaceStack=[]),r||this.replaceStack.push(this.editor.getModel().getValueInRange(a)),this.editor.executeEdits("vim",[{text:o,range:a,forceMoveMarkers:l}]),r&&this.editor.setPosition(a.getStartPosition())}},{key:"setOption",value:function(t,n){this.state[t]=n,t==="theme"&&Ai.editor.setTheme(n)}},{key:"getConfiguration",value:function(){var t=this.editor,n=m_e;return typeof t.getConfiguration=="function"?t.getConfiguration():("EditorOption"in Ai.editor&&(n=Ai.editor.EditorOption),{readOnly:t.getOption(n.readOnly),viewInfo:{cursorWidth:t.getOption(n.cursorWidth)},fontInfo:t.getOption(n.fontInfo)})}},{key:"getOption",value:function(t){return t==="readOnly"?this.getConfiguration().readOnly:t==="firstLineNumber"?this.firstLine()+1:t==="indentWithTabs"?!this.editor.getModel().getOptions().insertSpaces:typeof this.editor.getConfiguration=="function"?this.editor.getRawConfiguration()[t]:this.editor.getRawOptions()[t]}},{key:"dispatch",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;or&&(t=r-1),this.editor.getModel().getLineContent(t+1)}},{key:"getAnchorForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Ai.SelectionDirection.LTR?t.getStartPosition():t.getEndPosition()}},{key:"getHeadForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Ai.SelectionDirection.LTR?t.getEndPosition():t.getStartPosition()}},{key:"getCursor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!t)return Es(this.editor.getPosition());var n=this.editor.getSelection(),r;return n.isEmpty()?r=n.getPosition():t==="anchor"?r=this.getAnchorForSelection(n):r=this.getHeadForSelection(n),Es(r)}},{key:"getRange",value:function(t,n){var r=er(t),o=er(n);return this.editor.getModel().getValueInRange(Ai.Range.fromPositions(r,o))}},{key:"getSelection",value:function(){var t=[],n=this.editor;return n.getSelections().map(function(r){t.push(n.getModel().getValueInRange(r))}),t.join(` -`)}},{key:"replaceRange",value:function(t,n,r){var o=er(n),s=r?er(r):o;this.editor.executeEdits("vim",[{text:t,range:Ai.Range.fromPositions(o,s)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(t,n){var r=t;XL(t)!=="object"&&(r={},r.line=t,r.ch=n);var o=this.editor.getModel().validatePosition(er(r));this.editor.setPosition(er(r)),this.editor.revealPosition(o)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(t,n){return t()}},{key:"listSelections",value:function(){var t=this,n=this.editor.getSelections();return!n.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:n.map(function(r){var o=r.getPosition(),s=r.getStartPosition(),a=r.getEndPosition();return{anchor:t.clipPos(Es(t.getAnchorForSelection(r))),head:t.clipPos(Es(t.getHeadForSelection(r)))}})}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(t,n){var r=!!this.editor.getSelections().length,o=t.map(function(l,c){var d=l.anchor,u=l.head;return r?Ai.Selection.fromPositions(er(d),er(u)):Ai.Selection.fromPositions(er(u),er(d))});if(n&&o[n]&&o.push(o.splice(n,1)[0]),!!o.length){var s=o[0],a;s.getDirection()===Ai.SelectionDirection.LTR?a=s.getEndPosition():a=s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(a)}}},{key:"setSelection",value:function(t,n){var r=Ai.Range.fromPositions(er(t),er(n));this.editor.setSelection(r)}},{key:"getSelections",value:function(){var t=this.editor;return t.getSelections().map(function(n){return t.getModel().getValueInRange(n)})}},{key:"replaceSelections",value:function(t){var n=this.editor;n.getSelections().forEach(function(r,o){n.executeEdits("vim",[{range:r,text:t[o],forceMoveMarkers:!1}])})}},{key:"toggleOverwrite",value:function(t){t?(this.enterVimMode(),this.replaceMode=!0):(this.leaveVimMode(),this.replaceMode=!1,this.replaceStack=[])}},{key:"charCoords",value:function(t,n){return{top:t.line,left:t.ch}}},{key:"coordsChar",value:function(t,n){}},{key:"clipPos",value:function(t){var n=this.editor.getModel().validatePosition(er(t));return Es(n)}},{key:"setBookmark",value:function(t,n){var r=new b_e(this,this.$uid++,t.line,t.ch);return(!n||!n.insertLeft)&&(r.$insertRight=!0),this.marks[r.id]=r,r}},{key:"getScrollInfo",value:function(){var t=this.editor,n=t.getVisibleRanges(),r=c_e(n,1),o=r[0];return{left:0,top:o.startLineNumber-1,height:t.getModel().getLineCount(),clientHeight:o.endLineNumber-o.startLineNumber+1}}},{key:"triggerEditorAction",value:function(t){this.editor.trigger("vim",t)}},{key:"dispose",value:function(){this.dispatch("dispose"),this.removeOverlay(),i.keyMap.vim&&i.keyMap.vim.detach(this),this.disposables.forEach(function(t){return t.dispose()})}},{key:"getInputField",value:function(){}},{key:"getWrapperElement",value:function(){}},{key:"enterVimMode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.ctxInsert.set(!1);var n=this.getConfiguration();this.initialCursorWidth=n.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:n.fontInfo.typicalFullwidthCharacterWidth,cursorBlinking:"solid"})}},{key:"leaveVimMode",value:function(){this.ctxInsert.set(!0),this.editor.updateOptions({cursorWidth:this.initialCursorWidth||0,cursorBlinking:"blink"})}},{key:"virtualSelectionMode",value:function(){return this.inVirtualSelectionMode}},{key:"markText",value:function(){return{clear:function(){},find:function(){}}}},{key:"getUserVisibleLines",value:function(){var t=this.editor.getVisibleRanges();if(!t.length)return{top:0,bottom:0};var n={top:1/0,bottom:0};return t.reduce(function(r,o){return o.startLineNumberr.bottom&&(r.bottom=o.endLineNumber),r},n),n.top-=1,n.bottom-=1,n}},{key:"findPosV",value:function(t,n,r){var o=this.editor,s=n,a=r,l=er(t);if(r==="page"){var c=o.getLayoutInfo().height,d=this.getConfiguration().fontInfo.lineHeight;s=s*Math.floor(c/d),a="line"}return a==="line"&&(l.lineNumber+=s),Es(l)}},{key:"findMatchingBracket",value:function(t){var n=er(t),r=this.editor.getModel(),o;if(r.bracketPairs)o=r.bracketPairs.matchBracket(n);else{var s;o=(s=r.matchBracket)===null||s===void 0?void 0:s.call(r,n)}return!o||o.length!==2?{to:null}:{to:Es(o[1].getStartPosition())}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(t){return this.editor.getModel().getLineFirstNonWhitespaceColumn(t+1)-1}},{key:"scrollTo",value:function(t,n){!t&&!n||t||(n<0&&(n=this.editor.getPosition().lineNumber-n),this.editor.setScrollTop(this.editor.getTopForLineNumber(n+1)))}},{key:"moveCurrentLineTo",value:function(t){var n,r=this.editor,o=r.getPosition(),s=Ai.Range.fromPositions(o,o);switch(t){case"top":r.revealRangeAtTop(s);return;case"center":r.revealRangeInCenter(s);return;case"bottom":(n=r._revealRange)===null||n===void 0||n.call(r,s,p_e.Bottom);return}}},{key:"getSearchCursor",value:function(t,n){var r=!1,o=!1;t instanceof RegExp&&!t.global&&(r=!t.ignoreCase,t=t.source,o=!0),n.ch==null&&(n.ch=Number.MAX_VALUE);var s=er(n),a=this,l=this.editor,c=null,d=l.getModel(),u=d.findMatches(t,!1,o,r)||[];return{getMatches:function(){return u},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(p){if(!u||!u.length)return!1;var m=u[p];return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(g){return g.range}).filter(function(g){return!g.equalsRange(c)})),c},find:function(p){if(!u||!u.length)return!1;var m;if(p){var g=c?c.getStartPosition():s;if(m=d.findPreviousMatch(t,g,o,r),!m||!m.range.getStartPosition().isBeforeOrEqual(g))return!1}else{var b=c?d.getPositionAt(d.getOffsetAt(c.getStartPosition())+1):s;if(m=d.findNextMatch(t,b,o,r),!m||!b.isBeforeOrEqual(m.range.getStartPosition()))return!1}return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(S){return S.range}).filter(function(S){return!S.equalsRange(c)})),c},from:function(){return c&&Es(c.getStartPosition())},to:function(){return c&&Es(c.getEndPosition())},replace:function(p){c&&(l.executeEdits("vim",[{range:c,text:p,forceMoveMarkers:!0}]),c.setEndPosition(l.getPosition()),l.setPosition(c.getStartPosition()))}}}},{key:"highlightRanges",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"findMatch",r="decoration".concat(n);return this[r]=this.editor.deltaDecorations(this[r]||[],t.map(function(o){return{range:o,options:{stickiness:Ai.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:n,showIfCollapsed:!0}}})),this[r]}},{key:"addOverlay",value:function(t,n,r){var o=t.query,s=!1,a=!1;o&&o instanceof RegExp&&!o.global&&(a=!0,s=!o.ignoreCase,o=o.source);var l=this.editor.getModel().findNextMatch(o,this.editor.getPosition(),a,s);!l||!l.range||this.highlightRanges([l.range])}},{key:"removeOverlay",value:function(){var t=this;["currentFindMatch","findMatch"].forEach(function(n){t.editor.deltaDecorations(t["decoration".concat(n)]||[],[])})}},{key:"scrollIntoView",value:function(t){t&&this.editor.revealPosition(er(t))}},{key:"moveH",value:function(t,n){if(n==="char"){var r=this.editor.getPosition();this.editor.setPosition(new Ai.Position(r.lineNumber,r.column+t))}}},{key:"scanForBracket",value:function(t,n,r,o){for(var s=o.bracketRegex,a=er(t),l=this.editor.getModel(),c=(n===-1?l.findPreviousMatch:l.findNextMatch).bind(l),d=[],u=0;;){if(u>10)return;var h=c(s.source,a,!0,!0,null,!0),p=h.matches[0];if(h===void 0)return;var m=i.matchingBrackets[p];if(m&&m.charAt(1)===">"==n>0)d.push(p);else if(d.length===0){var g=h.range.getStartPosition();return{pos:Es(g)}}else d.pop();a=l.getPositionAt(l.getOffsetAt(h.range.getStartPosition())+n),u+=1}}},{key:"indexFromPos",value:function(t){return this.editor.getModel().getOffsetAt(er(t))}},{key:"posFromIndex",value:function(t){return Es(this.editor.getModel().getPositionAt(t))}},{key:"indentLine",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.editor,o;r._getViewModel?o=r._getViewModel().cursorConfig:o=r._getCursors().context.config;var s=new Ai.Position(t+1,1),a=Ai.Selection.fromPositions(s,s);r.executeCommand("vim",new l_e.ShiftCommand(a,{isUnshift:!n,tabSize:o.tabSize,indentSize:o.indentSize,insertSpaces:o.insertSpaces,useTabStops:o.useTabStops,autoIndent:o.autoIndent}))}},{key:"setStatusBar",value:function(t){this.statusBar=t}},{key:"openDialog",value:function(t,n,r){if(this.statusBar)return this.statusBar.setSec(t,n,r)}},{key:"openNotification",value:function(t){this.statusBar&&this.statusBar.showNotification(t)}},{key:"smartIndent",value:function(){this.editor.getAction("editor.action.formatSelection").run()}},{key:"moveCursorTo",value:function(t){var n=this.editor.getPosition();t==="start"?n.column=1:t==="end"&&(n.column=this.editor.getModel().getLineMaxColumn(n.lineNumber)),this.editor.setPosition(n)}},{key:"execCommand",value:function(t){switch(t){case"goLineLeft":this.moveCursorTo("start");break;case"goLineRight":this.moveCursorTo("end");break;case"indentAuto":this.smartIndent();break}}}]),i}();tn.Pos=R9;tn.signal=__e;tn.on=Av("on");tn.off=Av("off");tn.addClass=Av("addClass");tn.rmClass=Av("rmClass");tn.defineOption=Av("defineOption");tn.keyMap={default:function(e){return function(t){return!0}}};tn.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};tn.isWordChar=v_e;tn.keyName=oJ;tn.StringStream=rJ;tn.e_stop=function(i){return i.stopPropagation?i.stopPropagation():i.cancelBubble=!0,tn.e_preventDefault(i),!1};tn.e_preventDefault=function(i){return i.preventDefault?(i.preventDefault(),i.browserEvent&&i.browserEvent.preventDefault()):i.returnValue=!1,!1};tn.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}};tn.lookupKey=function i(e,t,n){typeof t=="string"&&(t=tn.keyMap[t]);var r=typeof t=="function"?t(e):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&n(r))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return i(e,t.fallthrough,n);for(var o=0;o{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.default=im.Vim=void 0;var ot=S_e(sJ());function S_e(i){return i&&i.__esModule?i:{default:i}}function P9(i){"@babel/helpers - typeof";return P9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P9(i)}var Fe=ot.default.Pos;function w_e(i,e){var t=i.state.vim;if(!t||t.insertMode)return e.head;var n=t.sel.head;if(!n)return e.head;if(!(t.visualBlock&&e.head.line!=n.line))return e.from()==e.anchor&&!e.empty()&&e.head.line==n.line&&e.head.ch!=n.ch?new Fe(e.head.line,e.head.ch-1):e.head}var kr=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],aJ=kr.length,lJ=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],cJ=function(){function e(w){w.setOption("disableInput",!0),w.setOption("showCursorWhenSelecting",!1),ot.default.signal(w,"vim-mode-change",{mode:"normal"}),w.on("cursorActivity",DN),_e(w),w.enterVimMode()}function t(w){w.setOption("disableInput",!1),w.off("cursorActivity",DN),w.state.vim=null,a_&&clearTimeout(a_),w.leaveVimMode()}function n(w,f){w.attached=!1,this==ot.default.keyMap.vim&&(w.options.$customCursor=null),(!f||f.attach!=r)&&t(w)}function r(w,f){this==ot.default.keyMap.vim&&(w.attached=!0,w.curOp&&(w.curOp.selectionChanged=!0),w.options.$customCursor=w_e),(!f||f.attach!=r)&&e(w)}ot.default.defineOption("vimMode",!1,function(w,f,_){f&&w.getOption("keyMap")!="vim"?w.setOption("keyMap","vim"):!f&&_!=ot.default.Init&&/^vim/.test(w.getOption("keyMap"))&&w.setOption("keyMap","default")});function o(w,f){if(f){if(this[w])return this[w];var _=l(w);if(!_)return!1;var C=de.findKey(f,_);return typeof C=="function"&&ot.default.signal(f,"vim-keypress",_),C}}var s={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},a={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function l(w){if(w.charAt(0)=="'")return w.charAt(1);if(w==="AltGraph")return!1;var f=w.split(/-(?!$)/),_=f[f.length-1];if(f.length==1&&f[0].length==1)return!1;if(f.length==2&&f[0]=="Shift"&&_.length==1)return!1;for(var C=!1,x=0;x"):!1}var c=/[\d]/,d=[ot.default.isWordChar,function(w){return w&&!ot.default.isWordChar(w)&&!/\s/.test(w)}],u=[function(w){return/\S/.test(w)}];function h(w,f){for(var _=[],C=w;C"]),S=[].concat(p,m,g,["-",'"',".",":","_","/"]),k;try{k=new RegExp("^[\\p{Lu}]$","u")}catch(w){k=/^[A-Z]$/}function N(w,f){return f>=w.firstLine()&&f<=w.lastLine()}function A(w){return/^[a-z]$/.test(w)}function H(w){return"()[]{}".indexOf(w)!=-1}function K(w){return c.test(w)}function W(w){return k.test(w)}function re(w){return/^\s*$/.test(w)}function ae(w){return".?!".indexOf(w)!=-1}function Ne(w,f){for(var _=0;_C?_=C:_0?1:-1,pe,ue=z.getCursor();do if(_+=ge,ee=I[(f+_)%f],ee&&(pe=ee.find())&&!Xo(ue,pe))break;while(_x)}return ee}function B(z,G){var ee=_,ge=F(z,G);return _=ee,ge&&ge.find()}return{cachedCursor:void 0,add:D,find:B,move:F}},Z=function(f){return f?{changes:f.changes,expectCursorActivityForChange:f.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function ye(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Z()}ye.prototype={exitMacroRecordMode:function(){var f=$.macroModeState;f.onRecordingDone&&f.onRecordingDone(),f.onRecordingDone=void 0,f.isRecording=!1},enterMacroRecordMode:function(f,_){var C=$.registerController.getRegister(_);C&&(C.clear(),this.latestRegister=_,f.openDialog&&(this.onRecordingDone=f.openDialog(document.createTextNode("(recording)["+_+"]"),null,{bottom:!0})),this.isRecording=!0)}};function _e(w){return w.state.vim||(w.state.vim={inputState:new $t,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),w.state.vim}var $;function Q(){$={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Nt(),macroModeState:new ye,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Gi({}),searchHistoryController:new ai,exCommandHistoryController:new ai};for(var w in he){var f=he[w];f.value=f.defaultValue}}var ie,de={buildKeyMap:function(){},getRegisterController:function(){return $.registerController},resetVimGlobalState_:Q,getVimGlobalState_:function(){return $},maybeInitVimState_:_e,suppressErrorLogging:!1,InsertModeKey:GS,map:function(f,_,C){sa.map(f,_,C)},unmap:function(f,_){return sa.unmap(f,_)},noremap:function(f,_,C){function x(pe){return pe?[pe]:["normal","insert","visual"]}for(var I=x(C),D=kr.length,F=aJ,B=D-F;B=0;I--){var D=x[I];if(f!==D.context)if(D.context)this._mapCommand(D);else{var F=["normal","insert","visual"];for(var B in F)if(F[B]!==f){var z={};for(var G in D)z[G]=D[G];z.context=F[B],this._mapCommand(z)}}}},setOption:st,getOption:rt,defineOption:Xe,defineEx:function(f,_,C){if(!_)_=f;else if(f.indexOf(_)!==0)throw new Error('(Vim.defineEx) "'+_+'" is not a prefix of "'+f+'", command not registered');AN[f]=C,sa.commandMap_[_]={name:f,shortName:_,type:"api"}},handleKey:function(f,_,C){var x=this.findKey(f,_,C);if(typeof x=="function")return x()},findKey:function(f,_,C){var x=_e(f);function I(){var ee=$.macroModeState;if(ee.isRecording){if(_=="q")return ee.exitMacroRecordMode(),Xt(f),!0;C!="mapping"&&Qne(ee,_)}}function D(){if(_==""){if(x.visualMode)na(f);else if(x.insertMode)Cm(f);else return;return Xt(f),!0}}function F(ee){for(var ge;ee;)ge=/<\w+-.+?>|<\w+>|./.exec(ee),_=ge[0],ee=ee.substring(ge.index+_.length),de.handleKey(f,_,"mapping")}function B(){if(D())return!0;for(var ee=x.inputState.keyBuffer=x.inputState.keyBuffer+_,ge=_.length==1,pe=$i.matchCommand(ee,kr,x.inputState,"insert");ee.length>1&&pe.type!="full";){var ee=x.inputState.keyBuffer=ee.slice(1),ue=$i.matchCommand(ee,kr,x.inputState,"insert");ue.type!="none"&&(pe=ue)}if(pe.type=="none")return Xt(f),!1;if(pe.type=="partial")return ie&&window.clearTimeout(ie),ie=window.setTimeout(function(){x.insertMode&&x.inputState.keyBuffer&&Xt(f)},rt("insertModeEscKeysTimeout")),!ge;if(ie&&window.clearTimeout(ie),ge){for(var Ve=f.listSelections(),Ge=0;Ge0||this.motionRepeat.length>0)&&(w=1,this.prefixRepeat.length>0&&(w*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(w*=parseInt(this.motionRepeat.join(""),10))),w};function Xt(w,f){w.state.vim.inputState=new $t,ot.default.signal(w,"vim-command-done",f)}function Qt(w,f,_){this.clear(),this.keyBuffer=[w||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!f,this.blockwise=!!_}Qt.prototype={setText:function(f,_,C){this.keyBuffer=[f||""],this.linewise=!!_,this.blockwise=!!C},pushText:function(f,_){_&&(this.linewise||this.keyBuffer.push(` +`)};let s=yield o.provideRenameEdits(this.model,this.position,e,r);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(s.rejectReason),r)}else return this._provideRenameEdits(e,t+1,n.concat(v("no result","No result.")),r);return s})}};vh=class GY{static get(e){return e.getContribution(GY.ID)}constructor(e,t,n,r,o,s,a,l){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=r,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new ne,this._cts=new Ri,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(RC,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return gh(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new Ri,!this.editor.hasModel())return;let n=this.editor.getPosition(),r=new jg(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!r.hasProvider())return;let o=new Sa(this.editor,5,void 0,this._cts.token),s;try{let m=r.resolveRenameLocation(o.token);this._progressService.showWhile(m,250),s=yield m}catch(m){(e=Qn.get(this.editor))===null||e===void 0||e.showMessage(m||v("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{o.dispose()}if(!s)return;if(s.rejectReason){(t=Qn.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,n);return}if(o.token.isCancellationRequested)return;let a=new Sa(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!P.isEmpty(l)&&!P.spansMultipleLines(l)&&P.containsRange(s.range,l)&&(c=Math.max(0,l.startColumn-s.range.startColumn),d=Math.min(s.range.endColumn,l.endColumn)-s.range.startColumn);let u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=yield this._renameInputField.getInput(s.range,s.text,c,d,u,a.token);if(typeof h=="boolean"){h&&this.editor.focus(),a.dispose();return}this.editor.focus();let p=Vc(r.provideRenameEdits(h.newName,a.token),a.token).then(m=>gh(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(P.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:v("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,h.newName),code:"undoredo.rename",quotableLabel:v("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&Ni(v("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(v("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(v("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{a.dispose()});return this._progressService.showWhile(p,250),p})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};vh.ID="editor.contrib.renameController";vh=Tge([mh(1,He),mh(2,Ei),mh(3,qc),mh(4,El),mh(5,zc),mh(6,nF),mh(7,be)],vh);TI=class extends se{constructor(){super({id:"editor.action.rename",label:v("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:ce.and(O.writable,O.hasRenameProvider),kbOpts:{kbExpr:O.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let n=e.get(Zt),[r,o]=Array.isArray(t)&&t||[void 0,void 0];return ht.isUri(r)&&Se.isIPosition(o)?n.openCodeEditor({resource:r},n.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},at):super.runCommand(e,t)}run(e,t){let n=vh.get(t);return n?n.run():Promise.resolve()}};Ae(vh.ID,vh,4);X(TI);kI=xi.bindToContribution(vh.get);Me(new kI({id:"acceptRenameInput",precondition:Wg,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:3}}));Me(new kI({id:"acceptRenameInputWithPreview",precondition:ce.and(Wg,ce.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:ce.and(O.focus,ce.not("isComposing")),primary:1024+3}}));Me(new kI({id:"cancelRenameInput",precondition:Wg,handler:i=>i.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:O.focus,primary:9,secondary:[1033]}}));Gr("_executeDocumentRenameProvider",function(i,e,t,...n){let[r]=n;Lt(typeof r=="string");let{renameProvider:o}=i.get(be);return kge(o,e,t,r)});Gr("_executePrepareRename",function(i,e,t){return gh(this,void 0,void 0,function*(){let{renameProvider:n}=i.get(be),o=yield new jg(e,t,n).resolveRenameLocation(et.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})});Mr.as(A_.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:v("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function Ige(i){for(let e=0,t=i.length;e{dre();nr()});function Vg(i){return i&&!!i.data}function DI(i){return i&&Array.isArray(i.edits)}function NI(i,e){return i.has(e)}function Mge(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function RI(i,e,t,n,r){return Od(this,void 0,void 0,function*(){let o=Mge(i,e),s=yield Promise.all(o.map(a=>Od(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?n:null,r)}catch(d){c=d,l=null}return(!l||!Vg(l)&&!DI(l))&&(l=null),new LI(a,l,c)})));for(let a of s){if(a.error)throw a.error;if(a.tokens)return a}return s.length>0?s[0]:null})}function Dge(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function YY(i,e){return i.has(e)}function XY(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function OC(i,e,t,n){return Od(this,void 0,void 0,function*(){let r=XY(i,e),o=yield Promise.all(r.map(s=>Od(this,void 0,void 0,function*(){let a;try{a=yield s.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){Ut(l),a=null}return(!a||!Vg(a))&&(a=null),new MI(s,a)})));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null})}var Od,LI,MI,OI=M(()=>{gi();At();Sn();is();zi();Mi();$Y();qe();xt();Od=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};LI=class{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}};MI=class{constructor(e,t){this.provider=e,this.tokens=t}};St.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t]=e;Lt(t instanceof ht);let n=i.get(Si).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(be),o=Dge(r,n);return o?o[0].getLegend():i.get(ui).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));St.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t]=e;Lt(t instanceof ht);let n=i.get(Si).getModel(t);if(!n)return;let{documentSemanticTokensProvider:r}=i.get(be);if(!NI(r,n))return i.get(ui).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());let o=yield RI(r,n,null,null,et.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!Vg(a))return;let l=AI({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));St.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht);let r=i.get(Si).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(be),s=XY(o,r);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!n||!P.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=yield OC(o,r,P.lift(n),et.None);if(a)return a.provider.getLegend()}));St.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>Od(void 0,void 0,void 0,function*(){let[t,n]=e;Lt(t instanceof ht),Lt(P.isIRange(n));let r=i.get(Si).getModel(t);if(!r)return;let{documentRangeSemanticTokensProvider:o}=i.get(be),s=yield OC(o,r,P.lift(n),et.None);if(!(!s||!s.tokens))return AI({id:0,type:"full",data:s.tokens.data})}))});function qg(i,e,t){var n;let r=(n=t.getValue(Kg,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||n===void 0?void 0:n.enabled;return typeof r=="boolean"?r:e.getColorTheme().semanticHighlighting}var Kg,PI=M(()=>{Kg="editor.semanticHighlighting"});var QY,al,FI,Gg,HI,BI=M(()=>{Ce();At();is();jn();Dt();gi();ar();rF();OI();Ns();ml();xt();oF();Eb();PI();QY=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},al=function(i,e){return function(t,n){e(t,n,i)}},FI=class extends oe{constructor(e,t,n,r,o,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new Gg(d,e,n,o,s)},l=(d,u)=>{u.dispose(),delete this._watchers[d.uri.toString()]},c=()=>{for(let d of t.getModels()){let u=this._watchers[d.uri.toString()];qg(d,n,r)?u||a(d):u&&l(d,u)}};this._register(t.onModelAdded(d=>{qg(d,n,r)&&a(d)})),this._register(t.onModelRemoved(d=>{let u=this._watchers[d.uri.toString()];u&&l(d,u)})),this._register(r.onDidChangeConfiguration(d=>{d.affectsConfiguration(Kg)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};FI=QY([al(0,r1),al(1,Si),al(2,pn),al(3,Mt),al(4,an),al(5,be)],FI);Gg=class _h extends oe{constructor(e,t,n,r,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentSemanticTokens",{min:_h.REQUEST_MIN_DELAY,max:_h.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new ti(()=>this._fetchDocumentSemanticTokensNow(),_h.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));let s=()=>{Vi(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(let a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};s(),this._register(this._provider.onDidChange(()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!NI(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Ri,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=RI(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new Ln(!1);r.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{let{provider:c,tokens:d}=l,u=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,d||null,u,o)}},l=>{l&&(es(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||at(l),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,r,o){o=Math.min(o,n.length-r,e.length-t);for(let s=0;s{(r.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(DI(t)){if(!o){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:o.data};else{let a=0;for(let h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;let l=o.data,c=new Uint32Array(l.length+a),d=l.length,u=c.length;for(let h=t.edits.length-1;h>=0;h--){let p=t.edits[h];if(p.start>l.length){n.warnInvalidEditStart(o.resultId,t.resultId,h,p.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let m=d-(p.start+p.deleteCount);m>0&&(_h._copy(l,d-m,c,u-m,m),u-=m),p.data&&(_h._copy(p.data,0,c,u-p.data.length,p.data.length),u-=p.data.length),d=p.start}d>0&&_h._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(Vg(t)){this._currentDocumentResponse=new HI(e,t.resultId,t.data);let a=xb(t,n,this._model.getLanguageId());if(r.length>0)for(let l of r)for(let c of a)for(let d of l.changes)c.applyEdit(d.range,d.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}};Gg.REQUEST_MIN_DELAY=300;Gg.REQUEST_MAX_DELAY=2e3;Gg=QY([al(1,r1),al(2,pn),al(3,an),al(4,be)],Gg);HI=class{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};Yc(FI)});var Nge,$g,Yg,zI=M(()=>{Dt();Ce();Ze();OI();PI();rF();jn();ar();Ns();ml();xt();oF();Nge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},$g=function(i,e){return function(t,n){e(t,n,i)}},Yg=class extends oe{constructor(e,t,n,r,o,s){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=r,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new ti(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];let a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(Kg)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(let e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){let n=e.getVersionId(),r=Vt(s=>Promise.resolve(OC(this._provider,e,t,s))),o=new Ln(!1);return r.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==n)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,xb(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};Yg.ID="editor.contrib.viewportSemanticTokens";Yg=Nge([$g(1,r1),$g(2,pn),$g(3,Mt),$g(4,an),$g(5,be)],Yg);Ae(Yg.ID,Yg,1)});var PC,JY=M(()=>{wi();qe();PC=class{provideSelectionRanges(e,t){let n=[];for(let r of t){let o=[];n.push(o),this._addInWordRanges(o,e,r),this._addWordRanges(o,e,r),this._addWhitespaceLine(o,e,r),o.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){let r=t.getWordAtPosition(n);if(!r)return;let{word:o,startColumn:s}=r,a=n.column-s,l=a,c=a,d=0;for(;l>=0;l--){let u=o.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(ow(u)&&sw(d))break;d=u}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new P(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}});function eX(i,e,t,n,r){return HC(this,void 0,void 0,function*(){let o=i.all(e).concat(new PC);o.length===1&&o.unshift(new wd);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,r)).then(c=>{if(Wi(c)&&c.length===t.length)for(let d=0;d{if(l.length===0)return[];l.sort((h,p)=>Se.isBefore(h.getStartPosition(),p.getStartPosition())?1:Se.isBefore(p.getStartPosition(),h.getStartPosition())||Se.isBefore(h.getEndPosition(),p.getEndPosition())?-1:Se.isBefore(p.getEndPosition(),h.getEndPosition())?1:0);let c=[],d;for(let h of l)(!d||P.containsRange(h,d)&&!P.equalsRange(h,d))&&(c.push(h),d=h);if(!n.selectLeadingAndTrailingWhitespace)return c;let u=[c[0]];for(let h=1;h{oi();gi();At();Ze();ri();qe();Mn();jt();M7();JY();De();Yi();zi();xt();ca();Mi();Sn();Rge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Oge=function(i,e){return function(t,n){e(t,n,i)}},HC=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},UI=class i{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;let n=new i(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}},Op=class ZY{static get(e){return e.getContribution(ZY.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return HC(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||(yield eX(this._languageFeaturesService.selectionRangeProvider,n,t.map(o=>o.getPosition()),this._editor.getOption(109),et.None).then(o=>{var s;if(!(!Wi(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!ha(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new UI(0,a)),(s=this._selectionListener)===null||s===void 0||s.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(o=>o.mov(e));let r=this._state.map(o=>je.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}})}};Op.ID="editor.contrib.smartSelectController";Op=Rge([Oge(1,be)],Op);FC=class extends se{constructor(e,t){super(t),this._forward=e}run(e,t){return HC(this,void 0,void 0,function*(){let n=Op.get(t);n&&(yield n.run(this._forward))})}},WI=class extends FC{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:v("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};St.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");jI=class extends FC{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:v("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:O.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Ae(Op.ID,Op,4);X(WI);X(jI);St.registerCommand("_executeSelectionRangeProvider",function(i,...e){return HC(this,void 0,void 0,function*(){let[t,n]=e;Lt(ht.isUri(t));let r=i.get(be).selectionRangeProvider,o=yield i.get(xn).createModelReference(t);try{return eX(r,o.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0},et.None)}finally{o.dispose()}})})});var tX,iX=M(()=>{De();tX=Object.freeze({View:{value:v("view","View"),original:"View"},Help:{value:v("help","Help"),original:"Help"},Test:{value:v("test","Test"),original:"Test"},File:{value:v("file","File"),original:"File"},Preferences:{value:v("preferences","Preferences"),original:"Preferences"},Developer:{value:v({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}})});var nX=M(()=>{});var rX=M(()=>{nX()});var Xg,oX,BC,sX=M(()=>{Ht();nre();Uw();Ce();rX();pp();ri();WR();zP();UP();Xg=class{constructor(e,t){this.lineNumbers=e,this.lastLineRelativePosition=t}},oX=_f("stickyScrollViewLayer",{createHTML:i=>i}),BC=class extends oe{constructor(e){super(),this._editor=e,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new ne),this._lineNumbers=[],this._lastLineRelativePosition=0,this._hoverOnLine=-1,this._hoverOnColumn=-1,this._layoutInfo=this._editor.getLayoutInfo(),this._rootDomNode=document.createElement("div"),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Ko),this._rootDomNode.style.width=`${this._layoutInfo.width-this._layoutInfo.minimap.minimapCanvasOuterWidth-this._layoutInfo.verticalScrollbarWidth}px`}get hoverOnLine(){return this._hoverOnLine}get hoverOnColumn(){return this._hoverOnColumn}get lineNumbers(){return this._lineNumbers}getCurrentLines(){return this._lineNumbers}setState(e){mr(this._rootDomNode),this._disposableStore.clear(),this._lineNumbers.length=0;let t=this._editor.getOption(64);e.lineNumbers.length*t+e.lastLineRelativePosition>0?(this._lastLineRelativePosition=e.lastLineRelativePosition,this._lineNumbers=e.lineNumbers):(this._lastLineRelativePosition=0,this._lineNumbers=[]),this._renderRootNode()}_renderRootNode(){if(!this._editor._getViewModel())return;for(let[r,o]of this._lineNumbers.entries()){let s=this._renderChildNode(r,o);this._rootDomNode.appendChild(s)}let e=this._editor.getOption(64),t=this._lineNumbers.length*e+this._lastLineRelativePosition;this._rootDomNode.style.display=t>0?"block":"none",this._rootDomNode.style.height=t.toString()+"px",this._rootDomNode.setAttribute("role","list"),this._editor.getOption(70).side==="left"&&(this._rootDomNode.style.marginLeft=this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth+"px")}_renderChildNode(e,t){let n=document.createElement("div"),r=this._editor._getViewModel(),o=r.coordinatesConverter.convertModelPositionToViewPosition(new Se(t,1)).lineNumber,s=r.getViewLineRenderingData(o),a=this._editor.getLayoutInfo(),l=a.width-a.minimap.minimapCanvasOuterWidth-a.verticalScrollbarWidth,c=this._editor.getOption(70).side,d=this._editor.getOption(64),u=this._editor.getOption(65),h;try{h=t1.filter(s.inlineDecorations,o,s.minColumn,s.maxColumn)}catch(N){h=[]}let p=new pb(!0,!0,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,0,s.tokens,h,s.tabSize,s.startVisibleColumn,1,1,1,500,"none",!0,!0,null),m=new I_(2e3);mb(p,m);let g;oX?g=oX.createHTML(m.build()):g=m.build();let b=document.createElement("span");b.className="sticky-line",b.classList.add(`stickyLine${t}`),b.style.lineHeight=`${d}px`,b.innerHTML=g;let S=document.createElement("span");S.className="sticky-line",S.style.lineHeight=`${d}px`,c==="left"?S.style.width=`${a.contentLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(S.style.width=`${a.contentLeft}px`);let k=document.createElement("span");return u.renderType===1||u.renderType===3&&t%10===0?k.innerText=t.toString():u.renderType===2&&(k.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),k.className="sticky-line-number",k.style.lineHeight=`${d}px`,k.style.width=`${a.lineNumbersWidth}px`,c==="left"?k.style.paddingLeft=`${a.lineNumbersLeft-a.minimap.minimapCanvasOuterWidth}px`:c==="right"&&(k.style.paddingLeft=`${a.lineNumbersLeft}px`),S.appendChild(k),this._editor.applyFontInfo(b),this._editor.applyFontInfo(k),n.appendChild(S),n.appendChild(b),n.className="sticky-line-root",n.setAttribute("role","listitem"),n.tabIndex=0,n.style.lineHeight=`${d}px`,n.style.width=`${l}px`,n.style.height=`${d}px`,n.style.zIndex="0",e===this._lineNumbers.length-1&&(n.style.position="relative",n.style.zIndex="-1",n.style.top=this._lastLineRelativePosition+"px"),this._disposableStore.add(Rt(n,"mouseover",N=>{if(this._editor.hasModel()){let H=new tR(N).target.innerText;this._hoverOnLine=t,this._hoverOnColumn=this._editor.getModel().getLineContent(t).indexOf(H)+1||-1}})),n}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}}});var Pge,KI,Fge,Pd,Pp,Qg,Jg,bh,qI,Zg=M(()=>{oi();gi();At();Em();tf();ri();qe();Ns();Et();bl();is();Ce();xt();Pge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},KI=function(i,e){return function(t,n){e(t,n,i)}},Fge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Pd=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let r=n;for(let o=0;t.children.get(r)!==void 0;o++)r=`${n}_${o}`;return r}static empty(e){return e.children.size===0}},Pp=class extends Pd{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},Qg=class extends Pd{constructor(e,t,n,r){super(),this.id=e,this.parent=t,this.label=n,this.order=r,this.children=new Map}},Jg=class i extends Pd{static create(e,t,n){let r=new Ri(n),o=new i(t.uri),s=e.ordered(t),a=s.map((c,d)=>{var u;let h=Pd.findId(`provider_${d}`,o),p=new Qg(h,o,(u=c.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,r.token)).then(m=>{for(let g of m||[])i._makeOutlineElement(g,p);return p},m=>(Ut(m),p)).then(m=>{Pd.empty(m)?m.remove():o._groups.set(h,m)})}),l=e.onDidChange(()=>{let c=e.ordered(t);ha(c,s)||r.cancel()});return Promise.all(a).then(()=>r.token.isCancellationRequested&&!n.isCancellationRequested?i.create(e,t,n):o._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(e,t){let n=Pd.findId(e,t),r=new Pp(n,t,e);if(e.children)for(let o of e.children)i._makeOutlineElement(o,r);t.children.set(r.id,r)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(let[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=ao.first(this._groups.values());for(let[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof Pp?e.push(t.symbol):e.push(...ao.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>P.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((n,r)=>Se.compare(P.getStartPosition(n.range),P.getStartPosition(r.range))||Se.compare(P.getEndPosition(r.range),P.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(let r of t)e.push({kind:r.kind,tags:r.tags,name:r.name,detail:r.detail,containerName:r.containerName||n,range:r.range,selectionRange:r.selectionRange,children:void 0}),r.children&&i._flattenDocumentSymbols(e,r.children,r.name)}},bh=rr("IOutlineModelService"),qI=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new ne,this._cache=new fa(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(r=>{this._cache.delete(r.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return Fge(this,void 0,void 0,function*(){let n=this._languageFeaturesService.documentSymbolProvider,r=n.ordered(e),o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!ha(o.provider,r)){let a=new Ri;o={versionId:e.getVersionId(),provider:r,promiseCnt:0,source:a,promise:Jg.create(n,e,a.token),model:void 0},this._cache.set(e.id,o);let l=Date.now();o.promise.then(c=>{o.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(o.model)return o.model;o.promiseCnt+=1;let s=t.onCancellationRequested(()=>{--o.promiseCnt===0&&(o.source.cancel(),this._cache.delete(e.id))});try{return yield o.promise}finally{s.dispose()}})}};qI=Pge([KI(0,be),KI(1,an),KI(2,Si)],qI);sr(bh,qI,1)});var Cc,yh,Ch,zC=M(()=>{Cc=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},yh=class{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}},Ch=class{constructor(e,t,n,r){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=r}}});var VC,tv,aX,ev,Fd,UC,WC,GI,jC,$I,YI,lX=M(()=>{Ce();xt();Zg();Dt();Sy();kE();SE();Kn();At();zC();Em();VC=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tv=function(i,e){return function(t,n){e(t,n,i)}},aX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(ev||(ev={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(Fd||(Fd={}));UC=class{constructor(e,t,n,r){this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=new Ro(300);let o=new GI(n),s=new YI(this._editor,n),a=new $I(this._editor,t);switch(r){case ev.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(a);break;case ev.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case ev.INDENTATION_MODEL:this._modelProviders.push(a);break}this._store=new ne}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,n){return aX(this,void 0,void 0,function*(){return this._store.clear(),this._store.add({dispose:()=>{var r;this._cancelModelPromise(),(r=this._updateScheduler)===null||r===void 0||r.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>aX(this,void 0,void 0,function*(){for(let r of this._modelProviders){let{statusPromise:o,modelPromise:s}=r.computeStickyModel(e,t,n);this._modelPromise=s;let a=yield o;if(this._modelPromise!==s)return null;switch(a){case Fd.CANCELED:return this._store.clear(),null;case Fd.VALID:return r.stickyModel}}return null}))})}};UC=VC([tv(1,Tt),tv(2,be)],UC);WC=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Fd.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let r=Vt(o=>this.createModelFromProvider(e,t,o));return{statusPromise:r.then(o=>this.isModelValid(o)?n.isCancellationRequested?Fd.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,o),Fd.VALID):this._invalid()).then(void 0,o=>(at(o),Fd.CANCELED)),modelPromise:r}}isModelValid(e){return!0}isProviderValid(e){return!0}},GI=class extends WC{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return Jg.create(this._languageFeaturesService.documentSymbolProvider,e,n)}createStickyModel(e,t,n,r){var o;let{stickyOutlineElement:s,providerID:a}=this._stickyModelFromOutlineModel(r,(o=this._stickyModel)===null||o===void 0?void 0:o.outlineProviderId);return new Ch(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(ao.first(e.children.values())instanceof Qg){let a=ao.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,d;for(let[u,h]of e.children.entries()){let p=this._findSumOfRangesOfGroup(h);p>c&&(d=h,c=p,l=h.id)}t=l,n=d.children}}else n=e.children;let r=[],o=Array.from(n.values()).sort((a,l)=>{let c=new Cc(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new Cc(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,d)});for(let a of o)r.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new yh(void 0,r,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let n=[];for(let o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(let s of o.children.values())n.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));n.sort((o,s)=>this._comparator(o.range,s.range));let r=new Cc(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new yh(r,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(let n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Pp?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};GI=VC([tv(0,be)],GI);jC=class extends WC{constructor(e){super(),this._foldingLimitReporter=new D0(e)}createStickyModel(e,t,n,r){let o=this._fromFoldingRegions(r);return new Ch(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,n=[],r=new yh(void 0,[],void 0);for(let o=0;o0}createModelFromProvider(e,t,n){let r=Za.getFoldingRangeProviders(this._languageFeaturesService,e);return new Vu(e,r,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};YI=VC([tv(1,be)],YI)});var Hge,cX,dX,XI,KC,uX=M(()=>{Ce();xt();gi();Dt();oi();lo();qt();Kn();lX();zC();Hge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},cX=function(i,e){return function(t,n){e(t,n,i)}},dX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},XI=class{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}},KC=class extends oe{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._store.add(new $e),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=new ne,this._updateSoon=this._register(new ti(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(111)&&this.readConfiguration()})),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){if(this._options=this._editor.getOption(111),!this._options.enabled){this._sessionStore.clear();return}this._stickyModelProvider=new UC(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel),this._sessionStore.add(this._editor.onDidChangeModel(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update()}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}update(){var e;return dX(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new Ri,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return dX(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider)return;let t=this._editor.getModel(),n=t.getVersionId(),o=(this._model?!nf(this._model.uri,t.uri):!1)?setTimeout(()=>{e.isCancellationRequested||(this._model=new Ch(t.uri,t.getVersionId(),void 0,void 0),this._onDidChangeStickyScroll.fire())},75):void 0;this._model=yield this._stickyModelProvider.update(t,n,e),clearTimeout(o)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,r,o){if(t.children.length===0)return;let s=o,a=[];for(let d=0;dd-u)),c=this.updateIndex(iu(a,e.startLineNumber+r,(d,u)=>d-u));for(let d=l;d<=c;d++){let u=t.children[d];if(!u)return;if(u.range){let h=u.range.startLineNumber,p=u.range.endLineNumber;e.startLineNumber<=p+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,n.push(new XI(h,p-1,r+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,r+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,n,r,o)}}getCandidateStickyLinesIntersecting(e){var t,n;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let r=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,r,0,-1);let o=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(o)for(let s of o)r=r.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return r}};KC=Hge([cX(1,be),cX(2,Tt)],KC)});var Bge,Fp,hX,xs,QI=M(()=>{Ce();xt();sX();uX();Et();Tl();Yi();ft();jt();wg();qe();H2();pk();ri();gi();Kn();Ns();Ht();zC();Bge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Fp=function(i,e){return function(t,n){e(t,n,i)}},hX=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xs=class fX extends oe{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=r,this._contextKeyService=a,this._sessionStore=new ne,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._stickyScrollWidget=new BC(this._editor),this._stickyLineCandidateProvider=new KC(this._editor,n,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new Xg([],0),this._readConfiguration(),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(111)&&this._readConfiguration()})),this._register(Rt(this._stickyScrollWidget.getDomNode(),on.CONTEXT_MENU,c=>hX(this,void 0,void 0,function*(){this._onContextMenu(c)}))),this._stickyScrollFocusedContextKey=O.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=O.stickyScrollVisible.bindTo(this._contextKeyService);let l=this._register(Ts(this._stickyScrollWidget.getDomNode()));this._register(l.onDidBlur(c=>{let d=this._stickyScrollWidget.getDomNode().clientHeight;this._positionRevealed===!1&&d===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(l.onDidFocus(c=>{this.focus()})),this._register(this._createClickLinkGesture()),this._register(Rt(this._stickyScrollWidget.getDomNode(),on.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(fX.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}if(this._stickyScrollFocusedContextKey.get()===!0)return;this._focused=!0,this._focusDisposableStore=new ne,this._stickyScrollFocusedContextKey.set(!0);let t=this._stickyScrollWidget.getDomNode();t.lastElementChild.focus(),this._stickyElements=t.children,this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyElements.item(this._focusedStickyElementIndex).focus()}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._positionRevealed=!0,this._editor.revealPosition(e),this._editor.setSelection(P.fromPositions(e)),this._editor.focus()}_createClickLinkGesture(){let e=new ne,t=new ne;e.add(t);let n=new sl(this._editor,!0);return e.add(n),e.add(n.onMouseMoveOrRelevantKeyDown(([r,o])=>{if(!this._editor.hasModel()||!r.hasTriggerModifier){t.clear();return}let s=r.target;if(s.detail===this._stickyScrollWidget.getId()&&s.element.innerText===s.element.innerHTML){let a=s.element.innerText;if(this._stickyScrollWidget.hoverOnColumn===-1)return;let l=this._stickyScrollWidget.hoverOnLine,c=this._stickyScrollWidget.hoverOnColumn,d=new P(l,c,l,c+a.length);if(!d.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=d,t.clear();else if(s.element.style.textDecoration==="underline")return;let u=new Ri;t.add(Ft(()=>u.dispose(!0)));let h;rh(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Se(l,c+1),u.token).then(p=>{if(!u.token.isCancellationRequested)if(p.length!==0){this._candidateDefinitionsLength=p.length;let m=s.element;h!==m?(t.clear(),h=m,h.style.textDecoration="underline",t.add(Ft(()=>{h.style.textDecoration="none"}))):h||(h=m,h.style.textDecoration="underline",t.add(Ft(()=>{h.style.textDecoration="none"})))}else t.clear()})}else t.clear()})),e.add(n.onCancel(()=>{t.clear()})),e.add(n.onExecute(r=>hX(this,void 0,void 0,function*(){r.target.detail===this._stickyScrollWidget.getId()&&(r.hasTriggerModifier?(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:1})),this._instaService.invokeFunction(mC,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})):r.isRightClick||(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:this._stickyScrollWidget.hoverOnLine,column:this._stickyScrollWidget.hoverOnColumn})))}))),e}_onContextMenu(e){this._contextMenuService.showContextMenu({menuId:xe.StickyScrollContext,getAnchor:()=>e})}_readConfiguration(){let e=this._editor.getOption(111);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(()=>this._renderStickyScroll())),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>this._renderStickyScroll())),this._enabled=!0);this._editor.getOption(65).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>this._renderStickyScroll()))}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let n of t)for(let r of e.ranges)if(n>=r.fromLineNumber&&n<=r.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){let e=this._editor.getLayoutInfo(),t=e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth;this._stickyScrollWidget.getDomNode().style.width=`${t}px`;let n=e.height/this._editor.getOption(64);this._maxStickyLines=Math.round(n*.25)}_renderStickyScroll(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._stickyLineCandidateProvider.getVersionId();if(t===void 0||t===e.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.lineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._stickyElements=this._stickyScrollWidget.getDomNode().children,this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyElements.length-1,this._focusedStickyElementIndex!==-1&&this._stickyElements.item(this._focusedStickyElementIndex).focus();else{let n=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyElements.length===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(n)||(this._focusedStickyElementIndex=this._stickyElements.length-1),this._stickyElements.item(this._focusedStickyElementIndex).focus())}}findScrollWidgetState(){let e=this._editor.getOption(64),t=Math.min(this._maxStickyLines,this._editor.getOption(111).maxLineCount),n=this._editor.getScrollTop(),r=0,o=[],s=this._editor.getVisibleRanges();if(s.length!==0){let a=new Cc(s[0].startLineNumber,s[s.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(let c of l){let d=c.startLineNumber,u=c.endLineNumber,h=c.nestingDepth;if(u-d>0){let p=(h-1)*e,m=h*e,g=this._editor.getBottomForLineNumber(d)-n,b=this._editor.getTopForLineNumber(u)-n,S=this._editor.getBottomForLineNumber(u)-n;if(p>b&&p<=S){o.push(d),r=S-m;break}else m>g&&m<=S&&o.push(d);if(o.length===t)break}}}return new Xg(o,r)}dispose(){super.dispose(),this._sessionStore.dispose()}};xs.ID="store.contrib.stickyScrollController";xs=Bge([Fp(1,cs),Fp(2,be),Fp(3,He),Fp(4,Tt),Fp(5,an),Fp(6,Ke)],xs)});var zge,qC,JC,GC,$C,YC,XC,QC,pX=M(()=>{Ze();De();iX();Yi();jn();ft();jt();QI();zge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qC=class extends os{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:v("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:v({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:tX.View,toggled:{condition:ce.equals("config.editor.stickyScroll.enabled",!0),title:v("stickyScroll","Sticky Scroll"),mnemonicTitle:v({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:xe.CommandPalette},{id:xe.MenubarViewMenu,group:"5_editor",order:2},{id:xe.StickyScrollContext}]})}run(e){return zge(this,void 0,void 0,function*(){let t=e.get(Mt),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)})}},JC=100,GC=class extends ua{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:v("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:v({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:ce.and(ce.has("config.editor.stickyScroll.enabled"),O.stickyScrollVisible),menu:[{id:xe.CommandPalette}]})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focus()}},$C=class extends ua{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:v("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:18}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focusNext()}},YC=class extends ua{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:v("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:16}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.focusPrevious()}},XC=class extends ua{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:v("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:3}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.goToFocused()}},QC=class extends ua{constructor(){super({id:"editor.action.selectEditor",title:{value:v("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:O.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JC,primary:9}})}runEditorCommand(e,t){var n;(n=xs.get(t))===null||n===void 0||n.selectEditor()}}});var JI=M(()=>{Ze();pX();QI();Yi();Ae(xs.ID,xs,1);mi(qC);mi(GC);mi(YC);mi($C);mi(XC);mi(QC)});var iA,Sh,Uge,ZI,eA,tA,ZC,nA=M(()=>{gi();Cl();Em();Ce();Ze();Lr();qe();xt();N7();Qu();L7();D7();$m();Et();iA=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Sh=function(i,e){return function(t,n){e(t,n,i)}},Uge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},ZI=class{constructor(e,t,n,r,o,s){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=r,this.command=o,this.completion=s}},eA=class extends jN{constructor(e,t,n,r,o,s){super(o.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=r,this._suggestMemoryService=s}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&l.resolve(et.None)}return t}};eA=iA([Sh(5,up)],eA);tA=class{constructor(e,t,n,r){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=n,this._suggestMemoryService=r}provideInlineCompletions(e,t,n,r){var o;return Uge(this,void 0,void 0,function*(){if(n.selectedSuggestionInfo)return;let s=this._getEditorOption(86,e);if(il.isAllOff(s))return;e.tokenization.tokenizeIfCheap(t.lineNumber);let a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(il.valueFor(s,l)!=="inline")return;let c=e.getWordAtPosition(t),d;if(c!=null&&c.word||(d=this._getTriggerCharacterInfo(e,t)),!(c!=null&&c.word)&&!d||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let u,h=e.getValueInRange(new P(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,c))){let p=new ng(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=p,this._lastResult.acquire(),u=this._lastResult}else{let p=yield V0(this._languageFeatureService.completionProvider,e,t,new dc(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},r),m;p.needsClipboard&&(m=yield this._clipboardService.readText());let g=new fp(p.items,t.column,new ng(h,0),xd.None,this._getEditorOption(114,e),this._getEditorOption(108,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);u=new eA(e,t.lineNumber,c,g,p,this._suggestMemoryService)}return this._lastResult=u,u})}handleItemDidShow(e,t){t.completion.resolve(et.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;let r=e.getValueInRange(P.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((n=s.triggerCharacters)===null||n===void 0)&&n.includes(r)&&o.add(s);if(o.size!==0)return{providers:o,ch:r}}};tA=iA([Sh(1,be),Sh(2,Ms),Sh(3,up)],tA);ZC=class Hp{constructor(e,t,n,r){if(++Hp._counter===1){let o=r.createInstance(tA,(s,a)=>{var l;return((l=n.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(s)});Hp._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Hp._counter===0&&((e=Hp._disposable)===null||e===void 0||e.dispose(),Hp._disposable=void 0)}};ZC._counter=0;ZC=iA([Sh(1,be),Sh(2,Zt),Sh(3,He)],ZC);Ae("suggest.inlineCompletionsProvider",ZC,0)});var mX=M(()=>{});var gX=M(()=>{mX()});var vX=M(()=>{});var _X=M(()=>{vX()});var bX=M(()=>{});var yX=M(()=>{bX()});var Wge,jge,e9,CX=M(()=>{Ht();Ire();eR();lP();qt();Ce();ds();yX();Wge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jge=function(i,e){return function(t,n){e(t,n,i)}},e9=class extends oe{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},r){var o;super(),this._link=t,this._enabled=!0,this.el=me(e,fe("a.monaco-link",{tabIndex:(o=t.tabIndex)!==null&&o!==void 0?o:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");let s=this._register(new G_(this.el,"click")),a=this._register(new G_(this.el,"keypress")),l=li.chain(a.event).map(u=>new g_(u)).filter(u=>u.keyCode===3).event,c=this._register(new G_(this.el,aP.Tap)).event;this._register(J_.addTarget(this.el));let d=li.any(s.event,l,c);this._register(d(u=>{this.enabled&&(Jd.stop(u,!0),n!=null&&n.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};e9=Wge([jge(3,Qi)],e9)});var SX,wX,Vge,t9,rA,xX=M(()=>{_X();Ht();gf();Pc();Ce();Zu();Et();CX();Al();qr();SX=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wX=function(i,e){return function(t,n){e(t,n,i)}},Vge=26,t9=class extends oe{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(rA))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,Vge)}};t9=SX([wX(1,He)],t9);rA=class extends oe{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(io,{}),this.element=fe("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){let t=fe("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){mr(this.element)}show(e){mr(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let n=me(this.element,fe("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(fe(`div${mt.asCSSSelector(e.icon)}`));let r=me(this.element,fe("div.message-container"));if(r.setAttribute("aria-hidden","true"),r.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=me(this.element,fe("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(e9,this.messageActionsContainer,Object.assign(Object.assign({},s),{tabIndex:-1}),{}));let o=me(this.element,fe("div.action-container"));this.actionBar=this._register(new Po(o)),this.actionBar.push(this._register(new ns("banner.close","Close Banner",mt.asClassName(ab),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};rA=SX([wX(0,He)],rA)});function qge(i,e){return{nonBasicASCII:e.nonBasicASCII===$_?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===$_?!i:e.includeComments,includeStrings:e.includeStrings===$_?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}function cA(i){return`U+${i.toString(16).padStart(4,"0")}`}function oA(i){let e=`\`${cA(i)}\``;return aw.isInvisibleCharacter(i)||(e+=` "${`${Gge(i)}`}"`),e}function Gge(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function EX(i,e){return Jw.computeUnicodeHighlightReason(i,e)}function $ge(i,e){return Zn(this,void 0,void 0,function*(){let t=i.getValue(Ca.allowedCharacters),n;typeof t=="object"&&t?n=t:n={};for(let r of e)n[String.fromCodePoint(r)]=!0;yield i.updateValue(Ca.allowedCharacters,n,2)})}function Yge(i,e){var t;return Zn(this,void 0,void 0,function*(){let n=(t=i.inspect(Ca.allowedLocales).user)===null||t===void 0?void 0:t.value,r;typeof n=="object"&&n?r=Object.assign({},n):r={};for(let o of e)r[o]=!0;yield i.updateValue(Ca.allowedLocales,r,2)})}function Xge(i){throw new Error(`Unexpected value: ${i}`)}var hA,Bp,Zn,Kge,zp,sA,aA,lA,Up,dA,uA,Hd,Wp,jp,iv,fA=M(()=>{Dt();or();Sl();Ce();nr();wi();gX();Ze();Xm();qn();ooe();ub();ss();Jre();lc();rC();xX();De();jn();Et();ds();Ll();Al();soe();hA=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bp=function(i,e){return function(t,n){e(t,n,i)}},Zn=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Kge=Ti("extensions-warning-message",lt.warning,v("warningIcon","Icon shown with a warning message in the extensions editor.")),zp=class extends oe{constructor(e,t,n,r){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;let s=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount),a;if(o.nonBasicAsciiCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new jp};else if(o.ambiguousCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Hd};else if(o.invisibleCharacterCount>=s)a={message:v("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Wp};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:Kge,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(r.createInstance(t9,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(121),this._register(n.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(121)&&(this._options=e.getOption(121),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;let e=qge(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;let t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?qN:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new sA(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new aA(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};zp.ID="editor.contrib.unicodeHighlighter";zp=hA([Bp(1,Ml),Bp(2,sF),Bp(3,He)],zp);sA=class extends oe{constructor(e,t,n,r){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new ti(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);let n=[];if(!t.hasMore)for(let r of t.ranges)n.push({range:r,options:Up.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!Kw(t,e))return null;let n=t.getValueInRange(e.range);return{reason:EX(n,this._options),inComment:qw(t,e),inString:Gw(t,e)}}};sA=hA([Bp(3,Ml)],sA);aA=class extends oe{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new ti(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}let e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let r of e){let o=Jw.computeUnicodeHighlights(this._model,this._options,r);for(let s of o.ranges)n.ranges.push(s);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||o.hasMore}if(!n.hasMore)for(let r of n.ranges)t.push({range:r,options:Up.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),n=t.getValueInRange(e.range);return Kw(t,e)?{reason:EX(n,this._options),inComment:qw(t,e),inString:Gw(t,e)}:null}},lA=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let n=this._editor.getModel(),r=this._editor.getContribution(zp.ID);if(!r)return[];let o=[],s=300;for(let a of t){let l=r.getDecorationInfo(a);if(!l)continue;let d=n.getValueInRange(a.range).codePointAt(0),u=oA(d),h;switch(l.reason.kind){case 0:{b_(l.reason.confusableWith)?h=v("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",u,oA(l.reason.confusableWith.codePointAt(0))):h=v("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",u,oA(l.reason.confusableWith.codePointAt(0)));break}case 1:h=v("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",u);break;case 2:h=v("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",u);break}let p={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},m=v("unicodeHighlight.adjustSettings","Adjust settings"),g=`command:${iv.ID}?${encodeURIComponent(JSON.stringify(p))}`,b=new sn("",!0).appendMarkdown(h).appendText(" ").appendLink(g,m);o.push(new no(this,a.range,[b],!1,s++))}return o}renderHoverParts(e,t){return KT(e,t,this._editor,this._languageService,this._openerService)}};lA=hA([Bp(1,Xi),Bp(2,Qi)],lA);Up=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let n=`${e}${t}`,r=this.map.get(n);return r||(r=ct.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,r)),r}};Up.instance=new Up;dA=class extends se{constructor(){super({id:Hd.ID,label:v("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.includeComments,!1,2)})}},uA=class extends se{constructor(){super({id:Hd.ID,label:v("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.includeStrings,!1,2)})}},Hd=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.ambiguousCharacters,!1,2)})}};Hd.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";Wp=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.invisibleCharacters,!1,2)})}};Wp.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";jp=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,n){return Zn(this,void 0,void 0,function*(){let r=e==null?void 0:e.get(Mt);r&&this.runAction(r)})}runAction(e){return Zn(this,void 0,void 0,function*(){yield e.updateValue(Ca.nonBasicASCII,!1,2)})}};jp.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";iv=class i extends se{constructor(){super({id:i.ID,label:v("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,n){return Zn(this,void 0,void 0,function*(){let{codePoint:r,reason:o,inString:s,inComment:a}=n,l=String.fromCodePoint(r),c=e.get(lr),d=e.get(Mt);function u(m){return aw.isInvisibleCharacter(m)?v("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",cA(m)):v("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${cA(m)} "${l}"`)}let h=[];if(o.kind===0)for(let m of o.notAmbiguousInLocales)h.push({label:v("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>Zn(this,void 0,void 0,function*(){Yge(d,[m])})});if(h.push({label:u(r),run:()=>$ge(d,[r])}),a){let m=new dA;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(s){let m=new uA;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}if(o.kind===0){let m=new Hd;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===1){let m=new Wp;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===2){let m=new jp;h.push({label:m.label,run:()=>Zn(this,void 0,void 0,function*(){return m.runAction(d)})})}else Xge(o);let p=yield c.pick(h,{title:v("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});p&&(yield p.run())})}};iv.ID="editor.action.unicodeHighlight.showExcludeOptions";X(Hd);X(Wp);X(jp);X(iv);Ae(zp.ID,zp,1);jo.register(lA)});function Zge(i,e,t){i.setModelProperty(e.uri,kX,t)}function eve(i,e){return i.getModelProperty(e.uri,kX)}var Qge,TX,Jge,kX,nv,pA=M(()=>{Ce();lo();Ze();Lr();De();Zw();Qge=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},TX=function(i,e){return function(t,n){e(t,n,i)}},Jge=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kX="ignoreUnusualLineTerminators";nv=class extends oe{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(122),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(122)&&(this._config=this._editor.getOption(122),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(r=>{r.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return Jge(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||eve(this._codeEditorService,e)===!0||this._editor.getOption(88))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=yield this._dialogService.confirm({title:v("unusualLineTerminators.title","Unusual Line Terminators"),message:v("unusualLineTerminators.message","Detected unusual line terminators"),detail:v("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Nr(e.uri)),primaryButton:v({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:v("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){Zge(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};nv.ID="editor.contrib.unusualLineTerminatorsDetector";nv=Qge([TX(1,bf),TX(2,Zt)],nv);Ae(nv.ID,nv,1)});function AX(i,e,t,n){let r=i.ordered(e);return P_(r.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,n)).then(void 0,Ut)),Wi)}function ive(i,e,t,n){return i.has(e)?new mA(e,t,n,i):new gA(e,t,n)}var tve,IX,r9,i9,mA,gA,vA,wh,n9,_A,bA,yA,CA=M(()=>{Mo();oi();Dt();gi();At();Ce();Ze();qe();jt();br();De();ft();xt();nI();tve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},IX=function(i,e){return function(t,n){e(t,n,i)}},r9=new nt("hasWordHighlights",!1);i9=class{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Vt(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let n=e.getWordAtPosition(t.getPosition());return n?new P(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){let r=t.startLineNumber,o=t.startColumn,s=t.endColumn,a=this._getCurrentWordRange(e,t),l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=n.length;!l&&c=s&&(l=!0)}return l}cancel(){this.result.cancel()}},mA=class extends i9{constructor(e,t,n,r){super(e,t,n),this._providers=r}_compute(e,t,n,r){return AX(this._providers,e,t.getPosition(),r).then(o=>o||[])}},gA=class extends i9{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,r){return of(250,r).then(()=>{if(!t.isEmpty())return[];let o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,n,!1).map(a=>({range:a.range,kind:Gm.Text}))})}isValid(e,t,n){let r=t.isEmpty();return this._selectionIsEmpty!==r?!1:super.isValid(e,t,n)}};Gr("_executeDocumentHighlights",(i,e,t)=>{let n=i.get(be);return AX(n.documentHighlightProvider,e,t,et.None)});vA=class{constructor(e,t,n){this.toUnhook=new ne,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this._hasWordHighlights=r9.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(78),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(r=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(r)})),this.toUnhook.add(e.onDidChangeModelContent(r=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(r=>{let o=this.editor.getOption(78);this.occurrencesHighlight!==o&&(this.occurrencesHighlight=o,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(P.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);Ni(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),n=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,r=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(r.startLineNumber);Ni(`${s}, ${n+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,n=e.endColumn,r=this._getWord();if(!r||r.startColumn>t||r.endColumn{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},at)}}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(let t of this.workerRequestValue)t.range&&e.push({range:t.range,options:MY(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations())}dispose(){this._stopAll(),this.toUnhook.dispose()}},wh=class LX extends oe{static get(e){return e.getContribution(LX.ID)}constructor(e,t,n){super(),this.wordHighlighter=null;let r=()=>{e.hasModel()&&(this.wordHighlighter=new vA(e,n.documentHighlightProvider,t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),r()})),r()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};wh.ID="editor.contrib.wordHighlighter";wh=tve([IX(1,Ke),IX(2,be)],wh);n9=class extends se{constructor(e,t){super(t),this._isNext=e}run(e,t){let n=wh.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}},_A=class extends n9{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:v("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:r9,kbOpts:{kbExpr:O.editorTextFocus,primary:65,weight:100}})}},bA=class extends n9{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:v("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:r9,kbOpts:{kbExpr:O.editorTextFocus,primary:1089,weight:100}})}},yA=class extends se{constructor(){super({id:"editor.action.wordHighlight.trigger",label:v("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:r9.toNegated(),kbOpts:{kbExpr:O.editorTextFocus,primary:0,weight:100}})}run(e,t,n){let r=wh.get(t);r&&r.restoreViewState(!0)}};Ae(wh.ID,wh,0);X(_A);X(bA);X(yA)});var xh,ll,cl,SA,wA,xA,EA,TA,kA,IA,AA,LA,MA,DA,NA,RA,OA,PA,FA,Eh,rv,ov,HA,BA,zA,UA,WA,jA,VA,o9=M(()=>{Ze();x_();Xm();sre();MR();lre();ri();qe();Mn();jt();Kn();De();Vw();ft();ioe();xh=class extends xi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;let r=Uc(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=new Se(l.positionLineNumber,l.positionColumn),d=this._move(r,o,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>AR.fromModelSelection(l))),a.length===1){let l=new Se(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,n){return n?new je(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new je(t.lineNumber,t.column,t.lineNumber,t.column)}},ll=class extends xh{_move(e,t,n,r){return Jh.moveWordLeft(e,t,n,r)}},cl=class extends xh{_move(e,t,n,r){return Jh.moveWordRight(e,t,n,r)}},SA=class extends ll{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},wA=class extends ll{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},xA=class extends ll{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},EA=class extends ll{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},TA=class extends ll{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},kA=class extends ll{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},IA=class extends ll{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},AA=class extends ll{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},LA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},MA=class extends cl{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},DA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},NA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},RA=class extends cl{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:ce.and(O.textInputFocus,(e=ce.and(i1,n1))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},OA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},PA=class extends cl{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},FA=class extends cl{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,r){return super._move(Uc(Ym.wordSeparators.defaultValue),t,n,r)}},Eh=class extends xi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){let r=e.get(Tt);if(!t.hasModel())return;let o=Uc(t.getOption(126)),s=t.getModel(),a=t.getSelections(),l=t.getOption(5),c=t.getOption(9),d=r.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(p=>{let m=this._delete({wordSeparators:o,model:s,selection:p,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(7),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new _l(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},rv=class extends Eh{_delete(e,t){let n=Jh.deleteWordLeft(e,t);return n||new P(1,1,1,1)}},ov=class extends Eh{_delete(e,t){let n=Jh.deleteWordRight(e,t);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new P(r,o,r,o)}},HA=class extends rv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:O.writable})}},BA=class extends rv{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:O.writable})}},zA=class extends rv{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},UA=class extends ov{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:O.writable})}},WA=class extends ov{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:O.writable})}},jA=class extends ov{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},VA=class extends se{constructor(){super({id:"deleteInsideWord",precondition:O.writable,label:v("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;let r=Uc(t.getOption(126)),o=t.getModel(),a=t.getSelections().map(l=>{let c=Jh.deleteInsideWord(r,o,l);return new _l(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};Me(new SA);Me(new wA);Me(new xA);Me(new EA);Me(new TA);Me(new kA);Me(new LA);Me(new MA);Me(new DA);Me(new NA);Me(new RA);Me(new OA);Me(new IA);Me(new AA);Me(new PA);Me(new FA);Me(new HA);Me(new BA);Me(new zA);Me(new UA);Me(new WA);Me(new jA);X(VA)});var KA,qA,s9,GA,$A,a9,YA,XA,QA=M(()=>{Ze();MR();qe();jt();o9();zi();KA=class extends Eh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let n=Dm.deleteWordPartLeft(e);return n||new P(1,1,1,1)}},qA=class extends Eh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:O.writable,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let n=Dm.deleteWordPartRight(e);if(n)return n;let r=e.model.getLineCount(),o=e.model.getLineMaxColumn(r);return new P(r,o,r,o)}},s9=class extends xh{_move(e,t,n,r){return Dm.moveWordPartLeft(e,t,n)}},GA=class extends s9{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};St.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");$A=class extends s9{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};St.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");a9=class extends xh{_move(e,t,n,r){return Dm.moveWordPartRight(e,t,n)}},YA=class extends a9{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},XA=class extends a9{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:O.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};Me(new KA);Me(new qA);Me(new GA);Me(new $A);Me(new YA);Me(new XA)});var sv,JA=M(()=>{Ce();Ze();u0();De();sv=class extends oe{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=Qn.get(this.editor);e&&this.editor.hasModel()&&(this.editor.isSimpleWidget?e.showMessage(v("editor.simple.readonly","Cannot edit in read-only input"),this.editor.getPosition()):e.showMessage(v("editor.readonly","Cannot edit in read-only editor"),this.editor.getPosition()))}};sv.ID="editor.contrib.readOnlyMessageController";Ae(sv.ID,sv,2)});var MX=M(()=>{});var DX=M(()=>{MX()});var Th,ZA=M(()=>{Mo();Xre();De();Yi();ft();Th=class i extends os{constructor(){super({id:i.ID,title:{value:v({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(e){let t=e.get(Ke).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!jw.getTabFocusMode(t);jw.setTabFocusMode(r,t),r?Ni(v("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Ni(v("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Th.ID="editor.action.toggleTabFocusMode";mi(Th)});var tL=gt(av=>{DX();Ht();Pre();Mo();Zm();Ce();nr();wi();Sn();Ze();jt();ZA();ft();Et();Gn();ds();Xc();var NX=av&&av.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},l9=av&&av.__param||function(i,e){return function(t,n){e(t,n,i)}},RX=new nt("accessibilityHelpWidgetVisible",!1),kh=class OX extends oe{static get(e){return e.getContribution(OX.ID)}constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(Vp,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};kh.ID="editor.contrib.accessibilityHelpController";kh=NX([l9(1,He)],kh);function nve(i,e){return!i||i.length===0?Ki.noSelection:i.length===1?e?Do(Ki.singleSelectionRange,i[0].positionLineNumber,i[0].positionColumn,e):Do(Ki.singleSelection,i[0].positionLineNumber,i[0].positionColumn):e?Do(Ki.multiSelectionRange,i.length,e):i.length>0?Do(Ki.multiSelection,i.length):""}var Vp=class c9 extends Ds{constructor(e,t,n,r){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=r,this._editor=e,this._isVisibleKey=RX.bindTo(this._contextKeyService),this._domNode=Iw(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-modal","true"),this._domNode.setAttribute("aria-hidden","true");let o=me(this._domNode.domNode,fe("h1",void 0,Ki.accessibilityHelpTitle));o.id="help-dialog-heading",this._domNode.setAttribute("aria-labelledby",o.id),this._contentDomNode=Iw(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._contentDomNode.domNode.id="help-dialog-content",this._domNode.appendChild(this._contentDomNode),this._contentDomNode.setAttribute("aria-describedby",this._contentDomNode.domNode.id),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(ts(this._contentDomNode.domNode,"keydown",s=>{if(this._isVisible&&(s.equals(2083)&&(Ni(Ki.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),mr(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Ni(Ki.openingDocs);let a=this._editor.getRawOptions().accessibilityHelpUrl;typeof a=="undefined"&&(a="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(ht.parse(a)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return c9.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,n){let r=this._keybindingService.lookupKeybinding(e);return r?Do(t,r.getAriaLabel()):Do(n,e)}_buildContent(){let e=this._contentDomNode.domNode,t=this._editor.getOptions(),n=this._editor.getSelections(),r=0;if(n){let c=this._editor.getModel();c&&n.forEach(d=>{r+=c.getValueLengthInRange(d)})}me(e,fe("p",void 0,nve(n,r)));let o=me(e,fe("p"));t.get(59)?t.get(88)?o.textContent=Ki.readonlyDiffEditor:o.textContent=Ki.editableDiffEditor:t.get(88)?o.textContent=Ki.readonlyEditor:o.textContent=Ki.editableEditor;let s=me(e,fe("ul")),a=zn?Ki.changeConfigToOnMac:Ki.changeConfigToOnWinLinux;switch(t.get(2)){case 0:me(s,fe("li",void 0,a));break;case 2:me(s,fe("li",void 0,Ki.auto_on));break;case 1:me(s,fe("li",void 0,Ki.auto_off,a));break}t.get(139)?me(s,fe("li",void 0,this._descriptionForCommand(Th.ID,Ki.tabFocusModeOnMsg,Ki.tabFocusModeOnMsgNoKb))):me(s,fe("li",void 0,this._descriptionForCommand(Th.ID,Ki.tabFocusModeOffMsg,Ki.tabFocusModeOffMsgNoKb)));let l=zn?Ki.openDocMac:Ki.openDocWinLinux;me(s,fe("li",void 0,l)),me(e,fe("p",void 0,Ki.outroMsg))}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,mr(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(c9.WIDTH,e.width-40)),n=Math.max(5,Math.min(c9.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(n);let r=Math.round((e.height-n)/2);this._domNode.setTop(r);let o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}};Vp.ID="editor.contrib.accessibilityHelpWidget";Vp.WIDTH=500;Vp.HEIGHT=300;Vp=NX([l9(1,Ke),l9(2,Bt),l9(3,Qi)],Vp);var eL=class extends se{constructor(){super({id:"editor.action.showAccessibilityHelp",label:Ki.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=kh.get(t);n==null||n.show()}};Ae(kh.ID,kh,4);X(eL);var rve=xi.bindToContribution(kh.get);Me(new rve({id:"closeAccessibilityHelp",precondition:RX,handler:i=>i.hide(),kbOpts:{weight:100+100,kbExpr:O.focus,primary:9,secondary:[1033]}}))});var PX=M(()=>{});var FX=M(()=>{PX()});var nL=gt(lv=>{FX();Ht();ma();Ce();Ze();br();bre();Ere();ss();dF();Xc();var ove=lv&&lv.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},HX=lv&&lv.__param||function(i,e){return function(t,n){e(t,n,i)}},Kp=class BX extends oe{static get(e){return e.getContribution(BX.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(hf.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new d9(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Kp.ID="editor.contrib.inspectTokens";Kp=ove([HX(1,kb),HX(2,Xi)],Kp);var iL=class extends se{constructor(){super({id:"editor.action.inspectTokens",label:aF.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=Kp.get(t);n==null||n.launch()}};function sve(i){let e="";for(let t=0,n=i.length;tQO,tokenize:(r,o,s)=>JO(e,s),tokenizeEncoded:(r,o,s)=>ZO(n,s)}}var d9=class i extends oe{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=ave(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let r=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){r=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(n{De();Hc();Ce();Gn();o1();Ll();lve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zX=function(i,e){return function(t,n){e(t,n,i)}},cv=class u9{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Mr.as(Ta.Quickaccess)}provide(e){let t=new ne;return t.add(e.onDidAccept(()=>{let[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{let r=this.registry.getQuickAccessProvider(n.substr(u9.PREFIX.length));r&&r.prefix&&r.prefix!==u9.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==u9.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let n=t.prefix||e.prefix,r=n||"\u2026";return{prefix:n,label:r,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:v("helpPickAriaLabel","{0}, {1}",r,t.description),description:t.description}})}};cv.PREFIX="?";cv=lve([zX(0,lr),zX(1,Bt)],cv)});var rL=M(()=>{Hc();o1();Xc();UX();Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:cv,prefix:"",helpEntries:[{description:lF.helpQuickAccessActionLabel}]})});var qp,oL=M(()=>{WN();Ce();Mi();Bw();Kc();VO();ar();Mo();qp=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;let r=new ne;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=r.add(new Bi);return o.value=this.doProvide(e,t),r.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),r}doProvide(e,t){let n=new ne,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){let o={editor:r},s=hb(r);if(s){let a=Un(r.saveViewState());n.add(s.onDidChangeCursorPosition(()=>{a=Un(r.saveViewState())})),o.restoreViewState=()=>{a&&r===this.activeTextEditorControl&&r.restoreViewState(a)},n.add(c_(t.onCancellationRequested)(()=>{var l;return(l=o.restoreViewState)===null||l===void 0?void 0:l.call(o)}))}n.add(Ft(()=>this.clearDecorations(r))),n.add(this.provideWithTextEditor(o,e,t))}else n.add(this.provideWithoutTextEditor(e,t));return n}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();let n=e.getModel();n&&"getLineContent"in n&&Ni(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return RP(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{let r=[];this.rangeHighlightDecorationId&&(r.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);let o=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:vi(K_),position:$r.Full}}}],[s,a]=n.deltaDecorations(r,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}});var dv,WX=M(()=>{Ce();Bw();oL();De();dv=class i extends qp{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=v("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,oe.None}provideWithTextEditor(e,t,n){let r=e.editor,o=new ne;o.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(r,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));let s=()=>{let l=this.parsePosition(r,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(r,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(r,l.lineNumber)){this.clearDecorations(r);return}let d=this.toRange(l.lineNumber,l.column);r.revealRangeInCenter(d,0),this.addDecorations(r,d)};s(),o.add(t.onDidChangeValue(()=>s()));let a=hb(r);return a&&a.getOptions().get(65).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(Ft(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let n=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),r=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:r+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?v("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):v("gotoLineLabel","Go to line {0}.",t);let r=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?v("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,o):v("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;let r=this.getModel(e);if(!r)return!1;let o={lineNumber:t,column:n};return r.validatePosition(o).equals(o)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}};dv.PREFIX=":"});var cve,dve,uv,hv,sL=M(()=>{WX();Hc();o1();Lr();Mi();Xc();qt();Ze();jt();Ll();cve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},dve=function(i,e){return function(t,n){e(t,n,i)}},uv=class extends dv{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){return Un(this.editorService.getFocusedCodeEditor())}};uv=cve([dve(0,Zt)],uv);hv=class i extends se{constructor(){super({id:i.ID,label:e3.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(lr).quickAccess.show(uv.PREFIX)}};hv.ID="editor.action.gotoLine";X(hv);Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:uv,prefix:uv.PREFIX,helpEntries:[{description:e3.gotoLineActionLabel,commandId:hv.ID}]})});function f9(i,e,t=0,n=0){let r=e;return r.values&&r.values.length>1?uve(i,r.values,t,n):qX(i,e,t,n)}function uve(i,e,t,n){let r=0,o=[];for(let s of e){let[a,l]=qX(i,s,t,n);if(typeof a!="number")return KX;r+=a,o.push(...l)}return[r,hve(o)]}function qX(i,e,t,n){let r=O_(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return r?[r[0],ru(r)]:KX}function hve(i){let e=i.sort((r,o)=>r.start-o.start),t=[],n;for(let r of e)!n||!fve(n,r)?(n=r,t.push(r)):(n.start=Math.min(n.start,r.start),n.end=Math.max(n.end,r.end));return t}function fve(i,e){return!(i.end=0,s=jX(i),a,l=i.split(GX);if(l.length>1)for(let c of l){let d=jX(c),{pathNormalized:u,normalized:h,normalizedLowercase:p}=VX(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:p,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:r,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function VX(i){let e;Nc?e=i.replace(/\//g,v_):e=i.replace(/\\/g,v_);let t=gR(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function aL(i){return Array.isArray(i)?h9(i.map(e=>e.original).join(GX)):h9(i.original)}var KX,Jct,GX,$X=M(()=>{Cl();nR();nr();wi();KX=[void 0,[]];Jct=Object.freeze({score:0});GX=" "});var pve,YX,fv,$o,lL,cL,XX=M(()=>{Dt();gi();or();qr();$X();Ce();wi();qe();br();Zg();oL();De();xt();oi();pve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},YX=function(i,e){return function(t,n){e(t,n,i)}},fv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$o=class dL extends qp{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,v("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),oe.None}provideWithTextEditor(e,t,n){let r=e.editor,o=this.getModel(r);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,n):this.doProvideWithoutEditorSymbols(e,o,t,n):oe.None}doProvideWithoutEditorSymbols(e,t,n,r){let o=new ne;return this.provideLabelPick(n,v("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),fv(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||r.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,n,r))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return fv(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let n=new aO,r=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(r.dispose(),n.complete(!0))}));return t.add(Ft(()=>n.complete(!1))),n.p})}doProvideWithEditorSymbols(e,t,n,r){var o;let s=e.editor,a=new ne;a.add(n.onDidAccept(u=>{let[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:u.inBackground}),u.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));let l=this.getDocumentSymbols(t,r),c,d=u=>fv(this,void 0,void 0,function*(){c==null||c.dispose(!0),n.busy=!1,c=new Ri(r),n.busy=!0;try{let h=h9(n.value.substr(dL.PREFIX.length).trim()),p=yield this.doGetSymbolPicks(l,h,void 0,c.token);if(r.isCancellationRequested)return;if(p.length>0){if(n.items=p,u&&h.original.length===0){let m=PR(p,g=>!!(g.type!=="separator"&&g.range&&P.containsPosition(g.range.decoration,u)));m&&(n.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(n,v("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,v("noSymbolResults","No editor symbols"))}finally{r.isCancellationRequested||(n.busy=!1)}});return a.add(n.onDidChangeValue(()=>d(void 0))),d((o=s.getSelection())===null||o===void 0?void 0:o.getPosition()),a.add(n.onDidChangeActive(()=>{let[u]=n.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}doGetSymbolPicks(e,t,n,r){var o,s;return fv(this,void 0,void 0,function*(){let a=yield e;if(r.isCancellationRequested)return[];let l=t.original.indexOf(dL.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=aL(t.values[0]),u=aL(t.values.slice(1))):d=t;let h,p=(s=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||s===void 0?void 0:s.call(o);p&&(h=[{iconClass:p==="right"?mt.asClassName(lt.splitHorizontal):mt.asClassName(lt.splitVertical),tooltip:p==="right"?v("openToSide","Open to the Side"):v("openToBottom","Open to the Bottom")}]);let m=[];for(let S=0;Sc){let Xe=!1;if(d!==t&&([W,re]=f9(A,Object.assign(Object.assign({},t),{values:void 0}),c,H),typeof W=="number"&&(Xe=!0)),typeof W!="number"&&([W,re]=f9(A,d,c,H),typeof W!="number"))continue;if(!Xe&&u){if(K&&u.original.length>0&&([ae,Ne]=f9(K,u)),typeof ae!="number")continue;typeof W=="number"&&(W+=ae)}}let he=k.tags&&k.tags.indexOf(1)>=0;m.push({index:S,kind:k.kind,score:W,label:A,ariaLabel:N,description:K,highlights:he?void 0:{label:re,description:Ne},range:{selection:P.collapseToStart(k.selectionRange),decoration:k.range},strikethrough:he,buttons:h})}let g=m.sort((S,k)=>l?this.compareByKindAndScore(S,k):this.compareByScore(S,k)),b=[];if(l){let A=function(){k&&typeof S=="number"&&N>0&&(k.label=Do(cL[S]||lL,N))},S,k,N=0;for(let H of g)S!==H.kind?(A(),S=H.kind,N=1,k={type:"separator"},b.push(k)):N++,b.push(H);A()}else g.length>0&&(b=[{label:v("symbols","symbols ({0})",m.length),type:"separator"},...g]);return b})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){let n=cL[e.kind]||lL,r=cL[t.kind]||lL,o=n.localeCompare(r);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return fv(this,void 0,void 0,function*(){let n=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}};$o.PREFIX="@";$o.SCOPE_PREFIX=":";$o.PREFIX_BY_CATEGORY=`${$o.PREFIX}${$o.SCOPE_PREFIX}`;$o=pve([YX(0,be),YX(1,bh)],$o);lL=v("property","properties ({0})"),cL={5:v("method","methods ({0})"),11:v("function","functions ({0})"),8:v("_constructor","constructors ({0})"),12:v("variable","variables ({0})"),4:v("class","classes ({0})"),22:v("struct","structs ({0})"),23:v("event","events ({0})"),24:v("operator","operators ({0})"),10:v("interface","interfaces ({0})"),2:v("namespace","namespaces ({0})"),3:v("package","packages ({0})"),25:v("typeParameter","type parameters ({0})"),1:v("modules","modules ({0})"),6:v("property","properties ({0})"),9:v("enum","enumerations ({0})"),21:v("enumMember","enumeration members ({0})"),14:v("string","strings ({0})"),0:v("file","files ({0})"),17:v("array","arrays ({0})"),15:v("number","numbers ({0})"),16:v("boolean","booleans ({0})"),18:v("object","objects ({0})"),19:v("key","keys ({0})"),7:v("field","fields ({0})"),13:v("constant","constants ({0})")}});var mve,uL,hL,pv,fL=M(()=>{d0();W4();XX();Hc();o1();Lr();Mi();Xc();qt();Ze();jt();Ll();Zg();xt();mve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},uL=function(i,e){return function(t,n){e(t,n,i)}},hL=class extends $o{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){return Un(this.editorService.getFocusedCodeEditor())}};hL=mve([uL(0,Zt),uL(1,be),uL(2,bh)],hL);pv=class i extends se{constructor(){super({id:i.ID,label:Tb.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:O.hasDocumentSymbolProvider,kbOpts:{kbExpr:O.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(lr).quickAccess.show($o.PREFIX,{itemActivation:DP.NONE})}};pv.ID="editor.action.quickOutline";X(pv);Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:hL,prefix:$o.PREFIX,helpEntries:[{description:Tb.quickOutlineActionLabel,prefix:$o.PREFIX,commandId:pv.ID},{description:Tb.quickOutlineByCategoryActionLabel,prefix:$o.PREFIX_BY_CATEGORY}]})});function pL(i,e){return e&&(i.stack||i.stacktrace)?v("stackTrace.format","{0}: {1}",JX(i),QX(i.stack)||QX(i.stacktrace)):JX(i)}function QX(i){return Array.isArray(i)?i.join(` +`):i}function JX(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?v("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function mL(i=null,e=!1){if(!i)return v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=vr(i),n=mL(t[0],e);return t.length>1?v("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(p_(i))return i;if(i.detail){let t=i.detail;if(t.error)return pL(t.error,e);if(t.exception)return pL(t.exception,e)}return i.stack?pL(i,e):i.message?i.message:v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var ZX=M(()=>{oi();Mi();De()});function gL(i){let e=i;return Array.isArray(e.items)}function eQ(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var mv,Gp,p9,tQ=M(()=>{Dt();gi();Ce();Mi();mv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(Gp||(Gp={}));p9=class extends oe{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var r;let o=new ne;e.canAcceptInBackground=!!(!((r=this.options)===null||r===void 0)&&r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=o.add(new Bi),l=()=>mv(this,void 0,void 0,function*(){let c=a.value=new ne;s==null||s.dispose(!0),e.busy=!1,s=new Ri(t);let d=s.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,c,d,n),p=(g,b)=>{var S;let k,N;if(gL(g)?(k=g.items,N=g.active):k=g,k.length===0){if(b)return!1;(u.length>0||e.hideInput)&&(!((S=this.options)===null||S===void 0)&&S.noResultsPick)&&(ZN(this.options.noResultsPick)?k=[this.options.noResultsPick(u)]:k=[this.options.noResultsPick])}return e.items=k,N&&(e.activeItems=[N]),!0},m=g=>mv(this,void 0,void 0,function*(){let b=!1,S=!1;yield Promise.all([(()=>mv(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield of(g.mergeDelay),d.isCancellationRequested)||S||(b=p(g.picks,!0))}))(),(()=>mv(this,void 0,void 0,function*(){e.busy=!0;try{let k=yield g.additionalPicks;if(d.isCancellationRequested)return;let N,A;gL(g.picks)?(N=g.picks.items,A=g.picks.active):N=g.picks;let H,K;if(gL(k)?(H=k.items,K=k.active):H=k,H.length>0||!b){let W;if(!A&&!K){let re=e.activeItems[0];re&&N.indexOf(re)!==-1&&(W=re)}p({items:[...N,...H],active:A||K||W})}}finally{d.isCancellationRequested||(e.busy=!1),S=!0}}))()])});if(h!==null)if(eQ(h))yield m(h);else if(!(h instanceof Promise))p(h);else{e.busy=!0;try{let g=yield h;if(d.isCancellationRequested)return;eQ(g)?yield m(g):p(g)}finally{d.isCancellationRequested||(e.busy=!1)}}});return o.add(e.onDidChangeValue(()=>l())),l(),o.add(e.onDidAccept(c=>{let[d]=e.selectedItems;typeof(d==null?void 0:d.accept)=="function"&&(c.inBackground||e.hide(),d.accept(e.keyMods,c))})),o.add(e.onDidTriggerItemButton(({button:c,item:d})=>mv(this,void 0,void 0,function*(){var u,h;if(typeof d.trigger=="function"){let p=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(p>=0){let m=d.trigger(p,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case Gp.NO_ACTION:break;case Gp.CLOSE_PICKER:e.hide();break;case Gp.REFRESH_PICKER:l();break;case Gp.REMOVE_ITEM:{let b=e.items.indexOf(d);if(b!==-1){let S=e.items.slice(),k=S.splice(b,1),N=e.activeItems.filter(H=>H!==k[0]),A=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=S,N&&(e.activeItems=N),e.keepScrollPosition=A}break}}}}}))),o}}});var iQ,Ih,vL,$p,Ah,nQ=M(()=>{ZX();At();Cl();Ce();tf();Mi();De();zi();jn();Zw();Et();Gn();tQ();cu();Bc();iQ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ih=function(i,e){return function(t,n){e(t,n,i)}},vL=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$p=class m9 extends p9{constructor(e,t,n,r,o,s){super(m9.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=r,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(Ah)),this.options=e}_getPicks(e,t,n,r){var o,s;return vL(this,void 0,void 0,function*(){let a=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];let l=[];for(let p of a){let m=Un(m9.WORD_FILTER(e,p.label)),g=p.commandAlias?Un(m9.WORD_FILTER(e,p.commandAlias)):void 0;m||g?(p.highlights={label:m,detail:this.options.showAlias?g:void 0},l.push(p)):e===p.commandId&&l.push(p)}let c=new Map;for(let p of l){let m=c.get(p.label);m?(p.description=p.commandId,m.description=m.commandId):c.set(p.label,p)}l.sort((p,m)=>{let g=this.commandsHistory.peek(p.commandId),b=this.commandsHistory.peek(m.commandId);if(g&&b)return g>b?-1:1;if(g)return-1;if(b)return 1;if(this.options.suggestedCommandIds){let S=this.options.suggestedCommandIds.has(p.commandId),k=this.options.suggestedCommandIds.has(m.commandId);if(S&&k)return 0;if(S)return-1;if(k)return 1}return p.label.localeCompare(m.label)});let d=[],u=!1,h=!!this.options.suggestedCommandIds;for(let p=0;pvL(this,void 0,void 0,function*(){let p=yield this.getAdditionalCommandPicks(a,l,e,n);return n.isCancellationRequested?[]:p.map(m=>this.toCommandPick(m,r))}))()}:d})}toCommandPick(e,t){if(e.type==="separator")return e;let n=this.keybindingService.lookupKeybinding(e.commandId),r=n?v("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:()=>vL(this,void 0,void 0,function*(){var o;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(o=t==null?void 0:t.from)!==null&&o!==void 0?o:"quick open"});try{yield this.commandService.executeCommand(e.commandId)}catch(s){es(s)||this.dialogService.error(v("canNotRun","Command '{0}' resulted in an error",e.label),mL(s))}})})}};$p.PREFIX=">";$p.WORD_FILTER=qR(GR,XR,$R);$p=iQ([Ih(1,He),Ih(2,Bt),Ih(3,ui),Ih(4,Dr),Ih(5,bf)],$p);Ah=class _n extends oe{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=_n.getConfiguredCommandHistoryLength(this.configurationService),_n.cache&&_n.cache.limit!==this.configuredCommandsHistoryLength&&(_n.cache.limit=this.configuredCommandsHistoryLength,_n.saveState(this.storageService)))}load(){let e=this.storageService.get(_n.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(r){}let n=_n.cache=new fa(this.configuredCommandsHistoryLength,1);if(t){let r;t.usesLRU?r=t.entries:r=t.entries.sort((o,s)=>o.value-s.value),r.forEach(o=>n.set(o.key,o.value))}_n.counter=this.storageService.getNumber(_n.PREF_KEY_COUNTER,0,_n.counter)}push(e){_n.cache&&(_n.cache.set(e,_n.counter++),_n.saveState(this.storageService))}peek(e){var t;return(t=_n.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!_n.cache)return;let t={usesLRU:!0,entries:[]};_n.cache.forEach((n,r)=>t.entries.push({key:r,value:n})),e.store(_n.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(_n.PREF_KEY_COUNTER,_n.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,n;let o=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof o=="number"?o:_n.DEFAULT_COMMANDS_HISTORY_LENGTH}};Ah.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Ah.PREF_KEY_CACHE="commandPalette.mru.cache";Ah.PREF_KEY_COUNTER="commandPalette.mru.counter";Ah.counter=1;Ah=iQ([Ih(0,Yr),Ih(1,Mt)],Ah)});var g9,rQ=M(()=>{pre();nQ();g9=class extends $p{constructor(e,t,n,r,o,s){super(e,t,n,r,o,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:ZR(n.label)||n.id});return t}}});var gve,Yp,oQ,gv,vv,_L=M(()=>{Hc();o1();Xc();Lr();rQ();Mi();Et();Gn();zi();Bc();Zw();Ze();jt();Ll();gve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Yp=function(i,e){return function(t,n){e(t,n,i)}},oQ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},gv=class extends g9{get activeTextEditorControl(){return Un(this.codeEditorService.getFocusedCodeEditor())}constructor(e,t,n,r,o,s){super({showAlias:!1},e,n,r,o,s),this.codeEditorService=t}getCommandPicks(){return oQ(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return oQ(this,void 0,void 0,function*(){return[]})}};gv=gve([Yp(0,He),Yp(1,Zt),Yp(2,Bt),Yp(3,ui),Yp(4,Dr),Yp(5,bf)],gv);vv=class i extends se{constructor(){super({id:i.ID,label:t3.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:O.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(lr).quickAccess.show(gv.PREFIX)}};vv.ID="editor.action.quickCommand";X(vv);Mr.as(Ta.Quickaccess).registerQuickAccessProvider({ctor:gv,prefix:gv.PREFIX,helpEntries:[{description:t3.quickCommandHelp,commandId:vv.ID}]})});var vve,Xp,bL,yL=M(()=>{Ze();Lr();nT();jn();ft();Et();Oo();cu();vve=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Xp=function(i,e){return function(t,n){e(t,n,i)}},bL=class extends ol{constructor(e,t,n,r,o,s,a){super(!0,e,t,n,r,o,s,a)}};bL=vve([Xp(1,Ke),Xp(2,Zt),Xp(3,Ei),Xp(4,He),Xp(5,Yr),Xp(6,Mt)],bL);Ae(ol.ID,bL,4)});function Tve(){return import("./jsonMode-GEC4TCVR.js")}var _ve,bve,yve,Cve,sQ,Sve,_v,wve,xve,Eve,aQ,CL=M(()=>{Os();Os();_ve=Object.defineProperty,bve=Object.getOwnPropertyDescriptor,yve=Object.getOwnPropertyNames,Cve=Object.prototype.hasOwnProperty,sQ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yve(e))!Cve.call(i,r)&&r!==t&&_ve(i,r,{get:()=>e[r],enumerable:!(n=bve(e,r))||n.enumerable});return i},Sve=(i,e,t)=>(sQ(i,e,"default"),t&&sQ(t,e,"default")),_v={};Sve(_v,Rs);wve=class{constructor(i,e,t){Cn(this,"_onDidChange",new _v.Emitter);Cn(this,"_diagnosticsOptions");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(i){this._diagnosticsOptions=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},xve={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Eve={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},aQ=new wve("json",xve,Eve);_v.languages.json={jsonDefaults:aQ};_v.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});_v.languages.onLanguage("json",()=>{Tve().then(i=>i.setupMode(aQ))})});function J(i){let e=i.id;cQ[e]=i,bv.languages.register(i);let t=dQ.getOrCreate(e);bv.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),bv.languages.onLanguageEncountered(e,async()=>{let n=await t.load();bv.languages.setLanguageConfiguration(e,n.conf)})}var kve,Ive,Ave,Lve,lQ,Mve,bv,cQ,SL,dQ,We=M(()=>{Os();kve=Object.defineProperty,Ive=Object.getOwnPropertyDescriptor,Ave=Object.getOwnPropertyNames,Lve=Object.prototype.hasOwnProperty,lQ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ave(e))!Lve.call(i,r)&&r!==t&&kve(i,r,{get:()=>e[r],enumerable:!(n=Ive(e,r))||n.enumerable});return i},Mve=(i,e,t)=>(lQ(i,e,"default"),t&&lQ(t,e,"default")),bv={};Mve(bv,Rs);cQ={},SL={},dQ=class{constructor(i){Cn(this,"_languageId");Cn(this,"_loadingTriggered");Cn(this,"_lazyLoadPromise");Cn(this,"_lazyLoadPromiseResolve");Cn(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return SL[i]||(SL[i]=new dQ(i)),SL[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,cQ[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}}});var wL=M(()=>{We();J({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>import("./elixir-JBWZGNRS.js")})});var xL=M(()=>{We();J({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>import("./markdown-VWG2RHDG.js")})});var EL=M(()=>{We();J({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>import("./javascript-6XN522EU.js")})});var TL=M(()=>{We();J({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>import("./sql-6HLO5RC2.js")})});var kL=M(()=>{We();J({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>import("./css-F6V6XVLU.js")})});var IL=M(()=>{We();J({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>import("./html-CVACNE45.js")})});var AL=M(()=>{We();J({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\import("./xml-ISFE4NDY.js")})});var LL=M(()=>{We();J({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>import("./dockerfile-WFOPSGAE.js")})});var CQ=gt(()=>{});var _9=gt((v9,SQ)=>{(function(i,e){typeof v9=="object"?SQ.exports=v9=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(v9,function(){var i=i||function(e,t){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof Yd=="function")try{n=CQ()}catch(S){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(S){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(S){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function S(){}return function(k){var N;return S.prototype=k,N=new S,S.prototype=null,N}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(S){var k=o(this);return S&&k.mixIn(S),(!k.hasOwnProperty("init")||this.init===k.init)&&(k.init=function(){k.$super.init.apply(this,arguments)}),k.init.prototype=k,k.$super=this,k},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var k in S)S.hasOwnProperty(k)&&(this[k]=S[k]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(S,k){S=this.words=S||[],k!=t?this.sigBytes=k:this.sigBytes=S.length*4},toString:function(S){return(S||u).stringify(this)},concat:function(S){var k=this.words,N=S.words,A=this.sigBytes,H=S.sigBytes;if(this.clamp(),A%4)for(var K=0;K>>2]>>>24-K%4*8&255;k[A+K>>>2]|=W<<24-(A+K)%4*8}else for(var re=0;re>>2]=N[re>>>2];return this.sigBytes+=H,this},clamp:function(){var S=this.words,k=this.sigBytes;S[k>>>2]&=4294967295<<32-k%4*8,S.length=e.ceil(k/4)},clone:function(){var S=l.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var k=[],N=0;N>>2]>>>24-H%4*8&255;A.push((K>>>4).toString(16)),A.push((K&15).toString(16))}return A.join("")},parse:function(S){for(var k=S.length,N=[],A=0;A>>3]|=parseInt(S.substr(A,2),16)<<24-A%8*4;return new c.init(N,k/2)}},h=d.Latin1={stringify:function(S){for(var k=S.words,N=S.sigBytes,A=[],H=0;H>>2]>>>24-H%4*8&255;A.push(String.fromCharCode(K))}return A.join("")},parse:function(S){for(var k=S.length,N=[],A=0;A>>2]|=(S.charCodeAt(A)&255)<<24-A%4*8;return new c.init(N,k)}},p=d.Utf8={stringify:function(S){try{return decodeURIComponent(escape(h.stringify(S)))}catch(k){throw new Error("Malformed UTF-8 data")}},parse:function(S){return h.parse(unescape(encodeURIComponent(S)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=p.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var k,N=this._data,A=N.words,H=N.sigBytes,K=this.blockSize,W=K*4,re=H/W;S?re=e.ceil(re):re=e.max((re|0)-this._minBufferSize,0);var ae=re*K,Ne=e.min(ae*4,H);if(ae){for(var he=0;he{(function(i,e){typeof b9=="object"?wQ.exports=b9=e(_9()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(b9,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[];(function(){for(var p=0;p<64;p++)a[p]=e.abs(e.sin(p+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,m){for(var g=0;g<16;g++){var b=m+g,S=p[b];p[b]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}var k=this._hash.words,N=p[m+0],A=p[m+1],H=p[m+2],K=p[m+3],W=p[m+4],re=p[m+5],ae=p[m+6],Ne=p[m+7],he=p[m+8],Xe=p[m+9],st=p[m+10],rt=p[m+11],Nt=p[m+12],Z=p[m+13],ye=p[m+14],ge=p[m+15],$=k[0],Q=k[1],ie=k[2],de=k[3];$=c($,Q,ie,de,N,7,a[0]),de=c(de,$,Q,ie,A,12,a[1]),ie=c(ie,de,$,Q,H,17,a[2]),Q=c(Q,ie,de,$,K,22,a[3]),$=c($,Q,ie,de,W,7,a[4]),de=c(de,$,Q,ie,re,12,a[5]),ie=c(ie,de,$,Q,ae,17,a[6]),Q=c(Q,ie,de,$,Ne,22,a[7]),$=c($,Q,ie,de,he,7,a[8]),de=c(de,$,Q,ie,Xe,12,a[9]),ie=c(ie,de,$,Q,st,17,a[10]),Q=c(Q,ie,de,$,rt,22,a[11]),$=c($,Q,ie,de,Nt,7,a[12]),de=c(de,$,Q,ie,Z,12,a[13]),ie=c(ie,de,$,Q,ye,17,a[14]),Q=c(Q,ie,de,$,ge,22,a[15]),$=d($,Q,ie,de,A,5,a[16]),de=d(de,$,Q,ie,ae,9,a[17]),ie=d(ie,de,$,Q,rt,14,a[18]),Q=d(Q,ie,de,$,N,20,a[19]),$=d($,Q,ie,de,re,5,a[20]),de=d(de,$,Q,ie,st,9,a[21]),ie=d(ie,de,$,Q,ge,14,a[22]),Q=d(Q,ie,de,$,W,20,a[23]),$=d($,Q,ie,de,Xe,5,a[24]),de=d(de,$,Q,ie,ye,9,a[25]),ie=d(ie,de,$,Q,K,14,a[26]),Q=d(Q,ie,de,$,he,20,a[27]),$=d($,Q,ie,de,Z,5,a[28]),de=d(de,$,Q,ie,H,9,a[29]),ie=d(ie,de,$,Q,Ne,14,a[30]),Q=d(Q,ie,de,$,Nt,20,a[31]),$=u($,Q,ie,de,re,4,a[32]),de=u(de,$,Q,ie,he,11,a[33]),ie=u(ie,de,$,Q,rt,16,a[34]),Q=u(Q,ie,de,$,ye,23,a[35]),$=u($,Q,ie,de,A,4,a[36]),de=u(de,$,Q,ie,W,11,a[37]),ie=u(ie,de,$,Q,Ne,16,a[38]),Q=u(Q,ie,de,$,st,23,a[39]),$=u($,Q,ie,de,Z,4,a[40]),de=u(de,$,Q,ie,N,11,a[41]),ie=u(ie,de,$,Q,K,16,a[42]),Q=u(Q,ie,de,$,ae,23,a[43]),$=u($,Q,ie,de,Xe,4,a[44]),de=u(de,$,Q,ie,Nt,11,a[45]),ie=u(ie,de,$,Q,ge,16,a[46]),Q=u(Q,ie,de,$,H,23,a[47]),$=h($,Q,ie,de,N,6,a[48]),de=h(de,$,Q,ie,Ne,10,a[49]),ie=h(ie,de,$,Q,ye,15,a[50]),Q=h(Q,ie,de,$,re,21,a[51]),$=h($,Q,ie,de,Nt,6,a[52]),de=h(de,$,Q,ie,K,10,a[53]),ie=h(ie,de,$,Q,st,15,a[54]),Q=h(Q,ie,de,$,A,21,a[55]),$=h($,Q,ie,de,he,6,a[56]),de=h(de,$,Q,ie,ge,10,a[57]),ie=h(ie,de,$,Q,ae,15,a[58]),Q=h(Q,ie,de,$,Z,21,a[59]),$=h($,Q,ie,de,W,6,a[60]),de=h(de,$,Q,ie,rt,10,a[61]),ie=h(ie,de,$,Q,H,15,a[62]),Q=h(Q,ie,de,$,Xe,21,a[63]),k[0]=k[0]+$|0,k[1]=k[1]+Q|0,k[2]=k[2]+ie|0,k[3]=k[3]+de|0},_doFinalize:function(){var p=this._data,m=p.words,g=this._nDataBytes*8,b=p.sigBytes*8;m[b>>>5]|=128<<24-b%32;var S=e.floor(g/4294967296),k=g;m[(b+64>>>9<<4)+15]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,p.sigBytes=(m.length+1)*4,this._process();for(var N=this._hash,A=N.words,H=0;H<4;H++){var K=A[H];A[H]=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360}return N},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function c(p,m,g,b,S,k,N){var A=p+(m&g|~m&b)+S+N;return(A<>>32-k)+m}function d(p,m,g,b,S,k,N){var A=p+(m&b|g&~b)+S+N;return(A<>>32-k)+m}function u(p,m,g,b,S,k,N){var A=p+(m^g^b)+S+N;return(A<>>32-k)+m}function h(p,m,g,b,S,k,N){var A=p+(g^(m|~b))+S+N;return(A<>>32-k)+m}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var TQ=gt((y9,EQ)=>{(function(i,e){typeof y9=="object"?EQ.exports=y9=e(_9()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(y9,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];(function(){function u(g){for(var b=e.sqrt(g),S=2;S<=b;S++)if(!(g%S))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var p=2,m=0;m<64;)u(p)&&(m<8&&(a[m]=h(e.pow(p,1/2))),l[m]=h(e.pow(p,1/3)),m++),p++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(u,h){for(var p=this._hash.words,m=p[0],g=p[1],b=p[2],S=p[3],k=p[4],N=p[5],A=p[6],H=p[7],K=0;K<64;K++){if(K<16)c[K]=u[h+K]|0;else{var W=c[K-15],re=(W<<25|W>>>7)^(W<<14|W>>>18)^W>>>3,ae=c[K-2],Ne=(ae<<15|ae>>>17)^(ae<<13|ae>>>19)^ae>>>10;c[K]=re+c[K-7]+Ne+c[K-16]}var he=k&N^~k&A,Xe=m&g^m&b^g&b,st=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),rt=(k<<26|k>>>6)^(k<<21|k>>>11)^(k<<7|k>>>25),Nt=H+rt+he+l[K]+c[K],Z=st+Xe;H=A,A=N,N=k,k=S+Nt|0,S=b,b=g,g=m,m=Nt+Z|0}p[0]=p[0]+m|0,p[1]=p[1]+g|0,p[2]=p[2]+b|0,p[3]=p[3]+S|0,p[4]=p[4]+k|0,p[5]=p[5]+N|0,p[6]=p[6]+A|0,p[7]=p[7]+H|0},_doFinalize:function(){var u=this._data,h=u.words,p=this._nDataBytes*8,m=u.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=e.floor(p/4294967296),h[(m+64>>>9<<4)+15]=p,u.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var u=o.clone.call(this);return u._hash=this._hash.clone(),u}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var IQ=gt((C9,kQ)=>{(function(i,e){typeof C9=="object"?kQ.exports=C9=e(_9()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(C9,function(i){return function(){var e=i,t=e.lib,n=t.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var u=[],h=0;h>>2]>>>24-h%4*8&255,m=l[h+1>>>2]>>>24-(h+1)%4*8&255,g=l[h+2>>>2]>>>24-(h+2)%4*8&255,b=p<<16|m<<8|g,S=0;S<4&&h+S*.75>>6*(3-S)&63));var k=d.charAt(64);if(k)for(;u.length%4;)u.push(k);return u.join("")},parse:function(a){var l=a.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var u=0;u>>6-h%4*2,g=p|m;d[u>>>2]|=g<<24-u%4*8,u++}return n.create(d,u)}}(),i.enc.Base64})});var aJ=gt(R9=>{"use strict";Object.defineProperty(R9,"__esModule",{value:!0});R9.default=void 0;var Li=(Os(),Kh(Rs)),c_e=(vw(),Kh(hre));function d_e(i,e){return p_e(i)||f_e(i,e)||h_e(i,e)||u_e()}function u_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h_e(i,e){if(i){if(typeof i=="string")return ZQ(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ZQ(i,e)}}function ZQ(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=new Array(e);t"\x80"&&(i.toUpperCase()!=i.toLowerCase()||v_e.test(i))}function N9(i,e){if(!(this instanceof N9))return new N9(i,e);this.line=i,this.ch=e}function b_e(i,e,t){i.dispatch(e,t)}function Av(i){return function(){}}var tJ,iJ;String.prototype.normalize?(tJ=function(e){return e.normalize("NFD").toLowerCase()},iJ=function(e){return e.normalize("NFD")}):(tJ=function(e){return e.toLowerCase()},iJ=function(e){return e});var oJ=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};oJ.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},o=this.string.substr(this.pos,e.length);if(r(o)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};function Es(i){return new N9(i.lineNumber-1,i.column-1)}function er(i){return new Li.Position(i.line+1,i.ch+1)}var y_e=function(){function i(e,t,n,r){nJ(this,i),this.cm=e,this.id=t,this.lineNumber=n+1,this.column=r+1,e.marks[this.id]=this}return rJ(i,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return Es(this)}}]),i}();function sJ(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=!0,n=Li.KeyCode[i.keyCode];i.key&&(n=i.key,t=!1);var r=n,o=e;switch(i.keyCode){case Li.KeyCode.Shift:case Li.KeyCode.Meta:case Li.KeyCode.Alt:case Li.KeyCode.Ctrl:return r;case Li.KeyCode.Escape:o=!0,r="Esc";break;case Li.KeyCode.Space:o=!0;break}return n.startsWith("Key")||n.startsWith("KEY_")?r=n[n.length-1].toLowerCase():n.startsWith("Digit")?r=n.slice(5,6):n.startsWith("Numpad")?r=n.slice(6,7):n.endsWith("Arrow")?(o=!0,r=n.substring(0,n.length-5)):(n.startsWith("US_")||n.startsWith("Bracket")||!r)&&(r=i.browserEvent.key),!o&&!i.altKey&&!i.ctrlKey&&!i.metaKey?r=i.key||i.browserEvent.key:(i.altKey&&(r="Alt-".concat(r)),i.ctrlKey&&(r="Ctrl-".concat(r)),i.metaKey&&(r="Meta-".concat(r)),i.shiftKey&&(r="Shift-".concat(r))),r.length===1&&t&&(r="'".concat(r,"'")),r}var tn=function(){function i(e){nJ(this,i),C_e.call(this),this.editor=e,this.state={keyMap:"vim"},this.marks={},this.$uid=0,this.disposables=[],this.listeners={},this.curOp={},this.attached=!1,this.statusBar=null,this.options={},this.addLocalListeners(),this.ctxInsert=this.editor.createContextKey("insertMode",!0)}return rJ(i,[{key:"attach",value:function(){i.keyMap.vim.attach(this)}},{key:"addLocalListeners",value:function(){this.disposables.push(this.editor.onDidChangeCursorPosition(this.handleCursorChange),this.editor.onDidChangeModelContent(this.handleChange),this.editor.onKeyDown(this.handleKeyDown))}},{key:"handleReplaceMode",value:function(t,n){var r=!1,o=t,s=this.editor.getPosition(),a=new Li.Range(s.lineNumber,s.column,s.lineNumber,s.column+1),l=!0;if(t.startsWith("'"))o=t[1];else if(o==="Enter")o=` +`;else if(o==="Backspace"){var c=this.replaceStack.pop();if(!c)return;r=!0,o=c,a=new Li.Range(s.lineNumber,s.column,s.lineNumber,s.column-1)}else return;n.preventDefault(),n.stopPropagation(),this.replaceStack||(this.replaceStack=[]),r||this.replaceStack.push(this.editor.getModel().getValueInRange(a)),this.editor.executeEdits("vim",[{text:o,range:a,forceMoveMarkers:l}]),r&&this.editor.setPosition(a.getStartPosition())}},{key:"setOption",value:function(t,n){this.state[t]=n,t==="theme"&&Li.editor.setTheme(n)}},{key:"getConfiguration",value:function(){var t=this.editor,n=g_e;return typeof t.getConfiguration=="function"?t.getConfiguration():("EditorOption"in Li.editor&&(n=Li.editor.EditorOption),{readOnly:t.getOption(n.readOnly),viewInfo:{cursorWidth:t.getOption(n.cursorWidth)},fontInfo:t.getOption(n.fontInfo)})}},{key:"getOption",value:function(t){return t==="readOnly"?this.getConfiguration().readOnly:t==="firstLineNumber"?this.firstLine()+1:t==="indentWithTabs"?!this.editor.getModel().getOptions().insertSpaces:typeof this.editor.getConfiguration=="function"?this.editor.getRawConfiguration()[t]:this.editor.getRawOptions()[t]}},{key:"dispatch",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;or&&(t=r-1),this.editor.getModel().getLineContent(t+1)}},{key:"getAnchorForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Li.SelectionDirection.LTR?t.getStartPosition():t.getEndPosition()}},{key:"getHeadForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var n=t.getDirection();return n===Li.SelectionDirection.LTR?t.getEndPosition():t.getStartPosition()}},{key:"getCursor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!t)return Es(this.editor.getPosition());var n=this.editor.getSelection(),r;return n.isEmpty()?r=n.getPosition():t==="anchor"?r=this.getAnchorForSelection(n):r=this.getHeadForSelection(n),Es(r)}},{key:"getRange",value:function(t,n){var r=er(t),o=er(n);return this.editor.getModel().getValueInRange(Li.Range.fromPositions(r,o))}},{key:"getSelection",value:function(){var t=[],n=this.editor;return n.getSelections().map(function(r){t.push(n.getModel().getValueInRange(r))}),t.join(` +`)}},{key:"replaceRange",value:function(t,n,r){var o=er(n),s=r?er(r):o;this.editor.executeEdits("vim",[{text:t,range:Li.Range.fromPositions(o,s)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(t,n){var r=t;$L(t)!=="object"&&(r={},r.line=t,r.ch=n);var o=this.editor.getModel().validatePosition(er(r));this.editor.setPosition(er(r)),this.editor.revealPosition(o)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(t,n){return t()}},{key:"listSelections",value:function(){var t=this,n=this.editor.getSelections();return!n.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:n.map(function(r){var o=r.getPosition(),s=r.getStartPosition(),a=r.getEndPosition();return{anchor:t.clipPos(Es(t.getAnchorForSelection(r))),head:t.clipPos(Es(t.getHeadForSelection(r)))}})}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(t,n){var r=!!this.editor.getSelections().length,o=t.map(function(l,c){var d=l.anchor,u=l.head;return r?Li.Selection.fromPositions(er(d),er(u)):Li.Selection.fromPositions(er(u),er(d))});if(n&&o[n]&&o.push(o.splice(n,1)[0]),!!o.length){var s=o[0],a;s.getDirection()===Li.SelectionDirection.LTR?a=s.getEndPosition():a=s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(a)}}},{key:"setSelection",value:function(t,n){var r=Li.Range.fromPositions(er(t),er(n));this.editor.setSelection(r)}},{key:"getSelections",value:function(){var t=this.editor;return t.getSelections().map(function(n){return t.getModel().getValueInRange(n)})}},{key:"replaceSelections",value:function(t){var n=this.editor;n.getSelections().forEach(function(r,o){n.executeEdits("vim",[{range:r,text:t[o],forceMoveMarkers:!1}])})}},{key:"toggleOverwrite",value:function(t){t?(this.enterVimMode(),this.replaceMode=!0):(this.leaveVimMode(),this.replaceMode=!1,this.replaceStack=[])}},{key:"charCoords",value:function(t,n){return{top:t.line,left:t.ch}}},{key:"coordsChar",value:function(t,n){}},{key:"clipPos",value:function(t){var n=this.editor.getModel().validatePosition(er(t));return Es(n)}},{key:"setBookmark",value:function(t,n){var r=new y_e(this,this.$uid++,t.line,t.ch);return(!n||!n.insertLeft)&&(r.$insertRight=!0),this.marks[r.id]=r,r}},{key:"getScrollInfo",value:function(){var t=this.editor,n=t.getVisibleRanges(),r=d_e(n,1),o=r[0];return{left:0,top:o.startLineNumber-1,height:t.getModel().getLineCount(),clientHeight:o.endLineNumber-o.startLineNumber+1}}},{key:"triggerEditorAction",value:function(t){this.editor.trigger("vim",t)}},{key:"dispose",value:function(){this.dispatch("dispose"),this.removeOverlay(),i.keyMap.vim&&i.keyMap.vim.detach(this),this.disposables.forEach(function(t){return t.dispose()})}},{key:"getInputField",value:function(){}},{key:"getWrapperElement",value:function(){}},{key:"enterVimMode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.ctxInsert.set(!1);var n=this.getConfiguration();this.initialCursorWidth=n.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:n.fontInfo.typicalFullwidthCharacterWidth,cursorBlinking:"solid"})}},{key:"leaveVimMode",value:function(){this.ctxInsert.set(!0),this.editor.updateOptions({cursorWidth:this.initialCursorWidth||0,cursorBlinking:"blink"})}},{key:"virtualSelectionMode",value:function(){return this.inVirtualSelectionMode}},{key:"markText",value:function(){return{clear:function(){},find:function(){}}}},{key:"getUserVisibleLines",value:function(){var t=this.editor.getVisibleRanges();if(!t.length)return{top:0,bottom:0};var n={top:1/0,bottom:0};return t.reduce(function(r,o){return o.startLineNumberr.bottom&&(r.bottom=o.endLineNumber),r},n),n.top-=1,n.bottom-=1,n}},{key:"findPosV",value:function(t,n,r){var o=this.editor,s=n,a=r,l=er(t);if(r==="page"){var c=o.getLayoutInfo().height,d=this.getConfiguration().fontInfo.lineHeight;s=s*Math.floor(c/d),a="line"}return a==="line"&&(l.lineNumber+=s),Es(l)}},{key:"findMatchingBracket",value:function(t){var n=er(t),r=this.editor.getModel(),o;if(r.bracketPairs)o=r.bracketPairs.matchBracket(n);else{var s;o=(s=r.matchBracket)===null||s===void 0?void 0:s.call(r,n)}return!o||o.length!==2?{to:null}:{to:Es(o[1].getStartPosition())}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(t){return this.editor.getModel().getLineFirstNonWhitespaceColumn(t+1)-1}},{key:"scrollTo",value:function(t,n){!t&&!n||t||(n<0&&(n=this.editor.getPosition().lineNumber-n),this.editor.setScrollTop(this.editor.getTopForLineNumber(n+1)))}},{key:"moveCurrentLineTo",value:function(t){var n,r=this.editor,o=r.getPosition(),s=Li.Range.fromPositions(o,o);switch(t){case"top":r.revealRangeAtTop(s);return;case"center":r.revealRangeInCenter(s);return;case"bottom":(n=r._revealRange)===null||n===void 0||n.call(r,s,m_e.Bottom);return}}},{key:"getSearchCursor",value:function(t,n){var r=!1,o=!1;t instanceof RegExp&&!t.global&&(r=!t.ignoreCase,t=t.source,o=!0),n.ch==null&&(n.ch=Number.MAX_VALUE);var s=er(n),a=this,l=this.editor,c=null,d=l.getModel(),u=d.findMatches(t,!1,o,r)||[];return{getMatches:function(){return u},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(p){if(!u||!u.length)return!1;var m=u[p];return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(g){return g.range}).filter(function(g){return!g.equalsRange(c)})),c},find:function(p){if(!u||!u.length)return!1;var m;if(p){var g=c?c.getStartPosition():s;if(m=d.findPreviousMatch(t,g,o,r),!m||!m.range.getStartPosition().isBeforeOrEqual(g))return!1}else{var b=c?d.getPositionAt(d.getOffsetAt(c.getStartPosition())+1):s;if(m=d.findNextMatch(t,b,o,r),!m||!b.isBeforeOrEqual(m.range.getStartPosition()))return!1}return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(S){return S.range}).filter(function(S){return!S.equalsRange(c)})),c},from:function(){return c&&Es(c.getStartPosition())},to:function(){return c&&Es(c.getEndPosition())},replace:function(p){c&&(l.executeEdits("vim",[{range:c,text:p,forceMoveMarkers:!0}]),c.setEndPosition(l.getPosition()),l.setPosition(c.getStartPosition()))}}}},{key:"highlightRanges",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"findMatch",r="decoration".concat(n);return this[r]=this.editor.deltaDecorations(this[r]||[],t.map(function(o){return{range:o,options:{stickiness:Li.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:n,showIfCollapsed:!0}}})),this[r]}},{key:"addOverlay",value:function(t,n,r){var o=t.query,s=!1,a=!1;o&&o instanceof RegExp&&!o.global&&(a=!0,s=!o.ignoreCase,o=o.source);var l=this.editor.getModel().findNextMatch(o,this.editor.getPosition(),a,s);!l||!l.range||this.highlightRanges([l.range])}},{key:"removeOverlay",value:function(){var t=this;["currentFindMatch","findMatch"].forEach(function(n){t.editor.deltaDecorations(t["decoration".concat(n)]||[],[])})}},{key:"scrollIntoView",value:function(t){t&&this.editor.revealPosition(er(t))}},{key:"moveH",value:function(t,n){if(n==="char"){var r=this.editor.getPosition();this.editor.setPosition(new Li.Position(r.lineNumber,r.column+t))}}},{key:"scanForBracket",value:function(t,n,r,o){for(var s=o.bracketRegex,a=er(t),l=this.editor.getModel(),c=(n===-1?l.findPreviousMatch:l.findNextMatch).bind(l),d=[],u=0;;){if(u>10)return;var h=c(s.source,a,!0,!0,null,!0),p=h.matches[0];if(h===void 0)return;var m=i.matchingBrackets[p];if(m&&m.charAt(1)===">"==n>0)d.push(p);else if(d.length===0){var g=h.range.getStartPosition();return{pos:Es(g)}}else d.pop();a=l.getPositionAt(l.getOffsetAt(h.range.getStartPosition())+n),u+=1}}},{key:"indexFromPos",value:function(t){return this.editor.getModel().getOffsetAt(er(t))}},{key:"posFromIndex",value:function(t){return Es(this.editor.getModel().getPositionAt(t))}},{key:"indentLine",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.editor,o;r._getViewModel?o=r._getViewModel().cursorConfig:o=r._getCursors().context.config;var s=new Li.Position(t+1,1),a=Li.Selection.fromPositions(s,s);r.executeCommand("vim",new c_e.ShiftCommand(a,{isUnshift:!n,tabSize:o.tabSize,indentSize:o.indentSize,insertSpaces:o.insertSpaces,useTabStops:o.useTabStops,autoIndent:o.autoIndent}))}},{key:"setStatusBar",value:function(t){this.statusBar=t}},{key:"openDialog",value:function(t,n,r){if(this.statusBar)return this.statusBar.setSec(t,n,r)}},{key:"openNotification",value:function(t){this.statusBar&&this.statusBar.showNotification(t)}},{key:"smartIndent",value:function(){this.editor.getAction("editor.action.formatSelection").run()}},{key:"moveCursorTo",value:function(t){var n=this.editor.getPosition();t==="start"?n.column=1:t==="end"&&(n.column=this.editor.getModel().getLineMaxColumn(n.lineNumber)),this.editor.setPosition(n)}},{key:"execCommand",value:function(t){switch(t){case"goLineLeft":this.moveCursorTo("start");break;case"goLineRight":this.moveCursorTo("end");break;case"indentAuto":this.smartIndent();break}}}]),i}();tn.Pos=N9;tn.signal=b_e;tn.on=Av("on");tn.off=Av("off");tn.addClass=Av("addClass");tn.rmClass=Av("rmClass");tn.defineOption=Av("defineOption");tn.keyMap={default:function(e){return function(t){return!0}}};tn.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};tn.isWordChar=__e;tn.keyName=sJ;tn.StringStream=oJ;tn.e_stop=function(i){return i.stopPropagation?i.stopPropagation():i.cancelBubble=!0,tn.e_preventDefault(i),!1};tn.e_preventDefault=function(i){return i.preventDefault?(i.preventDefault(),i.browserEvent&&i.browserEvent.preventDefault()):i.returnValue=!1,!1};tn.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}};tn.lookupKey=function i(e,t,n){typeof t=="string"&&(t=tn.keyMap[t]);var r=typeof t=="function"?t(e):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&n(r))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return i(e,t.fallthrough,n);for(var o=0;o{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});tm.default=tm.Vim=void 0;var ot=w_e(aJ());function w_e(i){return i&&i.__esModule?i:{default:i}}function O9(i){"@babel/helpers - typeof";return O9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O9(i)}var Fe=ot.default.Pos;function x_e(i,e){var t=i.state.vim;if(!t||t.insertMode)return e.head;var n=t.sel.head;if(!n)return e.head;if(!(t.visualBlock&&e.head.line!=n.line))return e.from()==e.anchor&&!e.empty()&&e.head.line==n.line&&e.head.ch!=n.ch?new Fe(e.head.line,e.head.ch-1):e.head}var Ir=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],lJ=Ir.length,cJ=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],dJ=function(){function e(w){w.setOption("disableInput",!0),w.setOption("showCursorWhenSelecting",!1),ot.default.signal(w,"vim-mode-change",{mode:"normal"}),w.on("cursorActivity",LN),ge(w),w.enterVimMode()}function t(w){w.setOption("disableInput",!1),w.off("cursorActivity",LN),w.state.vim=null,s_&&clearTimeout(s_),w.leaveVimMode()}function n(w,f){w.attached=!1,this==ot.default.keyMap.vim&&(w.options.$customCursor=null),(!f||f.attach!=r)&&t(w)}function r(w,f){this==ot.default.keyMap.vim&&(w.attached=!0,w.curOp&&(w.curOp.selectionChanged=!0),w.options.$customCursor=x_e),(!f||f.attach!=r)&&e(w)}ot.default.defineOption("vimMode",!1,function(w,f,_){f&&w.getOption("keyMap")!="vim"?w.setOption("keyMap","vim"):!f&&_!=ot.default.Init&&/^vim/.test(w.getOption("keyMap"))&&w.setOption("keyMap","default")});function o(w,f){if(f){if(this[w])return this[w];var _=l(w);if(!_)return!1;var C=de.findKey(f,_);return typeof C=="function"&&ot.default.signal(f,"vim-keypress",_),C}}var s={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},a={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function l(w){if(w.charAt(0)=="'")return w.charAt(1);if(w==="AltGraph")return!1;var f=w.split(/-(?!$)/),_=f[f.length-1];if(f.length==1&&f[0].length==1)return!1;if(f.length==2&&f[0]=="Shift"&&_.length==1)return!1;for(var C=!1,x=0;x"):!1}var c=/[\d]/,d=[ot.default.isWordChar,function(w){return w&&!ot.default.isWordChar(w)&&!/\s/.test(w)}],u=[function(w){return/\S/.test(w)}];function h(w,f){for(var _=[],C=w;C"]),S=[].concat(p,m,g,["-",'"',".",":","_","/"]),k;try{k=new RegExp("^[\\p{Lu}]$","u")}catch(w){k=/^[A-Z]$/}function N(w,f){return f>=w.firstLine()&&f<=w.lastLine()}function A(w){return/^[a-z]$/.test(w)}function H(w){return"()[]{}".indexOf(w)!=-1}function K(w){return c.test(w)}function W(w){return k.test(w)}function re(w){return/^\s*$/.test(w)}function ae(w){return".?!".indexOf(w)!=-1}function Ne(w,f){for(var _=0;_C?_=C:_0?1:-1,pe,ue=z.getCursor();do if(_+=ve,ee=I[(f+_)%f],ee&&(pe=ee.find())&&!Qo(ue,pe))break;while(_x)}return ee}function B(z,G){var ee=_,ve=F(z,G);return _=ee,ve&&ve.find()}return{cachedCursor:void 0,add:D,find:B,move:F}},Z=function(f){return f?{changes:f.changes,expectCursorActivityForChange:f.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function ye(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Z()}ye.prototype={exitMacroRecordMode:function(){var f=$.macroModeState;f.onRecordingDone&&f.onRecordingDone(),f.onRecordingDone=void 0,f.isRecording=!1},enterMacroRecordMode:function(f,_){var C=$.registerController.getRegister(_);C&&(C.clear(),this.latestRegister=_,f.openDialog&&(this.onRecordingDone=f.openDialog(document.createTextNode("(recording)["+_+"]"),null,{bottom:!0})),this.isRecording=!0)}};function ge(w){return w.state.vim||(w.state.vim={inputState:new $t,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),w.state.vim}var $;function Q(){$={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Nt(),macroModeState:new ye,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Gi({}),searchHistoryController:new ai,exCommandHistoryController:new ai};for(var w in he){var f=he[w];f.value=f.defaultValue}}var ie,de={buildKeyMap:function(){},getRegisterController:function(){return $.registerController},resetVimGlobalState_:Q,getVimGlobalState_:function(){return $},maybeInitVimState_:ge,suppressErrorLogging:!1,InsertModeKey:qS,map:function(f,_,C){sa.map(f,_,C)},unmap:function(f,_){return sa.unmap(f,_)},noremap:function(f,_,C){function x(pe){return pe?[pe]:["normal","insert","visual"]}for(var I=x(C),D=Ir.length,F=lJ,B=D-F;B=0;I--){var D=x[I];if(f!==D.context)if(D.context)this._mapCommand(D);else{var F=["normal","insert","visual"];for(var B in F)if(F[B]!==f){var z={};for(var G in D)z[G]=D[G];z.context=F[B],this._mapCommand(z)}}}},setOption:st,getOption:rt,defineOption:Xe,defineEx:function(f,_,C){if(!_)_=f;else if(f.indexOf(_)!==0)throw new Error('(Vim.defineEx) "'+_+'" is not a prefix of "'+f+'", command not registered');kN[f]=C,sa.commandMap_[_]={name:f,shortName:_,type:"api"}},handleKey:function(f,_,C){var x=this.findKey(f,_,C);if(typeof x=="function")return x()},findKey:function(f,_,C){var x=ge(f);function I(){var ee=$.macroModeState;if(ee.isRecording){if(_=="q")return ee.exitMacroRecordMode(),Xt(f),!0;C!="mapping"&&Jne(ee,_)}}function D(){if(_==""){if(x.visualMode)na(f);else if(x.insertMode)ym(f);else return;return Xt(f),!0}}function F(ee){for(var ve;ee;)ve=/<\w+-.+?>|<\w+>|./.exec(ee),_=ve[0],ee=ee.substring(ve.index+_.length),de.handleKey(f,_,"mapping")}function B(){if(D())return!0;for(var ee=x.inputState.keyBuffer=x.inputState.keyBuffer+_,ve=_.length==1,pe=$i.matchCommand(ee,Ir,x.inputState,"insert");ee.length>1&&pe.type!="full";){var ee=x.inputState.keyBuffer=ee.slice(1),ue=$i.matchCommand(ee,Ir,x.inputState,"insert");ue.type!="none"&&(pe=ue)}if(pe.type=="none")return Xt(f),!1;if(pe.type=="partial")return ie&&window.clearTimeout(ie),ie=window.setTimeout(function(){x.insertMode&&x.inputState.keyBuffer&&Xt(f)},rt("insertModeEscKeysTimeout")),!ve;if(ie&&window.clearTimeout(ie),ve){for(var Ve=f.listSelections(),Ge=0;Ge0||this.motionRepeat.length>0)&&(w=1,this.prefixRepeat.length>0&&(w*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(w*=parseInt(this.motionRepeat.join(""),10))),w};function Xt(w,f){w.state.vim.inputState=new $t,ot.default.signal(w,"vim-command-done",f)}function Qt(w,f,_){this.clear(),this.keyBuffer=[w||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!f,this.blockwise=!!_}Qt.prototype={setText:function(f,_,C){this.keyBuffer=[f||""],this.linewise=!!_,this.blockwise=!!C},pushText:function(f,_){_&&(this.linewise||this.keyBuffer.push(` `),this.linewise=!0),this.keyBuffer.push(f)},pushInsertModeChanges:function(f){this.insertModeChanges.push(Z(f))},pushSearchQuery:function(f){this.searchQueries.push(f)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}};function pi(w,f){var _=$.registerController.registers;if(!w||w.length!=1)throw Error("Register name must be 1 character");if(_[w])throw Error("Register already defined "+w);_[w]=f,S.push(w)}function Gi(w){this.registers=w,this.unnamedRegister=w['"']=new Qt,w["."]=new Qt,w[":"]=new Qt,w["/"]=new Qt}Gi.prototype={pushText:function(f,_,C,x,I){if(f!=="_"){x&&C.charAt(C.length-1)!==` `&&(C+=` `);var D=this.isValidRegister(f)?this.getRegister(f):null;if(!D){switch(_){case"yank":this.registers[0]=new Qt(C,x,I);break;case"delete":case"change":C.indexOf(` -`)==-1?this.registers["-"]=new Qt(C,x):(this.shiftNumericRegisters_(),this.registers[1]=new Qt(C,x));break}this.unnamedRegister.setText(C,x,I);return}var F=W(f);F?D.pushText(C,x):D.setText(C,x,I),this.unnamedRegister.setText(D.toString(),x)}},getRegister:function(f){return this.isValidRegister(f)?(f=f.toLowerCase(),this.registers[f]||(this.registers[f]=new Qt),this.registers[f]):this.unnamedRegister},isValidRegister:function(f){return f&&Ne(f,S)},shiftNumericRegisters_:function(){for(var f=9;f>=2;f--)this.registers[f]=this.getRegister(""+(f-1))}};function ai(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}ai.prototype={nextMatch:function(f,_){var C=this.historyBuffer,x=_?-1:1;this.initialPrefix===null&&(this.initialPrefix=f);for(var I=this.iterator+x;_?I>=0:I=C.length)return this.iterator=C.length,this.initialPrefix;if(I<0)return f},pushInput:function(f){var _=this.historyBuffer.indexOf(f);_>-1&&this.historyBuffer.splice(_,1),f.length&&this.historyBuffer.push(f)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var $i={matchCommand:function(f,_,C,x){var I=gne(f,_,x,C);if(!I.full&&!I.partial)return{type:"none"};if(!I.full&&I.partial)return{type:"partial"};for(var D,F=0;F"){var z=_ne(f);if(!z)return{type:"none"};C.selectedCharacter=z}return{type:"full",command:D}},processCommand:function(f,_,C){switch(_.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(f,_,C);break;case"operator":this.processOperator(f,_,C);break;case"operatorMotion":this.processOperatorMotion(f,_,C);break;case"action":this.processAction(f,_,C);break;case"search":this.processSearch(f,_,C);break;case"ex":case"keyToEx":this.processEx(f,_,C);break;default:break}},processMotion:function(f,_,C){_.inputState.motion=C.motion,_.inputState.motionArgs=fl(C.motionArgs),this.evalInput(f,_)},processOperator:function(f,_,C){var x=_.inputState;if(x.operator)if(x.operator==C.operator){x.motion="expandToLine",x.motionArgs={linewise:!0},this.evalInput(f,_);return}else Xt(f);x.operator=C.operator,x.operatorArgs=fl(C.operatorArgs),C.keys.length>1&&(x.operatorShortcut=C.keys),C.exitVisualBlock&&(_.visualBlock=!1,Vh(f)),_.visualMode&&this.evalInput(f,_)},processOperatorMotion:function(f,_,C){var x=_.visualMode,I=fl(C.operatorMotionArgs);I&&x&&I.visualLine&&(_.visualLine=!0),this.processOperator(f,_,C),x||this.processMotion(f,_,C)},processAction:function(f,_,C){var x=_.inputState,I=x.getRepeat(),D=!!I,F=fl(C.actionArgs)||{};x.selectedCharacter&&(F.selectedCharacter=x.selectedCharacter),C.operator&&this.processOperator(f,_,C),C.motion&&this.processMotion(f,_,C),(C.motion||C.operator)&&this.evalInput(f,_),F.repeat=I||1,F.repeatIsExplicit=D,F.registerName=x.registerName,Xt(f),_.lastMotion=null,C.isEdit&&this.recordLastEdit(_,x,C),jh[C.action](f,F,_)},processSearch:function(f,_,C){if(!f.getSearchCursor)return;var x=C.searchArgs.forward,I=C.searchArgs.wholeWordOnly;oa(f).setReversed(!x);var D=x?"/":"?",F=oa(f).getQuery(),B=f.getScrollInfo();function z(Ue,It,yt){$.searchHistoryController.pushInput(Ue),$.searchHistoryController.reset();try{ym(f,Ue,It,yt)}catch(Ct){Oi(f,"Invalid regex: "+Ue),Xt(f);return}$i.processMotion(f,_,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function G(Ue){f.scrollTo(B.left,B.top),z(Ue,!0,!0);var It=$.macroModeState;It.isRecording&&Zne(It,Ue)}function ee(Ue,It,yt){var Ct=ot.default.keyName(Ue),Pi,ro;Ct=="Up"||Ct=="Down"?(Pi=Ct=="Up",ro=Ue.target?Ue.target.selectionEnd:0,It=$.searchHistoryController.nextMatch(It,Pi)||"",yt(It),ro&&Ue.target&&(Ue.target.selectionEnd=Ue.target.selectionStart=Math.min(ro,Ue.target.value.length))):Ct!="Left"&&Ct!="Right"&&Ct!="Ctrl"&&Ct!="Alt"&&Ct!="Shift"&&$.searchHistoryController.reset();var hn;try{hn=ym(f,It,!0,!0)}catch(Vr){}hn?f.scrollIntoView(EN(f,!x,hn),30):(KS(f),f.scrollTo(B.left,B.top))}function ge(Ue,It,yt){var Ct=ot.default.keyName(Ue);Ct=="Esc"||Ct=="Ctrl-C"||Ct=="Ctrl-["||Ct=="Backspace"&&It==""?($.searchHistoryController.pushInput(It),$.searchHistoryController.reset(),ym(f,F),KS(f),f.scrollTo(B.left,B.top),ot.default.e_stop(Ue),Xt(f),yt(),f.focus()):Ct=="Up"||Ct=="Down"?ot.default.e_stop(Ue):Ct=="Ctrl-U"&&(ot.default.e_stop(Ue),yt(""))}switch(C.searchArgs.querySrc){case"prompt":var pe=$.macroModeState;if(pe.isPlaying){var Ge=pe.replaySearchQueries.shift();z(Ge,!0,!1)}else s_(f,{onClose:G,prefix:D,desc:"(JavaScript regexp)",onKeyUp:ee,onKeyDown:ge});break;case"wordUnderCursor":var ue=o_(f,!1,!0,!1,!0),Ve=!0;if(ue||(ue=o_(f,!1,!0,!1,!1),Ve=!1),!ue)return;var Ge=f.getLine(ue.start.line).substring(ue.start.ch,ue.end.ch);Ve&&I?Ge="\\b"+Ge+"\\b":Ge=bne(Ge),$.jumpList.cachedCursor=f.getCursor(),f.setCursor(ue.start),z(Ge,!0,!1);break}},processEx:function(f,_,C){function x(D){$.exCommandHistoryController.pushInput(D),$.exCommandHistoryController.reset(),sa.processCommand(f,D)}function I(D,F,B){var z=ot.default.keyName(D),G,ee;(z=="Esc"||z=="Ctrl-C"||z=="Ctrl-["||z=="Backspace"&&F=="")&&($.exCommandHistoryController.pushInput(F),$.exCommandHistoryController.reset(),ot.default.e_stop(D),Xt(f),B(),f.focus()),z=="Up"||z=="Down"?(ot.default.e_stop(D),G=z=="Up",ee=D.target?D.target.selectionEnd:0,F=$.exCommandHistoryController.nextMatch(F,G)||"",B(F),ee&&D.target&&(D.target.selectionEnd=D.target.selectionStart=Math.min(ee,D.target.value.length))):z=="Ctrl-U"?(ot.default.e_stop(D),B("")):z!="Left"&&z!="Right"&&z!="Ctrl"&&z!="Alt"&&z!="Shift"&&$.exCommandHistoryController.reset()}C.type=="keyToEx"?sa.processCommand(f,C.exArgs.input):_.visualMode?s_(f,{onClose:x,prefix:":",value:"'<,'>",onKeyDown:I,selectValueOnOpen:!1}):s_(f,{onClose:x,prefix:":",onKeyDown:I})},evalInput:function(f,_){var C=_.inputState,x=C.motion,I=C.motionArgs||{},D=C.operator,F=C.operatorArgs||{},B=C.registerName,z=_.sel,G=rn(_.visualMode?fr(f,z.head):f.getCursor("head")),ee=rn(_.visualMode?fr(f,z.anchor):f.getCursor("anchor")),ge=rn(G),pe=rn(ee),ue,Ve,Ge;if(D&&this.recordLastEdit(_,C),C.repeatOverride!==void 0?Ge=C.repeatOverride:Ge=C.getRepeat(),Ge>0&&I.explicitRepeat?I.repeatIsExplicit=!0:(I.noRepeat||!I.explicitRepeat&&Ge===0)&&(Ge=1,I.repeatIsExplicit=!1),C.selectedCharacter&&(I.selectedCharacter=F.selectedCharacter=C.selectedCharacter),I.repeat=Ge,Xt(f),x){var Ue=nn[x](f,G,I,_,C);if(_.lastMotion=nn[x],!Ue)return;if(I.toJumplist){var It=$.jumpList,yt=It.cachedCursor;yt?(pN(f,yt,Ue),delete It.cachedCursor):pN(f,G,Ue)}Ue instanceof Array?(Ve=Ue[0],ue=Ue[1]):ue=Ue,ue||(ue=rn(G)),_.visualMode?(_.visualBlock&&ue.ch===1/0||(ue=fr(f,ue)),Ve&&(Ve=fr(f,Ve)),Ve=Ve||pe,z.anchor=Ve,z.head=ue,Vh(f),pl(f,_,"<",An(Ve,ue)?Ve:ue),pl(f,_,">",An(Ve,ue)?ue:Ve)):D||(ue=fr(f,ue),f.setCursor(ue.line,ue.ch))}if(D){if(F.lastSel){Ve=pe;var Ct=F.lastSel,Pi=Math.abs(Ct.head.line-Ct.anchor.line),ro=Math.abs(Ct.head.ch-Ct.anchor.ch);Ct.visualLine?ue=new Fe(pe.line+Pi,pe.ch):Ct.visualBlock?ue=new Fe(pe.line+Pi,pe.ch+ro):Ct.head.line==Ct.anchor.line?ue=new Fe(pe.line,pe.ch+ro):ue=new Fe(pe.line+Pi,pe.ch),_.visualMode=!0,_.visualLine=Ct.visualLine,_.visualBlock=Ct.visualBlock,z=_.sel={anchor:Ve,head:ue},Vh(f)}else _.visualMode&&(F.lastSel={anchor:rn(z.anchor),head:rn(z.head),visualBlock:_.visualBlock,visualLine:_.visualLine});var hn,Vr,yi,Jt,pr;if(_.visualMode){if(hn=Qo(z.head,z.anchor),Vr=qd(z.head,z.anchor),yi=_.visualLine||F.linewise,Jt=_.visualBlock?"block":yi?"line":"char",pr=jS(f,{anchor:hn,head:Vr},Jt),yi){var oo=pr.ranges;if(Jt=="block")for(var Kr=0;KrB:ee.lineG&&I.line==G?vN(f,_,C,x,!0):(C.toFirstChar&&(D=ra(f.getLine(B)),x.lastHPos=D),x.lastHSPos=f.charCoords(new Fe(B,D),"div").left,new Fe(B,D))},moveByDisplayLines:function(f,_,C,x){var I=_;switch(x.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:x.lastHSPos=f.charCoords(I,"div").left}var D=C.repeat,F=f.findPosV(I,C.forward?D:-D,"line",x.lastHSPos);if(F.hitSide)if(C.forward)var B=f.charCoords(F,"div"),z={top:B.top+8,left:x.lastHSPos},F=f.coordsChar(z,"div");else{var G=f.charCoords(new Fe(f.firstLine(),0),"div");G.left=x.lastHSPos,F=f.coordsChar(G,"div")}return x.lastHPos=F.ch,F},moveByPage:function(f,_,C){var x=_,I=C.repeat;return f.findPosV(x,C.forward?I:-I,"page")},moveByParagraph:function(f,_,C){var x=C.forward?1:-1;return _N(f,_,C.repeat,x)},moveBySentence:function(f,_,C){var x=C.forward?1:-1;return Rne(f,_,C.repeat,x)},moveByScroll:function(f,_,C,x){var I=f.getScrollInfo(),B=null,D=C.repeat;D||(D=I.clientHeight/(2*f.defaultTextHeight()));var F=f.charCoords(_,"local");C.repeat=D;var B=nn.moveByDisplayLines(f,_,C,x);if(!B)return null;var z=f.charCoords(B,"local");return f.scrollTo(null,I.top+z.top-F.top),B},moveByWords:function(f,_,C){return Mne(f,_,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(f,_,C){var x=C.repeat,I=VS(f,x,C.forward,C.selectedCharacter),D=C.forward?-1:1;return mN(D,C),I?(I.ch+=D,I):null},moveToCharacter:function(f,_,C){var x=C.repeat;return mN(0,C),VS(f,x,C.forward,C.selectedCharacter)||_},moveToSymbol:function(f,_,C){var x=C.repeat;return Ane(f,x,C.forward,C.selectedCharacter)||_},moveToColumn:function(f,_,C,x){var I=C.repeat;return x.lastHPos=I-1,x.lastHSPos=f.charCoords(_,"div").left,Dne(f,I)},moveToEol:function(f,_,C,x){return vN(f,_,C,x,!1)},moveToFirstNonWhiteSpaceCharacter:function(f,_){var C=_;return new Fe(C.line,ra(f.getLine(C.line)))},moveToMatchedSymbol:function(f,_){var C=_,x=C.line,I=C.ch,D=f.getLine(x);if(I"?/[(){}[\]<>]/:/[(){}[\]]/,B=f.findMatchingBracket(new Fe(x,I),{bracketRegex:F});return B.to}else return C},moveToStartOfLine:function(f,_){return new Fe(_.line,0)},moveToLineOrEdgeOfDocument:function(f,_,C){var x=C.forward?f.lastLine():f.firstLine();return C.repeatIsExplicit&&(x=C.repeat-f.getOption("firstLineNumber")),new Fe(x,ra(f.getLine(x)))},moveToStartOfDisplayLine:function(f){return f.execCommand("goLineLeft"),f.getCursor()},moveToEndOfDisplayLine:function(f){f.execCommand("goLineRight");var _=f.getCursor();return _.sticky=="before"&&_.ch--,_},textObjectManipulation:function(f,_,C,x){var I={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},D={"'":!0,'"':!0,"`":!0},F=C.selectedCharacter;F=="b"?F="(":F=="B"&&(F="{");var B=!C.textObjectInner,z;if(I[F])z=One(f,_,F,B);else if(D[F])z=Pne(f,_,F,B);else if(F==="W")z=o_(f,B,!0,!0);else if(F==="w")z=o_(f,B,!0,!1);else if(F==="p")if(z=_N(f,_,C.repeat,0,B),C.linewise=!0,x.visualMode)x.visualLine||(x.visualLine=!0);else{var G=x.inputState.operatorArgs;G&&(G.linewise=!0),z.end.line--}else if(F==="t")z=kne(f,_,B);else return null;return f.state.vim.visualMode?wne(f,z.start,z.end):[z.start,z.end]},repeatLastCharacterSearch:function(f,_,C){var x=$.lastCharacterSearch,I=C.repeat,D=C.forward===x.forward,F=(x.increment?1:0)*(D?-1:1);f.moveH(-F,"char"),C.inclusive=!!D;var B=VS(f,I,D,x.selectedCharacter);return B?(B.ch+=F,B):(f.moveH(F,"char"),_)}};function Wh(w,f){nn[w]=f}function Kd(w,f){for(var _=[],C=0;Cf.lastLine()&&_.linewise&&!ge?f.replaceRange("",ee,B):f.replaceRange("",F,B),_.linewise&&(ge||(f.setCursor(ee),ot.default.commands.newlineAndIndent(f)),F.ch=Number.MAX_VALUE),x=F}$.registerController.pushText(_.registerName,"change",I,_.linewise,C.length>1),jh.enterInsertMode(f,{head:x},f.state.vim)},delete:function(f,_,C){f.pushUndoStop();var x,I,D=f.state.vim;if(D.visualBlock){I=f.getSelection();var z=Kd("",C.length);f.replaceSelections(z),x=Qo(C[0].head,C[0].anchor)}else{var F=C[0].anchor,B=C[0].head;_.linewise&&B.line!=f.firstLine()&&F.line==f.lastLine()&&F.line==B.line-1&&(F.line==f.firstLine()?F.ch=0:F=new Fe(F.line-1,Bn(f,F.line-1))),I=f.getRange(F,B),f.replaceRange("",F,B),x=F,_.linewise&&(x=nn.moveToFirstNonWhiteSpaceCharacter(f,F))}return $.registerController.pushText(_.registerName,"delete",I,_.linewise,D.visualBlock),fr(f,x)},indent:function(f,_,C){var x=f.state.vim,I=C[0].anchor.line,D=x.visualBlock?C[C.length-1].anchor.line:C[0].head.line,F=x.visualMode?_.repeat:1;_.linewise&&D--,f.pushUndoStop();for(var B=I;B<=D;B++)for(var z=0;zG.top?(z.line+=(B-G.top)/I,z.line=Math.ceil(z.line),f.setCursor(z),G=f.charCoords(z,"local"),f.scrollTo(null,G.top)):f.scrollTo(null,B);else{var ee=B+f.getScrollInfo().clientHeight;ee=I.anchor.line?D=Hn(I.head,0,1):D=new Fe(I.anchor.line,0)}else if(x=="inplace"){if(C.visualMode)return}else x=="lastEdit"&&(D=kN(f)||D);f.setOption("disableInput",!1),_&&_.replace?(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),ot.default.signal(f,"vim-mode-change",{mode:"replace"})):(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),ot.default.signal(f,"vim-mode-change",{mode:"insert"})),$.macroModeState.isPlaying||(f.on("change",MN),ot.default.on(f.getInputField(),"keydown",NN)),C.visualMode&&na(f),hN(f,D,F)}},toggleVisualMode:function(f,_,C){var x=_.repeat,I=f.getCursor(),D;C.visualMode?C.visualLine^_.linewise||C.visualBlock^_.blockwise?(C.visualLine=!!_.linewise,C.visualBlock=!!_.blockwise,ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Vh(f)):na(f):(C.visualMode=!0,C.visualLine=!!_.linewise,C.visualBlock=!!_.blockwise,D=fr(f,new Fe(I.line,I.ch+x-1)),C.sel={anchor:I,head:D},ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Vh(f),pl(f,C,"<",Qo(I,D)),pl(f,C,">",qd(I,D)))},reselectLastSelection:function(f,_,C){var x=C.lastSelection;if(C.visualMode&&fN(f,C),x){var I=x.anchorMark.find(),D=x.headMark.find();if(!I||!D)return;C.sel={anchor:I,head:D},C.visualMode=!0,C.visualLine=x.visualLine,C.visualBlock=x.visualBlock,Vh(f),pl(f,C,"<",Qo(I,D)),pl(f,C,">",qd(I,D)),ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(f,_,C){var x,I;if(C.visualMode){if(x=f.getCursor("anchor"),I=f.getCursor("head"),An(I,x)){var D=I;I=x,x=D}I.ch=Bn(f,I.line)-1}else{var F=Math.max(_.repeat,2);x=f.getCursor(),I=fr(f,new Fe(x.line+F-1,1/0))}for(var B=0,z=x.line;z=2;f--)this.registers[f]=this.getRegister(""+(f-1))}};function ai(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}ai.prototype={nextMatch:function(f,_){var C=this.historyBuffer,x=_?-1:1;this.initialPrefix===null&&(this.initialPrefix=f);for(var I=this.iterator+x;_?I>=0:I=C.length)return this.iterator=C.length,this.initialPrefix;if(I<0)return f},pushInput:function(f){var _=this.historyBuffer.indexOf(f);_>-1&&this.historyBuffer.splice(_,1),f.length&&this.historyBuffer.push(f)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var $i={matchCommand:function(f,_,C,x){var I=vne(f,_,x,C);if(!I.full&&!I.partial)return{type:"none"};if(!I.full&&I.partial)return{type:"partial"};for(var D,F=0;F"){var z=bne(f);if(!z)return{type:"none"};C.selectedCharacter=z}return{type:"full",command:D}},processCommand:function(f,_,C){switch(_.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(f,_,C);break;case"operator":this.processOperator(f,_,C);break;case"operatorMotion":this.processOperatorMotion(f,_,C);break;case"action":this.processAction(f,_,C);break;case"search":this.processSearch(f,_,C);break;case"ex":case"keyToEx":this.processEx(f,_,C);break;default:break}},processMotion:function(f,_,C){_.inputState.motion=C.motion,_.inputState.motionArgs=fl(C.motionArgs),this.evalInput(f,_)},processOperator:function(f,_,C){var x=_.inputState;if(x.operator)if(x.operator==C.operator){x.motion="expandToLine",x.motionArgs={linewise:!0},this.evalInput(f,_);return}else Xt(f);x.operator=C.operator,x.operatorArgs=fl(C.operatorArgs),C.keys.length>1&&(x.operatorShortcut=C.keys),C.exitVisualBlock&&(_.visualBlock=!1,Vh(f)),_.visualMode&&this.evalInput(f,_)},processOperatorMotion:function(f,_,C){var x=_.visualMode,I=fl(C.operatorMotionArgs);I&&x&&I.visualLine&&(_.visualLine=!0),this.processOperator(f,_,C),x||this.processMotion(f,_,C)},processAction:function(f,_,C){var x=_.inputState,I=x.getRepeat(),D=!!I,F=fl(C.actionArgs)||{};x.selectedCharacter&&(F.selectedCharacter=x.selectedCharacter),C.operator&&this.processOperator(f,_,C),C.motion&&this.processMotion(f,_,C),(C.motion||C.operator)&&this.evalInput(f,_),F.repeat=I||1,F.repeatIsExplicit=D,F.registerName=x.registerName,Xt(f),_.lastMotion=null,C.isEdit&&this.recordLastEdit(_,x,C),jh[C.action](f,F,_)},processSearch:function(f,_,C){if(!f.getSearchCursor)return;var x=C.searchArgs.forward,I=C.searchArgs.wholeWordOnly;oa(f).setReversed(!x);var D=x?"/":"?",F=oa(f).getQuery(),B=f.getScrollInfo();function z(Ue,It,yt){$.searchHistoryController.pushInput(Ue),$.searchHistoryController.reset();try{bm(f,Ue,It,yt)}catch(Ct){Pi(f,"Invalid regex: "+Ue),Xt(f);return}$i.processMotion(f,_,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function G(Ue){f.scrollTo(B.left,B.top),z(Ue,!0,!0);var It=$.macroModeState;It.isRecording&&ere(It,Ue)}function ee(Ue,It,yt){var Ct=ot.default.keyName(Ue),Fi,ro;Ct=="Up"||Ct=="Down"?(Fi=Ct=="Up",ro=Ue.target?Ue.target.selectionEnd:0,It=$.searchHistoryController.nextMatch(It,Fi)||"",yt(It),ro&&Ue.target&&(Ue.target.selectionEnd=Ue.target.selectionStart=Math.min(ro,Ue.target.value.length))):Ct!="Left"&&Ct!="Right"&&Ct!="Ctrl"&&Ct!="Alt"&&Ct!="Shift"&&$.searchHistoryController.reset();var hn;try{hn=bm(f,It,!0,!0)}catch(Vr){}hn?f.scrollIntoView(wN(f,!x,hn),30):(VS(f),f.scrollTo(B.left,B.top))}function ve(Ue,It,yt){var Ct=ot.default.keyName(Ue);Ct=="Esc"||Ct=="Ctrl-C"||Ct=="Ctrl-["||Ct=="Backspace"&&It==""?($.searchHistoryController.pushInput(It),$.searchHistoryController.reset(),bm(f,F),VS(f),f.scrollTo(B.left,B.top),ot.default.e_stop(Ue),Xt(f),yt(),f.focus()):Ct=="Up"||Ct=="Down"?ot.default.e_stop(Ue):Ct=="Ctrl-U"&&(ot.default.e_stop(Ue),yt(""))}switch(C.searchArgs.querySrc){case"prompt":var pe=$.macroModeState;if(pe.isPlaying){var Ge=pe.replaySearchQueries.shift();z(Ge,!0,!1)}else o_(f,{onClose:G,prefix:D,desc:"(JavaScript regexp)",onKeyUp:ee,onKeyDown:ve});break;case"wordUnderCursor":var ue=r_(f,!1,!0,!1,!0),Ve=!0;if(ue||(ue=r_(f,!1,!0,!1,!1),Ve=!1),!ue)return;var Ge=f.getLine(ue.start.line).substring(ue.start.ch,ue.end.ch);Ve&&I?Ge="\\b"+Ge+"\\b":Ge=yne(Ge),$.jumpList.cachedCursor=f.getCursor(),f.setCursor(ue.start),z(Ge,!0,!1);break}},processEx:function(f,_,C){function x(D){$.exCommandHistoryController.pushInput(D),$.exCommandHistoryController.reset(),sa.processCommand(f,D)}function I(D,F,B){var z=ot.default.keyName(D),G,ee;(z=="Esc"||z=="Ctrl-C"||z=="Ctrl-["||z=="Backspace"&&F=="")&&($.exCommandHistoryController.pushInput(F),$.exCommandHistoryController.reset(),ot.default.e_stop(D),Xt(f),B(),f.focus()),z=="Up"||z=="Down"?(ot.default.e_stop(D),G=z=="Up",ee=D.target?D.target.selectionEnd:0,F=$.exCommandHistoryController.nextMatch(F,G)||"",B(F),ee&&D.target&&(D.target.selectionEnd=D.target.selectionStart=Math.min(ee,D.target.value.length))):z=="Ctrl-U"?(ot.default.e_stop(D),B("")):z!="Left"&&z!="Right"&&z!="Ctrl"&&z!="Alt"&&z!="Shift"&&$.exCommandHistoryController.reset()}C.type=="keyToEx"?sa.processCommand(f,C.exArgs.input):_.visualMode?o_(f,{onClose:x,prefix:":",value:"'<,'>",onKeyDown:I,selectValueOnOpen:!1}):o_(f,{onClose:x,prefix:":",onKeyDown:I})},evalInput:function(f,_){var C=_.inputState,x=C.motion,I=C.motionArgs||{},D=C.operator,F=C.operatorArgs||{},B=C.registerName,z=_.sel,G=rn(_.visualMode?fr(f,z.head):f.getCursor("head")),ee=rn(_.visualMode?fr(f,z.anchor):f.getCursor("anchor")),ve=rn(G),pe=rn(ee),ue,Ve,Ge;if(D&&this.recordLastEdit(_,C),C.repeatOverride!==void 0?Ge=C.repeatOverride:Ge=C.getRepeat(),Ge>0&&I.explicitRepeat?I.repeatIsExplicit=!0:(I.noRepeat||!I.explicitRepeat&&Ge===0)&&(Ge=1,I.repeatIsExplicit=!1),C.selectedCharacter&&(I.selectedCharacter=F.selectedCharacter=C.selectedCharacter),I.repeat=Ge,Xt(f),x){var Ue=nn[x](f,G,I,_,C);if(_.lastMotion=nn[x],!Ue)return;if(I.toJumplist){var It=$.jumpList,yt=It.cachedCursor;yt?(hN(f,yt,Ue),delete It.cachedCursor):hN(f,G,Ue)}Ue instanceof Array?(Ve=Ue[0],ue=Ue[1]):ue=Ue,ue||(ue=rn(G)),_.visualMode?(_.visualBlock&&ue.ch===1/0||(ue=fr(f,ue)),Ve&&(Ve=fr(f,Ve)),Ve=Ve||pe,z.anchor=Ve,z.head=ue,Vh(f),pl(f,_,"<",An(Ve,ue)?Ve:ue),pl(f,_,">",An(Ve,ue)?ue:Ve)):D||(ue=fr(f,ue),f.setCursor(ue.line,ue.ch))}if(D){if(F.lastSel){Ve=pe;var Ct=F.lastSel,Fi=Math.abs(Ct.head.line-Ct.anchor.line),ro=Math.abs(Ct.head.ch-Ct.anchor.ch);Ct.visualLine?ue=new Fe(pe.line+Fi,pe.ch):Ct.visualBlock?ue=new Fe(pe.line+Fi,pe.ch+ro):Ct.head.line==Ct.anchor.line?ue=new Fe(pe.line,pe.ch+ro):ue=new Fe(pe.line+Fi,pe.ch),_.visualMode=!0,_.visualLine=Ct.visualLine,_.visualBlock=Ct.visualBlock,z=_.sel={anchor:Ve,head:ue},Vh(f)}else _.visualMode&&(F.lastSel={anchor:rn(z.anchor),head:rn(z.head),visualBlock:_.visualBlock,visualLine:_.visualLine});var hn,Vr,Ci,Jt,pr;if(_.visualMode){if(hn=Jo(z.head,z.anchor),Vr=Gd(z.head,z.anchor),Ci=_.visualLine||F.linewise,Jt=_.visualBlock?"block":Ci?"line":"char",pr=WS(f,{anchor:hn,head:Vr},Jt),Ci){var oo=pr.ranges;if(Jt=="block")for(var Kr=0;KrB:ee.lineG&&I.line==G?mN(f,_,C,x,!0):(C.toFirstChar&&(D=ra(f.getLine(B)),x.lastHPos=D),x.lastHSPos=f.charCoords(new Fe(B,D),"div").left,new Fe(B,D))},moveByDisplayLines:function(f,_,C,x){var I=_;switch(x.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:x.lastHSPos=f.charCoords(I,"div").left}var D=C.repeat,F=f.findPosV(I,C.forward?D:-D,"line",x.lastHSPos);if(F.hitSide)if(C.forward)var B=f.charCoords(F,"div"),z={top:B.top+8,left:x.lastHSPos},F=f.coordsChar(z,"div");else{var G=f.charCoords(new Fe(f.firstLine(),0),"div");G.left=x.lastHSPos,F=f.coordsChar(G,"div")}return x.lastHPos=F.ch,F},moveByPage:function(f,_,C){var x=_,I=C.repeat;return f.findPosV(x,C.forward?I:-I,"page")},moveByParagraph:function(f,_,C){var x=C.forward?1:-1;return gN(f,_,C.repeat,x)},moveBySentence:function(f,_,C){var x=C.forward?1:-1;return One(f,_,C.repeat,x)},moveByScroll:function(f,_,C,x){var I=f.getScrollInfo(),B=null,D=C.repeat;D||(D=I.clientHeight/(2*f.defaultTextHeight()));var F=f.charCoords(_,"local");C.repeat=D;var B=nn.moveByDisplayLines(f,_,C,x);if(!B)return null;var z=f.charCoords(B,"local");return f.scrollTo(null,I.top+z.top-F.top),B},moveByWords:function(f,_,C){return Dne(f,_,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(f,_,C){var x=C.repeat,I=jS(f,x,C.forward,C.selectedCharacter),D=C.forward?-1:1;return fN(D,C),I?(I.ch+=D,I):null},moveToCharacter:function(f,_,C){var x=C.repeat;return fN(0,C),jS(f,x,C.forward,C.selectedCharacter)||_},moveToSymbol:function(f,_,C){var x=C.repeat;return Lne(f,x,C.forward,C.selectedCharacter)||_},moveToColumn:function(f,_,C,x){var I=C.repeat;return x.lastHPos=I-1,x.lastHSPos=f.charCoords(_,"div").left,Nne(f,I)},moveToEol:function(f,_,C,x){return mN(f,_,C,x,!1)},moveToFirstNonWhiteSpaceCharacter:function(f,_){var C=_;return new Fe(C.line,ra(f.getLine(C.line)))},moveToMatchedSymbol:function(f,_){var C=_,x=C.line,I=C.ch,D=f.getLine(x);if(I"?/[(){}[\]<>]/:/[(){}[\]]/,B=f.findMatchingBracket(new Fe(x,I),{bracketRegex:F});return B.to}else return C},moveToStartOfLine:function(f,_){return new Fe(_.line,0)},moveToLineOrEdgeOfDocument:function(f,_,C){var x=C.forward?f.lastLine():f.firstLine();return C.repeatIsExplicit&&(x=C.repeat-f.getOption("firstLineNumber")),new Fe(x,ra(f.getLine(x)))},moveToStartOfDisplayLine:function(f){return f.execCommand("goLineLeft"),f.getCursor()},moveToEndOfDisplayLine:function(f){f.execCommand("goLineRight");var _=f.getCursor();return _.sticky=="before"&&_.ch--,_},textObjectManipulation:function(f,_,C,x){var I={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},D={"'":!0,'"':!0,"`":!0},F=C.selectedCharacter;F=="b"?F="(":F=="B"&&(F="{");var B=!C.textObjectInner,z;if(I[F])z=Pne(f,_,F,B);else if(D[F])z=Fne(f,_,F,B);else if(F==="W")z=r_(f,B,!0,!0);else if(F==="w")z=r_(f,B,!0,!1);else if(F==="p")if(z=gN(f,_,C.repeat,0,B),C.linewise=!0,x.visualMode)x.visualLine||(x.visualLine=!0);else{var G=x.inputState.operatorArgs;G&&(G.linewise=!0),z.end.line--}else if(F==="t")z=Ine(f,_,B);else return null;return f.state.vim.visualMode?xne(f,z.start,z.end):[z.start,z.end]},repeatLastCharacterSearch:function(f,_,C){var x=$.lastCharacterSearch,I=C.repeat,D=C.forward===x.forward,F=(x.increment?1:0)*(D?-1:1);f.moveH(-F,"char"),C.inclusive=!!D;var B=jS(f,I,D,x.selectedCharacter);return B?(B.ch+=F,B):(f.moveH(F,"char"),_)}};function Wh(w,f){nn[w]=f}function qd(w,f){for(var _=[],C=0;Cf.lastLine()&&_.linewise&&!ve?f.replaceRange("",ee,B):f.replaceRange("",F,B),_.linewise&&(ve||(f.setCursor(ee),ot.default.commands.newlineAndIndent(f)),F.ch=Number.MAX_VALUE),x=F}$.registerController.pushText(_.registerName,"change",I,_.linewise,C.length>1),jh.enterInsertMode(f,{head:x},f.state.vim)},delete:function(f,_,C){f.pushUndoStop();var x,I,D=f.state.vim;if(D.visualBlock){I=f.getSelection();var z=qd("",C.length);f.replaceSelections(z),x=Jo(C[0].head,C[0].anchor)}else{var F=C[0].anchor,B=C[0].head;_.linewise&&B.line!=f.firstLine()&&F.line==f.lastLine()&&F.line==B.line-1&&(F.line==f.firstLine()?F.ch=0:F=new Fe(F.line-1,Bn(f,F.line-1))),I=f.getRange(F,B),f.replaceRange("",F,B),x=F,_.linewise&&(x=nn.moveToFirstNonWhiteSpaceCharacter(f,F))}return $.registerController.pushText(_.registerName,"delete",I,_.linewise,D.visualBlock),fr(f,x)},indent:function(f,_,C){var x=f.state.vim,I=C[0].anchor.line,D=x.visualBlock?C[C.length-1].anchor.line:C[0].head.line,F=x.visualMode?_.repeat:1;_.linewise&&D--,f.pushUndoStop();for(var B=I;B<=D;B++)for(var z=0;zG.top?(z.line+=(B-G.top)/I,z.line=Math.ceil(z.line),f.setCursor(z),G=f.charCoords(z,"local"),f.scrollTo(null,G.top)):f.scrollTo(null,B);else{var ee=B+f.getScrollInfo().clientHeight;ee=I.anchor.line?D=Hn(I.head,0,1):D=new Fe(I.anchor.line,0)}else if(x=="inplace"){if(C.visualMode)return}else x=="lastEdit"&&(D=EN(f)||D);f.setOption("disableInput",!1),_&&_.replace?(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),ot.default.signal(f,"vim-mode-change",{mode:"replace"})):(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),ot.default.signal(f,"vim-mode-change",{mode:"insert"})),$.macroModeState.isPlaying||(f.on("change",AN),ot.default.on(f.getInputField(),"keydown",MN)),C.visualMode&&na(f),dN(f,D,F)}},toggleVisualMode:function(f,_,C){var x=_.repeat,I=f.getCursor(),D;C.visualMode?C.visualLine^_.linewise||C.visualBlock^_.blockwise?(C.visualLine=!!_.linewise,C.visualBlock=!!_.blockwise,ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Vh(f)):na(f):(C.visualMode=!0,C.visualLine=!!_.linewise,C.visualBlock=!!_.blockwise,D=fr(f,new Fe(I.line,I.ch+x-1)),C.sel={anchor:I,head:D},ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Vh(f),pl(f,C,"<",Jo(I,D)),pl(f,C,">",Gd(I,D)))},reselectLastSelection:function(f,_,C){var x=C.lastSelection;if(C.visualMode&&uN(f,C),x){var I=x.anchorMark.find(),D=x.headMark.find();if(!I||!D)return;C.sel={anchor:I,head:D},C.visualMode=!0,C.visualLine=x.visualLine,C.visualBlock=x.visualBlock,Vh(f),pl(f,C,"<",Jo(I,D)),pl(f,C,">",Gd(I,D)),ot.default.signal(f,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(f,_,C){var x,I;if(C.visualMode){if(x=f.getCursor("anchor"),I=f.getCursor("head"),An(I,x)){var D=I;I=x,x=D}I.ch=Bn(f,I.line)-1}else{var F=Math.max(_.repeat,2);x=f.getCursor(),I=fr(f,new Fe(x.line+F-1,1/0))}for(var B=0,z=x.line;z1)var D=Array(_.repeat+1).join(D);var ue=I.linewise,Ve=I.blockwise;if(Ve){D=D.split(` `),ue&&D.pop();for(var Ge=0;Gef.lastLine()&&f.replaceRange(` -`,new Fe(Jt,0));var pr=Bn(f,Jt);prz.length&&(D=z.length),F=new Fe(I.line,D)}if(x==` +`+D.slice(0,D.length-1),x.ch=Bn(f,x.line)):x.ch=0:x.ch+=_.after?1:0;var Ue,It;if(C.visualMode){C.lastPastedText=D;var yt,Ct=wne(f,C),Fi=Ct[0],ro=Ct[1],hn=f.getSelection(),Vr=f.listSelections(),Ci=new Array(Vr.length).join("1").split("1");C.lastSelection&&(yt=C.lastSelection.headMark.find()),$.registerController.unnamedRegister.setText(hn),Ve?(f.replaceSelections(Ci),ro=new Fe(Fi.line+D.length-1,Fi.ch),f.setCursor(Fi),cN(f,ro),f.replaceSelections(D),Ue=Fi):C.visualBlock?(f.replaceSelections(Ci),f.setCursor(Fi),f.replaceRange(D,Fi,Fi),Ue=Fi):(f.replaceRange(D,Fi,ro),Ue=f.posFromIndex(f.indexFromPos(Fi)+D.length-1)),yt&&(C.lastSelection.headMark=f.setBookmark(yt)),ue&&(Ue.ch=0)}else if(Ve){f.setCursor(x);for(var Ge=0;Gef.lastLine()&&f.replaceRange(` +`,new Fe(Jt,0));var pr=Bn(f,Jt);prz.length&&(D=z.length),F=new Fe(I.line,D)}if(x==` `)C.visualMode||f.replaceRange("",I,F),(ot.default.commands.newlineAndIndentContinueComment||ot.default.commands.newlineAndIndent)(f);else{var G=f.getRange(I,F);if(G=G.replace(/[^\n]/g,x),C.visualBlock){var ee=new Array(f.getOption("tabSize")+1).join(" ");G=f.getSelection(),G=G.replace(/\t/g,ee).replace(/[^\n]/g,x).split(` -`),f.replaceSelections(G)}else f.replaceRange(G,I,F);C.visualMode?(I=An(B[0].anchor,B[0].head)?B[0].anchor:B[0].head,f.setCursor(I),na(f,!1)):f.setCursor(Hn(F,0,-1))}},incrementNumberToken:function(f,_){for(var C=f.getCursor(),x=f.getLine(C.line),I=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,D,F,B,z;(D=I.exec(x))!==null&&(F=D.index,B=F+D[0].length,!(C.ch"){var _=f.length-11,C=w.slice(0,_),x=f.slice(0,_);return C==x&&w.length>_?"full":x.indexOf(C)==0?"partial":!1}else return w==f?"full":f.indexOf(w)==0?"partial":!1}function _ne(w){var f=/^.*(<[^>]+>)$/.exec(w),_=f?f[1]:w.slice(-1);if(_.length>1)switch(_){case"":_=` -`;break;case"":_=" ";break;default:_="";break}return _}function cN(w,f,_){return function(){for(var C=0;C<_;C++)f(w)}}function rn(w){return new Fe(w.line,w.ch)}function Xo(w,f){return w.ch==f.ch&&w.line==f.line}function An(w,f){return w.line2&&(f=Qo.apply(void 0,Array.prototype.slice.call(arguments,1))),An(w,f)?w:f}function qd(w,f){return arguments.length>2&&(f=qd.apply(void 0,Array.prototype.slice.call(arguments,1))),An(w,f)?f:w}function dN(w,f,_){var C=An(w,f),x=An(f,_);return C&&x}function Bn(w,f){return w.getLine(f).length}function WS(w){return w.trim?w.trim():w.replace(/^\s+|\s+$/g,"")}function bne(w){return w.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function yne(w,f,_){var C=Bn(w,f),x=new Array(_-C+1).join(" ");w.setCursor(new Fe(f,C)),w.replaceRange(x,w.getCursor())}function uN(w,f){var _=[],C=w.listSelections(),x=rn(w.clipPos(f)),I=!Xo(f,x),D=w.getCursor("head"),F=Cne(C,D),B=Xo(C[F].head,C[F].anchor),z=C.length-1,G=z-F>F?z:0,ee=C[G].anchor,ge=Math.min(ee.line,x.line),pe=Math.max(ee.line,x.line),ue=ee.ch,Ve=x.ch,Ge=C[G].head.ch-ue,Ue=Ve-ue;Ge>0&&Ue<=0?(ue++,I||Ve--):Ge<0&&Ue>=0?(ue--,B||Ve++):Ge<0&&Ue==-1&&(ue--,Ve++);for(var It=ge;It<=pe;It++){var yt={anchor:new Fe(It,ue),head:new Fe(It,Ve)};_.push(yt)}return w.setSelections(_),f.ch=Ve,ee.ch=ue,ee}function hN(w,f,_){for(var C=[],x=0;x<_;x++){var I=Hn(f,x,0);C.push({anchor:I,head:I})}w.setSelections(C,0)}function Cne(w,f,_){for(var C=0;CB&&(x.line=B),x.ch=Bn(w,x.line)}return{ranges:[{anchor:I,head:x}],primary:0}}else if(_=="block"){var z=Math.min(I.line,x.line),G=I.ch,ee=Math.max(I.line,x.line),ge=x.ch;G0&&I&&re(I);I=x.pop())_.line--,_.ch=0;I?(_.line--,_.ch=Bn(w,_.line)):_.ch=0}}function Tne(w,f,_){f.ch=0,_.ch=0,_.line++}function ra(w){if(!w)return 0;var f=w.search(/\S/);return f==-1?w.length:f}function o_(w,f,_,C,x){for(var I=xne(w),D=w.getLine(I.line),F=I.ch,B=x?d[0]:u[0];!B(D.charAt(F));)if(F++,F>=D.length)return null;C?B=u[0]:(B=d[0],B(D.charAt(F))||(B=d[1]));for(var z=F,G=F;B(D.charAt(z))&&z=0;)G--;if(G++,f){for(var ee=z;/\s/.test(D.charAt(z))&&z0;)G--;G||(G=ge)}}return{start:new Fe(I.line,G),end:new Fe(I.line,z)}}function kne(w,f,_){var C=f;if(!ot.default.findMatchingTag||!ot.default.findEnclosingTag)return{start:C,end:C};var x=ot.default.findMatchingTag(w,f)||ot.default.findEnclosingTag(w,f);return!x||!x.open||!x.close?{start:C,end:C}:_?{start:x.open.from,end:x.close.to}:{start:x.open.to,end:x.close.from}}function pN(w,f,_){Xo(f,_)||$.jumpList.add(w,f,_)}function mN(w,f){$.lastCharacterSearch.increment=w,$.lastCharacterSearch.forward=f.forward,$.lastCharacterSearch.selectedCharacter=f.selectedCharacter}var Ine={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},gN={bracket:{isComplete:function(f){if(f.nextCh===f.symb){if(f.depth++,f.depth>=1)return!0}else f.nextCh===f.reverseSymb&&f.depth--;return!1}},section:{init:function(f){f.curMoveThrough=!0,f.symb=(f.forward?"]":"[")===f.symb?"{":"}"},isComplete:function(f){return f.index===0&&f.nextCh===f.symb}},comment:{isComplete:function(f){var _=f.lastCh==="*"&&f.nextCh==="/";return f.lastCh=f.nextCh,_}},method:{init:function(f){f.symb=f.symb==="m"?"{":"}",f.reverseSymb=f.symb==="{"?"}":"{"},isComplete:function(f){return f.nextCh===f.symb}},preprocess:{init:function(f){f.index=0},isComplete:function(f){if(f.nextCh==="#"){var _=f.lineText.match(/^#(\w+)/)[1];if(_==="endif"){if(f.forward&&f.depth===0)return!0;f.depth++}else if(_==="if"){if(!f.forward&&f.depth===0)return!0;f.depth--}if(_==="else"&&f.depth===0)return!0}return!1}}};function Ane(w,f,_,C){var x=rn(w.getCursor()),I=_?1:-1,D=_?w.lineCount():-1,F=x.ch,B=x.line,z=w.getLine(B),G={lineText:z,nextCh:z.charAt(F),lastCh:null,index:F,symb:C,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[C],forward:_,depth:0,curMoveThrough:!1},ee=Ine[C];if(!ee)return x;var ge=gN[ee].init,pe=gN[ee].isComplete;for(ge&&ge(G);B!==D&&f;){if(G.index+=I,G.nextCh=G.lineText.charAt(G.index),!G.nextCh){if(B+=I,G.lineText=w.getLine(B)||"",I>0)G.index=0;else{var ue=G.lineText.length;G.index=ue>0?ue-1:0}G.nextCh=G.lineText.charAt(G.index)}pe(G)&&(x.line=B,x.ch=G.index,f--)}return G.nextCh||G.curMoveThrough?new Fe(B,G.index):x}function Lne(w,f,_,C,x){var I=f.line,D=f.ch,F=w.getLine(I),B=_?1:-1,z=C?u:d;if(x&&F==""){if(I+=B,F=w.getLine(I),!N(w,I))return null;D=_?0:F.length}for(;;){if(x&&F=="")return{from:0,to:0,line:I};for(var G=B>0?F.length:-1,ee=G,ge=G;D!=G;){for(var pe=!1,ue=0;ue0?0:F.length}}function Mne(w,f,_,C,x,I){var D=rn(f),F=[];(C&&!x||!C&&x)&&_++;for(var B=!(C&&x),z=0;z<_;z++){var G=Lne(w,f,C,I,B);if(!G){var ee=Bn(w,w.lastLine());F.push(C?{line:w.lastLine(),from:ee,to:ee}:{line:0,from:0,to:0});break}F.push(G),f=new Fe(G.line,C?G.to-1:G.from)}var ge=F.length!=_,pe=F[0],ue=F.pop();return C&&!x?(!ge&&(pe.from!=D.ch||pe.line!=D.line)&&(ue=F.pop()),new Fe(ue.line,ue.from)):C&&x?new Fe(ue.line,ue.to-1):!C&&x?(!ge&&(pe.to!=D.ch||pe.line!=D.line)&&(ue=F.pop()),new Fe(ue.line,ue.to)):new Fe(ue.line,ue.from)}function vN(w,f,_,C,x){var I=f,D=new Fe(I.line+_.repeat-1,1/0),F=w.clipPos(D);return F.ch--,x||(C.lastHPos=1/0,C.lastHSPos=w.charCoords(F,"div").left),D}function VS(w,f,_,C){for(var x=w.getCursor(),I=x.ch,D,F=0;F0;)ge(G,C)&&_--,G+=C;return new Fe(G,0)}var pe=w.state.vim;if(pe.visualLine&&ge(I,1,!0)){var ue=pe.sel.anchor;ge(ue.line,-1,!0)&&(!x||ue.line!=I)&&(I+=1)}var Ve=ee(I);for(G=I;G<=F&&_;G++)ge(G,1,!0)&&(!x||ee(G)!=Ve)&&_--;for(z=new Fe(G,0),G>F&&!Ve?Ve=!0:x=!1,G=I;G>D&&!((!x||ee(G)==Ve||G==I)&&ge(G,-1,!0));G--);return B=new Fe(G,0),{start:B,end:z}}function Rne(w,f,_,C){function x(B,z){if(z.pos+z.dir<0||z.pos+z.dir>=z.line.length){if(z.ln+=z.dir,!N(B,z.ln)){z.line=null,z.ln=null,z.pos=null;return}z.line=B.getLine(z.ln),z.pos=z.dir>0?0:z.line.length-1}else z.pos+=z.dir}function I(B,z,G,ee){var Ge=B.getLine(z),ge=Ge==="",pe={line:Ge,ln:z,pos:G,dir:ee},ue={ln:pe.ln,pos:pe.pos},Ve=pe.line==="";for(x(B,pe);pe.line!==null;){if(ue.ln=pe.ln,ue.pos=pe.pos,pe.line===""&&!Ve)return{ln:pe.ln,pos:pe.pos};if(ge&&pe.line!==""&&!re(pe.line[pe.pos]))return{ln:pe.ln,pos:pe.pos};ae(pe.line[pe.pos])&&!ge&&(pe.pos===pe.line.length-1||re(pe.line[pe.pos+1]))&&(ge=!0),x(B,pe)}var Ge=B.getLine(ue.ln);ue.pos=0;for(var Ue=Ge.length-1;Ue>=0;--Ue)if(!re(Ge[Ue])){ue.pos=Ue;break}return ue}function D(B,z,G,ee){var Ve=B.getLine(z),ge={line:Ve,ln:z,pos:G,dir:ee},pe={ln:ge.ln,pos:null},ue=ge.line==="";for(x(B,ge);ge.line!==null;){if(ge.line===""&&!ue)return pe.pos!==null?pe:{ln:ge.ln,pos:ge.pos};if(ae(ge.line[ge.pos])&&pe.pos!==null&&!(ge.ln===pe.ln&&ge.pos+1===pe.pos))return pe;ge.line!==""&&!re(ge.line[ge.pos])&&(ue=!1,pe={ln:ge.ln,pos:ge.pos}),x(B,ge)}var Ve=B.getLine(pe.ln);pe.pos=0;for(var Ge=0;Ge0;)C<0?F=D(w,F.ln,F.pos,C):F=I(w,F.ln,F.pos,C),_--;return new Fe(F.ln,F.pos)}function One(w,f,_,C){var x=f,I,D,F={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],B={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],z=w.getLine(x.line).charAt(x.ch),G=z===B?1:0;if(I=w.scanForBracket(new Fe(x.line,x.ch+G),-1,void 0,{bracketRegex:F}),D=w.scanForBracket(new Fe(x.line,x.ch+G),1,void 0,{bracketRegex:F}),!I||!D)return{start:x,end:x};if(I=I.pos,D=D.pos,I.line==D.line&&I.ch>D.ch||I.line>D.line){var ee=I;I=D,D=ee}return C?D.ch+=1:I.ch+=1,{start:I,end:D}}function Pne(w,f,_,C){var x=rn(f),I=w.getLine(x.line),D=I.split(""),F,B,z,G,ee=D.indexOf(_);if(x.ch-1&&!F;z--)D[z]==_&&(F=z+1);if(F&&!B)for(z=F,G=D.length;z=f&&w<=_:w==f}function qS(w){var f=w.getScrollInfo(),_=6,C=10,x=w.coordsChar({left:0,top:_+f.top},"local"),I=f.clientHeight-C+f.top,D=w.coordsChar({left:0,top:I},"local");return{top:x.line,bottom:D.line}}function TN(w,f,_){if(_=="'"||_=="`")return $.jumpList.find(w,-1)||new Fe(0,0);if(_==".")return kN(w);var C=f.marks[_];return C&&C.find()}function kN(w){for(var f=w.doc.history.done,_=f.length;_--;)if(f[_].changes)return rn(f[_].changes[0].to)}var IN=function(){this.buildCommandMap_()};IN.prototype={processCommand:function(f,_,C){var x=this;f.operation(function(){f.curOp.isVimOp=!0,x._processCommand(f,_,C)})},_processCommand:function(f,_,C){var x=f.state.vim,I=$.registerController.getRegister(":"),D=I.toString();x.visualMode&&na(f);var F=new ot.default.StringStream(_);I.setText(_);var B=C||{};B.input=_;try{this.parseInput_(f,F,B)}catch(ge){throw Oi(f,ge.toString()),ge}var z,G;if(!B.commandName)B.line!==void 0&&(G="move");else if(z=this.matchCommand_(B.commandName),z){if(G=z.name,z.excludeFromCommandHistory&&I.setText(D),this.parseCommandArgs_(F,B,z),z.type=="exToKey"){for(var ee=0;ee@~])/);return x?C.commandName=x[1]:C.commandName=_.match(/.*/)[0],C},parseLineSpec_:function(f,_){var C=_.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(_.next()){case".":return this.parseLineSpecOffset_(_,f.getCursor().line);case"$":return this.parseLineSpecOffset_(_,f.lastLine());case"'":var x=_.next(),I=TN(f,f.state.vim,x);if(!I)throw new Error("Mark not set");return this.parseLineSpecOffset_(_,I.line);case"-":case"+":return _.backUp(1),this.parseLineSpecOffset_(_,f.getCursor().line);default:_.backUp(1);return}},parseLineSpecOffset_:function(f,_){var C=f.match(/^([+-])?(\d+)/);if(C){var x=parseInt(C[2],10);C[1]=="-"?_-=x:_+=x}return _},parseCommandArgs_:function(f,_,C){if(!f.eol()){_.argString=f.match(/.*/)[0];var x=C.argDelimiter||/\s+/,I=WS(_.argString).split(x);I.length&&I[0]&&(_.args=I)}},matchCommand_:function(f){for(var _=f.length;_>0;_--){var C=f.substring(0,_);if(this.commandMap_[C]){var x=this.commandMap_[C];if(x.name.indexOf(f)===0)return x}}return null},buildCommandMap_:function(){this.commandMap_={};for(var f=0;f"){var _=f.length-11,C=w.slice(0,_),x=f.slice(0,_);return C==x&&w.length>_?"full":x.indexOf(C)==0?"partial":!1}else return w==f?"full":f.indexOf(w)==0?"partial":!1}function bne(w){var f=/^.*(<[^>]+>)$/.exec(w),_=f?f[1]:w.slice(-1);if(_.length>1)switch(_){case"":_=` +`;break;case"":_=" ";break;default:_="";break}return _}function aN(w,f,_){return function(){for(var C=0;C<_;C++)f(w)}}function rn(w){return new Fe(w.line,w.ch)}function Qo(w,f){return w.ch==f.ch&&w.line==f.line}function An(w,f){return w.line2&&(f=Jo.apply(void 0,Array.prototype.slice.call(arguments,1))),An(w,f)?w:f}function Gd(w,f){return arguments.length>2&&(f=Gd.apply(void 0,Array.prototype.slice.call(arguments,1))),An(w,f)?f:w}function lN(w,f,_){var C=An(w,f),x=An(f,_);return C&&x}function Bn(w,f){return w.getLine(f).length}function US(w){return w.trim?w.trim():w.replace(/^\s+|\s+$/g,"")}function yne(w){return w.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Cne(w,f,_){var C=Bn(w,f),x=new Array(_-C+1).join(" ");w.setCursor(new Fe(f,C)),w.replaceRange(x,w.getCursor())}function cN(w,f){var _=[],C=w.listSelections(),x=rn(w.clipPos(f)),I=!Qo(f,x),D=w.getCursor("head"),F=Sne(C,D),B=Qo(C[F].head,C[F].anchor),z=C.length-1,G=z-F>F?z:0,ee=C[G].anchor,ve=Math.min(ee.line,x.line),pe=Math.max(ee.line,x.line),ue=ee.ch,Ve=x.ch,Ge=C[G].head.ch-ue,Ue=Ve-ue;Ge>0&&Ue<=0?(ue++,I||Ve--):Ge<0&&Ue>=0?(ue--,B||Ve++):Ge<0&&Ue==-1&&(ue--,Ve++);for(var It=ve;It<=pe;It++){var yt={anchor:new Fe(It,ue),head:new Fe(It,Ve)};_.push(yt)}return w.setSelections(_),f.ch=Ve,ee.ch=ue,ee}function dN(w,f,_){for(var C=[],x=0;x<_;x++){var I=Hn(f,x,0);C.push({anchor:I,head:I})}w.setSelections(C,0)}function Sne(w,f,_){for(var C=0;CB&&(x.line=B),x.ch=Bn(w,x.line)}return{ranges:[{anchor:I,head:x}],primary:0}}else if(_=="block"){var z=Math.min(I.line,x.line),G=I.ch,ee=Math.max(I.line,x.line),ve=x.ch;G0&&I&&re(I);I=x.pop())_.line--,_.ch=0;I?(_.line--,_.ch=Bn(w,_.line)):_.ch=0}}function kne(w,f,_){f.ch=0,_.ch=0,_.line++}function ra(w){if(!w)return 0;var f=w.search(/\S/);return f==-1?w.length:f}function r_(w,f,_,C,x){for(var I=Ene(w),D=w.getLine(I.line),F=I.ch,B=x?d[0]:u[0];!B(D.charAt(F));)if(F++,F>=D.length)return null;C?B=u[0]:(B=d[0],B(D.charAt(F))||(B=d[1]));for(var z=F,G=F;B(D.charAt(z))&&z=0;)G--;if(G++,f){for(var ee=z;/\s/.test(D.charAt(z))&&z0;)G--;G||(G=ve)}}return{start:new Fe(I.line,G),end:new Fe(I.line,z)}}function Ine(w,f,_){var C=f;if(!ot.default.findMatchingTag||!ot.default.findEnclosingTag)return{start:C,end:C};var x=ot.default.findMatchingTag(w,f)||ot.default.findEnclosingTag(w,f);return!x||!x.open||!x.close?{start:C,end:C}:_?{start:x.open.from,end:x.close.to}:{start:x.open.to,end:x.close.from}}function hN(w,f,_){Qo(f,_)||$.jumpList.add(w,f,_)}function fN(w,f){$.lastCharacterSearch.increment=w,$.lastCharacterSearch.forward=f.forward,$.lastCharacterSearch.selectedCharacter=f.selectedCharacter}var Ane={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},pN={bracket:{isComplete:function(f){if(f.nextCh===f.symb){if(f.depth++,f.depth>=1)return!0}else f.nextCh===f.reverseSymb&&f.depth--;return!1}},section:{init:function(f){f.curMoveThrough=!0,f.symb=(f.forward?"]":"[")===f.symb?"{":"}"},isComplete:function(f){return f.index===0&&f.nextCh===f.symb}},comment:{isComplete:function(f){var _=f.lastCh==="*"&&f.nextCh==="/";return f.lastCh=f.nextCh,_}},method:{init:function(f){f.symb=f.symb==="m"?"{":"}",f.reverseSymb=f.symb==="{"?"}":"{"},isComplete:function(f){return f.nextCh===f.symb}},preprocess:{init:function(f){f.index=0},isComplete:function(f){if(f.nextCh==="#"){var _=f.lineText.match(/^#(\w+)/)[1];if(_==="endif"){if(f.forward&&f.depth===0)return!0;f.depth++}else if(_==="if"){if(!f.forward&&f.depth===0)return!0;f.depth--}if(_==="else"&&f.depth===0)return!0}return!1}}};function Lne(w,f,_,C){var x=rn(w.getCursor()),I=_?1:-1,D=_?w.lineCount():-1,F=x.ch,B=x.line,z=w.getLine(B),G={lineText:z,nextCh:z.charAt(F),lastCh:null,index:F,symb:C,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[C],forward:_,depth:0,curMoveThrough:!1},ee=Ane[C];if(!ee)return x;var ve=pN[ee].init,pe=pN[ee].isComplete;for(ve&&ve(G);B!==D&&f;){if(G.index+=I,G.nextCh=G.lineText.charAt(G.index),!G.nextCh){if(B+=I,G.lineText=w.getLine(B)||"",I>0)G.index=0;else{var ue=G.lineText.length;G.index=ue>0?ue-1:0}G.nextCh=G.lineText.charAt(G.index)}pe(G)&&(x.line=B,x.ch=G.index,f--)}return G.nextCh||G.curMoveThrough?new Fe(B,G.index):x}function Mne(w,f,_,C,x){var I=f.line,D=f.ch,F=w.getLine(I),B=_?1:-1,z=C?u:d;if(x&&F==""){if(I+=B,F=w.getLine(I),!N(w,I))return null;D=_?0:F.length}for(;;){if(x&&F=="")return{from:0,to:0,line:I};for(var G=B>0?F.length:-1,ee=G,ve=G;D!=G;){for(var pe=!1,ue=0;ue0?0:F.length}}function Dne(w,f,_,C,x,I){var D=rn(f),F=[];(C&&!x||!C&&x)&&_++;for(var B=!(C&&x),z=0;z<_;z++){var G=Mne(w,f,C,I,B);if(!G){var ee=Bn(w,w.lastLine());F.push(C?{line:w.lastLine(),from:ee,to:ee}:{line:0,from:0,to:0});break}F.push(G),f=new Fe(G.line,C?G.to-1:G.from)}var ve=F.length!=_,pe=F[0],ue=F.pop();return C&&!x?(!ve&&(pe.from!=D.ch||pe.line!=D.line)&&(ue=F.pop()),new Fe(ue.line,ue.from)):C&&x?new Fe(ue.line,ue.to-1):!C&&x?(!ve&&(pe.to!=D.ch||pe.line!=D.line)&&(ue=F.pop()),new Fe(ue.line,ue.to)):new Fe(ue.line,ue.from)}function mN(w,f,_,C,x){var I=f,D=new Fe(I.line+_.repeat-1,1/0),F=w.clipPos(D);return F.ch--,x||(C.lastHPos=1/0,C.lastHSPos=w.charCoords(F,"div").left),D}function jS(w,f,_,C){for(var x=w.getCursor(),I=x.ch,D,F=0;F0;)ve(G,C)&&_--,G+=C;return new Fe(G,0)}var pe=w.state.vim;if(pe.visualLine&&ve(I,1,!0)){var ue=pe.sel.anchor;ve(ue.line,-1,!0)&&(!x||ue.line!=I)&&(I+=1)}var Ve=ee(I);for(G=I;G<=F&&_;G++)ve(G,1,!0)&&(!x||ee(G)!=Ve)&&_--;for(z=new Fe(G,0),G>F&&!Ve?Ve=!0:x=!1,G=I;G>D&&!((!x||ee(G)==Ve||G==I)&&ve(G,-1,!0));G--);return B=new Fe(G,0),{start:B,end:z}}function One(w,f,_,C){function x(B,z){if(z.pos+z.dir<0||z.pos+z.dir>=z.line.length){if(z.ln+=z.dir,!N(B,z.ln)){z.line=null,z.ln=null,z.pos=null;return}z.line=B.getLine(z.ln),z.pos=z.dir>0?0:z.line.length-1}else z.pos+=z.dir}function I(B,z,G,ee){var Ge=B.getLine(z),ve=Ge==="",pe={line:Ge,ln:z,pos:G,dir:ee},ue={ln:pe.ln,pos:pe.pos},Ve=pe.line==="";for(x(B,pe);pe.line!==null;){if(ue.ln=pe.ln,ue.pos=pe.pos,pe.line===""&&!Ve)return{ln:pe.ln,pos:pe.pos};if(ve&&pe.line!==""&&!re(pe.line[pe.pos]))return{ln:pe.ln,pos:pe.pos};ae(pe.line[pe.pos])&&!ve&&(pe.pos===pe.line.length-1||re(pe.line[pe.pos+1]))&&(ve=!0),x(B,pe)}var Ge=B.getLine(ue.ln);ue.pos=0;for(var Ue=Ge.length-1;Ue>=0;--Ue)if(!re(Ge[Ue])){ue.pos=Ue;break}return ue}function D(B,z,G,ee){var Ve=B.getLine(z),ve={line:Ve,ln:z,pos:G,dir:ee},pe={ln:ve.ln,pos:null},ue=ve.line==="";for(x(B,ve);ve.line!==null;){if(ve.line===""&&!ue)return pe.pos!==null?pe:{ln:ve.ln,pos:ve.pos};if(ae(ve.line[ve.pos])&&pe.pos!==null&&!(ve.ln===pe.ln&&ve.pos+1===pe.pos))return pe;ve.line!==""&&!re(ve.line[ve.pos])&&(ue=!1,pe={ln:ve.ln,pos:ve.pos}),x(B,ve)}var Ve=B.getLine(pe.ln);pe.pos=0;for(var Ge=0;Ge0;)C<0?F=D(w,F.ln,F.pos,C):F=I(w,F.ln,F.pos,C),_--;return new Fe(F.ln,F.pos)}function Pne(w,f,_,C){var x=f,I,D,F={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],B={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],z=w.getLine(x.line).charAt(x.ch),G=z===B?1:0;if(I=w.scanForBracket(new Fe(x.line,x.ch+G),-1,void 0,{bracketRegex:F}),D=w.scanForBracket(new Fe(x.line,x.ch+G),1,void 0,{bracketRegex:F}),!I||!D)return{start:x,end:x};if(I=I.pos,D=D.pos,I.line==D.line&&I.ch>D.ch||I.line>D.line){var ee=I;I=D,D=ee}return C?D.ch+=1:I.ch+=1,{start:I,end:D}}function Fne(w,f,_,C){var x=rn(f),I=w.getLine(x.line),D=I.split(""),F,B,z,G,ee=D.indexOf(_);if(x.ch-1&&!F;z--)D[z]==_&&(F=z+1);if(F&&!B)for(z=F,G=D.length;z=f&&w<=_:w==f}function KS(w){var f=w.getScrollInfo(),_=6,C=10,x=w.coordsChar({left:0,top:_+f.top},"local"),I=f.clientHeight-C+f.top,D=w.coordsChar({left:0,top:I},"local");return{top:x.line,bottom:D.line}}function xN(w,f,_){if(_=="'"||_=="`")return $.jumpList.find(w,-1)||new Fe(0,0);if(_==".")return EN(w);var C=f.marks[_];return C&&C.find()}function EN(w){for(var f=w.doc.history.done,_=f.length;_--;)if(f[_].changes)return rn(f[_].changes[0].to)}var TN=function(){this.buildCommandMap_()};TN.prototype={processCommand:function(f,_,C){var x=this;f.operation(function(){f.curOp.isVimOp=!0,x._processCommand(f,_,C)})},_processCommand:function(f,_,C){var x=f.state.vim,I=$.registerController.getRegister(":"),D=I.toString();x.visualMode&&na(f);var F=new ot.default.StringStream(_);I.setText(_);var B=C||{};B.input=_;try{this.parseInput_(f,F,B)}catch(ve){throw Pi(f,ve.toString()),ve}var z,G;if(!B.commandName)B.line!==void 0&&(G="move");else if(z=this.matchCommand_(B.commandName),z){if(G=z.name,z.excludeFromCommandHistory&&I.setText(D),this.parseCommandArgs_(F,B,z),z.type=="exToKey"){for(var ee=0;ee@~])/);return x?C.commandName=x[1]:C.commandName=_.match(/.*/)[0],C},parseLineSpec_:function(f,_){var C=_.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(_.next()){case".":return this.parseLineSpecOffset_(_,f.getCursor().line);case"$":return this.parseLineSpecOffset_(_,f.lastLine());case"'":var x=_.next(),I=xN(f,f.state.vim,x);if(!I)throw new Error("Mark not set");return this.parseLineSpecOffset_(_,I.line);case"-":case"+":return _.backUp(1),this.parseLineSpecOffset_(_,f.getCursor().line);default:_.backUp(1);return}},parseLineSpecOffset_:function(f,_){var C=f.match(/^([+-])?(\d+)/);if(C){var x=parseInt(C[2],10);C[1]=="-"?_-=x:_+=x}return _},parseCommandArgs_:function(f,_,C){if(!f.eol()){_.argString=f.match(/.*/)[0];var x=C.argDelimiter||/\s+/,I=US(_.argString).split(x);I.length&&I[0]&&(_.args=I)}},matchCommand_:function(f){for(var _=f.length;_>0;_--){var C=f.substring(0,_);if(this.commandMap_[C]){var x=this.commandMap_[C];if(x.name.indexOf(f)===0)return x}}return null},buildCommandMap_:function(){this.commandMap_={};for(var f=0;f1)return"Invalid arguments";D=pr&&"decimal"||oo&&"hex"||Kr&&"octal"}Jt[2]&&(F=new RegExp(Jt[2].substr(1,Jt[2].length-2),x?"i":""))}}var z=B();if(z){Oi(f,z+": "+_.argString);return}var G=_.line||f.firstLine(),ee=_.lineEnd||_.line||f.lastLine();if(G==ee)return;var ge=new Fe(G,0),pe=new Fe(ee,Bn(f,ee)),ue=f.getRange(ge,pe).split(` -`),Ve=F||(D=="decimal"?/(-?)([\d]+)/:D=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:D=="octal"?/([0-7]+)/:null),Ge=D=="decimal"?10:D=="hex"?16:D=="octal"?8:null,Ue=[],It=[];if(D||F)for(var yt=0;yt=G){Oi(f,"Invalid argument: "+_.argString.substring(I));return}for(var ee=0;ee<=G-z;ee++){var ge=String.fromCharCode(z+ee);delete C.marks[ge]}}else{Oi(f,"Invalid argument: "+F+"-");return}}else delete C.marks[D]}}},sa=new IN;function $ne(w,f,_,C,x,I,D,F,B){w.state.vim.exMode=!0;var z=!1,G,ee,ge;function pe(){w.operation(function(){for(;!z;)ue(),Ge();Ue()})}function ue(){var yt=w.getRange(I.from(),I.to()),Ct=yt.replace(D,F),Pi=I.to().line;I.replace(Ct),ee=I.to().line,x+=ee-Pi,ge=ee1&&(RN(w,f,f.insertModeRepeat-1,!0),f.lastEditInputState.repeatOverride=f.insertModeRepeat),delete f.insertModeRepeat,f.insertMode=!1,w.setCursor(w.getCursor().line,w.getCursor().ch-1),w.setOption("keyMap","vim"),w.setOption("disableInput",!0),w.toggleOverwrite(!1),C.setText(I.changes.join("")),ot.default.signal(w,"vim-mode-change",{mode:"normal"}),_.isRecording&&Jne(_),w.enterVimMode()}function LN(w){kr.unshift(w)}function Yne(w,f,_,C,x){var I={keys:w,type:f};I[f]=_,I[f+"Args"]=C;for(var D in x)I[D]=x[D];LN(I)}Xe("insertModeEscKeysTimeout",200,"number"),ot.default.keyMap["vim-insert"]={fallthrough:["default"],attach:r,detach:n,call:o},ot.default.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:r,detach:n,call:o};function Xne(w,f,_,C){var x=$.registerController.getRegister(C);if(C==":"){x.keyBuffer[0]&&sa.processCommand(w,x.keyBuffer[0]),_.isPlaying=!1;return}var I=x.keyBuffer,D=0;_.isPlaying=!0,_.replaySearchQueries=x.searchQueries.slice(0);for(var F=0;F|<\w+>|./.exec(B),G=z[0],B=B.substring(z.index+G.length),de.handleKey(w,G,"macro"),f.insertMode){var ee=x.insertModeChanges[D++].changes;$.macroModeState.lastInsertModeChanges.changes=ee,ON(w,ee,1),Cm(w)}_.isPlaying=!1}function Qne(w,f){if(!w.isPlaying){var _=w.latestRegister,C=$.registerController.getRegister(_);C&&C.pushText(f)}}function Jne(w){if(!w.isPlaying){var f=w.latestRegister,_=$.registerController.getRegister(f);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(w.lastInsertModeChanges)}}function Zne(w,f){if(!w.isPlaying){var _=w.latestRegister,C=$.registerController.getRegister(_);C&&C.pushSearchQuery&&C.pushSearchQuery(f)}}function MN(w,f){var _=$.macroModeState,C=_.lastInsertModeChanges;if(!_.isPlaying)for(;f;){if(C.expectCursorActivityForChange=!0,C.ignoreCount>1)C.ignoreCount--;else if(f.origin=="+input"||f.origin=="paste"||f.origin===void 0){var x=w.listSelections().length;x>1&&(C.ignoreCount=x);var I=f.text.join(` -`);C.maybeReset&&(C.changes=[],C.maybeReset=!1),I&&(w.state.overwrite&&!/\n/.test(I)?C.changes.push([I]):C.changes.push(I))}f=f.next}}function DN(w){var f=w.state.vim;if(f.insertMode){var _=$.macroModeState;if(_.isPlaying)return;var C=_.lastInsertModeChanges;C.expectCursorActivityForChange?C.expectCursorActivityForChange=!1:C.maybeReset=!0}else w.curOp.isVimOp||ere(w,f)}function ere(w,f){var _=w.getCursor("anchor"),C=w.getCursor("head");if(f.visualMode&&!w.somethingSelected()?na(w,!1):!f.visualMode&&!f.insertMode&&w.somethingSelected()&&(f.visualMode=!0,f.visualLine=!1,ot.default.signal(w,"vim-mode-change",{mode:"visual"})),f.visualMode){var x=An(C,_)?0:-1,I=An(C,_)?-1:0;C=Hn(C,0,x),_=Hn(_,0,I),f.sel={anchor:_,head:C},pl(w,f,"<",Qo(C,_)),pl(w,f,">",qd(C,_))}else f.insertMode||(f.lastHPos=w.getCursor().ch)}function GS(w){this.keyName=w}function NN(w){var f=$.macroModeState,_=f.lastInsertModeChanges,C=ot.default.keyName(w);if(!C)return;function x(){return _.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new GS(C)),!0}(C.indexOf("Delete")!=-1||C.indexOf("Backspace")!=-1)&&ot.default.lookupKey(C,"vim-insert",x)}function RN(w,f,_,C){var x=$.macroModeState;x.isPlaying=!0;var I=!!f.lastEditActionCommand,D=f.inputState;function F(){I?$i.processAction(w,f,f.lastEditActionCommand):$i.evalInput(w,f)}function B(G){if(x.lastInsertModeChanges.changes.length>0){G=f.lastEditActionCommand?G:1;var ee=x.lastInsertModeChanges;ON(w,ee.changes,G)}}if(f.inputState=f.lastEditInputState,I&&f.lastEditActionCommand.interlaceInsertRepeat)for(var z=0;z<_;z++)F(),B(1);else C||F(),B(_);f.inputState=D,f.insertMode&&!C&&Cm(w),x.isPlaying=!1}function ON(w,f,_){function C(ee){return typeof ee=="string"?ot.default.commands[ee](w):ee(w),!0}var x=w.getCursor("head"),I=$.macroModeState.lastInsertModeChanges.visualBlock;I&&(hN(w,x,I+1),_=w.listSelections().length,w.setCursor(x));for(var D=0;D<_;D++){I&&w.setCursor(Hn(x,D,0));for(var F=0;F{"use strict";Object.defineProperty(F9,"__esModule",{value:!0});F9.default=void 0;function E_e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function uJ(i,e){for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:null;E_e(this,i),this.closeInput=function(){n.removeInputListeners(),n.input=null,n.setSec(""),n.editor&&n.editor.focus()},this.clear=function(){n.setInnerHtml_(n.node,"")},this.inputKeyUp=function(o){var s=n.input.options;s&&s.onKeyUp&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputKeyInput=function(o){var s=n.input.options;s&&s.onKeyInput&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputBlur=function(){var o=n.input.options;o.closeOnBlur&&n.closeInput()},this.inputKeyDown=function(o){var s=n.input,a=s.options,l=s.callback;a&&a.onKeyDown&&a.onKeyDown(o,o.target.value,n.closeInput)||((o.keyCode===27||a&&a.closeOnEnter!==!1&&o.keyCode==13)&&(n.input.node.blur(),o.stopPropagation(),n.closeInput()),o.keyCode===13&&l&&(o.stopPropagation(),o.preventDefault(),l(o.target.value)))},this.node=e,this.modeInfoNode=document.createElement("span"),this.secInfoNode=document.createElement("span"),this.notifNode=document.createElement("span"),this.notifNode.className="vim-notification",this.keyInfoNode=document.createElement("span"),this.keyInfoNode.setAttribute("style","float: right"),this.node.appendChild(this.modeInfoNode),this.node.appendChild(this.secInfoNode),this.node.appendChild(this.notifNode),this.node.appendChild(this.keyInfoNode),this.toggleVisibility(!1),this.editor=t,this.sanitizer=r}return T_e(i,[{key:"setMode",value:function(t){if(t.mode==="visual"){t.subMode==="linewise"?this.setText("--VISUAL LINE--"):t.subMode==="blockwise"?this.setText("--VISUAL BLOCK--"):this.setText("--VISUAL--");return}this.setText("--".concat(t.mode.toUpperCase(),"--"))}},{key:"setKeyBuffer",value:function(t){this.keyInfoNode.textContent=t}},{key:"setSec",value:function(t,n,r){if(this.notifNode.textContent="",t===void 0)return this.closeInput;this.setInnerHtml_(this.secInfoNode,t);var o=this.secInfoNode.querySelector("input");return o&&(o.focus(),this.input={callback:n,options:r,node:o},r&&(r.selectValueOnOpen&&o.select(),r.value&&(o.value=r.value)),this.addInputListeners()),this.closeInput}},{key:"setText",value:function(t){this.modeInfoNode.textContent=t}},{key:"toggleVisibility",value:function(t){t?this.node.style.display="block":this.node.style.display="none",this.input&&this.removeInputListeners(),clearInterval(this.notifTimeout)}},{key:"addInputListeners",value:function(){var t=this.input.node;t.addEventListener("keyup",this.inputKeyUp),t.addEventListener("keydown",this.inputKeyDown),t.addEventListener("input",this.inputKeyInput),t.addEventListener("blur",this.inputBlur)}},{key:"removeInputListeners",value:function(){if(!(!this.input||!this.input.node)){var t=this.input.node;t.removeEventListener("keyup",this.inputKeyUp),t.removeEventListener("keydown",this.inputKeyDown),t.removeEventListener("input",this.inputKeyInput),t.removeEventListener("blur",this.inputBlur)}}},{key:"showNotification",value:function(t){var n=this,r=document.createElement("span");this.setInnerHtml_(r,t),this.notifNode.textContent=r.textContent,this.notifTimeout=setTimeout(function(){n.notifNode.textContent=""},5e3)}},{key:"setInnerHtml_",value:function(t,n){for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);n&&(this.sanitizer?t.appendChild(this.sanitizer(n)):t.appendChild(n))}}]),i}();F9.default=k_e});var gJ=gt(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});Object.defineProperty(Lv,"StatusBar",{enumerable:!0,get:function(){return pJ.default}});Object.defineProperty(Lv,"VimMode",{enumerable:!0,get:function(){return fJ.default}});Lv.initVimMode=I_e;var fJ=mJ(dJ()),pJ=mJ(hJ());function mJ(i){return i&&i.__esModule?i:{default:i}}function I_e(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pJ.default,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,r=new fJ.default(i);if(!e)return r.attach(),r;var o=new t(e,i,n),s="";return r.on("vim-mode-change",function(a){o.setMode(a)}),r.on("vim-keypress",function(a){a===":"?s="":s+=a,o.setKeyBuffer(s)}),r.on("vim-command-done",function(){s="",o.setKeyBuffer(s)}),r.on("dispose",function(){o.toggleVisibility(!1),o.closeInput(),o.clear()}),o.toggleVisibility(!0),r.setStatusBar(o),r.attach(),r}});var vJ=M(()=>{We();J({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>import("./abap-VYBXOYTR.js")})});var _J=M(()=>{We();J({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>import("./apex-TX7MH4KD.js")})});var bJ=M(()=>{We();J({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>import("./azcli-4VJUQQIN.js")})});var yJ=M(()=>{We();J({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>import("./bat-GGHBGELM.js")})});var CJ=M(()=>{We();J({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>import("./bicep-VJO6NXPN.js")})});var SJ=M(()=>{We();J({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>import("./cameligo-UR3AUYFW.js")})});var wJ=M(()=>{We();J({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>import("./clojure-HKNOPZTO.js")})});var xJ=M(()=>{We();J({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>import("./coffee-D22KHGF2.js")})});var EJ=M(()=>{We();J({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>import("./cpp-4OJPINLR.js")});J({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>import("./cpp-4OJPINLR.js")})});var TJ=M(()=>{We();J({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>import("./csharp-CO24EJBG.js")})});var kJ=M(()=>{We();J({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>import("./csp-IIWFJS55.js")})});var IJ=M(()=>{We();J({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>import("./cypher-MRKLWMJ6.js")})});var AJ=M(()=>{We();J({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>import("./dart-54INGSZP.js")})});var LJ=M(()=>{We();J({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>import("./ecl-NCOHKGIC.js")})});var MJ=M(()=>{We();J({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>import("./flow9-GEURGHNI.js")})});var DJ=M(()=>{We();J({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>import("./fsharp-4XUTEIEV.js")})});var NJ=M(()=>{We();J({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationDollar)});J({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAngleInterpolationDollar)});J({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagBracketInterpolationDollar)});J({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAngleInterpolationBracket)});J({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagBracketInterpolationBracket)});J({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationDollar)});J({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationBracket)})});var RJ=M(()=>{We();J({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>import("./go-7PU7V5QM.js")})});var OJ=M(()=>{We();J({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>import("./graphql-3VYTYJI7.js")})});var PJ=M(()=>{We();J({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>import("./handlebars-I7OT4MKQ.js")})});var FJ=M(()=>{We();J({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>import("./hcl-3IH2WNWU.js")})});var HJ=M(()=>{We();J({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>import("./ini-SAC6XGQK.js")})});var BJ=M(()=>{We();J({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>import("./java-762AWQ7Q.js")})});var zJ=M(()=>{We();J({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>import("./julia-KMBRGMB6.js")})});var UJ=M(()=>{We();J({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>import("./kotlin-Y26LRM5H.js")})});var WJ=M(()=>{We();J({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>import("./less-BQYAE3BL.js")})});var jJ=M(()=>{We();J({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>import("./lexon-VICO4FWU.js")})});var VJ=M(()=>{We();J({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>import("./lua-6ATHF4JU.js")})});var KJ=M(()=>{We();J({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>import("./liquid-UKLXN46U.js")})});var qJ=M(()=>{We();J({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>import("./m3-DNAEBIGJ.js")})});var GJ=M(()=>{We();J({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>import("./mips-IPQV376U.js")})});var $J=M(()=>{We();J({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>import("./msdax-HKSHOV4H.js")})});var YJ=M(()=>{We();J({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>import("./mysql-XLCHJKYF.js")})});var XJ=M(()=>{We();J({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>import("./objective-c-I4JUFUGM.js")})});var QJ=M(()=>{We();J({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>import("./pascal-E5LHFI46.js")})});var JJ=M(()=>{We();J({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>import("./pascaligo-LPFC4UYC.js")})});var ZJ=M(()=>{We();J({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>import("./perl-G7VYOET6.js")})});var eZ=M(()=>{We();J({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>import("./pgsql-N5O4YY4C.js")})});var tZ=M(()=>{We();J({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>import("./php-WZLUZOLP.js")})});var iZ=M(()=>{We();J({id:"pla",extensions:[".pla"],loader:()=>import("./pla-H5HBSQU6.js")})});var nZ=M(()=>{We();J({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>import("./postiats-DW5JOKUY.js")})});var rZ=M(()=>{We();J({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>import("./powerquery-U2SJQ4GY.js")})});var oZ=M(()=>{We();J({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>import("./powershell-2I7YAJDI.js")})});var sZ=M(()=>{We();J({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>import("./protobuf-VHYMBWLK.js")})});var aZ=M(()=>{We();J({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>import("./pug-4DWSGGAY.js")})});var lZ=M(()=>{We();J({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>import("./python-WBHPPKA6.js")})});var cZ=M(()=>{We();J({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>import("./qsharp-ZSWEFMQ3.js")})});var dZ=M(()=>{We();J({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>import("./r-VB2OINAG.js")})});var uZ=M(()=>{We();J({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>import("./razor-NKQUIAEM.js")})});var hZ=M(()=>{We();J({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>import("./redis-ZN6WMKI6.js")})});var fZ=M(()=>{We();J({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>import("./redshift-XCPPMXUQ.js")})});var pZ=M(()=>{We();J({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>import("./restructuredtext-ER4MI2XR.js")})});var mZ=M(()=>{We();J({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>import("./ruby-CSSRCZFH.js")})});var gZ=M(()=>{We();J({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>import("./rust-5BMB6PXP.js")})});var vZ=M(()=>{We();J({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>import("./sb-CO5DRU6K.js")})});var _Z=M(()=>{We();J({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>import("./scala-2A54SA4F.js")})});var bZ=M(()=>{We();J({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>import("./scheme-E7EIA2LY.js")})});var yZ=M(()=>{We();J({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>import("./scss-I2L7ETRM.js")})});var CZ=M(()=>{We();J({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>import("./shell-HJPXH727.js")})});var SZ=M(()=>{We();J({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>import("./solidity-HQYKJ4L6.js")})});var wZ=M(()=>{We();J({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>import("./sophia-XI5N2KCD.js")})});var xZ=M(()=>{We();J({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>import("./sparql-2SIMXPG5.js")})});var EZ=M(()=>{We();J({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>import("./st-FYPD7SP3.js")})});var TZ=M(()=>{We();J({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>import("./swift-J3SBMK25.js")})});var kZ=M(()=>{We();J({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>import("./systemverilog-LCVLURC4.js")});J({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>import("./systemverilog-LCVLURC4.js")})});var IZ=M(()=>{We();J({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>import("./tcl-MVCXVVYJ.js")})});var AZ=M(()=>{We();J({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>import("./twig-7LCZB2JP.js")})});var LZ=M(()=>{We();J({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>import("./typescript-ZY5TS6P4.js")})});var MZ=M(()=>{We();J({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>import("./vb-LTQDQXEO.js")})});var DZ=M(()=>{We();J({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>import("./wgsl-FJRYFANV.js")})});var NZ=M(()=>{We();J({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>import("./yaml-GBPQMMHS.js")})});var RZ=M(()=>{Os();vJ();_J();bJ();yJ();CJ();SJ();wJ();xJ();EJ();TJ();kJ();DL();IJ();AJ();OL();LJ();IL();MJ();DJ();NJ();RJ();OJ();PJ();FJ();NL();HJ();BJ();LL();zJ();UJ();WJ();jJ();VJ();KJ();qJ();AL();GJ();$J();YJ();XJ();QJ();JJ();ZJ();eZ();tZ();iZ();nZ();rZ();oZ();sZ();aZ();lZ();cZ();dZ();uZ();hZ();fZ();pZ();mZ();gZ();vZ();_Z();bZ();yZ();CZ();SZ();wZ();xZ();ML();EZ();TZ();kZ();IZ();AZ();LZ();MZ();DZ();RL();NZ();});function eM(){return import("./cssMode-OAEHF6O6.js")}var A_e,L_e,M_e,D_e,OZ,N_e,nm,QL,JL,ZL,PZ,FZ,HZ,BZ=M(()=>{Os();Os();A_e=Object.defineProperty,L_e=Object.getOwnPropertyDescriptor,M_e=Object.getOwnPropertyNames,D_e=Object.prototype.hasOwnProperty,OZ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M_e(e))!D_e.call(i,r)&&r!==t&&A_e(i,r,{get:()=>e[r],enumerable:!(n=L_e(e,r))||n.enumerable});return i},N_e=(i,e,t)=>(OZ(i,e,"default"),t&&OZ(t,e,"default")),nm={};N_e(nm,Rs);QL=class{constructor(i,e,t){Cn(this,"_onDidChange",new nm.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(i){this.setOptions(i)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},JL={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},ZL={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},PZ=new QL("css",JL,ZL),FZ=new QL("scss",JL,ZL),HZ=new QL("less",JL,ZL);nm.languages.css={cssDefaults:PZ,lessDefaults:HZ,scssDefaults:FZ};nm.languages.onLanguage("less",()=>{eM().then(i=>i.setupMode(HZ))});nm.languages.onLanguage("scss",()=>{eM().then(i=>i.setupMode(FZ))});nm.languages.onLanguage("css",()=>{eM().then(i=>i.setupMode(PZ))})});function z9(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===Mv,documentFormattingEdits:i===Mv,documentRangeFormattingEdits:i===Mv}}function V_e(){return import("./htmlMode-BWGWQOXA.js")}function U9(i,e=B9,t=z9(i)){let n=new B_e(i,e,t),r,o=H9.languages.onLanguage(i,async()=>{r=(await V_e()).setupMode(n)});return{defaults:n,dispose(){o.dispose(),r==null||r.dispose(),r=void 0}}}var R_e,O_e,P_e,F_e,zZ,H_e,H9,B_e,z_e,B9,Mv,UZ,WZ,jZ,U_e,VZ,W_e,KZ,j_e,qZ=M(()=>{Os();Os();R_e=Object.defineProperty,O_e=Object.getOwnPropertyDescriptor,P_e=Object.getOwnPropertyNames,F_e=Object.prototype.hasOwnProperty,zZ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of P_e(e))!F_e.call(i,r)&&r!==t&&R_e(i,r,{get:()=>e[r],enumerable:!(n=O_e(e,r))||n.enumerable});return i},H_e=(i,e,t)=>(zZ(i,e,"default"),t&&zZ(t,e,"default")),H9={};H_e(H9,Rs);B_e=class{constructor(i,e,t){Cn(this,"_onDidChange",new H9.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},z_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},B9={format:z_e,suggest:{},data:{useDefaultDataProvider:!0}};Mv="html",UZ="handlebars",WZ="razor",jZ=U9(Mv,B9,z9(Mv)),U_e=jZ.defaults,VZ=U9(UZ,B9,z9(UZ)),W_e=VZ.defaults,KZ=U9(WZ,B9,z9(WZ)),j_e=KZ.defaults;H9.languages.html={htmlDefaults:U_e,razorDefaults:j_e,handlebarDefaults:W_e,htmlLanguageService:jZ,handlebarLanguageService:VZ,razorLanguageService:KZ,registerHTMLLanguageService:U9}});function tM(i,e,t){return GZ(this,void 0,void 0,function*(){let n=i.ordered(e),r=new Map,o=new rm,s=n.map((a,l)=>GZ(this,void 0,void 0,function*(){r.set(a,l);try{let c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&o.add(c,a)}catch(c){Ut(c)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:r.get(a.provider)r.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),o})}var GZ,rm,iM=M(()=>{gi();At();Ce();Li();Sn();ts();Bi();xt();GZ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},rm=class{constructor(){this.lenses=[],this._disposables=new ne}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let n of e.lenses)this.lenses.push({symbol:n,provider:t})}};St.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;Lt(ht.isUri(t)),Lt(typeof n=="number"||!n);let{codeLensProvider:r}=i.get(be),o=i.get(Ci).getModel(t);if(!o)throw Io();let s=[],a=new ne;return tM(r,o,et.None).then(l=>{a.add(l);let c=[];for(let d of l.lenses)n==null||d.symbol.command?s.push(d.symbol):n-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(o,d.symbol,et.None)).then(u=>s.push(u||d.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var K_e,q_e,rM,W9,nM,$Z=M(()=>{Dt();VN();tf();qe();iM();bl();Et();lu();K_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},q_e=function(i,e){return function(t,n){e(t,n,i)}},rM=rr("ICodeLensCache"),W9=class{constructor(e,t){this.lineCount=e,this.data=t}},nM=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new fa(20,.75);let t="codelens/cache";lO(()=>e.remove(t,1));let n="codelens/cache2",r=e.get(n,1,"{}");this._deserialize(r),d_(e.onWillSaveState)(o=>{o.reason===cb.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){let n=t.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new rm;r.add({lenses:n,dispose:()=>{}},this._fakeProvider);let o=new W9(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){let t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){let e=Object.create(null);for(let[t,n]of this._cache){let r=new Set;for(let o of n.data.lenses)r.add(o.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let n in t){let r=t[n],o=[];for(let a of r.lines)o.push({range:new P(a,1,a,11)});let s=new rm;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(n,new W9(r.lineCount,s))}}catch(t){}}};nM=K_e([q_e(0,Yr)],nM);sr(rM,nM,1)});var YZ=M(()=>{});var XZ=M(()=>{YZ()});var oM,j9,om,QZ,Dv,JZ=M(()=>{Ht();Dre();XZ();qe();qn();oM=class{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}},j9=class i{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${i._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();let n=[],r=!1;for(let o=0;o{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:QZ},u=>this._decorationIds[d]=u),a?a=P.plusRange(a,c.symbol.range):a=P.lift(c.symbol.range)}),this._viewZone=new oM(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new j9(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{let n=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(n&&P.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,r)=>{t.addDecoration({range:n.symbol.range,options:QZ},o=>this._decorationIds[r]=o)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t{Dt();At();Ce();db();Ze();Qm();jt();iM();$Z();JZ();De();Bi();Ro();Ll();Ns();xt();G_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Nv=function(i,e){return function(t,n){e(t,n,i)}},$_e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},sm=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new ne,this._localToDispose=new ne,this._lenses=[],this._oldCodeLensModels=new ne,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new ti(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(48)||a.hasChanged(17)||a.hasChanged(16))&&this._updateLensStyle(),a.hasChanged(15)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){let e=Math.max(1.3,this._editor.getOption(64)/this._editor.getOption(50)),t=this._editor.getOption(17);return(!t||t<5)&&(t=this._editor.getOption(50)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(16),r=this._editor.getOption(48),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),n&&(o.setProperty("--vscode-editorCodeLens-fontFamily",n),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",X_.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(15))return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(wl(()=>{let r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(let r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){let o=r.onDidChange(()=>n.schedule());this._localToDispose.add(o)}let n=new ti(()=>{var r;let o=Date.now();(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=Vt(s=>tM(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);let a=this._provideCodeLensDebounce.update(e,Date.now()-o);n.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},at)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(Ft(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var r;this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{let a=[],l=-1;this._lenses.forEach(d=>{!d.isValid()||l===d.getLineNumber()?a.push(d):(d.update(s),l=d.getLineNumber())});let c=new om;a.forEach(d=>{d.dispose(c,s),this._lenses.splice(this._lenses.indexOf(d),1)}),c.commit(o)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(r=this._resolveCodeLensesPromise)===null||r===void 0||r.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Ft(()=>{if(this._editor.getModel()){let r=Ea.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(let s of this._lenses){let a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){let n=new om;for(let r of this._lenses)r.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],r;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],n.push(r)))}if(!n.length&&!this._lenses.length)return;let o=Ea.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new om,d=0,u=0;for(;uthis._resolveCodeLensesInViewportSoon())),d++,u++)}for(;dthis._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;let t=this._editor.getModel();if(!t)return;let n=[],r=[];if(this._lenses.forEach(a=>{let l=a.computeIfNecessary(t);l&&(n.push(l),r.push(a))}),n.length===0)return;let o=Date.now(),s=Vt(a=>{let l=n.map((c,d)=>{let u=new Array(c.length),h=c.map((p,m)=>!p.symbol.command&&typeof p.provider.resolveCodeLens=="function"?Promise.resolve(p.provider.resolveCodeLens(t,p.symbol,a)).then(g=>{u[m]=g},Ut):(u[m]=p.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!r[d].isDisposed()&&r[d].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{let a=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{at(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};sm.ID="css.editor.codeLens";sm=G_e([Nv(1,be),Nv(2,an),Nv(3,ui),Nv(4,xi),Nv(5,rM)],sm);Ae(sm.ID,sm,1);X(class extends se{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:O.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return $_e(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(lr),r=e.get(ui),o=e.get(xi),s=t.getSelection().positionLineNumber,a=t.getContribution(sm.ID);if(!a)return;let l=a.getModel();if(!l)return;let c=[];for(let u of l.lenses)u.symbol.command&&u.symbol.range.startLineNumber===s&&c.push({label:u.symbol.command.title,command:u.symbol.command});if(c.length===0)return;let d=yield n.pick(c,{canPickMany:!1});if(d){if(l.isDisposed)return yield r.executeCommand(this.id);try{yield r.executeCommand(d.command.id,...d.command.arguments||[])}catch(u){o.error(u)}}})}})});var Y_e,sM,X_e,Dh,aM,lM=M(()=>{ma();aoe();ts();Kn();Ce();xt();Tb();Y_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},sM=function(i,e){return function(t,n){e(t,n,i)}},X_e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Dh=class{constructor(e,t){this._editorWorkerClient=new fF(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return X_e(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){let r=t.range,o=t.color,s=o.alpha,a=new dt(new As(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?dt.Format.CSS.formatRGB(a):dt.Format.CSS.formatRGBA(a),c=s?dt.Format.CSS.formatHSL(a):dt.Format.CSS.formatHSLA(a),d=s?dt.Format.CSS.formatHex(a):dt.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:r,text:l}}),u.push({label:c,textEdit:{range:r,text:c}}),u.push({label:d,textEdit:{range:r,text:d}}),u}},aM=class extends oe{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new Dh(e,t)))}};aM=Y_e([sM(0,Ci),sM(1,Tt),sM(2,be)],aM);$c(aM)});function V9(i,e,t,n=!0){return Rv(this,void 0,void 0,function*(){return fM(new cM,i,e,t,n)})}function hM(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}function fM(i,e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=!1,s,a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){let d=l[c];if(d instanceof Dh)s=d;else try{(yield i.compute(d,t,n,a))&&(o=!0)}catch(u){Ut(u)}}return o?a:s&&r?(yield i.compute(s,t,n,a),a):[]})}function eee(i,e){let{colorProvider:t}=i.get(be),n=i.get(Ci).getModel(e);if(!n)throw Io();let r=i.get(Mt).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:r}}var Rv,cM,dM,uM,pM=M(()=>{gi();At();Sn();qe();ts();Bi();xt();lM();jn();Rv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};cM=class{constructor(){}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)})}},dM=class{constructor(){}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}},uM=class{constructor(e){this.colorInfo=e}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideColorPresentations(t,this.colorInfo,et.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)})}};St.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof ht))throw Io();let{model:n,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=eee(i,t);return fM(new dM,r,n,et.None,o)});St.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,n]=e,{uri:r,range:o}=n;if(!(r instanceof ht)||!Array.isArray(t)||t.length!==4||!P.isIRange(o))throw Io();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=eee(i,r),[c,d,u,h]=t;return fM(new uM({range:o,color:{red:c,green:d,blue:u,alpha:h}}),a,s,et.None,l)})});var Q_e,mM,tee,vM,Sc,gM,_M=M(()=>{Dt();ma();At();qt();Ce();ml();Si();GP();Ze();qe();qn();Ns();xt();pM();jn();Q_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},mM=function(i,e){return function(t,n){e(t,n,i)}},tee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},vM=Object.create({}),Sc=class iee extends oe{constructor(e,t,n,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new ne),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Sb(this._editor),this._decoratorLimitReporter=new gM,this._colorDecorationClassRefs=this._register(new ne),this._debounceInformation=r.for(n.colorProvider,"Document Colors",{min:iee.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142);let a=s!==this._isColorDecoratorsEnabled||o.hasChanged(19),l=o.hasChanged(142);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){let r=n.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;let e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new ss,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return tee(this,void 0,void 0,function*(){this._computePromise=Vt(e=>tee(this,void 0,void 0,function*(){let t=this._editor.getModel();if(!t)return[];let n=new Ln(!1),r=yield V9(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),r}));try{let e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){at(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){let t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:ct.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],n=this._editor.getOption(19);for(let o=0;othis._colorDatas.has(r.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Sc.ID="editor.contrib.colorDetector";Sc.RECOMPUTE_TIME=1e3;Sc=Q_e([mM(1,Mt),mM(2,be),mM(3,an)],Sc);gM=class{constructor(){this._onDidChange=new $e,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};Ae(Sc.ID,Sc,1)});var K9,nee=M(()=>{qt();K9=class{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new $e,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new $e,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let r=0;r{});var q9=M(()=>{ree()});var ko,bM,yM,CM,SM,G9,wM,xM,EM,$9,oee=M(()=>{ZS();Ht();Pre();e1();or();ma();qt();Ce();qr();q9();De();_r();Al();ko=fe,bM=class extends oe{constructor(e,t,n,r=!1){super(),this.model=t,this.showingStandaloneColorPicker=r,this._closeButton=null,this._domNode=ko(".colorpicker-header"),me(e,this._domNode),this._pickedColorNode=me(this._domNode,ko(".picked-color"));let o=v("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=me(this._domNode,ko(".original-color")),this._originalColorNode.style.backgroundColor=dt.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(Sw)||dt.white,this._register(n.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(Sw)||dt.white})),this._register(Rt(this._pickedColorNode,on.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Rt(this._originalColorNode,on.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=dt.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new yM(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=dt.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this._pickedColorNode.prepend(ko(".codicon.codicon-color-mode"))}},yM=class extends oe{constructor(e){super(),this._onClicked=this._register(new $e),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),me(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),me(this._button,t),me(t,ko(".button"+mt.asCSSSelector(Ei("color-picker-close",lt.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}},CM=class extends oe{constructor(e,t,n,r=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=ko(".colorpicker-body"),me(e,this._domNode),this._saturationBox=new SM(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new wM(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new xM(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new EM(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let n=this.model.color.hsva;this.model.color=new dt(new Fm(n.h,e,t,n.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new dt(new Fm(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,n=(1-e)*360;this.model.color=new dt(new Fm(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}},SM=class extends oe{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,this._domNode=ko(".saturation-wrap"),me(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",me(this._domNode,this._canvas),this.selection=ko(".saturation-selection"),me(this._domNode,this.selection),this.layout(),this._register(Rt(this._domNode,on.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new Lw);let t=wn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-t.left,r.pageY-t.top),()=>null);let n=Rt(document,on.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let n=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();let e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){let e=this.model.color.hsva,t=new dt(new Fm(e.h,1,1,1)),n=this._canvas.getContext("2d"),r=n.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");let o=n.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=dt.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}},G9=class extends oe{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=me(e,ko(".standalone-strip")),this.overlay=me(this.domNode,ko(".standalone-overlay"))):(this.domNode=me(e,ko(".strip")),this.overlay=me(this.domNode,ko(".overlay"))),this.slider=me(this.domNode,ko(".slider")),this.slider.style.top="0px",this._register(Rt(this.domNode,on.POINTER_DOWN,r=>this.onPointerDown(r))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new Lw),n=wn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-n.top),()=>null);let r=Rt(document,on.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){let t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}},wM=class extends G9{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){let{r:t,g:n,b:r}=e.rgba,o=new dt(new As(t,n,r,1)),s=new dt(new As(t,n,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},xM=class extends G9{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},EM=class extends oe{constructor(e){super(),this._onClicked=this._register(new $e),this.onClicked=this._onClicked.event,this._button=me(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}},$9=class extends Ds{constructor(e,t,n,r,o=!1){super(),this.model=t,this.pixelRatio=n,this._register(QN.onDidChange(()=>this.layout()));let s=ko(".colorpicker-widget");e.appendChild(s),this.header=this._register(new bM(s,this.model,r,o)),this.body=this._register(new CM(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}});function lee(i,e,t,n){return am(this,void 0,void 0,function*(){let r=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,c=new As(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),d=new dt(c),u=yield hM(e,t,n,et.None),h=new K9(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,r),i instanceof Ov?new TM(i,P.lift(t.range),h,n):new kM(i,P.lift(t.range),h,n)})}function cee(i,e,t,n,r){if(n.length===0||!e.hasModel())return oe.None;let o=new ne,s=n[0],a=e.getModel(),l=s.model,c=o.add(new $9(r.fragment,l,e.getOption(138),t,i instanceof lm));r.setColorPicker(c);let d=new P(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof lm){let u=n[0].model.color;i.color=u,Y9(a,l,u,d,s),o.add(l.onColorFlushed(h=>{i.color=h}))}else o.add(l.onColorFlushed(u=>am(this,void 0,void 0,function*(){yield Y9(a,l,u,d,s),d=dee(e,d,l,r)})));return o.add(l.onDidChangeColor(u=>{Y9(a,l,u,d,s)})),o}function dee(i,e,t,n){let r,o;if(t.presentation.textEdit){r=[t.presentation.textEdit],o=new P(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);let s=i.getModel()._setTrackedRange(null,o,3);i.pushUndoStop(),i.executeEdits("colorpicker",r),o=i.getModel()._getTrackedRange(s)||o}else r=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),i.pushUndoStop(),i.executeEdits("colorpicker",r);return t.presentation.additionalTextEdits&&(r=[...t.presentation.additionalTextEdits],i.executeEdits("colorpicker",r),n&&n.hide()),i.pushUndoStop(),o}function Y9(i,e,t,n,r){return am(this,void 0,void 0,function*(){let o=yield hM(i,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},r.provider,et.None);e.colorPresentations=o||[]})}var see,aee,am,TM,Ov,kM,lm,IM=M(()=>{Dt();gi();ma();Ce();qe();pM();_M();nee();oee();ar();see=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},aee=function(i,e){return function(t,n){e(t,n,i)}},am=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},TM=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Ov=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return Nr.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return am(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];let r=Sc.get(this._editor);if(!r)return[];for(let o of t){if(!r.isColorDecoration(o))continue;let s=r.getColorData(o.range.getStartPosition());if(s)return[yield lee(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return cee(this,this._editor,this._themeService,t,e)}};Ov=see([aee(1,pn)],Ov);kM=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r}},lm=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return am(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!Sc.get(this._editor))return null;let o=yield V9(n,this._editor.getModel(),et.None),s=null,a=null;for(let u of o){let h=u.colorInfo;P.containsRange(h.range,e.range)&&(s=h,a=u.provider)}let l=s!=null?s:e,c=a!=null?a:t,d=!!s;return{colorHover:yield lee(this,this._editor.getModel(),l,c),foundInEditor:d}})}updateEditorModel(e){return am(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=e.model,n=new P(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield Y9(this._editor.getModel(),t,this._color,n,e),n=dee(this._editor,n,t))})}renderHoverParts(e,t){return cee(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};lm=see([aee(1,pn)],lm)});var Pv,uee=M(()=>{Ce();Ze();qe();_M();IM();_C();lc();Pv=class extends oe{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==vM||!t.range)return;let n=this._editor.getContribution(hr.ID);if(n&&!n.isColorPickerVisible()){let r=new P(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);n.showContentHover(r,1,0,!1)}}};Pv.ID="editor.contrib.colorContribution";Ae(Pv.ID,Pv,2);Wo.register(Ov)});var pee,ta,hee,wc,fee,J_e,X9,AM,vee=M(()=>{Ce();IM();Et();qT();Gn();qt();xt();Ze();jt();ft();ts();Kn();lM();Ht();q9();pee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ta=function(i,e){return function(t,n){e(t,n,i)}},hee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},wc=class mee extends oe{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._modelService=n,this._keybindingService=r,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=O.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=O.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new X9(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(mee.ID)}};wc.ID="editor.contrib.standaloneColorPickerController";wc=pee([ta(1,Ke),ta(2,Ci),ta(3,Bt),ta(4,He),ta(5,be),ta(6,Tt)],wc);Ae(wc.ID,wc,1);fee=8,J_e=22,X9=class gee extends oe{constructor(e,t,n,r,o,s,a,l){var c;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new $e),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(lm,this._editor),this._position=(c=this._editor._getViewModel())===null||c===void 0?void 0:c.getPrimaryCursorState().viewState.position;let d=this._editor.getSelection(),u=d?{startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(Ts(this.body));this._register(h.onDidBlur(p=>{this.hide()})),this._register(h.onDidFocus(p=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(p=>{var m;let g=(m=p.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(p=>{this._render(p.value,p.foundInEditor)})),this._start(u),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return gee.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(58).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this.body.focus()}_start(e){return hee(this,void 0,void 0,function*(){let t=yield this._computeAsync(e);t&&this._onResult.fire(new AM(t.result,t.foundInEditor))})}_computeAsync(e){return hee(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;let t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new Dh(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){let n=document.createDocumentFragment(),r=this._register(new kg(this._keybindingService)),o,s={fragment:n,statusBar:r,setColorPicker:g=>o=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),o===void 0)return;this.body.classList.add("standalone-colorpicker-body"),this.body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this.body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this.body.tabIndex=0,this.body.appendChild(n),o.layout();let a=o.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-J_e-fee,d=o.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});let u=o.header,h=u.pickedColorNode;h.style.width=l+fee+"px";let p=u.originalColorNode;p.style.width=c+"px";let m=o.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};X9.ID="editor.contrib.standaloneColorPickerWidget";X9=pee([ta(3,He),ta(4,Ci),ta(5,Bt),ta(6,be),ta(7,Tt)],X9);AM=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var LM,MM,DM,_ee=M(()=>{Ze();De();vee();jt();Yi();q9();LM=class extends ua{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:xe.CommandPalette}]})}runEditorCommand(e,t){var n;(n=wc.get(t))===null||n===void 0||n.showOrFocus()}},MM=class extends se{constructor(){super({id:"editor.action.hideColorPicker",label:v({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:O.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=wc.get(t))===null||n===void 0||n.hide()}},DM=class extends se{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:O.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=wc.get(t))===null||n===void 0||n.insertColor()}};X(MM);X(DM);mi(LM)});function Fv(i){return{asString:()=>bee(this,void 0,void 0,function*(){return i}),asFile:()=>{},value:typeof i=="string"?i:void 0}}function yee(i,e,t){let n={id:Sd(),name:i,uri:e,data:t};return{asString:()=>bee(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}function Q9(i){return i.toLowerCase()}function Cee(i,e){return See(Q9(i),e.map(Q9))}function See(i,e){if(i==="*/*")return e.length>0;if(e.includes(i))return!0;let t=i.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[n,r,o]=t;return o==="*"?e.some(s=>s.startsWith(r+"/")):!1}var bee,cm,Nh,Hv=M(()=>{oi();Tm();q0();bee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};cm=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return ao.some(this,([n,r])=>r.asFile())&&t.push("files"),See(Q9(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){let n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(let[e,t]of this._entries)for(let n of t)yield[e,n]}toKey(e){return Q9(e)}};Nh=Object.freeze({create:i=>FR(i.map(e=>e.toString())).join(`\r +`)}Pi(f,I)},sort:function(f,_){var C,x,I,D,F;function B(){if(_.argString){var Ci=new ot.default.StringStream(_.argString);if(Ci.eat("!")&&(C=!0),Ci.eol())return;if(!Ci.eatSpace())return"Invalid arguments";var Jt=Ci.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Jt&&!Ci.eol())return"Invalid arguments";if(Jt[1]){x=Jt[1].indexOf("i")!=-1,I=Jt[1].indexOf("u")!=-1;var pr=Jt[1].indexOf("d")!=-1||Jt[1].indexOf("n")!=-1&&1,oo=Jt[1].indexOf("x")!=-1&&1,Kr=Jt[1].indexOf("o")!=-1&&1;if(pr+oo+Kr>1)return"Invalid arguments";D=pr&&"decimal"||oo&&"hex"||Kr&&"octal"}Jt[2]&&(F=new RegExp(Jt[2].substr(1,Jt[2].length-2),x?"i":""))}}var z=B();if(z){Pi(f,z+": "+_.argString);return}var G=_.line||f.firstLine(),ee=_.lineEnd||_.line||f.lastLine();if(G==ee)return;var ve=new Fe(G,0),pe=new Fe(ee,Bn(f,ee)),ue=f.getRange(ve,pe).split(` +`),Ve=F||(D=="decimal"?/(-?)([\d]+)/:D=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:D=="octal"?/([0-7]+)/:null),Ge=D=="decimal"?10:D=="hex"?16:D=="octal"?8:null,Ue=[],It=[];if(D||F)for(var yt=0;yt=G){Pi(f,"Invalid argument: "+_.argString.substring(I));return}for(var ee=0;ee<=G-z;ee++){var ve=String.fromCharCode(z+ee);delete C.marks[ve]}}else{Pi(f,"Invalid argument: "+F+"-");return}}else delete C.marks[D]}}},sa=new TN;function Yne(w,f,_,C,x,I,D,F,B){w.state.vim.exMode=!0;var z=!1,G,ee,ve;function pe(){w.operation(function(){for(;!z;)ue(),Ge();Ue()})}function ue(){var yt=w.getRange(I.from(),I.to()),Ct=yt.replace(D,F),Fi=I.to().line;I.replace(Ct),ee=I.to().line,x+=ee-Fi,ve=ee1&&(DN(w,f,f.insertModeRepeat-1,!0),f.lastEditInputState.repeatOverride=f.insertModeRepeat),delete f.insertModeRepeat,f.insertMode=!1,w.setCursor(w.getCursor().line,w.getCursor().ch-1),w.setOption("keyMap","vim"),w.setOption("disableInput",!0),w.toggleOverwrite(!1),C.setText(I.changes.join("")),ot.default.signal(w,"vim-mode-change",{mode:"normal"}),_.isRecording&&Zne(_),w.enterVimMode()}function IN(w){Ir.unshift(w)}function Xne(w,f,_,C,x){var I={keys:w,type:f};I[f]=_,I[f+"Args"]=C;for(var D in x)I[D]=x[D];IN(I)}Xe("insertModeEscKeysTimeout",200,"number"),ot.default.keyMap["vim-insert"]={fallthrough:["default"],attach:r,detach:n,call:o},ot.default.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:r,detach:n,call:o};function Qne(w,f,_,C){var x=$.registerController.getRegister(C);if(C==":"){x.keyBuffer[0]&&sa.processCommand(w,x.keyBuffer[0]),_.isPlaying=!1;return}var I=x.keyBuffer,D=0;_.isPlaying=!0,_.replaySearchQueries=x.searchQueries.slice(0);for(var F=0;F|<\w+>|./.exec(B),G=z[0],B=B.substring(z.index+G.length),de.handleKey(w,G,"macro"),f.insertMode){var ee=x.insertModeChanges[D++].changes;$.macroModeState.lastInsertModeChanges.changes=ee,NN(w,ee,1),ym(w)}_.isPlaying=!1}function Jne(w,f){if(!w.isPlaying){var _=w.latestRegister,C=$.registerController.getRegister(_);C&&C.pushText(f)}}function Zne(w){if(!w.isPlaying){var f=w.latestRegister,_=$.registerController.getRegister(f);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(w.lastInsertModeChanges)}}function ere(w,f){if(!w.isPlaying){var _=w.latestRegister,C=$.registerController.getRegister(_);C&&C.pushSearchQuery&&C.pushSearchQuery(f)}}function AN(w,f){var _=$.macroModeState,C=_.lastInsertModeChanges;if(!_.isPlaying)for(;f;){if(C.expectCursorActivityForChange=!0,C.ignoreCount>1)C.ignoreCount--;else if(f.origin=="+input"||f.origin=="paste"||f.origin===void 0){var x=w.listSelections().length;x>1&&(C.ignoreCount=x);var I=f.text.join(` +`);C.maybeReset&&(C.changes=[],C.maybeReset=!1),I&&(w.state.overwrite&&!/\n/.test(I)?C.changes.push([I]):C.changes.push(I))}f=f.next}}function LN(w){var f=w.state.vim;if(f.insertMode){var _=$.macroModeState;if(_.isPlaying)return;var C=_.lastInsertModeChanges;C.expectCursorActivityForChange?C.expectCursorActivityForChange=!1:C.maybeReset=!0}else w.curOp.isVimOp||tre(w,f)}function tre(w,f){var _=w.getCursor("anchor"),C=w.getCursor("head");if(f.visualMode&&!w.somethingSelected()?na(w,!1):!f.visualMode&&!f.insertMode&&w.somethingSelected()&&(f.visualMode=!0,f.visualLine=!1,ot.default.signal(w,"vim-mode-change",{mode:"visual"})),f.visualMode){var x=An(C,_)?0:-1,I=An(C,_)?-1:0;C=Hn(C,0,x),_=Hn(_,0,I),f.sel={anchor:_,head:C},pl(w,f,"<",Jo(C,_)),pl(w,f,">",Gd(C,_))}else f.insertMode||(f.lastHPos=w.getCursor().ch)}function qS(w){this.keyName=w}function MN(w){var f=$.macroModeState,_=f.lastInsertModeChanges,C=ot.default.keyName(w);if(!C)return;function x(){return _.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new qS(C)),!0}(C.indexOf("Delete")!=-1||C.indexOf("Backspace")!=-1)&&ot.default.lookupKey(C,"vim-insert",x)}function DN(w,f,_,C){var x=$.macroModeState;x.isPlaying=!0;var I=!!f.lastEditActionCommand,D=f.inputState;function F(){I?$i.processAction(w,f,f.lastEditActionCommand):$i.evalInput(w,f)}function B(G){if(x.lastInsertModeChanges.changes.length>0){G=f.lastEditActionCommand?G:1;var ee=x.lastInsertModeChanges;NN(w,ee.changes,G)}}if(f.inputState=f.lastEditInputState,I&&f.lastEditActionCommand.interlaceInsertRepeat)for(var z=0;z<_;z++)F(),B(1);else C||F(),B(_);f.inputState=D,f.insertMode&&!C&&ym(w),x.isPlaying=!1}function NN(w,f,_){function C(ee){return typeof ee=="string"?ot.default.commands[ee](w):ee(w),!0}var x=w.getCursor("head"),I=$.macroModeState.lastInsertModeChanges.visualBlock;I&&(dN(w,x,I+1),_=w.listSelections().length,w.setCursor(x));for(var D=0;D<_;D++){I&&w.setCursor(Hn(x,D,0));for(var F=0;F{"use strict";Object.defineProperty(P9,"__esModule",{value:!0});P9.default=void 0;function T_e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function hJ(i,e){for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:null;T_e(this,i),this.closeInput=function(){n.removeInputListeners(),n.input=null,n.setSec(""),n.editor&&n.editor.focus()},this.clear=function(){n.setInnerHtml_(n.node,"")},this.inputKeyUp=function(o){var s=n.input.options;s&&s.onKeyUp&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputKeyInput=function(o){var s=n.input.options;s&&s.onKeyInput&&s.onKeyUp(o,o.target.value,n.closeInput)},this.inputBlur=function(){var o=n.input.options;o.closeOnBlur&&n.closeInput()},this.inputKeyDown=function(o){var s=n.input,a=s.options,l=s.callback;a&&a.onKeyDown&&a.onKeyDown(o,o.target.value,n.closeInput)||((o.keyCode===27||a&&a.closeOnEnter!==!1&&o.keyCode==13)&&(n.input.node.blur(),o.stopPropagation(),n.closeInput()),o.keyCode===13&&l&&(o.stopPropagation(),o.preventDefault(),l(o.target.value)))},this.node=e,this.modeInfoNode=document.createElement("span"),this.secInfoNode=document.createElement("span"),this.notifNode=document.createElement("span"),this.notifNode.className="vim-notification",this.keyInfoNode=document.createElement("span"),this.keyInfoNode.setAttribute("style","float: right"),this.node.appendChild(this.modeInfoNode),this.node.appendChild(this.secInfoNode),this.node.appendChild(this.notifNode),this.node.appendChild(this.keyInfoNode),this.toggleVisibility(!1),this.editor=t,this.sanitizer=r}return k_e(i,[{key:"setMode",value:function(t){if(t.mode==="visual"){t.subMode==="linewise"?this.setText("--VISUAL LINE--"):t.subMode==="blockwise"?this.setText("--VISUAL BLOCK--"):this.setText("--VISUAL--");return}this.setText("--".concat(t.mode.toUpperCase(),"--"))}},{key:"setKeyBuffer",value:function(t){this.keyInfoNode.textContent=t}},{key:"setSec",value:function(t,n,r){if(this.notifNode.textContent="",t===void 0)return this.closeInput;this.setInnerHtml_(this.secInfoNode,t);var o=this.secInfoNode.querySelector("input");return o&&(o.focus(),this.input={callback:n,options:r,node:o},r&&(r.selectValueOnOpen&&o.select(),r.value&&(o.value=r.value)),this.addInputListeners()),this.closeInput}},{key:"setText",value:function(t){this.modeInfoNode.textContent=t}},{key:"toggleVisibility",value:function(t){t?this.node.style.display="block":this.node.style.display="none",this.input&&this.removeInputListeners(),clearInterval(this.notifTimeout)}},{key:"addInputListeners",value:function(){var t=this.input.node;t.addEventListener("keyup",this.inputKeyUp),t.addEventListener("keydown",this.inputKeyDown),t.addEventListener("input",this.inputKeyInput),t.addEventListener("blur",this.inputBlur)}},{key:"removeInputListeners",value:function(){if(!(!this.input||!this.input.node)){var t=this.input.node;t.removeEventListener("keyup",this.inputKeyUp),t.removeEventListener("keydown",this.inputKeyDown),t.removeEventListener("input",this.inputKeyInput),t.removeEventListener("blur",this.inputBlur)}}},{key:"showNotification",value:function(t){var n=this,r=document.createElement("span");this.setInnerHtml_(r,t),this.notifNode.textContent=r.textContent,this.notifTimeout=setTimeout(function(){n.notifNode.textContent=""},5e3)}},{key:"setInnerHtml_",value:function(t,n){for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);n&&(this.sanitizer?t.appendChild(this.sanitizer(n)):t.appendChild(n))}}]),i}();P9.default=I_e});var vJ=gt(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});Object.defineProperty(Lv,"StatusBar",{enumerable:!0,get:function(){return mJ.default}});Object.defineProperty(Lv,"VimMode",{enumerable:!0,get:function(){return pJ.default}});Lv.initVimMode=A_e;var pJ=gJ(uJ()),mJ=gJ(fJ());function gJ(i){return i&&i.__esModule?i:{default:i}}function A_e(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mJ.default,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,r=new pJ.default(i);if(!e)return r.attach(),r;var o=new t(e,i,n),s="";return r.on("vim-mode-change",function(a){o.setMode(a)}),r.on("vim-keypress",function(a){a===":"?s="":s+=a,o.setKeyBuffer(s)}),r.on("vim-command-done",function(){s="",o.setKeyBuffer(s)}),r.on("dispose",function(){o.toggleVisibility(!1),o.closeInput(),o.clear()}),o.toggleVisibility(!0),r.setStatusBar(o),r.attach(),r}});var _J=M(()=>{We();J({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>import("./abap-VYBXOYTR.js")})});var bJ=M(()=>{We();J({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>import("./apex-TX7MH4KD.js")})});var yJ=M(()=>{We();J({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>import("./azcli-4VJUQQIN.js")})});var CJ=M(()=>{We();J({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>import("./bat-GGHBGELM.js")})});var SJ=M(()=>{We();J({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>import("./bicep-VJO6NXPN.js")})});var wJ=M(()=>{We();J({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>import("./cameligo-UR3AUYFW.js")})});var xJ=M(()=>{We();J({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>import("./clojure-HKNOPZTO.js")})});var EJ=M(()=>{We();J({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>import("./coffee-D22KHGF2.js")})});var TJ=M(()=>{We();J({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>import("./cpp-4OJPINLR.js")});J({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>import("./cpp-4OJPINLR.js")})});var kJ=M(()=>{We();J({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>import("./csharp-CO24EJBG.js")})});var IJ=M(()=>{We();J({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>import("./csp-IIWFJS55.js")})});var AJ=M(()=>{We();J({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>import("./cypher-MRKLWMJ6.js")})});var LJ=M(()=>{We();J({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>import("./dart-54INGSZP.js")})});var MJ=M(()=>{We();J({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>import("./ecl-NCOHKGIC.js")})});var DJ=M(()=>{We();J({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>import("./flow9-GEURGHNI.js")})});var NJ=M(()=>{We();J({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>import("./fsharp-4XUTEIEV.js")})});var RJ=M(()=>{We();J({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationDollar)});J({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAngleInterpolationDollar)});J({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagBracketInterpolationDollar)});J({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAngleInterpolationBracket)});J({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagBracketInterpolationBracket)});J({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationDollar)});J({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>import("./freemarker2-JH3C2VO4.js").then(i=>i.TagAutoInterpolationBracket)})});var OJ=M(()=>{We();J({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>import("./go-7PU7V5QM.js")})});var PJ=M(()=>{We();J({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>import("./graphql-3VYTYJI7.js")})});var FJ=M(()=>{We();J({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>import("./handlebars-I7OT4MKQ.js")})});var HJ=M(()=>{We();J({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>import("./hcl-3IH2WNWU.js")})});var BJ=M(()=>{We();J({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>import("./ini-SAC6XGQK.js")})});var zJ=M(()=>{We();J({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>import("./java-762AWQ7Q.js")})});var UJ=M(()=>{We();J({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>import("./julia-KMBRGMB6.js")})});var WJ=M(()=>{We();J({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>import("./kotlin-Y26LRM5H.js")})});var jJ=M(()=>{We();J({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>import("./less-BQYAE3BL.js")})});var VJ=M(()=>{We();J({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>import("./lexon-VICO4FWU.js")})});var KJ=M(()=>{We();J({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>import("./lua-6ATHF4JU.js")})});var qJ=M(()=>{We();J({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>import("./liquid-UKLXN46U.js")})});var GJ=M(()=>{We();J({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>import("./m3-DNAEBIGJ.js")})});var $J=M(()=>{We();J({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>import("./mips-IPQV376U.js")})});var YJ=M(()=>{We();J({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>import("./msdax-HKSHOV4H.js")})});var XJ=M(()=>{We();J({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>import("./mysql-XLCHJKYF.js")})});var QJ=M(()=>{We();J({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>import("./objective-c-I4JUFUGM.js")})});var JJ=M(()=>{We();J({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>import("./pascal-E5LHFI46.js")})});var ZJ=M(()=>{We();J({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>import("./pascaligo-LPFC4UYC.js")})});var eZ=M(()=>{We();J({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>import("./perl-G7VYOET6.js")})});var tZ=M(()=>{We();J({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>import("./pgsql-N5O4YY4C.js")})});var iZ=M(()=>{We();J({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>import("./php-WZLUZOLP.js")})});var nZ=M(()=>{We();J({id:"pla",extensions:[".pla"],loader:()=>import("./pla-H5HBSQU6.js")})});var rZ=M(()=>{We();J({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>import("./postiats-DW5JOKUY.js")})});var oZ=M(()=>{We();J({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>import("./powerquery-U2SJQ4GY.js")})});var sZ=M(()=>{We();J({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>import("./powershell-2I7YAJDI.js")})});var aZ=M(()=>{We();J({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>import("./protobuf-VHYMBWLK.js")})});var lZ=M(()=>{We();J({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>import("./pug-4DWSGGAY.js")})});var cZ=M(()=>{We();J({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>import("./python-WBHPPKA6.js")})});var dZ=M(()=>{We();J({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>import("./qsharp-ZSWEFMQ3.js")})});var uZ=M(()=>{We();J({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>import("./r-VB2OINAG.js")})});var hZ=M(()=>{We();J({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>import("./razor-NKQUIAEM.js")})});var fZ=M(()=>{We();J({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>import("./redis-ZN6WMKI6.js")})});var pZ=M(()=>{We();J({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>import("./redshift-XCPPMXUQ.js")})});var mZ=M(()=>{We();J({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>import("./restructuredtext-ER4MI2XR.js")})});var gZ=M(()=>{We();J({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>import("./ruby-CSSRCZFH.js")})});var vZ=M(()=>{We();J({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>import("./rust-5BMB6PXP.js")})});var _Z=M(()=>{We();J({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>import("./sb-CO5DRU6K.js")})});var bZ=M(()=>{We();J({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>import("./scala-2A54SA4F.js")})});var yZ=M(()=>{We();J({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>import("./scheme-E7EIA2LY.js")})});var CZ=M(()=>{We();J({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>import("./scss-I2L7ETRM.js")})});var SZ=M(()=>{We();J({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>import("./shell-HJPXH727.js")})});var wZ=M(()=>{We();J({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>import("./solidity-HQYKJ4L6.js")})});var xZ=M(()=>{We();J({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>import("./sophia-XI5N2KCD.js")})});var EZ=M(()=>{We();J({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>import("./sparql-2SIMXPG5.js")})});var TZ=M(()=>{We();J({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>import("./st-FYPD7SP3.js")})});var kZ=M(()=>{We();J({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>import("./swift-J3SBMK25.js")})});var IZ=M(()=>{We();J({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>import("./systemverilog-LCVLURC4.js")});J({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>import("./systemverilog-LCVLURC4.js")})});var AZ=M(()=>{We();J({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>import("./tcl-MVCXVVYJ.js")})});var LZ=M(()=>{We();J({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>import("./twig-7LCZB2JP.js")})});var MZ=M(()=>{We();J({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>import("./typescript-ZY5TS6P4.js")})});var DZ=M(()=>{We();J({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>import("./vb-LTQDQXEO.js")})});var NZ=M(()=>{We();J({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>import("./wgsl-FJRYFANV.js")})});var RZ=M(()=>{We();J({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>import("./yaml-GBPQMMHS.js")})});var OZ=M(()=>{Os();_J();bJ();yJ();CJ();SJ();wJ();xJ();EJ();TJ();kJ();IJ();kL();AJ();LJ();LL();MJ();wL();DJ();NJ();RJ();OJ();PJ();FJ();HJ();IL();BJ();zJ();EL();UJ();WJ();jJ();VJ();KJ();qJ();GJ();xL();$J();YJ();XJ();QJ();JJ();ZJ();eZ();tZ();iZ();nZ();rZ();oZ();sZ();aZ();lZ();cZ();dZ();uZ();hZ();fZ();pZ();mZ();gZ();vZ();_Z();bZ();yZ();CZ();SZ();wZ();xZ();EZ();TL();TZ();kZ();IZ();AZ();LZ();MZ();DZ();NZ();AL();RZ();});function JL(){return import("./cssMode-OAEHF6O6.js")}var L_e,M_e,D_e,N_e,PZ,R_e,im,YL,XL,QL,FZ,HZ,BZ,zZ=M(()=>{Os();Os();L_e=Object.defineProperty,M_e=Object.getOwnPropertyDescriptor,D_e=Object.getOwnPropertyNames,N_e=Object.prototype.hasOwnProperty,PZ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D_e(e))!N_e.call(i,r)&&r!==t&&L_e(i,r,{get:()=>e[r],enumerable:!(n=M_e(e,r))||n.enumerable});return i},R_e=(i,e,t)=>(PZ(i,e,"default"),t&&PZ(t,e,"default")),im={};R_e(im,Rs);YL=class{constructor(i,e,t){Cn(this,"_onDidChange",new im.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(i){this.setOptions(i)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},XL={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},QL={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},FZ=new YL("css",XL,QL),HZ=new YL("scss",XL,QL),BZ=new YL("less",XL,QL);im.languages.css={cssDefaults:FZ,lessDefaults:BZ,scssDefaults:HZ};im.languages.onLanguage("less",()=>{JL().then(i=>i.setupMode(BZ))});im.languages.onLanguage("scss",()=>{JL().then(i=>i.setupMode(HZ))});im.languages.onLanguage("css",()=>{JL().then(i=>i.setupMode(FZ))})});function B9(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===Mv,documentFormattingEdits:i===Mv,documentRangeFormattingEdits:i===Mv}}function K_e(){return import("./htmlMode-BWGWQOXA.js")}function z9(i,e=H9,t=B9(i)){let n=new z_e(i,e,t),r,o=F9.languages.onLanguage(i,async()=>{r=(await K_e()).setupMode(n)});return{defaults:n,dispose(){o.dispose(),r==null||r.dispose(),r=void 0}}}var O_e,P_e,F_e,H_e,UZ,B_e,F9,z_e,U_e,H9,Mv,WZ,jZ,VZ,W_e,KZ,j_e,qZ,V_e,GZ=M(()=>{Os();Os();O_e=Object.defineProperty,P_e=Object.getOwnPropertyDescriptor,F_e=Object.getOwnPropertyNames,H_e=Object.prototype.hasOwnProperty,UZ=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of F_e(e))!H_e.call(i,r)&&r!==t&&O_e(i,r,{get:()=>e[r],enumerable:!(n=P_e(e,r))||n.enumerable});return i},B_e=(i,e,t)=>(UZ(i,e,"default"),t&&UZ(t,e,"default")),F9={};B_e(F9,Rs);z_e=class{constructor(i,e,t){Cn(this,"_onDidChange",new F9.Emitter);Cn(this,"_options");Cn(this,"_modeConfiguration");Cn(this,"_languageId");this._languageId=i,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(i){this._options=i||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(i){this._modeConfiguration=i||Object.create(null),this._onDidChange.fire(this)}},U_e={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},H9={format:U_e,suggest:{},data:{useDefaultDataProvider:!0}};Mv="html",WZ="handlebars",jZ="razor",VZ=z9(Mv,H9,B9(Mv)),W_e=VZ.defaults,KZ=z9(WZ,H9,B9(WZ)),j_e=KZ.defaults,qZ=z9(jZ,H9,B9(jZ)),V_e=qZ.defaults;F9.languages.html={htmlDefaults:W_e,razorDefaults:V_e,handlebarDefaults:j_e,htmlLanguageService:VZ,handlebarLanguageService:KZ,razorLanguageService:qZ,registerHTMLLanguageService:z9}});function ZL(i,e,t){return $Z(this,void 0,void 0,function*(){let n=i.ordered(e),r=new Map,o=new nm,s=n.map((a,l)=>$Z(this,void 0,void 0,function*(){r.set(a,l);try{let c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&o.add(c,a)}catch(c){Ut(c)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:r.get(a.provider)r.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),o})}var $Z,nm,eM=M(()=>{gi();At();Ce();Mi();Sn();is();zi();xt();$Z=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},nm=class{constructor(){this.lenses=[],this._disposables=new ne}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let n of e.lenses)this.lenses.push({symbol:n,provider:t})}};St.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;Lt(ht.isUri(t)),Lt(typeof n=="number"||!n);let{codeLensProvider:r}=i.get(be),o=i.get(Si).getModel(t);if(!o)throw Ao();let s=[],a=new ne;return ZL(r,o,et.None).then(l=>{a.add(l);let c=[];for(let d of l.lenses)n==null||d.symbol.command?s.push(d.symbol):n-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(o,d.symbol,et.None)).then(u=>s.push(u||d.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var q_e,G_e,iM,U9,tM,YZ=M(()=>{Dt();WN();tf();qe();eM();bl();Et();cu();q_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},G_e=function(i,e){return function(t,n){e(t,n,i)}},iM=rr("ICodeLensCache"),U9=class{constructor(e,t){this.lineCount=e,this.data=t}},tM=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new fa(20,.75);let t="codelens/cache";sO(()=>e.remove(t,1));let n="codelens/cache2",r=e.get(n,1,"{}");this._deserialize(r),c_(e.onWillSaveState)(o=>{o.reason===lb.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){let n=t.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new nm;r.add({lenses:n,dispose:()=>{}},this._fakeProvider);let o=new U9(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){let t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){let e=Object.create(null);for(let[t,n]of this._cache){let r=new Set;for(let o of n.data.lenses)r.add(o.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let n in t){let r=t[n],o=[];for(let a of r.lines)o.push({range:new P(a,1,a,11)});let s=new nm;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(n,new U9(r.lineCount,s))}}catch(t){}}};tM=q_e([G_e(0,Yr)],tM);sr(iM,tM,1)});var XZ=M(()=>{});var QZ=M(()=>{XZ()});var nM,W9,rm,JZ,Dv,ZZ=M(()=>{Ht();Nre();QZ();qe();qn();nM=class{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}},W9=class i{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${i._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();let n=[],r=!1;for(let o=0;o{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:JZ},u=>this._decorationIds[d]=u),a?a=P.plusRange(a,c.symbol.range):a=P.lift(c.symbol.range)}),this._viewZone=new nM(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new W9(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{let n=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(n&&P.isEmpty(r.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,r)=>{t.addDecoration({range:n.symbol.range,options:JZ},o=>this._decorationIds[r]=o)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t{Dt();At();Ce();cb();Ze();Xm();jt();eM();YZ();ZZ();De();zi();Oo();Ll();Ns();xt();$_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Nv=function(i,e){return function(t,n){e(t,n,i)}},Y_e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},om=class{constructor(e,t,n,r,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new ne,this._localToDispose=new ne,this._lenses=[],this._oldCodeLensModels=new ne,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new ti(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(48)||a.hasChanged(17)||a.hasChanged(16))&&this._updateLensStyle(),a.hasChanged(15)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){let e=Math.max(1.3,this._editor.getOption(64)/this._editor.getOption(50)),t=this._editor.getOption(17);return(!t||t<5)&&(t=this._editor.getOption(50)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(16),r=this._editor.getOption(48),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),n&&(o.setProperty("--vscode-editorCodeLens-fontFamily",n),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Y_.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(15))return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(wl(()=>{let r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(let r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){let o=r.onDidChange(()=>n.schedule());this._localToDispose.add(o)}let n=new ti(()=>{var r;let o=Date.now();(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=Vt(s=>ZL(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);let a=this._provideCodeLensDebounce.update(e,Date.now()-o);n.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},at)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(Ft(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var r;this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{let a=[],l=-1;this._lenses.forEach(d=>{!d.isValid()||l===d.getLineNumber()?a.push(d):(d.update(s),l=d.getLineNumber())});let c=new rm;a.forEach(d=>{d.dispose(c,s),this._lenses.splice(this._lenses.indexOf(d),1)}),c.commit(o)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(r=this._resolveCodeLensesPromise)===null||r===void 0||r.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Ft(()=>{if(this._editor.getModel()){let r=Ea.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(let s of this._lenses){let a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){let n=new rm;for(let r of this._lenses)r.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),n=[],r;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],n.push(r)))}if(!n.length&&!this._lenses.length)return;let o=Ea.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new rm,d=0,u=0;for(;uthis._resolveCodeLensesInViewportSoon())),d++,u++)}for(;dthis._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;let t=this._editor.getModel();if(!t)return;let n=[],r=[];if(this._lenses.forEach(a=>{let l=a.computeIfNecessary(t);l&&(n.push(l),r.push(a))}),n.length===0)return;let o=Date.now(),s=Vt(a=>{let l=n.map((c,d)=>{let u=new Array(c.length),h=c.map((p,m)=>!p.symbol.command&&typeof p.provider.resolveCodeLens=="function"?Promise.resolve(p.provider.resolveCodeLens(t,p.symbol,a)).then(g=>{u[m]=g},Ut):(u[m]=p.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!r[d].isDisposed()&&r[d].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{let a=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{at(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};om.ID="css.editor.codeLens";om=$_e([Nv(1,be),Nv(2,an),Nv(3,ui),Nv(4,Ei),Nv(5,iM)],om);Ae(om.ID,om,1);X(class extends se{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:O.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return Y_e(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(lr),r=e.get(ui),o=e.get(Ei),s=t.getSelection().positionLineNumber,a=t.getContribution(om.ID);if(!a)return;let l=a.getModel();if(!l)return;let c=[];for(let u of l.lenses)u.symbol.command&&u.symbol.range.startLineNumber===s&&c.push({label:u.symbol.command.title,command:u.symbol.command});if(c.length===0)return;let d=yield n.pick(c,{canPickMany:!1});if(d){if(l.isDisposed)return yield r.executeCommand(this.id);try{yield r.executeCommand(d.command.id,...d.command.arguments||[])}catch(u){o.error(u)}}})}})});var X_e,rM,Q_e,Dh,oM,sM=M(()=>{ma();loe();is();Kn();Ce();xt();Eb();X_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},rM=function(i,e){return function(t,n){e(t,n,i)}},Q_e=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Dh=class{constructor(e,t){this._editorWorkerClient=new uF(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return Q_e(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){let r=t.range,o=t.color,s=o.alpha,a=new dt(new As(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?dt.Format.CSS.formatRGB(a):dt.Format.CSS.formatRGBA(a),c=s?dt.Format.CSS.formatHSL(a):dt.Format.CSS.formatHSLA(a),d=s?dt.Format.CSS.formatHex(a):dt.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:r,text:l}}),u.push({label:c,textEdit:{range:r,text:c}}),u.push({label:d,textEdit:{range:r,text:d}}),u}},oM=class extends oe{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new Dh(e,t)))}};oM=X_e([rM(0,Si),rM(1,Tt),rM(2,be)],oM);Yc(oM)});function j9(i,e,t,n=!0){return Rv(this,void 0,void 0,function*(){return uM(new aM,i,e,t,n)})}function dM(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}function uM(i,e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=!1,s,a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){let d=l[c];if(d instanceof Dh)s=d;else try{(yield i.compute(d,t,n,a))&&(o=!0)}catch(u){Ut(u)}}return o?a:s&&r?(yield i.compute(s,t,n,a),a):[]})}function tee(i,e){let{colorProvider:t}=i.get(be),n=i.get(Si).getModel(e);if(!n)throw Ao();let r=i.get(Mt).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:r}}var Rv,aM,lM,cM,hM=M(()=>{gi();At();Sn();qe();is();zi();xt();sM();jn();Rv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};aM=class{constructor(){}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)})}},lM=class{constructor(){}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,n);if(Array.isArray(o))for(let s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}},cM=class{constructor(e){this.colorInfo=e}compute(e,t,n,r){return Rv(this,void 0,void 0,function*(){let o=yield e.provideColorPresentations(t,this.colorInfo,et.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)})}};St.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof ht))throw Ao();let{model:n,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=tee(i,t);return uM(new lM,r,n,et.None,o)});St.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,n]=e,{uri:r,range:o}=n;if(!(r instanceof ht)||!Array.isArray(t)||t.length!==4||!P.isIRange(o))throw Ao();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=tee(i,r),[c,d,u,h]=t;return uM(new cM({range:o,color:{red:c,green:d,blue:u,alpha:h}}),a,s,et.None,l)})});var J_e,fM,iee,mM,wc,pM,gM=M(()=>{Dt();ma();At();qt();Ce();ml();wi();KP();Ze();qe();qn();Ns();xt();hM();jn();J_e=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fM=function(i,e){return function(t,n){e(t,n,i)}},iee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},mM=Object.create({}),wc=class nee extends oe{constructor(e,t,n,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new ne),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Cb(this._editor),this._decoratorLimitReporter=new pM,this._colorDecorationClassRefs=this._register(new ne),this._debounceInformation=r.for(n.colorProvider,"Document Colors",{min:nee.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142);let a=s!==this._isColorDecoratorsEnabled||o.hasChanged(19),l=o.hasChanged(142);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){let r=n.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;let e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new as,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return iee(this,void 0,void 0,function*(){this._computePromise=Vt(e=>iee(this,void 0,void 0,function*(){let t=this._editor.getModel();if(!t)return[];let n=new Ln(!1),r=yield j9(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),r}));try{let e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){at(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){let t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:ct.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],n=this._editor.getOption(19);for(let o=0;othis._colorDatas.has(r.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};wc.ID="editor.contrib.colorDetector";wc.RECOMPUTE_TIME=1e3;wc=J_e([fM(1,Mt),fM(2,be),fM(3,an)],wc);pM=class{constructor(){this._onDidChange=new $e,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};Ae(wc.ID,wc,1)});var V9,ree=M(()=>{qt();V9=class{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new $e,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new $e,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let r=0;r{});var K9=M(()=>{oee()});var Io,vM,_M,bM,yM,q9,CM,SM,wM,G9,see=M(()=>{JS();Ht();Fre();Zm();or();ma();qt();Ce();qr();K9();De();_r();Al();Io=fe,vM=class extends oe{constructor(e,t,n,r=!1){super(),this.model=t,this.showingStandaloneColorPicker=r,this._closeButton=null,this._domNode=Io(".colorpicker-header"),me(e,this._domNode),this._pickedColorNode=me(this._domNode,Io(".picked-color"));let o=v("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=me(this._domNode,Io(".original-color")),this._originalColorNode.style.backgroundColor=dt.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(Cw)||dt.white,this._register(n.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(Cw)||dt.white})),this._register(Rt(this._pickedColorNode,on.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Rt(this._originalColorNode,on.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=dt.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new _M(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=dt.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this._pickedColorNode.prepend(Io(".codicon.codicon-color-mode"))}},_M=class extends oe{constructor(e){super(),this._onClicked=this._register(new $e),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),me(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),me(this._button,t),me(t,Io(".button"+mt.asCSSSelector(Ti("color-picker-close",lt.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}},bM=class extends oe{constructor(e,t,n,r=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=Io(".colorpicker-body"),me(e,this._domNode),this._saturationBox=new yM(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new CM(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new SM(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new wM(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let n=this.model.color.hsva;this.model.color=new dt(new Pm(n.h,e,t,n.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new dt(new Pm(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,n=(1-e)*360;this.model.color=new dt(new Pm(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}},yM=class extends oe{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Io(".saturation-wrap"),me(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",me(this._domNode,this._canvas),this.selection=Io(".saturation-selection"),me(this._domNode,this.selection),this.layout(),this._register(Rt(this._domNode,on.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new Aw);let t=wn(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-t.left,r.pageY-t.top),()=>null);let n=Rt(document,on.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let n=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();let e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){let e=this.model.color.hsva,t=new dt(new Pm(e.h,1,1,1)),n=this._canvas.getContext("2d"),r=n.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");let o=n.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=dt.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}},q9=class extends oe{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new $e,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new $e,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=me(e,Io(".standalone-strip")),this.overlay=me(this.domNode,Io(".standalone-overlay"))):(this.domNode=me(e,Io(".strip")),this.overlay=me(this.domNode,Io(".overlay"))),this.slider=me(this.domNode,Io(".slider")),this.slider.style.top="0px",this._register(Rt(this.domNode,on.POINTER_DOWN,r=>this.onPointerDown(r))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new Aw),n=wn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-n.top),()=>null);let r=Rt(document,on.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){let t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}},CM=class extends q9{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){let{r:t,g:n,b:r}=e.rgba,o=new dt(new As(t,n,r,1)),s=new dt(new As(t,n,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},SM=class extends q9{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},wM=class extends oe{constructor(e){super(),this._onClicked=this._register(new $e),this.onClicked=this._onClicked.event,this._button=me(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}},G9=class extends Ds{constructor(e,t,n,r,o=!1){super(),this.model=t,this.pixelRatio=n,this._register(YN.onDidChange(()=>this.layout()));let s=Io(".colorpicker-widget");e.appendChild(s),this.header=this._register(new vM(s,this.model,r,o)),this.body=this._register(new bM(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}});function cee(i,e,t,n){return sm(this,void 0,void 0,function*(){let r=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,c=new As(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),d=new dt(c),u=yield dM(e,t,n,et.None),h=new V9(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,r),i instanceof Ov?new xM(i,P.lift(t.range),h,n):new EM(i,P.lift(t.range),h,n)})}function dee(i,e,t,n,r){if(n.length===0||!e.hasModel())return oe.None;let o=new ne,s=n[0],a=e.getModel(),l=s.model,c=o.add(new G9(r.fragment,l,e.getOption(138),t,i instanceof am));r.setColorPicker(c);let d=new P(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof am){let u=n[0].model.color;i.color=u,$9(a,l,u,d,s),o.add(l.onColorFlushed(h=>{i.color=h}))}else o.add(l.onColorFlushed(u=>sm(this,void 0,void 0,function*(){yield $9(a,l,u,d,s),d=uee(e,d,l,r)})));return o.add(l.onDidChangeColor(u=>{$9(a,l,u,d,s)})),o}function uee(i,e,t,n){let r,o;if(t.presentation.textEdit){r=[t.presentation.textEdit],o=new P(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);let s=i.getModel()._setTrackedRange(null,o,3);i.pushUndoStop(),i.executeEdits("colorpicker",r),o=i.getModel()._getTrackedRange(s)||o}else r=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),i.pushUndoStop(),i.executeEdits("colorpicker",r);return t.presentation.additionalTextEdits&&(r=[...t.presentation.additionalTextEdits],i.executeEdits("colorpicker",r),n&&n.hide()),i.pushUndoStop(),o}function $9(i,e,t,n,r){return sm(this,void 0,void 0,function*(){let o=yield dM(i,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},r.provider,et.None);e.colorPresentations=o||[]})}var aee,lee,sm,xM,Ov,EM,am,TM=M(()=>{Dt();gi();ma();Ce();qe();hM();gM();ree();see();ar();aee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},lee=function(i,e){return function(t,n){e(t,n,i)}},sm=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xM=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Ov=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return Rr.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return sm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];let r=wc.get(this._editor);if(!r)return[];for(let o of t){if(!r.isColorDecoration(o))continue;let s=r.getColorData(o.range.getStartPosition());if(s)return[yield cee(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return dee(this,this._editor,this._themeService,t,e)}};Ov=aee([lee(1,pn)],Ov);EM=class{constructor(e,t,n,r){this.owner=e,this.range=t,this.model=n,this.provider=r}},am=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return sm(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!wc.get(this._editor))return null;let o=yield j9(n,this._editor.getModel(),et.None),s=null,a=null;for(let u of o){let h=u.colorInfo;P.containsRange(h.range,e.range)&&(s=h,a=u.provider)}let l=s!=null?s:e,c=a!=null?a:t,d=!!s;return{colorHover:yield cee(this,this._editor.getModel(),l,c),foundInEditor:d}})}updateEditorModel(e){return sm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=e.model,n=new P(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield $9(this._editor.getModel(),t,this._color,n,e),n=uee(this._editor,n,t))})}renderHoverParts(e,t){return dee(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};am=aee([lee(1,pn)],am)});var Pv,hee=M(()=>{Ce();Ze();qe();gM();TM();aC();lc();Pv=class extends oe{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==mM||!t.range)return;let n=this._editor.getContribution(hr.ID);if(n&&!n.isColorPickerVisible()){let r=new P(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);n.showContentHover(r,1,0,!1)}}};Pv.ID="editor.contrib.colorContribution";Ae(Pv.ID,Pv,2);jo.register(Ov)});var mee,ta,fee,xc,pee,Z_e,Y9,kM,_ee=M(()=>{Ce();TM();Et();UT();Gn();qt();xt();Ze();jt();ft();is();Kn();sM();Ht();K9();mee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ta=function(i,e){return function(t,n){e(t,n,i)}},fee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},xc=class gee extends oe{constructor(e,t,n,r,o,s,a){super(),this._editor=e,this._modelService=n,this._keybindingService=r,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=O.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=O.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Y9(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(gee.ID)}};xc.ID="editor.contrib.standaloneColorPickerController";xc=mee([ta(1,Ke),ta(2,Si),ta(3,Bt),ta(4,He),ta(5,be),ta(6,Tt)],xc);Ae(xc.ID,xc,1);pee=8,Z_e=22,Y9=class vee extends oe{constructor(e,t,n,r,o,s,a,l){var c;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new $e),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(am,this._editor),this._position=(c=this._editor._getViewModel())===null||c===void 0?void 0:c.getPrimaryCursorState().viewState.position;let d=this._editor.getSelection(),u=d?{startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(Ts(this.body));this._register(h.onDidBlur(p=>{this.hide()})),this._register(h.onDidFocus(p=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(p=>{var m;let g=(m=p.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(p=>{this._render(p.value,p.foundInEditor)})),this._start(u),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return vee.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(58).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this.body.focus()}_start(e){return fee(this,void 0,void 0,function*(){let t=yield this._computeAsync(e);t&&this._onResult.fire(new kM(t.result,t.foundInEditor))})}_computeAsync(e){return fee(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;let t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new Dh(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){let n=document.createDocumentFragment(),r=this._register(new Tg(this._keybindingService)),o,s={fragment:n,statusBar:r,setColorPicker:g=>o=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),o===void 0)return;this.body.classList.add("standalone-colorpicker-body"),this.body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this.body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this.body.tabIndex=0,this.body.appendChild(n),o.layout();let a=o.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-Z_e-pee,d=o.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});let u=o.header,h=u.pickedColorNode;h.style.width=l+pee+"px";let p=u.originalColorNode;p.style.width=c+"px";let m=o.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(d&&(d.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Y9.ID="editor.contrib.standaloneColorPickerWidget";Y9=mee([ta(3,He),ta(4,Si),ta(5,Bt),ta(6,be),ta(7,Tt)],Y9);kM=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var IM,AM,LM,bee=M(()=>{Ze();De();_ee();jt();Yi();K9();IM=class extends ua{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:xe.CommandPalette}]})}runEditorCommand(e,t){var n;(n=xc.get(t))===null||n===void 0||n.showOrFocus()}},AM=class extends se{constructor(){super({id:"editor.action.hideColorPicker",label:v({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:O.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=xc.get(t))===null||n===void 0||n.hide()}},LM=class extends se{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:O.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=xc.get(t))===null||n===void 0||n.insertColor()}};X(AM);X(LM);mi(IM)});function Fv(i){return{asString:()=>yee(this,void 0,void 0,function*(){return i}),asFile:()=>{},value:typeof i=="string"?i:void 0}}function Cee(i,e,t){let n={id:Cd(),name:i,uri:e,data:t};return{asString:()=>yee(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}function X9(i){return i.toLowerCase()}function See(i,e){return wee(X9(i),e.map(X9))}function wee(i,e){if(i==="*/*")return e.length>0;if(e.includes(i))return!0;let t=i.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;let[n,r,o]=t;return o==="*"?e.some(s=>s.startsWith(r+"/")):!1}var yee,lm,Nh,Hv=M(()=>{oi();Em();K0();yee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};lm=class{constructor(){this._entries=new Map}get size(){let e=0;for(let t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){let t=[...this._entries.keys()];return ao.some(this,([n,r])=>r.asFile())&&t.push("files"),wee(X9(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){let n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(let[e,t]of this._entries)for(let n of t)yield[e,n]}toKey(e){return X9(e)}};Nh=Object.freeze({create:i=>OR(i.map(e=>e.toString())).join(`\r `),split:i=>i.split(`\r -`),parse:i=>Nh.split(i).filter(e=>!e.startsWith("#"))})});var RM,NM,Z_e,dm,OM=M(()=>{Fc();RM={EDITORS:"CodeEditors",FILES:"CodeFiles"},NM=class{},Z_e={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Lr.add(Z_e.DragAndDropContribution,new NM);dm=class i{constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};dm.INSTANCE=new dm});function PM(i){let e=new cm;for(let t of i.items){let n=t.type;if(t.kind==="string"){let r=new Promise(o=>t.getAsString(o));e.append(n,Fv(r))}else if(t.kind==="file"){let r=t.getAsFile();r&&e.append(n,tbe(r))}}return e}function tbe(i){let e=i.path?ht.parse(i.path):void 0;return yee(i.name,e,()=>ebe(this,void 0,void 0,function*(){return new Uint8Array(yield i.arrayBuffer())}))}function J9(i,e=!1){let t=PM(i),n=t.get(eb.INTERNAL_URI_LIST);if(n)t.replace(Vn.uriList,n);else if(e||!t.has(Vn.uriList)){let r=[];for(let o of i.items){let s=o.getAsFile();if(s){let a=s.path;try{a?r.push(ht.file(a).toString()):r.push(ht.parse(s.name,!0).toString())}catch(l){}}}r.length&&t.replace(Vn.uriList,Fv(Nh.create(r)))}for(let r of ibe)t.delete(r);return t}var ebe,ibe,FM=M(()=>{Mre();Hv();gw();Sn();OM();ebe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};ibe=Object.freeze([RM.EDITORS,RM.FILES,eb.RESOURCES,eb.INTERNAL_URI_LIST])});function wee(i,e,t){var n,r;return{edits:[...e.map(o=>new Q_(i,typeof t.insertText=="string"?{range:o,text:t.insertText,insertAsSnippet:!1}:{range:o,text:t.insertText.snippet,insertAsSnippet:!0})),...(r=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&r!==void 0?r:[]]}}var xee=M(()=>{Jm()});var Eee=M(()=>{});var Tee=M(()=>{Eee()});var Iee,Bv,kee,Z9,um,HM=M(()=>{Ht();coe();Oc();qt();Ce();Tee();Jm();ft();Tl();Et();Gn();Iee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bv=function(i,e){return function(t,n){e(t,n,i)}},kee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Z9=class Aee extends oe{constructor(e,t,n,r,o,s,a,l,c,d){super(),this.typeId=e,this.editor=t,this.showCommand=r,this.range=o,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=d,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(Ft(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Ft(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{o.containsPosition(u.position)||this.dispose()})),this._register(li.runAndSubscribe(d.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;let t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=fe(".post-edit-widget"),this.button=this._register(new pF(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(Rt(this.domNode,on.CLICK,()=>this.showSelector()))}getId(){return Aee.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=wn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Yh({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};Z9.baseId="editor.widget.postEditWidget";Z9=Iee([Bv(7,ls),Bv(8,Ke),Bv(9,Bt)],Z9);um=class extends oe{constructor(e,t,n,r,o,s){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=r,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new Hi),this._register(li.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,r){var o,s;return kee(this,void 0,void 0,function*(){let a=this._editor.getModel();if(!a||!e.length)return;let l=t.allEdits[t.activeEditIndex];if(!l)return;let c={edits:[...e.map(m=>new Q_(a.uri,typeof l.insertText=="string"?{range:m,text:l.insertText,insertAsSnippet:!1}:{range:m,text:l.insertText.snippet,insertAsSnippet:!0})),...(s=(o=l.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&s!==void 0?s:[]]},d=e[0],u=a.deltaDecorations([],[{range:d,options:{description:"paste-line-suffix",stickiness:0}}]),h,p;try{h=yield this._bulkEditService.apply(c,{editor:this._editor,token:r}),p=a.getDecorationRange(u[0])}finally{a.deltaDecorations(u,[])}n&&h.isApplied&&t.allEdits.length>1&&this.show(p!=null?p:d,t,m=>kee(this,void 0,void 0,function*(){let g=this._editor.getModel();g&&(yield g.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:m,allEdits:t.allEdits},n,r))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(Z9,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};um=Iee([Bv(4,He),Bv(5,Kc)],um)});function Lee(i,e){var t;return!!(!((t=i.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var nbe,hm,zd,zM,UM,BM,Ud,Dee=M(()=>{Ht();oi();Dt();Hv();Ce();gw();nr();q0();FM();Jm();qe();xt();xee();au();mg();De();Ym();ft();Et();qc();Ll();HM();nbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},hm=function(i,e){return function(t,n){e(t,n,i)}},zd=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},zM="editor.changePasteType",UM=new nt("pasteWidgetVisible",!1,v("pasteWidgetVisible","Whether the paste widget is showing")),BM="application/vnd.code.copyMetadata",Ud=class Mee extends oe{static get(e){return e.getContribution(Mee.ID)}constructor(e,t,n,r,o,s,a){super(),this._bulkEditService=n,this._clipboardService=r,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(Rt(l,"copy",c=>this.handleCopy(c))),this._register(Rt(l,"cut",c=>this.handleCopy(c))),this._register(Rt(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new yp("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(um,"pasteIntoEditor",e,UM,{id:zM,label:v("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(82).enabled&&!this._editor.getOption(88)}handleCopy(e){var t,n;if(!e.clipboardData||!this._editor.hasTextFocus()||!this.isPasteAsEnabled())return;let r=this._editor.getModel(),o=this._editor.getSelections();if(!r||!(o!=null&&o.length))return;let s=this._editor.getOption(35),a=o,l=o.length===1&&o[0].isEmpty();if(l){if(!s)return;a=[new P(a[0].startLineNumber,1,a[0].startLineNumber,1+r.getLineLength(a[0].startLineNumber))]}let c=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(o,s,Dc),u={multicursorText:Array.isArray(c)?c:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(S=>!!S.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}let p=PM(e.clipboardData),m=h.flatMap(S=>{var k;return(k=S.copyMimeTypes)!==null&&k!==void 0?k:[]}),g=Sd();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:u});let b=Vt(S=>zd(this,void 0,void 0,function*(){let k=vr(yield Promise.all(h.map(N=>zd(this,void 0,void 0,function*(){try{return yield N.prepareDocumentPaste(r,a,p,S)}catch(A){console.error(A);return}}))));k.reverse();for(let N of k)for(let[A,H]of N)p.replace(A,H);return p}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:b}}handlePaste(e){var t,n;return zd(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;let r=this._editor.getModel(),o=this._editor.getSelections();if(!(o!=null&&o.length)||!r||!this.isPasteAsEnabled())return;let s=this.fetchCopyMetadata(e.clipboardData),a=J9(e.clipboardData);a.delete(BM);let l=[...e.clipboardData.types,...(n=s==null?void 0:s.providerCopyMimeTypes)!==null&&n!==void 0?n:[],Vn.uriList],c=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(d=>{var u;return(u=d.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>Cee(h,l))});c.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,c,o,a,s):this.doPasteInline(c,o,a,s))})}doPasteInline(e,t,n,r){let o=Vt(s=>zd(this,void 0,void 0,function*(){let a=this._editor;if(!a.hasModel())return;let l=a.getModel(),c=new Sa(a,3,void 0,s);try{if(yield this.mergeInDataFromCopy(n,r,c.token),c.token.isCancellationRequested)return;let d=e.filter(h=>Lee(h,n));if(!d.length||d.length===1&&d[0].id==="text"){yield this.applyDefaultPasteHandler(n,r,c.token);return}let u=yield this.getPasteEdits(d,n,l,t,c.token);if(c.token.isCancellationRequested)return;if(u.length){let h=a.getOption(82).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,c.token)}yield this.applyDefaultPasteHandler(n,r,c.token)}finally{c.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,n,r,o){let s=Vt(a=>zd(this,void 0,void 0,function*(){let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),d=new Sa(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(r,o,d.token),d.token.isCancellationRequested)return;let u=t.filter(g=>Lee(g,r)),h=yield this.getPasteEdits(u,r,c,n,d.token);if(d.token.isCancellationRequested||!h.length)return;let p;if(typeof e=="string")p=h.find(g=>g.id===e);else{let g=yield this._quickInputService.pick(h.map(b=>({label:b.label,description:b.id,detail:b.detail,edit:b})),{placeHolder:v("pasteAsPickerPlaceholder","Select Paste Action")});p=g==null?void 0:g.edit}if(!p)return;let m=wee(c.uri,n,p);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(BM,JSON.stringify(t))}fetchCopyMetadata(e){let t=e.getData(BM);if(t)try{return JSON.parse(t)}catch(n){return}}mergeInDataFromCopy(e,t,n){var r;return zd(this,void 0,void 0,function*(){if(t!=null&&t.id&&((r=this._currentCopyOperation)===null||r===void 0?void 0:r.handle)===t.id){let o=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(let[s,a]of o)e.replace(s,a)}if(!e.has(Vn.uriList)){let o=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;o.length&&e.append(Vn.uriList,Fv(Nh.create(o)))}})}getPasteEdits(e,t,n,r,o){return zd(this,void 0,void 0,function*(){let s=yield jc(Promise.all(e.map(a=>{var l;try{return(l=a.provideDocumentPasteEdits)===null||l===void 0?void 0:l.call(a,n,r,t,o)}catch(c){console.error(c);return}})).then(vr),o);return s==null||s.sort((a,l)=>l.priority-a.priority),s!=null?s:[]})}applyDefaultPasteHandler(e,t,n){var r,o,s;return zd(this,void 0,void 0,function*(){let a=(r=e.get(Vn.text))!==null&&r!==void 0?r:e.get("text");if(!a)return;let l=yield a.asString();if(n.isCancellationRequested)return;let c={text:l,pasteOnNewLine:(o=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&o!==void 0?o:!1,multicursorText:(s=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&s!==void 0?s:null,mode:null};this._editor.trigger("keyboard","paste",c)})}};Ud.ID="editor.contrib.copyPasteActionController";Ud=nbe([hm(1,He),hm(2,Kc),hm(3,Ms),hm(4,be),hm(5,lr),hm(6,lP)],Ud)});function Nee(i){return fm(this,void 0,void 0,function*(){let e=i.get(Vn.uriList);if(!e)return[];let t=yield e.asString(),n=[];for(let r of Nh.parse(t))try{n.push({uri:ht.parse(r),originalText:r})}catch(o){}return n})}var WM,zv,fm,jM,Uv,eS,tS,iS,nS,rS,VM=M(()=>{oi();Hv();Ce();gw();Am();lo();Sn();xt();De();sb();WM=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zv=function(i,e){return function(t,n){e(t,n,i)}},fm=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jM=v("builtIn","Built-in"),Uv=class{provideDocumentPasteEdits(e,t,n,r){return fm(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{id:this.id,insertText:o.insertText,label:o.label,detail:o.detail,priority:o.priority}:void 0})}provideDocumentOnDropEdits(e,t,n,r){return fm(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{id:this.id,insertText:o.insertText,label:o.label,priority:o.priority}:void 0})}},eS=class extends Uv{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[Vn.text],this.pasteMimeTypes=[Vn.text]}getEdit(e,t){return fm(this,void 0,void 0,function*(){let n=e.get(Vn.text);if(!n||e.has(Vn.uriList))return;let r=yield n.asString();return{id:this.id,priority:0,label:v("text.label","Insert Plain Text"),detail:jM,insertText:r}})}},tS=class extends Uv{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[Vn.uriList],this.pasteMimeTypes=[Vn.uriList]}getEdit(e,t){return fm(this,void 0,void 0,function*(){let n=yield Nee(e);if(!n.length||t.isCancellationRequested)return;let r=0,o=n.map(({uri:a,originalText:l})=>a.scheme===Ao.file?a.fsPath:(r++,l)).join(" "),s;return r>0?s=n.length>1?v("defaultDropProvider.uriList.uris","Insert Uris"):v("defaultDropProvider.uriList.uri","Insert Uri"):s=n.length>1?v("defaultDropProvider.uriList.paths","Insert Paths"):v("defaultDropProvider.uriList.path","Insert Path"),{id:this.id,priority:0,insertText:o,label:s,detail:jM}})}},iS=class extends Uv{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[Vn.uriList],this.pasteMimeTypes=[Vn.uriList]}getEdit(e,t){return fm(this,void 0,void 0,function*(){let n=yield Nee(e);if(!n.length||t.isCancellationRequested)return;let r=vr(n.map(({uri:o})=>{let s=this._workspaceContextService.getWorkspaceFolder(o);return s?aO(s.uri,o):void 0}));if(r.length)return{id:this.id,priority:0,insertText:r.join(" "),label:n.length>1?v("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):v("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:jM}})}};iS=WM([zv(0,kl)],iS);nS=class extends oe{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new eS)),this._register(e.documentOnDropEditProvider.register("*",new tS)),this._register(e.documentOnDropEditProvider.register("*",new iS(t)))}};nS=WM([zv(0,be),zv(1,kl)],nS);rS=class extends oe{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new eS)),this._register(e.documentPasteEditProvider.register("*",new tS)),this._register(e.documentPasteEditProvider.register("*",new iS(t)))}};rS=WM([zv(0,be),zv(1,kl)],rS)});var Ree=M(()=>{Ze();Tb();Dee();VM();De();Ae(Ud.ID,Ud,0);$c(rS);Me(new class extends wi{constructor(){super({id:zM,precondition:UM,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;return(n=Ud.get(e))===null||n===void 0?void 0:n.changePasteType()}});X(class extends se{constructor(){super({id:"editor.action.pasteAs",label:v("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:v("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(i,e,t){var n;let r=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=Ud.get(e))===null||n===void 0?void 0:n.pasteAs(r)}})});var oS,Wv,KM=M(()=>{oS=class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){let t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},Wv=class{constructor(e){this.identifier=e}}});var qM,Oee=M(()=>{bl();Et();KM();qM=rr("treeViewsDndService");sr(qM,oS,1)});var rbe,GM,sS,$M,YM,Rh,Fee=M(()=>{oi();Dt();Hv();Ce();FM();qe();xt();KM();Oee();au();mg();De();ft();OM();Et();HM();rbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},GM=function(i,e){return function(t,n){e(t,n,i)}},sS=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},$M="editor.changeDropType",YM=new nt("dropWidgetVisible",!1,v("dropWidgetVisible","Whether the drop widget is showing")),Rh=class Pee extends oe{static get(e){return e.getContribution(Pee.ID)}constructor(e,t,n,r){super(),this._languageFeaturesService=n,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=dm.getInstance(),this._dropProgressManager=this._register(t.createInstance(yp,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(um,"dropIntoEditor",e,YM,{id:$M,label:v("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(o=>this.onDropIntoEditor(e,o.position,o.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var r;return sS(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(r=this._currentOperation)===null||r===void 0||r.cancel(),e.focus(),e.setPosition(t);let o=Vt(s=>sS(this,void 0,void 0,function*(){let a=new Sa(e,1,void 0,s);try{let l=yield this.extractDataTransferData(n);if(l.size===0||a.token.isCancellationRequested)return;let c=e.getModel();if(!c)return;let d=this._languageFeaturesService.documentOnDropEditProvider.ordered(c).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(p=>l.matches(p)):!0),u=yield this.getDropEdits(d,c,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){let h=e.getOption(34).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([P.fromPositions(t)],{activeEditIndex:0,allEdits:u},h,s)}}finally{a.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o})}getDropEdits(e,t,n,r,o){return sS(this,void 0,void 0,function*(){let s=yield jc(Promise.all(e.map(l=>l.provideDocumentOnDropEdits(t,n,r,o.token))),o.token),a=vr(s!=null?s:[]);return a.sort((l,c)=>c.priority-l.priority),a})}extractDataTransferData(e){return sS(this,void 0,void 0,function*(){if(!e.dataTransfer)return new cm;let t=J9(e.dataTransfer);if(this.treeItemsTransfer.hasData(Wv.prototype)){let n=this.treeItemsTransfer.getData(Wv.prototype);if(Array.isArray(n))for(let r of n){let o=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(r.identifier);if(o)for(let[s,a]of o)t.replace(s,a)}}return t})}};Rh.ID="editor.contrib.dropIntoEditorController";Rh=rbe([GM(1,He),GM(2,be),GM(3,qM)],Rh)});var Hee=M(()=>{Ze();Tb();VM();Fee();Ae(Rh.ID,Rh,2);Me(new class extends wi{constructor(){super({id:$M,precondition:YM,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;(n=Rh.get(e))===null||n===void 0||n.changeDropType()}});$c(nS)});var Bee=gt(XM=>{gi();Li();Sn();ca();ev();Bi();var obe=XM&&XM.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};St.registerCommand("_executeDocumentSymbolProvider",function(i,...e){return obe(this,void 0,void 0,function*(){let[t]=e;Lt(ht.isUri(t));let n=i.get(bh),o=yield i.get(xn).createModelReference(t);try{return(yield n.getOrCreate(o.object.textEditorModel,et.None)).getTopLevelSymbols()}finally{o.dispose()}})})});var QM,zee=M(()=>{ml();Ze();De();QM=class extends se{constructor(){super({id:"editor.action.forceRetokenize",label:v("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let r=new Ln(!0);n.tokenization.forceTokenization(n.getLineCount()),r.stop(),console.log(`tokenization took ${r.elapsed()}`)}};X(QM)});var m4t,g4t,E4t,Uee=M(()=>{R_();XP();loe();soe();v6();S6();E6();k6();M6();$6();ZZ();uee();_ee();eE();iE();oE();sE();Ree();Hee();Iy();Ny();ZE();m4t=Fi(n7()),g4t=Fi(Bee());Z7();mg();Sg();iC();cC();_C();gk();Ek();E4t=Fi(Ak());Mk();Qk();iI();sI();aI();wI();AI();NI();VI();KI();YI();up();nA();E2();lA();zee();rL();_A();bA();TA();g9();iL();nL();Yc();u0()});var Wee=M(()=>{});var jee=M(()=>{Wee()});var jv,aS,Vee=M(()=>{jee();Ht();Ce();Ze();nr();jv=class extends oe{constructor(e){super(),this.editor=e,this.widget=null,km&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(88);!this.widget&&e?this.widget=new aS(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};jv.ID="editor.contrib.iPadShowKeyboard";aS=class i extends oe{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Rt(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Rt(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};aS.ID="editor.contrib.ShowKeyboardWidget";Ae(jv.ID,jv,3)});var JM,Kee=M(()=>{Ze();hF();Yc();Ew();doe();JM=class extends se{constructor(){super({id:"editor.action.toggleHighContrast",label:uF.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(Ib),r=n.getColorTheme();su(r.type)?(n.setTheme(this._originalThemeName||(xw(r.type)?gF:mF)),this._originalThemeName=null):(n.setTheme(xw(r.type)?vF:_F),this._originalThemeName=r.themeName)}};X(JM)});var u5t,f5t,qee=M(()=>{Uee();u5t=Fi(sL());Vee();f5t=Fi(lL());cL();uL();_L();wL();EL();Kee();Os()});var Vv={};PN(Vv,{CancellationTokenSource:()=>uoe,Emitter:()=>hoe,KeyCode:()=>foe,KeyMod:()=>poe,MarkerSeverity:()=>boe,MarkerTag:()=>yoe,Position:()=>moe,Range:()=>goe,Selection:()=>voe,SelectionDirection:()=>_oe,Token:()=>Soe,Uri:()=>Coe,editor:()=>cu,languages:()=>ka});var Kv=M(()=>{RZ();BZ();qZ();TL();woe();qee()});var Qee=gt((I5t,Xee)=>{var Yee="Expected a function",Gee=NaN,sbe="[object Symbol]",abe=/^\s+|\s+$/g,lbe=/^[-+]0x[0-9a-f]+$/i,cbe=/^0b[01]+$/i,dbe=/^0o[0-7]+$/i,ube=parseInt,hbe=typeof global=="object"&&global&&global.Object===Object&&global,fbe=typeof self=="object"&&self&&self.Object===Object&&self,pbe=hbe||fbe||Function("return this")(),mbe=Object.prototype,gbe=mbe.toString,vbe=Math.max,_be=Math.min,ZM=function(){return pbe.Date.now()};function bbe(i,e,t){var n,r,o,s,a,l,c=0,d=!1,u=!1,h=!0;if(typeof i!="function")throw new TypeError(Yee);e=$ee(e)||0,lS(t)&&(d=!!t.leading,u="maxWait"in t,o=u?vbe($ee(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function p(K){var W=n,re=r;return n=r=void 0,c=K,s=i.apply(re,W),s}function m(K){return c=K,a=setTimeout(S,e),d?p(K):s}function g(K){var W=K-l,re=K-c,ae=e-W;return u?_be(ae,o-re):ae}function b(K){var W=K-l,re=K-c;return l===void 0||W>=e||W<0||u&&re>=o}function S(){var K=ZM();if(b(K))return k(K);a=setTimeout(S,g(K))}function k(K){return a=void 0,h&&n?p(K):(n=r=void 0,s)}function N(){a!==void 0&&clearTimeout(a),c=0,n=l=r=a=void 0}function A(){return a===void 0?s:k(ZM())}function H(){var K=ZM(),W=b(K);if(n=arguments,r=this,l=K,W){if(a===void 0)return m(l);if(u)return a=setTimeout(S,e),p(l)}return a===void 0&&(a=setTimeout(S,e)),s}return H.cancel=N,H.flush=A,H}function ybe(i,e,t){var n=!0,r=!0;if(typeof i!="function")throw new TypeError(Yee);return lS(t)&&(n="leading"in t?!!t.leading:n,r="trailing"in t?!!t.trailing:r),bbe(i,e,{leading:n,maxWait:e,trailing:r})}function lS(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Cbe(i){return!!i&&typeof i=="object"}function Sbe(i){return typeof i=="symbol"||Cbe(i)&&gbe.call(i)==sbe}function $ee(i){if(typeof i=="number")return i;if(Sbe(i))return Gee;if(lS(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=lS(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(abe,"");var t=cbe.test(i);return t||dbe.test(i)?ube(i.slice(2),t?2:8):lbe.test(i)?Gee:+i}Xee.exports=ybe});var yte=gt((A5t,bte)=>{var wbe=1/0,xbe="[object Symbol]",Ebe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tbe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ote="\\ud800-\\udfff",kbe="\\u0300-\\u036f\\ufe20-\\ufe23",Ibe="\\u20d0-\\u20f0",ste="\\u2700-\\u27bf",ate="a-z\\xdf-\\xf6\\xf8-\\xff",Abe="\\xac\\xb1\\xd7\\xf7",Lbe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mbe="\\u2000-\\u206f",Dbe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",lte="A-Z\\xc0-\\xd6\\xd8-\\xde",Nbe="\\ufe0e\\ufe0f",cte=Abe+Lbe+Mbe+Dbe,eD="['\u2019]",Jee="["+cte+"]",dte="["+kbe+Ibe+"]",ute="\\d+",Rbe="["+ste+"]",hte="["+ate+"]",fte="[^"+ote+cte+ute+ste+ate+lte+"]",Obe="\\ud83c[\\udffb-\\udfff]",Pbe="(?:"+dte+"|"+Obe+")",Fbe="[^"+ote+"]",pte="(?:\\ud83c[\\udde6-\\uddff]){2}",mte="[\\ud800-\\udbff][\\udc00-\\udfff]",pm="["+lte+"]",Hbe="\\u200d",Zee="(?:"+hte+"|"+fte+")",Bbe="(?:"+pm+"|"+fte+")",ete="(?:"+eD+"(?:d|ll|m|re|s|t|ve))?",tte="(?:"+eD+"(?:D|LL|M|RE|S|T|VE))?",gte=Pbe+"?",vte="["+Nbe+"]?",zbe="(?:"+Hbe+"(?:"+[Fbe,pte,mte].join("|")+")"+vte+gte+")*",Ube=vte+gte+zbe,Wbe="(?:"+[Rbe,pte,mte].join("|")+")"+Ube,jbe=RegExp(eD,"g"),Vbe=RegExp(dte,"g"),Kbe=RegExp([pm+"?"+hte+"+"+ete+"(?="+[Jee,pm,"$"].join("|")+")",Bbe+"+"+tte+"(?="+[Jee,pm+Zee,"$"].join("|")+")",pm+"?"+Zee+"+"+ete,pm+"+"+tte,ute,Wbe].join("|"),"g"),qbe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gbe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},$be=typeof global=="object"&&global&&global.Object===Object&&global,Ybe=typeof self=="object"&&self&&self.Object===Object&&self,Xbe=$be||Ybe||Function("return this")();function Qbe(i,e,t,n){var r=-1,o=i?i.length:0;for(n&&o&&(t=i[++r]);++r{"use strict";var ni=Be&&Be.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Be,"__esModule",{value:!0});Be.DeleteLines=Be.SearchReplace=Be.Search=Be.InvertSelection=Be.GotoLine=Be.RotateCursorOnScreen=Be.InsertTabs=Be.RevealToBottomAction=Be.RevealToCenterAction=Be.RevealToTopAction=Be.RevealEditorAction=Be.YankRotate=Be.YankSelectionToRing=Be.Yank=Be.RedoAction=Be.UndoAction=Be.KeyBoardQuit=Be.MoveCursorTop=Be.MoveCursorBottom=Be.MoveCursorWordLeft=Be.MoveCursorWordRight=Be.MoveCursorToLineStart=Be.MoveCursorToLineEnd=Be.MoveCursorRight=Be.MoveCursorLeft=Be.MoveCursorDown=Be.MoveCursorUp=Be.SetMark=Be.InsertLineAfter=Be.InsertLineBelow=Be.KillLines=Be.KillSelection=Be.BaseAction=Be.SOURCE=void 0;var yn=(Kv(),Kh(Vv));Be.SOURCE="extension.emacs";function h4e(i,e,t,n,r){r===void 0&&(r=1);for(var o="cursor".concat(n==="word"?"Word":"").concat(t).concat(e?"Select":""),s=0;su?u:a.lineNumber+r;l=new yn.Position(h,s.getLineLength(h)+1)}var p=yn.Range.fromPositions(a,l);o?n.state.growRingTop(s.getValueInRange(p)):n.state.addToRing(s.getValueInRange(p)),t.executeEdits(Be.SOURCE,[{range:p,text:""}]),t.setSelection(yn.Selection.fromPositions(a,a))},e}(tr);Be.KillLines=p4e;var m4e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getPosition();t.trigger(Be.SOURCE,"editor.action.insertLineAfter",null),t.setPosition(s)},e}(tr);Be.InsertLineBelow=m4e;var g4e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s="",a=0;ac&&(a=c):a=1;var d=new yn.Position(a,1),u;if(!n.selectionMode)u=yn.Selection.fromPositions(d);else{var h=t.getSelection();h.getDirection()===yn.SelectionDirection.LTR?u=yn.Selection.fromPositions(h.getStartPosition(),d):u=yn.Selection.fromPositions(h.getEndPosition(),d)}t.setSelection(u),t.revealRangeInCenter(u)}).catch(function(){t.focus()})},e}(tr);Be.GotoLine=F4e;var H4e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();if(!s.isEmpty()){var a;s.getDirection()===yn.SelectionDirection.LTR?a=yn.Selection.fromPositions(s.getEndPosition(),s.getStartPosition()):a=yn.Selection.fromPositions(s.getStartPosition(),s.getEndPosition()),t.setSelection(a)}},e}(tr);Be.InvertSelection=H4e;var B4e=function(i){ni(e,i);function e(){return i.call(this,"editor.actions.findWithArgs")||this}return e}(Cte);Be.Search=B4e;var z4e=function(i){ni(e,i);function e(){return i.call(this,"editor.action.startFindReplaceAction")||this}return e}(Cte);Be.SearchReplace=z4e;var U4e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1;for(var s=0;s{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getAllMappings=ir.unregisterKey=ir.registerGlobalCommand=ir.executeCommand=ir.COMMANDS=ir.prefixPreservingKeys=void 0;var fi=tD();ir.prefixPreservingKeys={"M-g":!0,"C-x":!0,"C-q":!0,"C-u":!0};var Ete=new fi.SetMark,dS=new fi.UndoAction,W4e=new fi.MoveCursorDown,j4e=new fi.MoveCursorUp,V4e=new fi.MoveCursorRight,K4e=new fi.MoveCursorLeft;ir.COMMANDS={"M-/":{description:"",action:"editor.action.triggerSuggest"},"C-'":{description:"",action:"editor.action.triggerSuggest"},"M-;":{description:"",action:"editor.action.commentLine"},"C-t":{description:"",action:"editor.action.transposeLetters"},"C-x C-p":{description:"",action:"editor.action.selectAll"},Tab:{description:"",action:"editor.action.formatDocument"},"C-Backspace":{description:"",action:"deleteWordLeft"},"C-d":{description:"",action:"deleteRight"},"M-Backspace":{description:"",action:"deleteWordLeft"},"M-Delete":{description:"",action:"deleteWordLeft"},"C-x C-u":{description:"",action:"editor.action.transformToUppercase"},"C-x C-l":{description:"",action:"editor.action.transformToLowercase"},"C-v":{description:"",action:"cursorPageDown"},PageDown:{description:"",action:"cursorPageDown"},"M-v":{description:"",action:"cursorPageUp"},PageUp:{description:"",action:"cursorPageUp"},"M-g n":{description:"",action:"editor.action.marker.next"},"M-g p":{description:"",action:"editor.action.marker.prev"},"M-C-n":{description:"",action:"editor.action.addSelectionToNextFindMatch"},"C-h":{description:"",action:"deleteLeft"},"M-d":{description:"",action:"deleteWordRight"},"S-C-":{description:"",action:"editor.action.triggerParameterHints"},"C-SPC":Ete,"S-C-2":Ete,"C-/":dS,"S-C--":dS,"C-z":dS,"C-x u":dS,"C-n":W4e,"C-p":j4e,"C-f":V4e,"C-b":K4e,"S-C-Backspace":new fi.DeleteLines,"M-f":new fi.MoveCursorWordRight,"M-b":new fi.MoveCursorWordLeft,"C-k":new fi.KillLines,"C-m":new fi.InsertLineAfter,"C-w":new fi.KillSelection,"C-o":new fi.InsertLineBelow,"C-g":new fi.KeyBoardQuit,"C-e":new fi.MoveCursorToLineEnd,"C-a":new fi.MoveCursorToLineStart,"C-y":new fi.Yank,"M-w":new fi.YankSelectionToRing,"M-y":new fi.YankRotate,"C-l":new fi.RevealToCenterAction,"C-q Tab":new fi.InsertTabs,"M-r":new fi.RotateCursorOnScreen,"M-g g":new fi.GotoLine,"M-g M-g":new fi.GotoLine,"C-x C-x":new fi.InvertSelection,"S-M-.":new fi.MoveCursorBottom,"S-M-,":new fi.MoveCursorTop,"C-s":new fi.Search,"C-r":new fi.Search,"S-M-5":new fi.SearchReplace};function q4e(i,e,t,n){var r=i.getEditor(),o=parseInt(t)||1;if(e.run){e.run(r,i,o,n);return}if(typeof e.action=="string")for(var s=0;s{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.Emitter=jr.Event=jr.monacoToEmacsKey=jr.modifierKeys=void 0;var X4e=(Kv(),Kh(Vv));jr.modifierKeys={Alt:"M",Control:"C",Ctrl:"C",Meta:"CMD",Shift:"S"};var Tte={Enter:"Return",Space:"SPC",Backslash:"\\",Slash:"/",Backquote:"`",BracketRight:"]",BracketLeft:"[",Comma:",",Period:".",Equal:"=",Minus:"-",Quote:"'",Semicolon:";"},Q4e=["Key","Numpad"],kte="Arrow";function J4e(i){var e=X4e.KeyCode[i.keyCode];if(jr.modifierKeys[e])return"";var t=Q4e.some(function(n){return e.startsWith(n)})?e[e.length-1]:e;return e.endsWith(kte)?t=e.substring(0,e.length-kte.length):Tte[e]&&(t=Tte[t]),t.length===1&&(t=t.toLowerCase()),i.altKey&&(t="".concat(jr.modifierKeys.Alt,"-").concat(t)),i.ctrlKey&&(t="".concat(jr.modifierKeys.Ctrl,"-").concat(t)),i.metaKey&&(t="".concat(jr.modifierKeys.Meta,"-").concat(t)),i.shiftKey&&(t="".concat(jr.modifierKeys.Shift,"-").concat(t)),t}jr.monacoToEmacsKey=J4e;var Z4e;(function(i){var e={dispose:function(){}};i.None=function(){return e}})(Z4e=jr.Event||(jr.Event={}));var e5e=function(){function i(){this._listeners=[]}return Object.defineProperty(i.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){e._listeners.push(t);var n={dispose:function(){if(!e._disposed){var r=e._listeners.indexOf(t);r<0||e._listeners.splice(r,1)}}};return n}),this._event},enumerable:!1,configurable:!0}),i.prototype.fire=function(e){this._listeners.length&&this._listeners.forEach(function(t){return t(e)})},i.prototype.dispose=function(){this._disposed||(this._listeners=void 0,this._disposed=!0)},i}();jr.Emitter=e5e});var Ate=gt(hS=>{"use strict";Object.defineProperty(hS,"__esModule",{value:!0});hS.BasicInputWidget=void 0;var t5e=(Kv(),Kh(Vv)),$o="ext-emacs-basic-input";function i5e(){return` - .`.concat($o,` { +`),parse:i=>Nh.split(i).filter(e=>!e.startsWith("#"))})});var DM,MM,ebe,cm,NM=M(()=>{Hc();DM={EDITORS:"CodeEditors",FILES:"CodeFiles"},MM=class{},ebe={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Mr.add(ebe.DragAndDropContribution,new MM);cm=class i{constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};cm.INSTANCE=new cm});function RM(i){let e=new lm;for(let t of i.items){let n=t.type;if(t.kind==="string"){let r=new Promise(o=>t.getAsString(o));e.append(n,Fv(r))}else if(t.kind==="file"){let r=t.getAsFile();r&&e.append(n,ibe(r))}}return e}function ibe(i){let e=i.path?ht.parse(i.path):void 0;return Cee(i.name,e,()=>tbe(this,void 0,void 0,function*(){return new Uint8Array(yield i.arrayBuffer())}))}function Q9(i,e=!1){let t=RM(i),n=t.get(Z_.INTERNAL_URI_LIST);if(n)t.replace(Vn.uriList,n);else if(e||!t.has(Vn.uriList)){let r=[];for(let o of i.items){let s=o.getAsFile();if(s){let a=s.path;try{a?r.push(ht.file(a).toString()):r.push(ht.parse(s.name,!0).toString())}catch(l){}}}r.length&&t.replace(Vn.uriList,Fv(Nh.create(r)))}for(let r of nbe)t.delete(r);return t}var tbe,nbe,OM=M(()=>{Dre();Hv();mw();Sn();NM();tbe=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};nbe=Object.freeze([DM.EDITORS,DM.FILES,Z_.RESOURCES,Z_.INTERNAL_URI_LIST])});function xee(i,e,t){var n,r;return{edits:[...e.map(o=>new X_(i,typeof t.insertText=="string"?{range:o,text:t.insertText,insertAsSnippet:!1}:{range:o,text:t.insertText.snippet,insertAsSnippet:!0})),...(r=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&r!==void 0?r:[]]}}var Eee=M(()=>{Qm()});var Tee=M(()=>{});var kee=M(()=>{Tee()});var Aee,Bv,Iee,J9,dm,PM=M(()=>{Ht();doe();Pc();qt();Ce();kee();Qm();ft();Tl();Et();Gn();Aee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bv=function(i,e){return function(t,n){e(t,n,i)}},Iee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},J9=class Lee extends oe{constructor(e,t,n,r,o,s,a,l,c,d){super(),this.typeId=e,this.editor=t,this.showCommand=r,this.range=o,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=d,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(Ft(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Ft(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(u=>{o.containsPosition(u.position)||this.dispose()})),this._register(li.runAndSubscribe(d.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;let t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=fe(".post-edit-widget"),this.button=this._register(new hF(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(Rt(this.domNode,on.CLICK,()=>this.showSelector()))}getId(){return Lee.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=wn(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Yh({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};J9.baseId="editor.widget.postEditWidget";J9=Aee([Bv(7,cs),Bv(8,Ke),Bv(9,Bt)],J9);dm=class extends oe{constructor(e,t,n,r,o,s){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=r,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new Bi),this._register(li.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,r){var o,s;return Iee(this,void 0,void 0,function*(){let a=this._editor.getModel();if(!a||!e.length)return;let l=t.allEdits[t.activeEditIndex];if(!l)return;let c={edits:[...e.map(m=>new X_(a.uri,typeof l.insertText=="string"?{range:m,text:l.insertText,insertAsSnippet:!1}:{range:m,text:l.insertText.snippet,insertAsSnippet:!0})),...(s=(o=l.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&s!==void 0?s:[]]},d=e[0],u=a.deltaDecorations([],[{range:d,options:{description:"paste-line-suffix",stickiness:0}}]),h,p;try{h=yield this._bulkEditService.apply(c,{editor:this._editor,token:r}),p=a.getDecorationRange(u[0])}finally{a.deltaDecorations(u,[])}n&&h.isApplied&&t.allEdits.length>1&&this.show(p!=null?p:d,t,m=>Iee(this,void 0,void 0,function*(){let g=this._editor.getModel();g&&(yield g.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:m,allEdits:t.allEdits},n,r))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(J9,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};dm=Aee([Bv(4,He),Bv(5,qc)],dm)});function Mee(i,e){var t;return!!(!((t=i.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var rbe,um,Ud,HM,BM,FM,Wd,Nee=M(()=>{Ht();oi();Dt();Hv();Ce();mw();nr();K0();OM();Qm();qe();xt();Eee();lu();pg();De();$m();ft();Et();Gc();Ll();PM();rbe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},um=function(i,e){return function(t,n){e(t,n,i)}},Ud=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},HM="editor.changePasteType",BM=new nt("pasteWidgetVisible",!1,v("pasteWidgetVisible","Whether the paste widget is showing")),FM="application/vnd.code.copyMetadata",Wd=class Dee extends oe{static get(e){return e.getContribution(Dee.ID)}constructor(e,t,n,r,o,s,a){super(),this._bulkEditService=n,this._clipboardService=r,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(Rt(l,"copy",c=>this.handleCopy(c))),this._register(Rt(l,"cut",c=>this.handleCopy(c))),this._register(Rt(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new _p("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(dm,"pasteIntoEditor",e,BM,{id:HM,label:v("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(82).enabled&&!this._editor.getOption(88)}handleCopy(e){var t,n;if(!e.clipboardData||!this._editor.hasTextFocus()||!this.isPasteAsEnabled())return;let r=this._editor.getModel(),o=this._editor.getSelections();if(!r||!(o!=null&&o.length))return;let s=this._editor.getOption(35),a=o,l=o.length===1&&o[0].isEmpty();if(l){if(!s)return;a=[new P(a[0].startLineNumber,1,a[0].startLineNumber,1+r.getLineLength(a[0].startLineNumber))]}let c=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(o,s,Nc),u={multicursorText:Array.isArray(c)?c:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(S=>!!S.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}let p=RM(e.clipboardData),m=h.flatMap(S=>{var k;return(k=S.copyMimeTypes)!==null&&k!==void 0?k:[]}),g=Cd();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:u});let b=Vt(S=>Ud(this,void 0,void 0,function*(){let k=vr(yield Promise.all(h.map(N=>Ud(this,void 0,void 0,function*(){try{return yield N.prepareDocumentPaste(r,a,p,S)}catch(A){console.error(A);return}}))));k.reverse();for(let N of k)for(let[A,H]of N)p.replace(A,H);return p}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:b}}handlePaste(e){var t,n;return Ud(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;let r=this._editor.getModel(),o=this._editor.getSelections();if(!(o!=null&&o.length)||!r||!this.isPasteAsEnabled())return;let s=this.fetchCopyMetadata(e.clipboardData),a=Q9(e.clipboardData);a.delete(FM);let l=[...e.clipboardData.types,...(n=s==null?void 0:s.providerCopyMimeTypes)!==null&&n!==void 0?n:[],Vn.uriList],c=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(d=>{var u;return(u=d.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>See(h,l))});c.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,c,o,a,s):this.doPasteInline(c,o,a,s))})}doPasteInline(e,t,n,r){let o=Vt(s=>Ud(this,void 0,void 0,function*(){let a=this._editor;if(!a.hasModel())return;let l=a.getModel(),c=new Sa(a,3,void 0,s);try{if(yield this.mergeInDataFromCopy(n,r,c.token),c.token.isCancellationRequested)return;let d=e.filter(h=>Mee(h,n));if(!d.length||d.length===1&&d[0].id==="text"){yield this.applyDefaultPasteHandler(n,r,c.token);return}let u=yield this.getPasteEdits(d,n,l,t,c.token);if(c.token.isCancellationRequested)return;if(u.length){let h=a.getOption(82).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,c.token)}yield this.applyDefaultPasteHandler(n,r,c.token)}finally{c.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,n,r,o){let s=Vt(a=>Ud(this,void 0,void 0,function*(){let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),d=new Sa(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(r,o,d.token),d.token.isCancellationRequested)return;let u=t.filter(g=>Mee(g,r)),h=yield this.getPasteEdits(u,r,c,n,d.token);if(d.token.isCancellationRequested||!h.length)return;let p;if(typeof e=="string")p=h.find(g=>g.id===e);else{let g=yield this._quickInputService.pick(h.map(b=>({label:b.label,description:b.id,detail:b.detail,edit:b})),{placeHolder:v("pasteAsPickerPlaceholder","Select Paste Action")});p=g==null?void 0:g.edit}if(!p)return;let m=xee(c.uri,n,p);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(FM,JSON.stringify(t))}fetchCopyMetadata(e){let t=e.getData(FM);if(t)try{return JSON.parse(t)}catch(n){return}}mergeInDataFromCopy(e,t,n){var r;return Ud(this,void 0,void 0,function*(){if(t!=null&&t.id&&((r=this._currentCopyOperation)===null||r===void 0?void 0:r.handle)===t.id){let o=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(let[s,a]of o)e.replace(s,a)}if(!e.has(Vn.uriList)){let o=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;o.length&&e.append(Vn.uriList,Fv(Nh.create(o)))}})}getPasteEdits(e,t,n,r,o){return Ud(this,void 0,void 0,function*(){let s=yield Vc(Promise.all(e.map(a=>{var l;try{return(l=a.provideDocumentPasteEdits)===null||l===void 0?void 0:l.call(a,n,r,t,o)}catch(c){console.error(c);return}})).then(vr),o);return s==null||s.sort((a,l)=>l.priority-a.priority),s!=null?s:[]})}applyDefaultPasteHandler(e,t,n){var r,o,s;return Ud(this,void 0,void 0,function*(){let a=(r=e.get(Vn.text))!==null&&r!==void 0?r:e.get("text");if(!a)return;let l=yield a.asString();if(n.isCancellationRequested)return;let c={text:l,pasteOnNewLine:(o=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&o!==void 0?o:!1,multicursorText:(s=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&s!==void 0?s:null,mode:null};this._editor.trigger("keyboard","paste",c)})}};Wd.ID="editor.contrib.copyPasteActionController";Wd=rbe([um(1,He),um(2,qc),um(3,Ms),um(4,be),um(5,lr),um(6,sP)],Wd)});function Ree(i){return hm(this,void 0,void 0,function*(){let e=i.get(Vn.uriList);if(!e)return[];let t=yield e.asString(),n=[];for(let r of Nh.parse(t))try{n.push({uri:ht.parse(r),originalText:r})}catch(o){}return n})}var zM,zv,hm,UM,Uv,Z9,eS,tS,iS,nS,WM=M(()=>{oi();Hv();Ce();mw();Im();lo();Sn();xt();De();ob();zM=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},zv=function(i,e){return function(t,n){e(t,n,i)}},hm=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},UM=v("builtIn","Built-in"),Uv=class{provideDocumentPasteEdits(e,t,n,r){return hm(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{id:this.id,insertText:o.insertText,label:o.label,detail:o.detail,priority:o.priority}:void 0})}provideDocumentOnDropEdits(e,t,n,r){return hm(this,void 0,void 0,function*(){let o=yield this.getEdit(n,r);return o?{id:this.id,insertText:o.insertText,label:o.label,priority:o.priority}:void 0})}},Z9=class extends Uv{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[Vn.text],this.pasteMimeTypes=[Vn.text]}getEdit(e,t){return hm(this,void 0,void 0,function*(){let n=e.get(Vn.text);if(!n||e.has(Vn.uriList))return;let r=yield n.asString();return{id:this.id,priority:0,label:v("text.label","Insert Plain Text"),detail:UM,insertText:r}})}},eS=class extends Uv{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[Vn.uriList],this.pasteMimeTypes=[Vn.uriList]}getEdit(e,t){return hm(this,void 0,void 0,function*(){let n=yield Ree(e);if(!n.length||t.isCancellationRequested)return;let r=0,o=n.map(({uri:a,originalText:l})=>a.scheme===Lo.file?a.fsPath:(r++,l)).join(" "),s;return r>0?s=n.length>1?v("defaultDropProvider.uriList.uris","Insert Uris"):v("defaultDropProvider.uriList.uri","Insert Uri"):s=n.length>1?v("defaultDropProvider.uriList.paths","Insert Paths"):v("defaultDropProvider.uriList.path","Insert Path"),{id:this.id,priority:0,insertText:o,label:s,detail:UM}})}},tS=class extends Uv{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[Vn.uriList],this.pasteMimeTypes=[Vn.uriList]}getEdit(e,t){return hm(this,void 0,void 0,function*(){let n=yield Ree(e);if(!n.length||t.isCancellationRequested)return;let r=vr(n.map(({uri:o})=>{let s=this._workspaceContextService.getWorkspaceFolder(o);return s?oO(s.uri,o):void 0}));if(r.length)return{id:this.id,priority:0,insertText:r.join(" "),label:n.length>1?v("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):v("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:UM}})}};tS=zM([zv(0,kl)],tS);iS=class extends oe{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new Z9)),this._register(e.documentOnDropEditProvider.register("*",new eS)),this._register(e.documentOnDropEditProvider.register("*",new tS(t)))}};iS=zM([zv(0,be),zv(1,kl)],iS);nS=class extends oe{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new Z9)),this._register(e.documentPasteEditProvider.register("*",new eS)),this._register(e.documentPasteEditProvider.register("*",new tS(t)))}};nS=zM([zv(0,be),zv(1,kl)],nS)});var Oee=M(()=>{Ze();Eb();Nee();WM();De();Ae(Wd.ID,Wd,0);Yc(nS);Me(new class extends xi{constructor(){super({id:HM,precondition:BM,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;return(n=Wd.get(e))===null||n===void 0?void 0:n.changePasteType()}});X(class extends se{constructor(){super({id:"editor.action.pasteAs",label:v("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:v("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(i,e,t){var n;let r=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=Wd.get(e))===null||n===void 0?void 0:n.pasteAs(r)}})});var rS,Wv,jM=M(()=>{rS=class{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){let t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}},Wv=class{constructor(e){this.identifier=e}}});var VM,Pee=M(()=>{bl();Et();jM();VM=rr("treeViewsDndService");sr(VM,rS,1)});var obe,KM,oS,qM,GM,Rh,Hee=M(()=>{oi();Dt();Hv();Ce();OM();qe();xt();jM();Pee();lu();pg();De();ft();NM();Et();PM();obe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},KM=function(i,e){return function(t,n){e(t,n,i)}},oS=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},qM="editor.changeDropType",GM=new nt("dropWidgetVisible",!1,v("dropWidgetVisible","Whether the drop widget is showing")),Rh=class Fee extends oe{static get(e){return e.getContribution(Fee.ID)}constructor(e,t,n,r){super(),this._languageFeaturesService=n,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=cm.getInstance(),this._dropProgressManager=this._register(t.createInstance(_p,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(dm,"dropIntoEditor",e,GM,{id:qM,label:v("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(o=>this.onDropIntoEditor(e,o.position,o.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var r;return oS(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(r=this._currentOperation)===null||r===void 0||r.cancel(),e.focus(),e.setPosition(t);let o=Vt(s=>oS(this,void 0,void 0,function*(){let a=new Sa(e,1,void 0,s);try{let l=yield this.extractDataTransferData(n);if(l.size===0||a.token.isCancellationRequested)return;let c=e.getModel();if(!c)return;let d=this._languageFeaturesService.documentOnDropEditProvider.ordered(c).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(p=>l.matches(p)):!0),u=yield this.getDropEdits(d,c,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){let h=e.getOption(34).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([P.fromPositions(t)],{activeEditIndex:0,allEdits:u},h,s)}}finally{a.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o})}getDropEdits(e,t,n,r,o){return oS(this,void 0,void 0,function*(){let s=yield Vc(Promise.all(e.map(l=>l.provideDocumentOnDropEdits(t,n,r,o.token))),o.token),a=vr(s!=null?s:[]);return a.sort((l,c)=>c.priority-l.priority),a})}extractDataTransferData(e){return oS(this,void 0,void 0,function*(){if(!e.dataTransfer)return new lm;let t=Q9(e.dataTransfer);if(this.treeItemsTransfer.hasData(Wv.prototype)){let n=this.treeItemsTransfer.getData(Wv.prototype);if(Array.isArray(n))for(let r of n){let o=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(r.identifier);if(o)for(let[s,a]of o)t.replace(s,a)}}return t})}};Rh.ID="editor.contrib.dropIntoEditorController";Rh=obe([KM(1,He),KM(2,be),KM(3,VM)],Rh)});var Bee=M(()=>{Ze();Eb();WM();Hee();Ae(Rh.ID,Rh,2);Me(new class extends xi{constructor(){super({id:qM,precondition:GM,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;(n=Rh.get(e))===null||n===void 0||n.changeDropType()}});Yc(iS)});var zee=gt($M=>{gi();Mi();Sn();ca();Zg();zi();var sbe=$M&&$M.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};St.registerCommand("_executeDocumentSymbolProvider",function(i,...e){return sbe(this,void 0,void 0,function*(){let[t]=e;Lt(ht.isUri(t));let n=i.get(bh),o=yield i.get(xn).createModelReference(t);try{return(yield n.getOrCreate(o.object.textEditorModel,et.None)).getTopLevelSymbols()}finally{o.dispose()}})})});var YM,Uee=M(()=>{ml();Ze();De();YM=class extends se{constructor(){super({id:"editor.action.forceRetokenize",label:v("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let n=t.getModel();n.tokenization.resetTokenization();let r=new Ln(!0);n.tokenization.forceTokenization(n.getLineCount()),r.stop(),console.log(`tokenization took ${r.elapsed()}`)}};X(YM)});var g5t,v5t,T5t,Wee=M(()=>{N_();$P();coe();aoe();h6();v6();y6();S6();T6();j6();eee();hee();bee();Y6();Q6();eE();tE();Oee();Bee();vy();Sy();$E();g5t=Hi(JE()),v5t=Hi(zee());$7();pg();Cg();K2();J2();aC();uk();yk();T5t=Hi(xk());Tk();qk();Qk();tI();iI();_I();xI();II();BI();zI();VI();cp();JI();p2();nA();Uee();ZA();fA();pA();CA();o9();QA();JA();Xc();d0()});var jee=M(()=>{});var Vee=M(()=>{jee()});var jv,sS,Kee=M(()=>{Vee();Ht();Ce();Ze();nr();jv=class extends oe{constructor(e){super(),this.editor=e,this.widget=null,Tm&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(88);!this.widget&&e?this.widget=new sS(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};jv.ID="editor.contrib.iPadShowKeyboard";sS=class i extends oe{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Rt(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Rt(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};sS.ID="editor.contrib.ShowKeyboardWidget";Ae(jv.ID,jv,3)});var XM,qee=M(()=>{Ze();dF();Xc();xw();uoe();XM=class extends se{constructor(){super({id:"editor.action.toggleHighContrast",label:cF.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let n=e.get(kb),r=n.getColorTheme();au(r.type)?(n.setTheme(this._originalThemeName||(ww(r.type)?pF:fF)),this._originalThemeName=null):(n.setTheme(ww(r.type)?mF:gF),this._originalThemeName=r.themeName)}};X(XM)});var h4t,p4t,Gee=M(()=>{Wee();h4t=Hi(tL());Kee();p4t=Hi(nL());rL();sL();fL();_L();yL();qee();Os()});var Vv={};RN(Vv,{CancellationTokenSource:()=>hoe,Emitter:()=>foe,KeyCode:()=>poe,KeyMod:()=>moe,MarkerSeverity:()=>yoe,MarkerTag:()=>Coe,Position:()=>goe,Range:()=>voe,Selection:()=>_oe,SelectionDirection:()=>boe,Token:()=>woe,Uri:()=>Soe,editor:()=>du,languages:()=>ka});var Kv=M(()=>{OZ();zZ();GZ();CL();xoe();Gee()});var Jee=gt((A4t,Qee)=>{var Xee="Expected a function",$ee=NaN,abe="[object Symbol]",lbe=/^\s+|\s+$/g,cbe=/^[-+]0x[0-9a-f]+$/i,dbe=/^0b[01]+$/i,ube=/^0o[0-7]+$/i,hbe=parseInt,fbe=typeof global=="object"&&global&&global.Object===Object&&global,pbe=typeof self=="object"&&self&&self.Object===Object&&self,mbe=fbe||pbe||Function("return this")(),gbe=Object.prototype,vbe=gbe.toString,_be=Math.max,bbe=Math.min,QM=function(){return mbe.Date.now()};function ybe(i,e,t){var n,r,o,s,a,l,c=0,d=!1,u=!1,h=!0;if(typeof i!="function")throw new TypeError(Xee);e=Yee(e)||0,aS(t)&&(d=!!t.leading,u="maxWait"in t,o=u?_be(Yee(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function p(K){var W=n,re=r;return n=r=void 0,c=K,s=i.apply(re,W),s}function m(K){return c=K,a=setTimeout(S,e),d?p(K):s}function g(K){var W=K-l,re=K-c,ae=e-W;return u?bbe(ae,o-re):ae}function b(K){var W=K-l,re=K-c;return l===void 0||W>=e||W<0||u&&re>=o}function S(){var K=QM();if(b(K))return k(K);a=setTimeout(S,g(K))}function k(K){return a=void 0,h&&n?p(K):(n=r=void 0,s)}function N(){a!==void 0&&clearTimeout(a),c=0,n=l=r=a=void 0}function A(){return a===void 0?s:k(QM())}function H(){var K=QM(),W=b(K);if(n=arguments,r=this,l=K,W){if(a===void 0)return m(l);if(u)return a=setTimeout(S,e),p(l)}return a===void 0&&(a=setTimeout(S,e)),s}return H.cancel=N,H.flush=A,H}function Cbe(i,e,t){var n=!0,r=!0;if(typeof i!="function")throw new TypeError(Xee);return aS(t)&&(n="leading"in t?!!t.leading:n,r="trailing"in t?!!t.trailing:r),ybe(i,e,{leading:n,maxWait:e,trailing:r})}function aS(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function Sbe(i){return!!i&&typeof i=="object"}function wbe(i){return typeof i=="symbol"||Sbe(i)&&vbe.call(i)==abe}function Yee(i){if(typeof i=="number")return i;if(wbe(i))return $ee;if(aS(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=aS(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace(lbe,"");var t=dbe.test(i);return t||ube.test(i)?hbe(i.slice(2),t?2:8):cbe.test(i)?$ee:+i}Qee.exports=Cbe});var Cte=gt((L4t,yte)=>{var xbe=1/0,Ebe="[object Symbol]",Tbe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kbe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ste="\\ud800-\\udfff",Ibe="\\u0300-\\u036f\\ufe20-\\ufe23",Abe="\\u20d0-\\u20f0",ate="\\u2700-\\u27bf",lte="a-z\\xdf-\\xf6\\xf8-\\xff",Lbe="\\xac\\xb1\\xd7\\xf7",Mbe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dbe="\\u2000-\\u206f",Nbe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cte="A-Z\\xc0-\\xd6\\xd8-\\xde",Rbe="\\ufe0e\\ufe0f",dte=Lbe+Mbe+Dbe+Nbe,JM="['\u2019]",Zee="["+dte+"]",ute="["+Ibe+Abe+"]",hte="\\d+",Obe="["+ate+"]",fte="["+lte+"]",pte="[^"+ste+dte+hte+ate+lte+cte+"]",Pbe="\\ud83c[\\udffb-\\udfff]",Fbe="(?:"+ute+"|"+Pbe+")",Hbe="[^"+ste+"]",mte="(?:\\ud83c[\\udde6-\\uddff]){2}",gte="[\\ud800-\\udbff][\\udc00-\\udfff]",fm="["+cte+"]",Bbe="\\u200d",ete="(?:"+fte+"|"+pte+")",zbe="(?:"+fm+"|"+pte+")",tte="(?:"+JM+"(?:d|ll|m|re|s|t|ve))?",ite="(?:"+JM+"(?:D|LL|M|RE|S|T|VE))?",vte=Fbe+"?",_te="["+Rbe+"]?",Ube="(?:"+Bbe+"(?:"+[Hbe,mte,gte].join("|")+")"+_te+vte+")*",Wbe=_te+vte+Ube,jbe="(?:"+[Obe,mte,gte].join("|")+")"+Wbe,Vbe=RegExp(JM,"g"),Kbe=RegExp(ute,"g"),qbe=RegExp([fm+"?"+fte+"+"+tte+"(?="+[Zee,fm,"$"].join("|")+")",zbe+"+"+ite+"(?="+[Zee,fm+ete,"$"].join("|")+")",fm+"?"+ete+"+"+tte,fm+"+"+ite,hte,jbe].join("|"),"g"),Gbe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$be={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},Ybe=typeof global=="object"&&global&&global.Object===Object&&global,Xbe=typeof self=="object"&&self&&self.Object===Object&&self,Qbe=Ybe||Xbe||Function("return this")();function Jbe(i,e,t,n){var r=-1,o=i?i.length:0;for(n&&o&&(t=i[++r]);++r{"use strict";var ni=Be&&Be.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Be,"__esModule",{value:!0});Be.DeleteLines=Be.SearchReplace=Be.Search=Be.InvertSelection=Be.GotoLine=Be.RotateCursorOnScreen=Be.InsertTabs=Be.RevealToBottomAction=Be.RevealToCenterAction=Be.RevealToTopAction=Be.RevealEditorAction=Be.YankRotate=Be.YankSelectionToRing=Be.Yank=Be.RedoAction=Be.UndoAction=Be.KeyBoardQuit=Be.MoveCursorTop=Be.MoveCursorBottom=Be.MoveCursorWordLeft=Be.MoveCursorWordRight=Be.MoveCursorToLineStart=Be.MoveCursorToLineEnd=Be.MoveCursorRight=Be.MoveCursorLeft=Be.MoveCursorDown=Be.MoveCursorUp=Be.SetMark=Be.InsertLineAfter=Be.InsertLineBelow=Be.KillLines=Be.KillSelection=Be.BaseAction=Be.SOURCE=void 0;var yn=(Kv(),Kh(Vv));Be.SOURCE="extension.emacs";function f5e(i,e,t,n,r){r===void 0&&(r=1);for(var o="cursor".concat(n==="word"?"Word":"").concat(t).concat(e?"Select":""),s=0;su?u:a.lineNumber+r;l=new yn.Position(h,s.getLineLength(h)+1)}var p=yn.Range.fromPositions(a,l);o?n.state.growRingTop(s.getValueInRange(p)):n.state.addToRing(s.getValueInRange(p)),t.executeEdits(Be.SOURCE,[{range:p,text:""}]),t.setSelection(yn.Selection.fromPositions(a,a))},e}(tr);Be.KillLines=m5e;var g5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getPosition();t.trigger(Be.SOURCE,"editor.action.insertLineAfter",null),t.setPosition(s)},e}(tr);Be.InsertLineBelow=g5e;var v5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){for(var s="",a=0;ac&&(a=c):a=1;var d=new yn.Position(a,1),u;if(!n.selectionMode)u=yn.Selection.fromPositions(d);else{var h=t.getSelection();h.getDirection()===yn.SelectionDirection.LTR?u=yn.Selection.fromPositions(h.getStartPosition(),d):u=yn.Selection.fromPositions(h.getEndPosition(),d)}t.setSelection(u),t.revealRangeInCenter(u)}).catch(function(){t.focus()})},e}(tr);Be.GotoLine=H5e;var B5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){var s=t.getSelection();if(!s.isEmpty()){var a;s.getDirection()===yn.SelectionDirection.LTR?a=yn.Selection.fromPositions(s.getEndPosition(),s.getStartPosition()):a=yn.Selection.fromPositions(s.getStartPosition(),s.getEndPosition()),t.setSelection(a)}},e}(tr);Be.InvertSelection=B5e;var z5e=function(i){ni(e,i);function e(){return i.call(this,"editor.actions.findWithArgs")||this}return e}(Ste);Be.Search=z5e;var U5e=function(i){ni(e,i);function e(){return i.call(this,"editor.action.startFindReplaceAction")||this}return e}(Ste);Be.SearchReplace=U5e;var W5e=function(i){ni(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,n,r,o){n.selectionMode=!1;for(var s=0;s{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getAllMappings=ir.unregisterKey=ir.registerGlobalCommand=ir.executeCommand=ir.COMMANDS=ir.prefixPreservingKeys=void 0;var fi=ZM();ir.prefixPreservingKeys={"M-g":!0,"C-x":!0,"C-q":!0,"C-u":!0};var Tte=new fi.SetMark,cS=new fi.UndoAction,j5e=new fi.MoveCursorDown,V5e=new fi.MoveCursorUp,K5e=new fi.MoveCursorRight,q5e=new fi.MoveCursorLeft;ir.COMMANDS={"M-/":{description:"",action:"editor.action.triggerSuggest"},"C-'":{description:"",action:"editor.action.triggerSuggest"},"M-;":{description:"",action:"editor.action.commentLine"},"C-t":{description:"",action:"editor.action.transposeLetters"},"C-x C-p":{description:"",action:"editor.action.selectAll"},Tab:{description:"",action:"editor.action.formatDocument"},"C-Backspace":{description:"",action:"deleteWordLeft"},"C-d":{description:"",action:"deleteRight"},"M-Backspace":{description:"",action:"deleteWordLeft"},"M-Delete":{description:"",action:"deleteWordLeft"},"C-x C-u":{description:"",action:"editor.action.transformToUppercase"},"C-x C-l":{description:"",action:"editor.action.transformToLowercase"},"C-v":{description:"",action:"cursorPageDown"},PageDown:{description:"",action:"cursorPageDown"},"M-v":{description:"",action:"cursorPageUp"},PageUp:{description:"",action:"cursorPageUp"},"M-g n":{description:"",action:"editor.action.marker.next"},"M-g p":{description:"",action:"editor.action.marker.prev"},"M-C-n":{description:"",action:"editor.action.addSelectionToNextFindMatch"},"C-h":{description:"",action:"deleteLeft"},"M-d":{description:"",action:"deleteWordRight"},"S-C-":{description:"",action:"editor.action.triggerParameterHints"},"C-SPC":Tte,"S-C-2":Tte,"C-/":cS,"S-C--":cS,"C-z":cS,"C-x u":cS,"C-n":j5e,"C-p":V5e,"C-f":K5e,"C-b":q5e,"S-C-Backspace":new fi.DeleteLines,"M-f":new fi.MoveCursorWordRight,"M-b":new fi.MoveCursorWordLeft,"C-k":new fi.KillLines,"C-m":new fi.InsertLineAfter,"C-w":new fi.KillSelection,"C-o":new fi.InsertLineBelow,"C-g":new fi.KeyBoardQuit,"C-e":new fi.MoveCursorToLineEnd,"C-a":new fi.MoveCursorToLineStart,"C-y":new fi.Yank,"M-w":new fi.YankSelectionToRing,"M-y":new fi.YankRotate,"C-l":new fi.RevealToCenterAction,"C-q Tab":new fi.InsertTabs,"M-r":new fi.RotateCursorOnScreen,"M-g g":new fi.GotoLine,"M-g M-g":new fi.GotoLine,"C-x C-x":new fi.InvertSelection,"S-M-.":new fi.MoveCursorBottom,"S-M-,":new fi.MoveCursorTop,"C-s":new fi.Search,"C-r":new fi.Search,"S-M-5":new fi.SearchReplace};function G5e(i,e,t,n){var r=i.getEditor(),o=parseInt(t)||1;if(e.run){e.run(r,i,o,n);return}if(typeof e.action=="string")for(var s=0;s{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.Emitter=jr.Event=jr.monacoToEmacsKey=jr.modifierKeys=void 0;var Q5e=(Kv(),Kh(Vv));jr.modifierKeys={Alt:"M",Control:"C",Ctrl:"C",Meta:"CMD",Shift:"S"};var kte={Enter:"Return",Space:"SPC",Backslash:"\\",Slash:"/",Backquote:"`",BracketRight:"]",BracketLeft:"[",Comma:",",Period:".",Equal:"=",Minus:"-",Quote:"'",Semicolon:";"},J5e=["Key","Numpad"],Ite="Arrow";function Z5e(i){var e=Q5e.KeyCode[i.keyCode];if(jr.modifierKeys[e])return"";var t=J5e.some(function(n){return e.startsWith(n)})?e[e.length-1]:e;return e.endsWith(Ite)?t=e.substring(0,e.length-Ite.length):kte[e]&&(t=kte[t]),t.length===1&&(t=t.toLowerCase()),i.altKey&&(t="".concat(jr.modifierKeys.Alt,"-").concat(t)),i.ctrlKey&&(t="".concat(jr.modifierKeys.Ctrl,"-").concat(t)),i.metaKey&&(t="".concat(jr.modifierKeys.Meta,"-").concat(t)),i.shiftKey&&(t="".concat(jr.modifierKeys.Shift,"-").concat(t)),t}jr.monacoToEmacsKey=Z5e;var e4e;(function(i){var e={dispose:function(){}};i.None=function(){return e}})(e4e=jr.Event||(jr.Event={}));var t4e=function(){function i(){this._listeners=[]}return Object.defineProperty(i.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){e._listeners.push(t);var n={dispose:function(){if(!e._disposed){var r=e._listeners.indexOf(t);r<0||e._listeners.splice(r,1)}}};return n}),this._event},enumerable:!1,configurable:!0}),i.prototype.fire=function(e){this._listeners.length&&this._listeners.forEach(function(t){return t(e)})},i.prototype.dispose=function(){this._disposed||(this._listeners=void 0,this._disposed=!0)},i}();jr.Emitter=t4e});var Lte=gt(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});uS.BasicInputWidget=void 0;var i4e=(Kv(),Kh(Vv)),Yo="ext-emacs-basic-input";function n4e(){return` + .`.concat(Yo,` { color: #d4d4d4; transition: top 200ms linear; visibility: hidden; @@ -104,11 +104,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho padding: 5px; } - .`).concat($o,".").concat($o,`-visible { + .`).concat(Yo,".").concat(Yo,`-visible { visibility: visible; } - .`).concat($o,` input { + .`).concat(Yo,` input { color: rgb(97, 97, 97); background-color: transparent; display: inline-block; @@ -125,54 +125,54 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho max-width: 50px; } - .`).concat($o,` input:focus { + .`).concat(Yo,` input:focus { outline: none; } - .vs .`).concat($o,` { + .vs .`).concat(Yo,` { color: rgb(97, 97, 97); background-color: #efeff2; box-shadow: 0 2px 8px #a8a8a8; } - .vs-dark .`).concat($o,` { + .vs-dark .`).concat(Yo,` { background-color: #2d2d30; box-shadow: 0 2px 8px #000000; } - .vs-dark .`).concat($o,` input { + .vs-dark .`).concat(Yo,` input { color: rgb(204, 204, 204); } - .hc-black .`).concat($o,` { + .hc-black .`).concat(Yo,` { border: 2px solid #6fc3df; background-color: #0c141f; color: #ffffff; } - .hc-black .`).concat($o,` input { + .hc-black .`).concat(Yo,` input { color: #ffffff; } -`)}var n5e=function(){function i(){var e=this;this._pendingPromise=null,this.onKeyDown=function(n){(n.altKey||n.ctrlKey||n.metaKey)&&(n.preventDefault(),n.stopPropagation()),n.which===13?e._pendingPromise&&(n.preventDefault(),e._pendingPromise.resolve(n.target.value),e._pendingPromise=null):n.which===27&&e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this.onBlur=function(){e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this._dom=document.createElement("div"),this._messageDom=document.createElement("div");var t=document.createElement("div");this._dom.setAttribute("class",$o),this._dom.setAttribute("aria-hidden","true"),this._input=document.createElement("input"),this._dom.appendChild(this._messageDom),t.appendChild(this._input),this._dom.appendChild(t),this.addListeners(),this._style=document.createElement("style"),this._style.type="text/css",this._style.textContent=i5e(),(document.head||document.body).appendChild(this._style)}return i.prototype.getDomNode=function(){return this._dom},i.prototype.getId=function(){return"extension.emacs.basicinput"},i.prototype.getPosition=function(){return{preference:t5e.editor.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}},i.prototype.addListeners=function(){this._input.addEventListener("keydown",this.onKeyDown),this._input.addEventListener("blur",this.onBlur)},i.prototype.showWidgetAndFocus=function(e){this._dom.classList.add("".concat($o,"-visible")),this._dom.setAttribute("aria-hidden","false"),this._messageDom.textContent=e,this._input.focus()},i.prototype.cleanup=function(){this._dom.classList.remove("".concat($o,"-visible")),this._dom.setAttribute("aria-hidden","true"),this._messageDom.textContent="",this._input.placeholder="",this._input.value=""},i.prototype.getInput=function(e){var t=this;return this._pendingPromise&&(this._pendingPromise.reject(),this._pendingPromise=null),new Promise(function(n,r){t._pendingPromise={resolve:function(o){n(o),t.cleanup()},reject:function(){r(),t.cleanup()}},t.showWidgetAndFocus(e)})},i.prototype.dispose=function(){this.cleanup(),this._input.removeEventListener("keydown",this.onKeyDown),this._input.removeEventListener("blur",this.onBlur),(document.head||document.body).removeChild(this._style)},i}();hS.BasicInputWidget=n5e});var Mte=gt(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.State=xc.EAT_UP_KEY=void 0;var Lte=uS();xc.EAT_UP_KEY="==-==";var r5e=function(){function i(){this._inargumentMode=!1,this._killRing=[]}return i.prototype.updateAndGetKey=function(e){return e==="C-g"&&(this._inargumentMode||this._prefixKey)?(this.resetState(),xc.EAT_UP_KEY):this.updateCuMode(e)?xc.EAT_UP_KEY:this._prefixKey?"".concat(this._prefixKey," ").concat(e):Lte.prefixPreservingKeys[e]?(this._prefixKey=e,xc.EAT_UP_KEY):e},i.prototype.setLastCommandKey=function(e){this._lastCommandKey=e},i.prototype.isLastCommandKey=function(e){return this._lastCommandKey==e},i.prototype.resetState=function(e){e===void 0&&(e=!1),this._inargumentMode=e,this._prefixKey=null,e?this._lastInputBuffer=this._inputBuffer:this._lastInputBuffer=null,this._inputBuffer=null},i.prototype.updateCuMode=function(e){if(this._inargumentMode){if(typeof e=="string"&&/^\d$/.test(e))return this._inputBuffer=(this._inputBuffer||"")+e,!0;if(Lte.prefixPreservingKeys[e])return this.resetState(!0),!1}else if(!this._prefixKey&&e==="C-u")return this._inargumentMode=!0,this._inputBuffer=null,this._lastInputBuffer=null,!0},i.prototype.updateStateOnExecution=function(e){e===void 0&&(e=!1),this.resetState(e)},i.prototype.getInputBuffer=function(){return this._lastInputBuffer||this._inputBuffer},i.prototype.addToRing=function(e){this._killRing.push(e),this._killRing.length>50&&this._killRing.shift()},i.prototype.growRingTop=function(e){this._killRing.length||this.addToRing(e),this._killRing[this._killRing.length-1]+=e},i.prototype.getFromRing=function(e){return this._killRing[this._killRing.length-(e?Math.min(e,1):1)]||""},i.prototype.popFromRing=function(){return this._killRing.length>1?this._killRing.pop():this.getFromRing()},i.prototype.getReadableState=function(){var e="";return this._inargumentMode&&(e+="C-u",this._inputBuffer?e+=" ".concat(this._inputBuffer):this._lastInputBuffer&&(e+=" ".concat(this._lastInputBuffer))),this._prefixKey&&(e+=" ".concat(this._prefixKey)),e},i}();xc.State=r5e});var Pte=gt(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.getConfiguration=mm.EmacsExtension=void 0;var Oh=(Kv(),Kh(Vv)),o5e=Qee(),fS=yte(),Dte=uS(),iD=Ite(),s5e=Ate(),Nte=Mte(),Rte=Oh.editor,nD=Rte.TextEditorCursorBlinkingStyle,rD=Rte.TextEditorCursorStyle,a5e=function(){function i(e){this._disposables=[],this._inSelectionMode=!1,this._changeDisposable=null,this._state=new Nte.State,this._onDidMarkChange=new iD.Emitter,this.onDidMarkChange=this._onDidMarkChange.event,this._onDidChangeKey=new iD.Emitter,this.onDidChangeKey=this._onDidChangeKey.event,this._editor=e;var t=Ote(e);this._intialCursorType=t.cursorStyle,this._intialCursorBlinking=t.cursorBlinking,this._basicInputWidget=new s5e.BasicInputWidget}return i.prototype.start=function(){this._disposables.length||(this.addListeners(),this._editor.updateOptions({cursorStyle:fS(rD[rD.Block]),cursorBlinking:fS(nD[nD.Blink])}),this._editor.addOverlayWidget(this._basicInputWidget))},Object.defineProperty(i.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),i.prototype.getEditor=function(){return this._editor},i.prototype.addListeners=function(){this._disposables.push(this._editor.onKeyDown(this.onKeyDown.bind(this))),this._throttledScroll=o5e(this.onEditorScroll.bind(this),500),this._disposables.push(this._editor.onDidScrollChange(this._throttledScroll))},i.prototype.cancelKey=function(e){e.preventDefault(),e.stopPropagation()},i.prototype.onKeyDown=function(e){if(!e.browserEvent.defaultPrevented){var t=(0,iD.monacoToEmacsKey)(e);if(t){if(t=this._state.updateAndGetKey(t),this._onDidChangeKey.fire(this._state.getReadableState()),t===Nte.EAT_UP_KEY){this._onDidChangeKey.fire(this._state.getReadableState()),this.cancelKey(e);return}var n=Dte.COMMANDS[t];if(!n){this._onDidChangeKey.fire(this._state.getReadableState()),this._state.setLastCommandKey(t);return}this.cancelKey(e);var r=this._state.isLastCommandKey(t);(0,Dte.executeCommand)(this,n,this._state.getInputBuffer(),r),this._state.setLastCommandKey(t),this._state.updateStateOnExecution()}}},i.prototype.onEditorScroll=function(){var e=this._editor.getLayoutInfo().height,t=this._editor.getScrolledVisiblePosition(this._editor.getPosition());if(!(t.top>=0&&t.top<=e)){var n=this._editor.getVisibleRanges();if(n.length){var r,o=this._editor.getSelection();t.top<0?r=new Oh.Position(n[0].getStartPosition().lineNumber,1):t.top>e&&(r=new Oh.Position(n[n.length-1].getEndPosition().lineNumber,1)),this._inSelectionMode?this._editor.setSelection(Oh.Selection.fromPositions(o.getStartPosition(),r)):this._editor.setPosition(r)}}},i.prototype.onContentChange=function(){this.selectionMode=!1},i.prototype.clearState=function(){this._state.updateStateOnExecution()},Object.defineProperty(i.prototype,"selectionMode",{get:function(){return this._inSelectionMode},set:function(e){e!==this._inSelectionMode&&(this._inSelectionMode=e,e?this._changeDisposable=this._editor.onDidChangeModelContent(this.onContentChange.bind(this)):this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._onDidMarkChange.fire(e))},enumerable:!1,configurable:!0}),i.prototype.getCursorAnchor=function(){var e=this._editor.getSelection(),t=e.getDirection();return t===Oh.SelectionDirection.LTR?e.getEndPosition():e.getStartPosition()},i.prototype.getBasicInput=function(e){return this._basicInputWidget.getInput(e)},i.prototype.dispose=function(){this._disposables.forEach(function(e){return e.dispose()}),this._disposables=void 0,this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._editor.updateOptions({cursorStyle:this._intialCursorType,cursorBlinking:this._intialCursorBlinking}),this._editor.removeOverlayWidget(this._basicInputWidget),this._basicInputWidget.dispose(),this._throttledScroll.cancel(),this._state=null},i}();mm.EmacsExtension=a5e;function Ote(i){var e=i.getOption(Oh.editor.EditorOption.cursorStyle),t=i.getOption(Oh.editor.EditorOption.cursorBlinking);return{cursorStyle:fS(rD[e]),cursorBlinking:fS(nD[t])}}mm.getConfiguration=Ote});var Hte=gt(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.Actions=Yo.EmacsExtension=Yo.unregisterKey=Yo.getAllMappings=Yo.registerGlobalCommand=void 0;var Fte=Pte();Object.defineProperty(Yo,"EmacsExtension",{enumerable:!0,get:function(){return Fte.EmacsExtension}});var oD=uS();Object.defineProperty(Yo,"registerGlobalCommand",{enumerable:!0,get:function(){return oD.registerGlobalCommand}});Object.defineProperty(Yo,"getAllMappings",{enumerable:!0,get:function(){return oD.getAllMappings}});Object.defineProperty(Yo,"unregisterKey",{enumerable:!0,get:function(){return oD.unregisterKey}});var l5e=tD();Yo.Actions=l5e;Yo.default=Fte.EmacsExtension});var nne=gt((ine,aN)=>{(function(i){if(typeof ine=="object"&&typeof aN!="undefined")aN.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=i()}})(function(){var i,e,t;return function(){function n(r,o,s){function a(d,u){if(!o[d]){if(!r[d]){var h=typeof $d=="function"&&$d;if(!u&&h)return h(d,!0);if(l)return l(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=o[d]={exports:{}};r[d][0].call(m.exports,function(g){var b=r[d][1][g];return a(b||g)},m,m.exports,n,r,o,s)}return o[d].exports}for(var l=typeof $d=="function"&&$d,c=0;cb._averageHeight){var W=b._renderChunk();b._lastRepaint=A,W!==!1&&typeof S.afterRender=="function"&&S.afterRender()}}};k()}return s(p,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(g,b){var S;if(Object.assign(this._config,c,b),!g||g.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=g;var k=this._config,N=this._scroller||k.scroller||document.createElement(k.scrollerTagName||"tr");if(typeof k.useFragment!="boolean"&&(this._config.useFragment=!0),!k.generate)throw new Error("Missing required `generate` function");if(!d(k.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(k.itemHeight)&&!d(k.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(k.itemHeight)?this._itemHeights=Array(k.total).fill(k.itemHeight):this._itemHeights=k.itemHeight,Object.keys(c).filter(function(Z){return Z in k}).forEach(function(Z){var ye=k[Z],_e=d(ye);if(ye&&typeof ye!="string"&&typeof ye!="number"){var $="Invalid optional `"+Z+"`, expected string or number";throw new Error($)}else _e&&(k[Z]=ye+"px")});var A=!!k.horizontal,H=k[A?"width":"height"];if(H){var K=d(H),W=K?!1:H.slice(-1)==="%",re=K?H:parseInt(H.replace(/px|%/,""),10),ae=window[A?"innerWidth":"innerHeight"];W?this._containerSize=ae*re/100:this._containerSize=d(H)?H:re}var Ne=k.scrollContainer,he=k.itemHeight*k.total,Xe=this._maxElementHeight;he>Xe&&console.warn(["HyperList: The maximum element height",Xe+"px has","been exceeded; please reduce your item height."].join(" "));var st={width:""+k.width,height:Ne?he+"px":""+k.height,overflow:Ne?"none":"auto",position:"relative"};p.mergeStyle(g,st),Ne&&p.mergeStyle(k.scrollContainer,{overflow:"auto"});var rt=(S={opacity:"0",position:"absolute"},a(S,A?"height":"width","1px"),a(S,A?"width":"height",he+"px"),S);p.mergeStyle(N,rt),this._scroller||g.appendChild(N);var Nt=this._computeScrollPadding();this._scrollPaddingBottom=Nt.bottom,this._scrollPaddingTop=Nt.top,this._scroller=N,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(k.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof k.afterRender=="function"&&k.afterRender()}},{key:"_getRow",value:function(g){var b=this._config,S=b.generate(g),k=S.height;if(k!==void 0&&d(k)?(S=S.element,k!==this._itemHeights[g]&&(this._itemHeights[g]=k,this._computePositions(g),this._scrollHeight=this._computeScrollHeight(g))):k=this._itemHeights[g],!S||S.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+g);u(S,b.rowClassName||"vrow");var N=this._itemPositions[g]+this._scrollPaddingTop;return p.mergeStyle(S,a({position:"absolute"},b.horizontal?"left":"top",N+"px")),S}},{key:"_getScrollPosition",value:function(){var g=this._config;return typeof g.overrideScrollPosition=="function"?g.overrideScrollPosition():this._element[g.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(g){var b=this._config,S=this._element,k=this._getScrollPosition(),N=b.total,A=b.reverse?this._getReverseFrom(k):this._getFrom(k)-1;if((A<0||A-this._screenItemsLen<0)&&(A=0),!g&&this._lastFrom===A)return!1;this._lastFrom=A;var H=A+this._cachedItemsLen;(H>N||H+this._cachedItemsLen>N)&&(H=N);var K=b.useFragment?document.createDocumentFragment():[],W=this._scroller;K[b.useFragment?"appendChild":"push"](W);for(var re=A;re0&&arguments[0]!==void 0?arguments[0]:1,b=this._config,S=b.total,k=b.reverse;g<1&&!k&&(g=1);for(var N=g;N0&&this._itemPositions[b]{(function(i,e){"use strict";function t(){n.width=i.innerWidth,n.height=5*c.barThickness;var u=n.getContext("2d");u.shadowBlur=c.shadowBlur,u.shadowColor=c.shadowColor;var h,p=u.createLinearGradient(0,0,n.width,0);for(h in c.barColors)p.addColorStop(h,c.barColors[h]);u.lineWidth=c.barThickness,u.beginPath(),u.moveTo(0,c.barThickness/2),u.lineTo(Math.ceil(r*n.width),c.barThickness/2),u.strokeStyle=p,u.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},d={config:function(u){for(var h in u)c.hasOwnProperty(h)&&(c[h]=u[h])},show:function(u){var h,p;o||(u?l=l||setTimeout(()=>d.show(),u):(o=!0,a!==null&&i.cancelAnimationFrame(a),n||((p=(n=e.createElement("canvas")).style).position="fixed",p.top=p.left=p.right=p.margin=p.padding=0,p.zIndex=100001,p.display="none",c.className&&n.classList.add(c.className),e.body.appendChild(n),h="resize",u=t,(p=i).addEventListener?p.addEventListener(h,u,!1):p.attachEvent?p.attachEvent("on"+h,u):p["on"+h]=u),n.style.opacity=1,n.style.display="block",d.progress(0),c.autoRun&&function m(){s=i.requestAnimationFrame(m),d.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(u){return u===void 0||(typeof u=="string"&&(u=(0<=u.indexOf("+")||0<=u.indexOf("-")?r:0)+parseFloat(u)),r=1typeof i=="function"?i:function(){return i},xoe=typeof self!="undefined"?self:null,a1=typeof window!="undefined"?window:null,c1=xoe||a1||c1,Eoe="2.0.0",Ia={connecting:0,open:1,closing:2,closed:3},Toe=1e4,koe=1e3,Po={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Nl={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},r3={longpoll:"longpoll",websocket:"websocket"},Ioe={complete:4},Ab=class{constructor(i,e,t,n){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,e){return this.hasReceived(i)&&e(this.receivedResp.response),this.recHooks.push({status:i,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:i,response:e,_ref:t}){this.recHooks.filter(n=>n.status===i).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,e){this.channel.trigger(this.refEvent,{status:i,response:e})}},bF=class{constructor(i,e){this.callback=i,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Aoe=class{constructor(i,e,t){this.state=Po.closed,this.topic=i,this.params=l1(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ab(this,Nl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new bF(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Po.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Po.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Po.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Po.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Ab(this,Nl.leave,l1({}),this.timeout).send(),this.state=Po.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Nl.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(i){this.on(Nl.close,i)}onError(i){return this.on(Nl.error,e=>i(e))}on(i,e){let t=this.bindingRef++;return this.bindings.push({event:i,ref:t,callback:e}),t}off(i,e){this.bindings=this.bindings.filter(t=>!(t.event===i&&(typeof e=="undefined"||e===t.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,e,t=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Ab(this,i,function(){return e},t);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Po.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Nl.close,"leave")},t=new Ab(this,Nl.leave,l1({}),i);return t.receive("ok",()=>e()).receive("timeout",()=>e()),t.send(),this.canPush()||t.trigger("ok",{}),t}onMessage(i,e,t){return e}isMember(i,e,t,n){return this.topic!==i?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Po.joining,this.joinPush.resend(i))}trigger(i,e,t,n){let r=this.onMessage(i,e,t,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===i);for(let s=0;s{let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(n),i}static xhrRequest(i,e,t,n,r,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",n),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===Ioe.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(r),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch(e){return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,e){let t=[];for(var n in i){if(!Object.prototype.hasOwnProperty.call(i,n))continue;let r=e?`${e}[${n}]`:n,o=i[n];typeof o=="object"?t.push(this.serialize(o,r)):t.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return t.join("&")}static appendParams(i,e){if(Object.keys(e).length===0)return i;let t=i.match(/\?/)?"&":"?";return`${i}${t}${this.serialize(e)}`}},n3=class{constructor(i){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(i),this.readyState=Ia.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+r3.websocket),"$1/"+r3.longpoll)}endpointURL(){return Mb.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=Ia.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Ia.open||this.readyState===Ia.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),i=>{if(i){var{status:e,token:t,messages:n}=i;this.token=t}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Ia.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(i){this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",i.join(` -`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(i,e,t){for(let r of this.reqs)r.abort();this.readyState=Ia.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:i,reason:e,wasClean:t});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(i,e,t,n,r){let o,s=()=>{this.reqs.delete(o),n()};o=Mb.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var Lb={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(i,e){if(i.payload.constructor===ArrayBuffer)return e(this.binaryEncode(i));{let t=[i.join_ref,i.ref,i.topic,i.event,i.payload];return e(JSON.stringify(t))}},decode(i,e){if(i.constructor===ArrayBuffer)return e(this.binaryDecode(i));{let[t,n,r,o,s]=JSON.parse(i);return e({join_ref:t,ref:n,topic:r,event:o,payload:s})}},binaryEncode(i){let{join_ref:e,ref:t,event:n,topic:r,payload:o}=i,s=this.META_LENGTH+e.length+t.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),Array.from(e,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(t,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(r,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(n,u=>l.setUint8(c++,u.charCodeAt(0)));var d=new Uint8Array(a.byteLength+o.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(o),a.byteLength),d.buffer},binaryDecode(i){let e=new DataView(i),t=e.getUint8(0),n=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(i,e,n);case this.KINDS.reply:return this.decodeReply(i,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(i,e,n)}},decodePush(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=t.decode(i.slice(s,s+n));s=s+n;let l=t.decode(i.slice(s,s+r));s=s+r;let c=t.decode(i.slice(s,s+o));s=s+o;let d=i.slice(s,i.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:d}},decodeReply(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=t.decode(i.slice(a,a+n));a=a+n;let c=t.decode(i.slice(a,a+r));a=a+r;let d=t.decode(i.slice(a,a+o));a=a+o;let u=t.decode(i.slice(a,a+s));a=a+s;let h=i.slice(a,i.byteLength),p={status:u,response:h};return{join_ref:l,ref:c,topic:d,event:Nl.reply,payload:p}},decodeBroadcast(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=this.HEADER_LENGTH+2,s=t.decode(i.slice(o,o+n));o=o+n;let a=t.decode(i.slice(o,o+r));o=o+r;let l=i.slice(o,i.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},Db=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||Toe,this.transport=e.transport||c1.WebSocket||n3,this.establishedConnections=0,this.defaultEncoder=Lb.encode.bind(Lb),this.defaultDecoder=Lb.decode.bind(Lb),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==n3?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;a1&&a1.addEventListener&&(a1.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),t=this.connectClock)}),a1.addEventListener("pageshow",n=>{t===this.connectClock&&(t=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=l1(e.params||{}),this.endPoint=`${i}/${r3.websocket}`,this.vsn=e.vsn||Eoe,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new bF(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return n3}replaceTransport(i){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=i}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let i=Mb.appendParams(Mb.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return i.charAt(0)!=="/"?i:i.charAt(1)==="/"?`${this.protocol()}:${i}`:`${this.protocol()}://${location.host}${i}`}disconnect(i,e,t){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(i,e,t)}connect(i){i&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=l1(i)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(i,e,t){this.logger(i,e,t)}hasLogger(){return this.logger!==null}onOpen(i){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,i]),e}onClose(i){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,i]),e}onError(i){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,i]),e}onMessage(i){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,i]),e}ping(i){if(!this.isConnected())return!1;let e=this.makeRef(),t=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(r=>{r.ref===e&&(this.off([n]),i(Date.now()-t))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,i])=>i())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),koe,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(i,e,t){if(!this.conn)return i&&i();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,t||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),i&&i()})})}waitForBufferDone(i,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){i();return}setTimeout(()=>{this.waitForBufferDone(i,e+1)},150*e)}waitForSocketClosed(i,e=1){if(e===5||!this.conn||this.conn.readyState===Ia.closed){i();return}setTimeout(()=>{this.waitForSocketClosed(i,e+1)},150*e)}onConnClose(i){let e=i&&i.code;this.hasLogger()&&this.log("transport","close",i),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,t])=>t(i))}onConnError(i){this.hasLogger()&&this.log("transport",i);let e=this.transport,t=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(i,e,t)}),(e===this.transport||t>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(i=>{i.isErrored()||i.isLeaving()||i.isClosed()||i.trigger(Nl.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Ia.connecting:return"connecting";case Ia.open:return"open";case Ia.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(i){this.off(i.stateChangeRefs),this.channels=this.channels.filter(e=>e.joinRef()!==i.joinRef())}off(i){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([t])=>i.indexOf(t)===-1)}channel(i,e={}){let t=new Aoe(i,e,this);return this.channels.push(t),t}push(i){if(this.hasLogger()){let{topic:e,event:t,payload:n,ref:r,join_ref:o}=i;this.log("push",`${e} ${t} (${o}, ${r})`,n)}this.isConnected()?this.encode(i,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(i,e=>this.conn.send(e)))}makeRef(){let i=this.ref+1;return i===this.ref?this.ref=0:this.ref=i,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(i=>i()),this.sendBuffer=[])}onConnMessage(i){this.decode(i.data,e=>{let{topic:t,event:n,payload:r,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${o&&"("+o+")"||""}`,r);for(let a=0;at.topic===i&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),e.leave())}};var jF="consecutive-reloads",Loe=10,Moe=5e3,Doe=1e4,Noe=3e4,VF=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Ho="data-phx-component",o3="data-phx-link",Roe="track-static",Ooe="data-phx-link-state",us="data-phx-ref",du="data-phx-ref-src",KF="track-uploads",uu="data-phx-upload-ref",y3="data-phx-preflighted-refs",Poe="data-phx-done-refs",yF="drop-target",g3="data-phx-active-refs",jb="phx:live-file:updated",v3="data-phx-skip",CF="data-phx-prune",SF="page-loading",wF="phx-connected",d1="phx-loading",s3="phx-no-feedback",Nb="phx-error",xF="phx-client-error",a3="phx-server-error",yf="data-phx-parent-id",C3="data-phx-main",b1="data-phx-root-id",qF="viewport-top",GF="viewport-bottom",Foe="trigger-action",Kb="feedback-for",_3="phx-has-focused",Hoe=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],$F=["checkbox","radio"],qb="phx-has-submitted",Zc="data-phx-session",Sf=`[${Zc}]`,EF="data-phx-sticky",v1="data-phx-static",l3="data-phx-readonly",Rb="data-phx-disabled",b3="disable-with",Ob="data-phx-disable-with-restore",u1="hook",Boe="debounce",zoe="throttle",Gb="update",c3="stream",h1="data-phx-stream",Uoe="key",Aa="phxPrivate",TF="auto-recover",Pb="phx:live-socket:debug",d3="phx:live-socket:profiling",u3="phx:live-socket:latency-sim",Woe="progress",kF="mounted",joe=1,Voe=200,Koe="phx-",qoe=3e4,f1="debounce-trigger",Fb="throttled",IF="debounce-prev-key",Goe={debounce:300,throttle:300},h3="d",La="s",Fo="c",AF="e",LF="r",MF="t",$oe="p",DF="stream",Yoe=class{constructor(i,e,t){this.liveSocket=t,this.entry=i,this.offset=0,this.chunkSize=e,this.chunkTimer=null,this.errored=!1,this.uploadChannel=t.channel(`lvu:${i.ref}`,{token:i.metadata()})}error(i){this.errored||(this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(i))}upload(){this.uploadChannel.onError(i=>this.error(i)),this.uploadChannel.join().receive("ok",i=>this.readNextChunk()).receive("error",i=>this.error(i))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let i=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);i.onload=t=>{if(t.target.error===null)this.offset+=t.target.result.byteLength,this.pushChunk(t.target.result);else return Pr("Read error: "+t.target.error)},i.readAsArrayBuffer(e)}pushChunk(i){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",i).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Pr=(i,e)=>console.error&&console.error(i,e),Qc=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Xoe(){let i=new Set,e=document.querySelectorAll("*[id]");for(let t=0,n=e.length;t{i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,n)},f3=i=>typeof i=="function"?i:function(){return i},Vb=i=>JSON.parse(JSON.stringify(i)),_1=(i,e,t)=>{do{if(i.matches(`[${e}]`)&&!i.disabled)return i;i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1&&!(t&&t.isSameNode(i)||i.matches(Sf)));return null},p1=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),Joe=(i,e)=>JSON.stringify(i)===JSON.stringify(e),NF=i=>{for(let e in i)return!1;return!0},Jc=(i,e)=>i&&e(i),Zoe=function(i,e,t,n){i.forEach(r=>{new Yoe(r,t.config.chunk_size,n).upload()})},YF={canPushState(){return typeof history.pushState!="undefined"},dropLocal(i,e,t){return i.removeItem(this.localKey(e,t))},updateLocal(i,e,t,n,r){let o=this.getLocal(i,e,t),s=this.localKey(e,t),a=o===null?n:r(o);return i.setItem(s,JSON.stringify(a)),a},getLocal(i,e,t){return JSON.parse(i.getItem(this.localKey(e,t)))},updateCurrentState(i){this.canPushState()&&history.replaceState(i(history.state||{}),"",window.location.href)},pushState(i,e,t){if(this.canPushState()){if(t!==window.location.href){if(e.type=="redirect"&&e.scroll){let r=history.state||{};r.scroll=e.scroll,history.replaceState(r,"",window.location.href)}delete e.scroll,history[i+"State"](e,"",t||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)}}else this.redirect(t)},setCookie(i,e){document.cookie=`${i}=${e}`},getCookie(i){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${i}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(i,e){e&&YF.setCookie("__phoenix_flash__",e+"; max-age=60000; path=/"),window.location=i},localKey(i,e){return`${i}-${e}`},getHashTargetEl(i){let e=i.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},Ma=YF,ds={byId(i){return document.getElementById(i)||Pr(`no id found for ${i}`)},removeClass(i,e){i.classList.remove(e),i.classList.length===0&&i.removeAttribute("class")},all(i,e,t){if(!i)return[];let n=Array.from(i.querySelectorAll(e));return t?n.forEach(t):n},childNodeLength(i){let e=document.createElement("template");return e.innerHTML=i,e.content.childElementCount},isUploadInput(i){return i.type==="file"&&i.getAttribute(uu)!==null},findUploadInputs(i){return this.all(i,`input[type="file"][${uu}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Ho}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&ds.private(i,"destroyed"))},wantsNewTab(i){let e=i.ctrlKey||i.shiftKey||i.metaKey||i.button&&i.button===1,t=i.target instanceof HTMLAnchorElement&&i.target.hasAttribute("download"),n=i.target.hasAttribute("target")&&i.target.getAttribute("target").toLowerCase()==="_blank";return e||n||t},isUnloadableFormSubmit(i){return!i.defaultPrevented&&!this.wantsNewTab(i)},isNewPageClick(i,e){let t=i.target instanceof HTMLAnchorElement?i.target.getAttribute("href"):null,n;if(i.defaultPrevented||t===null||this.wantsNewTab(i)||t.startsWith("mailto:")||t.startsWith("tel:"))return!1;try{n=new URL(t)}catch(r){try{n=new URL(t,e)}catch(o){return!0}}return n.host===e.host&&n.protocol===e.protocol&&n.pathname===e.pathname&&n.search===e.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(i){this.isPhxChild(i)&&i.setAttribute(Zc,""),this.putPrivate(i,"destroyed",!0)},findPhxChildrenInFragment(i,e){let t=document.createElement("template");return t.innerHTML=i,this.findPhxChildren(t.content,e)},isIgnored(i,e){return(i.getAttribute(e)||i.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(i,e,t){return i.getAttribute&&t.indexOf(i.getAttribute(e))>=0},findPhxSticky(i){return this.all(i,`[${EF}]`)},findPhxChildren(i,e){return this.all(i,`${Sf}[${yf}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),n=e.reduce((r,o)=>{let s=`[${Ho}="${o}"] [${Ho}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Ho))).forEach(a=>r.delete(a)),r},t);return n.size===0?new Set(e):n},filterWithinSameLiveView(i,e){return e.querySelector(Sf)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(Zc)!==null)return!1}},private(i,e){return i[Aa]&&i[Aa][e]},deletePrivate(i,e){i[Aa]&&delete i[Aa][e]},putPrivate(i,e,t){i[Aa]||(i[Aa]={}),i[Aa][e]=t},updatePrivate(i,e,t,n){let r=this.private(i,e);r===void 0?this.putPrivate(i,e,n(t)):this.putPrivate(i,e,n(r))},copyPrivates(i,e){e[Aa]&&(i[Aa]=e[Aa])},putTitle(i){let e=document.querySelector("title");if(e){let{prefix:t,suffix:n}=e.dataset;document.title=`${t||""}${i}${n||""}`}else document.title=i},debounce(i,e,t,n,r,o,s,a){let l=i.getAttribute(t),c=i.getAttribute(r);l===""&&(l=n),c===""&&(c=o);let d=l||c;switch(d){case null:return a();case"blur":this.once(i,"debounce-blur")&&i.addEventListener("blur",()=>a());return;default:let u=parseInt(d),h=()=>c?this.deletePrivate(i,Fb):a(),p=this.incCycle(i,f1,h);if(isNaN(u))return Pr(`invalid throttle/debounce value: ${d}`);if(c){let g=!1;if(e.type==="keydown"){let b=this.private(i,IF);this.putPrivate(i,IF,e.key),g=b!==e.key}if(!g&&this.private(i,Fb))return!1;a(),this.putPrivate(i,Fb,!0),setTimeout(()=>{s()&&this.triggerCycle(i,f1)},u)}else setTimeout(()=>{s()&&this.triggerCycle(i,f1,p)},u);let m=i.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([g])=>{let b=m.querySelector(`[name="${g}"]`);this.incCycle(b,f1),this.deletePrivate(b,Fb)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,f1))}},triggerCycle(i,e,t){let[n,r]=this.private(i,e);t||(t=n),t===n&&(this.incCycle(i,e),r())},once(i,e){return this.private(i,e)===!0?!1:(this.putPrivate(i,e,!0),!0)},incCycle(i,e,t=function(){}){let[n]=this.private(i,e)||[0,t];return n++,this.putPrivate(i,e,[n,t]),n},maybeAddPrivateHooks(i,e,t){i.hasAttribute&&(i.hasAttribute(e)||i.hasAttribute(t))&&i.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},maybeHideFeedback(i,e,t){if(!(this.private(e,_3)||this.private(e,qb))){let n=[e.name];e.name.endsWith("[]")&&n.push(e.name.slice(0,-2));let r=n.map(o=>`[${t}="${o}"]`).join(", ");ds.all(i,r,o=>o.classList.add(s3))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let n=`[${e}="${t.id}"], +`)}var r4e=function(){function i(){var e=this;this._pendingPromise=null,this.onKeyDown=function(n){(n.altKey||n.ctrlKey||n.metaKey)&&(n.preventDefault(),n.stopPropagation()),n.which===13?e._pendingPromise&&(n.preventDefault(),e._pendingPromise.resolve(n.target.value),e._pendingPromise=null):n.which===27&&e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this.onBlur=function(){e._pendingPromise&&(e._pendingPromise.reject(),e._pendingPromise=null)},this._dom=document.createElement("div"),this._messageDom=document.createElement("div");var t=document.createElement("div");this._dom.setAttribute("class",Yo),this._dom.setAttribute("aria-hidden","true"),this._input=document.createElement("input"),this._dom.appendChild(this._messageDom),t.appendChild(this._input),this._dom.appendChild(t),this.addListeners(),this._style=document.createElement("style"),this._style.type="text/css",this._style.textContent=n4e(),(document.head||document.body).appendChild(this._style)}return i.prototype.getDomNode=function(){return this._dom},i.prototype.getId=function(){return"extension.emacs.basicinput"},i.prototype.getPosition=function(){return{preference:i4e.editor.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}},i.prototype.addListeners=function(){this._input.addEventListener("keydown",this.onKeyDown),this._input.addEventListener("blur",this.onBlur)},i.prototype.showWidgetAndFocus=function(e){this._dom.classList.add("".concat(Yo,"-visible")),this._dom.setAttribute("aria-hidden","false"),this._messageDom.textContent=e,this._input.focus()},i.prototype.cleanup=function(){this._dom.classList.remove("".concat(Yo,"-visible")),this._dom.setAttribute("aria-hidden","true"),this._messageDom.textContent="",this._input.placeholder="",this._input.value=""},i.prototype.getInput=function(e){var t=this;return this._pendingPromise&&(this._pendingPromise.reject(),this._pendingPromise=null),new Promise(function(n,r){t._pendingPromise={resolve:function(o){n(o),t.cleanup()},reject:function(){r(),t.cleanup()}},t.showWidgetAndFocus(e)})},i.prototype.dispose=function(){this.cleanup(),this._input.removeEventListener("keydown",this.onKeyDown),this._input.removeEventListener("blur",this.onBlur),(document.head||document.body).removeChild(this._style)},i}();uS.BasicInputWidget=r4e});var Dte=gt(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.State=Ec.EAT_UP_KEY=void 0;var Mte=dS();Ec.EAT_UP_KEY="==-==";var o4e=function(){function i(){this._inargumentMode=!1,this._killRing=[]}return i.prototype.updateAndGetKey=function(e){return e==="C-g"&&(this._inargumentMode||this._prefixKey)?(this.resetState(),Ec.EAT_UP_KEY):this.updateCuMode(e)?Ec.EAT_UP_KEY:this._prefixKey?"".concat(this._prefixKey," ").concat(e):Mte.prefixPreservingKeys[e]?(this._prefixKey=e,Ec.EAT_UP_KEY):e},i.prototype.setLastCommandKey=function(e){this._lastCommandKey=e},i.prototype.isLastCommandKey=function(e){return this._lastCommandKey==e},i.prototype.resetState=function(e){e===void 0&&(e=!1),this._inargumentMode=e,this._prefixKey=null,e?this._lastInputBuffer=this._inputBuffer:this._lastInputBuffer=null,this._inputBuffer=null},i.prototype.updateCuMode=function(e){if(this._inargumentMode){if(typeof e=="string"&&/^\d$/.test(e))return this._inputBuffer=(this._inputBuffer||"")+e,!0;if(Mte.prefixPreservingKeys[e])return this.resetState(!0),!1}else if(!this._prefixKey&&e==="C-u")return this._inargumentMode=!0,this._inputBuffer=null,this._lastInputBuffer=null,!0},i.prototype.updateStateOnExecution=function(e){e===void 0&&(e=!1),this.resetState(e)},i.prototype.getInputBuffer=function(){return this._lastInputBuffer||this._inputBuffer},i.prototype.addToRing=function(e){this._killRing.push(e),this._killRing.length>50&&this._killRing.shift()},i.prototype.growRingTop=function(e){this._killRing.length||this.addToRing(e),this._killRing[this._killRing.length-1]+=e},i.prototype.getFromRing=function(e){return this._killRing[this._killRing.length-(e?Math.min(e,1):1)]||""},i.prototype.popFromRing=function(){return this._killRing.length>1?this._killRing.pop():this.getFromRing()},i.prototype.getReadableState=function(){var e="";return this._inargumentMode&&(e+="C-u",this._inputBuffer?e+=" ".concat(this._inputBuffer):this._lastInputBuffer&&(e+=" ".concat(this._lastInputBuffer))),this._prefixKey&&(e+=" ".concat(this._prefixKey)),e},i}();Ec.State=o4e});var Fte=gt(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.getConfiguration=pm.EmacsExtension=void 0;var Oh=(Kv(),Kh(Vv)),s4e=Jee(),hS=Cte(),Nte=dS(),eD=Ate(),a4e=Lte(),Rte=Dte(),Ote=Oh.editor,tD=Ote.TextEditorCursorBlinkingStyle,iD=Ote.TextEditorCursorStyle,l4e=function(){function i(e){this._disposables=[],this._inSelectionMode=!1,this._changeDisposable=null,this._state=new Rte.State,this._onDidMarkChange=new eD.Emitter,this.onDidMarkChange=this._onDidMarkChange.event,this._onDidChangeKey=new eD.Emitter,this.onDidChangeKey=this._onDidChangeKey.event,this._editor=e;var t=Pte(e);this._intialCursorType=t.cursorStyle,this._intialCursorBlinking=t.cursorBlinking,this._basicInputWidget=new a4e.BasicInputWidget}return i.prototype.start=function(){this._disposables.length||(this.addListeners(),this._editor.updateOptions({cursorStyle:hS(iD[iD.Block]),cursorBlinking:hS(tD[tD.Blink])}),this._editor.addOverlayWidget(this._basicInputWidget))},Object.defineProperty(i.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),i.prototype.getEditor=function(){return this._editor},i.prototype.addListeners=function(){this._disposables.push(this._editor.onKeyDown(this.onKeyDown.bind(this))),this._throttledScroll=s4e(this.onEditorScroll.bind(this),500),this._disposables.push(this._editor.onDidScrollChange(this._throttledScroll))},i.prototype.cancelKey=function(e){e.preventDefault(),e.stopPropagation()},i.prototype.onKeyDown=function(e){if(!e.browserEvent.defaultPrevented){var t=(0,eD.monacoToEmacsKey)(e);if(t){if(t=this._state.updateAndGetKey(t),this._onDidChangeKey.fire(this._state.getReadableState()),t===Rte.EAT_UP_KEY){this._onDidChangeKey.fire(this._state.getReadableState()),this.cancelKey(e);return}var n=Nte.COMMANDS[t];if(!n){this._onDidChangeKey.fire(this._state.getReadableState()),this._state.setLastCommandKey(t);return}this.cancelKey(e);var r=this._state.isLastCommandKey(t);(0,Nte.executeCommand)(this,n,this._state.getInputBuffer(),r),this._state.setLastCommandKey(t),this._state.updateStateOnExecution()}}},i.prototype.onEditorScroll=function(){var e=this._editor.getLayoutInfo().height,t=this._editor.getScrolledVisiblePosition(this._editor.getPosition());if(!(t.top>=0&&t.top<=e)){var n=this._editor.getVisibleRanges();if(n.length){var r,o=this._editor.getSelection();t.top<0?r=new Oh.Position(n[0].getStartPosition().lineNumber,1):t.top>e&&(r=new Oh.Position(n[n.length-1].getEndPosition().lineNumber,1)),this._inSelectionMode?this._editor.setSelection(Oh.Selection.fromPositions(o.getStartPosition(),r)):this._editor.setPosition(r)}}},i.prototype.onContentChange=function(){this.selectionMode=!1},i.prototype.clearState=function(){this._state.updateStateOnExecution()},Object.defineProperty(i.prototype,"selectionMode",{get:function(){return this._inSelectionMode},set:function(e){e!==this._inSelectionMode&&(this._inSelectionMode=e,e?this._changeDisposable=this._editor.onDidChangeModelContent(this.onContentChange.bind(this)):this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._onDidMarkChange.fire(e))},enumerable:!1,configurable:!0}),i.prototype.getCursorAnchor=function(){var e=this._editor.getSelection(),t=e.getDirection();return t===Oh.SelectionDirection.LTR?e.getEndPosition():e.getStartPosition()},i.prototype.getBasicInput=function(e){return this._basicInputWidget.getInput(e)},i.prototype.dispose=function(){this._disposables.forEach(function(e){return e.dispose()}),this._disposables=void 0,this._changeDisposable&&(this._changeDisposable.dispose(),this._changeDisposable=null),this._editor.updateOptions({cursorStyle:this._intialCursorType,cursorBlinking:this._intialCursorBlinking}),this._editor.removeOverlayWidget(this._basicInputWidget),this._basicInputWidget.dispose(),this._throttledScroll.cancel(),this._state=null},i}();pm.EmacsExtension=l4e;function Pte(i){var e=i.getOption(Oh.editor.EditorOption.cursorStyle),t=i.getOption(Oh.editor.EditorOption.cursorBlinking);return{cursorStyle:hS(iD[e]),cursorBlinking:hS(tD[t])}}pm.getConfiguration=Pte});var Bte=gt(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Actions=Xo.EmacsExtension=Xo.unregisterKey=Xo.getAllMappings=Xo.registerGlobalCommand=void 0;var Hte=Fte();Object.defineProperty(Xo,"EmacsExtension",{enumerable:!0,get:function(){return Hte.EmacsExtension}});var nD=dS();Object.defineProperty(Xo,"registerGlobalCommand",{enumerable:!0,get:function(){return nD.registerGlobalCommand}});Object.defineProperty(Xo,"getAllMappings",{enumerable:!0,get:function(){return nD.getAllMappings}});Object.defineProperty(Xo,"unregisterKey",{enumerable:!0,get:function(){return nD.unregisterKey}});var c4e=ZM();Xo.Actions=c4e;Xo.default=Hte.EmacsExtension});var rne=gt((nne,oN)=>{(function(i){if(typeof nne=="object"&&typeof oN!="undefined")oN.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=i()}})(function(){var i,e,t;return function(){function n(r,o,s){function a(d,u){if(!o[d]){if(!r[d]){var h=typeof Yd=="function"&&Yd;if(!u&&h)return h(d,!0);if(l)return l(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=o[d]={exports:{}};r[d][0].call(m.exports,function(g){var b=r[d][1][g];return a(b||g)},m,m.exports,n,r,o,s)}return o[d].exports}for(var l=typeof Yd=="function"&&Yd,c=0;cb._averageHeight){var W=b._renderChunk();b._lastRepaint=A,W!==!1&&typeof S.afterRender=="function"&&S.afterRender()}}};k()}return s(p,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(g,b){var S;if(Object.assign(this._config,c,b),!g||g.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=g;var k=this._config,N=this._scroller||k.scroller||document.createElement(k.scrollerTagName||"tr");if(typeof k.useFragment!="boolean"&&(this._config.useFragment=!0),!k.generate)throw new Error("Missing required `generate` function");if(!d(k.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(k.itemHeight)&&!d(k.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(k.itemHeight)?this._itemHeights=Array(k.total).fill(k.itemHeight):this._itemHeights=k.itemHeight,Object.keys(c).filter(function(Z){return Z in k}).forEach(function(Z){var ye=k[Z],ge=d(ye);if(ye&&typeof ye!="string"&&typeof ye!="number"){var $="Invalid optional `"+Z+"`, expected string or number";throw new Error($)}else ge&&(k[Z]=ye+"px")});var A=!!k.horizontal,H=k[A?"width":"height"];if(H){var K=d(H),W=K?!1:H.slice(-1)==="%",re=K?H:parseInt(H.replace(/px|%/,""),10),ae=window[A?"innerWidth":"innerHeight"];W?this._containerSize=ae*re/100:this._containerSize=d(H)?H:re}var Ne=k.scrollContainer,he=k.itemHeight*k.total,Xe=this._maxElementHeight;he>Xe&&console.warn(["HyperList: The maximum element height",Xe+"px has","been exceeded; please reduce your item height."].join(" "));var st={width:""+k.width,height:Ne?he+"px":""+k.height,overflow:Ne?"none":"auto",position:"relative"};p.mergeStyle(g,st),Ne&&p.mergeStyle(k.scrollContainer,{overflow:"auto"});var rt=(S={opacity:"0",position:"absolute"},a(S,A?"height":"width","1px"),a(S,A?"width":"height",he+"px"),S);p.mergeStyle(N,rt),this._scroller||g.appendChild(N);var Nt=this._computeScrollPadding();this._scrollPaddingBottom=Nt.bottom,this._scrollPaddingTop=Nt.top,this._scroller=N,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(k.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof k.afterRender=="function"&&k.afterRender()}},{key:"_getRow",value:function(g){var b=this._config,S=b.generate(g),k=S.height;if(k!==void 0&&d(k)?(S=S.element,k!==this._itemHeights[g]&&(this._itemHeights[g]=k,this._computePositions(g),this._scrollHeight=this._computeScrollHeight(g))):k=this._itemHeights[g],!S||S.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+g);u(S,b.rowClassName||"vrow");var N=this._itemPositions[g]+this._scrollPaddingTop;return p.mergeStyle(S,a({position:"absolute"},b.horizontal?"left":"top",N+"px")),S}},{key:"_getScrollPosition",value:function(){var g=this._config;return typeof g.overrideScrollPosition=="function"?g.overrideScrollPosition():this._element[g.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(g){var b=this._config,S=this._element,k=this._getScrollPosition(),N=b.total,A=b.reverse?this._getReverseFrom(k):this._getFrom(k)-1;if((A<0||A-this._screenItemsLen<0)&&(A=0),!g&&this._lastFrom===A)return!1;this._lastFrom=A;var H=A+this._cachedItemsLen;(H>N||H+this._cachedItemsLen>N)&&(H=N);var K=b.useFragment?document.createDocumentFragment():[],W=this._scroller;K[b.useFragment?"appendChild":"push"](W);for(var re=A;re0&&arguments[0]!==void 0?arguments[0]:1,b=this._config,S=b.total,k=b.reverse;g<1&&!k&&(g=1);for(var N=g;N0&&this._itemPositions[b]{(function(i,e){"use strict";function t(){n.width=i.innerWidth,n.height=5*c.barThickness;var u=n.getContext("2d");u.shadowBlur=c.shadowBlur,u.shadowColor=c.shadowColor;var h,p=u.createLinearGradient(0,0,n.width,0);for(h in c.barColors)p.addColorStop(h,c.barColors[h]);u.lineWidth=c.barThickness,u.beginPath(),u.moveTo(0,c.barThickness/2),u.lineTo(Math.ceil(r*n.width),c.barThickness/2),u.strokeStyle=p,u.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},d={config:function(u){for(var h in u)c.hasOwnProperty(h)&&(c[h]=u[h])},show:function(u){var h,p;o||(u?l=l||setTimeout(()=>d.show(),u):(o=!0,a!==null&&i.cancelAnimationFrame(a),n||((p=(n=e.createElement("canvas")).style).position="fixed",p.top=p.left=p.right=p.margin=p.padding=0,p.zIndex=100001,p.display="none",c.className&&n.classList.add(c.className),e.body.appendChild(n),h="resize",u=t,(p=i).addEventListener?p.addEventListener(h,u,!1):p.attachEvent?p.attachEvent("on"+h,u):p["on"+h]=u),n.style.opacity=1,n.style.display="block",d.progress(0),c.autoRun&&function m(){s=i.requestAnimationFrame(m),d.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(u){return u===void 0||(typeof u=="string"&&(u=(0<=u.indexOf("+")||0<=u.indexOf("-")?r:0)+parseFloat(u)),r=1typeof i=="function"?i:function(){return i},Eoe=typeof self!="undefined"?self:null,s1=typeof window!="undefined"?window:null,l1=Eoe||s1||l1,Toe="2.0.0",Ia={connecting:0,open:1,closing:2,closed:3},koe=1e4,Ioe=1e3,Fo={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Nl={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},n3={longpoll:"longpoll",websocket:"websocket"},Aoe={complete:4},Ib=class{constructor(i,e,t,n){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,e){return this.hasReceived(i)&&e(this.receivedResp.response),this.recHooks.push({status:i,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:i,response:e,_ref:t}){this.recHooks.filter(n=>n.status===i).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,e){this.channel.trigger(this.refEvent,{status:i,response:e})}},vF=class{constructor(i,e){this.callback=i,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Loe=class{constructor(i,e,t){this.state=Fo.closed,this.topic=i,this.params=a1(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ib(this,Nl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new vF(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Fo.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Fo.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Fo.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Fo.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Ib(this,Nl.leave,a1({}),this.timeout).send(),this.state=Fo.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Nl.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(i){this.on(Nl.close,i)}onError(i){return this.on(Nl.error,e=>i(e))}on(i,e){let t=this.bindingRef++;return this.bindings.push({event:i,ref:t,callback:e}),t}off(i,e){this.bindings=this.bindings.filter(t=>!(t.event===i&&(typeof e=="undefined"||e===t.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,e,t=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Ib(this,i,function(){return e},t);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Fo.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Nl.close,"leave")},t=new Ib(this,Nl.leave,a1({}),i);return t.receive("ok",()=>e()).receive("timeout",()=>e()),t.send(),this.canPush()||t.trigger("ok",{}),t}onMessage(i,e,t){return e}isMember(i,e,t,n){return this.topic!==i?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Fo.joining,this.joinPush.resend(i))}trigger(i,e,t,n){let r=this.onMessage(i,e,t,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===i);for(let s=0;s{let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(n),i}static xhrRequest(i,e,t,n,r,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",n),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===Aoe.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(r),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch(e){return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,e){let t=[];for(var n in i){if(!Object.prototype.hasOwnProperty.call(i,n))continue;let r=e?`${e}[${n}]`:n,o=i[n];typeof o=="object"?t.push(this.serialize(o,r)):t.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return t.join("&")}static appendParams(i,e){if(Object.keys(e).length===0)return i;let t=i.match(/\?/)?"&":"?";return`${i}${t}${this.serialize(e)}`}},Moe=i=>{let e="",t=new Uint8Array(i),n=t.byteLength;for(let r=0;rthis.ontimeout(),i=>{if(i){var{status:e,token:t,messages:n}=i;this.token=t}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Ia.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(i){typeof i!="string"&&(i=Moe(i)),this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",i.join(` +`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(i,e,t){for(let r of this.reqs)r.abort();this.readyState=Ia.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:i,reason:e,wasClean:t});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(i,e,t,n,r){let o,s=()=>{this.reqs.delete(o),n()};o=Lb.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var Ab={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(i,e){if(i.payload.constructor===ArrayBuffer)return e(this.binaryEncode(i));{let t=[i.join_ref,i.ref,i.topic,i.event,i.payload];return e(JSON.stringify(t))}},decode(i,e){if(i.constructor===ArrayBuffer)return e(this.binaryDecode(i));{let[t,n,r,o,s]=JSON.parse(i);return e({join_ref:t,ref:n,topic:r,event:o,payload:s})}},binaryEncode(i){let{join_ref:e,ref:t,event:n,topic:r,payload:o}=i,s=this.META_LENGTH+e.length+t.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),Array.from(e,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(t,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(r,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(n,u=>l.setUint8(c++,u.charCodeAt(0)));var d=new Uint8Array(a.byteLength+o.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(o),a.byteLength),d.buffer},binaryDecode(i){let e=new DataView(i),t=e.getUint8(0),n=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(i,e,n);case this.KINDS.reply:return this.decodeReply(i,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(i,e,n)}},decodePush(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=t.decode(i.slice(s,s+n));s=s+n;let l=t.decode(i.slice(s,s+r));s=s+r;let c=t.decode(i.slice(s,s+o));s=s+o;let d=i.slice(s,i.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:d}},decodeReply(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=t.decode(i.slice(a,a+n));a=a+n;let c=t.decode(i.slice(a,a+r));a=a+r;let d=t.decode(i.slice(a,a+o));a=a+o;let u=t.decode(i.slice(a,a+s));a=a+s;let h=i.slice(a,i.byteLength),p={status:u,response:h};return{join_ref:l,ref:c,topic:d,event:Nl.reply,payload:p}},decodeBroadcast(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=this.HEADER_LENGTH+2,s=t.decode(i.slice(o,o+n));o=o+n;let a=t.decode(i.slice(o,o+r));o=o+r;let l=i.slice(o,i.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},Mb=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||koe,this.transport=e.transport||l1.WebSocket||i3,this.establishedConnections=0,this.defaultEncoder=Ab.encode.bind(Ab),this.defaultDecoder=Ab.decode.bind(Ab),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==i3?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;s1&&s1.addEventListener&&(s1.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),t=this.connectClock)}),s1.addEventListener("pageshow",n=>{t===this.connectClock&&(t=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=a1(e.params||{}),this.endPoint=`${i}/${n3.websocket}`,this.vsn=e.vsn||Toe,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new vF(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return i3}replaceTransport(i){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=i}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let i=Lb.appendParams(Lb.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return i.charAt(0)!=="/"?i:i.charAt(1)==="/"?`${this.protocol()}:${i}`:`${this.protocol()}://${location.host}${i}`}disconnect(i,e,t){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(i,e,t)}connect(i){i&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=a1(i)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(i,e,t){this.logger(i,e,t)}hasLogger(){return this.logger!==null}onOpen(i){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,i]),e}onClose(i){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,i]),e}onError(i){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,i]),e}onMessage(i){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,i]),e}ping(i){if(!this.isConnected())return!1;let e=this.makeRef(),t=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(r=>{r.ref===e&&(this.off([n]),i(Date.now()-t))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,i])=>i())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Ioe,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(i,e,t){if(!this.conn)return i&&i();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,t||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),i&&i()})})}waitForBufferDone(i,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){i();return}setTimeout(()=>{this.waitForBufferDone(i,e+1)},150*e)}waitForSocketClosed(i,e=1){if(e===5||!this.conn||this.conn.readyState===Ia.closed){i();return}setTimeout(()=>{this.waitForSocketClosed(i,e+1)},150*e)}onConnClose(i){let e=i&&i.code;this.hasLogger()&&this.log("transport","close",i),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,t])=>t(i))}onConnError(i){this.hasLogger()&&this.log("transport",i);let e=this.transport,t=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(i,e,t)}),(e===this.transport||t>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(i=>{i.isErrored()||i.isLeaving()||i.isClosed()||i.trigger(Nl.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Ia.connecting:return"connecting";case Ia.open:return"open";case Ia.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(i){this.off(i.stateChangeRefs),this.channels=this.channels.filter(e=>e.joinRef()!==i.joinRef())}off(i){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([t])=>i.indexOf(t)===-1)}channel(i,e={}){let t=new Loe(i,e,this);return this.channels.push(t),t}push(i){if(this.hasLogger()){let{topic:e,event:t,payload:n,ref:r,join_ref:o}=i;this.log("push",`${e} ${t} (${o}, ${r})`,n)}this.isConnected()?this.encode(i,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(i,e=>this.conn.send(e)))}makeRef(){let i=this.ref+1;return i===this.ref?this.ref=0:this.ref=i,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(i=>i()),this.sendBuffer=[])}onConnMessage(i){this.decode(i.data,e=>{let{topic:t,event:n,payload:r,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${o&&"("+o+")"||""}`,r);for(let a=0;at.topic===i&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),e.leave())}};var UF="consecutive-reloads",Doe=10,Noe=5e3,Roe=1e4,Ooe=3e4,WF=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Bo="data-phx-component",r3="data-phx-link",Poe="track-static",Foe="data-phx-link-state",hs="data-phx-ref",uu="data-phx-ref-src",jF="track-uploads",Zc="data-phx-upload-ref",_3="data-phx-preflighted-refs",Hoe="data-phx-done-refs",_F="drop-target",p3="data-phx-active-refs",jb="phx:live-file:updated",m3="data-phx-skip",bF="data-phx-prune",yF="page-loading",CF="phx-connected",c1="phx-loading",o3="phx-no-feedback",Db="phx-error",SF="phx-client-error",s3="phx-server-error",yf="data-phx-parent-id",b3="data-phx-main",_1="data-phx-root-id",VF="viewport-top",KF="viewport-bottom",Boe="trigger-action",Kb="feedback-for",g3="phx-has-focused",zoe=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],qF=["checkbox","radio"],qb="phx-has-submitted",ed="data-phx-session",Sf=`[${ed}]`,wF="data-phx-sticky",g1="data-phx-static",a3="data-phx-readonly",Nb="data-phx-disabled",v3="disable-with",Rb="data-phx-disable-with-restore",d1="hook",Uoe="debounce",Woe="throttle",Gb="update",l3="stream",u1="data-phx-stream",joe="key",Aa="phxPrivate",xF="auto-recover",Ob="phx:live-socket:debug",c3="phx:live-socket:profiling",d3="phx:live-socket:latency-sim",Voe="progress",EF="mounted",Koe=1,qoe=200,Goe="phx-",$oe=3e4,h1="debounce-trigger",Pb="throttled",TF="debounce-prev-key",Yoe={debounce:300,throttle:300},Fb="d",La="s",Ho="c",kF="e",IF="r",AF="t",Xoe="p",LF="stream",Qoe=class{constructor(i,e,t){this.liveSocket=t,this.entry=i,this.offset=0,this.chunkSize=e,this.chunkTimer=null,this.errored=!1,this.uploadChannel=t.channel(`lvu:${i.ref}`,{token:i.metadata()})}error(i){this.errored||(this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(i))}upload(){this.uploadChannel.onError(i=>this.error(i)),this.uploadChannel.join().receive("ok",i=>this.readNextChunk()).receive("error",i=>this.error(i))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let i=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);i.onload=t=>{if(t.target.error===null)this.offset+=t.target.result.byteLength,this.pushChunk(t.target.result);else return Pr("Read error: "+t.target.error)},i.readAsArrayBuffer(e)}pushChunk(i){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",i).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Pr=(i,e)=>console.error&&console.error(i,e),Rl=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Joe(){let i=new Set,e=document.querySelectorAll("*[id]");for(let t=0,n=e.length;t{i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,n)},u3=i=>typeof i=="function"?i:function(){return i},Vb=i=>JSON.parse(JSON.stringify(i)),v1=(i,e,t)=>{do{if(i.matches(`[${e}]`)&&!i.disabled)return i;i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1&&!(t&&t.isSameNode(i)||i.matches(Sf)));return null},f1=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),ese=(i,e)=>JSON.stringify(i)===JSON.stringify(e),MF=i=>{for(let e in i)return!1;return!0},Jc=(i,e)=>i&&e(i),tse=function(i,e,t,n){i.forEach(r=>{new Qoe(r,t.config.chunk_size,n).upload()})},GF={canPushState(){return typeof history.pushState!="undefined"},dropLocal(i,e,t){return i.removeItem(this.localKey(e,t))},updateLocal(i,e,t,n,r){let o=this.getLocal(i,e,t),s=this.localKey(e,t),a=o===null?n:r(o);return i.setItem(s,JSON.stringify(a)),a},getLocal(i,e,t){return JSON.parse(i.getItem(this.localKey(e,t)))},updateCurrentState(i){this.canPushState()&&history.replaceState(i(history.state||{}),"",window.location.href)},pushState(i,e,t){if(this.canPushState()){if(t!==window.location.href){if(e.type=="redirect"&&e.scroll){let r=history.state||{};r.scroll=e.scroll,history.replaceState(r,"",window.location.href)}delete e.scroll,history[i+"State"](e,"",t||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)}}else this.redirect(t)},setCookie(i,e){document.cookie=`${i}=${e}`},getCookie(i){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${i}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(i,e){e&&GF.setCookie("__phoenix_flash__",e+"; max-age=60000; path=/"),window.location=i},localKey(i,e){return`${i}-${e}`},getHashTargetEl(i){let e=i.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},Ma=GF,us={byId(i){return document.getElementById(i)||Pr(`no id found for ${i}`)},removeClass(i,e){i.classList.remove(e),i.classList.length===0&&i.removeAttribute("class")},all(i,e,t){if(!i)return[];let n=Array.from(i.querySelectorAll(e));return t?n.forEach(t):n},childNodeLength(i){let e=document.createElement("template");return e.innerHTML=i,e.content.childElementCount},isUploadInput(i){return i.type==="file"&&i.getAttribute(Zc)!==null},isAutoUpload(i){return i.hasAttribute("data-phx-auto-upload")},findUploadInputs(i){return this.all(i,`input[type="file"][${Zc}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Bo}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&us.private(i,"destroyed"))},wantsNewTab(i){let e=i.ctrlKey||i.shiftKey||i.metaKey||i.button&&i.button===1,t=i.target instanceof HTMLAnchorElement&&i.target.hasAttribute("download"),n=i.target.hasAttribute("target")&&i.target.getAttribute("target").toLowerCase()==="_blank";return e||n||t},isUnloadableFormSubmit(i){return i.target&&i.target.getAttribute("method")==="dialog"||i.submitter&&i.submitter.getAttribute("formmethod")==="dialog"?!1:!i.defaultPrevented&&!this.wantsNewTab(i)},isNewPageClick(i,e){let t=i.target instanceof HTMLAnchorElement?i.target.getAttribute("href"):null,n;if(i.defaultPrevented||t===null||this.wantsNewTab(i)||t.startsWith("mailto:")||t.startsWith("tel:")||i.target.isContentEditable)return!1;try{n=new URL(t)}catch(r){try{n=new URL(t,e)}catch(o){return!0}}return n.host===e.host&&n.protocol===e.protocol&&n.pathname===e.pathname&&n.search===e.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(i){this.isPhxChild(i)&&i.setAttribute(ed,""),this.putPrivate(i,"destroyed",!0)},findPhxChildrenInFragment(i,e){let t=document.createElement("template");return t.innerHTML=i,this.findPhxChildren(t.content,e)},isIgnored(i,e){return(i.getAttribute(e)||i.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(i,e,t){return i.getAttribute&&t.indexOf(i.getAttribute(e))>=0},findPhxSticky(i){return this.all(i,`[${wF}]`)},findPhxChildren(i,e){return this.all(i,`${Sf}[${yf}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),n=e.reduce((r,o)=>{let s=`[${Bo}="${o}"] [${Bo}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Bo))).forEach(a=>r.delete(a)),r},t);return n.size===0?new Set(e):n},filterWithinSameLiveView(i,e){return e.querySelector(Sf)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(ed)!==null)return!1}},private(i,e){return i[Aa]&&i[Aa][e]},deletePrivate(i,e){i[Aa]&&delete i[Aa][e]},putPrivate(i,e,t){i[Aa]||(i[Aa]={}),i[Aa][e]=t},updatePrivate(i,e,t,n){let r=this.private(i,e);r===void 0?this.putPrivate(i,e,n(t)):this.putPrivate(i,e,n(r))},copyPrivates(i,e){e[Aa]&&(i[Aa]=e[Aa])},putTitle(i){let e=document.querySelector("title");if(e){let{prefix:t,suffix:n}=e.dataset;document.title=`${t||""}${i}${n||""}`}else document.title=i},debounce(i,e,t,n,r,o,s,a){let l=i.getAttribute(t),c=i.getAttribute(r);l===""&&(l=n),c===""&&(c=o);let d=l||c;switch(d){case null:return a();case"blur":this.once(i,"debounce-blur")&&i.addEventListener("blur",()=>a());return;default:let u=parseInt(d),h=()=>c?this.deletePrivate(i,Pb):a(),p=this.incCycle(i,h1,h);if(isNaN(u))return Pr(`invalid throttle/debounce value: ${d}`);if(c){let g=!1;if(e.type==="keydown"){let b=this.private(i,TF);this.putPrivate(i,TF,e.key),g=b!==e.key}if(!g&&this.private(i,Pb))return!1;a(),this.putPrivate(i,Pb,!0),setTimeout(()=>{s()&&this.triggerCycle(i,h1)},u)}else setTimeout(()=>{s()&&this.triggerCycle(i,h1,p)},u);let m=i.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([g])=>{let b=m.querySelector(`[name="${g}"]`);this.incCycle(b,h1),this.deletePrivate(b,Pb)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,h1))}},triggerCycle(i,e,t){let[n,r]=this.private(i,e);t||(t=n),t===n&&(this.incCycle(i,e),r())},once(i,e){return this.private(i,e)===!0?!1:(this.putPrivate(i,e,!0),!0)},incCycle(i,e,t=function(){}){let[n]=this.private(i,e)||[0,t];return n++,this.putPrivate(i,e,[n,t]),n},maybeAddPrivateHooks(i,e,t){i.hasAttribute&&(i.hasAttribute(e)||i.hasAttribute(t))&&i.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},maybeHideFeedback(i,e,t){if(!(this.private(e,g3)||this.private(e,qb))){let n=[e.name];e.name.endsWith("[]")&&n.push(e.name.slice(0,-2));let r=n.map(o=>`[${t}="${o}"]`).join(", ");us.all(i,r,o=>o.classList.add(o3))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let n=`[${e}="${t.id}"], [${e}="${t.name}"], - [${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,_3),this.deletePrivate(t,qb),this.all(document,n,r=>{r.classList.add(s3)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,s3)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(yf)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(EF)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${yf}]`)[0]},dispatchEvent(i,e,t={}){let r={bubbles:t.bubbles===void 0?!0:!!t.bubbles,cancelable:!0,detail:t.detail||{}},o=e==="click"?new MouseEvent("click",r):new CustomEvent(e,r);i.dispatchEvent(o)},cloneNode(i,e){if(typeof e=="undefined")return i.cloneNode(!0);{let t=i.cloneNode(!1);return t.innerHTML=e,t}},mergeAttrs(i,e,t={}){let n=t.exclude||[],r=t.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;n.indexOf(l)<0&&i.setAttribute(l,e.getAttribute(l))}let s=i.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;r?l.startsWith("data-")&&!e.hasAttribute(l)&&i.removeAttribute(l):e.hasAttribute(l)||i.removeAttribute(l)}},mergeFocusedInput(i,e){i instanceof HTMLSelectElement||ds.mergeAttrs(i,e,{exclude:["value"]}),e.readOnly?i.setAttribute("readonly",!0):i.removeAttribute("readonly")},hasSelectionRange(i){return i.setSelectionRange&&(i.type==="text"||i.type==="textarea")},restoreFocus(i,e,t){if(!ds.isTextualInput(i))return;let n=i.matches(":focus");i.readOnly&&i.blur(),n||i.focus(),this.hasSelectionRange(i)&&i.setSelectionRange(e,t)},isFormInput(i){return/^(?:input|select|textarea)$/i.test(i.tagName)&&i.type!=="button"},syncAttrsToProps(i){i instanceof HTMLInputElement&&$F.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return Hoe.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let n=i.getAttribute(us);if(n===null)return!0;let r=i.getAttribute(du);return ds.isFormInput(i)||i.getAttribute(t)!==null?(ds.isUploadInput(i)&&ds.mergeAttrs(i,e,{isIgnored:!0}),ds.putPrivate(i,us,e),!1):(VF.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(us,n),e.setAttribute(du,r),!0)},cleanChildNodes(i,e){if(ds.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(n=>{n.id||(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()===""||Pr(`only HTML element tags with an id are allowed inside containers with phx-update. + [${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,g3),this.deletePrivate(t,qb),this.all(document,n,r=>{r.classList.add(o3)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,o3)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(yf)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(wF)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${yf}]`)[0]},dispatchEvent(i,e,t={}){let r={bubbles:t.bubbles===void 0?!0:!!t.bubbles,cancelable:!0,detail:t.detail||{}},o=e==="click"?new MouseEvent("click",r):new CustomEvent(e,r);i.dispatchEvent(o)},cloneNode(i,e){if(typeof e=="undefined")return i.cloneNode(!0);{let t=i.cloneNode(!1);return t.innerHTML=e,t}},mergeAttrs(i,e,t={}){let n=t.exclude||[],r=t.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;n.indexOf(l)<0&&i.setAttribute(l,e.getAttribute(l))}let s=i.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;r?l.startsWith("data-")&&!e.hasAttribute(l)&&i.removeAttribute(l):e.hasAttribute(l)||i.removeAttribute(l)}},mergeFocusedInput(i,e){i instanceof HTMLSelectElement||us.mergeAttrs(i,e,{exclude:["value"]}),e.readOnly?i.setAttribute("readonly",!0):i.removeAttribute("readonly")},hasSelectionRange(i){return i.setSelectionRange&&(i.type==="text"||i.type==="textarea")},restoreFocus(i,e,t){if(!us.isTextualInput(i))return;let n=i.matches(":focus");i.readOnly&&i.blur(),n||i.focus(),this.hasSelectionRange(i)&&i.setSelectionRange(e,t)},isFormInput(i){return/^(?:input|select|textarea)$/i.test(i.tagName)&&i.type!=="button"},syncAttrsToProps(i){i instanceof HTMLInputElement&&qF.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return zoe.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let n=i.getAttribute(hs);if(n===null)return!0;let r=i.getAttribute(uu);return us.isFormInput(i)||i.getAttribute(t)!==null?(us.isUploadInput(i)&&us.mergeAttrs(i,e,{isIgnored:!0}),us.putPrivate(i,hs,e),!1):(WF.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(hs,n),e.setAttribute(uu,r),!0)},cleanChildNodes(i,e){if(us.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(n=>{n.id||(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()===""||Pr(`only HTML element tags with an id are allowed inside containers with phx-update. removing illegal node: "${(n.outerHTML||n.nodeValue).trim()}" -`),t.push(n))}),t.forEach(n=>n.remove())}},replaceRootContainer(i,e,t){let n=new Set(["id",Zc,v1,C3,b1]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>i.removeAttribute(r.name)),Object.keys(t).filter(r=>!n.has(r.toLowerCase())).forEach(r=>i.setAttribute(r,t[r])),i;{let r=document.createElement(e);return Object.keys(t).forEach(o=>r.setAttribute(o,t[o])),n.forEach(o=>r.setAttribute(o,i.getAttribute(o))),r.innerHTML=i.innerHTML,i.replaceWith(r),r}},getSticky(i,e,t){let n=(ds.private(i,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([n,r])=>n!==e))},putSticky(i,e,t){let n=t(i);this.updatePrivate(i,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,t,n]:r.push([e,t,n]),r})},applyStickyOperations(i){let e=ds.private(i,"sticky");e&&e.forEach(([t,n,r])=>this.putSticky(i,t,n))}},le=ds,p3=class{static isActive(i,e){let t=e._phxRef===void 0,r=i.getAttribute(g3).split(",").indexOf(Or.genFileRef(e))>=0;return e.size>0&&(t||r)}static isPreflighted(i,e){return i.getAttribute(y3).split(",").indexOf(Or.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=Or.genFileRef(e),this.fileEl=i,this.file=e,this.view=t,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(jb,this._onElUpdated)}metadata(){return this.meta}progress(i){this._progress=Math.floor(i),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Or.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(i="failed"){this.fileEl.removeEventListener(jb,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),Or.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(jb,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(g3).split(",").indexOf(this.ref)===-1&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref}}uploader(i){if(this.meta.uploader){let e=i[this.meta.uploader]||Pr(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:Zoe}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Pr(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},ese=0,Or=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(ese++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let n=this.activeFiles(i).find(r=>this.genFileRef(r)===e);t(URL.createObjectURL(n))}static hasUploadsInProgress(i){let e=0;return le.findUploadInputs(i).forEach(t=>{t.getAttribute(y3)!==t.getAttribute(Poe)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(n=>{let r={path:i.name},o=i.getAttribute(uu);t[o]=t[o]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,t[o].push(r)}),t}static clearFiles(i){i.value=null,i.removeAttribute(uu),le.putPrivate(i,"files",[])}static untrackFile(i,e){le.putPrivate(i,"files",le.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let n=e.filter(r=>!this.activeFiles(i).find(o=>Object.is(o,r)));le.putPrivate(i,"files",this.activeFiles(i).concat(n)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),le.putPrivate(i,"files",e)}static activeFileInputs(i){let e=le.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return(le.private(i,"files")||[]).filter(e=>p3.isActive(i,e))}static inputsAwaitingPreflight(i){let e=le.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!p3.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(Or.filesAwaitingPreflight(i)||[]).map(n=>new p3(i,n,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(r=>(r.zipPostFlight(i),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),r));let n=this._entries.reduce((r,o)=>{let{name:s,callback:a}=o.uploader(t.uploaders);return r[s]=r[s]||{callback:a,entries:[]},r[s].entries.push(o),r},{});for(let r in n){let{callback:o,entries:s}=n[r];o(s,e,i,t)}}},tse={focusMain(){let i=document.querySelector("main h1, main, h1");if(i){let e=i.tabIndex;i.tabIndex=-1,i.focus(),i.tabIndex=e}},anyOf(i,e){return e.find(t=>i instanceof t)},isFocusable(i,e){return i instanceof HTMLAnchorElement&&i.rel!=="ignore"||i instanceof HTMLAreaElement&&i.href!==void 0||!i.disabled&&this.anyOf(i,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||i instanceof HTMLIFrameElement||i.tabIndex>0||!e&&i.tabIndex===0&&i.getAttribute("tabindex")!==null&&i.getAttribute("aria-hidden")!=="true"},attemptFocus(i,e){if(this.isFocusable(i,e))try{i.focus()}catch(t){}return!!document.activeElement&&document.activeElement.isSameNode(i)},focusFirstInteractive(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(i){let e=i.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},Cf=tse,XF={LiveFileUpload:{activeRefs(){return this.el.getAttribute(g3)},preflightedRefs(){return this.el.getAttribute(y3)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let i=this.preflightedRefs();this.preflightedWas!==i&&(this.preflightedWas=i,i===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(jb))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(uu)),Or.getEntryDataURL(this.inputEl,this.ref,i=>{this.url=i,this.el.src=i})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>Cf.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Cf.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Cf.focusFirst(this.el)}}},RF=()=>document.documentElement.scrollTop||document.body.scrollTop,S3=()=>window.innerHeight||document.documentElement.clientHeight,ise=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=S3()},nse=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=S3()},OF=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=S3()};XF.InfiniteScroll={mounted(){let i=RF(),e=!1,t=500,n=null,r=this.throttle(t,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,OF(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,OF(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=RF();if(n)return i=l,n();let c=this.el.getBoundingClientRect(),d=this.el.getAttribute(this.liveSocket.binding("viewport-top")),u=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),h=this.el.lastElementChild,p=this.el.firstElementChild,m=li;m&&d&&!e&&c.top>=0?(e=!0,r(d,p)):g&&e&&c.top<=0&&(e=!1),d&&m&&ise(p)?o(d,p):u&&g&&nse(h)&&s(u,h),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,n;return(...r)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(n&&(clearTimeout(n),n=null),t=o,e(...r)):n||(n=setTimeout(()=>{t=Date.now(),n=null,e(...r)},s))}}};var rse=XF,ose=class{constructor(i,e,t){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=t,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let i=le.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?Jc(document.getElementById(e.previousElementId),t=>{Jc(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",n)})}):Jc(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{Jc(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},PF=11;function sse(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===PF||i.nodeType===PF)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var Hb,ase="http://www.w3.org/1999/xhtml",co=typeof document=="undefined"?void 0:document,lse=!!co&&"content"in co.createElement("template"),cse=!!co&&co.createRange&&"createContextualFragment"in co.createRange();function dse(i){var e=co.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function use(i){Hb||(Hb=co.createRange(),Hb.selectNode(co.body));var e=Hb.createContextualFragment(i);return e.childNodes[0]}function hse(i){var e=co.createElement("body");return e.innerHTML=i,e.childNodes[0]}function fse(i){return i=i.trim(),lse?dse(i):cse?use(i):hse(i)}function Bb(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function pse(i,e){return!e||e===ase?co.createElement(i):co.createElementNS(e,i)}function mse(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function m3(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var FF={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}m3(i,e,"selected")},INPUT:function(i,e){m3(i,e,"checked"),m3(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},m1=1,HF=11,BF=3,zF=8;function Xc(){}function gse(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function vse(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=co.createElement("html"),n.innerHTML=o}else n=fse(n);else n.nodeType===HF&&(n=n.firstElementChild);var s=r.getNodeKey||gse,a=r.onBeforeNodeAdded||Xc,l=r.onNodeAdded||Xc,c=r.onBeforeElUpdated||Xc,d=r.onElUpdated||Xc,u=r.onBeforeNodeDiscarded||Xc,h=r.onNodeDiscarded||Xc,p=r.onBeforeElChildrenUpdated||Xc,m=r.skipFromChildren||Xc,g=r.addChild||function(ye,_e){return ye.appendChild(_e)},b=r.childrenOnly===!0,S=Object.create(null),k=[];function N(ye){k.push(ye)}function A(ye,_e){if(ye.nodeType===m1)for(var $=ye.firstChild;$;){var Q=void 0;_e&&(Q=s($))?N(Q):(h($),$.firstChild&&A($,_e)),$=$.nextSibling}}function H(ye,_e,$){u(ye)!==!1&&(_e&&_e.removeChild(ye),h(ye),A(ye,$))}function K(ye){if(ye.nodeType===m1||ye.nodeType===HF)for(var _e=ye.firstChild;_e;){var $=s(_e);$&&(S[$]=_e),K(_e),_e=_e.nextSibling}}K(t);function W(ye){l(ye);for(var _e=ye.firstChild;_e;){var $=_e.nextSibling,Q=s(_e);if(Q){var ie=S[Q];ie&&Bb(_e,ie)?(_e.parentNode.replaceChild(ie,_e),ae(ie,_e)):W(_e)}else W(_e);_e=$}}function re(ye,_e,$){for(;_e;){var Q=_e.nextSibling;($=s(_e))?N($):H(_e,ye,!0),_e=Q}}function ae(ye,_e,$){var Q=s(_e);Q&&delete S[Q],!(!$&&(c(ye,_e)===!1||(i(ye,_e),d(ye),p(ye,_e)===!1)))&&(ye.nodeName!=="TEXTAREA"?Ne(ye,_e):FF.TEXTAREA(ye,_e))}function Ne(ye,_e){var $=m(ye),Q=_e.firstChild,ie=ye.firstChild,de,$t,Xt,Qt,pi;e:for(;Q;){for(Qt=Q.nextSibling,de=s(Q);!$&&ie;){if(Xt=ie.nextSibling,Q.isSameNode&&Q.isSameNode(ie)){Q=Qt,ie=Xt;continue e}$t=s(ie);var Gi=ie.nodeType,ai=void 0;if(Gi===Q.nodeType&&(Gi===m1?(de?de!==$t&&((pi=S[de])?Xt===pi?ai=!1:(ye.insertBefore(pi,ie),$t?N($t):H(ie,ye,!0),ie=pi):ai=!1):$t&&(ai=!1),ai=ai!==!1&&Bb(ie,Q),ai&&ae(ie,Q)):(Gi===BF||Gi==zF)&&(ai=!0,ie.nodeValue!==Q.nodeValue&&(ie.nodeValue=Q.nodeValue))),ai){Q=Qt,ie=Xt;continue e}$t?N($t):H(ie,ye,!0),ie=Xt}if(de&&(pi=S[de])&&Bb(pi,Q))$||g(ye,pi),ae(pi,Q);else{var $i=a(Q);$i!==!1&&($i&&(Q=$i),Q.actualize&&(Q=Q.actualize(ye.ownerDocument||co)),g(ye,Q),W(Q))}Q=Qt,ie=Xt}re(ye,ie,$t);var nn=FF[ye.nodeName];nn&&nn(ye,_e)}var he=t,Xe=he.nodeType,st=n.nodeType;if(!b){if(Xe===m1)st===m1?Bb(t,n)||(h(t),he=mse(t,pse(n.nodeName,n.namespaceURI))):he=n;else if(Xe===BF||Xe===zF){if(st===Xe)return he.nodeValue!==n.nodeValue&&(he.nodeValue=n.nodeValue),he;he=n}}if(he===n)h(t);else{if(n.isSameNode&&n.isSameNode(he))return;if(ae(he,n,b),k)for(var rt=0,Nt=k.length;rt{if(t&&t.isSameNode(n)&&le.isFormInput(n))return le.mergeFocusedInput(n,r),!1}})}constructor(i,e,t,n,r,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=n,this.streams=r,this.streamInserts={},this.targetCID=o,this.cidPatch=Qc(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(i,e){this.callbacks[`before${i}`].push(e)}after(i,e){this.callbacks[`after${i}`].push(e)}trackBefore(i,...e){this.callbacks[`before${i}`].forEach(t=>t(...e))}trackAfter(i,...e){this.callbacks[`after${i}`].forEach(t=>t(...e))}markPrunableContentForRemoval(){let i=this.liveSocket.binding(Gb);le.all(this.container,`[${i}=${c3}]`,e=>e.innerHTML=""),le.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(CF,"")})}perform(){let{view:i,liveSocket:e,container:t,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):t;if(this.isCIDPatch()&&!r)return;let o=e.getActiveElement(),{selectionStart:s,selectionEnd:a}=o&&le.hasSelectionRange(o)?o:{},l=e.binding(Gb),c=e.binding(Kb),d=e.binding(b3),u=e.binding(qF),h=e.binding(GF),p=e.binding(Foe),m=[],g=[],b=[],S=[],k=null,N=e.time("premorph container prep",()=>this.buildDiffHTML(t,n,l,r));return this.trackBefore("added",t),this.trackBefore("updated",t,t),e.time("morphdom",()=>{this.streams.forEach(([A,H,K,W])=>{Object.entries(H).forEach(([re,[ae,Ne]])=>{this.streamInserts[re]={ref:A,streamAt:ae,limit:Ne}}),W!==void 0&&le.all(t,`[${h1}="${A}"]`,re=>{this.removeStreamChildElement(re)}),K.forEach(re=>{let ae=t.querySelector(`[id="${re}"]`);ae&&this.removeStreamChildElement(ae)})}),UF(r,N,{childrenOnly:r.getAttribute(Ho)===null,getNodeKey:A=>le.isPhxDestroyed(A)?null:A.id,skipFromChildren:A=>A.getAttribute(l)===c3,addChild:(A,H)=>{let{ref:K,streamAt:W,limit:re}=this.getStreamInsert(H);if(K===void 0)return A.appendChild(H);if(le.putSticky(H,h1,he=>he.setAttribute(h1,K)),W===0)A.insertAdjacentElement("afterbegin",H);else if(W===-1)A.appendChild(H);else if(W>0){let he=Array.from(A.children)[W];A.insertBefore(H,he)}let ae=re!==null&&Array.from(A.children),Ne=[];re&&re<0&&ae.length>re*-1?Ne=ae.slice(0,ae.length+re):re&&re>=0&&ae.length>re&&(Ne=ae.slice(re)),Ne.forEach(he=>{this.streamInserts[he.id]||this.removeStreamChildElement(he)})},onBeforeNodeAdded:A=>(le.maybeAddPrivateHooks(A,u,h),this.trackBefore("added",A),A),onNodeAdded:A=>{A.getAttribute&&this.maybeReOrderStream(A),A instanceof HTMLImageElement&&A.srcset?A.srcset=A.srcset:A instanceof HTMLVideoElement&&A.autoplay&&A.play(),le.isNowTriggerFormExternal(A,p)&&(k=A),A.getAttribute&&A.getAttribute("name")&&le.isFormInput(A)&&g.push(A),(le.isPhxChild(A)&&i.ownsElement(A)||le.isPhxSticky(A)&&i.ownsElement(A.parentNode))&&this.trackAfter("phxChildAdded",A),m.push(A)},onNodeDiscarded:A=>this.onNodeDiscarded(A),onBeforeNodeDiscarded:A=>A.getAttribute&&A.getAttribute(CF)!==null?!0:!(A.parentElement!==null&&A.id&&le.isPhxUpdate(A.parentElement,l,[c3,"append","prepend"])||this.maybePendingRemove(A)||this.skipCIDSibling(A)),onElUpdated:A=>{le.isNowTriggerFormExternal(A,p)&&(k=A),b.push(A),this.maybeReOrderStream(A)},onBeforeElUpdated:(A,H)=>{if(le.maybeAddPrivateHooks(H,u,h),le.cleanChildNodes(H,l),this.skipCIDSibling(H)||le.isPhxSticky(A))return!1;if(le.isIgnored(A,l)||A.form&&A.form.isSameNode(k))return this.trackBefore("updated",A,H),le.mergeAttrs(A,H,{isIgnored:!0}),b.push(A),le.applyStickyOperations(A),!1;if(A.type==="number"&&A.validity&&A.validity.badInput)return!1;if(!le.syncPendingRef(A,H,d))return le.isUploadInput(A)&&(this.trackBefore("updated",A,H),b.push(A)),le.applyStickyOperations(A),!1;if(le.isPhxChild(H)){let W=A.getAttribute(Zc);return le.mergeAttrs(A,H,{exclude:[v1]}),W!==""&&A.setAttribute(Zc,W),A.setAttribute(b1,this.rootID),le.applyStickyOperations(A),!1}return le.copyPrivates(H,A),o&&A.isSameNode(o)&&le.isFormInput(A)&&A.type!=="hidden"?(this.trackBefore("updated",A,H),le.mergeFocusedInput(A,H),le.syncAttrsToProps(A),b.push(A),le.applyStickyOperations(A),g.push(A),!1):(le.isPhxUpdate(H,l,["append","prepend"])&&S.push(new ose(A,H,H.getAttribute(l))),le.syncAttrsToProps(H),le.applyStickyOperations(H),H.getAttribute("name")&&le.isFormInput(H)&&g.push(H),this.trackBefore("updated",A,H),!0)}})}),e.isDebugEnabled()&&Xoe(),S.length>0&&e.time("post-morph append/prepend restoration",()=>{S.forEach(A=>A.perform())}),g.forEach(A=>{le.maybeHideFeedback(r,A,c)}),e.silenceEvents(()=>le.restoreFocus(o,s,a)),le.dispatchEvent(document,"phx:update"),m.forEach(A=>this.trackAfter("added",A)),b.forEach(A=>this.trackAfter("updated",A)),this.transitionPendingRemoves(),k&&(e.unload(),k.submit()),!0}onNodeDiscarded(i){(le.isPhxChild(i)||le.isPhxSticky(i))&&this.liveSocket.destroyViewByEl(i),this.trackAfter("discarded",i)}maybePendingRemove(i){return i.getAttribute&&i.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(i),!0):!1}removeStreamChildElement(i){this.maybePendingRemove(i)||(i.remove(),this.onNodeDiscarded(i))}getStreamInsert(i){return(i.id?this.streamInserts[i.id]:{})||{}}maybeReOrderStream(i){let{ref:e,streamAt:t,limit:n}=this.getStreamInsert(i);if(t!==void 0){if(le.putSticky(i,h1,r=>r.setAttribute(h1,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let r=Array.from(i.parentElement.children),o=r.indexOf(i);if(t>=r.length-1)i.parentElement.appendChild(i);else{let s=r[t];o>t?i.parentElement.insertBefore(i,s):i.parentElement.insertBefore(i,s.nextElementSibling)}}}}transitionPendingRemoves(){let{pendingRemoves:i,liveSocket:e}=this;i.length>0&&(e.transitionRemoves(i),e.requestDOMUpdate(()=>{i.forEach(t=>{let n=le.firstPhxChild(t);n&&e.destroyViewByEl(n),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.getAttribute(v3)!==null}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=le.findComponentNodeList(this.container,this.targetCID);return t.length===0&&le.childNodeLength(i)===1?e:e&&e.parentNode}buildDiffHTML(i,e,t,n){let r=this.isCIDPatch(),o=r&&n.getAttribute(Ho)===this.targetCID.toString();if(!r||o)return e;{let s=null,a=document.createElement("template");s=le.cloneNode(n);let[l,...c]=le.findComponentNodeList(s,this.targetCID);return a.innerHTML=e,c.forEach(d=>d.remove()),Array.from(s.childNodes).forEach(d=>{d.id&&d.nodeType===Node.ELEMENT_NODE&&d.getAttribute(Ho)!==this.targetCID.toString()&&(d.setAttribute(v3,""),d.innerHTML="")}),Array.from(a.content.childNodes).forEach(d=>s.insertBefore(d,l)),l.remove(),s.outerHTML}}indexOf(i,e){return Array.from(i.children).indexOf(e)}},WF=class{static extract(i){let{[LF]:e,[AF]:t,[MF]:n}=i;return delete i[LF],delete i[AF],delete i[MF],{diff:i,title:n,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[Fo],i);return[e,t]}recursiveToString(i,e=i[Fo],t){t=t?new Set(t):null;let n={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,n),[n.buffer,n.streams]}componentCIDs(i){return Object.keys(i[Fo]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[Fo]?Object.keys(i).length===1:!1}getComponent(i,e){return i[Fo][e]}mergeDiff(i){let e=i[Fo],t={};if(delete i[Fo],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[Fo]=this.rendered[Fo]||{},e){let n=this.rendered[Fo];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,t);for(let r in e)n[r]=e[r];i[Fo]=e}}cachedFindComponent(i,e,t,n,r){if(r[i])return r[i];{let o,s,a=e[La];if(Qc(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],t,n,r):l=t[-a],s=l[La],o=this.cloneMerge(l,e),o[La]=s}else o=e[La]!==void 0?e:this.cloneMerge(t[i]||{},e);return r[i]=o,o}}mutableMerge(i,e){return e[La]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let n=e[t],r=i[t];p1(n)&&n[La]===void 0&&p1(r)?this.doMutableMerge(r,n):i[t]=n}}cloneMerge(i,e){let t=Re(Re({},i),e);for(let n in t){let r=e[n],o=i[n];p1(r)&&r[La]===void 0&&p1(o)&&(t[n]=this.cloneMerge(o,r))}return t}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[Fo],i);return[e,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[Fo][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[La]}templateStatic(i,e){return typeof i=="number"?e[i]:i}toOutputBuffer(i,e,t){if(i[h3])return this.comprehensionToBuffer(i,e,t);let{[La]:n}=i;n=this.templateStatic(n,e),t.buffer+=n[0];for(let r=1;r0||l.length>0||c)&&(delete i[DF],t.streams.add(o))}dynamicToBuffer(i,e,t){if(typeof i=="number"){let[n,r]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...r])}else p1(i)?this.toOutputBuffer(i,e,t):t.buffer+=i}recursiveCIDToString(i,e,t){let n=i[e]||Pr(`no component for CID ${e}`,i),r=document.createElement("template"),[o,s]=this.recursiveToString(n,i,t);r.innerHTML=o;let a=r.content,l=t&&!t.has(e),[c,d]=Array.from(a.childNodes).reduce(([u,h],p,m)=>p.nodeType===Node.ELEMENT_NODE?p.getAttribute(Ho)?[u,!0]:(p.setAttribute(Ho,e),p.id||(p.id=`${this.parentViewId()}-${e}-${m}`),l&&(p.setAttribute(v3,""),p.innerHTML=""),[!0,h]):p.nodeValue.trim()!==""?(Pr(`only HTML element tags are allowed at the root of components. +`),t.push(n))}),t.forEach(n=>n.remove())}},replaceRootContainer(i,e,t){let n=new Set(["id",ed,g1,b3,_1]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>i.removeAttribute(r.name)),Object.keys(t).filter(r=>!n.has(r.toLowerCase())).forEach(r=>i.setAttribute(r,t[r])),i;{let r=document.createElement(e);return Object.keys(t).forEach(o=>r.setAttribute(o,t[o])),n.forEach(o=>r.setAttribute(o,i.getAttribute(o))),r.innerHTML=i.innerHTML,i.replaceWith(r),r}},getSticky(i,e,t){let n=(us.private(i,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([n,r])=>n!==e))},putSticky(i,e,t){let n=t(i);this.updatePrivate(i,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,t,n]:r.push([e,t,n]),r})},applyStickyOperations(i){let e=us.private(i,"sticky");e&&e.forEach(([t,n,r])=>this.putSticky(i,t,n))}},le=us,h3=class{static isActive(i,e){let t=e._phxRef===void 0,r=i.getAttribute(p3).split(",").indexOf(yr.genFileRef(e))>=0;return e.size>0&&(t||r)}static isPreflighted(i,e){return i.getAttribute(_3).split(",").indexOf(yr.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=yr.genFileRef(e),this.fileEl=i,this.file=e,this.view=t,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(jb,this._onElUpdated)}metadata(){return this.meta}progress(i){this._progress=Math.floor(i),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{yr.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(i="failed"){this.fileEl.removeEventListener(jb,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),le.isAutoUpload(this.fileEl)||yr.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(jb,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(p3).split(",").indexOf(this.ref)===-1&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(i){if(this.meta.uploader){let e=i[this.meta.uploader]||Pr(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:tse}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Pr(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},ise=0,yr=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(ise++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let n=this.activeFiles(i).find(r=>this.genFileRef(r)===e);t(URL.createObjectURL(n))}static hasUploadsInProgress(i){let e=0;return le.findUploadInputs(i).forEach(t=>{t.getAttribute(_3)!==t.getAttribute(Hoe)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(n=>{let r={path:i.name},o=i.getAttribute(Zc);t[o]=t[o]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,typeof n.meta=="function"&&(r.meta=n.meta()),t[o].push(r)}),t}static clearFiles(i){i.value=null,i.removeAttribute(Zc),le.putPrivate(i,"files",[])}static untrackFile(i,e){le.putPrivate(i,"files",le.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let n=e.filter(r=>!this.activeFiles(i).find(o=>Object.is(o,r)));le.putPrivate(i,"files",this.activeFiles(i).concat(n)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),le.putPrivate(i,"files",e)}static activeFileInputs(i){let e=le.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return(le.private(i,"files")||[]).filter(e=>h3.isActive(i,e))}static inputsAwaitingPreflight(i){let e=le.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!h3.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(yr.filesAwaitingPreflight(i)||[]).map(n=>new h3(i,n,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(r=>(r.zipPostFlight(i),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),r));let n=this._entries.reduce((r,o)=>{if(!o.meta)return r;let{name:s,callback:a}=o.uploader(t.uploaders);return r[s]=r[s]||{callback:a,entries:[]},r[s].entries.push(o),r},{});for(let r in n){let{callback:o,entries:s}=n[r];o(s,e,i,t)}}},nse={focusMain(){let i=document.querySelector("main h1, main, h1");if(i){let e=i.tabIndex;i.tabIndex=-1,i.focus(),i.tabIndex=e}},anyOf(i,e){return e.find(t=>i instanceof t)},isFocusable(i,e){return i instanceof HTMLAnchorElement&&i.rel!=="ignore"||i instanceof HTMLAreaElement&&i.href!==void 0||!i.disabled&&this.anyOf(i,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||i instanceof HTMLIFrameElement||i.tabIndex>0||!e&&i.tabIndex===0&&i.getAttribute("tabindex")!==null&&i.getAttribute("aria-hidden")!=="true"},attemptFocus(i,e){if(this.isFocusable(i,e))try{i.focus()}catch(t){}return!!document.activeElement&&document.activeElement.isSameNode(i)},focusFirstInteractive(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(i){let e=i.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},Cf=nse,$F={LiveFileUpload:{activeRefs(){return this.el.getAttribute(p3)},preflightedRefs(){return this.el.getAttribute(_3)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let i=this.preflightedRefs();this.preflightedWas!==i&&(this.preflightedWas=i,i===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(jb))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Zc)),yr.getEntryDataURL(this.inputEl,this.ref,i=>{this.url=i,this.el.src=i})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>Cf.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Cf.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Cf.focusFirst(this.el)}}},DF=()=>document.documentElement.scrollTop||document.body.scrollTop,y3=()=>window.innerHeight||document.documentElement.clientHeight,rse=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=y3()},ose=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=y3()},NF=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=y3()};$F.InfiniteScroll={mounted(){let i=DF(),e=!1,t=500,n=null,r=this.throttle(t,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,NF(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,NF(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=DF();if(n)return i=l,n();let c=this.el.getBoundingClientRect(),d=this.el.getAttribute(this.liveSocket.binding("viewport-top")),u=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),h=this.el.lastElementChild,p=this.el.firstElementChild,m=li;m&&d&&!e&&c.top>=0?(e=!0,r(d,p)):g&&e&&c.top<=0&&(e=!1),d&&m&&rse(p)?o(d,p):u&&g&&ose(h)&&s(u,h),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,n;return(...r)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(n&&(clearTimeout(n),n=null),t=o,e(...r)):n||(n=setTimeout(()=>{t=Date.now(),n=null,e(...r)},s))}}};var sse=$F,ase=class{constructor(i,e,t){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=t,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let i=le.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?Jc(document.getElementById(e.previousElementId),t=>{Jc(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",n)})}):Jc(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{Jc(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},RF=11;function lse(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===RF||i.nodeType===RF)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var Hb,cse="http://www.w3.org/1999/xhtml",co=typeof document=="undefined"?void 0:document,dse=!!co&&"content"in co.createElement("template"),use=!!co&&co.createRange&&"createContextualFragment"in co.createRange();function hse(i){var e=co.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function fse(i){Hb||(Hb=co.createRange(),Hb.selectNode(co.body));var e=Hb.createContextualFragment(i);return e.childNodes[0]}function pse(i){var e=co.createElement("body");return e.innerHTML=i,e.childNodes[0]}function mse(i){return i=i.trim(),dse?hse(i):use?fse(i):pse(i)}function Bb(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function gse(i,e){return!e||e===cse?co.createElement(i):co.createElementNS(e,i)}function vse(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function f3(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var OF={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}f3(i,e,"selected")},INPUT:function(i,e){f3(i,e,"checked"),f3(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},p1=1,PF=11,FF=3,HF=8;function Qc(){}function _se(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function bse(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=co.createElement("html"),n.innerHTML=o}else n=mse(n);else n.nodeType===PF&&(n=n.firstElementChild);var s=r.getNodeKey||_se,a=r.onBeforeNodeAdded||Qc,l=r.onNodeAdded||Qc,c=r.onBeforeElUpdated||Qc,d=r.onElUpdated||Qc,u=r.onBeforeNodeDiscarded||Qc,h=r.onNodeDiscarded||Qc,p=r.onBeforeElChildrenUpdated||Qc,m=r.skipFromChildren||Qc,g=r.addChild||function(ye,ge){return ye.appendChild(ge)},b=r.childrenOnly===!0,S=Object.create(null),k=[];function N(ye){k.push(ye)}function A(ye,ge){if(ye.nodeType===p1)for(var $=ye.firstChild;$;){var Q=void 0;ge&&(Q=s($))?N(Q):(h($),$.firstChild&&A($,ge)),$=$.nextSibling}}function H(ye,ge,$){u(ye)!==!1&&(ge&&ge.removeChild(ye),h(ye),A(ye,$))}function K(ye){if(ye.nodeType===p1||ye.nodeType===PF)for(var ge=ye.firstChild;ge;){var $=s(ge);$&&(S[$]=ge),K(ge),ge=ge.nextSibling}}K(t);function W(ye){l(ye);for(var ge=ye.firstChild;ge;){var $=ge.nextSibling,Q=s(ge);if(Q){var ie=S[Q];ie&&Bb(ge,ie)?(ge.parentNode.replaceChild(ie,ge),ae(ie,ge)):W(ge)}else W(ge);ge=$}}function re(ye,ge,$){for(;ge;){var Q=ge.nextSibling;($=s(ge))?N($):H(ge,ye,!0),ge=Q}}function ae(ye,ge,$){var Q=s(ge);Q&&delete S[Q],!(!$&&(c(ye,ge)===!1||(i(ye,ge),d(ye),p(ye,ge)===!1)))&&(ye.nodeName!=="TEXTAREA"?Ne(ye,ge):OF.TEXTAREA(ye,ge))}function Ne(ye,ge){var $=m(ye,ge),Q=ge.firstChild,ie=ye.firstChild,de,$t,Xt,Qt,pi;e:for(;Q;){for(Qt=Q.nextSibling,de=s(Q);!$&&ie;){if(Xt=ie.nextSibling,Q.isSameNode&&Q.isSameNode(ie)){Q=Qt,ie=Xt;continue e}$t=s(ie);var Gi=ie.nodeType,ai=void 0;if(Gi===Q.nodeType&&(Gi===p1?(de?de!==$t&&((pi=S[de])?Xt===pi?ai=!1:(ye.insertBefore(pi,ie),$t?N($t):H(ie,ye,!0),ie=pi):ai=!1):$t&&(ai=!1),ai=ai!==!1&&Bb(ie,Q),ai&&ae(ie,Q)):(Gi===FF||Gi==HF)&&(ai=!0,ie.nodeValue!==Q.nodeValue&&(ie.nodeValue=Q.nodeValue))),ai){Q=Qt,ie=Xt;continue e}$t?N($t):H(ie,ye,!0),ie=Xt}if(de&&(pi=S[de])&&Bb(pi,Q))$||g(ye,pi),ae(pi,Q);else{var $i=a(Q);$i!==!1&&($i&&(Q=$i),Q.actualize&&(Q=Q.actualize(ye.ownerDocument||co)),g(ye,Q),W(Q))}Q=Qt,ie=Xt}re(ye,ie,$t);var nn=OF[ye.nodeName];nn&&nn(ye,ge)}var he=t,Xe=he.nodeType,st=n.nodeType;if(!b){if(Xe===p1)st===p1?Bb(t,n)||(h(t),he=vse(t,gse(n.nodeName,n.namespaceURI))):he=n;else if(Xe===FF||Xe===HF){if(st===Xe)return he.nodeValue!==n.nodeValue&&(he.nodeValue=n.nodeValue),he;he=n}}if(he===n)h(t);else{if(n.isSameNode&&n.isSameNode(he))return;if(ae(he,n,b),k)for(var rt=0,Nt=k.length;rt{if(t&&t.isSameNode(n)&&le.isFormInput(n))return le.mergeFocusedInput(n,r),!1}})}constructor(i,e,t,n,r,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=n,this.streams=r,this.streamInserts={},this.targetCID=o,this.cidPatch=Rl(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(i,e){this.callbacks[`before${i}`].push(e)}after(i,e){this.callbacks[`after${i}`].push(e)}trackBefore(i,...e){this.callbacks[`before${i}`].forEach(t=>t(...e))}trackAfter(i,...e){this.callbacks[`after${i}`].forEach(t=>t(...e))}markPrunableContentForRemoval(){let i=this.liveSocket.binding(Gb);le.all(this.container,`[${i}=${l3}]`,e=>e.innerHTML=""),le.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(bF,"")})}perform(){let{view:i,liveSocket:e,container:t,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):t;if(this.isCIDPatch()&&!r)return;let o=e.getActiveElement(),{selectionStart:s,selectionEnd:a}=o&&le.hasSelectionRange(o)?o:{},l=e.binding(Gb),c=e.binding(Kb),d=e.binding(v3),u=e.binding(VF),h=e.binding(KF),p=e.binding(Boe),m=[],g=[],b=[],S=[],k=null,N=e.time("premorph container prep",()=>this.buildDiffHTML(t,n,l,r));return this.trackBefore("added",t),this.trackBefore("updated",t,t),e.time("morphdom",()=>{this.streams.forEach(([A,H,K,W])=>{Object.entries(H).forEach(([re,[ae,Ne]])=>{this.streamInserts[re]={ref:A,streamAt:ae,limit:Ne}}),W!==void 0&&le.all(t,`[${u1}="${A}"]`,re=>{H[re.id]||this.removeStreamChildElement(re)}),K.forEach(re=>{let ae=t.querySelector(`[id="${re}"]`);ae&&this.removeStreamChildElement(ae)})}),BF(r,N,{childrenOnly:r.getAttribute(Bo)===null,getNodeKey:A=>le.isPhxDestroyed(A)?null:A.id,skipFromChildren:A=>A.getAttribute(l)===l3,addChild:(A,H)=>{let{ref:K,streamAt:W,limit:re}=this.getStreamInsert(H);if(K===void 0)return A.appendChild(H);if(le.putSticky(H,u1,he=>he.setAttribute(u1,K)),W===0)A.insertAdjacentElement("afterbegin",H);else if(W===-1)A.appendChild(H);else if(W>0){let he=Array.from(A.children)[W];A.insertBefore(H,he)}let ae=re!==null&&Array.from(A.children),Ne=[];re&&re<0&&ae.length>re*-1?Ne=ae.slice(0,ae.length+re):re&&re>=0&&ae.length>re&&(Ne=ae.slice(re)),Ne.forEach(he=>{this.streamInserts[he.id]||this.removeStreamChildElement(he)})},onBeforeNodeAdded:A=>(le.maybeAddPrivateHooks(A,u,h),this.trackBefore("added",A),A),onNodeAdded:A=>{A.getAttribute&&this.maybeReOrderStream(A),A instanceof HTMLImageElement&&A.srcset?A.srcset=A.srcset:A instanceof HTMLVideoElement&&A.autoplay&&A.play(),le.isNowTriggerFormExternal(A,p)&&(k=A),A.getAttribute&&A.getAttribute("name")&&le.isFormInput(A)&&g.push(A),(le.isPhxChild(A)&&i.ownsElement(A)||le.isPhxSticky(A)&&i.ownsElement(A.parentNode))&&this.trackAfter("phxChildAdded",A),m.push(A)},onNodeDiscarded:A=>this.onNodeDiscarded(A),onBeforeNodeDiscarded:A=>A.getAttribute&&A.getAttribute(bF)!==null?!0:!(A.parentElement!==null&&A.id&&le.isPhxUpdate(A.parentElement,l,[l3,"append","prepend"])||this.maybePendingRemove(A)||this.skipCIDSibling(A)),onElUpdated:A=>{le.isNowTriggerFormExternal(A,p)&&(k=A),b.push(A),this.maybeReOrderStream(A)},onBeforeElUpdated:(A,H)=>{if(le.maybeAddPrivateHooks(H,u,h),le.cleanChildNodes(H,l),this.skipCIDSibling(H)||le.isPhxSticky(A))return!1;if(le.isIgnored(A,l)||A.form&&A.form.isSameNode(k))return this.trackBefore("updated",A,H),le.mergeAttrs(A,H,{isIgnored:!0}),b.push(A),le.applyStickyOperations(A),!1;if(A.type==="number"&&A.validity&&A.validity.badInput)return!1;if(!le.syncPendingRef(A,H,d))return le.isUploadInput(A)&&(this.trackBefore("updated",A,H),b.push(A)),le.applyStickyOperations(A),!1;if(le.isPhxChild(H)){let W=A.getAttribute(ed);return le.mergeAttrs(A,H,{exclude:[g1]}),W!==""&&A.setAttribute(ed,W),A.setAttribute(_1,this.rootID),le.applyStickyOperations(A),!1}return le.copyPrivates(H,A),o&&A.isSameNode(o)&&le.isFormInput(A)&&A.type!=="hidden"?(this.trackBefore("updated",A,H),le.mergeFocusedInput(A,H),le.syncAttrsToProps(A),b.push(A),le.applyStickyOperations(A),g.push(A),!1):(le.isPhxUpdate(H,l,["append","prepend"])&&S.push(new ase(A,H,H.getAttribute(l))),le.syncAttrsToProps(H),le.applyStickyOperations(H),H.getAttribute("name")&&le.isFormInput(H)&&g.push(H),this.trackBefore("updated",A,H),!0)}})}),e.isDebugEnabled()&&Joe(),S.length>0&&e.time("post-morph append/prepend restoration",()=>{S.forEach(A=>A.perform())}),g.forEach(A=>{le.maybeHideFeedback(r,A,c)}),e.silenceEvents(()=>le.restoreFocus(o,s,a)),le.dispatchEvent(document,"phx:update"),m.forEach(A=>this.trackAfter("added",A)),b.forEach(A=>this.trackAfter("updated",A)),this.transitionPendingRemoves(),k&&(e.unload(),Object.getPrototypeOf(k).submit.call(k)),!0}onNodeDiscarded(i){(le.isPhxChild(i)||le.isPhxSticky(i))&&this.liveSocket.destroyViewByEl(i),this.trackAfter("discarded",i)}maybePendingRemove(i){return i.getAttribute&&i.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(i),!0):!1}removeStreamChildElement(i){this.maybePendingRemove(i)||(i.remove(),this.onNodeDiscarded(i))}getStreamInsert(i){return(i.id?this.streamInserts[i.id]:{})||{}}maybeReOrderStream(i){let{ref:e,streamAt:t,limit:n}=this.getStreamInsert(i);if(t!==void 0){if(le.putSticky(i,u1,r=>r.setAttribute(u1,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let r=Array.from(i.parentElement.children),o=r.indexOf(i);if(t>=r.length-1)i.parentElement.appendChild(i);else{let s=r[t];o>t?i.parentElement.insertBefore(i,s):i.parentElement.insertBefore(i,s.nextElementSibling)}}}}transitionPendingRemoves(){let{pendingRemoves:i,liveSocket:e}=this;i.length>0&&(e.transitionRemoves(i),e.requestDOMUpdate(()=>{i.forEach(t=>{let n=le.firstPhxChild(t);n&&e.destroyViewByEl(n),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.getAttribute(m3)!==null}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=le.findComponentNodeList(this.container,this.targetCID);return t.length===0&&le.childNodeLength(i)===1?e:e&&e.parentNode}buildDiffHTML(i,e,t,n){let r=this.isCIDPatch(),o=r&&n.getAttribute(Bo)===this.targetCID.toString();if(!r||o)return e;{let s=null,a=document.createElement("template");s=le.cloneNode(n);let[l,...c]=le.findComponentNodeList(s,this.targetCID);return a.innerHTML=e,c.forEach(d=>d.remove()),Array.from(s.childNodes).forEach(d=>{d.id&&d.nodeType===Node.ELEMENT_NODE&&d.getAttribute(Bo)!==this.targetCID.toString()&&(d.setAttribute(m3,""),d.innerHTML="")}),Array.from(a.content.childNodes).forEach(d=>s.insertBefore(d,l)),l.remove(),s.outerHTML}}indexOf(i,e){return Array.from(i.children).indexOf(e)}},zF=class{static extract(i){let{[IF]:e,[kF]:t,[AF]:n}=i;return delete i[IF],delete i[kF],delete i[AF],{diff:i,title:n,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[Ho],i);return[e,t]}recursiveToString(i,e=i[Ho],t){t=t?new Set(t):null;let n={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,n),[n.buffer,n.streams]}componentCIDs(i){return Object.keys(i[Ho]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[Ho]?Object.keys(i).length===1:!1}getComponent(i,e){return i[Ho][e]}mergeDiff(i){let e=i[Ho],t={};if(delete i[Ho],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[Ho]=this.rendered[Ho]||{},e){let n=this.rendered[Ho];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,t);for(let r in e)n[r]=e[r];i[Ho]=e}}cachedFindComponent(i,e,t,n,r){if(r[i])return r[i];{let o,s,a=e[La];if(Rl(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],t,n,r):l=t[-a],s=l[La],o=this.cloneMerge(l,e),o[La]=s}else o=e[La]!==void 0?e:this.cloneMerge(t[i]||{},e);return r[i]=o,o}}mutableMerge(i,e){return e[La]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let n=e[t],r=i[t];f1(n)&&n[La]===void 0&&f1(r)?this.doMutableMerge(r,n):i[t]=n}}cloneMerge(i,e){let t=Re(Re({},i),e);for(let n in t){let r=e[n],o=i[n];f1(r)&&r[La]===void 0&&f1(o)&&(t[n]=this.cloneMerge(o,r))}return t}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[Ho],i,null,!1);return[e,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[Ho][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[La]}templateStatic(i,e){return typeof i=="number"?e[i]:i}toOutputBuffer(i,e,t){if(i[Fb])return this.comprehensionToBuffer(i,e,t);let{[La]:n}=i;n=this.templateStatic(n,e),t.buffer+=n[0];for(let r=1;r0||l.length>0||c)&&(delete i[LF],i[Fb]=[],t.streams.add(o))}dynamicToBuffer(i,e,t){if(typeof i=="number"){let[n,r]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...r])}else f1(i)?this.toOutputBuffer(i,e,t):t.buffer+=i}recursiveCIDToString(i,e,t,n=!0){let r=i[e]||Pr(`no component for CID ${e}`,i),o=document.createElement("template"),[s,a]=this.recursiveToString(r,i,t);o.innerHTML=s;let l=o.content,c=t&&!t.has(e),[d,u]=Array.from(l.childNodes).reduce(([h,p],m,g)=>m.nodeType===Node.ELEMENT_NODE?m.getAttribute(Bo)?[h,!0]:(m.setAttribute(Bo,e),m.id||(m.id=`${this.parentViewId()}-${e}-${g}`),c&&(m.setAttribute(m3,""),m.innerHTML=""),[!0,p]):m.nodeType===Node.COMMENT_NODE?(n||m.remove(),[h,p]):m.nodeValue.trim()!==""?(Pr(`only HTML element tags are allowed at the root of components. -got: "${p.nodeValue.trim()}" +got: "${m.nodeValue.trim()}" within: -`,r.innerHTML.trim()),p.replaceWith(this.createSpan(p.nodeValue,e)),[!0,h]):(p.remove(),[u,h]),[!1,!1]);return!c&&!d?(Pr(`expected at least one HTML element tag inside a component, but the component is empty: -`,r.innerHTML.trim()),[this.createSpan("",e).outerHTML,s]):!c&&d?(Pr("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",r.innerHTML.trim()),[r.innerHTML,s]):[r.innerHTML,s]}createSpan(i,e){let t=document.createElement("span");return t.innerText=i,t.setAttribute(Ho,e),t}},bse=1,g1=class{static makeID(){return bse++}static elementID(i){return i.phxHookId}constructor(i,e,t){this.__view=i,this.liveSocket=i.liveSocket,this.__callbacks=t,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(i,e={},t=function(){}){return this.__view.pushHookEvent(this.el,null,i,e,t)}pushEventTo(i,e,t={},n=function(){}){return this.__view.withinTargets(i,(r,o)=>r.pushHookEvent(this.el,o,e,t,n))}handleEvent(i,e){let t=(n,r)=>r?i:e(n.detail);return window.addEventListener(`phx:${i}`,t),this.__listeners.add(t),t}removeHandleEvent(i){let e=i(null,!0);window.removeEventListener(`phx:${e}`,i),this.__listeners.delete(i)}upload(i,e){return this.__view.dispatchUploads(i,e)}uploadTo(i,e,t){return this.__view.withinTargets(i,n=>n.dispatchUploads(e,t))}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},Ub=null,yse={exec(i,e,t,n,r){let[o,s]=r||[null,{callback:r&&r.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(n,c).forEach(d=>{this[`exec_${l}`](i,e,t,n,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,n,r,[o,s]){(s?le.all(document,s):[n]).forEach(l=>{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);t.liveSocket.execJS(l,c,i)})},exec_dispatch(i,e,t,n,r,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=n,le.dispatchEvent(r,s,{detail:a,bubbles:l})},exec_push(i,e,t,n,r,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:u,dispatcher:h,callback:p}=o,m={loading:d,value:u,target:l,page_loading:!!c},g=i==="change"&&h?h:n,b=l||g.getAttribute(t.binding("target"))||g;t.withinTargets(b,(S,k)=>{if(i==="change"){let{newCid:N,_target:A}=o;A=A||(le.isFormInput(n)?n.name:void 0),A&&(m._target=A),S.pushInput(n,k,N,s||e,m,p)}else if(i==="submit"){let{submitter:N}=o;S.submitForm(n,k,s||e,N,m,p)}else S.pushEvent(i,n,k,s||e,a,m,p)})},exec_navigate(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",n)},exec_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Cf.attemptFocus(r))},exec_focus_first(i,e,t,n,r){window.requestAnimationFrame(()=>Cf.focusFirstInteractive(r)||Cf.focusFirst(r))},exec_push_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Ub=r||n)},exec_pop_focus(i,e,t,n,r){window.requestAnimationFrame(()=>{Ub&&Ub.focus(),Ub=null})},exec_add_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,o,[],s,a,t)},exec_remove_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,[],o,s,a,t)},exec_transition(i,e,t,n,r,{time:o,transition:s}){this.addOrRemoveClasses(r,[],[],s,o,t)},exec_toggle(i,e,t,n,r,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,r,o,s,a,l)},exec_show(i,e,t,n,r,{display:o,transition:s,time:a}){this.show(i,t,r,o,s,a)},exec_hide(i,e,t,n,r,{display:o,transition:s,time:a}){this.hide(i,t,r,o,s,a)},exec_set_attr(i,e,t,n,r,{attr:[o,s]}){this.setOrRemoveAttrs(r,[[o,s]],[])},exec_remove_attr(i,e,t,n,r,{attr:o}){this.setOrRemoveAttrs(r,[],[o])},show(i,e,t,n,r,o){this.isVisible(t)||this.toggle(i,e,t,n,r,null,o)},hide(i,e,t,n,r,o){this.isVisible(t)&&this.toggle(i,e,t,n,null,r,o)},toggle(i,e,t,n,r,o,s){let[a,l,c]=r||[[],[],[]],[d,u,h]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let p=()=>{this.addOrRemoveClasses(t,u,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,h,u))})};t.dispatchEvent(new Event("phx:hide-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(t,[],d.concat(h)),le.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let p=()=>{this.addOrRemoveClasses(t,l,d.concat(u).concat(h));let m=n||this.defaultDisplay(t);le.putSticky(t,"toggle",g=>g.style.display=m),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})};t.dispatchEvent(new Event("phx:show-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(t,[],a.concat(c)),t.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(t)?window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:hide-start")),le.putSticky(t,"toggle",p=>p.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let p=n||this.defaultDisplay(t);le.putSticky(t,"toggle",m=>m.style.display=p),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,n,r,o){let[s,a,l]=n||[[],[],[]];if(s.length>0){let c=()=>this.addOrRemoveClasses(i,a.concat(s),[]),d=()=>this.addOrRemoveClasses(i,e.concat(l),t.concat(s).concat(a));return o.transition(r,c,d)}window.requestAnimationFrame(()=>{let[c,d]=le.getSticky(i,"classes",[[],[]]),u=e.filter(g=>c.indexOf(g)<0&&!i.classList.contains(g)),h=t.filter(g=>d.indexOf(g)<0&&i.classList.contains(g)),p=c.filter(g=>t.indexOf(g)<0).concat(u),m=d.filter(g=>e.indexOf(g)<0).concat(h);le.putSticky(i,"classes",g=>(g.classList.remove(...m),g.classList.add(...p),[p,m]))})},setOrRemoveAttrs(i,e,t){let[n,r]=le.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(t);le.putSticky(i,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,d])=>l.setAttribute(c,d)),[s,a]))},hasAllClasses(i,e){return e.every(t=>i.classList.contains(t))},isToggledOut(i,e){return!this.isVisible(i)||this.hasAllClasses(i,e)},filterToEls(i,{to:e}){return e?le.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},Ps=yse,Wb=(i,e,t=[])=>{let l=e,{submitter:n}=l,r=aa(l,["submitter"]),o=new FormData(i);n&&n.hasAttribute("name")&&n.form&&n.form===i&&o.append(n.name,n.value);let s=[];o.forEach((c,d,u)=>{c instanceof File&&s.push(d)}),s.forEach(c=>o.delete(c));let a=new URLSearchParams;for(let[c,d]of o.entries())(t.length===0||t.indexOf(c)>=0)&&a.append(c,d);for(let c in r)a.append(c,r[c]);return a.toString()},QF=class{constructor(i,e,t,n,r){this.isDead=!1,this.liveSocket=e,this.flash=n,this.parent=t,this.root=t?t.root:this,this.el=i,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>({redirect:this.redirect?this.href:void 0,url:this.redirect?void 0:this.href||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash}))}setHref(i){this.href=i}setRedirect(i){this.redirect=!0,this.href=i}isMain(){return this.el.hasAttribute(C3)}connectParams(i){let e=this.liveSocket.params(this.el),t=le.all(document,`[${this.binding(Roe)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e._live_referer=i,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Zc)}getStatic(){let i=this.el.getAttribute(v1);return i===""?null:i}destroy(i=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{i();for(let t in this.viewHooks)this.destroyHook(this.viewHooks[t])};le.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...i){this.el.classList.remove(wF,d1,Nb,xF,a3),this.el.classList.add(...i)}showLoader(i){if(clearTimeout(this.loaderTimer),i)this.loaderTimer=setTimeout(()=>this.showLoader(),i);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(d1)}}execAll(i){le.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(wF),this.execAll(this.binding("connected"))}triggerReconnected(){for(let i in this.viewHooks)this.viewHooks[i].__reconnected()}log(i,e){this.liveSocket.log(this,i,e)}transition(i,e,t=function(){}){this.liveSocket.transition(i,e,t)}withinTargets(i,e){if(i instanceof HTMLElement||i instanceof SVGElement)return this.liveSocket.owner(i,t=>e(t,i));if(Qc(i))le.findComponentNodeList(this.el,i).length===0?Pr(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Pr(`nothing found matching the phx-target selector "${i}"`),t.forEach(n=>this.liveSocket.owner(n,r=>e(r,n)))}}applyDiff(i,e,t){this.log(i,()=>["",Vb(e)]);let{diff:n,reply:r,events:o,title:s}=WF.extract(e);t({diff:n,reply:r,events:o}),s&&window.requestAnimationFrame(()=>le.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[n,r]=t;this.el=le.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,Ma.dropLocal(this.liveSocket.localStorage,window.location.pathname,jF),this.applyDiff("mount",e,({diff:n,events:r})=>{this.rendered=new WF(this.id,n);let[o,s]=this.renderContainer(null,"join");this.dropPendingRefs();let a=this.formsForRecovery(o);this.joinCount++,a.length>0?a.forEach(([l,c,d],u)=>{this.pushFormRecovery(l,d,h=>{u===a.length-1&&this.onJoinComplete(h,o,s,r)})}):this.onJoinComplete(i,o,s,r)})}dropPendingRefs(){le.all(document,`[${du}="${this.id}"][${us}]`,i=>{i.removeAttribute(us),i.removeAttribute(du)})}onJoinComplete({live_patch:i},e,t,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,n);le.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(v1);return a&&o.setAttribute(v1,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)])}attachTrueDocEl(){this.el=le.byId(this.id),this.el.setAttribute(b1,this.root.id)}execNewMounted(){let i=this.binding(qF),e=this.binding(GF);le.all(this.el,`[${i}], [${e}]`,t=>{le.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),le.all(this.el,`[${this.binding(u1)}], [data-phx-${u1}]`,t=>{this.maybeAddNewHook(t)}),le.all(this.el,`[${this.binding(kF)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,n){this.attachTrueDocEl();let r=new zb(this,this.el,this.id,e,t,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),i){let{kind:o,to:s}=i;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(i,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[i,e]);let t=this.getHook(i),n=t&&le.isIgnored(i,this.binding(Gb));if(t&&!i.isEqualNode(e)&&!(n&&Joe(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(kF)),t=e&&le.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),le.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e){let t=[],n=!1,r=new Set;return i.after("added",o=>{this.liveSocket.triggerDOM("onNodeAdded",[o]),this.maybeAddNewHook(o),o.getAttribute&&this.maybeMounted(o)}),i.after("phxChildAdded",o=>{le.isPhxSticky(o)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(o,s)=>{this.triggerBeforeUpdateHook(o,s)&&r.add(o.id)}),i.after("updated",o=>{r.has(o.id)&&this.getHook(o).__updated()}),i.after("discarded",o=>{o.nodeType===Node.ELEMENT_NODE&&t.push(o)}),i.after("transitionsDiscarded",o=>this.afterElementsRemoved(o,e)),i.perform(),this.afterElementsRemoved(t,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(n=>{let r=le.all(n,`[${Ho}]`),o=le.all(n,`[${this.binding(u1)}]`);r.concat(n).forEach(s=>{let a=this.componentID(s);Qc(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(n).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){le.findPhxChildren(this.el,this.id).forEach(i=>this.joinChild(i))}getChildById(i){return this.root.children[this.id][i]}getDescendentByEl(i){return i.id===this.id?this:this.children[i.getAttribute(yf)][i.id]}destroyDescendent(i){for(let e in this.root.children)for(let t in this.root.children[e])if(t===i)return this.root.children[e][t].destroy()}joinChild(i){if(!this.getChildById(i.id)){let t=new QF(i,this.liveSocket,this);return this.root.children[this.id][t.id]=t,t.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(i){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback(()=>{this.pendingJoinOps.forEach(([i,e])=>{i.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(i,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:i,events:e});this.rendered.mergeDiff(i);let t=!1;this.rendered.isComponentOnlyDiff(i)?this.liveSocket.time("component patch complete",()=>{le.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(r=>{this.componentPatch(this.rendered.getComponent(i,r),r)&&(t=!0)})}):NF(i)||this.liveSocket.time("full patch complete",()=>{let[n,r]=this.renderContainer(i,"update"),o=new zb(this,this.el,this.id,n,r,null);t=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),t&&this.joinNewChildren()}renderContainer(i,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let t=this.el.tagName,n=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[r,o]=this.rendered.toString(n);return[`<${t}>${r}`,o]})}componentPatch(i,e){if(NF(i))return!1;let[t,n]=this.rendered.componentToString(e),r=new zb(this,this.el,this.id,t,n,e);return this.performPatch(r,!0)}getHook(i){return this.viewHooks[g1.elementID(i)]}addHook(i){if(g1.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${u1}`)||i.getAttribute(this.binding(u1));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Pr(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let n=new g1(this,i,t);return this.viewHooks[g1.elementID(n.el)]=n,n}else e!==null&&Pr(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[g1.elementID(i.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:i,events:e})=>this.update(i,e)),this.pendingDiffs=[],this.eachChild(i=>i.applyPendingUpdates())}eachChild(i){let e=this.root.children[this.id]||{};for(let t in e)i(this.getChildById(t))}onChannel(i,e){this.liveSocket.onChannel(this.channel,i,t=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(t)]):this.liveSocket.requestDOMUpdate(()=>e(t))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",i=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",i,({diff:e,events:t})=>this.update(e,t))})}),this.onChannel("redirect",({to:i,flash:e})=>this.onRedirect({to:i,flash:e})),this.onChannel("live_patch",i=>this.onLivePatch(i)),this.onChannel("live_redirect",i=>this.onLiveRedirect(i)),this.channel.onError(i=>this.onError(i)),this.channel.onClose(i=>this.onClose(i))}destroyAllChildren(){this.eachChild(i=>i.destroy())}onLiveRedirect(i){let{to:e,kind:t,flash:n}=i,r=this.expandURL(e);this.liveSocket.historyRedirect(r,t,n)}onLivePatch(i){let{to:e,kind:t}=i;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,t)}expandURL(i){return i.startsWith("/")?`${window.location.protocol}//${window.location.host}${i}`:i}onRedirect({to:i,flash:e}){this.liveSocket.redirect(i,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(i){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},i?i(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(i){if(i.reason==="reload")return this.log("error",()=>[`failed mount with ${i.status}. Falling back to page request`,i]),this.onRedirect({to:this.href});if(i.reason==="unauthorized"||i.reason==="stale")return this.log("error",()=>["unauthorized live_redirect. Falling back to page request",i]),this.onRedirect({to:this.href});if((i.redirect||i.live_redirect)&&(this.joinPending=!1,this.channel.leave()),i.redirect)return this.onRedirect(i.redirect);if(i.live_redirect)return this.onLiveRedirect(i.live_redirect);this.displayError([d1,Nb,a3]),this.log("error",()=>["unable to join",i]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(i){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&i!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(Voe)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([d1,Nb,a3]):this.displayError([d1,Nb,xF]))}displayError(i){this.isMain()&&le.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...i),this.execAll(this.binding("disconnected"))}pushWithReply(i,e,t,n=function(){}){if(!this.isConnected())return;let[r,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(SF))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof t.cid!="number"&&delete t.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,t,qoe).receive("ok",l=>{let c=d=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),n(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:u,events:h})=>{r!==null&&this.undoRefs(r),this.update(d,h),c(u)})}):(r!==null&&this.undoRefs(r),c(null))}))}undoRefs(i){this.isConnected()&&le.all(document,`[${du}="${this.id}"][${us}="${i}"]`,e=>{let t=e.getAttribute(Rb);e.removeAttribute(us),e.removeAttribute(du),e.getAttribute(l3)!==null&&(e.readOnly=!1,e.removeAttribute(l3)),t!==null&&(e.disabled=t==="true",e.removeAttribute(Rb)),VF.forEach(o=>le.removeClass(e,o));let n=e.getAttribute(Ob);n!==null&&(e.innerText=n,e.removeAttribute(Ob));let r=le.private(e,us);if(r){let o=this.triggerBeforeUpdateHook(e,r);zb.patchEl(e,r,this.liveSocket.getActiveElement()),o&&o.__updated(),le.deletePrivate(e,us)}})}putRef(i,e,t={}){let n=this.ref++,r=this.binding(b3);return t.loading&&(i=i.concat(le.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(us,n),o.setAttribute(du,this.el.id);let s=o.getAttribute(r);s!==null&&(o.getAttribute(Ob)||o.setAttribute(Ob,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[n,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Ho);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(Qc(e))return e;let n=i.getAttribute(this.binding("target"));return Qc(n)?parseInt(n):e&&(n!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return Qc(i)?i:i?Jc(i.closest(`[${Ho}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,n,r){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,n]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:n,cid:this.closestComponentID(e)},(l,c)=>r(c,o)),o}extractMeta(i,e,t){let n=this.binding("value-");for(let r=0;r=0&&!i.checked&&delete e.value),t){e||(e={});for(let r in t)e[r]=t[r]}return e}pushEvent(i,e,t,n,r,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:n,value:this.extractMeta(e,r,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,n=function(){}){this.liveSocket.withinOwners(i.form,(r,o)=>{r.pushWithReply(null,"progress",{event:i.getAttribute(r.binding(Woe)),ref:i.getAttribute(uu),entry_ref:e,progress:t,cid:r.targetComponentID(i.form,o)},n)})}pushInput(i,e,t,n,r,o){let s,a=Qc(t)?t:this.targetComponentID(i.form,e),l=()=>this.putRef([i,i.form],"change",r),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=Wb(i.form,Re({_target:r._target},d),[i.name]):c=Wb(i.form,Re({_target:r._target},d)),le.isUploadInput(i)&&i.files&&i.files.length>0&&Or.trackFiles(i,Array.from(i.files)),s=Or.serializeUploads(i);let u={type:"form",event:n,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",u,h=>{if(le.showError(i,this.liveSocket.binding(Kb)),le.isUploadInput(i)&&i.getAttribute("data-phx-auto-upload")!==null){if(Or.filesAwaitingPreflight(i).length>0){let[p,m]=l();this.uploadFiles(i.form,e,p,a,g=>{o&&o(h),this.triggerAwaitingSubmit(i.form)})}}else o&&o(h)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,n,r,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,n,r])=>e.isSameNode(i))}scheduleSubmit(i,e,t,n){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,n])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,n])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(_1(d,`${this.binding(Gb)}=ignore`,d.form)||_1(d,"data-phx-update=ignore",d.form)),n=d=>d.hasAttribute(this.binding(b3)),r=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(n),l=s.filter(r).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(Rb,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(l3,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(Rb,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(SF),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,n,r,o){let s=()=>this.disableForm(i,r),a=this.targetComponentID(i,e);if(Or.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,n,e,t,r,o);return this.scheduleSubmit(i,l,r,d)}else if(Or.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,r];this.uploadFiles(i,e,l,a,u=>{let h=this.extractMeta(i),p=Wb(i,Re({submitter:n},h));this.pushWithReply(d,"event",{type:"form",event:t,value:p,cid:a},o)})}else if(!(i.hasAttribute(us)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=Wb(i,Re({submitter:n},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,n,r){let o=this.joinCount,s=Or.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new Or(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=c;let d=c.entries().map(h=>h.toPreflightPayload()),u={ref:l.getAttribute(uu),entries:d,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",u]),this.pushWithReply(null,"allow_upload",u,h=>{if(this.log("upload",()=>["got preflight response",h]),h.error){this.undoRefs(t);let[p,m]=h.error;this.log("upload",()=>[`error for entry ${p}`,m])}else{let p=m=>{this.channel.onError(()=>{this.joinCount===o&&m()})};c.initAdapterUpload(h,p,this.liveSocket)}})})}dispatchUploads(i,e){let t=le.findUploadInputs(this.el).filter(n=>n.name===i);t.length===0?Pr(`no live file inputs found matching the name "${i}"`):t.length>1?Pr(`duplicate live file inputs found matching the name "${i}"`):le.dispatchEvent(t[0],KF,{detail:{files:e}})}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(n,r)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>le.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;let a=s.find(c=>c.type!=="hidden")||a[0],l=i.getAttribute(this.binding(TF))||i.getAttribute(this.binding("change"));Ps.exec("change",l,n,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let n=this.liveSocket.setPendingLink(i),r=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i,a=this.pushWithReply(r,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(i,null,t,n):(this.liveSocket.commitPendingLink(n)&&(this.href=i),this.applyPendingUpdates(),t&&t(n))})});a?a.receive("timeout",o):o()}formsForRecovery(i){if(this.joinCount===0)return[];let e=this.binding("change"),t=document.createElement("template");return t.innerHTML=i,le.all(this.el,`form[${e}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(TF))!=="ignore").map(n=>{let r=t.content.querySelector(`form[id="${n.id}"][${e}="${n.getAttribute(e)}"]`);return r?[n,r,this.targetComponentID(r)]:[n,n,this.targetComponentID(n)]}).filter(([n,r,o])=>r)}maybePushComponentsDestroyed(i){let e=i.filter(t=>le.findComponentNodeList(this.el,t).length===0);e.length>0&&(this.pruningCIDs.push(...e),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.pruningCIDs=this.pruningCIDs.filter(n=>e.indexOf(n)!==-1);let t=e.filter(n=>le.findComponentNodeList(this.el,n).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},n=>{this.rendered.pruneCIDs(n.cids)})}))}ownsElement(i){let e=i.closest(Sf);return i.getAttribute(yf)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,n,r={}){le.putPrivate(i,qb,!0);let o=this.liveSocket.binding(Kb),s=Array.from(i.elements);s.forEach(a=>le.putPrivate(a,qb,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,n,r,()=>{s.forEach(a=>le.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},JF=class{constructor(i,e,t={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` +`,o.innerHTML.trim()),m.replaceWith(this.createSpan(m.nodeValue,e)),[!0,p]):(m.remove(),[h,p]),[!1,!1]);return!d&&!u?(Pr(`expected at least one HTML element tag inside a component, but the component is empty: +`,o.innerHTML.trim()),[this.createSpan("",e).outerHTML,a]):!d&&u?(Pr("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",o.innerHTML.trim()),[o.innerHTML,a]):[o.innerHTML,a]}createSpan(i,e){let t=document.createElement("span");return t.innerText=i,t.setAttribute(Bo,e),t}},Cse=1,m1=class{static makeID(){return Cse++}static elementID(i){return i.phxHookId}constructor(i,e,t){this.__view=i,this.liveSocket=i.liveSocket,this.__callbacks=t,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(i,e={},t=function(){}){return this.__view.pushHookEvent(this.el,null,i,e,t)}pushEventTo(i,e,t={},n=function(){}){return this.__view.withinTargets(i,(r,o)=>r.pushHookEvent(this.el,o,e,t,n))}handleEvent(i,e){let t=(n,r)=>r?i:e(n.detail);return window.addEventListener(`phx:${i}`,t),this.__listeners.add(t),t}removeHandleEvent(i){let e=i(null,!0);window.removeEventListener(`phx:${e}`,i),this.__listeners.delete(i)}upload(i,e){return this.__view.dispatchUploads(null,i,e)}uploadTo(i,e,t){return this.__view.withinTargets(i,(n,r)=>{n.dispatchUploads(r,e,t)})}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},Ub=null,Sse={exec(i,e,t,n,r){let[o,s]=r||[null,{callback:r&&r.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(n,c).forEach(d=>{this[`exec_${l}`](i,e,t,n,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,n,r,[o,s]){(s?le.all(document,s):[n]).forEach(l=>{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);t.liveSocket.execJS(l,c,i)})},exec_dispatch(i,e,t,n,r,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=n,le.dispatchEvent(r,s,{detail:a,bubbles:l})},exec_push(i,e,t,n,r,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:u,dispatcher:h,callback:p}=o,m={loading:d,value:u,target:l,page_loading:!!c},g=i==="change"&&h?h:n,b=l||g.getAttribute(t.binding("target"))||g;t.withinTargets(b,(S,k)=>{if(i==="change"){let{newCid:N,_target:A}=o;A=A||(le.isFormInput(n)?n.name:void 0),A&&(m._target=A),S.pushInput(n,k,N,s||e,m,p)}else if(i==="submit"){let{submitter:N}=o;S.submitForm(n,k,s||e,N,m,p)}else S.pushEvent(i,n,k,s||e,a,m,p)})},exec_navigate(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",n)},exec_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Cf.attemptFocus(r))},exec_focus_first(i,e,t,n,r){window.requestAnimationFrame(()=>Cf.focusFirstInteractive(r)||Cf.focusFirst(r))},exec_push_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Ub=r||n)},exec_pop_focus(i,e,t,n,r){window.requestAnimationFrame(()=>{Ub&&Ub.focus(),Ub=null})},exec_add_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,o,[],s,a,t)},exec_remove_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,[],o,s,a,t)},exec_transition(i,e,t,n,r,{time:o,transition:s}){this.addOrRemoveClasses(r,[],[],s,o,t)},exec_toggle(i,e,t,n,r,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,r,o,s,a,l)},exec_show(i,e,t,n,r,{display:o,transition:s,time:a}){this.show(i,t,r,o,s,a)},exec_hide(i,e,t,n,r,{display:o,transition:s,time:a}){this.hide(i,t,r,o,s,a)},exec_set_attr(i,e,t,n,r,{attr:[o,s]}){this.setOrRemoveAttrs(r,[[o,s]],[])},exec_remove_attr(i,e,t,n,r,{attr:o}){this.setOrRemoveAttrs(r,[],[o])},show(i,e,t,n,r,o){this.isVisible(t)||this.toggle(i,e,t,n,r,null,o)},hide(i,e,t,n,r,o){this.isVisible(t)&&this.toggle(i,e,t,n,null,r,o)},toggle(i,e,t,n,r,o,s){let[a,l,c]=r||[[],[],[]],[d,u,h]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let p=()=>{this.addOrRemoveClasses(t,u,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,h,u))})};t.dispatchEvent(new Event("phx:hide-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(t,[],d.concat(h)),le.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let p=()=>{this.addOrRemoveClasses(t,l,d.concat(u).concat(h));let m=n||this.defaultDisplay(t);le.putSticky(t,"toggle",g=>g.style.display=m),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})};t.dispatchEvent(new Event("phx:show-start")),e.transition(s,p,()=>{this.addOrRemoveClasses(t,[],a.concat(c)),t.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(t)?window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:hide-start")),le.putSticky(t,"toggle",p=>p.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let p=n||this.defaultDisplay(t);le.putSticky(t,"toggle",m=>m.style.display=p),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,n,r,o){let[s,a,l]=n||[[],[],[]];if(s.length>0){let c=()=>{this.addOrRemoveClasses(i,a,[].concat(s).concat(l)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,s,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,l,a))})},d=()=>this.addOrRemoveClasses(i,e.concat(l),t.concat(s).concat(a));return o.transition(r,c,d)}window.requestAnimationFrame(()=>{let[c,d]=le.getSticky(i,"classes",[[],[]]),u=e.filter(g=>c.indexOf(g)<0&&!i.classList.contains(g)),h=t.filter(g=>d.indexOf(g)<0&&i.classList.contains(g)),p=c.filter(g=>t.indexOf(g)<0).concat(u),m=d.filter(g=>e.indexOf(g)<0).concat(h);le.putSticky(i,"classes",g=>(g.classList.remove(...m),g.classList.add(...p),[p,m]))})},setOrRemoveAttrs(i,e,t){let[n,r]=le.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(t);le.putSticky(i,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,d])=>l.setAttribute(c,d)),[s,a]))},hasAllClasses(i,e){return e.every(t=>i.classList.contains(t))},isToggledOut(i,e){return!this.isVisible(i)||this.hasAllClasses(i,e)},filterToEls(i,{to:e}){return e?le.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},Ps=Sse,Wb=(i,e,t=[])=>{let l=e,{submitter:n}=l,r=aa(l,["submitter"]),o=new FormData(i);n&&n.hasAttribute("name")&&n.form&&n.form===i&&o.append(n.name,n.value);let s=[];o.forEach((c,d,u)=>{c instanceof File&&s.push(d)}),s.forEach(c=>o.delete(c));let a=new URLSearchParams;for(let[c,d]of o.entries())(t.length===0||t.indexOf(c)>=0)&&a.append(c,d);for(let c in r)a.append(c,r[c]);return a.toString()},YF=class{constructor(i,e,t,n,r){this.isDead=!1,this.liveSocket=e,this.flash=n,this.parent=t,this.root=t?t.root:this,this.el=i,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let o=this.href&&this.expandURL(this.href);return{redirect:this.redirect?o:void 0,url:this.redirect?void 0:o||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(i){this.href=i}setRedirect(i){this.redirect=!0,this.href=i}isMain(){return this.el.hasAttribute(b3)}connectParams(i){let e=this.liveSocket.params(this.el),t=le.all(document,`[${this.binding(Poe)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e._live_referer=i,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(ed)}getStatic(){let i=this.el.getAttribute(g1);return i===""?null:i}destroy(i=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{i();for(let t in this.viewHooks)this.destroyHook(this.viewHooks[t])};le.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...i){this.el.classList.remove(CF,c1,Db,SF,s3),this.el.classList.add(...i)}showLoader(i){if(clearTimeout(this.loaderTimer),i)this.loaderTimer=setTimeout(()=>this.showLoader(),i);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(c1)}}execAll(i){le.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(CF),this.execAll(this.binding("connected"))}triggerReconnected(){for(let i in this.viewHooks)this.viewHooks[i].__reconnected()}log(i,e){this.liveSocket.log(this,i,e)}transition(i,e,t=function(){}){this.liveSocket.transition(i,e,t)}withinTargets(i,e){if(i instanceof HTMLElement||i instanceof SVGElement)return this.liveSocket.owner(i,t=>e(t,i));if(Rl(i))le.findComponentNodeList(this.el,i).length===0?Pr(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Pr(`nothing found matching the phx-target selector "${i}"`),t.forEach(n=>this.liveSocket.owner(n,r=>e(r,n)))}}applyDiff(i,e,t){this.log(i,()=>["",Vb(e)]);let{diff:n,reply:r,events:o,title:s}=zF.extract(e);t({diff:n,reply:r,events:o}),s&&window.requestAnimationFrame(()=>le.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[n,r]=t;this.el=le.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,Ma.dropLocal(this.liveSocket.localStorage,window.location.pathname,UF),this.applyDiff("mount",e,({diff:n,events:r})=>{this.rendered=new zF(this.id,n);let[o,s]=this.renderContainer(null,"join");this.dropPendingRefs();let a=this.formsForRecovery(o);this.joinCount++,a.length>0?a.forEach(([l,c,d],u)=>{this.pushFormRecovery(l,d,h=>{u===a.length-1&&this.onJoinComplete(h,o,s,r)})}):this.onJoinComplete(i,o,s,r)})}dropPendingRefs(){le.all(document,`[${uu}="${this.id}"][${hs}]`,i=>{i.removeAttribute(hs),i.removeAttribute(uu)})}onJoinComplete({live_patch:i},e,t,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,n);le.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(g1);return a&&o.setAttribute(g1,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)])}attachTrueDocEl(){this.el=le.byId(this.id),this.el.setAttribute(_1,this.root.id)}execNewMounted(){let i=this.binding(VF),e=this.binding(KF);le.all(this.el,`[${i}], [${e}]`,t=>{le.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),le.all(this.el,`[${this.binding(d1)}], [data-phx-${d1}]`,t=>{this.maybeAddNewHook(t)}),le.all(this.el,`[${this.binding(EF)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,n){this.attachTrueDocEl();let r=new zb(this,this.el,this.id,e,t,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),i){let{kind:o,to:s}=i;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(i,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[i,e]);let t=this.getHook(i),n=t&&le.isIgnored(i,this.binding(Gb));if(t&&!i.isEqualNode(e)&&!(n&&ese(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(EF)),t=e&&le.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),le.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e){let t=[],n=!1,r=new Set;return i.after("added",o=>{this.liveSocket.triggerDOM("onNodeAdded",[o]),this.maybeAddNewHook(o),o.getAttribute&&this.maybeMounted(o)}),i.after("phxChildAdded",o=>{le.isPhxSticky(o)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(o,s)=>{this.triggerBeforeUpdateHook(o,s)&&r.add(o.id)}),i.after("updated",o=>{r.has(o.id)&&this.getHook(o).__updated()}),i.after("discarded",o=>{o.nodeType===Node.ELEMENT_NODE&&t.push(o)}),i.after("transitionsDiscarded",o=>this.afterElementsRemoved(o,e)),i.perform(),this.afterElementsRemoved(t,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(n=>{let r=le.all(n,`[${Bo}]`),o=le.all(n,`[${this.binding(d1)}]`);r.concat(n).forEach(s=>{let a=this.componentID(s);Rl(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(n).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){le.findPhxChildren(this.el,this.id).forEach(i=>this.joinChild(i))}getChildById(i){return this.root.children[this.id][i]}getDescendentByEl(i){return i.id===this.id?this:this.children[i.getAttribute(yf)][i.id]}destroyDescendent(i){for(let e in this.root.children)for(let t in this.root.children[e])if(t===i)return this.root.children[e][t].destroy()}joinChild(i){if(!this.getChildById(i.id)){let t=new YF(i,this.liveSocket,this);return this.root.children[this.id][t.id]=t,t.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(i){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback(()=>{this.pendingJoinOps.forEach(([i,e])=>{i.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(i,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:i,events:e});this.rendered.mergeDiff(i);let t=!1;this.rendered.isComponentOnlyDiff(i)?this.liveSocket.time("component patch complete",()=>{le.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(r=>{this.componentPatch(this.rendered.getComponent(i,r),r)&&(t=!0)})}):MF(i)||this.liveSocket.time("full patch complete",()=>{let[n,r]=this.renderContainer(i,"update"),o=new zb(this,this.el,this.id,n,r,null);t=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),t&&this.joinNewChildren()}renderContainer(i,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let t=this.el.tagName,n=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[r,o]=this.rendered.toString(n);return[`<${t}>${r}`,o]})}componentPatch(i,e){if(MF(i))return!1;let[t,n]=this.rendered.componentToString(e),r=new zb(this,this.el,this.id,t,n,e);return this.performPatch(r,!0)}getHook(i){return this.viewHooks[m1.elementID(i)]}addHook(i){if(m1.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${d1}`)||i.getAttribute(this.binding(d1));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Pr(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let n=new m1(this,i,t);return this.viewHooks[m1.elementID(n.el)]=n,n}else e!==null&&Pr(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[m1.elementID(i.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:i,events:e})=>this.update(i,e)),this.pendingDiffs=[],this.eachChild(i=>i.applyPendingUpdates())}eachChild(i){let e=this.root.children[this.id]||{};for(let t in e)i(this.getChildById(t))}onChannel(i,e){this.liveSocket.onChannel(this.channel,i,t=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(t)]):this.liveSocket.requestDOMUpdate(()=>e(t))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",i=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",i,({diff:e,events:t})=>this.update(e,t))})}),this.onChannel("redirect",({to:i,flash:e})=>this.onRedirect({to:i,flash:e})),this.onChannel("live_patch",i=>this.onLivePatch(i)),this.onChannel("live_redirect",i=>this.onLiveRedirect(i)),this.channel.onError(i=>this.onError(i)),this.channel.onClose(i=>this.onClose(i))}destroyAllChildren(){this.eachChild(i=>i.destroy())}onLiveRedirect(i){let{to:e,kind:t,flash:n}=i,r=this.expandURL(e);this.liveSocket.historyRedirect(r,t,n)}onLivePatch(i){let{to:e,kind:t}=i;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,t)}expandURL(i){return i.startsWith("/")?`${window.location.protocol}//${window.location.host}${i}`:i}onRedirect({to:i,flash:e}){this.liveSocket.redirect(i,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(i){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},i?i(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(i){if(i.reason==="reload"){this.log("error",()=>[`failed mount with ${i.status}. Falling back to page request`,i]),this.isMain()&&this.onRedirect({to:this.href});return}else if(i.reason==="unauthorized"||i.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",i]),this.isMain()&&this.onRedirect({to:this.href});return}if((i.redirect||i.live_redirect)&&(this.joinPending=!1,this.channel.leave()),i.redirect)return this.onRedirect(i.redirect);if(i.live_redirect)return this.onLiveRedirect(i.live_redirect);this.displayError([c1,Db,s3]),this.log("error",()=>["unable to join",i]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(i){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&i!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(qoe)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([c1,Db,s3]):this.displayError([c1,Db,SF]))}displayError(i){this.isMain()&&le.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...i),this.execAll(this.binding("disconnected"))}pushWithReply(i,e,t,n=function(){}){if(!this.isConnected())return;let[r,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(yF))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof t.cid!="number"&&delete t.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,t,$oe).receive("ok",l=>{let c=d=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),n(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:u,events:h})=>{r!==null&&this.undoRefs(r),this.update(d,h),c(u)})}):(r!==null&&this.undoRefs(r),c(null))}))}undoRefs(i){this.isConnected()&&le.all(document,`[${uu}="${this.id}"][${hs}="${i}"]`,e=>{let t=e.getAttribute(Nb);e.removeAttribute(hs),e.removeAttribute(uu),e.getAttribute(a3)!==null&&(e.readOnly=!1,e.removeAttribute(a3)),t!==null&&(e.disabled=t==="true",e.removeAttribute(Nb)),WF.forEach(o=>le.removeClass(e,o));let n=e.getAttribute(Rb);n!==null&&(e.innerText=n,e.removeAttribute(Rb));let r=le.private(e,hs);if(r){let o=this.triggerBeforeUpdateHook(e,r);zb.patchEl(e,r,this.liveSocket.getActiveElement()),o&&o.__updated(),le.deletePrivate(e,hs)}})}putRef(i,e,t={}){let n=this.ref++,r=this.binding(v3);return t.loading&&(i=i.concat(le.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(hs,n),o.setAttribute(uu,this.el.id);let s=o.getAttribute(r);s!==null&&(o.getAttribute(Rb)||o.setAttribute(Rb,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[n,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Bo);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(Rl(e))return e;let n=i.getAttribute(this.binding("target"));return Rl(n)?parseInt(n):e&&(n!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return Rl(i)?i:i?Jc(i.closest(`[${Bo}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,n,r){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,n]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:n,cid:this.closestComponentID(e)},(l,c)=>r(c,o)),o}extractMeta(i,e,t){let n=this.binding("value-");for(let r=0;r=0&&!i.checked&&delete e.value),t){e||(e={});for(let r in t)e[r]=t[r]}return e}pushEvent(i,e,t,n,r,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:n,value:this.extractMeta(e,r,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,n=function(){}){this.liveSocket.withinOwners(i.form,(r,o)=>{r.pushWithReply(null,"progress",{event:i.getAttribute(r.binding(Voe)),ref:i.getAttribute(Zc),entry_ref:e,progress:t,cid:r.targetComponentID(i.form,o)},n)})}pushInput(i,e,t,n,r,o){let s,a=Rl(t)?t:this.targetComponentID(i.form,e),l=()=>this.putRef([i,i.form],"change",r),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=Wb(i.form,Re({_target:r._target},d),[i.name]):c=Wb(i.form,Re({_target:r._target},d)),le.isUploadInput(i)&&i.files&&i.files.length>0&&yr.trackFiles(i,Array.from(i.files)),s=yr.serializeUploads(i);let u={type:"form",event:n,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",u,h=>{if(le.showError(i,this.liveSocket.binding(Kb)),le.isUploadInput(i)&&le.isAutoUpload(i)){if(yr.filesAwaitingPreflight(i).length>0){let[p,m]=l();this.uploadFiles(i.form,e,p,a,g=>{o&&o(h),this.triggerAwaitingSubmit(i.form)})}}else o&&o(h)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,n,r,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,n,r])=>e.isSameNode(i))}scheduleSubmit(i,e,t,n){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,n])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,n])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(v1(d,`${this.binding(Gb)}=ignore`,d.form)||v1(d,"data-phx-update=ignore",d.form)),n=d=>d.hasAttribute(this.binding(v3)),r=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(n),l=s.filter(r).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(Nb,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(a3,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(Nb,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(yF),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,n,r,o){let s=()=>this.disableForm(i,r),a=this.targetComponentID(i,e);if(yr.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,n,e,t,r,o);return this.scheduleSubmit(i,l,r,d)}else if(yr.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,r];this.uploadFiles(i,e,l,a,u=>{let h=this.extractMeta(i),p=Wb(i,Re({submitter:n},h));this.pushWithReply(d,"event",{type:"form",event:t,value:p,cid:a},o)})}else if(!(i.hasAttribute(hs)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=Wb(i,Re({submitter:n},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,n,r){let o=this.joinCount,s=yr.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new yr(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=c;let d=c.entries().map(h=>h.toPreflightPayload()),u={ref:l.getAttribute(Zc),entries:d,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",u]),this.pushWithReply(null,"allow_upload",u,h=>{if(this.log("upload",()=>["got preflight response",h]),h.error){this.undoRefs(t);let[p,m]=h.error;this.log("upload",()=>[`error for entry ${p}`,m])}else{let p=m=>{this.channel.onError(()=>{this.joinCount===o&&m()})};c.initAdapterUpload(h,p,this.liveSocket)}})})}dispatchUploads(i,e,t){let n=this.targetCtxElement(i)||this.el,r=le.findUploadInputs(n).filter(o=>o.name===e);r.length===0?Pr(`no live file inputs found matching the name "${e}"`):r.length>1?Pr(`duplicate live file inputs found matching the name "${e}"`):le.dispatchEvent(r[0],jF,{detail:{files:t}})}targetCtxElement(i){if(Rl(i)){let[e]=le.findComponentNodeList(this.el,i);return e}else return i||null}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(n,r)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>le.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;s.forEach(c=>c.hasAttribute(Zc)&&yr.clearFiles(c));let a=s.find(c=>c.type!=="hidden")||s[0],l=i.getAttribute(this.binding(xF))||i.getAttribute(this.binding("change"));Ps.exec("change",l,n,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let n=this.liveSocket.setPendingLink(i),r=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i,a=this.pushWithReply(r,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(i,null,t,n):(this.liveSocket.commitPendingLink(n)&&(this.href=i),this.applyPendingUpdates(),t&&t(n))})});a?a.receive("timeout",o):o()}formsForRecovery(i){if(this.joinCount===0)return[];let e=this.binding("change"),t=document.createElement("template");return t.innerHTML=i,le.all(this.el,`form[${e}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(xF))!=="ignore").map(n=>{let r=n.getAttribute(e).replaceAll(/([\[\]"])/g,"\\$1"),o=t.content.querySelector(`form[id="${n.id}"][${e}="${r}"]`);return o?[n,o,this.targetComponentID(o)]:[n,n,this.targetComponentID(n)]}).filter(([n,r,o])=>r)}maybePushComponentsDestroyed(i){let e=i.filter(t=>le.findComponentNodeList(this.el,t).length===0);e.length>0&&(this.pruningCIDs.push(...e),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.pruningCIDs=this.pruningCIDs.filter(n=>e.indexOf(n)!==-1);let t=e.filter(n=>le.findComponentNodeList(this.el,n).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},n=>{this.rendered.pruneCIDs(n.cids)})}))}ownsElement(i){let e=i.closest(Sf);return i.getAttribute(yf)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,n,r={}){le.putPrivate(i,qb,!0);let o=this.liveSocket.binding(Kb),s=Array.from(i.elements);s.forEach(a=>le.putPrivate(a,qb,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,n,r,()=>{s.forEach(a=>le.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},XF=class{constructor(i,e,t={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example: import {Socket} from "phoenix" import {LiveSocket} from "phoenix_live_view" let liveSocket = new LiveSocket("/live", Socket, {...}) - `);this.socket=new e(i,t),this.bindingPrefix=t.bindingPrefix||Koe,this.opts=t,this.params=f3(t.params||{}),this.viewLogger=t.viewLogger,this.metadataCallbacks=t.metadata||{},this.defaults=Object.assign(Vb(Goe),t.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=Vb(window.location),this.hooks=t.hooks||{},this.uploaders=t.uploaders||{},this.loaderTimeout=t.loaderTimeout||joe,this.reloadWithJitterTimer=null,this.maxReloads=t.maxReloads||Loe,this.reloadJitterMin=t.reloadJitterMin||Moe,this.reloadJitterMax=t.reloadJitterMax||Doe,this.failsafeJitter=t.failsafeJitter||Noe,this.localStorage=t.localStorage||window.localStorage,this.sessionStorage=t.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:f3(),onBeforeElUpdated:f3()},t.dom||{}),this.transitions=new Cse,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(d3)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(Pb)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(Pb)==="false"}enableDebug(){this.sessionStorage.setItem(Pb,"true")}enableProfiling(){this.sessionStorage.setItem(d3,"true")}disableDebug(){this.sessionStorage.setItem(Pb,"false")}disableProfiling(){this.sessionStorage.removeItem(d3)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(u3,i)}disableLatencySim(){this.sessionStorage.removeItem(u3)}getLatencySim(){let i=this.sessionStorage.getItem(u3);return i?parseInt(i):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let i=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?i():document.addEventListener("DOMContentLoaded",()=>i())}disconnect(i){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(i)}replaceTransport(i){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(i),this.connect()}execJS(i,e,t=null){this.owner(i,n=>Ps.exec(t,e,n,i))}execJSHookPush(i,e,t,n){this.withinOwners(i,r=>{Ps.exec("hook",e,r,i,["push",{data:t,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(i,e){this.domCallbacks[i](...e)}time(i,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(i);let t=e();return console.timeEnd(i),t}log(i,e,t){if(this.viewLogger){let[n,r]=t();this.viewLogger(i,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=t();Qoe(i,e,n,r)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>t(n),r):t(n)})}wrapPush(i,e,t){let n=this.getLatencySim(),r=i.joinCount;if(!n)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===r&&!i.isDestroyed()&&this.reloadWithJitter(i,()=>{this.log(i,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):t();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{i.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),t())},n),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-t+1))+t,o=Ma.updateLocal(this.localStorage,window.location.pathname,jF,0,s=>s+1);o>this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{i.isDestroyed()||i.isConnected()||(i.destroy(),e?e():this.log(i,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(i,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?rse[i.split(".")[1]]:this.hooks[i]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(i){return`${this.getBindingPrefix()}${i}`}channel(i,e){return this.socket.channel(i,e)}joinDeadView(){let i=document.body;if(i&&!this.isPhxView(i)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(i);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let i=!1;return le.all(document,`${Sf}:not([${yf}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(C3)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),Ma.redirect(i,e)}replaceMain(i,e,t=null,n=this.setPendingLink(i)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=le.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,r),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{le.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(()=>t(n)),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||le.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(Zc)!==null}newRootView(i,e,t){let n=new QF(i,this,null,e,t);return this.roots[n.id]=n,n}owner(i,e){let t=Jc(i.closest(Sf),n=>this.getViewByEl(n))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(b1);return Jc(this.getRootById(e),t=>t.getDescendentByEl(i))}getRootById(i){return this.roots[i]}destroyAllViews(){for(let i in this.roots)this.roots[i].destroy(),delete this.roots[i];this.main=null}destroyViewByEl(i){let e=this.getRootById(i.getAttribute(b1));e&&e.id===i.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(i.id)}setActiveElement(i){if(this.activeElement===i)return;this.activeElement=i;let e=()=>{i===this.activeElement&&(this.activeElement=null),i.removeEventListener("mouseup",this),i.removeEventListener("touchend",this)};i.addEventListener("mouseup",e),i.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(i){this.prevActive&&i.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:i}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),i||this.bindNav(),this.bindClicks(),i||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,t,n,r,o,s)=>{let a=r.getAttribute(this.binding(Uoe)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=Re({key:e.key},this.eventMeta(t,e,r));Ps.exec(t,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,n,r,o,s)=>{if(!s){let a=Re({key:e.key},this.eventMeta(t,e,r));Ps.exec(t,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,n,r,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,r);Ps.exec(t,s,n,r,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=Jc(_1(e.target,this.binding(yF)),o=>o.getAttribute(this.binding(yF))),n=t&&document.getElementById(t),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(Or.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(KF,e=>{let t=e.target;if(!le.isUploadInput(t))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);Or.trackFiles(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let n=this.metadataCallbacks[i];return n?n(e,t):{}}setPendingLink(i){return this.linkRef++,this.pendingLink=i,this.linkRef}commitPendingLink(i){return this.linkRef!==i?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(i,e){for(let t in i){let n=i[t];this.on(n,r=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,t,l,r.target,a,null)})}):le.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,d=>{e(r,t,d,l,c,"window")})})})})}}bindClicks(){window.addEventListener("click",i=>this.clickStartedAtTarget=i.target),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(i,e,t){let n=this.binding(e);window.addEventListener(i,r=>{let o=null;if(t)o=r.target.matches(`[${n}]`)?r.target:r.target.querySelector(`[${n}]`);else{let a=this.clickStartedAtTarget||r.target;o=_1(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(n);if(!s){!t&&le.isNewPageClick(r,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&r.preventDefault(),!o.hasAttribute(us)&&this.debounce(o,r,"click",()=>{this.withinOwners(o,a=>{Ps.exec("click",s,a,o,["push",{data:this.eventMeta("click",r,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");le.all(document,`[${t}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(i.target,r=>{let o=n.getAttribute(t);Ps.isVisible(n)&&Ps.exec("click",o,r,n,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!Ma.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{Ma.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:n,root:r,scroll:o}=e.state||{},s=window.location.href;le.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:t==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&n===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{r&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=_1(e.target,o3),n=t&&t.getAttribute(o3);if(!n||!this.isConnected()||!this.main||le.wantsNewTab(e))return;let r=t.href,o=t.getAttribute(Ooe);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(r,o,t);else if(n==="redirect")this.historyRedirect(r,o);else throw new Error(`expected ${o3} to be "patch" or "redirect", got: ${n}`);let s=t.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(t,s,"click"))})},!1)}maybeScroll(i){typeof i=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,i)})}dispatchEvent(i,e={}){le.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){le.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>le.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return Ma.redirect(i);this.withPageLoading({to:i,kind:"patch"},n=>{this.main.pushLinkPatch(i,t,r=>{this.historyPatch(i,e,r),n()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(Ma.pushState(e,{type:"patch",id:this.main.id},i),le.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:i,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return Ma.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:r,host:o}=window.location;i=`${r}//${o}${i}`}let n=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},r=>{this.replaceMain(i,t,o=>{o===this.linkRef&&(Ma.pushState(e,{type:"redirect",id:this.main.id,scroll:n},i),le.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),r()})})}replaceRootHistory(){Ma.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(i){let{pathname:e,search:t}=this.currentLocation;return e+t===i.pathname+i.search?!1:(this.currentLocation=Vb(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit")),r=t.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{le.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit"));if(!n){le.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,r=>{Ps.exec("submit",n,r,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,n=>{let r=this.binding("change"),o=n.target,s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,d=i;i++;let{at:u,type:h}=le.private(o,"prev-iteration")||{};u===d-1&&t!==h||(le.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,n,t,()=>{this.withinOwners(c,p=>{le.putPrivate(o,_3,!0),le.isTextualInput(o)||this.setActiveElement(o),Ps.exec("change",l,p,o,["push",{_target:n.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let n=t.target;le.resetForm(n,this.binding(Kb));let r=Array.from(n.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,n){if(t==="blur"||t==="focusout")return n();let r=this.binding(Boe),o=this.binding(zoe),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);le.debounce(i,e,r,s,o,a,c,()=>{n()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},Cse=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(i=>{clearTimeout(i),this.transitions.delete(i)}),this.flushPendingOps()}after(i){this.size()===0?i():this.pushPendingOp(i)}addTransition(i,e,t){e();let n=setTimeout(()=>{this.transitions.delete(n),t(),this.flushPendingOps()},i);this.transitions.add(n)}pushPendingOp(i){this.pendingOps.push(i)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let i=this.pendingOps.shift();i&&(i(),this.flushPendingOps())}};var ZF="livebook:";function hu(i){try{let e=localStorage.getItem(ZF+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function wf(i,e){try{let t=JSON.stringify(e);localStorage.setItem(ZF+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var eH="app_auth_token:";function tH(i,e){wf(eH+i,e)}function iH(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=hu(eH+e);if(t)return t}return null}var Sse={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{tH(i,e),this.pushEvent("app_auth_persisted")})}},nH=Sse;function vt(i,e,t=null){if(!i.hasAttribute(e))throw new Error(`Missing attribute '${e}' on element <${i.tagName}:${i.id}>`);let n=i.getAttribute(e);return t?t(n):n}function Wi(i,e,t,n=null){if(i.hasAttribute(e)){let r=i.getAttribute(e);return n?n(r):r}else return t}function Rl(i){if(i==="true")return!0;if(i==="false")return!1;throw new Error(`Invalid boolean attribute ${i}, should be either "true" or "false"`)}function hs(i){let e=parseInt(i,10);if(Number.isNaN(e))throw new Error(`Invalid integer value ${i}`);return e}var hH=Fi(aH()),fH=Fi(cH()),w3=Fi(uH());function Zb(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function ed(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function x3(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function xf(i){return i.offsetParent===null}function E3(i){return!xf(i)&&x3(i)}function pH(i,e,t){return Math.min(Math.max(i,e),t)}function mH(i){let e=window.getComputedStyle(i),t=parseInt(e.lineHeight,10);if(Number.isNaN(t)){let n=i.cloneNode();n.innerHTML="
",i.appendChild(n);let r=n.clientHeight;n.innerHTML="

";let o=n.clientHeight;return i.removeChild(n),o-r}else return t}function gH(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function td(i){let{height:e}=i.getBoundingClientRect();e":">",'"':""","'":"'"};function wH(i){return(i||"").replace(/[&<>"']/g,e=>wse[e])}function n4(i){let e="",t=new Uint8Array(i),n=t.byteLength;for(let r=0;r{i?this.updatePreview({data:this.decodeAudio(Ef(i.data)),numChannels:i.num_channels,samplingRate:i.sampling_rate}):this.clearPreview()}),this.uploadButton.addEventListener("click",i=>{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...T3)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...T3)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...T3)}),this.recordButton.addEventListener("click",i=>{this.startRecording()}),this.stopButton.addEventListener("click",i=>{this.stopRecording()}),this.cancelButton.addEventListener("click",i=>{this.stopRecording(!1)})},updated(){this.props=this.getProps()},getProps(){return{id:vt(this.el,"data-id"),phxTarget:vt(this.el,"data-phx-target",hs),samplingRate:vt(this.el,"data-sampling-rate",hs),endianness:vt(this.el,"data-endianness"),format:vt(this.el,"data-format")}},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{this.mediaRecorder=new MediaRecorder(i),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(i=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),i&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(i){let e=new FileReader;e.onload=t=>{this.loadEncodedAudio(t.target.result)},e.readAsArrayBuffer(i)},loadEncodedAudio(i){new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(i,t=>{let n=Ese(t);this.pushAudio(n)})},updatePreview(i){let e=this.audioEl.src,t=Tse(i);this.audioEl.src=URL.createObjectURL(t),e&&URL.revokeObjectURL(e)},clearPreview(){let i=this.audioEl.src;this.audioEl.src="",i&&URL.revokeObjectURL(i)},pushAudio(i){this.pushEventTo(this.props.phxTarget,"change",{data:n4(this.encodeAudio(i)),num_channels:i.numChannels,sampling_rate:i.samplingRate})},encodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i.data);if(this.props.format==="wav")return xH(i.data,i.numChannels,i.samplingRate)},decodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i);if(this.props.format==="wav")return kse(i)},fixEndianness32(i){if(Ise()===this.props.endianness)return i;for(let e=0;e=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var o4,Lse="http://www.w3.org/1999/xhtml",uo=typeof document=="undefined"?void 0:document,Mse=!!uo&&"content"in uo.createElement("template"),Dse=!!uo&&uo.createRange&&"createContextualFragment"in uo.createRange();function Nse(i){var e=uo.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Rse(i){o4||(o4=uo.createRange(),o4.selectNode(uo.body));var e=o4.createContextualFragment(i);return e.childNodes[0]}function Ose(i){var e=uo.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Pse(i){return i=i.trim(),Mse?Nse(i):Dse?Rse(i):Ose(i)}function s4(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function Fse(i,e){return!e||e===Lse?uo.createElement(i):uo.createElementNS(e,i)}function Hse(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function k3(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var kH={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}k3(i,e,"selected")},INPUT:function(i,e){k3(i,e,"checked"),k3(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},C1=1,IH=11,AH=3,LH=8;function id(){}function Bse(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function zse(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=uo.createElement("html"),n.innerHTML=o}else n=Pse(n);else n.nodeType===IH&&(n=n.firstElementChild);var s=r.getNodeKey||Bse,a=r.onBeforeNodeAdded||id,l=r.onNodeAdded||id,c=r.onBeforeElUpdated||id,d=r.onElUpdated||id,u=r.onBeforeNodeDiscarded||id,h=r.onNodeDiscarded||id,p=r.onBeforeElChildrenUpdated||id,m=r.skipFromChildren||id,g=r.addChild||function(ye,_e){return ye.appendChild(_e)},b=r.childrenOnly===!0,S=Object.create(null),k=[];function N(ye){k.push(ye)}function A(ye,_e){if(ye.nodeType===C1)for(var $=ye.firstChild;$;){var Q=void 0;_e&&(Q=s($))?N(Q):(h($),$.firstChild&&A($,_e)),$=$.nextSibling}}function H(ye,_e,$){u(ye)!==!1&&(_e&&_e.removeChild(ye),h(ye),A(ye,$))}function K(ye){if(ye.nodeType===C1||ye.nodeType===IH)for(var _e=ye.firstChild;_e;){var $=s(_e);$&&(S[$]=_e),K(_e),_e=_e.nextSibling}}K(t);function W(ye){l(ye);for(var _e=ye.firstChild;_e;){var $=_e.nextSibling,Q=s(_e);if(Q){var ie=S[Q];ie&&s4(_e,ie)?(_e.parentNode.replaceChild(ie,_e),ae(ie,_e)):W(_e)}else W(_e);_e=$}}function re(ye,_e,$){for(;_e;){var Q=_e.nextSibling;($=s(_e))?N($):H(_e,ye,!0),_e=Q}}function ae(ye,_e,$){var Q=s(_e);Q&&delete S[Q],!(!$&&(c(ye,_e)===!1||(i(ye,_e),d(ye),p(ye,_e)===!1)))&&(ye.nodeName!=="TEXTAREA"?Ne(ye,_e):kH.TEXTAREA(ye,_e))}function Ne(ye,_e){var $=m(ye),Q=_e.firstChild,ie=ye.firstChild,de,$t,Xt,Qt,pi;e:for(;Q;){for(Qt=Q.nextSibling,de=s(Q);!$&&ie;){if(Xt=ie.nextSibling,Q.isSameNode&&Q.isSameNode(ie)){Q=Qt,ie=Xt;continue e}$t=s(ie);var Gi=ie.nodeType,ai=void 0;if(Gi===Q.nodeType&&(Gi===C1?(de?de!==$t&&((pi=S[de])?Xt===pi?ai=!1:(ye.insertBefore(pi,ie),$t?N($t):H(ie,ye,!0),ie=pi):ai=!1):$t&&(ai=!1),ai=ai!==!1&&s4(ie,Q),ai&&ae(ie,Q)):(Gi===AH||Gi==LH)&&(ai=!0,ie.nodeValue!==Q.nodeValue&&(ie.nodeValue=Q.nodeValue))),ai){Q=Qt,ie=Xt;continue e}$t?N($t):H(ie,ye,!0),ie=Xt}if(de&&(pi=S[de])&&s4(pi,Q))$||g(ye,pi),ae(pi,Q);else{var $i=a(Q);$i!==!1&&($i&&(Q=$i),Q.actualize&&(Q=Q.actualize(ye.ownerDocument||uo)),g(ye,Q),W(Q))}Q=Qt,ie=Xt}re(ye,ie,$t);var nn=kH[ye.nodeName];nn&&nn(ye,_e)}var he=t,Xe=he.nodeType,st=n.nodeType;if(!b){if(Xe===C1)st===C1?s4(t,n)||(h(t),he=Hse(t,Fse(n.nodeName,n.namespaceURI))):he=n;else if(Xe===AH||Xe===LH){if(st===Xe)return he.nodeValue!==n.nodeValue&&(he.nodeValue=n.nodeValue),he;he=n}}if(he===n)h(t);else{if(n.isSameNode&&n.isSameNode(he))return;if(ae(he,n,b),k)for(var rt=0,Nt=k.length;rts.length,l;a&&s.push(r);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return r(d)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){t||(t=!0,e(s,...a))}function o(s){r(null,s)}}var qH=Fi(A3(),1);var Xr=class extends Error{constructor(e,t,n){let r=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(n=t,t=void 0),typeof n=="string"){let s=n.indexOf(":");s===-1?r[1]=n:(r[0]=n.slice(0,s),r[1]=n.slice(s+1))}t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=FN(t)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack=typeof e=="object"?e.stack:"",this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.source=r[0],this.ruleId=r[1],this.position=o,this.actual,this.expected,this.file,this.url,this.note}};Xr.prototype.file="";Xr.prototype.name="";Xr.prototype.reason="";Xr.prototype.message="";Xr.prototype.stack="";Xr.prototype.fatal=null;Xr.prototype.column=null;Xr.prototype.line=null;Xr.prototype.source=null;Xr.prototype.ruleId=null;Xr.prototype.position=null;var Fs={basename:jse,dirname:Vse,extname:Kse,join:qse,sep:"/"};function jse(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');w1(i);let t=0,n=-1,r=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let s=-1,a=e.length-1;for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(i.charCodeAt(r)===e.charCodeAt(a--)?a<0&&(n=r):(a=-1,n=s));return t===n?n=s:n<0&&(n=i.length),i.slice(t,n)}function Vse(i){if(w1(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.charCodeAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.charCodeAt(0)===47?"/":".":e===1&&i.charCodeAt(0)===47?"//":i.slice(0,e)}function Kse(i){w1(i);let e=i.length,t=-1,n=0,r=-1,o=0,s;for(;e--;){let a=i.charCodeAt(e);if(a===47){if(s){n=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||t<0||o===0||o===1&&r===t-1&&r===n+1?"":i.slice(r,t)}function qse(...i){let e=-1,t;for(;++e0&&i.charCodeAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function $se(i,e){let t="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),r=s,o=0;continue}}else if(t.length>0){t="",n=0,r=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(r+1,s):t=i.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function w1(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var jH={cwd:Yse};function Yse(){return"/"}function Tf(i){return i!==null&&typeof i=="object"&&i.href&&i.origin}function VH(i){if(typeof i=="string")i=new URL(i);else if(!Tf(i)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Xse(i)}function Xse(i){if(i.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=i.pathname,t=-1;for(;++t{if(K||!W||!re)H(K);else{let ae=o.stringify(W,re);ae==null||(Zse(ae)?re.value=ae:re.result=ae),H(K,re)}});function H(K,W){K||!W?N(K):k?k(W):b(null,W)}}}function m(g){let b;o.freeze(),N3("processSync",o.Parser),R3("processSync",o.Compiler);let S=E1(g);return o.process(S,k),YH("processSync","process",b),S;function k(N){b=!0,I3(N)}}}function GH(i,e){return typeof i=="function"&&i.prototype&&(Qse(i.prototype)||e in i.prototype)}function Qse(i){let e;for(e in i)if(QH.call(i,e))return!0;return!1}function N3(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Parser`")}function R3(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Compiler`")}function O3(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $H(i){if(!S1(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function YH(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function E1(i){return Jse(i)?i:new x1(i)}function Jse(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function Zse(i){return typeof i=="string"||(0,XH.default)(i)}function c4(i){Object.assign(this,{Parser:t=>{let n=this.data("settings");return jN(t,Object.assign({},n,i,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var eae={tokenize:rae,partial:!0},eB={tokenize:oae,partial:!0},tB={tokenize:sae,partial:!0},kf={tokenize:lae,partial:!0},iB={tokenize:aae,partial:!0},nB={tokenize:iae,previous:sB},rB={tokenize:nae,previous:B3},Pl={tokenize:tae,previous:aB},Na={},F3={text:Na},fu=48;for(;fu<123;)Na[fu]=Pl,fu++,fu===58?fu=65:fu===91&&(fu=97);Na[43]=Pl;Na[45]=Pl;Na[46]=Pl;Na[95]=Pl;Na[72]=[Pl,rB];Na[104]=[Pl,rB];Na[87]=[Pl,nB];Na[119]=[Pl,nB];function tae(i,e,t){let n=this,r,o;return s;function s(p){return!ZH(p)||!aB(n.previous)||z3(n.events)?t(p):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(p))}function a(p){return ZH(p)?(i.consume(p),a):p===64?(i.consume(p),l):t(p)}function l(p){return p===46?i.check(kf,h,c)(p):p===45||p===95?i.check(kf,t,d)(p):qh(p)?(!o&&BN(p)&&(o=!0),i.consume(p),l):h(p)}function c(p){return i.consume(p),r=!0,o=void 0,l}function d(p){return i.consume(p),u}function u(p){return p===46?i.check(kf,t,c)(p):l(p)}function h(p){return r&&!o?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(p)):t(p)}}function iae(i,e,t){let n=this;return r;function r(s){return s!==87&&s!==119||!sB(n.previous)||z3(n.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(eae,i.attempt(eB,i.attempt(tB,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function nae(i,e,t){let n=this;return r;function r(m){return m!==72&&m!==104||!B3(n.previous)||z3(n.events)?t(m):(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),i.consume(m),o)}function o(m){return m===84||m===116?(i.consume(m),s):t(m)}function s(m){return m===84||m===116?(i.consume(m),a):t(m)}function a(m){return m===80||m===112?(i.consume(m),l):t(m)}function l(m){return m===83||m===115?(i.consume(m),c):c(m)}function c(m){return m===58?(i.consume(m),d):t(m)}function d(m){return m===47?(i.consume(m),u):t(m)}function u(m){return m===47?(i.consume(m),h):t(m)}function h(m){return m===null||YS(m)||xm(m)||Em(m)?t(m):i.attempt(eB,i.attempt(tB,p),t)(m)}function p(m){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(m)}}function rae(i,e,t){return n;function n(l){return i.consume(l),r}function r(l){return l===87||l===119?(i.consume(l),o):t(l)}function o(l){return l===87||l===119?(i.consume(l),s):t(l)}function s(l){return l===46?(i.consume(l),a):t(l)}function a(l){return l===null||fn(l)?t(l):e(l)}}function oae(i,e,t){let n,r;return o;function o(l){return l===38?i.check(iB,a,s)(l):l===46||l===95?i.check(kf,a,s)(l):l===null||YS(l)||xm(l)||l!==45&&Em(l)?a(l):(i.consume(l),o)}function s(l){return l===46?(r=n,n=void 0,i.consume(l),o):(l===95&&(n=!0),i.consume(l),o)}function a(l){return!r&&!n?e(l):t(l)}}function sae(i,e){let t=0;return n;function n(s){return s===38?i.check(iB,e,r)(s):(s===40&&t++,s===41?i.check(kf,o,r)(s):H3(s)?e(s):oB(s)?i.check(kf,e,r)(s):(i.consume(s),n))}function r(s){return i.consume(s),n}function o(s){return t--,t<0?e(s):r(s)}}function aae(i,e,t){return n;function n(s){return i.consume(s),r}function r(s){return $S(s)?(i.consume(s),r):s===59?(i.consume(s),o):t(s)}function o(s){return H3(s)?e(s):t(s)}}function lae(i,e,t){return n;function n(o){return i.consume(o),r}function r(o){return oB(o)?(i.consume(o),r):H3(o)?e(o):t(o)}}function oB(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===95||i===126}function H3(i){return i===null||i===60||Jo(i)}function ZH(i){return i===43||i===45||i===46||i===95||qh(i)}function sB(i){return i===null||i===40||i===42||i===95||i===126||Jo(i)}function B3(i){return i===null||!$S(i)}function aB(i){return i!==47&&B3(i)}function z3(i){let e=i.length,t=!1;for(;e--;){let n=i[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){t=!0;break}if(n._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var cae={'"':"quot","&":"amp","<":"lt",">":"gt"};function lB(i){return i.replace(/["&<>]/g,e);function e(t){return"&"+cae[t]+";"}}function d4(i,e){let t=lB(dae(i||""));if(!e)return t;let n=t.indexOf(":"),r=t.indexOf("?"),o=t.indexOf("#"),s=t.indexOf("/");return n<0||s>-1&&n>s||r>-1&&n>r||o>-1&&n>o||e.test(t.slice(0,n))?t:""}function dae(i){let e=[],t=-1,n=0,r=0;for(;++t55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(n,t),encodeURIComponent(s)),n=t+r+1,s=""),r&&(t+=r,r=0)}return e.join("")+i.slice(n)}var uae={tokenize:_ae,partial:!0};function U3(){return{document:{91:{tokenize:mae,continuation:{tokenize:gae},exit:vae}},text:{91:{tokenize:pae},93:{add:"after",tokenize:hae,resolveTo:fae}}}}function hae(i,e,t){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;r--;){let l=n.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let c=Yd(n.sliceSerialize({start:s.end,end:n.now()}));return c.charCodeAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function fae(i,e){let t=i.length,n;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){n=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},i[i.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[i[t+1],i[t+2],["enter",r,e],i[t+3],i[t+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],i[i.length-2],i[i.length-1],["exit",r,e]];return i.splice(t,i.length-t+1,...l),i}function pae(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(h){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?t(h):(i.enter("gfmFootnoteCallMarker"),i.consume(h),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(h){let p;return h===null||h===91||o++>999?t(h):h===93?s?(i.exit("chunkString"),p=i.exit("gfmFootnoteCallString"),r.includes(Yd(n.sliceSerialize(p)))?u(h):t(h)):t(h):(i.consume(h),Jo(h)||(s=!0),h===92?d:c)}function d(h){return h===91||h===92||h===93?(i.consume(h),o++,c):c(h)}function u(h){return i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e}}function mae(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(g){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),d):t(g)}function d(g){let b;return g===null||g===91||s>999?t(g):g===93?a?(b=i.exit("gfmFootnoteDefinitionLabelString"),o=Yd(n.sliceSerialize(b)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),p):t(g):fn(g)?(i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),s++,d):(i.enter("chunkString").contentType="string",u(g))}function u(g){return g===null||fn(g)||g===91||g===93||s>999?(i.exit("chunkString"),d(g)):(Jo(g)||(a=!0),s++,i.consume(g),g===92?h:u)}function h(g){return g===91||g===92||g===93?(i.consume(g),s++,u):u(g)}function p(g){return g===58?(i.enter("definitionMarker"),i.consume(g),i.exit("definitionMarker"),so(i,m,"gfmFootnoteDefinitionWhitespace")):t(g)}function m(g){return r.includes(o)||r.push(o),e(g)}}function gae(i,e,t){return i.check(UN,e,i.attempt(uae,e,t))}function vae(i){i.exit("gfmFootnoteDefinition")}function _ae(i,e,t){let n=this;return so(i,r,"gfmFootnoteDefinitionIndent",4+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function W3(i={}){let e=i.singleTilde,t={tokenize:r,resolveAll:n};return e==null&&(e=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function n(o,s){let a=-1;for(;++a1?a(p):(o.consume(p),d++,h);if(d<2&&!e)return a(p);let g=o.exit("strikethroughSequenceTemporary"),b=XS(p);return g._open=!b||b===2&&!!m,g._close=!m||m===2&&!!b,s(p)}}}var j3={flow:{null:{tokenize:yae,resolve:bae}}},cB={tokenize:Cae,partial:!0};function bae(i,e){let t=-1,n,r,o,s,a,l,c;for(;++t=4?_e(ie):(n._gfmTableDynamicInterruptHack=!0,Z.check(n.parser.constructs.flow,function($t){return n._gfmTableDynamicInterruptHack=!1,_e($t)},function($t){return n._gfmTableDynamicInterruptHack=!1,ye($t)})(ie))}}}function Cae(i,e,t){let n=0;return r;function r(s){return i.enter("check"),i.consume(s),o}function o(s){return s===-1||s===32?(i.consume(s),n++,n===4?e:o):s===null||Jo(s)?e(s):t(s)}}var Sae={tokenize:wae},V3={text:{91:Sae}};function wae(i,e,t){let n=this;return r;function r(a){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(a):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),o)}function o(a){return Jo(a)?(i.enter("taskListCheckValueUnchecked"),i.consume(a),i.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(i.enter("taskListCheckValueChecked"),i.consume(a),i.exit("taskListCheckValueChecked"),s):t(a)}function s(a){return a===93?(i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),i.check({tokenize:xae},e,t)):t(a)}}function xae(i,e,t){let n=this;return so(i,r,"whitespace");function r(o){let s=n.events[n.events.length-1];return(s&&s[1].type==="whitespace"||fn(o))&&o!==null?e(o):t(o)}}function dB(i){return HN([F3,U3(),W3(i),j3,V3])}function If(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length);return n}function K3(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var yr=function(i){if(i==null)return Iae;if(typeof i=="string")return kae(i);if(typeof i=="object")return Array.isArray(i)?Eae(i):Tae(i);if(typeof i=="function")return u4(i);throw new Error("Expected function, string, or object as test")};function Eae(i){let e=[],t=-1;for(;++t":""))+")"})),h;function h(){var p=[],m,g,b;if((!e||r(a,l,c[c.length-1]||null))&&(p=Aae(t(a,c)),p[0]===q3))return p;if(a.children&&p[0]!==hB)for(g=(n?a.children.length:-1)+o,b=c.concat(a);g>-1&&g0?{type:"text",value:A}:void 0),A!==!1&&(g!==k&&S.push({type:"text",value:u.value.slice(g,k)}),Array.isArray(A)?S.push(...A):A&&S.push(A),g=k+N[0].length),!p.global)break;N=p.exec(u.value)}return k===void 0?(S=[u],b--):(gi}var G3="phrasing",$3=["autolink","link","image","label"],gB={transforms:[Fae],enter:{literalAutolink:Dae,literalAutolinkEmail:Y3,literalAutolinkHttp:Y3,literalAutolinkWww:Y3},exit:{literalAutolink:Pae,literalAutolinkEmail:Oae,literalAutolinkHttp:Nae,literalAutolinkWww:Rae}},vB={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:G3,notInConstruct:$3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:G3,notInConstruct:$3},{character:":",before:"[ps]",after:"\\/",inConstruct:G3,notInConstruct:$3}]};function Dae(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function Y3(i){this.config.enter.autolinkProtocol.call(this,i)}function Nae(i){this.config.exit.autolinkProtocol.call(this,i)}function Rae(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(i)}function Oae(i){this.config.exit.autolinkEmail.call(this,i)}function Pae(i){this.exit(i)}function Fae(i){mB(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Hae],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Bae]],{ignore:["link","linkReference"]})}function Hae(i,e,t,n,r){let o="";if(!_B(r)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!zae(t)))return!1;let s=Uae(t+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Bae(i,e,t,n){return!_B(n,!0)||/[_-\d]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function zae(i){let e=i.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function Uae(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i),t,n,r,o;if(e)for(i=i.slice(0,e.index),o=e[0],t=o.indexOf(")"),n=If(i,"("),r=If(i,")");t!==-1&&n>r;)i+=o.slice(0,t+1),o=o.slice(t+1),t=o.indexOf(")"),r++;return[i,o]}function _B(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||xm(t)||Em(t))&&(!e||t!==47)}function X3(i){return i.label||!i.identifier?i.label||"":WN(i.identifier)}function Fr(i){let e=i||{},t=e.now||{},n=e.lineShift||0,r=t.line||1,o=t.column||1;return{move:l,current:s,shift:a};function s(){return{now:{line:r,column:o},lineShift:n}}function a(c){n+=c}function l(c=""){let d=c.split(/\r?\n|\r/g),u=d[d.length-1];return r+=d.length-1,o=d.length===1?o+u.length:1+u.length+n,c}}function f4(i,e,t){let n=e.indexStack,r=i.children||[],o=Fr(t),s=[],a=-1;for(n.push(-1);++a{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(c3)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(Ob)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(Ob)==="false"}enableDebug(){this.sessionStorage.setItem(Ob,"true")}enableProfiling(){this.sessionStorage.setItem(c3,"true")}disableDebug(){this.sessionStorage.setItem(Ob,"false")}disableProfiling(){this.sessionStorage.removeItem(c3)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(d3,i)}disableLatencySim(){this.sessionStorage.removeItem(d3)}getLatencySim(){let i=this.sessionStorage.getItem(d3);return i?parseInt(i):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let i=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?i():document.addEventListener("DOMContentLoaded",()=>i())}disconnect(i){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(i)}replaceTransport(i){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(i),this.connect()}execJS(i,e,t=null){this.owner(i,n=>Ps.exec(t,e,n,i))}execJSHookPush(i,e,t,n){this.withinOwners(i,r=>{Ps.exec("hook",e,r,i,["push",{data:t,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(i,e){this.domCallbacks[i](...e)}time(i,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(i);let t=e();return console.timeEnd(i),t}log(i,e,t){if(this.viewLogger){let[n,r]=t();this.viewLogger(i,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=t();Zoe(i,e,n,r)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>t(n),r):t(n)})}wrapPush(i,e,t){let n=this.getLatencySim(),r=i.joinCount;if(!n)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===r&&!i.isDestroyed()&&this.reloadWithJitter(i,()=>{this.log(i,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):t();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{i.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),t())},n),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-t+1))+t,o=Ma.updateLocal(this.localStorage,window.location.pathname,UF,0,s=>s+1);o>this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{i.isDestroyed()||i.isConnected()||(i.destroy(),e?e():this.log(i,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(i,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?sse[i.split(".")[1]]:this.hooks[i]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(i){return`${this.getBindingPrefix()}${i}`}channel(i,e){return this.socket.channel(i,e)}joinDeadView(){let i=document.body;if(i&&!this.isPhxView(i)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(i);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let i=!1;return le.all(document,`${Sf}:not([${yf}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(b3)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),Ma.redirect(i,e)}replaceMain(i,e,t=null,n=this.setPendingLink(i)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=le.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,r),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{le.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(()=>t(n)),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||le.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(ed)!==null}newRootView(i,e,t){let n=new YF(i,this,null,e,t);return this.roots[n.id]=n,n}owner(i,e){let t=Jc(i.closest(Sf),n=>this.getViewByEl(n))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(_1);return Jc(this.getRootById(e),t=>t.getDescendentByEl(i))}getRootById(i){return this.roots[i]}destroyAllViews(){for(let i in this.roots)this.roots[i].destroy(),delete this.roots[i];this.main=null}destroyViewByEl(i){let e=this.getRootById(i.getAttribute(_1));e&&e.id===i.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(i.id)}setActiveElement(i){if(this.activeElement===i)return;this.activeElement=i;let e=()=>{i===this.activeElement&&(this.activeElement=null),i.removeEventListener("mouseup",this),i.removeEventListener("touchend",this)};i.addEventListener("mouseup",e),i.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(i){this.prevActive&&i.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:i}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),i||this.bindNav(),this.bindClicks(),i||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,t,n,r,o,s)=>{let a=r.getAttribute(this.binding(joe)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=Re({key:e.key},this.eventMeta(t,e,r));Ps.exec(t,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,n,r,o,s)=>{if(!s){let a=Re({key:e.key},this.eventMeta(t,e,r));Ps.exec(t,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,n,r,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,r);Ps.exec(t,s,n,r,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=Jc(v1(e.target,this.binding(_F)),o=>o.getAttribute(this.binding(_F))),n=t&&document.getElementById(t),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(yr.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(jF,e=>{let t=e.target;if(!le.isUploadInput(t))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);yr.trackFiles(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let n=this.metadataCallbacks[i];return n?n(e,t):{}}setPendingLink(i){return this.linkRef++,this.pendingLink=i,this.linkRef}commitPendingLink(i){return this.linkRef!==i?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(i,e){for(let t in i){let n=i[t];this.on(n,r=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,t,l,r.target,a,null)})}):le.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,d=>{e(r,t,d,l,c,"window")})})})})}}bindClicks(){window.addEventListener("click",i=>this.clickStartedAtTarget=i.target),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(i,e,t){let n=this.binding(e);window.addEventListener(i,r=>{let o=null;if(t)o=r.target.matches(`[${n}]`)?r.target:r.target.querySelector(`[${n}]`);else{let a=this.clickStartedAtTarget||r.target;o=v1(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(n);if(!s){!t&&le.isNewPageClick(r,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&r.preventDefault(),!o.hasAttribute(hs)&&this.debounce(o,r,"click",()=>{this.withinOwners(o,a=>{Ps.exec("click",s,a,o,["push",{data:this.eventMeta("click",r,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");le.all(document,`[${t}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(i.target,r=>{let o=n.getAttribute(t);Ps.isVisible(n)&&Ps.exec("click",o,r,n,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!Ma.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{Ma.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:n,root:r,scroll:o}=e.state||{},s=window.location.href;le.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:t==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&n===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{r&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=v1(e.target,r3),n=t&&t.getAttribute(r3);if(!n||!this.isConnected()||!this.main||le.wantsNewTab(e))return;let r=t.href,o=t.getAttribute(Foe);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(r,o,t);else if(n==="redirect")this.historyRedirect(r,o);else throw new Error(`expected ${r3} to be "patch" or "redirect", got: ${n}`);let s=t.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(t,s,"click"))})},!1)}maybeScroll(i){typeof i=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,i)})}dispatchEvent(i,e={}){le.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){le.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>le.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return Ma.redirect(i);this.withPageLoading({to:i,kind:"patch"},n=>{this.main.pushLinkPatch(i,t,r=>{this.historyPatch(i,e,r),n()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(Ma.pushState(e,{type:"patch",id:this.main.id},i),le.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:i,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return Ma.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:r,host:o}=window.location;i=`${r}//${o}${i}`}let n=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},r=>{this.replaceMain(i,t,o=>{o===this.linkRef&&(Ma.pushState(e,{type:"redirect",id:this.main.id,scroll:n},i),le.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),r()})})}replaceRootHistory(){Ma.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(i){let{pathname:e,search:t}=this.currentLocation;return e+t===i.pathname+i.search?!1:(this.currentLocation=Vb(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit")),r=t.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{le.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit"));if(!n){le.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,r=>{Ps.exec("submit",n,r,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,n=>{let r=this.binding("change"),o=n.target,s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,d=i;i++;let{at:u,type:h}=le.private(o,"prev-iteration")||{};u===d-1&&t==="change"&&h==="input"||(le.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,n,t,()=>{this.withinOwners(c,p=>{le.putPrivate(o,g3,!0),le.isTextualInput(o)||this.setActiveElement(o),Ps.exec("change",l,p,o,["push",{_target:n.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let n=t.target;le.resetForm(n,this.binding(Kb));let r=Array.from(n.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,n){if(t==="blur"||t==="focusout")return n();let r=this.binding(Uoe),o=this.binding(Woe),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);le.debounce(i,e,r,s,o,a,c,()=>{n()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},wse=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(i=>{clearTimeout(i),this.transitions.delete(i)}),this.flushPendingOps()}after(i){this.size()===0?i():this.pushPendingOp(i)}addTransition(i,e,t){e();let n=setTimeout(()=>{this.transitions.delete(n),t(),this.flushPendingOps()},i);this.transitions.add(n)}pushPendingOp(i){this.pendingOps.push(i)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let i=this.pendingOps.shift();i&&(i(),this.flushPendingOps())}};var QF="livebook:";function hu(i){try{let e=localStorage.getItem(QF+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function wf(i,e){try{let t=JSON.stringify(e);localStorage.setItem(QF+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var JF="app_auth_token:";function ZF(i,e){wf(JF+i,e)}function eH(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=hu(JF+e);if(t)return t}return null}var xse={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{ZF(i,e),this.pushEvent("app_auth_persisted")})}},tH=xse;function vt(i,e,t=null){if(!i.hasAttribute(e))throw new Error(`Missing attribute '${e}' on element <${i.tagName}:${i.id}>`);let n=i.getAttribute(e);return t?t(n):n}function _i(i,e,t,n=null){if(i.hasAttribute(e)){let r=i.getAttribute(e);return n?n(r):r}else return t}function Ol(i){if(i==="true")return!0;if(i==="false")return!1;throw new Error(`Invalid boolean attribute ${i}, should be either "true" or "false"`)}function uo(i){let e=parseInt(i,10);if(Number.isNaN(e))throw new Error(`Invalid integer value ${i}`);return e}function iH(i,e,t){let r=new ArrayBuffer(44+i.byteLength),o=new DataView(r),s=i.byteLength/4,a=4,l=e*a,c=t*l,d=s*l,u=0;function h(S){o.setUint32(u,S,!1),u+=4}function p(S){o.setUint32(u,S,!0),u+=4}function m(S){o.setUint16(u,S,!0),u+=2}function g(S){o.setFloat32(u,S,!0),u+=4}h(1380533830),p(36+d),h(1463899717),h(1718449184),p(16),m(3),m(e),p(t),p(c),m(l),m(a*8),h(1684108385),p(d);let b=new Float32Array(i);for(let S=0;S{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...C3)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...C3)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...C3)}),this.recordButton.addEventListener("click",i=>{this.startRecording()}),this.stopButton.addEventListener("click",i=>{this.stopRecording()}),this.cancelButton.addEventListener("click",i=>{this.stopRecording(!1)})},updated(){this.props=this.getProps(),this.audioEl.src=this.props.audioUrl},getProps(){return{id:vt(this.el,"data-id"),phxTarget:vt(this.el,"data-phx-target",uo),samplingRate:vt(this.el,"data-sampling-rate",uo),endianness:vt(this.el,"data-endianness"),format:vt(this.el,"data-format"),audioUrl:_i(this.el,"data-audio-url",null)}},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{this.mediaRecorder=new MediaRecorder(i),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(i=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),i&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(i){let e=new FileReader;e.onload=t=>{this.loadEncodedAudio(t.target.result)},e.readAsArrayBuffer(i)},loadEncodedAudio(i){this.pushEventTo(this.props.phxTarget,"decoding",{}),new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(i,t=>{let n=Tse(t);this.pushAudio(n)})},pushAudio(i){let e={num_channels:i.numChannels,sampling_rate:i.samplingRate},t=this.encodeAudio(i),n=new Blob([t]);n.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[n])},encodeAudio(i){if(this.props.format==="pcm_f32")return kse(i.data,this.props.endianness);if(this.props.format==="wav")return iH(i.data,i.numChannels,i.samplingRate)}};function Tse(i){let e=i.numberOfChannels,t=i.sampleRate,n=i.length,r=4*e*n,o=new ArrayBuffer(r),s=new Float32Array(o);for(let a=0;a=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var $b,Lse="http://www.w3.org/1999/xhtml",ho=typeof document=="undefined"?void 0:document,Mse=!!ho&&"content"in ho.createElement("template"),Dse=!!ho&&ho.createRange&&"createContextualFragment"in ho.createRange();function Nse(i){var e=ho.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Rse(i){$b||($b=ho.createRange(),$b.selectNode(ho.body));var e=$b.createContextualFragment(i);return e.childNodes[0]}function Ose(i){var e=ho.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Pse(i){return i=i.trim(),Mse?Nse(i):Dse?Rse(i):Ose(i)}function Yb(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function Fse(i,e){return!e||e===Lse?ho.createElement(i):ho.createElementNS(e,i)}function Hse(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function S3(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var aH={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}S3(i,e,"selected")},INPUT:function(i,e){S3(i,e,"checked"),S3(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},y1=1,lH=11,cH=3,dH=8;function td(){}function Bse(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function zse(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=ho.createElement("html"),n.innerHTML=o}else n=Pse(n);else n.nodeType===lH&&(n=n.firstElementChild);var s=r.getNodeKey||Bse,a=r.onBeforeNodeAdded||td,l=r.onNodeAdded||td,c=r.onBeforeElUpdated||td,d=r.onElUpdated||td,u=r.onBeforeNodeDiscarded||td,h=r.onNodeDiscarded||td,p=r.onBeforeElChildrenUpdated||td,m=r.skipFromChildren||td,g=r.addChild||function(ye,ge){return ye.appendChild(ge)},b=r.childrenOnly===!0,S=Object.create(null),k=[];function N(ye){k.push(ye)}function A(ye,ge){if(ye.nodeType===y1)for(var $=ye.firstChild;$;){var Q=void 0;ge&&(Q=s($))?N(Q):(h($),$.firstChild&&A($,ge)),$=$.nextSibling}}function H(ye,ge,$){u(ye)!==!1&&(ge&&ge.removeChild(ye),h(ye),A(ye,$))}function K(ye){if(ye.nodeType===y1||ye.nodeType===lH)for(var ge=ye.firstChild;ge;){var $=s(ge);$&&(S[$]=ge),K(ge),ge=ge.nextSibling}}K(t);function W(ye){l(ye);for(var ge=ye.firstChild;ge;){var $=ge.nextSibling,Q=s(ge);if(Q){var ie=S[Q];ie&&Yb(ge,ie)?(ge.parentNode.replaceChild(ie,ge),ae(ie,ge)):W(ge)}else W(ge);ge=$}}function re(ye,ge,$){for(;ge;){var Q=ge.nextSibling;($=s(ge))?N($):H(ge,ye,!0),ge=Q}}function ae(ye,ge,$){var Q=s(ge);Q&&delete S[Q],!(!$&&(c(ye,ge)===!1||(i(ye,ge),d(ye),p(ye,ge)===!1)))&&(ye.nodeName!=="TEXTAREA"?Ne(ye,ge):aH.TEXTAREA(ye,ge))}function Ne(ye,ge){var $=m(ye),Q=ge.firstChild,ie=ye.firstChild,de,$t,Xt,Qt,pi;e:for(;Q;){for(Qt=Q.nextSibling,de=s(Q);!$&&ie;){if(Xt=ie.nextSibling,Q.isSameNode&&Q.isSameNode(ie)){Q=Qt,ie=Xt;continue e}$t=s(ie);var Gi=ie.nodeType,ai=void 0;if(Gi===Q.nodeType&&(Gi===y1?(de?de!==$t&&((pi=S[de])?Xt===pi?ai=!1:(ye.insertBefore(pi,ie),$t?N($t):H(ie,ye,!0),ie=pi):ai=!1):$t&&(ai=!1),ai=ai!==!1&&Yb(ie,Q),ai&&ae(ie,Q)):(Gi===cH||Gi==dH)&&(ai=!0,ie.nodeValue!==Q.nodeValue&&(ie.nodeValue=Q.nodeValue))),ai){Q=Qt,ie=Xt;continue e}$t?N($t):H(ie,ye,!0),ie=Xt}if(de&&(pi=S[de])&&Yb(pi,Q))$||g(ye,pi),ae(pi,Q);else{var $i=a(Q);$i!==!1&&($i&&(Q=$i),Q.actualize&&(Q=Q.actualize(ye.ownerDocument||ho)),g(ye,Q),W(Q))}Q=Qt,ie=Xt}re(ye,ie,$t);var nn=aH[ye.nodeName];nn&&nn(ye,ge)}var he=t,Xe=he.nodeType,st=n.nodeType;if(!b){if(Xe===y1)st===y1?Yb(t,n)||(h(t),he=Hse(t,Fse(n.nodeName,n.namespaceURI))):he=n;else if(Xe===cH||Xe===dH){if(st===Xe)return he.nodeValue!==n.nodeValue&&(he.nodeValue=n.nodeValue),he;he=n}}if(he===n)h(t);else{if(n.isSameNode&&n.isSameNode(he))return;if(ae(he,n,b),k)for(var rt=0,Nt=k.length;rts.length,l;a&&s.push(r);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return r(d)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){t||(t=!0,e(s,...a))}function o(s){r(null,s)}}var TH=Hi(x3(),1);var Xr=class extends Error{constructor(e,t,n){let r=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(n=t,t=void 0),typeof n=="string"){let s=n.indexOf(":");s===-1?r[1]=n:(r[0]=n.slice(0,s),r[1]=n.slice(s+1))}t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=ON(t)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack=typeof e=="object"?e.stack:"",this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.source=r[0],this.ruleId=r[1],this.position=o,this.actual,this.expected,this.file,this.url,this.note}};Xr.prototype.file="";Xr.prototype.name="";Xr.prototype.reason="";Xr.prototype.message="";Xr.prototype.stack="";Xr.prototype.fatal=null;Xr.prototype.column=null;Xr.prototype.line=null;Xr.prototype.source=null;Xr.prototype.ruleId=null;Xr.prototype.position=null;var Fs={basename:jse,dirname:Vse,extname:Kse,join:qse,sep:"/"};function jse(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');S1(i);let t=0,n=-1,r=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let s=-1,a=e.length-1;for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(i.charCodeAt(r)===e.charCodeAt(a--)?a<0&&(n=r):(a=-1,n=s));return t===n?n=s:n<0&&(n=i.length),i.slice(t,n)}function Vse(i){if(S1(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.charCodeAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.charCodeAt(0)===47?"/":".":e===1&&i.charCodeAt(0)===47?"//":i.slice(0,e)}function Kse(i){S1(i);let e=i.length,t=-1,n=0,r=-1,o=0,s;for(;e--;){let a=i.charCodeAt(e);if(a===47){if(s){n=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||t<0||o===0||o===1&&r===t-1&&r===n+1?"":i.slice(r,t)}function qse(...i){let e=-1,t;for(;++e0&&i.charCodeAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function $se(i,e){let t="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),r=s,o=0;continue}}else if(t.length>0){t="",n=0,r=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(r+1,s):t=i.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function S1(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var wH={cwd:Yse};function Yse(){return"/"}function xf(i){return i!==null&&typeof i=="object"&&i.href&&i.origin}function xH(i){if(typeof i=="string")i=new URL(i);else if(!xf(i)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Xse(i)}function Xse(i){if(i.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=i.pathname,t=-1;for(;++t{if(K||!W||!re)H(K);else{let ae=o.stringify(W,re);ae==null||(Zse(ae)?re.value=ae:re.result=ae),H(K,re)}});function H(K,W){K||!W?N(K):k?k(W):b(null,W)}}}function m(g){let b;o.freeze(),I3("processSync",o.Parser),A3("processSync",o.Compiler);let S=x1(g);return o.process(S,k),AH("processSync","process",b),S;function k(N){b=!0,w3(N)}}}function kH(i,e){return typeof i=="function"&&i.prototype&&(Qse(i.prototype)||e in i.prototype)}function Qse(i){let e;for(e in i)if(MH.call(i,e))return!0;return!1}function I3(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Parser`")}function A3(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Compiler`")}function L3(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function IH(i){if(!C1(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function AH(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function x1(i){return Jse(i)?i:new w1(i)}function Jse(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function Zse(i){return typeof i=="string"||(0,LH.default)(i)}function Jb(i){Object.assign(this,{Parser:t=>{let n=this.data("settings");return UN(t,Object.assign({},n,i,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var eae={tokenize:rae,partial:!0},RH={tokenize:oae,partial:!0},OH={tokenize:sae,partial:!0},Ef={tokenize:lae,partial:!0},PH={tokenize:aae,partial:!0},FH={tokenize:iae,previous:zH},HH={tokenize:nae,previous:R3},Pl={tokenize:tae,previous:UH},Da={},D3={text:Da},fu=48;for(;fu<123;)Da[fu]=Pl,fu++,fu===58?fu=65:fu===91&&(fu=97);Da[43]=Pl;Da[45]=Pl;Da[46]=Pl;Da[95]=Pl;Da[72]=[Pl,HH];Da[104]=[Pl,HH];Da[87]=[Pl,FH];Da[119]=[Pl,FH];function tae(i,e,t){let n=this,r,o;return s;function s(p){return!NH(p)||!UH(n.previous)||O3(n.events)?t(p):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(p))}function a(p){return NH(p)?(i.consume(p),a):p===64?(i.consume(p),l):t(p)}function l(p){return p===46?i.check(Ef,h,c)(p):p===45||p===95?i.check(Ef,t,d)(p):qh(p)?(!o&&FN(p)&&(o=!0),i.consume(p),l):h(p)}function c(p){return i.consume(p),r=!0,o=void 0,l}function d(p){return i.consume(p),u}function u(p){return p===46?i.check(Ef,t,c)(p):l(p)}function h(p){return r&&!o?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(p)):t(p)}}function iae(i,e,t){let n=this;return r;function r(s){return s!==87&&s!==119||!zH(n.previous)||O3(n.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(eae,i.attempt(RH,i.attempt(OH,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function nae(i,e,t){let n=this;return r;function r(m){return m!==72&&m!==104||!R3(n.previous)||O3(n.events)?t(m):(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),i.consume(m),o)}function o(m){return m===84||m===116?(i.consume(m),s):t(m)}function s(m){return m===84||m===116?(i.consume(m),a):t(m)}function a(m){return m===80||m===112?(i.consume(m),l):t(m)}function l(m){return m===83||m===115?(i.consume(m),c):c(m)}function c(m){return m===58?(i.consume(m),d):t(m)}function d(m){return m===47?(i.consume(m),u):t(m)}function u(m){return m===47?(i.consume(m),h):t(m)}function h(m){return m===null||$S(m)||wm(m)||xm(m)?t(m):i.attempt(RH,i.attempt(OH,p),t)(m)}function p(m){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(m)}}function rae(i,e,t){return n;function n(l){return i.consume(l),r}function r(l){return l===87||l===119?(i.consume(l),o):t(l)}function o(l){return l===87||l===119?(i.consume(l),s):t(l)}function s(l){return l===46?(i.consume(l),a):t(l)}function a(l){return l===null||fn(l)?t(l):e(l)}}function oae(i,e,t){let n,r;return o;function o(l){return l===38?i.check(PH,a,s)(l):l===46||l===95?i.check(Ef,a,s)(l):l===null||$S(l)||wm(l)||l!==45&&xm(l)?a(l):(i.consume(l),o)}function s(l){return l===46?(r=n,n=void 0,i.consume(l),o):(l===95&&(n=!0),i.consume(l),o)}function a(l){return!r&&!n?e(l):t(l)}}function sae(i,e){let t=0;return n;function n(s){return s===38?i.check(PH,e,r)(s):(s===40&&t++,s===41?i.check(Ef,o,r)(s):N3(s)?e(s):BH(s)?i.check(Ef,e,r)(s):(i.consume(s),n))}function r(s){return i.consume(s),n}function o(s){return t--,t<0?e(s):r(s)}}function aae(i,e,t){return n;function n(s){return i.consume(s),r}function r(s){return GS(s)?(i.consume(s),r):s===59?(i.consume(s),o):t(s)}function o(s){return N3(s)?e(s):t(s)}}function lae(i,e,t){return n;function n(o){return i.consume(o),r}function r(o){return BH(o)?(i.consume(o),r):N3(o)?e(o):t(o)}}function BH(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===95||i===126}function N3(i){return i===null||i===60||Zo(i)}function NH(i){return i===43||i===45||i===46||i===95||qh(i)}function zH(i){return i===null||i===40||i===42||i===95||i===126||Zo(i)}function R3(i){return i===null||!GS(i)}function UH(i){return i!==47&&R3(i)}function O3(i){let e=i.length,t=!1;for(;e--;){let n=i[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){t=!0;break}if(n._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var cae={'"':"quot","&":"amp","<":"lt",">":"gt"};function WH(i){return i.replace(/["&<>]/g,e);function e(t){return"&"+cae[t]+";"}}function Zb(i,e){let t=WH(dae(i||""));if(!e)return t;let n=t.indexOf(":"),r=t.indexOf("?"),o=t.indexOf("#"),s=t.indexOf("/");return n<0||s>-1&&n>s||r>-1&&n>r||o>-1&&n>o||e.test(t.slice(0,n))?t:""}function dae(i){let e=[],t=-1,n=0,r=0;for(;++t55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(n,t),encodeURIComponent(s)),n=t+r+1,s=""),r&&(t+=r,r=0)}return e.join("")+i.slice(n)}var uae={tokenize:_ae,partial:!0};function P3(){return{document:{91:{tokenize:mae,continuation:{tokenize:gae},exit:vae}},text:{91:{tokenize:pae},93:{add:"after",tokenize:hae,resolveTo:fae}}}}function hae(i,e,t){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;r--;){let l=n.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let c=Xd(n.sliceSerialize({start:s.end,end:n.now()}));return c.charCodeAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function fae(i,e){let t=i.length,n;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){n=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},i[i.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[i[t+1],i[t+2],["enter",r,e],i[t+3],i[t+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],i[i.length-2],i[i.length-1],["exit",r,e]];return i.splice(t,i.length-t+1,...l),i}function pae(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(h){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?t(h):(i.enter("gfmFootnoteCallMarker"),i.consume(h),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(h){let p;return h===null||h===91||o++>999?t(h):h===93?s?(i.exit("chunkString"),p=i.exit("gfmFootnoteCallString"),r.includes(Xd(n.sliceSerialize(p)))?u(h):t(h)):t(h):(i.consume(h),Zo(h)||(s=!0),h===92?d:c)}function d(h){return h===91||h===92||h===93?(i.consume(h),o++,c):c(h)}function u(h){return i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e}}function mae(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(g){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),d):t(g)}function d(g){let b;return g===null||g===91||s>999?t(g):g===93?a?(b=i.exit("gfmFootnoteDefinitionLabelString"),o=Xd(n.sliceSerialize(b)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(g),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),p):t(g):fn(g)?(i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),s++,d):(i.enter("chunkString").contentType="string",u(g))}function u(g){return g===null||fn(g)||g===91||g===93||s>999?(i.exit("chunkString"),d(g)):(Zo(g)||(a=!0),s++,i.consume(g),g===92?h:u)}function h(g){return g===91||g===92||g===93?(i.consume(g),s++,u):u(g)}function p(g){return g===58?(i.enter("definitionMarker"),i.consume(g),i.exit("definitionMarker"),so(i,m,"gfmFootnoteDefinitionWhitespace")):t(g)}function m(g){return r.includes(o)||r.push(o),e(g)}}function gae(i,e,t){return i.check(BN,e,i.attempt(uae,e,t))}function vae(i){i.exit("gfmFootnoteDefinition")}function _ae(i,e,t){let n=this;return so(i,r,"gfmFootnoteDefinitionIndent",4+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function F3(i={}){let e=i.singleTilde,t={tokenize:r,resolveAll:n};return e==null&&(e=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function n(o,s){let a=-1;for(;++a1?a(p):(o.consume(p),d++,h);if(d<2&&!e)return a(p);let g=o.exit("strikethroughSequenceTemporary"),b=YS(p);return g._open=!b||b===2&&!!m,g._close=!m||m===2&&!!b,s(p)}}}var H3={flow:{null:{tokenize:yae,resolve:bae}}},jH={tokenize:Cae,partial:!0};function bae(i,e){let t=-1,n,r,o,s,a,l,c;for(;++t=4?ge(ie):(n._gfmTableDynamicInterruptHack=!0,Z.check(n.parser.constructs.flow,function($t){return n._gfmTableDynamicInterruptHack=!1,ge($t)},function($t){return n._gfmTableDynamicInterruptHack=!1,ye($t)})(ie))}}}function Cae(i,e,t){let n=0;return r;function r(s){return i.enter("check"),i.consume(s),o}function o(s){return s===-1||s===32?(i.consume(s),n++,n===4?e:o):s===null||Zo(s)?e(s):t(s)}}var Sae={tokenize:wae},B3={text:{91:Sae}};function wae(i,e,t){let n=this;return r;function r(a){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(a):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),o)}function o(a){return Zo(a)?(i.enter("taskListCheckValueUnchecked"),i.consume(a),i.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(i.enter("taskListCheckValueChecked"),i.consume(a),i.exit("taskListCheckValueChecked"),s):t(a)}function s(a){return a===93?(i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),i.check({tokenize:xae},e,t)):t(a)}}function xae(i,e,t){let n=this;return so(i,r,"whitespace");function r(o){let s=n.events[n.events.length-1];return(s&&s[1].type==="whitespace"||fn(o))&&o!==null?e(o):t(o)}}function VH(i){return PN([D3,P3(),F3(i),H3,B3])}function Tf(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length);return n}function z3(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Cr=function(i){if(i==null)return Iae;if(typeof i=="string")return kae(i);if(typeof i=="object")return Array.isArray(i)?Eae(i):Tae(i);if(typeof i=="function")return e5(i);throw new Error("Expected function, string, or object as test")};function Eae(i){let e=[],t=-1;for(;++t":""))+")"})),h;function h(){var p=[],m,g,b;if((!e||r(a,l,c[c.length-1]||null))&&(p=Aae(t(a,c)),p[0]===U3))return p;if(a.children&&p[0]!==qH)for(g=(n?a.children.length:-1)+o,b=c.concat(a);g>-1&&g0?{type:"text",value:A}:void 0),A!==!1&&(g!==k&&S.push({type:"text",value:u.value.slice(g,k)}),Array.isArray(A)?S.push(...A):A&&S.push(A),g=k+N[0].length),!p.global)break;N=p.exec(u.value)}return k===void 0?(S=[u],b--):(gi}var W3="phrasing",j3=["autolink","link","image","label"],XH={transforms:[Fae],enter:{literalAutolink:Dae,literalAutolinkEmail:V3,literalAutolinkHttp:V3,literalAutolinkWww:V3},exit:{literalAutolink:Pae,literalAutolinkEmail:Oae,literalAutolinkHttp:Nae,literalAutolinkWww:Rae}},QH={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:W3,notInConstruct:j3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:W3,notInConstruct:j3},{character:":",before:"[ps]",after:"\\/",inConstruct:W3,notInConstruct:j3}]};function Dae(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function V3(i){this.config.enter.autolinkProtocol.call(this,i)}function Nae(i){this.config.exit.autolinkProtocol.call(this,i)}function Rae(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(i)}function Oae(i){this.config.exit.autolinkEmail.call(this,i)}function Pae(i){this.exit(i)}function Fae(i){YH(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Hae],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Bae]],{ignore:["link","linkReference"]})}function Hae(i,e,t,n,r){let o="";if(!JH(r)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!zae(t)))return!1;let s=Uae(t+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function Bae(i,e,t,n){return!JH(n,!0)||/[_-\d]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function zae(i){let e=i.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function Uae(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i),t,n,r,o;if(e)for(i=i.slice(0,e.index),o=e[0],t=o.indexOf(")"),n=Tf(i,"("),r=Tf(i,")");t!==-1&&n>r;)i+=o.slice(0,t+1),o=o.slice(t+1),t=o.indexOf(")"),r++;return[i,o]}function JH(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||wm(t)||xm(t))&&(!e||t!==47)}function K3(i){return i.label||!i.identifier?i.label||"":zN(i.identifier)}function Fr(i){let e=i||{},t=e.now||{},n=e.lineShift||0,r=t.line||1,o=t.column||1;return{move:l,current:s,shift:a};function s(){return{now:{line:r,column:o},lineShift:n}}function a(c){n+=c}function l(c=""){let d=c.split(/\r?\n|\r/g),u=d[d.length-1];return r+=d.length-1,o=d.length===1?o+u.length:1+u.length+n,c}}function i5(i,e,t){let n=e.indexStack,r=i.children||[],o=Fr(t),s=[],a=-1;for(n.push(-1);++a=c||d+10?" ":"")),a.shift(4),l+=a.move(p4(f4(n,o,a.current()),u)),c(),l;function u(h,p,m){return p?(m?"":" ")+h:h}}}function g4(i,e,t){let n=e.indexStack,r=i.children||[],o=[],s=-1,a=t.before;n.push(-1);let l=Fr(t);for(;++s0&&(a==="\r"||a===` -`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=Fr(t),l.move(o.join(""))),o.push(l.move(e.handle(c,i,e,Pt(Re({},l.current()),{before:a,after:d})))),a=o[o.length-1].slice(-1)}return n.pop(),o.join("")}var xB={canContainEols:["delete"],enter:{strikethrough:Vae},exit:{strikethrough:Kae}},EB={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:TB}};TB.peek=qae;function Vae(i){this.enter({type:"delete",children:[]},i)}function Kae(i){this.exit(i)}function TB(i,e,t,n){let r=Fr(n),o=t.enter("emphasis"),s=r.move("~~");return s+=g4(i,t,Pt(Re({},r.current()),{before:s,after:"~"})),s+=r.move("~~"),o(),s}function qae(){return"~"}Q3.peek=Gae;function Q3(i,e,t){let n=i.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++ol&&(l=i[c].length);++ba[b])&&(a[b]=k)}m.push(S)}o[c]=m,s[c]=g}let d=-1;if(typeof t=="object"&&"length"in t)for(;++da[d]&&(a[d]=S),h[d]=S),u[d]=k}o.splice(1,0,u),s.splice(1,0,h),c=-1;let p=[];for(;++ct==="none"?null:t),children:[]},i),this.setData("inTable",!0)}function Qae(i){this.exit(i),this.setData("inTable")}function Jae(i){this.enter({type:"tableRow",children:[]},i)}function J3(i){this.exit(i)}function AB(i){this.enter({type:"tableCell",children:[]},i)}function Zae(i){let e=this.resume();this.getData("inTable")&&(e=e.replace(/\\([\\|])/g,ele));let t=this.stack[this.stack.length-1];t.value=e,this.exit(i)}function ele(i,e){return e==="|"?e:i}function ex(i){let e=i||{},t=e.tableCellPadding,n=e.tablePipeAlign,r=e.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`}}var Wae=/\r?\n|\r/g;function n5(i,e){let t=[],n=0,r=0,o;for(;o=Wae.exec(i);)s(i.slice(n,o.index)),t.push(o[0]),n=o.index+o[0].length,r++;return s(i.slice(n)),t.join("");function s(a){t.push(e(a,r,!a))}}function r5(i){if(!i._compiled){let e=(i.atBreak?"[\\r\\n][\\t ]*":"")+(i.before?"(?:"+i.before+")":"");i._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(i.character)?"\\":"")+i.character+(i.after?"(?:"+i.after+")":""),"g")}return i._compiled}function eB(i,e){return ZH(i,e.inConstruct,!0)&&!ZH(i,e.notInConstruct,!1)}function ZH(i,e,t){if(!e)return t;typeof e=="string"&&(e=[e]);let n=-1;for(;++n=c||d+10?" ":"")),a.shift(4),l+=a.move(n5(i5(n,o,a.current()),u)),c(),l;function u(h,p,m){return p?(m?"":" ")+h:h}}}function o5(i,e,t){let n=e.indexStack,r=i.children||[],o=[],s=-1,a=t.before;n.push(-1);let l=Fr(t);for(;++s0&&(a==="\r"||a===` +`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=Fr(t),l.move(o.join(""))),o.push(l.move(e.handle(c,i,e,Pt(Re({},l.current()),{before:a,after:d})))),a=o[o.length-1].slice(-1)}return n.pop(),o.join("")}var rB={canContainEols:["delete"],enter:{strikethrough:Vae},exit:{strikethrough:Kae}},oB={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:sB}};sB.peek=qae;function Vae(i){this.enter({type:"delete",children:[]},i)}function Kae(i){this.exit(i)}function sB(i,e,t,n){let r=Fr(n),o=t.enter("emphasis"),s=r.move("~~");return s+=o5(i,t,Pt(Re({},r.current()),{before:s,after:"~"})),s+=r.move("~~"),o(),s}function qae(){return"~"}q3.peek=Gae;function q3(i,e,t){let n=i.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++ol&&(l=i[c].length);++ba[b])&&(a[b]=k)}m.push(S)}o[c]=m,s[c]=g}let d=-1;if(typeof t=="object"&&"length"in t)for(;++da[d]&&(a[d]=S),h[d]=S),u[d]=k}o.splice(1,0,u),s.splice(1,0,h),c=-1;let p=[];for(;++ct==="none"?null:t),children:[]},i),this.setData("inTable",!0)}function Qae(i){this.exit(i),this.setData("inTable")}function Jae(i){this.enter({type:"tableRow",children:[]},i)}function G3(i){this.exit(i)}function cB(i){this.enter({type:"tableCell",children:[]},i)}function Zae(i){let e=this.resume();this.getData("inTable")&&(e=e.replace(/\\([\\|])/g,ele));let t=this.stack[this.stack.length-1];t.value=e,this.exit(i)}function ele(i,e){return e==="|"?e:i}function Y3(i){let e=i||{},t=e.tableCellPadding,n=e.tablePipeAlign,r=e.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:a,tableCell:l,inlineCode:h}};function s(p,m,g,b){return c(d(p,g,b),p.align)}function a(p,m,g,b){let S=u(p,g,b),k=c([S]);return k.slice(0,k.indexOf(` -`))}function l(p,m,g,b){let S=g.enter("tableCell"),k=g.enter("phrasing"),N=g4(p,g,Pt(Re({},b),{before:o,after:o}));return k(),S(),N}function c(p,m){return IB(p,{align:m,alignDelimiters:n,padding:t,stringLength:r})}function d(p,m,g){let b=p.children,S=-1,k=[],N=m.enter("table");for(;++S-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(s=Math.ceil(s/4)*4);let a=Fr(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),c=p4(f4(i,t,a.current()),d);return l(),c;function d(u,h,p){return h?(p?"":" ".repeat(s))+u:(p?o:o+" ".repeat(s-o.length))+u}}var RB={exit:{taskListCheckValueChecked:NB,taskListCheckValueUnchecked:NB,paragraph:tle}},OB={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ile}};function NB(i){let e=this.stack[this.stack.length-2];e.checked=i.type==="taskListCheckValueChecked"}function tle(i){let e=this.stack[this.stack.length-2],t=this.stack[this.stack.length-1],n=e.children,r=t.children[0],o=-1,s;if(e&&e.type==="listItem"&&typeof e.checked=="boolean"&&r&&r.type==="text"){for(;++os&&(s=o):o=1,r=n+1,n=t.indexOf(e,r);return s}function BB(){return{enter:{mathFlow:i,mathFlowFenceMeta:e,mathText:o},exit:{mathFlow:r,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:a,mathText:s,mathTextData:a}};function i(l){this.enter({type:"math",meta:null,value:"",data:{hName:"div",hProperties:{className:["math","math-display"]},hChildren:[{type:"text",value:""}]}},l)}function e(){this.buffer()}function t(){let l=this.resume(),c=this.stack[this.stack.length-1];c.meta=l}function n(){this.getData("mathFlowInside")||(this.buffer(),this.setData("mathFlowInside",!0))}function r(l){let c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.exit(l);d.value=c,d.data.hChildren[0].value=c,this.setData("mathFlowInside")}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"span",hProperties:{className:["math","math-inline"]},hChildren:[{type:"text",value:""}]}},l),this.buffer()}function s(l){let c=this.resume(),d=this.exit(l);d.value=c,d.data.hChildren[0].value=c}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function zB(i={}){let e=i.singleDollarTextMath;return e==null&&(e=!0),n.peek=r,{unsafe:[{character:"\r",inConstruct:["mathFlowMeta"]},{character:"\r",inConstruct:["mathFlowMeta"]},e?{character:"$",inConstruct:["mathFlowMeta","phrasing"]}:{character:"$",after:"\\$",inConstruct:["mathFlowMeta","phrasing"]},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:n}};function t(o,s,a,l){let c=o.value||"",d="$".repeat(Math.max(HB(c,"$")+1,2)),u=a.enter("mathFlow"),h=Fr(l),p=h.move(d);if(o.meta){let m=a.enter("mathFlowMeta");p+=h.move(T1(a,o.meta,Pt(Re({},h.current()),{before:p,after:" ",encode:["$"]}))),m()}return p+=h.move(` +`))}function l(p,m,g,b){let S=g.enter("tableCell"),k=g.enter("phrasing"),N=o5(p,g,Pt(Re({},b),{before:o,after:o}));return k(),S(),N}function c(p,m){return lB(p,{align:m,alignDelimiters:n,padding:t,stringLength:r})}function d(p,m,g){let b=p.children,S=-1,k=[],N=m.enter("table");for(;++S-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(s=Math.ceil(s/4)*4);let a=Fr(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),c=n5(i5(i,t,a.current()),d);return l(),c;function d(u,h,p){return h?(p?"":" ".repeat(s))+u:(p?o:o+" ".repeat(s-o.length))+u}}var pB={exit:{taskListCheckValueChecked:fB,taskListCheckValueUnchecked:fB,paragraph:tle}},mB={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ile}};function fB(i){let e=this.stack[this.stack.length-2];e.checked=i.type==="taskListCheckValueChecked"}function tle(i){let e=this.stack[this.stack.length-2],t=this.stack[this.stack.length-1],n=e.children,r=t.children[0],o=-1,s;if(e&&e.type==="listItem"&&typeof e.checked=="boolean"&&r&&r.type==="text"){for(;++os&&(s=o):o=1,r=n+1,n=t.indexOf(e,r);return s}function bB(){return{enter:{mathFlow:i,mathFlowFenceMeta:e,mathText:o},exit:{mathFlow:r,mathFlowFence:n,mathFlowFenceMeta:t,mathFlowValue:a,mathText:s,mathTextData:a}};function i(l){this.enter({type:"math",meta:null,value:"",data:{hName:"div",hProperties:{className:["math","math-display"]},hChildren:[{type:"text",value:""}]}},l)}function e(){this.buffer()}function t(){let l=this.resume(),c=this.stack[this.stack.length-1];c.meta=l}function n(){this.getData("mathFlowInside")||(this.buffer(),this.setData("mathFlowInside",!0))}function r(l){let c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.exit(l);d.value=c,d.data.hChildren[0].value=c,this.setData("mathFlowInside")}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"span",hProperties:{className:["math","math-inline"]},hChildren:[{type:"text",value:""}]}},l),this.buffer()}function s(l){let c=this.resume(),d=this.exit(l);d.value=c,d.data.hChildren[0].value=c}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function yB(i={}){let e=i.singleDollarTextMath;return e==null&&(e=!0),n.peek=r,{unsafe:[{character:"\r",inConstruct:["mathFlowMeta"]},{character:"\r",inConstruct:["mathFlowMeta"]},e?{character:"$",inConstruct:["mathFlowMeta","phrasing"]}:{character:"$",after:"\\$",inConstruct:["mathFlowMeta","phrasing"]},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:n}};function t(o,s,a,l){let c=o.value||"",d="$".repeat(Math.max(_B(c,"$")+1,2)),u=a.enter("mathFlow"),h=Fr(l),p=h.move(d);if(o.meta){let m=a.enter("mathFlowMeta");p+=h.move(E1(a,o.meta,Pt(Re({},h.current()),{before:p,after:" ",encode:["$"]}))),m()}return p+=h.move(` `),c&&(p+=h.move(c+` -`)),p+=h.move(d),u(),p}function n(o){let s=o.value||"",a=1,l="";for(e||a++;new RegExp("(^|[^$])"+"\\$".repeat(a)+"([^$]|$)").test(s);)a++;/[^ \r\n]/.test(s)&&(/[ \r\n$]/.test(s.charAt(0))||/[ \r\n$]/.test(s.charAt(s.length-1)))&&(l=" ");let c="$".repeat(a);return c+l+s+l+c}function r(){return"$"}}function ox(i={}){let e=this.data();t("micromarkExtensions",rx(i)),t("fromMarkdownExtensions",BB()),t("toMarkdownExtensions",zB(i));function t(n,r){(e[n]?e[n]:e[n]=[]).push(r)}}var hi=function(i,e,t){var n={type:String(i)};return t==null&&(typeof e=="string"||Array.isArray(e))?t=e:Object.assign(n,e),Array.isArray(t)?n.children=t:t!=null&&(n.value=String(t)),n};var v4={}.hasOwnProperty;function lle(i,e){let t=e.data||{};return"value"in e&&!(v4.call(t,"hName")||v4.call(t,"hProperties")||v4.call(t,"hChildren"))?i.augment(e,hi("text",e.value)):i(e,"div",_i(i,e))}function sx(i,e,t){let n=e&&e.type,r;if(!n)throw new Error("Expected node, got `"+e+"`");return v4.call(i.handlers,n)?r=i.handlers[n]:i.passThrough&&i.passThrough.includes(n)?r=cle:r=i.unknownHandler,(typeof r=="function"?r:lle)(i,e,t)}function cle(i,e){return"children"in e?Pt(Re({},e),{children:_i(i,e)}):e}function _i(i,e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r":""))+")"})),h;function h(){let p=[],m,g,b;if((!e||r(a,l,c[c.length-1]||null))&&(p=dle(t(a,c)),p[0]===ax))return p;if(a.children&&p[0]!==WB)for(g=(n?a.children.length:-1)+o,b=c.concat(a);g>-1&&g-1?n.offset:null}}}function KB(i){return!i||!i.position||!i.position.start||!i.position.start.line||!i.position.start.column||!i.position.end||!i.position.end.line||!i.position.end.column}var qB=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null),h4(i,e,r,n);function r(o,s){var a=s[s.length-1];return t(o,a?a.children.indexOf(o):null,a)}};var GB={}.hasOwnProperty;function YB(i){let e=Object.create(null);if(!i||!i.type)throw new Error("mdast-util-definitions expected node");return qB(i,"definition",t),n;function t(r){let o=$B(r.identifier);o&&!GB.call(e,o)&&(e[o]=r)}function n(r){let o=$B(r);return o&&GB.call(e,o)?e[o]:null}}function $B(i){return String(i||"").toUpperCase()}function ho(i,e){let t=[],n=-1;for(e&&t.push(hi("text",` +`)),p+=h.move(d),u(),p}function n(o){let s=o.value||"",a=1,l="";for(e||a++;new RegExp("(^|[^$])"+"\\$".repeat(a)+"([^$]|$)").test(s);)a++;/[^ \r\n]/.test(s)&&(/[ \r\n$]/.test(s.charAt(0))||/[ \r\n$]/.test(s.charAt(s.length-1)))&&(l=" ");let c="$".repeat(a);return c+l+s+l+c}function r(){return"$"}}function ex(i={}){let e=this.data();t("micromarkExtensions",Z3(i)),t("fromMarkdownExtensions",bB()),t("toMarkdownExtensions",yB(i));function t(n,r){(e[n]?e[n]:e[n]=[]).push(r)}}var hi=function(i,e,t){var n={type:String(i)};return t==null&&(typeof e=="string"||Array.isArray(e))?t=e:Object.assign(n,e),Array.isArray(t)?n.children=t:t!=null&&(n.value=String(t)),n};var s5={}.hasOwnProperty;function lle(i,e){let t=e.data||{};return"value"in e&&!(s5.call(t,"hName")||s5.call(t,"hProperties")||s5.call(t,"hChildren"))?i.augment(e,hi("text",e.value)):i(e,"div",bi(i,e))}function tx(i,e,t){let n=e&&e.type,r;if(!n)throw new Error("Expected node, got `"+e+"`");return s5.call(i.handlers,n)?r=i.handlers[n]:i.passThrough&&i.passThrough.includes(n)?r=cle:r=i.unknownHandler,(typeof r=="function"?r:lle)(i,e,t)}function cle(i,e){return"children"in e?Pt(Re({},e),{children:bi(i,e)}):e}function bi(i,e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r":""))+")"})),h;function h(){let p=[],m,g,b;if((!e||r(a,l,c[c.length-1]||null))&&(p=dle(t(a,c)),p[0]===ix))return p;if(a.children&&p[0]!==SB)for(g=(n?a.children.length:-1)+o,b=c.concat(a);g>-1&&g-1?n.offset:null}}}function EB(i){return!i||!i.position||!i.position.start||!i.position.start.line||!i.position.start.column||!i.position.end||!i.position.end.line||!i.position.end.column}var TB=function(i,e,t,n){typeof e=="function"&&typeof t!="function"&&(n=t,t=e,e=null),t5(i,e,r,n);function r(o,s){var a=s[s.length-1];return t(o,a?a.children.indexOf(o):null,a)}};var kB={}.hasOwnProperty;function AB(i){let e=Object.create(null);if(!i||!i.type)throw new Error("mdast-util-definitions expected node");return TB(i,"definition",t),n;function t(r){let o=IB(r.identifier);o&&!kB.call(e,o)&&(e[o]=r)}function n(r){let o=IB(r);return o&&kB.call(e,o)?e[o]:null}}function IB(i){return String(i||"").toUpperCase()}function fo(i,e){let t=[],n=-1;for(e&&t.push(hi("text",` `));++n0&&t.push(hi("text",` -`)),t}function XB(i){let e=-1,t=[];for(;++e1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:i.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};a>1&&u.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(u)}let c=r[r.length-1];if(c&&c.type==="element"&&c.tagName==="p"){let u=c.children[c.children.length-1];u&&u.type==="text"?u.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else r.push(...l);let d={type:"element",tagName:"li",properties:{id:i.clobberPrefix+"fn-"+s},children:ho(r,!0)};n.position&&(d.position=n.position),t.push(d)}return t.length===0?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:"h2",properties:{id:"footnote-label",className:["sr-only"]},children:[hi("text",i.footnoteLabel)]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:ho(t,!0)},{type:"text",value:` -`}]}}function QB(i,e){return i(e,"blockquote",ho(_i(i,e),!0))}function JB(i,e){return[i(e,"br"),hi("text",` -`)]}function ZB(i,e){let t=e.value?e.value+` -`:"",n=e.lang&&e.lang.match(/^[^ \t]+(?=[ \t]|$)/),r={};n&&(r.className=["language-"+n]);let o=i(e,"code",r,[hi("text",t)]);return e.meta&&(o.data={meta:e.meta}),i(e.position,"pre",[o])}function ez(i,e){return i(e,"del",_i(i,e))}function tz(i,e){return i(e,"em",_i(i,e))}function _4(i,e){let t=String(e.identifier),n=d4(t.toLowerCase()),r=i.footnoteOrder.indexOf(t),o;r===-1?(i.footnoteOrder.push(t),i.footnoteCounts[t]=1,o=i.footnoteOrder.length):(i.footnoteCounts[t]++,o=r+1);let s=i.footnoteCounts[t];return i(e,"sup",[i(e.position,"a",{href:"#"+i.clobberPrefix+"fn-"+n,id:i.clobberPrefix+"fnref-"+n+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[hi("text",String(o))])])}function iz(i,e){let t=i.footnoteById,n=1;for(;n in t;)n++;let r=String(n);return t[r]={type:"footnoteDefinition",identifier:r,children:[{type:"paragraph",children:e.children}],position:e.position},_4(i,{type:"footnoteReference",identifier:r,position:e.position})}function nz(i,e){return i(e,"h"+e.depth,_i(i,e))}function rz(i,e){return i.dangerous?i.augment(e,hi("raw",e.value)):null}var az=Fi(k1(),1);function y4(i,e){let t=e.referenceType,n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return hi("text","!["+e.alt+n);let r=_i(i,e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift(hi("text","["));let s=r[r.length-1];return s&&s.type==="text"?s.value+=n:r.push(hi("text",n)),r}function lz(i,e){let t=i.definition(e.identifier);if(!t)return y4(i,e);let n={src:(0,az.default)(t.url||""),alt:e.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"img",n)}var cz=Fi(k1(),1);function dz(i,e){let t={src:(0,cz.default)(e.url),alt:e.alt};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"img",t)}function uz(i,e){return i(e,"code",[hi("text",e.value.replace(/\r?\n|\r/g," "))])}var hz=Fi(k1(),1);function fz(i,e){let t=i.definition(e.identifier);if(!t)return y4(i,e);let n={href:(0,hz.default)(t.url||"")};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"a",n,_i(i,e))}var pz=Fi(k1(),1);function mz(i,e){let t={href:(0,pz.default)(e.url)};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"a",t,_i(i,e))}function gz(i,e,t){let n=_i(i,e),r=t?hle(t):vz(e),o={},s=[];if(typeof e.checked=="boolean"){let c;n[0]&&n[0].type==="element"&&n[0].tagName==="p"?c=n[0]:(c=i(null,"p",[]),n.unshift(c)),c.children.length>0&&c.children.unshift(hi("text"," ")),c.children.unshift(i(null,"input",{type:"checkbox",checked:e.checked,disabled:!0})),o.className=["task-list-item"]}let a=-1;for(;++a1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:i.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};a>1&&u.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(u)}let c=r[r.length-1];if(c&&c.type==="element"&&c.tagName==="p"){let u=c.children[c.children.length-1];u&&u.type==="text"?u.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else r.push(...l);let d={type:"element",tagName:"li",properties:{id:i.clobberPrefix+"fn-"+s},children:fo(r,!0)};n.position&&(d.position=n.position),t.push(d)}return t.length===0?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:"h2",properties:{id:"footnote-label",className:["sr-only"]},children:[hi("text",i.footnoteLabel)]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:fo(t,!0)},{type:"text",value:` +`}]}}function MB(i,e){return i(e,"blockquote",fo(bi(i,e),!0))}function DB(i,e){return[i(e,"br"),hi("text",` +`)]}function NB(i,e){let t=e.value?e.value+` +`:"",n=e.lang&&e.lang.match(/^[^ \t]+(?=[ \t]|$)/),r={};n&&(r.className=["language-"+n]);let o=i(e,"code",r,[hi("text",t)]);return e.meta&&(o.data={meta:e.meta}),i(e.position,"pre",[o])}function RB(i,e){return i(e,"del",bi(i,e))}function OB(i,e){return i(e,"em",bi(i,e))}function a5(i,e){let t=String(e.identifier),n=Zb(t.toLowerCase()),r=i.footnoteOrder.indexOf(t),o;r===-1?(i.footnoteOrder.push(t),i.footnoteCounts[t]=1,o=i.footnoteOrder.length):(i.footnoteCounts[t]++,o=r+1);let s=i.footnoteCounts[t];return i(e,"sup",[i(e.position,"a",{href:"#"+i.clobberPrefix+"fn-"+n,id:i.clobberPrefix+"fnref-"+n+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[hi("text",String(o))])])}function PB(i,e){let t=i.footnoteById,n=1;for(;n in t;)n++;let r=String(n);return t[r]={type:"footnoteDefinition",identifier:r,children:[{type:"paragraph",children:e.children}],position:e.position},a5(i,{type:"footnoteReference",identifier:r,position:e.position})}function FB(i,e){return i(e,"h"+e.depth,bi(i,e))}function HB(i,e){return i.dangerous?i.augment(e,hi("raw",e.value)):null}var UB=Hi(T1(),1);function c5(i,e){let t=e.referenceType,n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return hi("text","!["+e.alt+n);let r=bi(i,e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift(hi("text","["));let s=r[r.length-1];return s&&s.type==="text"?s.value+=n:r.push(hi("text",n)),r}function WB(i,e){let t=i.definition(e.identifier);if(!t)return c5(i,e);let n={src:(0,UB.default)(t.url||""),alt:e.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"img",n)}var jB=Hi(T1(),1);function VB(i,e){let t={src:(0,jB.default)(e.url),alt:e.alt};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"img",t)}function KB(i,e){return i(e,"code",[hi("text",e.value.replace(/\r?\n|\r/g," "))])}var qB=Hi(T1(),1);function GB(i,e){let t=i.definition(e.identifier);if(!t)return c5(i,e);let n={href:(0,qB.default)(t.url||"")};return t.title!==null&&t.title!==void 0&&(n.title=t.title),i(e,"a",n,bi(i,e))}var $B=Hi(T1(),1);function YB(i,e){let t={href:(0,$B.default)(e.url)};return e.title!==null&&e.title!==void 0&&(t.title=e.title),i(e,"a",t,bi(i,e))}function XB(i,e,t){let n=bi(i,e),r=t?hle(t):QB(e),o={},s=[];if(typeof e.checked=="boolean"){let c;n[0]&&n[0].type==="element"&&n[0].tagName==="p"?c=n[0]:(c=i(null,"p",[]),n.unshift(c)),c.children.length>0&&c.children.unshift(hi("text"," ")),c.children.unshift(i(null,"input",{type:"checkbox",checked:e.checked,disabled:!0})),o.className=["task-list-item"]}let a=-1;for(;++a1:e}function _z(i,e){let t={},n=e.ordered?"ol":"ul",r=_i(i,e),o=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++o{let l=String(a.identifier).toUpperCase();fle.call(r,l)||(r[l]=a)}),s;function o(a,l){if(a&&"data"in a&&a.data){let c=a.data;c.hName&&(l.type!=="element"&&(l={type:"element",tagName:"",properties:{},children:[]}),l.tagName=c.hName),l.type==="element"&&c.hProperties&&(l.properties=Re(Re({},l.properties),c.hProperties)),"children"in l&&l.children&&c.hChildren&&(l.children=c.hChildren)}if(a){let c="type"in a?a:{position:a};KB(c)||(l.position={start:pu(c),end:Af(c)})}return l}function s(a,l,c,d){return Array.isArray(c)&&(d=c,c={}),o(a,{type:"element",tagName:l,properties:c||{},children:d||[]})}}function S4(i,e){let t=ple(i,e),n=sx(t,i,null),r=XB(t);return r&&n.children.push(hi("text",` -`),r),Array.isArray(n)?{type:"root",children:n}:n}var mle=function(i,e){return i&&"run"in i?gle(i,e):vle(i||e)},cx=mle;function gle(i,e){return(t,n,r)=>{i.run(S4(t,e),n,o=>{r(o)})}}function vle(i){return e=>S4(e,i)}var sj=Fi(Gx(),1);var Kl=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};Kl.prototype.property={};Kl.prototype.normal={};Kl.prototype.space=null;function $x(i,e){let t={},n={},r=-1;for(;++rzt,booleanish:()=>gn,commaOrSpaceSeparated:()=>go,commaSeparated:()=>dd,number:()=>Te,overloadedBoolean:()=>Yx,spaceSeparated:()=>Ii});var jde=0,zt=wu(),gn=wu(),Yx=wu(),Te=wu(),Ii=wu(),dd=wu(),go=wu();function wu(){return 2**++jde}var Xx=Object.keys(K1),xu=class extends zr{constructor(e,t,n,r){let o=-1;if(super(e,t),RW(this,"space",r),typeof n=="number")for(;++o4&&t.slice(0,4)==="data"&&Kde.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(FW,$de);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!FW.test(o)){let s=o.replace(qde,Gde);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=xu}return new r(n,e)}function Gde(i){return"-"+i.toLowerCase()}function $de(i){return i.charAt(1).toUpperCase()}var t8={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var Ws=$x([Jx,Qx,Zx,e8,OW],"html"),Qr=$x([Jx,Qx,Zx,e8,PW],"svg");var HW=/[#.]/g,BW=function(i,e="div"){for(var t=i||"",n={},r=0,o,s,a;r-1&&ss)return{line:a+1,column:s-(t[a-1]||0)+1,offset:s}}return{line:void 0,column:void 0,offset:void 0}}function o(s){var a=s&&s.line,l=s&&s.column,c;return typeof a=="number"&&typeof l=="number"&&!Number.isNaN(a)&&!Number.isNaN(l)&&a-1 in t&&(c=(t[a-2]||0)+l-1||0),c>-1&&c0?i.call(e,o,s,a):i.call(e,o,s)}function xue(i,e,t,n,r){let o=Us(n.schema,e),s;t==null||typeof t=="number"&&Number.isNaN(t)||t===!1&&(n.vue||n.vdom||n.hyperscript)||!t&&o.boolean&&(n.vue||n.vdom||n.hyperscript)||(Array.isArray(t)&&(t=o.commaSeparated?n5(t):i5(t)),o.boolean&&n.hyperscript&&(t=""),o.property==="style"&&typeof t=="string"&&(n.react||n.vue||n.vdom)&&(t=Aue(t,r)),n.vue?o.property!=="style"&&(s="attrs"):o.mustUseProperty||(n.vdom?o.property!=="style"&&(s="attributes"):n.hyperscript&&(s="attrs")),s?i[s]=Object.assign(i[s]||{},{[o.attribute]:t}):o.space&&n.react?i[yue[o.property]||o.property]=t:i[o.attribute]=t)}function Eue(i){let e=i("div",{});return!!(e&&("_owner"in e||"_store"in e)&&(e.key===void 0||e.key===null))}function Tue(i){return"context"in i&&"cleanup"in i}function kue(i){return i("div",{}).type==="VirtualNode"}function Iue(i){let e=i("div",{});return!!(e&&e.context&&e.context._isVue)}function Aue(i,e){let t={};try{(0,tj.default)(i,(n,r)=>{n.slice(0,4)==="-ms-"&&(n="ms-"+n.slice(4)),t[n.replace(/-([a-z])/g,(o,s)=>s.toUpperCase())]=r})}catch(n){throw n.message=e+"[style]"+n.message.slice(9),n}return t}var rj={}.hasOwnProperty;function o5(i,e){var t=e||{};function n(r){var o=n.invalid,s=n.handlers;if(r&&rj.call(r,i)&&(o=rj.call(s,r[i])?s[r[i]]:n.unknown),o)return o.apply(this,arguments)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}var Lue={}.hasOwnProperty,oj=o5("type",{handlers:{root:Mue,element:Pue,text:Rue,comment:Oue,doctype:Nue}});function l8(i,e){return oj(i,e==="svg"?Qr:Ws)}function Mue(i,e){var t={nodeName:"#document",mode:(i.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=c8(i.children,t,e),Uf(i,t)}function Due(i,e){var t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=c8(i.children,t,e),Uf(i,t)}function Nue(i){return Uf(i,{nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0})}function Rue(i){return Uf(i,{nodeName:"#text",value:i.value,parentNode:void 0})}function Oue(i){return Uf(i,{nodeName:"#comment",data:i.value,parentNode:void 0})}function Pue(i,e){var t=e.space;return ij(n,Object.assign({},i,{children:[]}),{space:t});function n(r,o){var s=[],a,l,c,d,u;for(c in o)!Lue.call(o,c)||o[c]===!1||(a=Us(e,c),!(a.boolean&&!o[c])&&(l={name:c,value:o[c]===!0?"":String(o[c])},a.space&&a.space!=="html"&&a.space!=="svg"&&(d=c.indexOf(":"),d<0?l.prefix="":(l.name=c.slice(d+1),l.prefix=c.slice(0,d)),l.namespace=Jr[a.space]),s.push(l)));return e.space==="html"&&i.tagName==="svg"&&(e=Qr),u=Uf(i,{nodeName:r,tagName:r,attrs:s,namespaceURI:Jr[e.space],childNodes:[],parentNode:void 0}),u.childNodes=c8(i.children,u,e),r==="template"&&(u.content=Due(i.content,e)),u}}function c8(i,e,t){var n=-1,r=[],o;if(i)for(;++n{let Ne=W;if(Ne.value.stitch&&ae!==null&&re!==null)return ae.children[re]=Ne.value.stitch,re}),i.type!=="root"&&u.type==="root"&&u.children.length===1)return u.children[0];return u;function h(){let W={nodeName:"template",tagName:"template",attrs:[],namespaceURI:Jr.html,childNodes:[]},re={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:Jr.html,childNodes:[]},ae={nodeName:"#document-fragment",childNodes:[]};if(r._bootstrap(re,W),r._pushTmplInsertionMode(Fue),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),a=r.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,d=a.__mixins[0],c=d.posTracker,o(i),r._adoptNodes(re.childNodes[0],ae),ae}function p(){let W=r.treeAdapter.createDocument();if(r._bootstrap(W,void 0),a=r.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,d=a.__mixins[0],c=d.posTracker,o(i),W}function m(W){let re=-1;if(W)for(;++rea5(e,t,i)}var Bo=class i{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new i(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}},Ua=class i{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new i(t,Bo.range(this,e))}},Ie=class i{constructor(e,t){this.position=void 0;var n="KaTeX parse error: "+e,r,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start;var a=o.end;r===s.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&\u0332"),c;r>15?c="\u2026"+s.slice(r-15,r):c=s.slice(0,r);var d;a+15":">","<":"<",'"':""","'":"'"},ihe=/[&><"']/g;function nhe(i){return String(i).replace(ihe,e=>the[e])}var Hj=function i(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?i(e.body[0]):e:e.type==="font"?i(e.body):e},rhe=function(e){var t=Hj(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},ohe=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},she=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},wt={contains:Que,deflt:Jue,escape:nhe,hyphenate:ehe,getBaseElem:Hj,isCharacterBox:rhe,protocolFromUrl:she},b5={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:i=>"#"+i},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(i,e)=>(e.push(i),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:i=>Math.max(0,i),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:i=>Math.max(0,i),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:i=>Math.max(0,i),cli:"-e, --max-expand ",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function ahe(i){if(i.default)return i.default;var e=i.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var Q1=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in b5)if(b5.hasOwnProperty(t)){var n=b5[t];this[t]=e[t]!==void 0?n.processor?n.processor(e[t]):e[t]:ahe(n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r=="function"&&(r=r(e,t,n)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new Ie("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),n);r==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r=="function")try{r=r(e,t,n)}catch(o){r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]")),!1)}isTrusted(e){e.url&&!e.protocol&&(e.protocol=wt.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}},Ha=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ba[lhe[this.id]]}sub(){return Ba[che[this.id]]}fracNum(){return Ba[dhe[this.id]]}fracDen(){return Ba[uhe[this.id]]}cramp(){return Ba[hhe[this.id]]}text(){return Ba[fhe[this.id]]}isTight(){return this.size>=2}},O8=0,C5=1,Vf=2,Yl=3,J1=4,vs=5,Kf=6,eo=7,Ba=[new Ha(O8,0,!1),new Ha(C5,0,!0),new Ha(Vf,1,!1),new Ha(Yl,1,!0),new Ha(J1,2,!1),new Ha(vs,2,!0),new Ha(Kf,3,!1),new Ha(eo,3,!0)],lhe=[J1,vs,J1,vs,Kf,eo,Kf,eo],che=[vs,vs,vs,vs,eo,eo,eo,eo],dhe=[Vf,Yl,J1,vs,Kf,eo,Kf,eo],uhe=[Yl,Yl,vs,vs,eo,eo,eo,eo],hhe=[C5,C5,Yl,Yl,vs,vs,eo,eo],fhe=[O8,C5,Vf,Yl,Vf,Yl,Vf,Yl],_t={DISPLAY:Ba[O8],TEXT:Ba[Vf],SCRIPT:Ba[J1],SCRIPTSCRIPT:Ba[Kf]},w8=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function phe(i){for(var e=0;e=r[0]&&i<=r[1])return t.name}return null}var y5=[];w8.forEach(i=>i.blocks.forEach(e=>y5.push(...e)));function Bj(i){for(var e=0;e=y5[e]&&i<=y5[e+1])return!0;return!1}var jf=80,mhe=function(e,t){return"M95,"+(622+e+t)+` +`)),i(e,"li",o,s)}function hle(i){let e=i.spread,t=i.children,n=-1;for(;!e&&++n1:e}function JB(i,e){let t={},n=e.ordered?"ol":"ul",r=bi(i,e),o=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++o{let l=String(a.identifier).toUpperCase();fle.call(r,l)||(r[l]=a)}),s;function o(a,l){if(a&&"data"in a&&a.data){let c=a.data;c.hName&&(l.type!=="element"&&(l={type:"element",tagName:"",properties:{},children:[]}),l.tagName=c.hName),l.type==="element"&&c.hProperties&&(l.properties=Re(Re({},l.properties),c.hProperties)),"children"in l&&l.children&&c.hChildren&&(l.children=c.hChildren)}if(a){let c="type"in a?a:{position:a};EB(c)||(l.position={start:pu(c),end:kf(c)})}return l}function s(a,l,c,d){return Array.isArray(c)&&(d=c,c={}),o(a,{type:"element",tagName:l,properties:c||{},children:d||[]})}}function u5(i,e){let t=ple(i,e),n=tx(t,i,null),r=LB(t);return r&&n.children.push(hi("text",` +`),r),Array.isArray(n)?{type:"root",children:n}:n}var mle=function(i,e){return i&&"run"in i?gle(i,e):vle(i||e)},rx=mle;function gle(i,e){return(t,n,r)=>{i.run(u5(t,e),n,o=>{r(o)})}}function vle(i){return e=>u5(e,i)}var zW=Hi(Wx(),1);var Kl=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};Kl.prototype.property={};Kl.prototype.normal={};Kl.prototype.space=null;function jx(i,e){let t={},n={},r=-1;for(;++rzt,booleanish:()=>gn,commaOrSpaceSeparated:()=>vo,commaSeparated:()=>cd,number:()=>Te,overloadedBoolean:()=>Vx,spaceSeparated:()=>Ai});var jde=0,zt=wu(),gn=wu(),Vx=wu(),Te=wu(),Ai=wu(),cd=wu(),vo=wu();function wu(){return 2**++jde}var Kx=Object.keys(V1),xu=class extends zr{constructor(e,t,n,r){let o=-1;if(super(e,t),pW(this,"space",r),typeof n=="number")for(;++o4&&t.slice(0,4)==="data"&&Kde.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(vW,$de);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!vW.test(o)){let s=o.replace(qde,Gde);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=xu}return new r(n,e)}function Gde(i){return"-"+i.toLowerCase()}function $de(i){return i.charAt(1).toUpperCase()}var Xx={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var Ws=jx([Gx,qx,$x,Yx,mW],"html"),Qr=jx([Gx,qx,$x,Yx,gW],"svg");var _W=/[#.]/g,bW=function(i,e="div"){for(var t=i||"",n={},r=0,o,s,a;r-1&&ss)return{line:a+1,column:s-(t[a-1]||0)+1,offset:s}}return{line:void 0,column:void 0,offset:void 0}}function o(s){var a=s&&s.line,l=s&&s.column,c;return typeof a=="number"&&typeof l=="number"&&!Number.isNaN(a)&&!Number.isNaN(l)&&a-1 in t&&(c=(t[a-2]||0)+l-1||0),c>-1&&c0?i.call(e,o,s,a):i.call(e,o,s)}function xue(i,e,t,n,r){let o=Us(n.schema,e),s;t==null||typeof t=="number"&&Number.isNaN(t)||t===!1&&(n.vue||n.vdom||n.hyperscript)||!t&&o.boolean&&(n.vue||n.vdom||n.hyperscript)||(Array.isArray(t)&&(t=o.commaSeparated?q5(t):K5(t)),o.boolean&&n.hyperscript&&(t=""),o.property==="style"&&typeof t=="string"&&(n.react||n.vue||n.vdom)&&(t=Aue(t,r)),n.vue?o.property!=="style"&&(s="attrs"):o.mustUseProperty||(n.vdom?o.property!=="style"&&(s="attributes"):n.hyperscript&&(s="attrs")),s?i[s]=Object.assign(i[s]||{},{[o.attribute]:t}):o.space&&n.react?i[yue[o.property]||o.property]=t:i[o.attribute]=t)}function Eue(i){let e=i("div",{});return!!(e&&("_owner"in e||"_store"in e)&&(e.key===void 0||e.key===null))}function Tue(i){return"context"in i&&"cleanup"in i}function kue(i){return i("div",{}).type==="VirtualNode"}function Iue(i){let e=i("div",{});return!!(e&&e.context&&e.context._isVue)}function Aue(i,e){let t={};try{(0,OW.default)(i,(n,r)=>{n.slice(0,4)==="-ms-"&&(n="ms-"+n.slice(4)),t[n.replace(/-([a-z])/g,(o,s)=>s.toUpperCase())]=r})}catch(n){throw n.message=e+"[style]"+n.message.slice(9),n}return t}var HW={}.hasOwnProperty;function $5(i,e){var t=e||{};function n(r){var o=n.invalid,s=n.handlers;if(r&&HW.call(r,i)&&(o=HW.call(s,r[i])?s[r[i]]:n.unknown),o)return o.apply(this,arguments)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}var Lue={}.hasOwnProperty,BW=$5("type",{handlers:{root:Mue,element:Pue,text:Rue,comment:Oue,doctype:Nue}});function n8(i,e){return BW(i,e==="svg"?Qr:Ws)}function Mue(i,e){var t={nodeName:"#document",mode:(i.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=r8(i.children,t,e),Bf(i,t)}function Due(i,e){var t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=r8(i.children,t,e),Bf(i,t)}function Nue(i){return Bf(i,{nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:void 0})}function Rue(i){return Bf(i,{nodeName:"#text",value:i.value,parentNode:void 0})}function Oue(i){return Bf(i,{nodeName:"#comment",data:i.value,parentNode:void 0})}function Pue(i,e){var t=e.space;return PW(n,Object.assign({},i,{children:[]}),{space:t});function n(r,o){var s=[],a,l,c,d,u;for(c in o)!Lue.call(o,c)||o[c]===!1||(a=Us(e,c),!(a.boolean&&!o[c])&&(l={name:c,value:o[c]===!0?"":String(o[c])},a.space&&a.space!=="html"&&a.space!=="svg"&&(d=c.indexOf(":"),d<0?l.prefix="":(l.name=c.slice(d+1),l.prefix=c.slice(0,d)),l.namespace=Jr[a.space]),s.push(l)));return e.space==="html"&&i.tagName==="svg"&&(e=Qr),u=Bf(i,{nodeName:r,tagName:r,attrs:s,namespaceURI:Jr[e.space],childNodes:[],parentNode:void 0}),u.childNodes=r8(i.children,u,e),r==="template"&&(u.content=Due(i.content,e)),u}}function r8(i,e,t){var n=-1,r=[],o;if(i)for(;++n{let Ne=W;if(Ne.value.stitch&&ae!==null&&re!==null)return ae.children[re]=Ne.value.stitch,re}),i.type!=="root"&&u.type==="root"&&u.children.length===1)return u.children[0];return u;function h(){let W={nodeName:"template",tagName:"template",attrs:[],namespaceURI:Jr.html,childNodes:[]},re={nodeName:"documentmock",tagName:"documentmock",attrs:[],namespaceURI:Jr.html,childNodes:[]},ae={nodeName:"#document-fragment",childNodes:[]};if(r._bootstrap(re,W),r._pushTmplInsertionMode(Fue),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),a=r.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,d=a.__mixins[0],c=d.posTracker,o(i),r._adoptNodes(re.childNodes[0],ae),ae}function p(){let W=r.treeAdapter.createDocument();if(r._bootstrap(W,void 0),a=r.tokenizer,!a)throw new Error("Expected `tokenizer`");return l=a.preprocessor,d=a.__mixins[0],c=d.posTracker,o(i),W}function m(W){let re=-1;if(W)for(;++reX5(e,t,i)}var zo=class i{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new i(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}},za=class i{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new i(t,zo.range(this,e))}},Ie=class i{constructor(e,t){this.position=void 0;var n="KaTeX parse error: "+e,r,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start;var a=o.end;r===s.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&\u0332"),c;r>15?c="\u2026"+s.slice(r-15,r):c=s.slice(0,r);var d;a+15":">","<":"<",'"':""","'":"'"},ihe=/[&><"']/g;function nhe(i){return String(i).replace(ihe,e=>the[e])}var _j=function i(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?i(e.body[0]):e:e.type==="font"?i(e.body):e},rhe=function(e){var t=_j(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},ohe=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},she=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},wt={contains:Que,deflt:Jue,escape:nhe,hyphenate:ehe,getBaseElem:_j,isCharacterBox:rhe,protocolFromUrl:she},l4={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:i=>"#"+i},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(i,e)=>(e.push(i),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:i=>Math.max(0,i),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:i=>Math.max(0,i),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:i=>Math.max(0,i),cli:"-e, --max-expand ",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function ahe(i){if(i.default)return i.default;var e=i.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var X1=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in l4)if(l4.hasOwnProperty(t)){var n=l4[t];this[t]=e[t]!==void 0?n.processor?n.processor(e[t]):e[t]:ahe(n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r=="function"&&(r=r(e,t,n)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new Ie("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),n);r==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r=="function")try{r=r(e,t,n)}catch(o){r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]")),!1)}isTrusted(e){e.url&&!e.protocol&&(e.protocol=wt.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}},Fa=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ha[lhe[this.id]]}sub(){return Ha[che[this.id]]}fracNum(){return Ha[dhe[this.id]]}fracDen(){return Ha[uhe[this.id]]}cramp(){return Ha[hhe[this.id]]}text(){return Ha[fhe[this.id]]}isTight(){return this.size>=2}},L8=0,d4=1,Wf=2,Yl=3,Q1=4,vs=5,jf=6,eo=7,Ha=[new Fa(L8,0,!1),new Fa(d4,0,!0),new Fa(Wf,1,!1),new Fa(Yl,1,!0),new Fa(Q1,2,!1),new Fa(vs,2,!0),new Fa(jf,3,!1),new Fa(eo,3,!0)],lhe=[Q1,vs,Q1,vs,jf,eo,jf,eo],che=[vs,vs,vs,vs,eo,eo,eo,eo],dhe=[Wf,Yl,Q1,vs,jf,eo,jf,eo],uhe=[Yl,Yl,vs,vs,eo,eo,eo,eo],hhe=[d4,d4,Yl,Yl,vs,vs,eo,eo],fhe=[L8,d4,Wf,Yl,Wf,Yl,Wf,Yl],_t={DISPLAY:Ha[L8],TEXT:Ha[Wf],SCRIPT:Ha[Q1],SCRIPTSCRIPT:Ha[jf]},_8=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function phe(i){for(var e=0;e<_8.length;e++)for(var t=_8[e],n=0;n=r[0]&&i<=r[1])return t.name}return null}var c4=[];_8.forEach(i=>i.blocks.forEach(e=>c4.push(...e)));function bj(i){for(var e=0;e=c4[e]&&i<=c4[e+1])return!0;return!1}var Uf=80,mhe=function(e,t){return"M95,"+(622+e+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 @@ -248,7 +248,7 @@ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,1 H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},She=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=mhe(t,jf);break;case"sqrtSize1":r=ghe(t,jf);break;case"sqrtSize2":r=vhe(t,jf);break;case"sqrtSize3":r=_he(t,jf);break;case"sqrtSize4":r=bhe(t,jf);break;case"sqrtTall":r=Che(t,jf,n)}return r},whe=function(e,t){switch(e){case"\u239C":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"\u239F":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23A2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23A5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23AA":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23D0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},aj={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},She=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=mhe(t,Uf);break;case"sqrtSize1":r=ghe(t,Uf);break;case"sqrtSize2":r=vhe(t,Uf);break;case"sqrtSize3":r=_he(t,Uf);break;case"sqrtSize4":r=bhe(t,Uf);break;case"sqrtTall":r=Che(t,Uf,n)}return r},whe=function(e,t){switch(e){case"\u239C":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"\u239F":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23A2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23A5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23AA":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23D0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},UW={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 @@ -451,15 +451,15 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},Iu=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return wt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}},za={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},l5={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},lj={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Ehe(i,e){za[i]=e}function P8(i,e,t){if(!za[e])throw new Error("Font metrics not found for font: "+e+".");var n=i.charCodeAt(0),r=za[e][n];if(!r&&i[0]in lj&&(n=lj[i[0]].charCodeAt(0),r=za[e][n]),!r&&t==="text"&&Bj(n)&&(r=za[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var u8={};function The(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!u8[e]){var t=u8[e]={cssEmPerMu:l5.quad[e]/18};for(var n in l5)l5.hasOwnProperty(n)&&(t[n]=l5[n][e])}return u8[e]}var khe=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],cj=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dj=function(e,t){return t.size<2?e:khe[e-1][t.size-1]},S5=class i{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||i.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=cj[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new i(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:dj(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:cj[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=dj(i.BASESIZE,e);return this.size===t&&this.textSize===i.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=The(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};S5.BASESIZE=6;var x8={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ihe={ex:!0,em:!0,mu:!0},zj=function(e){return typeof e!="string"&&(e=e.unit),e in x8||e in Ihe||e==="ex"},cn=function(e,t){var n;if(e.unit in x8)n=x8[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var r;if(t.style.isTight()?r=t.havingStyle(t.style.text()):r=t,e.unit==="ex")n=r.fontMetrics().xHeight;else if(e.unit==="em")n=r.fontMetrics().quad;else throw new Ie("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},ze=function(e){return+e.toFixed(4)+"em"},fd=function(e){return e.filter(t=>t).join(" ")},Uj=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Wj=function(e){var t=document.createElement(e);t.className=fd(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o",t},Au=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Uj.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return wt.contains(this.classes,e)}toNode(){return Wj.call(this,"span")}toMarkup(){return jj.call(this,"span")}},Z1=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Uj.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return wt.contains(this.classes,e)}toNode(){return Wj.call(this,"a")}toMarkup(){return jj.call(this,"a")}},E8=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return wt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=""+this.alt+"0&&(t=document.createElement("span"),t.style.marginRight=ze(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=fd(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(t=t||document.createElement("span"),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(n+="margin-right:"+this.italic+"em;");for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=wt.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+wt.escape(n)+'"');var o=wt.escape(this.text);return e?(t+=">",t+=o,t+="",t):o}},Vs=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);for(var r=0;r":""}},e0=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e=" but got "+String(i)+".")}var Mhe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Dhe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ji={math:{},text:{}};function y(i,e,t,n,r,o){ji[i][r]={font:e,group:t,replace:n},o&&n&&(ji[i][n]=ji[i][r])}var E="math",we="text",L="main",U="ams",Ji="accent-token",Je="bin",to="close",qf="inner",bt="mathord",Nn="op-token",zo="open",A5="punct",j="rel",Zl="spacing",Y="textord";y(E,L,j,"\u2261","\\equiv",!0);y(E,L,j,"\u227A","\\prec",!0);y(E,L,j,"\u227B","\\succ",!0);y(E,L,j,"\u223C","\\sim",!0);y(E,L,j,"\u22A5","\\perp");y(E,L,j,"\u2AAF","\\preceq",!0);y(E,L,j,"\u2AB0","\\succeq",!0);y(E,L,j,"\u2243","\\simeq",!0);y(E,L,j,"\u2223","\\mid",!0);y(E,L,j,"\u226A","\\ll",!0);y(E,L,j,"\u226B","\\gg",!0);y(E,L,j,"\u224D","\\asymp",!0);y(E,L,j,"\u2225","\\parallel");y(E,L,j,"\u22C8","\\bowtie",!0);y(E,L,j,"\u2323","\\smile",!0);y(E,L,j,"\u2291","\\sqsubseteq",!0);y(E,L,j,"\u2292","\\sqsupseteq",!0);y(E,L,j,"\u2250","\\doteq",!0);y(E,L,j,"\u2322","\\frown",!0);y(E,L,j,"\u220B","\\ni",!0);y(E,L,j,"\u221D","\\propto",!0);y(E,L,j,"\u22A2","\\vdash",!0);y(E,L,j,"\u22A3","\\dashv",!0);y(E,L,j,"\u220B","\\owns");y(E,L,A5,".","\\ldotp");y(E,L,A5,"\u22C5","\\cdotp");y(E,L,Y,"#","\\#");y(we,L,Y,"#","\\#");y(E,L,Y,"&","\\&");y(we,L,Y,"&","\\&");y(E,L,Y,"\u2135","\\aleph",!0);y(E,L,Y,"\u2200","\\forall",!0);y(E,L,Y,"\u210F","\\hbar",!0);y(E,L,Y,"\u2203","\\exists",!0);y(E,L,Y,"\u2207","\\nabla",!0);y(E,L,Y,"\u266D","\\flat",!0);y(E,L,Y,"\u2113","\\ell",!0);y(E,L,Y,"\u266E","\\natural",!0);y(E,L,Y,"\u2663","\\clubsuit",!0);y(E,L,Y,"\u2118","\\wp",!0);y(E,L,Y,"\u266F","\\sharp",!0);y(E,L,Y,"\u2662","\\diamondsuit",!0);y(E,L,Y,"\u211C","\\Re",!0);y(E,L,Y,"\u2661","\\heartsuit",!0);y(E,L,Y,"\u2111","\\Im",!0);y(E,L,Y,"\u2660","\\spadesuit",!0);y(E,L,Y,"\xA7","\\S",!0);y(we,L,Y,"\xA7","\\S");y(E,L,Y,"\xB6","\\P",!0);y(we,L,Y,"\xB6","\\P");y(E,L,Y,"\u2020","\\dag");y(we,L,Y,"\u2020","\\dag");y(we,L,Y,"\u2020","\\textdagger");y(E,L,Y,"\u2021","\\ddag");y(we,L,Y,"\u2021","\\ddag");y(we,L,Y,"\u2021","\\textdaggerdbl");y(E,L,to,"\u23B1","\\rmoustache",!0);y(E,L,zo,"\u23B0","\\lmoustache",!0);y(E,L,to,"\u27EF","\\rgroup",!0);y(E,L,zo,"\u27EE","\\lgroup",!0);y(E,L,Je,"\u2213","\\mp",!0);y(E,L,Je,"\u2296","\\ominus",!0);y(E,L,Je,"\u228E","\\uplus",!0);y(E,L,Je,"\u2293","\\sqcap",!0);y(E,L,Je,"\u2217","\\ast");y(E,L,Je,"\u2294","\\sqcup",!0);y(E,L,Je,"\u25EF","\\bigcirc",!0);y(E,L,Je,"\u2219","\\bullet",!0);y(E,L,Je,"\u2021","\\ddagger");y(E,L,Je,"\u2240","\\wr",!0);y(E,L,Je,"\u2A3F","\\amalg");y(E,L,Je,"&","\\And");y(E,L,j,"\u27F5","\\longleftarrow",!0);y(E,L,j,"\u21D0","\\Leftarrow",!0);y(E,L,j,"\u27F8","\\Longleftarrow",!0);y(E,L,j,"\u27F6","\\longrightarrow",!0);y(E,L,j,"\u21D2","\\Rightarrow",!0);y(E,L,j,"\u27F9","\\Longrightarrow",!0);y(E,L,j,"\u2194","\\leftrightarrow",!0);y(E,L,j,"\u27F7","\\longleftrightarrow",!0);y(E,L,j,"\u21D4","\\Leftrightarrow",!0);y(E,L,j,"\u27FA","\\Longleftrightarrow",!0);y(E,L,j,"\u21A6","\\mapsto",!0);y(E,L,j,"\u27FC","\\longmapsto",!0);y(E,L,j,"\u2197","\\nearrow",!0);y(E,L,j,"\u21A9","\\hookleftarrow",!0);y(E,L,j,"\u21AA","\\hookrightarrow",!0);y(E,L,j,"\u2198","\\searrow",!0);y(E,L,j,"\u21BC","\\leftharpoonup",!0);y(E,L,j,"\u21C0","\\rightharpoonup",!0);y(E,L,j,"\u2199","\\swarrow",!0);y(E,L,j,"\u21BD","\\leftharpoondown",!0);y(E,L,j,"\u21C1","\\rightharpoondown",!0);y(E,L,j,"\u2196","\\nwarrow",!0);y(E,L,j,"\u21CC","\\rightleftharpoons",!0);y(E,U,j,"\u226E","\\nless",!0);y(E,U,j,"\uE010","\\@nleqslant");y(E,U,j,"\uE011","\\@nleqq");y(E,U,j,"\u2A87","\\lneq",!0);y(E,U,j,"\u2268","\\lneqq",!0);y(E,U,j,"\uE00C","\\@lvertneqq");y(E,U,j,"\u22E6","\\lnsim",!0);y(E,U,j,"\u2A89","\\lnapprox",!0);y(E,U,j,"\u2280","\\nprec",!0);y(E,U,j,"\u22E0","\\npreceq",!0);y(E,U,j,"\u22E8","\\precnsim",!0);y(E,U,j,"\u2AB9","\\precnapprox",!0);y(E,U,j,"\u2241","\\nsim",!0);y(E,U,j,"\uE006","\\@nshortmid");y(E,U,j,"\u2224","\\nmid",!0);y(E,U,j,"\u22AC","\\nvdash",!0);y(E,U,j,"\u22AD","\\nvDash",!0);y(E,U,j,"\u22EA","\\ntriangleleft");y(E,U,j,"\u22EC","\\ntrianglelefteq",!0);y(E,U,j,"\u228A","\\subsetneq",!0);y(E,U,j,"\uE01A","\\@varsubsetneq");y(E,U,j,"\u2ACB","\\subsetneqq",!0);y(E,U,j,"\uE017","\\@varsubsetneqq");y(E,U,j,"\u226F","\\ngtr",!0);y(E,U,j,"\uE00F","\\@ngeqslant");y(E,U,j,"\uE00E","\\@ngeqq");y(E,U,j,"\u2A88","\\gneq",!0);y(E,U,j,"\u2269","\\gneqq",!0);y(E,U,j,"\uE00D","\\@gvertneqq");y(E,U,j,"\u22E7","\\gnsim",!0);y(E,U,j,"\u2A8A","\\gnapprox",!0);y(E,U,j,"\u2281","\\nsucc",!0);y(E,U,j,"\u22E1","\\nsucceq",!0);y(E,U,j,"\u22E9","\\succnsim",!0);y(E,U,j,"\u2ABA","\\succnapprox",!0);y(E,U,j,"\u2246","\\ncong",!0);y(E,U,j,"\uE007","\\@nshortparallel");y(E,U,j,"\u2226","\\nparallel",!0);y(E,U,j,"\u22AF","\\nVDash",!0);y(E,U,j,"\u22EB","\\ntriangleright");y(E,U,j,"\u22ED","\\ntrianglerighteq",!0);y(E,U,j,"\uE018","\\@nsupseteqq");y(E,U,j,"\u228B","\\supsetneq",!0);y(E,U,j,"\uE01B","\\@varsupsetneq");y(E,U,j,"\u2ACC","\\supsetneqq",!0);y(E,U,j,"\uE019","\\@varsupsetneqq");y(E,U,j,"\u22AE","\\nVdash",!0);y(E,U,j,"\u2AB5","\\precneqq",!0);y(E,U,j,"\u2AB6","\\succneqq",!0);y(E,U,j,"\uE016","\\@nsubseteqq");y(E,U,Je,"\u22B4","\\unlhd");y(E,U,Je,"\u22B5","\\unrhd");y(E,U,j,"\u219A","\\nleftarrow",!0);y(E,U,j,"\u219B","\\nrightarrow",!0);y(E,U,j,"\u21CD","\\nLeftarrow",!0);y(E,U,j,"\u21CF","\\nRightarrow",!0);y(E,U,j,"\u21AE","\\nleftrightarrow",!0);y(E,U,j,"\u21CE","\\nLeftrightarrow",!0);y(E,U,j,"\u25B3","\\vartriangle");y(E,U,Y,"\u210F","\\hslash");y(E,U,Y,"\u25BD","\\triangledown");y(E,U,Y,"\u25CA","\\lozenge");y(E,U,Y,"\u24C8","\\circledS");y(E,U,Y,"\xAE","\\circledR");y(we,U,Y,"\xAE","\\circledR");y(E,U,Y,"\u2221","\\measuredangle",!0);y(E,U,Y,"\u2204","\\nexists");y(E,U,Y,"\u2127","\\mho");y(E,U,Y,"\u2132","\\Finv",!0);y(E,U,Y,"\u2141","\\Game",!0);y(E,U,Y,"\u2035","\\backprime");y(E,U,Y,"\u25B2","\\blacktriangle");y(E,U,Y,"\u25BC","\\blacktriangledown");y(E,U,Y,"\u25A0","\\blacksquare");y(E,U,Y,"\u29EB","\\blacklozenge");y(E,U,Y,"\u2605","\\bigstar");y(E,U,Y,"\u2222","\\sphericalangle",!0);y(E,U,Y,"\u2201","\\complement",!0);y(E,U,Y,"\xF0","\\eth",!0);y(we,L,Y,"\xF0","\xF0");y(E,U,Y,"\u2571","\\diagup");y(E,U,Y,"\u2572","\\diagdown");y(E,U,Y,"\u25A1","\\square");y(E,U,Y,"\u25A1","\\Box");y(E,U,Y,"\u25CA","\\Diamond");y(E,U,Y,"\xA5","\\yen",!0);y(we,U,Y,"\xA5","\\yen",!0);y(E,U,Y,"\u2713","\\checkmark",!0);y(we,U,Y,"\u2713","\\checkmark");y(E,U,Y,"\u2136","\\beth",!0);y(E,U,Y,"\u2138","\\daleth",!0);y(E,U,Y,"\u2137","\\gimel",!0);y(E,U,Y,"\u03DD","\\digamma",!0);y(E,U,Y,"\u03F0","\\varkappa");y(E,U,zo,"\u250C","\\@ulcorner",!0);y(E,U,to,"\u2510","\\@urcorner",!0);y(E,U,zo,"\u2514","\\@llcorner",!0);y(E,U,to,"\u2518","\\@lrcorner",!0);y(E,U,j,"\u2266","\\leqq",!0);y(E,U,j,"\u2A7D","\\leqslant",!0);y(E,U,j,"\u2A95","\\eqslantless",!0);y(E,U,j,"\u2272","\\lesssim",!0);y(E,U,j,"\u2A85","\\lessapprox",!0);y(E,U,j,"\u224A","\\approxeq",!0);y(E,U,Je,"\u22D6","\\lessdot");y(E,U,j,"\u22D8","\\lll",!0);y(E,U,j,"\u2276","\\lessgtr",!0);y(E,U,j,"\u22DA","\\lesseqgtr",!0);y(E,U,j,"\u2A8B","\\lesseqqgtr",!0);y(E,U,j,"\u2251","\\doteqdot");y(E,U,j,"\u2253","\\risingdotseq",!0);y(E,U,j,"\u2252","\\fallingdotseq",!0);y(E,U,j,"\u223D","\\backsim",!0);y(E,U,j,"\u22CD","\\backsimeq",!0);y(E,U,j,"\u2AC5","\\subseteqq",!0);y(E,U,j,"\u22D0","\\Subset",!0);y(E,U,j,"\u228F","\\sqsubset",!0);y(E,U,j,"\u227C","\\preccurlyeq",!0);y(E,U,j,"\u22DE","\\curlyeqprec",!0);y(E,U,j,"\u227E","\\precsim",!0);y(E,U,j,"\u2AB7","\\precapprox",!0);y(E,U,j,"\u22B2","\\vartriangleleft");y(E,U,j,"\u22B4","\\trianglelefteq");y(E,U,j,"\u22A8","\\vDash",!0);y(E,U,j,"\u22AA","\\Vvdash",!0);y(E,U,j,"\u2323","\\smallsmile");y(E,U,j,"\u2322","\\smallfrown");y(E,U,j,"\u224F","\\bumpeq",!0);y(E,U,j,"\u224E","\\Bumpeq",!0);y(E,U,j,"\u2267","\\geqq",!0);y(E,U,j,"\u2A7E","\\geqslant",!0);y(E,U,j,"\u2A96","\\eqslantgtr",!0);y(E,U,j,"\u2273","\\gtrsim",!0);y(E,U,j,"\u2A86","\\gtrapprox",!0);y(E,U,Je,"\u22D7","\\gtrdot");y(E,U,j,"\u22D9","\\ggg",!0);y(E,U,j,"\u2277","\\gtrless",!0);y(E,U,j,"\u22DB","\\gtreqless",!0);y(E,U,j,"\u2A8C","\\gtreqqless",!0);y(E,U,j,"\u2256","\\eqcirc",!0);y(E,U,j,"\u2257","\\circeq",!0);y(E,U,j,"\u225C","\\triangleq",!0);y(E,U,j,"\u223C","\\thicksim");y(E,U,j,"\u2248","\\thickapprox");y(E,U,j,"\u2AC6","\\supseteqq",!0);y(E,U,j,"\u22D1","\\Supset",!0);y(E,U,j,"\u2290","\\sqsupset",!0);y(E,U,j,"\u227D","\\succcurlyeq",!0);y(E,U,j,"\u22DF","\\curlyeqsucc",!0);y(E,U,j,"\u227F","\\succsim",!0);y(E,U,j,"\u2AB8","\\succapprox",!0);y(E,U,j,"\u22B3","\\vartriangleright");y(E,U,j,"\u22B5","\\trianglerighteq");y(E,U,j,"\u22A9","\\Vdash",!0);y(E,U,j,"\u2223","\\shortmid");y(E,U,j,"\u2225","\\shortparallel");y(E,U,j,"\u226C","\\between",!0);y(E,U,j,"\u22D4","\\pitchfork",!0);y(E,U,j,"\u221D","\\varpropto");y(E,U,j,"\u25C0","\\blacktriangleleft");y(E,U,j,"\u2234","\\therefore",!0);y(E,U,j,"\u220D","\\backepsilon");y(E,U,j,"\u25B6","\\blacktriangleright");y(E,U,j,"\u2235","\\because",!0);y(E,U,j,"\u22D8","\\llless");y(E,U,j,"\u22D9","\\gggtr");y(E,U,Je,"\u22B2","\\lhd");y(E,U,Je,"\u22B3","\\rhd");y(E,U,j,"\u2242","\\eqsim",!0);y(E,L,j,"\u22C8","\\Join");y(E,U,j,"\u2251","\\Doteq",!0);y(E,U,Je,"\u2214","\\dotplus",!0);y(E,U,Je,"\u2216","\\smallsetminus");y(E,U,Je,"\u22D2","\\Cap",!0);y(E,U,Je,"\u22D3","\\Cup",!0);y(E,U,Je,"\u2A5E","\\doublebarwedge",!0);y(E,U,Je,"\u229F","\\boxminus",!0);y(E,U,Je,"\u229E","\\boxplus",!0);y(E,U,Je,"\u22C7","\\divideontimes",!0);y(E,U,Je,"\u22C9","\\ltimes",!0);y(E,U,Je,"\u22CA","\\rtimes",!0);y(E,U,Je,"\u22CB","\\leftthreetimes",!0);y(E,U,Je,"\u22CC","\\rightthreetimes",!0);y(E,U,Je,"\u22CF","\\curlywedge",!0);y(E,U,Je,"\u22CE","\\curlyvee",!0);y(E,U,Je,"\u229D","\\circleddash",!0);y(E,U,Je,"\u229B","\\circledast",!0);y(E,U,Je,"\u22C5","\\centerdot");y(E,U,Je,"\u22BA","\\intercal",!0);y(E,U,Je,"\u22D2","\\doublecap");y(E,U,Je,"\u22D3","\\doublecup");y(E,U,Je,"\u22A0","\\boxtimes",!0);y(E,U,j,"\u21E2","\\dashrightarrow",!0);y(E,U,j,"\u21E0","\\dashleftarrow",!0);y(E,U,j,"\u21C7","\\leftleftarrows",!0);y(E,U,j,"\u21C6","\\leftrightarrows",!0);y(E,U,j,"\u21DA","\\Lleftarrow",!0);y(E,U,j,"\u219E","\\twoheadleftarrow",!0);y(E,U,j,"\u21A2","\\leftarrowtail",!0);y(E,U,j,"\u21AB","\\looparrowleft",!0);y(E,U,j,"\u21CB","\\leftrightharpoons",!0);y(E,U,j,"\u21B6","\\curvearrowleft",!0);y(E,U,j,"\u21BA","\\circlearrowleft",!0);y(E,U,j,"\u21B0","\\Lsh",!0);y(E,U,j,"\u21C8","\\upuparrows",!0);y(E,U,j,"\u21BF","\\upharpoonleft",!0);y(E,U,j,"\u21C3","\\downharpoonleft",!0);y(E,L,j,"\u22B6","\\origof",!0);y(E,L,j,"\u22B7","\\imageof",!0);y(E,U,j,"\u22B8","\\multimap",!0);y(E,U,j,"\u21AD","\\leftrightsquigarrow",!0);y(E,U,j,"\u21C9","\\rightrightarrows",!0);y(E,U,j,"\u21C4","\\rightleftarrows",!0);y(E,U,j,"\u21A0","\\twoheadrightarrow",!0);y(E,U,j,"\u21A3","\\rightarrowtail",!0);y(E,U,j,"\u21AC","\\looparrowright",!0);y(E,U,j,"\u21B7","\\curvearrowright",!0);y(E,U,j,"\u21BB","\\circlearrowright",!0);y(E,U,j,"\u21B1","\\Rsh",!0);y(E,U,j,"\u21CA","\\downdownarrows",!0);y(E,U,j,"\u21BE","\\upharpoonright",!0);y(E,U,j,"\u21C2","\\downharpoonright",!0);y(E,U,j,"\u21DD","\\rightsquigarrow",!0);y(E,U,j,"\u21DD","\\leadsto");y(E,U,j,"\u21DB","\\Rrightarrow",!0);y(E,U,j,"\u21BE","\\restriction");y(E,L,Y,"\u2018","`");y(E,L,Y,"$","\\$");y(we,L,Y,"$","\\$");y(we,L,Y,"$","\\textdollar");y(E,L,Y,"%","\\%");y(we,L,Y,"%","\\%");y(E,L,Y,"_","\\_");y(we,L,Y,"_","\\_");y(we,L,Y,"_","\\textunderscore");y(E,L,Y,"\u2220","\\angle",!0);y(E,L,Y,"\u221E","\\infty",!0);y(E,L,Y,"\u2032","\\prime");y(E,L,Y,"\u25B3","\\triangle");y(E,L,Y,"\u0393","\\Gamma",!0);y(E,L,Y,"\u0394","\\Delta",!0);y(E,L,Y,"\u0398","\\Theta",!0);y(E,L,Y,"\u039B","\\Lambda",!0);y(E,L,Y,"\u039E","\\Xi",!0);y(E,L,Y,"\u03A0","\\Pi",!0);y(E,L,Y,"\u03A3","\\Sigma",!0);y(E,L,Y,"\u03A5","\\Upsilon",!0);y(E,L,Y,"\u03A6","\\Phi",!0);y(E,L,Y,"\u03A8","\\Psi",!0);y(E,L,Y,"\u03A9","\\Omega",!0);y(E,L,Y,"A","\u0391");y(E,L,Y,"B","\u0392");y(E,L,Y,"E","\u0395");y(E,L,Y,"Z","\u0396");y(E,L,Y,"H","\u0397");y(E,L,Y,"I","\u0399");y(E,L,Y,"K","\u039A");y(E,L,Y,"M","\u039C");y(E,L,Y,"N","\u039D");y(E,L,Y,"O","\u039F");y(E,L,Y,"P","\u03A1");y(E,L,Y,"T","\u03A4");y(E,L,Y,"X","\u03A7");y(E,L,Y,"\xAC","\\neg",!0);y(E,L,Y,"\xAC","\\lnot");y(E,L,Y,"\u22A4","\\top");y(E,L,Y,"\u22A5","\\bot");y(E,L,Y,"\u2205","\\emptyset");y(E,U,Y,"\u2205","\\varnothing");y(E,L,bt,"\u03B1","\\alpha",!0);y(E,L,bt,"\u03B2","\\beta",!0);y(E,L,bt,"\u03B3","\\gamma",!0);y(E,L,bt,"\u03B4","\\delta",!0);y(E,L,bt,"\u03F5","\\epsilon",!0);y(E,L,bt,"\u03B6","\\zeta",!0);y(E,L,bt,"\u03B7","\\eta",!0);y(E,L,bt,"\u03B8","\\theta",!0);y(E,L,bt,"\u03B9","\\iota",!0);y(E,L,bt,"\u03BA","\\kappa",!0);y(E,L,bt,"\u03BB","\\lambda",!0);y(E,L,bt,"\u03BC","\\mu",!0);y(E,L,bt,"\u03BD","\\nu",!0);y(E,L,bt,"\u03BE","\\xi",!0);y(E,L,bt,"\u03BF","\\omicron",!0);y(E,L,bt,"\u03C0","\\pi",!0);y(E,L,bt,"\u03C1","\\rho",!0);y(E,L,bt,"\u03C3","\\sigma",!0);y(E,L,bt,"\u03C4","\\tau",!0);y(E,L,bt,"\u03C5","\\upsilon",!0);y(E,L,bt,"\u03D5","\\phi",!0);y(E,L,bt,"\u03C7","\\chi",!0);y(E,L,bt,"\u03C8","\\psi",!0);y(E,L,bt,"\u03C9","\\omega",!0);y(E,L,bt,"\u03B5","\\varepsilon",!0);y(E,L,bt,"\u03D1","\\vartheta",!0);y(E,L,bt,"\u03D6","\\varpi",!0);y(E,L,bt,"\u03F1","\\varrho",!0);y(E,L,bt,"\u03C2","\\varsigma",!0);y(E,L,bt,"\u03C6","\\varphi",!0);y(E,L,Je,"\u2217","*",!0);y(E,L,Je,"+","+");y(E,L,Je,"\u2212","-",!0);y(E,L,Je,"\u22C5","\\cdot",!0);y(E,L,Je,"\u2218","\\circ",!0);y(E,L,Je,"\xF7","\\div",!0);y(E,L,Je,"\xB1","\\pm",!0);y(E,L,Je,"\xD7","\\times",!0);y(E,L,Je,"\u2229","\\cap",!0);y(E,L,Je,"\u222A","\\cup",!0);y(E,L,Je,"\u2216","\\setminus",!0);y(E,L,Je,"\u2227","\\land");y(E,L,Je,"\u2228","\\lor");y(E,L,Je,"\u2227","\\wedge",!0);y(E,L,Je,"\u2228","\\vee",!0);y(E,L,Y,"\u221A","\\surd");y(E,L,zo,"\u27E8","\\langle",!0);y(E,L,zo,"\u2223","\\lvert");y(E,L,zo,"\u2225","\\lVert");y(E,L,to,"?","?");y(E,L,to,"!","!");y(E,L,to,"\u27E9","\\rangle",!0);y(E,L,to,"\u2223","\\rvert");y(E,L,to,"\u2225","\\rVert");y(E,L,j,"=","=");y(E,L,j,":",":");y(E,L,j,"\u2248","\\approx",!0);y(E,L,j,"\u2245","\\cong",!0);y(E,L,j,"\u2265","\\ge");y(E,L,j,"\u2265","\\geq",!0);y(E,L,j,"\u2190","\\gets");y(E,L,j,">","\\gt",!0);y(E,L,j,"\u2208","\\in",!0);y(E,L,j,"\uE020","\\@not");y(E,L,j,"\u2282","\\subset",!0);y(E,L,j,"\u2283","\\supset",!0);y(E,L,j,"\u2286","\\subseteq",!0);y(E,L,j,"\u2287","\\supseteq",!0);y(E,U,j,"\u2288","\\nsubseteq",!0);y(E,U,j,"\u2289","\\nsupseteq",!0);y(E,L,j,"\u22A8","\\models");y(E,L,j,"\u2190","\\leftarrow",!0);y(E,L,j,"\u2264","\\le");y(E,L,j,"\u2264","\\leq",!0);y(E,L,j,"<","\\lt",!0);y(E,L,j,"\u2192","\\rightarrow",!0);y(E,L,j,"\u2192","\\to");y(E,U,j,"\u2271","\\ngeq",!0);y(E,U,j,"\u2270","\\nleq",!0);y(E,L,Zl,"\xA0","\\ ");y(E,L,Zl,"\xA0","\\space");y(E,L,Zl,"\xA0","\\nobreakspace");y(we,L,Zl,"\xA0","\\ ");y(we,L,Zl,"\xA0"," ");y(we,L,Zl,"\xA0","\\space");y(we,L,Zl,"\xA0","\\nobreakspace");y(E,L,Zl,null,"\\nobreak");y(E,L,Zl,null,"\\allowbreak");y(E,L,A5,",",",");y(E,L,A5,";",";");y(E,U,Je,"\u22BC","\\barwedge",!0);y(E,U,Je,"\u22BB","\\veebar",!0);y(E,L,Je,"\u2299","\\odot",!0);y(E,L,Je,"\u2295","\\oplus",!0);y(E,L,Je,"\u2297","\\otimes",!0);y(E,L,Y,"\u2202","\\partial",!0);y(E,L,Je,"\u2298","\\oslash",!0);y(E,U,Je,"\u229A","\\circledcirc",!0);y(E,U,Je,"\u22A1","\\boxdot",!0);y(E,L,Je,"\u25B3","\\bigtriangleup");y(E,L,Je,"\u25BD","\\bigtriangledown");y(E,L,Je,"\u2020","\\dagger");y(E,L,Je,"\u22C4","\\diamond");y(E,L,Je,"\u22C6","\\star");y(E,L,Je,"\u25C3","\\triangleleft");y(E,L,Je,"\u25B9","\\triangleright");y(E,L,zo,"{","\\{");y(we,L,Y,"{","\\{");y(we,L,Y,"{","\\textbraceleft");y(E,L,to,"}","\\}");y(we,L,Y,"}","\\}");y(we,L,Y,"}","\\textbraceright");y(E,L,zo,"{","\\lbrace");y(E,L,to,"}","\\rbrace");y(E,L,zo,"[","\\lbrack",!0);y(we,L,Y,"[","\\lbrack",!0);y(E,L,to,"]","\\rbrack",!0);y(we,L,Y,"]","\\rbrack",!0);y(E,L,zo,"(","\\lparen",!0);y(E,L,to,")","\\rparen",!0);y(we,L,Y,"<","\\textless",!0);y(we,L,Y,">","\\textgreater",!0);y(E,L,zo,"\u230A","\\lfloor",!0);y(E,L,to,"\u230B","\\rfloor",!0);y(E,L,zo,"\u2308","\\lceil",!0);y(E,L,to,"\u2309","\\rceil",!0);y(E,L,Y,"\\","\\backslash");y(E,L,Y,"\u2223","|");y(E,L,Y,"\u2223","\\vert");y(we,L,Y,"|","\\textbar",!0);y(E,L,Y,"\u2225","\\|");y(E,L,Y,"\u2225","\\Vert");y(we,L,Y,"\u2225","\\textbardbl");y(we,L,Y,"~","\\textasciitilde");y(we,L,Y,"\\","\\textbackslash");y(we,L,Y,"^","\\textasciicircum");y(E,L,j,"\u2191","\\uparrow",!0);y(E,L,j,"\u21D1","\\Uparrow",!0);y(E,L,j,"\u2193","\\downarrow",!0);y(E,L,j,"\u21D3","\\Downarrow",!0);y(E,L,j,"\u2195","\\updownarrow",!0);y(E,L,j,"\u21D5","\\Updownarrow",!0);y(E,L,Nn,"\u2210","\\coprod");y(E,L,Nn,"\u22C1","\\bigvee");y(E,L,Nn,"\u22C0","\\bigwedge");y(E,L,Nn,"\u2A04","\\biguplus");y(E,L,Nn,"\u22C2","\\bigcap");y(E,L,Nn,"\u22C3","\\bigcup");y(E,L,Nn,"\u222B","\\int");y(E,L,Nn,"\u222B","\\intop");y(E,L,Nn,"\u222C","\\iint");y(E,L,Nn,"\u222D","\\iiint");y(E,L,Nn,"\u220F","\\prod");y(E,L,Nn,"\u2211","\\sum");y(E,L,Nn,"\u2A02","\\bigotimes");y(E,L,Nn,"\u2A01","\\bigoplus");y(E,L,Nn,"\u2A00","\\bigodot");y(E,L,Nn,"\u222E","\\oint");y(E,L,Nn,"\u222F","\\oiint");y(E,L,Nn,"\u2230","\\oiiint");y(E,L,Nn,"\u2A06","\\bigsqcup");y(E,L,Nn,"\u222B","\\smallint");y(we,L,qf,"\u2026","\\textellipsis");y(E,L,qf,"\u2026","\\mathellipsis");y(we,L,qf,"\u2026","\\ldots",!0);y(E,L,qf,"\u2026","\\ldots",!0);y(E,L,qf,"\u22EF","\\@cdots",!0);y(E,L,qf,"\u22F1","\\ddots",!0);y(E,L,Y,"\u22EE","\\varvdots");y(E,L,Ji,"\u02CA","\\acute");y(E,L,Ji,"\u02CB","\\grave");y(E,L,Ji,"\xA8","\\ddot");y(E,L,Ji,"~","\\tilde");y(E,L,Ji,"\u02C9","\\bar");y(E,L,Ji,"\u02D8","\\breve");y(E,L,Ji,"\u02C7","\\check");y(E,L,Ji,"^","\\hat");y(E,L,Ji,"\u20D7","\\vec");y(E,L,Ji,"\u02D9","\\dot");y(E,L,Ji,"\u02DA","\\mathring");y(E,L,bt,"\uE131","\\@imath");y(E,L,bt,"\uE237","\\@jmath");y(E,L,Y,"\u0131","\u0131");y(E,L,Y,"\u0237","\u0237");y(we,L,Y,"\u0131","\\i",!0);y(we,L,Y,"\u0237","\\j",!0);y(we,L,Y,"\xDF","\\ss",!0);y(we,L,Y,"\xE6","\\ae",!0);y(we,L,Y,"\u0153","\\oe",!0);y(we,L,Y,"\xF8","\\o",!0);y(we,L,Y,"\xC6","\\AE",!0);y(we,L,Y,"\u0152","\\OE",!0);y(we,L,Y,"\xD8","\\O",!0);y(we,L,Ji,"\u02CA","\\'");y(we,L,Ji,"\u02CB","\\`");y(we,L,Ji,"\u02C6","\\^");y(we,L,Ji,"\u02DC","\\~");y(we,L,Ji,"\u02C9","\\=");y(we,L,Ji,"\u02D8","\\u");y(we,L,Ji,"\u02D9","\\.");y(we,L,Ji,"\xB8","\\c");y(we,L,Ji,"\u02DA","\\r");y(we,L,Ji,"\u02C7","\\v");y(we,L,Ji,"\xA8",'\\"');y(we,L,Ji,"\u02DD","\\H");y(we,L,Ji,"\u25EF","\\textcircled");var Vj={"--":!0,"---":!0,"``":!0,"''":!0};y(we,L,Y,"\u2013","--",!0);y(we,L,Y,"\u2013","\\textendash");y(we,L,Y,"\u2014","---",!0);y(we,L,Y,"\u2014","\\textemdash");y(we,L,Y,"\u2018","`",!0);y(we,L,Y,"\u2018","\\textquoteleft");y(we,L,Y,"\u2019","'",!0);y(we,L,Y,"\u2019","\\textquoteright");y(we,L,Y,"\u201C","``",!0);y(we,L,Y,"\u201C","\\textquotedblleft");y(we,L,Y,"\u201D","''",!0);y(we,L,Y,"\u201D","\\textquotedblright");y(E,L,Y,"\xB0","\\degree",!0);y(we,L,Y,"\xB0","\\degree");y(we,L,Y,"\xB0","\\textdegree",!0);y(E,L,Y,"\xA3","\\pounds");y(E,L,Y,"\xA3","\\mathsterling",!0);y(we,L,Y,"\xA3","\\pounds");y(we,L,Y,"\xA3","\\textsterling",!0);y(E,U,Y,"\u2720","\\maltese");y(we,U,Y,"\u2720","\\maltese");var hj='0123456789/@."';for(c5=0;c5{if(fd(i.classes)!==fd(e.classes)||i.skew!==e.skew||i.maxFontSize!==e.maxFontSize)return!1;if(i.classes.length===1){var t=i.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n in i.style)if(i.style.hasOwnProperty(n)&&i.style[n]!==e.style[n])return!1;for(var r in e.style)if(e.style.hasOwnProperty(r)&&i.style[r]!==e.style[r])return!1;return!0},Hhe=i=>{for(var e=0;et&&(t=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},vo=function(e,t,n,r){var o=new Au(e,t,n,r);return F8(o),o},Kj=(i,e,t,n)=>new Au(i,e,t,n),Bhe=function(e,t,n){var r=vo([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=ze(r.height),r.maxFontSize=1,r},zhe=function(e,t,n,r){var o=new Z1(e,t,n,r);return F8(o),o},qj=function(e){var t=new Iu(e);return F8(t),t},Uhe=function(e,t){return e instanceof Iu?vo([],[e],t):e},Whe=function(e){if(e.positionType==="individualShift"){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,s=1;s{var t=vo(["mspace"],[],e),n=cn(i,e);return t.style.marginRight=ze(n),t},p5=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}var o;return t==="textbf"&&n==="textit"?o="BoldItalic":t==="textbf"?o="Bold":t==="textit"?o="Italic":o="Regular",r+"-"+o},Gj={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},$j={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Khe=function(e,t){var[n,r,o]=$j[e],s=new Wa(n),a=new Vs([s],{width:ze(r),height:ze(o),style:"width:"+ze(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=Kj(["overlay"],[a],t);return l.height=o,l.style.height=ze(o),l.style.width=ze(r),l},te={fontMap:Gj,makeSymbol:js,mathsym:Rhe,makeSpan:vo,makeSvgSpan:Kj,makeLineSpan:Bhe,makeAnchor:zhe,makeFragment:qj,wrapFragment:Uhe,makeVList:jhe,makeOrd:Phe,makeGlue:Vhe,staticSvg:Khe,svgData:$j,tryCombineChars:Hhe},ln={number:3,unit:"mu"},Tu={number:4,unit:"mu"},$l={number:5,unit:"mu"},qhe={mord:{mop:ln,mbin:Tu,mrel:$l,minner:ln},mop:{mord:ln,mop:ln,mrel:$l,minner:ln},mbin:{mord:Tu,mop:Tu,mopen:Tu,minner:Tu},mrel:{mord:$l,mop:$l,mopen:$l,minner:$l},mopen:{},mclose:{mop:ln,mbin:Tu,mrel:$l,minner:ln},mpunct:{mord:ln,mop:ln,mrel:$l,mopen:ln,mclose:ln,mpunct:ln,minner:ln},minner:{mord:ln,mop:ln,mbin:Tu,mrel:$l,mopen:ln,mpunct:ln,minner:ln}},Ghe={mord:{mop:ln},mop:{mord:ln,mop:ln},mbin:{},mrel:{},mopen:{},mclose:{mop:ln},mpunct:{},minner:{mop:ln}},Yj={},x5={},E5={};function Ye(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:r},l=0;l{var b=g.classes[0],S=m.classes[0];b==="mbin"&&wt.contains(Yhe,S)?g.classes[0]="mord":S==="mbin"&&wt.contains($he,b)&&(m.classes[0]="mord")},{node:u},h,p),mj(o,(m,g)=>{var b=k8(g),S=k8(m),k=b&&S?m.hasClass("mtight")?Ghe[b][S]:qhe[b][S]:null;if(k)return te.makeGlue(k,c)},{node:u},h,p),o},mj=function i(e,t,n,r,o){r&&e.push(r);for(var s=0;sh=>{e.splice(u+1,0,h),s++})(s)}r&&e.pop()},Xj=function(e){return e instanceof Iu||e instanceof Z1||e instanceof Au&&e.hasClass("enclosing")?e:null},Jhe=function i(e,t){var n=Xj(e);if(n){var r=n.children;if(r.length){if(t==="right")return i(r[r.length-1],"right");if(t==="left")return i(r[0],"left")}}return e},k8=function(e,t){return e?(t&&(e=Jhe(e,t)),Qhe[e.classes[0]]||null):null},t0=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Ql(t.concat(n))},ci=function(e,t,n){if(!e)return Ql();if(x5[e.type]){var r=x5[e.type](e,t);if(n&&t.size!==n.size){r=Ql(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}else throw new Ie("Got group of unknown type: '"+e.type+"'")};function m5(i,e){var t=Ql(["base"],i,e),n=Ql(["strut"]);return n.style.height=ze(t.height+t.depth),t.depth&&(n.style.verticalAlign=ze(-t.depth)),t.children.unshift(n),t}function I8(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=Yn(i,e,"root"),r;n.length===2&&n[1].hasClass("tag")&&(r=n.pop());for(var o=[],s=[],a=0;a0&&(o.push(m5(s,e)),s=[]),o.push(n[a]));s.length>0&&o.push(m5(s,e));var c;t?(c=m5(Yn(t,e,!0)),c.classes=["tag"],o.push(c)):r&&o.push(r);var d=Ql(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),c){var u=c.children[0];u.style.height=ze(d.height+d.depth),d.depth&&(u.style.verticalAlign=ze(-d.depth))}return d}function Qj(i){return new Iu(i)}var _o=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=fd(this.classes));for(var n=0;n0&&(e+=' class ="'+wt.escape(fd(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}},ku=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return wt.escape(this.toText())}toText(){return this.text}},A8=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ze(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},Ee={MathNode:_o,TextNode:ku,SpaceNode:A8,newDocumentFragment:Qj},_s=function(e,t,n){return ji[t][e]&&ji[t][e].replace&&e.charCodeAt(0)!==55349&&!(Vj.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=ji[t][e].replace),new Ee.TextNode(e)},H8=function(e){return e.length===1?e[0]:new Ee.MathNode("mrow",e)},B8=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var o=e.text;if(wt.contains(["\\imath","\\jmath"],o))return null;ji[r][o]&&ji[r][o].replace&&(o=ji[r][o].replace);var s=te.fontMap[n].fontName;return P8(o,s,r)?te.fontMap[n].variant:null},yo=function(e,t,n){if(e.length===1){var r=Ri(e[0],t);return n&&r instanceof _o&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o=[],s,a=0;a0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),o.pop())}}}o.push(l),s=l}return o},pd=function(e,t,n){return H8(yo(e,t,n))},Ri=function(e,t){if(!e)return new Ee.MathNode("mrow");if(E5[e.type]){var n=E5[e.type](e,t);return n}else throw new Ie("Got group of unknown type: '"+e.type+"'")};function gj(i,e,t,n,r){var o=yo(i,t),s;o.length===1&&o[0]instanceof _o&&wt.contains(["mrow","mtable"],o[0].type)?s=o[0]:s=new Ee.MathNode("mrow",o);var a=new Ee.MathNode("annotation",[new Ee.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new Ee.MathNode("semantics",[s,a]),c=new Ee.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=r?"katex":"katex-mathml";return te.makeSpan([d],[c])}var Jj=function(e){return new S5({style:e.displayMode?_t.DISPLAY:_t.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Zj=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=te.makeSpan(n,[e])}return e},Zhe=function(e,t,n){var r=Jj(n),o;if(n.output==="mathml")return gj(e,t,r,n.displayMode,!0);if(n.output==="html"){var s=I8(e,r);o=te.makeSpan(["katex"],[s])}else{var a=gj(e,t,r,n.displayMode,!1),l=I8(e,r);o=te.makeSpan(["katex"],[a,l])}return Zj(o,n)},efe=function(e,t,n){var r=Jj(n),o=I8(e,r),s=te.makeSpan(["katex"],[o]);return Zj(s,n)},tfe={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},ife=function(e){var t=new Ee.MathNode("mo",[new Ee.TextNode(tfe[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},nfe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},rfe=function(e){return e.type==="ordgroup"?e.body.length:1},ofe=function(e,t){function n(){var a=4e5,l=e.label.slice(1);if(wt.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=rfe(c.base),u,h,p;if(d>5)l==="widehat"||l==="widecheck"?(u=420,a=2364,p=.42,h=l+"4"):(u=312,a=2340,p=.34,h="tilde4");else{var m=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][m],u=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],h=l+m):(a=[0,600,1033,2339,2340][m],u=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],h="tilde"+m)}var g=new Wa(h),b=new Vs([g],{width:"100%",height:ze(p),viewBox:"0 0 "+a+" "+u,preserveAspectRatio:"none"});return{span:te.makeSvgSpan([],[b],t),minWidth:0,height:p}}else{var S=[],k=nfe[l],[N,A,H]=k,K=H/1e3,W=N.length,re,ae;if(W===1){var Ne=k[3];re=["hide-tail"],ae=[Ne]}else if(W===2)re=["halfarrow-left","halfarrow-right"],ae=["xMinYMin","xMaxYMin"];else if(W===3)re=["brace-left","brace-center","brace-right"],ae=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+W+" children.");for(var he=0;he0&&(r.style.minWidth=ze(o)),r},sfe=function(e,t,n,r,o){var s,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(s=te.makeSpan(["stretchy",t],[],o),t==="fbox"){var l=o.color&&o.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new e0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&c.push(new e0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Vs(c,{width:"100%",height:ze(a)});s=te.makeSvgSpan([],[d],o)}return s.height=a,s.style.height=ze(a),s},Jl={encloseSpan:sfe,mathMLnode:ife,svgSpan:ofe};function Wt(i,e){if(!i||i.type!==e)throw new Error("Expected node of type "+e+", but got "+(i?"node of type "+i.type:String(i)));return i}function z8(i){var e=M5(i);if(!e)throw new Error("Expected node of symbol group type, but got "+(i?"node of type "+i.type:String(i)));return e}function M5(i){return i&&(i.type==="atom"||Dhe.hasOwnProperty(i.type))?i:null}var U8=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=Wt(i.base,"accent"),t=n.base,i.base=t,r=Lhe(ci(i,e)),i.base=n):(n=Wt(i,"accent"),t=n.base);var o=ci(t,e.havingCrampedStyle()),s=n.isShifty&&wt.isCharacterBox(t),a=0;if(s){var l=wt.getBaseElem(t),c=ci(l,e.havingCrampedStyle());a=uj(c).skew}var d=n.label==="\\c",u=d?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight),h;if(n.isStretchy)h=Jl.svgSpan(n,e),h=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+ze(2*a)+")",marginLeft:ze(2*a)}:void 0}]},e);else{var p,m;n.label==="\\vec"?(p=te.staticSvg("vec",e),m=te.svgData.vec[1]):(p=te.makeOrd({mode:n.mode,text:n.label},e,"textord"),p=uj(p),p.italic=0,m=p.width,d&&(u+=p.depth)),h=te.makeSpan(["accent-body"],[p]);var g=n.label==="\\textcircled";g&&(h.classes.push("accent-full"),u=o.height);var b=a;g||(b-=m/2),h.style.left=ze(b),n.label==="\\textcircled"&&(h.style.top=".2em"),h=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:h}]},e)}var S=te.makeSpan(["mord","accent"],[h],e);return r?(r.children[0]=S,r.height=Math.max(S.height,r.height),r.classes[0]="mord",r):S},eV=(i,e)=>{var t=i.isStretchy?Jl.mathMLnode(i.label):new Ee.MathNode("mo",[_s(i.label,i.mode)]),n=new Ee.MathNode("mover",[Ri(i.base,e),t]);return n.setAttribute("accent","true"),n},afe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));Ye({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(i,e)=>{var t=T5(e[0]),n=!afe.test(i.funcName),r=!n||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:n,isShifty:r,base:t}},htmlBuilder:U8,mathmlBuilder:eV});Ye({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(i,e)=>{var t=e[0],n=i.parser.mode;return n==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:U8,mathmlBuilder:eV});Ye({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"accentUnder",mode:t.mode,label:n,base:r}},htmlBuilder:(i,e)=>{var t=ci(i.base,e),n=Jl.svgSpan(i,e),r=i.label==="\\utilde"?.12:0,o=te.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]},e);return te.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(i,e)=>{var t=Jl.mathMLnode(i.label),n=new Ee.MathNode("munder",[Ri(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var g5=i=>{var e=new Ee.MathNode("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Ye({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n,funcName:r}=i;return{type:"xArrow",mode:n.mode,label:r,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,n=e.havingStyle(t.sup()),r=te.wrapFragment(ci(i.body,n,e),e),o=i.label.slice(0,2)==="\\x"?"x":"cd";r.classes.push(o+"-arrow-pad");var s;i.below&&(n=e.havingStyle(t.sub()),s=te.wrapFragment(ci(i.below,n,e),e),s.classes.push(o+"-arrow-pad"));var a=Jl.svgSpan(i,e),l=-e.fontMetrics().axisHeight+.5*a.height,c=-e.fontMetrics().axisHeight-.5*a.height-.111;(r.depth>.25||i.label==="\\xleftequilibrium")&&(c-=r.depth);var d;if(s){var u=-e.fontMetrics().axisHeight+s.height+.5*a.height+.111;d=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:u}]},e)}else d=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),te.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(i,e){var t=Jl.mathMLnode(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(i.body){var r=g5(Ri(i.body,e));if(i.below){var o=g5(Ri(i.below,e));n=new Ee.MathNode("munderover",[t,o,r])}else n=new Ee.MathNode("mover",[t,r])}else if(i.below){var s=g5(Ri(i.below,e));n=new Ee.MathNode("munder",[t,s])}else n=g5(),n=new Ee.MathNode("mover",[t,n]);return n}});var lfe=te.makeSpan;function tV(i,e){var t=Yn(i.body,e,!0);return lfe([i.mclass],t,e)}function iV(i,e){var t,n=yo(i.body,e);return i.mclass==="minner"?t=new Ee.MathNode("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new Ee.MathNode("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new Ee.MathNode("mo",n),i.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):i.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):i.mclass==="mopen"||i.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):i.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}Ye({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Tn(r),isCharacterBox:wt.isCharacterBox(r)}},htmlBuilder:tV,mathmlBuilder:iV});var D5=i=>{var e=i.type==="ordgroup"&&i.body.length?i.body[0]:i;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};Ye({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:D5(e[0]),body:Tn(e[1]),isCharacterBox:wt.isCharacterBox(e[1])}}});Ye({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:n}=i,r=e[1],o=e[0],s;n!=="\\stackrel"?s=D5(r):s="mrel";var a={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Tn(r)},l={type:"supsub",mode:o.mode,base:a,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:s,body:[l],isCharacterBox:wt.isCharacterBox(l)}},htmlBuilder:tV,mathmlBuilder:iV});Ye({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:D5(e[0]),body:Tn(e[0])}},htmlBuilder(i,e){var t=Yn(i.body,e,!0),n=te.makeSpan([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=yo(i.body,e),n=new Ee.MathNode("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var cfe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},vj=()=>({type:"styling",body:[],mode:"math",style:"display"}),_j=i=>i.type==="textord"&&i.text==="@",dfe=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function ufe(i,e,t){var n=cfe[i];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var r=t.callFunction("\\\\cdleft",[e[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},s=t.callFunction("\\Big",[o],[]),a=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[r,s,a]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function hfe(i){var e=[];for(i.gullet.beginGroup(),i.gullet.macros.set("\\cr","\\\\\\relax"),i.gullet.beginGroup();;){e.push(i.parseExpression(!1,"\\\\")),i.gullet.endGroup(),i.gullet.beginGroup();var t=i.fetch().text;if(t==="&"||t==="\\\\")i.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Ie("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],o=0;o-1))if("<>AV".indexOf(c)>-1)for(var u=0;u<2;u++){for(var h=!0,p=l+1;pAV=|." after @',s[l]);var m=ufe(c,d,i),g={type:"styling",body:[m],mode:"math",style:"display"};n.push(g),a=vj()}o%2===0?n.push(a):n.shift(),n=[],r.push(n)}i.gullet.endGroup(),i.gullet.endGroup();var b=new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}Ye({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),n=te.wrapFragment(ci(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=ze(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new Ee.MathNode("mrow",[Ri(i.label,e)]);return t=new Ee.MathNode("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ee.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});Ye({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(i,e){var{parser:t}=i;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(i,e){var t=te.wrapFragment(ci(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Ee.MathNode("mrow",[Ri(i.fragment,e)])}});Ye({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=Wt(e[0],"ordgroup"),r=n.body,o="",s=0;s=1114111)throw new Ie("\\@char with invalid code point "+o);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:c}}});var nV=(i,e)=>{var t=Yn(i.body,e.withColor(i.color),!1);return te.makeFragment(t)},rV=(i,e)=>{var t=yo(i.body,e.withColor(i.color)),n=new Ee.MathNode("mstyle",t);return n.setAttribute("mathcolor",i.color),n};Ye({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=Wt(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:Tn(r)}},htmlBuilder:nV,mathmlBuilder:rV});Ye({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=Wt(e[0],"color-token").color;t.gullet.macros.set("\\current@color",r);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:r,body:o}},htmlBuilder:nV,mathmlBuilder:rV});Ye({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:n}=i,r=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:r&&Wt(r,"size").value}},htmlBuilder(i,e){var t=te.makeSpan(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=ze(cn(i.size,e)))),t},mathmlBuilder(i,e){var t=new Ee.MathNode("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",ze(cn(i.size,e)))),t}});var L8={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},oV=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Ie("Expected a control sequence",i);return e},ffe=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},sV=(i,e,t,n)=>{var r=i.gullet.macros.get(t.text);r==null&&(t.noexpand=!0,r={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,r,n)};Ye({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var n=e.fetch();if(L8[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=L8[n.text]),Wt(e.parseFunction(),"internal");throw new Ie("Invalid token after macro prefix",n)}});Ye({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=e.gullet.popToken(),r=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new Ie("Expected a control sequence",n);for(var o=0,s,a=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),a[o].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Ie('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new Ie('Argument number "'+n.text+'" out of order');o++,a.push([])}else{if(n.text==="EOF")throw new Ie("Expected a macro definition");a[o].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(t==="\\edef"||t==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(r,{tokens:l,numArgs:o,delimiters:a},t===L8[t]),{type:"internal",mode:e.mode}}});Ye({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=oV(e.gullet.popToken());e.gullet.consumeSpaces();var r=ffe(e);return sV(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});Ye({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=oV(e.gullet.popToken()),r=e.gullet.popToken(),o=e.gullet.popToken();return sV(e,n,o,t==="\\\\globalfuture"),e.gullet.pushToken(o),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var Y1=function(e,t,n){var r=ji.math[e]&&ji.math[e].replace,o=P8(r||e,t,n);if(!o)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return o},W8=function(e,t,n,r){var o=n.havingBaseStyle(t),s=te.makeSpan(r.concat(o.sizingClasses(n)),[e],n),a=o.sizeMultiplier/n.sizeMultiplier;return s.height*=a,s.depth*=a,s.maxFontSize=o.sizeMultiplier,s},aV=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ze(o),e.height-=o,e.depth+=o},pfe=function(e,t,n,r,o,s){var a=te.makeSymbol(e,"Main-Regular",o,r),l=W8(a,t,r,s);return n&&aV(l,r,t),l},mfe=function(e,t,n,r){return te.makeSymbol(e,"Size"+t+"-Regular",n,r)},lV=function(e,t,n,r,o,s){var a=mfe(e,t,o,r),l=W8(te.makeSpan(["delimsizing","size"+t],[a],r),_t.TEXT,r,s);return n&&aV(l,r,_t.TEXT),l},p8=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var o=te.makeSpan(["delimsizinginner",r],[te.makeSpan([],[te.makeSymbol(e,t,n)])]);return{type:"elem",elem:o}},m8=function(e,t,n){var r=za["Size4-Regular"][e.charCodeAt(0)]?za["Size4-Regular"][e.charCodeAt(0)][4]:za["Size1-Regular"][e.charCodeAt(0)][4],o=new Wa("inner",whe(e,Math.round(1e3*t))),s=new Vs([o],{width:ze(r),height:ze(t),style:"width:"+ze(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=te.makeSvgSpan([],[s],n);return a.height=t,a.style.height=ze(t),a.style.width=ze(r),{type:"elem",elem:a}},M8=.008,v5={type:"kern",size:-1*M8},gfe=["|","\\lvert","\\rvert","\\vert"],vfe=["\\|","\\lVert","\\rVert","\\Vert"],cV=function(e,t,n,r,o,s){var a,l,c,d,u="",h=0;a=c=d=e,l=null;var p="Size1-Regular";e==="\\uparrow"?c=d="\u23D0":e==="\\Uparrow"?c=d="\u2016":e==="\\downarrow"?a=c="\u23D0":e==="\\Downarrow"?a=c="\u2016":e==="\\updownarrow"?(a="\\uparrow",c="\u23D0",d="\\downarrow"):e==="\\Updownarrow"?(a="\\Uparrow",c="\u2016",d="\\Downarrow"):wt.contains(gfe,e)?(c="\u2223",u="vert",h=333):wt.contains(vfe,e)?(c="\u2225",u="doublevert",h=556):e==="["||e==="\\lbrack"?(a="\u23A1",c="\u23A2",d="\u23A3",p="Size4-Regular",u="lbrack",h=667):e==="]"||e==="\\rbrack"?(a="\u23A4",c="\u23A5",d="\u23A6",p="Size4-Regular",u="rbrack",h=667):e==="\\lfloor"||e==="\u230A"?(c=a="\u23A2",d="\u23A3",p="Size4-Regular",u="lfloor",h=667):e==="\\lceil"||e==="\u2308"?(a="\u23A1",c=d="\u23A2",p="Size4-Regular",u="lceil",h=667):e==="\\rfloor"||e==="\u230B"?(c=a="\u23A5",d="\u23A6",p="Size4-Regular",u="rfloor",h=667):e==="\\rceil"||e==="\u2309"?(a="\u23A4",c=d="\u23A5",p="Size4-Regular",u="rceil",h=667):e==="("||e==="\\lparen"?(a="\u239B",c="\u239C",d="\u239D",p="Size4-Regular",u="lparen",h=875):e===")"||e==="\\rparen"?(a="\u239E",c="\u239F",d="\u23A0",p="Size4-Regular",u="rparen",h=875):e==="\\{"||e==="\\lbrace"?(a="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(a="\u23A7",d="\u23A9",c="\u23AA",p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(a="\u23AB",d="\u23AD",c="\u23AA",p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(a="\u23A7",d="\u23AD",c="\u23AA",p="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(a="\u23AB",d="\u23A9",c="\u23AA",p="Size4-Regular");var m=Y1(a,p,o),g=m.height+m.depth,b=Y1(c,p,o),S=b.height+b.depth,k=Y1(d,p,o),N=k.height+k.depth,A=0,H=1;if(l!==null){var K=Y1(l,p,o);A=K.height+K.depth,H=2}var W=g+N+A,re=Math.max(0,Math.ceil((t-W)/(H*S))),ae=W+re*H*S,Ne=r.fontMetrics().axisHeight;n&&(Ne*=r.sizeMultiplier);var he=ae/2-Ne,Xe=[];if(u.length>0){var st=ae-g-N,rt=Math.round(ae*1e3),Nt=xhe(u,Math.round(st*1e3)),Z=new Wa(u,Nt),ye=(h/1e3).toFixed(3)+"em",_e=(rt/1e3).toFixed(3)+"em",$=new Vs([Z],{width:ye,height:_e,viewBox:"0 0 "+h+" "+rt}),Q=te.makeSvgSpan([],[$],r);Q.height=rt/1e3,Q.style.width=ye,Q.style.height=_e,Xe.push({type:"elem",elem:Q})}else{if(Xe.push(p8(d,p,o)),Xe.push(v5),l===null){var ie=ae-g-N+2*M8;Xe.push(m8(c,ie,r))}else{var de=(ae-g-N-A)/2+2*M8;Xe.push(m8(c,de,r)),Xe.push(v5),Xe.push(p8(l,p,o)),Xe.push(v5),Xe.push(m8(c,de,r))}Xe.push(v5),Xe.push(p8(a,p,o))}var $t=r.havingBaseStyle(_t.TEXT),Xt=te.makeVList({positionType:"bottom",positionData:he,children:Xe},$t);return W8(te.makeSpan(["delimsizing","mult"],[Xt],$t),_t.TEXT,r,s)},g8=80,v8=.08,_8=function(e,t,n,r,o){var s=She(e,r,n),a=new Wa(e,s),l=new Vs([a],{width:"400em",height:ze(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return te.makeSvgSpan(["hide-tail"],[l],o)},_fe=function(e,t){var n=t.havingBaseSizing(),r=fV("\\surd",e*n.sizeMultiplier,hV,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l=0,c=0,d=0,u;return r.type==="small"?(d=1e3+1e3*s+g8,e<1?o=1:e<1.4&&(o=.7),l=(1+s+v8)/o,c=(1+s)/o,a=_8("sqrtMain",l,d,s,t),a.style.minWidth="0.853em",u=.833/o):r.type==="large"?(d=(1e3+g8)*X1[r.size],c=(X1[r.size]+s)/o,l=(X1[r.size]+s+v8)/o,a=_8("sqrtSize"+r.size,l,d,s,t),a.style.minWidth="1.02em",u=1/o):(l=e+s+v8,c=e+s,d=Math.floor(1e3*e+s)+g8,a=_8("sqrtTall",l,d,s,t),a.style.minWidth="0.742em",u=1.056),a.height=c,a.style.height=ze(l),{span:a,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},dV=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],bfe=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],uV=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],X1=[0,1.2,1.8,2.4,3],yfe=function(e,t,n,r,o){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),wt.contains(dV,e)||wt.contains(uV,e))return lV(e,t,!1,n,r,o);if(wt.contains(bfe,e))return cV(e,X1[t],!1,n,r,o);throw new Ie("Illegal delimiter: '"+e+"'")},Cfe=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Sfe=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"stack"}],hV=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],wfe=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},fV=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size),s=o;st)return n[s]}return n[n.length-1]},pV=function(e,t,n,r,o,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var a;wt.contains(uV,e)?a=Cfe:wt.contains(dV,e)?a=hV:a=Sfe;var l=fV(e,t,a,r);return l.type==="small"?pfe(e,l.style,n,r,o,s):l.type==="large"?lV(e,l.size,n,r,o,s):cV(e,t,n,r,o,s)},xfe=function(e,t,n,r,o,s){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,l=901,c=5/r.fontMetrics().ptPerEm,d=Math.max(t-a,n+a),u=Math.max(d/500*l,2*d-c);return pV(e,u,!0,r,o,s)},Xl={sqrtImage:_fe,sizedDelim:yfe,sizeToMaxHeight:X1,customSizedDelim:pV,leftRightDelim:xfe},bj={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Efe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function N5(i,e){var t=M5(i);if(t&&wt.contains(Efe,t.text))return t;throw t?new Ie("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new Ie("Invalid delimiter type '"+i.type+"'",i)}Ye({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(i,e)=>{var t=N5(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:bj[i.funcName].size,mclass:bj[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?te.makeSpan([i.mclass]):Xl.sizedDelim(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(_s(i.delim,i.mode));var t=new Ee.MathNode("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ze(Xl.sizeToMaxHeight[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function yj(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ye({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=i.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Ie("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:N5(e[0],i).text,color:t}}});Ye({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=N5(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=Wt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(i,e)=>{yj(i);for(var t=Yn(i.body,e,!0,["mopen","mclose"]),n=0,r=0,o=!1,s=0;s{yj(i);var t=yo(i.body,e);if(i.left!=="."){var n=new Ee.MathNode("mo",[_s(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new Ee.MathNode("mo",[_s(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return H8(t)}});Ye({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=N5(e[0],i);if(!i.parser.leftrightDepth)throw new Ie("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;if(i.delim===".")t=t0(e,[]);else{t=Xl.sizedDelim(i.delim,1,e,i.mode,[]);var n={delim:i.delim,options:e};t.isMiddle=n}return t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?_s("|","text"):_s(i.delim,i.mode),n=new Ee.MathNode("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var j8=(i,e)=>{var t=te.wrapFragment(ci(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,o,s=0,a=wt.isCharacterBox(i.body);if(n==="sout")o=te.makeSpan(["stretchy","sout"]),o.height=e.fontMetrics().defaultRuleThickness/r,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=cn({number:.6,unit:"pt"},e),c=cn({number:.35,unit:"ex"},e),d=e.havingBaseSizing();r=r/d.sizeMultiplier;var u=t.height+t.depth+l+c;t.style.paddingLeft=ze(u/2+l);var h=Math.floor(1e3*u*r),p=yhe(h),m=new Vs([new Wa("phase",p)],{width:"400em",height:ze(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});o=te.makeSvgSpan(["hide-tail"],[m],e),o.style.height=ze(u),s=t.depth+l+c}else{/cancel/.test(n)?a||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var g=0,b=0,S=0;/box/.test(n)?(S=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:S),b=g):n==="angl"?(S=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*S,b=Math.max(0,.25-t.depth)):(g=a?.2:0,b=g),o=Jl.encloseSpan(t,n,g,b,e),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ze(S)):n==="angl"&&S!==.049&&(o.style.borderTopWidth=ze(S),o.style.borderRightWidth=ze(S)),s=t.depth+b,i.backgroundColor&&(o.style.backgroundColor=i.backgroundColor,i.borderColor&&(o.style.borderColor=i.borderColor))}var k;if(i.backgroundColor)k=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:t,shift:0}]},e);else{var N=/cancel|phase/.test(n)?["svg-align"]:[];k=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:N}]},e)}return/cancel/.test(n)&&(k.height=t.height,k.depth=t.depth),/cancel/.test(n)&&!a?te.makeSpan(["mord","cancel-lap"],[k],e):te.makeSpan(["mord"],[k],e)},V8=(i,e)=>{var t=0,n=new Ee.MathNode(i.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Ri(i.body,e)]);switch(i.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var r=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(i.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};Ye({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Wt(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:o,body:s}},htmlBuilder:j8,mathmlBuilder:V8});Ye({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Wt(e[0],"color-token").color,s=Wt(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,borderColor:o,body:a}},htmlBuilder:j8,mathmlBuilder:V8});Ye({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});Ye({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:j8,mathmlBuilder:V8});Ye({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var mV={};function ja(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},l=0;l{var e=i.parser.settings;if(!e.displayMode)throw new Ie("{"+i.envName+"} can be used only in display mode.")};function K8(i){if(i.indexOf("ed")===-1)return i.indexOf("*")===-1}function md(i,e,t){var{hskipBeforeAndAfter:n,addJot:r,cols:o,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=e;if(i.gullet.beginGroup(),c||i.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=i.gullet.expandMacroAsText("\\arraystretch");if(p==null)s=1;else if(s=parseFloat(p),!s||s<0)throw new Ie("Invalid \\arraystretch: "+p)}i.gullet.beginGroup();var m=[],g=[m],b=[],S=[],k=l!=null?[]:void 0;function N(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function A(){k&&(i.gullet.macros.get("\\df@tag")?(k.push(i.subparse([new Ua("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):k.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(N(),S.push(Cj(i));;){var H=i.parseExpression(!1,c?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup(),H={type:"ordgroup",mode:i.mode,body:H},t&&(H={type:"styling",mode:i.mode,style:t,body:[H]}),m.push(H);var K=i.fetch().text;if(K==="&"){if(u&&m.length===u){if(c||a)throw new Ie("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(K==="\\end"){A(),m.length===1&&H.type==="styling"&&H.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),S.length0&&(N+=.25),c.push({pos:N,isDashed:fl[Hn]})}for(A(s[0]),n=0;n0&&(he+=k,Wfl))for(n=0;n=a)){var Gi=void 0;(r>0||e.hskipBeforeAndAfter)&&(Gi=wt.deflt(de.pregap,h),Gi!==0&&(Nt=te.makeSpan(["arraycolsep"],[]),Nt.style.width=ze(Gi),rt.push(Nt)));var ai=[];for(n=0;n0){for(var Kd=te.makeLineSpan("hline",t,d),n_=te.makeLineSpan("hdashline",t,d),bm=[{type:"elem",elem:l,shift:0}];c.length>0;){var jh=c.pop(),r_=jh.pos-Xe;jh.isDashed?bm.push({type:"elem",elem:n_,shift:r_}):bm.push({type:"elem",elem:Kd,shift:r_})}l=te.makeVList({positionType:"individualShift",children:bm},t)}if(ye.length===0)return te.makeSpan(["mord"],[l],t);var fr=te.makeVList({positionType:"individualShift",children:ye},t);return fr=te.makeSpan(["tag"],[fr],t),te.makeFragment([l,fr])},Tfe={c:"center ",l:"left ",r:"right "},Ka=function(e,t){for(var n=[],r=new Ee.MathNode("mtd",[],["mtr-glue"]),o=new Ee.MathNode("mtd",[],["mml-eqn-num"]),s=0;s0){var m=e.cols,g="",b=!1,S=0,k=m.length;m[0].type==="separator"&&(h+="top ",S=1),m[m.length-1].type==="separator"&&(h+="bottom ",k-=1);for(var N=S;N0?"left ":"",h+=re[re.length-1].length>0?"right ":"";for(var ae=1;ae-1?"alignat":"align",o=e.envName==="split",s=md(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:K8(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),a,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var d="",u=0;u0&&p&&(b=1),n[m]={type:"align",align:g,pregap:b,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};ja({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=M5(e[0]),n=t?[e[0]]:Wt(e[0],"ordgroup").body,r=n.map(function(s){var a=z8(s),l=a.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ie("Unknown column alignment: "+l,s)}),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return md(i.parser,o,q8(i.envName))},htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(i){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[i.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var r=i.parser;if(r.consumeSpaces(),r.fetch().text==="["){if(r.consume(),r.consumeSpaces(),t=r.fetch().text,"lcr".indexOf(t)===-1)throw new Ie("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var o=md(i.parser,n,q8(i.envName)),s=Math.max(0,...o.body.map(a=>a.length));return o.cols=new Array(s).fill({type:"align",align:t}),e?{type:"leftright",mode:i.mode,body:[o],left:e[0],right:e[1],rightColor:void 0}:o},htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=md(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=M5(e[0]),n=t?[e[0]]:Wt(e[0],"ordgroup").body,r=n.map(function(s){var a=z8(s),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Ie("Unknown column alignment: "+l,s)});if(r.length>1)throw new Ie("{subarray} can contain only one column");var o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=md(i.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new Ie("{subarray} can contain only one column");return o},htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(i){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=md(i.parser,e,q8(i.envName));return{type:"leftright",mode:i.mode,body:[t],left:i.envName.indexOf("r")>-1?".":"\\{",right:i.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:vV,htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){wt.contains(["gather","gather*"],i.envName)&&R5(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:K8(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return md(i.parser,e,"display")},htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:vV,htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){R5(i);var e={autoTag:K8(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return md(i.parser,e,"display")},htmlBuilder:Va,mathmlBuilder:Ka});ja({type:"array",names:["CD"],props:{numArgs:0},handler(i){return R5(i),hfe(i.parser)},htmlBuilder:Va,mathmlBuilder:Ka});R("\\nonumber","\\gdef\\@eqnsw{0}");R("\\notag","\\nonumber");Ye({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new Ie(i.funcName+" valid only within array environment")}});var Sj=mV;Ye({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];if(r.type!=="ordgroup")throw new Ie("Invalid environment name",r);for(var o="",s=0;s{var t=i.font,n=e.withFont(t);return ci(i.body,n)},bV=(i,e)=>{var t=i.font,n=e.withFont(t);return Ri(i.body,n)},wj={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ye({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=T5(e[0]),o=n;return o in wj&&(o=wj[o]),{type:"font",mode:t.mode,font:o.slice(1),body:r}},htmlBuilder:_V,mathmlBuilder:bV});Ye({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,n=e[0],r=wt.isCharacterBox(n);return{type:"mclass",mode:t.mode,mclass:D5(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:r}}});Ye({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,breakOnTokenText:r}=i,{mode:o}=t,s=t.parseExpression(!0,r),a="math"+n.slice(1);return{type:"font",mode:o,font:a,body:{type:"ordgroup",mode:t.mode,body:s}}},htmlBuilder:_V,mathmlBuilder:bV});var yV=(i,e)=>{var t=e;return i==="display"?t=t.id>=_t.SCRIPT.id?t.text():_t.DISPLAY:i==="text"&&t.size===_t.DISPLAY.size?t=_t.TEXT:i==="script"?t=_t.SCRIPT:i==="scriptscript"&&(t=_t.SCRIPTSCRIPT),t},G8=(i,e)=>{var t=yV(i.size,e.style),n=t.fracNum(),r=t.fracDen(),o;o=e.havingStyle(n);var s=ci(i.numer,o,e);if(i.continued){var a=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?m=3*h:m=7*h,g=e.fontMetrics().denom1):(u>0?(p=e.fontMetrics().num2,m=h):(p=e.fontMetrics().num3,m=3*h),g=e.fontMetrics().denom2);var b;if(d){var k=e.fontMetrics().axisHeight;p-s.depth-(k+.5*u){var t=new Ee.MathNode("mfrac",[Ri(i.numer,e),Ri(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=cn(i.barSize,e);t.setAttribute("linethickness",ze(n))}var r=yV(i.size,e.style);if(r.size!==e.style.size){t=new Ee.MathNode("mstyle",[t]);var o=r.size===_t.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",o),t.setAttribute("scriptlevel","0")}if(i.leftDelim!=null||i.rightDelim!=null){var s=[];if(i.leftDelim!=null){var a=new Ee.MathNode("mo",[new Ee.TextNode(i.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),i.rightDelim!=null){var l=new Ee.MathNode("mo",[new Ee.TextNode(i.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return H8(s)}return t};Ye({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1],s,a=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,a="(",l=")";break;case"\\\\bracefrac":s=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:r,denom:o,hasBarLine:s,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:G8,mathmlBuilder:$8});Ye({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Ye({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:n}=i,r;switch(t){case"\\over":r="\\frac";break;case"\\choose":r="\\binom";break;case"\\atop":r="\\\\atopfrac";break;case"\\brace":r="\\\\bracefrac";break;case"\\brack":r="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:r,token:n}}});var xj=["display","text","script","scriptscript"],Ej=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};Ye({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,n=e[4],r=e[5],o=T5(e[0]),s=o.type==="atom"&&o.family==="open"?Ej(o.text):null,a=T5(e[1]),l=a.type==="atom"&&a.family==="close"?Ej(a.text):null,c=Wt(e[2],"size"),d,u=null;c.isBlank?d=!0:(u=c.value,d=u.number>0);var h="auto",p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var m=Wt(p.body[0],"textord");h=xj[Number(m.text)]}}else p=Wt(p,"textord"),h=xj[Number(p.text)];return{type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:d,barSize:u,leftDelim:s,rightDelim:l,size:h}},htmlBuilder:G8,mathmlBuilder:$8});Ye({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:n,token:r}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Wt(e[0],"size").value,token:r}}});Ye({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=ohe(Wt(e[1],"infix").size),s=e[2],a=o.number>0;return{type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:a,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:G8,mathmlBuilder:$8});var CV=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?ci(i.sup,e.havingStyle(t.sup()),e):ci(i.sub,e.havingStyle(t.sub()),e),r=Wt(i.base,"horizBrace")):r=Wt(i,"horizBrace");var o=ci(r.base,e.havingBaseStyle(_t.DISPLAY)),s=Jl.svgSpan(r,e),a;if(r.isOver?(a=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),a.children[0].children[0].children[1].classes.push("svg-align")):(a=te.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),a.children[0].children[0].children[0].classes.push("svg-align")),n){var l=te.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e);r.isOver?a=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):a=te.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return te.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e)},kfe=(i,e)=>{var t=Jl.mathMLnode(i.label);return new Ee.MathNode(i.isOver?"mover":"munder",[Ri(i.base,e),t])};Ye({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"horizBrace",mode:t.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:CV,mathmlBuilder:kfe});Ye({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=Wt(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:Tn(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=Yn(i.body,e,!1);return te.makeAnchor(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=pd(i.body,e);return t instanceof _o||(t=new _o("mrow",[t])),t.setAttribute("href",i.href),t}});Ye({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=Wt(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var r=[],o=0;o{var{parser:t,funcName:n,token:r}=i,o=Wt(e[0],"raw").string,s=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(n){case"\\htmlClass":l.class=o,a={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,a={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,a={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var c=o.split(","),d=0;d{var t=Yn(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=te.makeSpan(n,t,e);for(var o in i.attributes)o!=="class"&&i.attributes.hasOwnProperty(o)&&r.setAttribute(o,i.attributes[o]);return r},mathmlBuilder:(i,e)=>pd(i.body,e)});Ye({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:Tn(e[0]),mathml:Tn(e[1])}},htmlBuilder:(i,e)=>{var t=Yn(i.html,e,!1);return te.makeFragment(t)},mathmlBuilder:(i,e)=>pd(i.mathml,e)});var b8=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Ie("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!zj(n))throw new Ie("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ye({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:n}=i,r={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(t[0])for(var l=Wt(t[0],"raw").string,c=l.split(","),d=0;d{var t=cn(i.height,e),n=0;i.totalheight.number>0&&(n=cn(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=cn(i.width,e));var o={height:ze(t+n)};r>0&&(o.width=ze(r)),n>0&&(o.verticalAlign=ze(-n));var s=new E8(i.src,i.alt,o);return s.height=t,s.depth=n,s},mathmlBuilder:(i,e)=>{var t=new Ee.MathNode("mglyph",[]);t.setAttribute("alt",i.alt);var n=cn(i.height,e),r=0;if(i.totalheight.number>0&&(r=cn(i.totalheight,e)-n,t.setAttribute("valign",ze(-r))),t.setAttribute("height",ze(n+r)),i.width.number>0){var o=cn(i.width,e);t.setAttribute("width",ze(o))}return t.setAttribute("src",i.src),t}});Ye({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=Wt(e[0],"size");if(t.settings.strict){var o=n[1]==="m",s=r.value.unit==="mu";o?(s||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+r.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:r.value}},htmlBuilder(i,e){return te.makeGlue(i.dimension,e)},mathmlBuilder(i,e){var t=cn(i.dimension,e);return new Ee.SpaceNode(t)}});Ye({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:r}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=te.makeSpan([],[ci(i.body,e)]),t=te.makeSpan(["inner"],[t],e)):t=te.makeSpan(["inner"],[ci(i.body,e)]);var n=te.makeSpan(["fix"],[]),r=te.makeSpan([i.alignment],[t,n],e),o=te.makeSpan(["strut"]);return o.style.height=ze(r.height+r.depth),r.depth&&(o.style.verticalAlign=ze(-r.depth)),r.children.unshift(o),r=te.makeSpan(["thinbox"],[r],e),te.makeSpan(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Ee.MathNode("mpadded",[Ri(i.body,e)]);if(i.alignment!=="rlap"){var n=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});Ye({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:n}=i,r=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",s=n.parseExpression(!1,o);return n.expect(o),n.switchMode(r),{type:"styling",mode:n.mode,style:"text",body:s}}});Ye({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new Ie("Mismatched "+i.funcName)}});var Tj=(i,e)=>{switch(e.style.size){case _t.DISPLAY.size:return i.display;case _t.TEXT.size:return i.text;case _t.SCRIPT.size:return i.script;case _t.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};Ye({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:Tn(e[0]),text:Tn(e[1]),script:Tn(e[2]),scriptscript:Tn(e[3])}},htmlBuilder:(i,e)=>{var t=Tj(i,e),n=Yn(t,e,!1);return te.makeFragment(n)},mathmlBuilder:(i,e)=>{var t=Tj(i,e);return pd(t,e)}});var SV=(i,e,t,n,r,o,s)=>{i=te.makeSpan([],[i]);var a=t&&wt.isCharacterBox(t),l,c;if(e){var d=ci(e,n.havingStyle(r.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var u=ci(t,n.havingStyle(r.sub()),n);l={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-u.height)}}var h;if(c&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+s;h=te.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ze(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ze(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var m=i.height-s;h=te.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ze(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i}]},n)}else if(c){var g=i.depth+s;h=te.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ze(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return i;var b=[h];if(l&&o!==0&&!a){var S=te.makeSpan(["mspace"],[],n);S.style.marginRight=ze(o),b.unshift(S)}return te.makeSpan(["mop","op-limits"],b,n)},wV=["\\smallint"],Gf=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Wt(i.base,"op"),r=!0):o=Wt(i,"op");var s=e.style,a=!1;s.size===_t.DISPLAY.size&&o.symbol&&!wt.contains(wV,o.name)&&(a=!0);var l;if(o.symbol){var c=a?"Size2-Regular":"Size1-Regular",d="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(d=o.name.slice(1),o.name=d==="oiint"?"\\iint":"\\iiint"),l=te.makeSymbol(o.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),d.length>0){var u=l.italic,h=te.staticSvg(d+"Size"+(a?"2":"1"),e);l=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:a?.08:0}]},e),o.name="\\"+d,l.classes.unshift("mop"),l.italic=u}}else if(o.body){var p=Yn(o.body,e,!0);p.length===1&&p[0]instanceof bo?(l=p[0],l.classes[0]="mop"):l=te.makeSpan(["mop"],p,e)}else{for(var m=[],g=1;g{var t;if(i.symbol)t=new _o("mo",[_s(i.name,i.mode)]),wt.contains(wV,i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new _o("mo",yo(i.body,e));else{t=new _o("mi",[new ku(i.name.slice(1))]);var n=new _o("mo",[_s("\u2061","text")]);i.parentIsSupSub?t=new _o("mrow",[t,n]):t=Qj([t,n])}return t},Ife={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Ye({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=n;return r.length===1&&(r=Ife[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Gf,mathmlBuilder:i0});Ye({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Tn(n)}},htmlBuilder:Gf,mathmlBuilder:i0});var Afe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Ye({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Gf,mathmlBuilder:i0});Ye({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Gf,mathmlBuilder:i0});Ye({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i,n=t;return n.length===1&&(n=Afe[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Gf,mathmlBuilder:i0});var xV=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Wt(i.base,"operatorname"),r=!0):o=Wt(i,"operatorname");var s;if(o.body.length>0){for(var a=o.body.map(u=>{var h=u.text;return typeof h=="string"?{type:"textord",mode:u.mode,text:h}:u}),l=Yn(a,e.withFont("mathrm"),!0),c=0;c{for(var t=yo(i.body,e.withFont("mathrm")),n=!0,r=0;rd.toText()).join("");t=[new Ee.TextNode(a)]}var l=new Ee.MathNode("mi",t);l.setAttribute("mathvariant","normal");var c=new Ee.MathNode("mo",[_s("\u2061","text")]);return i.parentIsSupSub?new Ee.MathNode("mrow",[l,c]):Ee.newDocumentFragment([l,c])};Ye({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"operatorname",mode:t.mode,body:Tn(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:xV,mathmlBuilder:Lfe});R("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Lu({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?te.makeFragment(Yn(i.body,e,!1)):te.makeSpan(["mord"],Yn(i.body,e,!0),e)},mathmlBuilder(i,e){return pd(i.body,e,!0)}});Ye({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,n=e[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(i,e){var t=ci(i.body,e.havingCrampedStyle()),n=te.makeLineSpan("overline-line",e),r=e.fontMetrics().defaultRuleThickness,o=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]},e);return te.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[new Ee.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ee.MathNode("mover",[Ri(i.body,e),t]);return n.setAttribute("accent","true"),n}});Ye({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"phantom",mode:t.mode,body:Tn(n)}},htmlBuilder:(i,e)=>{var t=Yn(i.body,e.withPhantom(),!1);return te.makeFragment(t)},mathmlBuilder:(i,e)=>{var t=yo(i.body,e);return new Ee.MathNode("mphantom",t)}});Ye({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"hphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=te.makeSpan([],[ci(i.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var n=0;n{var t=yo(Tn(i.body),e),n=new Ee.MathNode("mphantom",t),r=new Ee.MathNode("mpadded",[n]);return r.setAttribute("height","0px"),r.setAttribute("depth","0px"),r}});Ye({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=te.makeSpan(["inner"],[ci(i.body,e.withPhantom())]),n=te.makeSpan(["fix"],[]);return te.makeSpan(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=yo(Tn(i.body),e),n=new Ee.MathNode("mphantom",t),r=new Ee.MathNode("mpadded",[n]);return r.setAttribute("width","0px"),r}});Ye({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=Wt(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=ci(i.body,e),n=cn(i.dy,e);return te.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mpadded",[Ri(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});Ye({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});Ye({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(i,e,t){var{parser:n}=i,r=t[0],o=Wt(e[0],"size"),s=Wt(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&Wt(r,"size").value,width:o.value,height:s.value}},htmlBuilder(i,e){var t=te.makeSpan(["mord","rule"],[],e),n=cn(i.width,e),r=cn(i.height,e),o=i.shift?cn(i.shift,e):0;return t.style.borderRightWidth=ze(n),t.style.borderTopWidth=ze(r),t.style.bottom=ze(o),t.width=n,t.height=r+o,t.depth=-o,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=cn(i.width,e),n=cn(i.height,e),r=i.shift?cn(i.shift,e):0,o=e.color&&e.getColor()||"black",s=new Ee.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",ze(t)),s.setAttribute("height",ze(n));var a=new Ee.MathNode("mpadded",[s]);return r>=0?a.setAttribute("height",ze(r)):(a.setAttribute("height",ze(r)),a.setAttribute("depth",ze(-r))),a.setAttribute("voffset",ze(r)),a}});function EV(i,e,t){for(var n=Yn(i,e,!1),r=e.sizeMultiplier/t.sizeMultiplier,o=0;o{var t=e.havingSize(i.size);return EV(i.body,t,e)};Ye({type:"sizing",names:kj,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!1,t);return{type:"sizing",mode:r.mode,size:kj.indexOf(n)+1,body:o}},htmlBuilder:Mfe,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=yo(i.body,t),r=new Ee.MathNode("mstyle",n);return r.setAttribute("mathsize",ze(t.sizeMultiplier)),r}});Ye({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:n}=i,r=!1,o=!1,s=t[0]&&Wt(t[0],"ordgroup");if(s)for(var a="",l=0;l{var t=te.makeSpan([],[ci(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0,t.children))for(var n=0;n{var t=new Ee.MathNode("mpadded",[Ri(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});Ye({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n}=i,r=t[0],o=e[0];return{type:"sqrt",mode:n.mode,body:o,index:r}},htmlBuilder(i,e){var t=ci(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=te.wrapFragment(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,o=r;e.style.id<_t.TEXT.id&&(o=e.fontMetrics().xHeight);var s=r+o/4,a=t.height+t.depth+s+r,{span:l,ruleWidth:c,advanceWidth:d}=Xl.sqrtImage(a,e),u=l.height-c;u>t.height+t.depth+s&&(s=(s+u-t.height-t.depth)/2);var h=l.height-t.height-s-c;t.style.paddingLeft=ze(d);var p=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+h)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(i.index){var m=e.havingStyle(_t.SCRIPTSCRIPT),g=ci(i.index,m,e),b=.6*(p.height-p.depth),S=te.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:g}]},e),k=te.makeSpan(["root"],[S]);return te.makeSpan(["mord","sqrt"],[k,p],e)}else return te.makeSpan(["mord","sqrt"],[p],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new Ee.MathNode("mroot",[Ri(t,e),Ri(n,e)]):new Ee.MathNode("msqrt",[Ri(t,e)])}});var Ij={display:_t.DISPLAY,text:_t.TEXT,script:_t.SCRIPT,scriptscript:_t.SCRIPTSCRIPT};Ye({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!0,t),s=n.slice(1,n.length-5);return{type:"styling",mode:r.mode,style:s,body:o}},htmlBuilder(i,e){var t=Ij[i.style],n=e.havingStyle(t).withFont("");return EV(i.body,n,e)},mathmlBuilder(i,e){var t=Ij[i.style],n=e.havingStyle(t),r=yo(i.body,n),o=new Ee.MathNode("mstyle",r),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=s[i.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});var Dfe=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===_t.DISPLAY.size||n.alwaysHandleSupSub);return r?Gf:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===_t.DISPLAY.size||n.limits);return o?xV:null}else{if(n.type==="accent")return wt.isCharacterBox(n.base)?U8:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?CV:null}else return null}else return null};Lu({type:"supsub",htmlBuilder(i,e){var t=Dfe(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:o}=i,s=ci(n,e),a,l,c=e.fontMetrics(),d=0,u=0,h=n&&wt.isCharacterBox(n);if(r){var p=e.havingStyle(e.style.sup());a=ci(r,p,e),h||(d=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(o){var m=e.havingStyle(e.style.sub());l=ci(o,m,e),h||(u=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===_t.DISPLAY?g=c.sup1:e.style.cramped?g=c.sup3:g=c.sup2;var b=e.sizeMultiplier,S=ze(.5/c.ptPerEm/b),k=null;if(l){var N=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");(s instanceof bo||N)&&(k=ze(-s.italic))}var A;if(a&&l){d=Math.max(d,g,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var H=c.defaultRuleThickness,K=4*H;if(d-a.depth-(l.height-u)0&&(d+=W,u-=W)}var re=[{type:"elem",elem:l,shift:u,marginRight:S,marginLeft:k},{type:"elem",elem:a,shift:-d,marginRight:S}];A=te.makeVList({positionType:"individualShift",children:re},e)}else if(l){u=Math.max(u,c.sub1,l.height-.8*c.xHeight);var ae=[{type:"elem",elem:l,marginLeft:k,marginRight:S}];A=te.makeVList({positionType:"shift",positionData:u,children:ae},e)}else if(a)d=Math.max(d,g,a.depth+.25*c.xHeight),A=te.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:S}]},e);else throw new Error("supsub must have either sup or sub.");var Ne=k8(s,"right")||"mord";return te.makeSpan([Ne],[s,te.makeSpan(["msupsub"],[A])],e)},mathmlBuilder(i,e){var t=!1,n,r;i.base&&i.base.type==="horizBrace"&&(r=!!i.sup,r===i.base.isOver&&(t=!0,n=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var o=[Ri(i.base,e)];i.sub&&o.push(Ri(i.sub,e)),i.sup&&o.push(Ri(i.sup,e));var s;if(t)s=n?"mover":"munder";else if(i.sub)if(i.sup){var c=i.base;c&&c.type==="op"&&c.limits&&e.style===_t.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===_t.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===_t.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===_t.DISPLAY)?s="munder":s="msub"}else{var a=i.base;a&&a.type==="op"&&a.limits&&(e.style===_t.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===_t.DISPLAY)?s="mover":s="msup"}return new Ee.MathNode(s,o)}});Lu({type:"atom",htmlBuilder(i,e){return te.mathsym(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[_s(i.text,i.mode)]);if(i.family==="bin"){var n=B8(i,e);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var TV={mi:"italic",mn:"normal",mtext:"normal"};Lu({type:"mathord",htmlBuilder(i,e){return te.makeOrd(i,e,"mathord")},mathmlBuilder(i,e){var t=new Ee.MathNode("mi",[_s(i.text,i.mode,e)]),n=B8(i,e)||"italic";return n!==TV[t.type]&&t.setAttribute("mathvariant",n),t}});Lu({type:"textord",htmlBuilder(i,e){return te.makeOrd(i,e,"textord")},mathmlBuilder(i,e){var t=_s(i.text,i.mode,e),n=B8(i,e)||"normal",r;return i.mode==="text"?r=new Ee.MathNode("mtext",[t]):/[0-9]/.test(i.text)?r=new Ee.MathNode("mn",[t]):i.text==="\\prime"?r=new Ee.MathNode("mo",[t]):r=new Ee.MathNode("mi",[t]),n!==TV[r.type]&&r.setAttribute("mathvariant",n),r}});var y8={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},C8={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Lu({type:"spacing",htmlBuilder(i,e){if(C8.hasOwnProperty(i.text)){var t=C8[i.text].className||"";if(i.mode==="text"){var n=te.makeOrd(i,e,"textord");return n.classes.push(t),n}else return te.makeSpan(["mspace",t],[te.mathsym(i.text,i.mode,e)],e)}else{if(y8.hasOwnProperty(i.text))return te.makeSpan(["mspace",y8[i.text]],[],e);throw new Ie('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(C8.hasOwnProperty(i.text))t=new Ee.MathNode("mtext",[new Ee.TextNode("\xA0")]);else{if(y8.hasOwnProperty(i.text))return new Ee.MathNode("mspace");throw new Ie('Unknown type of space "'+i.text+'"')}return t}});var Aj=()=>{var i=new Ee.MathNode("mtd",[]);return i.setAttribute("width","50%"),i};Lu({type:"tag",mathmlBuilder(i,e){var t=new Ee.MathNode("mtable",[new Ee.MathNode("mtr",[Aj(),new Ee.MathNode("mtd",[pd(i.body,e)]),Aj(),new Ee.MathNode("mtd",[pd(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var Lj={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Mj={"\\textbf":"textbf","\\textmd":"textmd"},Nfe={"\\textit":"textit","\\textup":"textup"},Dj=(i,e)=>{var t=i.font;return t?Lj[t]?e.withTextFontFamily(Lj[t]):Mj[t]?e.withTextFontWeight(Mj[t]):e.withTextFontShape(Nfe[t]):e};Ye({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"text",mode:t.mode,body:Tn(r),font:n}},htmlBuilder(i,e){var t=Dj(i,e),n=Yn(i.body,t,!0);return te.makeSpan(["mord","text"],n,t)},mathmlBuilder(i,e){var t=Dj(i,e);return pd(i.body,t)}});Ye({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=ci(i.body,e),n=te.makeLineSpan("underline-line",e),r=e.fontMetrics().defaultRuleThickness,o=te.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]},e);return te.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[new Ee.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ee.MathNode("munder",[Ri(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});Ye({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=ci(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return te.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){return new Ee.MathNode("mpadded",[Ri(i.body,e)],["vcenter"])}});Ye({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new Ie("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=Nj(i),n=[],r=e.havingStyle(e.style.text()),o=0;oi.body.replace(/ /g,i.star?"\u2423":"\xA0"),hd=Yj,kV=`[ \r - ]`,Rfe="\\\\[a-zA-Z@]+",Ofe="\\\\[^\uD800-\uDFFF]",Pfe="("+Rfe+")"+kV+"*",Ffe=`\\\\( +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},Iu=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return wt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}},Ba={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Q5={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},WW={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Ehe(i,e){Ba[i]=e}function M8(i,e,t){if(!Ba[e])throw new Error("Font metrics not found for font: "+e+".");var n=i.charCodeAt(0),r=Ba[e][n];if(!r&&i[0]in WW&&(n=WW[i[0]].charCodeAt(0),r=Ba[e][n]),!r&&t==="text"&&bj(n)&&(r=Ba[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var s8={};function The(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!s8[e]){var t=s8[e]={cssEmPerMu:Q5.quad[e]/18};for(var n in Q5)Q5.hasOwnProperty(n)&&(t[n]=Q5[n][e])}return s8[e]}var khe=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],jW=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],VW=function(e,t){return t.size<2?e:khe[e-1][t.size-1]},u4=class i{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||i.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=jW[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new i(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:VW(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:jW[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=VW(i.BASESIZE,e);return this.size===t&&this.textSize===i.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=The(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};u4.BASESIZE=6;var b8={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ihe={ex:!0,em:!0,mu:!0},yj=function(e){return typeof e!="string"&&(e=e.unit),e in b8||e in Ihe||e==="ex"},cn=function(e,t){var n;if(e.unit in b8)n=b8[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var r;if(t.style.isTight()?r=t.havingStyle(t.style.text()):r=t,e.unit==="ex")n=r.fontMetrics().xHeight;else if(e.unit==="em")n=r.fontMetrics().quad;else throw new Ie("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},ze=function(e){return+e.toFixed(4)+"em"},hd=function(e){return e.filter(t=>t).join(" ")},Cj=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Sj=function(e){var t=document.createElement(e);t.className=hd(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o",t},Au=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Cj.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return wt.contains(this.classes,e)}toNode(){return Sj.call(this,"span")}toMarkup(){return wj.call(this,"span")}},J1=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Cj.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return wt.contains(this.classes,e)}toNode(){return Sj.call(this,"a")}toMarkup(){return wj.call(this,"a")}},y8=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return wt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=""+this.alt+"0&&(t=document.createElement("span"),t.style.marginRight=ze(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=hd(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(t=t||document.createElement("span"),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(n+="margin-right:"+this.italic+"em;");for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=wt.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+wt.escape(n)+'"');var o=wt.escape(this.text);return e?(t+=">",t+=o,t+="",t):o}},Vs=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);for(var r=0;r":""}},Z1=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e=" but got "+String(i)+".")}var Mhe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Dhe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ji={math:{},text:{}};function y(i,e,t,n,r,o){ji[i][r]={font:e,group:t,replace:n},o&&n&&(ji[i][n]=ji[i][r])}var E="math",we="text",L="main",U="ams",Ji="accent-token",Je="bin",to="close",Vf="inner",bt="mathord",Nn="op-token",Uo="open",_4="punct",j="rel",Zl="spacing",Y="textord";y(E,L,j,"\u2261","\\equiv",!0);y(E,L,j,"\u227A","\\prec",!0);y(E,L,j,"\u227B","\\succ",!0);y(E,L,j,"\u223C","\\sim",!0);y(E,L,j,"\u22A5","\\perp");y(E,L,j,"\u2AAF","\\preceq",!0);y(E,L,j,"\u2AB0","\\succeq",!0);y(E,L,j,"\u2243","\\simeq",!0);y(E,L,j,"\u2223","\\mid",!0);y(E,L,j,"\u226A","\\ll",!0);y(E,L,j,"\u226B","\\gg",!0);y(E,L,j,"\u224D","\\asymp",!0);y(E,L,j,"\u2225","\\parallel");y(E,L,j,"\u22C8","\\bowtie",!0);y(E,L,j,"\u2323","\\smile",!0);y(E,L,j,"\u2291","\\sqsubseteq",!0);y(E,L,j,"\u2292","\\sqsupseteq",!0);y(E,L,j,"\u2250","\\doteq",!0);y(E,L,j,"\u2322","\\frown",!0);y(E,L,j,"\u220B","\\ni",!0);y(E,L,j,"\u221D","\\propto",!0);y(E,L,j,"\u22A2","\\vdash",!0);y(E,L,j,"\u22A3","\\dashv",!0);y(E,L,j,"\u220B","\\owns");y(E,L,_4,".","\\ldotp");y(E,L,_4,"\u22C5","\\cdotp");y(E,L,Y,"#","\\#");y(we,L,Y,"#","\\#");y(E,L,Y,"&","\\&");y(we,L,Y,"&","\\&");y(E,L,Y,"\u2135","\\aleph",!0);y(E,L,Y,"\u2200","\\forall",!0);y(E,L,Y,"\u210F","\\hbar",!0);y(E,L,Y,"\u2203","\\exists",!0);y(E,L,Y,"\u2207","\\nabla",!0);y(E,L,Y,"\u266D","\\flat",!0);y(E,L,Y,"\u2113","\\ell",!0);y(E,L,Y,"\u266E","\\natural",!0);y(E,L,Y,"\u2663","\\clubsuit",!0);y(E,L,Y,"\u2118","\\wp",!0);y(E,L,Y,"\u266F","\\sharp",!0);y(E,L,Y,"\u2662","\\diamondsuit",!0);y(E,L,Y,"\u211C","\\Re",!0);y(E,L,Y,"\u2661","\\heartsuit",!0);y(E,L,Y,"\u2111","\\Im",!0);y(E,L,Y,"\u2660","\\spadesuit",!0);y(E,L,Y,"\xA7","\\S",!0);y(we,L,Y,"\xA7","\\S");y(E,L,Y,"\xB6","\\P",!0);y(we,L,Y,"\xB6","\\P");y(E,L,Y,"\u2020","\\dag");y(we,L,Y,"\u2020","\\dag");y(we,L,Y,"\u2020","\\textdagger");y(E,L,Y,"\u2021","\\ddag");y(we,L,Y,"\u2021","\\ddag");y(we,L,Y,"\u2021","\\textdaggerdbl");y(E,L,to,"\u23B1","\\rmoustache",!0);y(E,L,Uo,"\u23B0","\\lmoustache",!0);y(E,L,to,"\u27EF","\\rgroup",!0);y(E,L,Uo,"\u27EE","\\lgroup",!0);y(E,L,Je,"\u2213","\\mp",!0);y(E,L,Je,"\u2296","\\ominus",!0);y(E,L,Je,"\u228E","\\uplus",!0);y(E,L,Je,"\u2293","\\sqcap",!0);y(E,L,Je,"\u2217","\\ast");y(E,L,Je,"\u2294","\\sqcup",!0);y(E,L,Je,"\u25EF","\\bigcirc",!0);y(E,L,Je,"\u2219","\\bullet",!0);y(E,L,Je,"\u2021","\\ddagger");y(E,L,Je,"\u2240","\\wr",!0);y(E,L,Je,"\u2A3F","\\amalg");y(E,L,Je,"&","\\And");y(E,L,j,"\u27F5","\\longleftarrow",!0);y(E,L,j,"\u21D0","\\Leftarrow",!0);y(E,L,j,"\u27F8","\\Longleftarrow",!0);y(E,L,j,"\u27F6","\\longrightarrow",!0);y(E,L,j,"\u21D2","\\Rightarrow",!0);y(E,L,j,"\u27F9","\\Longrightarrow",!0);y(E,L,j,"\u2194","\\leftrightarrow",!0);y(E,L,j,"\u27F7","\\longleftrightarrow",!0);y(E,L,j,"\u21D4","\\Leftrightarrow",!0);y(E,L,j,"\u27FA","\\Longleftrightarrow",!0);y(E,L,j,"\u21A6","\\mapsto",!0);y(E,L,j,"\u27FC","\\longmapsto",!0);y(E,L,j,"\u2197","\\nearrow",!0);y(E,L,j,"\u21A9","\\hookleftarrow",!0);y(E,L,j,"\u21AA","\\hookrightarrow",!0);y(E,L,j,"\u2198","\\searrow",!0);y(E,L,j,"\u21BC","\\leftharpoonup",!0);y(E,L,j,"\u21C0","\\rightharpoonup",!0);y(E,L,j,"\u2199","\\swarrow",!0);y(E,L,j,"\u21BD","\\leftharpoondown",!0);y(E,L,j,"\u21C1","\\rightharpoondown",!0);y(E,L,j,"\u2196","\\nwarrow",!0);y(E,L,j,"\u21CC","\\rightleftharpoons",!0);y(E,U,j,"\u226E","\\nless",!0);y(E,U,j,"\uE010","\\@nleqslant");y(E,U,j,"\uE011","\\@nleqq");y(E,U,j,"\u2A87","\\lneq",!0);y(E,U,j,"\u2268","\\lneqq",!0);y(E,U,j,"\uE00C","\\@lvertneqq");y(E,U,j,"\u22E6","\\lnsim",!0);y(E,U,j,"\u2A89","\\lnapprox",!0);y(E,U,j,"\u2280","\\nprec",!0);y(E,U,j,"\u22E0","\\npreceq",!0);y(E,U,j,"\u22E8","\\precnsim",!0);y(E,U,j,"\u2AB9","\\precnapprox",!0);y(E,U,j,"\u2241","\\nsim",!0);y(E,U,j,"\uE006","\\@nshortmid");y(E,U,j,"\u2224","\\nmid",!0);y(E,U,j,"\u22AC","\\nvdash",!0);y(E,U,j,"\u22AD","\\nvDash",!0);y(E,U,j,"\u22EA","\\ntriangleleft");y(E,U,j,"\u22EC","\\ntrianglelefteq",!0);y(E,U,j,"\u228A","\\subsetneq",!0);y(E,U,j,"\uE01A","\\@varsubsetneq");y(E,U,j,"\u2ACB","\\subsetneqq",!0);y(E,U,j,"\uE017","\\@varsubsetneqq");y(E,U,j,"\u226F","\\ngtr",!0);y(E,U,j,"\uE00F","\\@ngeqslant");y(E,U,j,"\uE00E","\\@ngeqq");y(E,U,j,"\u2A88","\\gneq",!0);y(E,U,j,"\u2269","\\gneqq",!0);y(E,U,j,"\uE00D","\\@gvertneqq");y(E,U,j,"\u22E7","\\gnsim",!0);y(E,U,j,"\u2A8A","\\gnapprox",!0);y(E,U,j,"\u2281","\\nsucc",!0);y(E,U,j,"\u22E1","\\nsucceq",!0);y(E,U,j,"\u22E9","\\succnsim",!0);y(E,U,j,"\u2ABA","\\succnapprox",!0);y(E,U,j,"\u2246","\\ncong",!0);y(E,U,j,"\uE007","\\@nshortparallel");y(E,U,j,"\u2226","\\nparallel",!0);y(E,U,j,"\u22AF","\\nVDash",!0);y(E,U,j,"\u22EB","\\ntriangleright");y(E,U,j,"\u22ED","\\ntrianglerighteq",!0);y(E,U,j,"\uE018","\\@nsupseteqq");y(E,U,j,"\u228B","\\supsetneq",!0);y(E,U,j,"\uE01B","\\@varsupsetneq");y(E,U,j,"\u2ACC","\\supsetneqq",!0);y(E,U,j,"\uE019","\\@varsupsetneqq");y(E,U,j,"\u22AE","\\nVdash",!0);y(E,U,j,"\u2AB5","\\precneqq",!0);y(E,U,j,"\u2AB6","\\succneqq",!0);y(E,U,j,"\uE016","\\@nsubseteqq");y(E,U,Je,"\u22B4","\\unlhd");y(E,U,Je,"\u22B5","\\unrhd");y(E,U,j,"\u219A","\\nleftarrow",!0);y(E,U,j,"\u219B","\\nrightarrow",!0);y(E,U,j,"\u21CD","\\nLeftarrow",!0);y(E,U,j,"\u21CF","\\nRightarrow",!0);y(E,U,j,"\u21AE","\\nleftrightarrow",!0);y(E,U,j,"\u21CE","\\nLeftrightarrow",!0);y(E,U,j,"\u25B3","\\vartriangle");y(E,U,Y,"\u210F","\\hslash");y(E,U,Y,"\u25BD","\\triangledown");y(E,U,Y,"\u25CA","\\lozenge");y(E,U,Y,"\u24C8","\\circledS");y(E,U,Y,"\xAE","\\circledR");y(we,U,Y,"\xAE","\\circledR");y(E,U,Y,"\u2221","\\measuredangle",!0);y(E,U,Y,"\u2204","\\nexists");y(E,U,Y,"\u2127","\\mho");y(E,U,Y,"\u2132","\\Finv",!0);y(E,U,Y,"\u2141","\\Game",!0);y(E,U,Y,"\u2035","\\backprime");y(E,U,Y,"\u25B2","\\blacktriangle");y(E,U,Y,"\u25BC","\\blacktriangledown");y(E,U,Y,"\u25A0","\\blacksquare");y(E,U,Y,"\u29EB","\\blacklozenge");y(E,U,Y,"\u2605","\\bigstar");y(E,U,Y,"\u2222","\\sphericalangle",!0);y(E,U,Y,"\u2201","\\complement",!0);y(E,U,Y,"\xF0","\\eth",!0);y(we,L,Y,"\xF0","\xF0");y(E,U,Y,"\u2571","\\diagup");y(E,U,Y,"\u2572","\\diagdown");y(E,U,Y,"\u25A1","\\square");y(E,U,Y,"\u25A1","\\Box");y(E,U,Y,"\u25CA","\\Diamond");y(E,U,Y,"\xA5","\\yen",!0);y(we,U,Y,"\xA5","\\yen",!0);y(E,U,Y,"\u2713","\\checkmark",!0);y(we,U,Y,"\u2713","\\checkmark");y(E,U,Y,"\u2136","\\beth",!0);y(E,U,Y,"\u2138","\\daleth",!0);y(E,U,Y,"\u2137","\\gimel",!0);y(E,U,Y,"\u03DD","\\digamma",!0);y(E,U,Y,"\u03F0","\\varkappa");y(E,U,Uo,"\u250C","\\@ulcorner",!0);y(E,U,to,"\u2510","\\@urcorner",!0);y(E,U,Uo,"\u2514","\\@llcorner",!0);y(E,U,to,"\u2518","\\@lrcorner",!0);y(E,U,j,"\u2266","\\leqq",!0);y(E,U,j,"\u2A7D","\\leqslant",!0);y(E,U,j,"\u2A95","\\eqslantless",!0);y(E,U,j,"\u2272","\\lesssim",!0);y(E,U,j,"\u2A85","\\lessapprox",!0);y(E,U,j,"\u224A","\\approxeq",!0);y(E,U,Je,"\u22D6","\\lessdot");y(E,U,j,"\u22D8","\\lll",!0);y(E,U,j,"\u2276","\\lessgtr",!0);y(E,U,j,"\u22DA","\\lesseqgtr",!0);y(E,U,j,"\u2A8B","\\lesseqqgtr",!0);y(E,U,j,"\u2251","\\doteqdot");y(E,U,j,"\u2253","\\risingdotseq",!0);y(E,U,j,"\u2252","\\fallingdotseq",!0);y(E,U,j,"\u223D","\\backsim",!0);y(E,U,j,"\u22CD","\\backsimeq",!0);y(E,U,j,"\u2AC5","\\subseteqq",!0);y(E,U,j,"\u22D0","\\Subset",!0);y(E,U,j,"\u228F","\\sqsubset",!0);y(E,U,j,"\u227C","\\preccurlyeq",!0);y(E,U,j,"\u22DE","\\curlyeqprec",!0);y(E,U,j,"\u227E","\\precsim",!0);y(E,U,j,"\u2AB7","\\precapprox",!0);y(E,U,j,"\u22B2","\\vartriangleleft");y(E,U,j,"\u22B4","\\trianglelefteq");y(E,U,j,"\u22A8","\\vDash",!0);y(E,U,j,"\u22AA","\\Vvdash",!0);y(E,U,j,"\u2323","\\smallsmile");y(E,U,j,"\u2322","\\smallfrown");y(E,U,j,"\u224F","\\bumpeq",!0);y(E,U,j,"\u224E","\\Bumpeq",!0);y(E,U,j,"\u2267","\\geqq",!0);y(E,U,j,"\u2A7E","\\geqslant",!0);y(E,U,j,"\u2A96","\\eqslantgtr",!0);y(E,U,j,"\u2273","\\gtrsim",!0);y(E,U,j,"\u2A86","\\gtrapprox",!0);y(E,U,Je,"\u22D7","\\gtrdot");y(E,U,j,"\u22D9","\\ggg",!0);y(E,U,j,"\u2277","\\gtrless",!0);y(E,U,j,"\u22DB","\\gtreqless",!0);y(E,U,j,"\u2A8C","\\gtreqqless",!0);y(E,U,j,"\u2256","\\eqcirc",!0);y(E,U,j,"\u2257","\\circeq",!0);y(E,U,j,"\u225C","\\triangleq",!0);y(E,U,j,"\u223C","\\thicksim");y(E,U,j,"\u2248","\\thickapprox");y(E,U,j,"\u2AC6","\\supseteqq",!0);y(E,U,j,"\u22D1","\\Supset",!0);y(E,U,j,"\u2290","\\sqsupset",!0);y(E,U,j,"\u227D","\\succcurlyeq",!0);y(E,U,j,"\u22DF","\\curlyeqsucc",!0);y(E,U,j,"\u227F","\\succsim",!0);y(E,U,j,"\u2AB8","\\succapprox",!0);y(E,U,j,"\u22B3","\\vartriangleright");y(E,U,j,"\u22B5","\\trianglerighteq");y(E,U,j,"\u22A9","\\Vdash",!0);y(E,U,j,"\u2223","\\shortmid");y(E,U,j,"\u2225","\\shortparallel");y(E,U,j,"\u226C","\\between",!0);y(E,U,j,"\u22D4","\\pitchfork",!0);y(E,U,j,"\u221D","\\varpropto");y(E,U,j,"\u25C0","\\blacktriangleleft");y(E,U,j,"\u2234","\\therefore",!0);y(E,U,j,"\u220D","\\backepsilon");y(E,U,j,"\u25B6","\\blacktriangleright");y(E,U,j,"\u2235","\\because",!0);y(E,U,j,"\u22D8","\\llless");y(E,U,j,"\u22D9","\\gggtr");y(E,U,Je,"\u22B2","\\lhd");y(E,U,Je,"\u22B3","\\rhd");y(E,U,j,"\u2242","\\eqsim",!0);y(E,L,j,"\u22C8","\\Join");y(E,U,j,"\u2251","\\Doteq",!0);y(E,U,Je,"\u2214","\\dotplus",!0);y(E,U,Je,"\u2216","\\smallsetminus");y(E,U,Je,"\u22D2","\\Cap",!0);y(E,U,Je,"\u22D3","\\Cup",!0);y(E,U,Je,"\u2A5E","\\doublebarwedge",!0);y(E,U,Je,"\u229F","\\boxminus",!0);y(E,U,Je,"\u229E","\\boxplus",!0);y(E,U,Je,"\u22C7","\\divideontimes",!0);y(E,U,Je,"\u22C9","\\ltimes",!0);y(E,U,Je,"\u22CA","\\rtimes",!0);y(E,U,Je,"\u22CB","\\leftthreetimes",!0);y(E,U,Je,"\u22CC","\\rightthreetimes",!0);y(E,U,Je,"\u22CF","\\curlywedge",!0);y(E,U,Je,"\u22CE","\\curlyvee",!0);y(E,U,Je,"\u229D","\\circleddash",!0);y(E,U,Je,"\u229B","\\circledast",!0);y(E,U,Je,"\u22C5","\\centerdot");y(E,U,Je,"\u22BA","\\intercal",!0);y(E,U,Je,"\u22D2","\\doublecap");y(E,U,Je,"\u22D3","\\doublecup");y(E,U,Je,"\u22A0","\\boxtimes",!0);y(E,U,j,"\u21E2","\\dashrightarrow",!0);y(E,U,j,"\u21E0","\\dashleftarrow",!0);y(E,U,j,"\u21C7","\\leftleftarrows",!0);y(E,U,j,"\u21C6","\\leftrightarrows",!0);y(E,U,j,"\u21DA","\\Lleftarrow",!0);y(E,U,j,"\u219E","\\twoheadleftarrow",!0);y(E,U,j,"\u21A2","\\leftarrowtail",!0);y(E,U,j,"\u21AB","\\looparrowleft",!0);y(E,U,j,"\u21CB","\\leftrightharpoons",!0);y(E,U,j,"\u21B6","\\curvearrowleft",!0);y(E,U,j,"\u21BA","\\circlearrowleft",!0);y(E,U,j,"\u21B0","\\Lsh",!0);y(E,U,j,"\u21C8","\\upuparrows",!0);y(E,U,j,"\u21BF","\\upharpoonleft",!0);y(E,U,j,"\u21C3","\\downharpoonleft",!0);y(E,L,j,"\u22B6","\\origof",!0);y(E,L,j,"\u22B7","\\imageof",!0);y(E,U,j,"\u22B8","\\multimap",!0);y(E,U,j,"\u21AD","\\leftrightsquigarrow",!0);y(E,U,j,"\u21C9","\\rightrightarrows",!0);y(E,U,j,"\u21C4","\\rightleftarrows",!0);y(E,U,j,"\u21A0","\\twoheadrightarrow",!0);y(E,U,j,"\u21A3","\\rightarrowtail",!0);y(E,U,j,"\u21AC","\\looparrowright",!0);y(E,U,j,"\u21B7","\\curvearrowright",!0);y(E,U,j,"\u21BB","\\circlearrowright",!0);y(E,U,j,"\u21B1","\\Rsh",!0);y(E,U,j,"\u21CA","\\downdownarrows",!0);y(E,U,j,"\u21BE","\\upharpoonright",!0);y(E,U,j,"\u21C2","\\downharpoonright",!0);y(E,U,j,"\u21DD","\\rightsquigarrow",!0);y(E,U,j,"\u21DD","\\leadsto");y(E,U,j,"\u21DB","\\Rrightarrow",!0);y(E,U,j,"\u21BE","\\restriction");y(E,L,Y,"\u2018","`");y(E,L,Y,"$","\\$");y(we,L,Y,"$","\\$");y(we,L,Y,"$","\\textdollar");y(E,L,Y,"%","\\%");y(we,L,Y,"%","\\%");y(E,L,Y,"_","\\_");y(we,L,Y,"_","\\_");y(we,L,Y,"_","\\textunderscore");y(E,L,Y,"\u2220","\\angle",!0);y(E,L,Y,"\u221E","\\infty",!0);y(E,L,Y,"\u2032","\\prime");y(E,L,Y,"\u25B3","\\triangle");y(E,L,Y,"\u0393","\\Gamma",!0);y(E,L,Y,"\u0394","\\Delta",!0);y(E,L,Y,"\u0398","\\Theta",!0);y(E,L,Y,"\u039B","\\Lambda",!0);y(E,L,Y,"\u039E","\\Xi",!0);y(E,L,Y,"\u03A0","\\Pi",!0);y(E,L,Y,"\u03A3","\\Sigma",!0);y(E,L,Y,"\u03A5","\\Upsilon",!0);y(E,L,Y,"\u03A6","\\Phi",!0);y(E,L,Y,"\u03A8","\\Psi",!0);y(E,L,Y,"\u03A9","\\Omega",!0);y(E,L,Y,"A","\u0391");y(E,L,Y,"B","\u0392");y(E,L,Y,"E","\u0395");y(E,L,Y,"Z","\u0396");y(E,L,Y,"H","\u0397");y(E,L,Y,"I","\u0399");y(E,L,Y,"K","\u039A");y(E,L,Y,"M","\u039C");y(E,L,Y,"N","\u039D");y(E,L,Y,"O","\u039F");y(E,L,Y,"P","\u03A1");y(E,L,Y,"T","\u03A4");y(E,L,Y,"X","\u03A7");y(E,L,Y,"\xAC","\\neg",!0);y(E,L,Y,"\xAC","\\lnot");y(E,L,Y,"\u22A4","\\top");y(E,L,Y,"\u22A5","\\bot");y(E,L,Y,"\u2205","\\emptyset");y(E,U,Y,"\u2205","\\varnothing");y(E,L,bt,"\u03B1","\\alpha",!0);y(E,L,bt,"\u03B2","\\beta",!0);y(E,L,bt,"\u03B3","\\gamma",!0);y(E,L,bt,"\u03B4","\\delta",!0);y(E,L,bt,"\u03F5","\\epsilon",!0);y(E,L,bt,"\u03B6","\\zeta",!0);y(E,L,bt,"\u03B7","\\eta",!0);y(E,L,bt,"\u03B8","\\theta",!0);y(E,L,bt,"\u03B9","\\iota",!0);y(E,L,bt,"\u03BA","\\kappa",!0);y(E,L,bt,"\u03BB","\\lambda",!0);y(E,L,bt,"\u03BC","\\mu",!0);y(E,L,bt,"\u03BD","\\nu",!0);y(E,L,bt,"\u03BE","\\xi",!0);y(E,L,bt,"\u03BF","\\omicron",!0);y(E,L,bt,"\u03C0","\\pi",!0);y(E,L,bt,"\u03C1","\\rho",!0);y(E,L,bt,"\u03C3","\\sigma",!0);y(E,L,bt,"\u03C4","\\tau",!0);y(E,L,bt,"\u03C5","\\upsilon",!0);y(E,L,bt,"\u03D5","\\phi",!0);y(E,L,bt,"\u03C7","\\chi",!0);y(E,L,bt,"\u03C8","\\psi",!0);y(E,L,bt,"\u03C9","\\omega",!0);y(E,L,bt,"\u03B5","\\varepsilon",!0);y(E,L,bt,"\u03D1","\\vartheta",!0);y(E,L,bt,"\u03D6","\\varpi",!0);y(E,L,bt,"\u03F1","\\varrho",!0);y(E,L,bt,"\u03C2","\\varsigma",!0);y(E,L,bt,"\u03C6","\\varphi",!0);y(E,L,Je,"\u2217","*",!0);y(E,L,Je,"+","+");y(E,L,Je,"\u2212","-",!0);y(E,L,Je,"\u22C5","\\cdot",!0);y(E,L,Je,"\u2218","\\circ",!0);y(E,L,Je,"\xF7","\\div",!0);y(E,L,Je,"\xB1","\\pm",!0);y(E,L,Je,"\xD7","\\times",!0);y(E,L,Je,"\u2229","\\cap",!0);y(E,L,Je,"\u222A","\\cup",!0);y(E,L,Je,"\u2216","\\setminus",!0);y(E,L,Je,"\u2227","\\land");y(E,L,Je,"\u2228","\\lor");y(E,L,Je,"\u2227","\\wedge",!0);y(E,L,Je,"\u2228","\\vee",!0);y(E,L,Y,"\u221A","\\surd");y(E,L,Uo,"\u27E8","\\langle",!0);y(E,L,Uo,"\u2223","\\lvert");y(E,L,Uo,"\u2225","\\lVert");y(E,L,to,"?","?");y(E,L,to,"!","!");y(E,L,to,"\u27E9","\\rangle",!0);y(E,L,to,"\u2223","\\rvert");y(E,L,to,"\u2225","\\rVert");y(E,L,j,"=","=");y(E,L,j,":",":");y(E,L,j,"\u2248","\\approx",!0);y(E,L,j,"\u2245","\\cong",!0);y(E,L,j,"\u2265","\\ge");y(E,L,j,"\u2265","\\geq",!0);y(E,L,j,"\u2190","\\gets");y(E,L,j,">","\\gt",!0);y(E,L,j,"\u2208","\\in",!0);y(E,L,j,"\uE020","\\@not");y(E,L,j,"\u2282","\\subset",!0);y(E,L,j,"\u2283","\\supset",!0);y(E,L,j,"\u2286","\\subseteq",!0);y(E,L,j,"\u2287","\\supseteq",!0);y(E,U,j,"\u2288","\\nsubseteq",!0);y(E,U,j,"\u2289","\\nsupseteq",!0);y(E,L,j,"\u22A8","\\models");y(E,L,j,"\u2190","\\leftarrow",!0);y(E,L,j,"\u2264","\\le");y(E,L,j,"\u2264","\\leq",!0);y(E,L,j,"<","\\lt",!0);y(E,L,j,"\u2192","\\rightarrow",!0);y(E,L,j,"\u2192","\\to");y(E,U,j,"\u2271","\\ngeq",!0);y(E,U,j,"\u2270","\\nleq",!0);y(E,L,Zl,"\xA0","\\ ");y(E,L,Zl,"\xA0","\\space");y(E,L,Zl,"\xA0","\\nobreakspace");y(we,L,Zl,"\xA0","\\ ");y(we,L,Zl,"\xA0"," ");y(we,L,Zl,"\xA0","\\space");y(we,L,Zl,"\xA0","\\nobreakspace");y(E,L,Zl,null,"\\nobreak");y(E,L,Zl,null,"\\allowbreak");y(E,L,_4,",",",");y(E,L,_4,";",";");y(E,U,Je,"\u22BC","\\barwedge",!0);y(E,U,Je,"\u22BB","\\veebar",!0);y(E,L,Je,"\u2299","\\odot",!0);y(E,L,Je,"\u2295","\\oplus",!0);y(E,L,Je,"\u2297","\\otimes",!0);y(E,L,Y,"\u2202","\\partial",!0);y(E,L,Je,"\u2298","\\oslash",!0);y(E,U,Je,"\u229A","\\circledcirc",!0);y(E,U,Je,"\u22A1","\\boxdot",!0);y(E,L,Je,"\u25B3","\\bigtriangleup");y(E,L,Je,"\u25BD","\\bigtriangledown");y(E,L,Je,"\u2020","\\dagger");y(E,L,Je,"\u22C4","\\diamond");y(E,L,Je,"\u22C6","\\star");y(E,L,Je,"\u25C3","\\triangleleft");y(E,L,Je,"\u25B9","\\triangleright");y(E,L,Uo,"{","\\{");y(we,L,Y,"{","\\{");y(we,L,Y,"{","\\textbraceleft");y(E,L,to,"}","\\}");y(we,L,Y,"}","\\}");y(we,L,Y,"}","\\textbraceright");y(E,L,Uo,"{","\\lbrace");y(E,L,to,"}","\\rbrace");y(E,L,Uo,"[","\\lbrack",!0);y(we,L,Y,"[","\\lbrack",!0);y(E,L,to,"]","\\rbrack",!0);y(we,L,Y,"]","\\rbrack",!0);y(E,L,Uo,"(","\\lparen",!0);y(E,L,to,")","\\rparen",!0);y(we,L,Y,"<","\\textless",!0);y(we,L,Y,">","\\textgreater",!0);y(E,L,Uo,"\u230A","\\lfloor",!0);y(E,L,to,"\u230B","\\rfloor",!0);y(E,L,Uo,"\u2308","\\lceil",!0);y(E,L,to,"\u2309","\\rceil",!0);y(E,L,Y,"\\","\\backslash");y(E,L,Y,"\u2223","|");y(E,L,Y,"\u2223","\\vert");y(we,L,Y,"|","\\textbar",!0);y(E,L,Y,"\u2225","\\|");y(E,L,Y,"\u2225","\\Vert");y(we,L,Y,"\u2225","\\textbardbl");y(we,L,Y,"~","\\textasciitilde");y(we,L,Y,"\\","\\textbackslash");y(we,L,Y,"^","\\textasciicircum");y(E,L,j,"\u2191","\\uparrow",!0);y(E,L,j,"\u21D1","\\Uparrow",!0);y(E,L,j,"\u2193","\\downarrow",!0);y(E,L,j,"\u21D3","\\Downarrow",!0);y(E,L,j,"\u2195","\\updownarrow",!0);y(E,L,j,"\u21D5","\\Updownarrow",!0);y(E,L,Nn,"\u2210","\\coprod");y(E,L,Nn,"\u22C1","\\bigvee");y(E,L,Nn,"\u22C0","\\bigwedge");y(E,L,Nn,"\u2A04","\\biguplus");y(E,L,Nn,"\u22C2","\\bigcap");y(E,L,Nn,"\u22C3","\\bigcup");y(E,L,Nn,"\u222B","\\int");y(E,L,Nn,"\u222B","\\intop");y(E,L,Nn,"\u222C","\\iint");y(E,L,Nn,"\u222D","\\iiint");y(E,L,Nn,"\u220F","\\prod");y(E,L,Nn,"\u2211","\\sum");y(E,L,Nn,"\u2A02","\\bigotimes");y(E,L,Nn,"\u2A01","\\bigoplus");y(E,L,Nn,"\u2A00","\\bigodot");y(E,L,Nn,"\u222E","\\oint");y(E,L,Nn,"\u222F","\\oiint");y(E,L,Nn,"\u2230","\\oiiint");y(E,L,Nn,"\u2A06","\\bigsqcup");y(E,L,Nn,"\u222B","\\smallint");y(we,L,Vf,"\u2026","\\textellipsis");y(E,L,Vf,"\u2026","\\mathellipsis");y(we,L,Vf,"\u2026","\\ldots",!0);y(E,L,Vf,"\u2026","\\ldots",!0);y(E,L,Vf,"\u22EF","\\@cdots",!0);y(E,L,Vf,"\u22F1","\\ddots",!0);y(E,L,Y,"\u22EE","\\varvdots");y(E,L,Ji,"\u02CA","\\acute");y(E,L,Ji,"\u02CB","\\grave");y(E,L,Ji,"\xA8","\\ddot");y(E,L,Ji,"~","\\tilde");y(E,L,Ji,"\u02C9","\\bar");y(E,L,Ji,"\u02D8","\\breve");y(E,L,Ji,"\u02C7","\\check");y(E,L,Ji,"^","\\hat");y(E,L,Ji,"\u20D7","\\vec");y(E,L,Ji,"\u02D9","\\dot");y(E,L,Ji,"\u02DA","\\mathring");y(E,L,bt,"\uE131","\\@imath");y(E,L,bt,"\uE237","\\@jmath");y(E,L,Y,"\u0131","\u0131");y(E,L,Y,"\u0237","\u0237");y(we,L,Y,"\u0131","\\i",!0);y(we,L,Y,"\u0237","\\j",!0);y(we,L,Y,"\xDF","\\ss",!0);y(we,L,Y,"\xE6","\\ae",!0);y(we,L,Y,"\u0153","\\oe",!0);y(we,L,Y,"\xF8","\\o",!0);y(we,L,Y,"\xC6","\\AE",!0);y(we,L,Y,"\u0152","\\OE",!0);y(we,L,Y,"\xD8","\\O",!0);y(we,L,Ji,"\u02CA","\\'");y(we,L,Ji,"\u02CB","\\`");y(we,L,Ji,"\u02C6","\\^");y(we,L,Ji,"\u02DC","\\~");y(we,L,Ji,"\u02C9","\\=");y(we,L,Ji,"\u02D8","\\u");y(we,L,Ji,"\u02D9","\\.");y(we,L,Ji,"\xB8","\\c");y(we,L,Ji,"\u02DA","\\r");y(we,L,Ji,"\u02C7","\\v");y(we,L,Ji,"\xA8",'\\"');y(we,L,Ji,"\u02DD","\\H");y(we,L,Ji,"\u25EF","\\textcircled");var xj={"--":!0,"---":!0,"``":!0,"''":!0};y(we,L,Y,"\u2013","--",!0);y(we,L,Y,"\u2013","\\textendash");y(we,L,Y,"\u2014","---",!0);y(we,L,Y,"\u2014","\\textemdash");y(we,L,Y,"\u2018","`",!0);y(we,L,Y,"\u2018","\\textquoteleft");y(we,L,Y,"\u2019","'",!0);y(we,L,Y,"\u2019","\\textquoteright");y(we,L,Y,"\u201C","``",!0);y(we,L,Y,"\u201C","\\textquotedblleft");y(we,L,Y,"\u201D","''",!0);y(we,L,Y,"\u201D","\\textquotedblright");y(E,L,Y,"\xB0","\\degree",!0);y(we,L,Y,"\xB0","\\degree");y(we,L,Y,"\xB0","\\textdegree",!0);y(E,L,Y,"\xA3","\\pounds");y(E,L,Y,"\xA3","\\mathsterling",!0);y(we,L,Y,"\xA3","\\pounds");y(we,L,Y,"\xA3","\\textsterling",!0);y(E,U,Y,"\u2720","\\maltese");y(we,U,Y,"\u2720","\\maltese");var qW='0123456789/@."';for(J5=0;J5{if(hd(i.classes)!==hd(e.classes)||i.skew!==e.skew||i.maxFontSize!==e.maxFontSize)return!1;if(i.classes.length===1){var t=i.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n in i.style)if(i.style.hasOwnProperty(n)&&i.style[n]!==e.style[n])return!1;for(var r in e.style)if(e.style.hasOwnProperty(r)&&i.style[r]!==e.style[r])return!1;return!0},Hhe=i=>{for(var e=0;et&&(t=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},_o=function(e,t,n,r){var o=new Au(e,t,n,r);return D8(o),o},Ej=(i,e,t,n)=>new Au(i,e,t,n),Bhe=function(e,t,n){var r=_o([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=ze(r.height),r.maxFontSize=1,r},zhe=function(e,t,n,r){var o=new J1(e,t,n,r);return D8(o),o},Tj=function(e){var t=new Iu(e);return D8(t),t},Uhe=function(e,t){return e instanceof Iu?_o([],[e],t):e},Whe=function(e){if(e.positionType==="individualShift"){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,s=1;s{var t=_o(["mspace"],[],e),n=cn(i,e);return t.style.marginRight=ze(n),t},n4=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}var o;return t==="textbf"&&n==="textit"?o="BoldItalic":t==="textbf"?o="Bold":t==="textit"?o="Italic":o="Regular",r+"-"+o},kj={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ij={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Khe=function(e,t){var[n,r,o]=Ij[e],s=new Ua(n),a=new Vs([s],{width:ze(r),height:ze(o),style:"width:"+ze(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=Ej(["overlay"],[a],t);return l.height=o,l.style.height=ze(o),l.style.width=ze(r),l},te={fontMap:kj,makeSymbol:js,mathsym:Rhe,makeSpan:_o,makeSvgSpan:Ej,makeLineSpan:Bhe,makeAnchor:zhe,makeFragment:Tj,wrapFragment:Uhe,makeVList:jhe,makeOrd:Phe,makeGlue:Vhe,staticSvg:Khe,svgData:Ij,tryCombineChars:Hhe},ln={number:3,unit:"mu"},Tu={number:4,unit:"mu"},$l={number:5,unit:"mu"},qhe={mord:{mop:ln,mbin:Tu,mrel:$l,minner:ln},mop:{mord:ln,mop:ln,mrel:$l,minner:ln},mbin:{mord:Tu,mop:Tu,mopen:Tu,minner:Tu},mrel:{mord:$l,mop:$l,mopen:$l,minner:$l},mopen:{},mclose:{mop:ln,mbin:Tu,mrel:$l,minner:ln},mpunct:{mord:ln,mop:ln,mrel:$l,mopen:ln,mclose:ln,mpunct:ln,minner:ln},minner:{mord:ln,mop:ln,mbin:Tu,mrel:$l,mopen:ln,mpunct:ln,minner:ln}},Ghe={mord:{mop:ln},mop:{mord:ln,mop:ln},mbin:{},mrel:{},mopen:{},mclose:{mop:ln},mpunct:{},minner:{mop:ln}},Aj={},f4={},p4={};function Ye(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:r},l=0;l{var b=g.classes[0],S=m.classes[0];b==="mbin"&&wt.contains(Yhe,S)?g.classes[0]="mord":S==="mbin"&&wt.contains($he,b)&&(m.classes[0]="mord")},{node:u},h,p),YW(o,(m,g)=>{var b=S8(g),S=S8(m),k=b&&S?m.hasClass("mtight")?Ghe[b][S]:qhe[b][S]:null;if(k)return te.makeGlue(k,c)},{node:u},h,p),o},YW=function i(e,t,n,r,o){r&&e.push(r);for(var s=0;sh=>{e.splice(u+1,0,h),s++})(s)}r&&e.pop()},Lj=function(e){return e instanceof Iu||e instanceof J1||e instanceof Au&&e.hasClass("enclosing")?e:null},Jhe=function i(e,t){var n=Lj(e);if(n){var r=n.children;if(r.length){if(t==="right")return i(r[r.length-1],"right");if(t==="left")return i(r[0],"left")}}return e},S8=function(e,t){return e?(t&&(e=Jhe(e,t)),Qhe[e.classes[0]]||null):null},e0=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Ql(t.concat(n))},ci=function(e,t,n){if(!e)return Ql();if(f4[e.type]){var r=f4[e.type](e,t);if(n&&t.size!==n.size){r=Ql(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}else throw new Ie("Got group of unknown type: '"+e.type+"'")};function r4(i,e){var t=Ql(["base"],i,e),n=Ql(["strut"]);return n.style.height=ze(t.height+t.depth),t.depth&&(n.style.verticalAlign=ze(-t.depth)),t.children.unshift(n),t}function w8(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=Yn(i,e,"root"),r;n.length===2&&n[1].hasClass("tag")&&(r=n.pop());for(var o=[],s=[],a=0;a0&&(o.push(r4(s,e)),s=[]),o.push(n[a]));s.length>0&&o.push(r4(s,e));var c;t?(c=r4(Yn(t,e,!0)),c.classes=["tag"],o.push(c)):r&&o.push(r);var d=Ql(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),c){var u=c.children[0];u.style.height=ze(d.height+d.depth),d.depth&&(u.style.verticalAlign=ze(-d.depth))}return d}function Mj(i){return new Iu(i)}var bo=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=hd(this.classes));for(var n=0;n0&&(e+=' class ="'+wt.escape(hd(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}},ku=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return wt.escape(this.toText())}toText(){return this.text}},x8=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ze(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},Ee={MathNode:bo,TextNode:ku,SpaceNode:x8,newDocumentFragment:Mj},_s=function(e,t,n){return ji[t][e]&&ji[t][e].replace&&e.charCodeAt(0)!==55349&&!(xj.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=ji[t][e].replace),new Ee.TextNode(e)},N8=function(e){return e.length===1?e[0]:new Ee.MathNode("mrow",e)},R8=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var n=t.font;if(!n||n==="mathnormal")return null;var r=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var o=e.text;if(wt.contains(["\\imath","\\jmath"],o))return null;ji[r][o]&&ji[r][o].replace&&(o=ji[r][o].replace);var s=te.fontMap[n].fontName;return M8(o,s,r)?te.fontMap[n].variant:null},Co=function(e,t,n){if(e.length===1){var r=Oi(e[0],t);return n&&r instanceof bo&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o=[],s,a=0;a0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),o.pop())}}}o.push(l),s=l}return o},fd=function(e,t,n){return N8(Co(e,t,n))},Oi=function(e,t){if(!e)return new Ee.MathNode("mrow");if(p4[e.type]){var n=p4[e.type](e,t);return n}else throw new Ie("Got group of unknown type: '"+e.type+"'")};function XW(i,e,t,n,r){var o=Co(i,t),s;o.length===1&&o[0]instanceof bo&&wt.contains(["mrow","mtable"],o[0].type)?s=o[0]:s=new Ee.MathNode("mrow",o);var a=new Ee.MathNode("annotation",[new Ee.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new Ee.MathNode("semantics",[s,a]),c=new Ee.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=r?"katex":"katex-mathml";return te.makeSpan([d],[c])}var Dj=function(e){return new u4({style:e.displayMode?_t.DISPLAY:_t.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Nj=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=te.makeSpan(n,[e])}return e},Zhe=function(e,t,n){var r=Dj(n),o;if(n.output==="mathml")return XW(e,t,r,n.displayMode,!0);if(n.output==="html"){var s=w8(e,r);o=te.makeSpan(["katex"],[s])}else{var a=XW(e,t,r,n.displayMode,!1),l=w8(e,r);o=te.makeSpan(["katex"],[a,l])}return Nj(o,n)},efe=function(e,t,n){var r=Dj(n),o=w8(e,r),s=te.makeSpan(["katex"],[o]);return Nj(s,n)},tfe={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},ife=function(e){var t=new Ee.MathNode("mo",[new Ee.TextNode(tfe[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},nfe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},rfe=function(e){return e.type==="ordgroup"?e.body.length:1},ofe=function(e,t){function n(){var a=4e5,l=e.label.slice(1);if(wt.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=rfe(c.base),u,h,p;if(d>5)l==="widehat"||l==="widecheck"?(u=420,a=2364,p=.42,h=l+"4"):(u=312,a=2340,p=.34,h="tilde4");else{var m=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][m],u=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],h=l+m):(a=[0,600,1033,2339,2340][m],u=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],h="tilde"+m)}var g=new Ua(h),b=new Vs([g],{width:"100%",height:ze(p),viewBox:"0 0 "+a+" "+u,preserveAspectRatio:"none"});return{span:te.makeSvgSpan([],[b],t),minWidth:0,height:p}}else{var S=[],k=nfe[l],[N,A,H]=k,K=H/1e3,W=N.length,re,ae;if(W===1){var Ne=k[3];re=["hide-tail"],ae=[Ne]}else if(W===2)re=["halfarrow-left","halfarrow-right"],ae=["xMinYMin","xMaxYMin"];else if(W===3)re=["brace-left","brace-center","brace-right"],ae=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+W+" children.");for(var he=0;he0&&(r.style.minWidth=ze(o)),r},sfe=function(e,t,n,r,o){var s,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(s=te.makeSpan(["stretchy",t],[],o),t==="fbox"){var l=o.color&&o.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new Z1({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&c.push(new Z1({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Vs(c,{width:"100%",height:ze(a)});s=te.makeSvgSpan([],[d],o)}return s.height=a,s.style.height=ze(a),s},Jl={encloseSpan:sfe,mathMLnode:ife,svgSpan:ofe};function Wt(i,e){if(!i||i.type!==e)throw new Error("Expected node of type "+e+", but got "+(i?"node of type "+i.type:String(i)));return i}function O8(i){var e=y4(i);if(!e)throw new Error("Expected node of symbol group type, but got "+(i?"node of type "+i.type:String(i)));return e}function y4(i){return i&&(i.type==="atom"||Dhe.hasOwnProperty(i.type))?i:null}var P8=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=Wt(i.base,"accent"),t=n.base,i.base=t,r=Lhe(ci(i,e)),i.base=n):(n=Wt(i,"accent"),t=n.base);var o=ci(t,e.havingCrampedStyle()),s=n.isShifty&&wt.isCharacterBox(t),a=0;if(s){var l=wt.getBaseElem(t),c=ci(l,e.havingCrampedStyle());a=KW(c).skew}var d=n.label==="\\c",u=d?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight),h;if(n.isStretchy)h=Jl.svgSpan(n,e),h=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+ze(2*a)+")",marginLeft:ze(2*a)}:void 0}]},e);else{var p,m;n.label==="\\vec"?(p=te.staticSvg("vec",e),m=te.svgData.vec[1]):(p=te.makeOrd({mode:n.mode,text:n.label},e,"textord"),p=KW(p),p.italic=0,m=p.width,d&&(u+=p.depth)),h=te.makeSpan(["accent-body"],[p]);var g=n.label==="\\textcircled";g&&(h.classes.push("accent-full"),u=o.height);var b=a;g||(b-=m/2),h.style.left=ze(b),n.label==="\\textcircled"&&(h.style.top=".2em"),h=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:h}]},e)}var S=te.makeSpan(["mord","accent"],[h],e);return r?(r.children[0]=S,r.height=Math.max(S.height,r.height),r.classes[0]="mord",r):S},Rj=(i,e)=>{var t=i.isStretchy?Jl.mathMLnode(i.label):new Ee.MathNode("mo",[_s(i.label,i.mode)]),n=new Ee.MathNode("mover",[Oi(i.base,e),t]);return n.setAttribute("accent","true"),n},afe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));Ye({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(i,e)=>{var t=m4(e[0]),n=!afe.test(i.funcName),r=!n||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:n,isShifty:r,base:t}},htmlBuilder:P8,mathmlBuilder:Rj});Ye({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(i,e)=>{var t=e[0],n=i.parser.mode;return n==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:P8,mathmlBuilder:Rj});Ye({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"accentUnder",mode:t.mode,label:n,base:r}},htmlBuilder:(i,e)=>{var t=ci(i.base,e),n=Jl.svgSpan(i,e),r=i.label==="\\utilde"?.12:0,o=te.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]},e);return te.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(i,e)=>{var t=Jl.mathMLnode(i.label),n=new Ee.MathNode("munder",[Oi(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var o4=i=>{var e=new Ee.MathNode("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Ye({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n,funcName:r}=i;return{type:"xArrow",mode:n.mode,label:r,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,n=e.havingStyle(t.sup()),r=te.wrapFragment(ci(i.body,n,e),e),o=i.label.slice(0,2)==="\\x"?"x":"cd";r.classes.push(o+"-arrow-pad");var s;i.below&&(n=e.havingStyle(t.sub()),s=te.wrapFragment(ci(i.below,n,e),e),s.classes.push(o+"-arrow-pad"));var a=Jl.svgSpan(i,e),l=-e.fontMetrics().axisHeight+.5*a.height,c=-e.fontMetrics().axisHeight-.5*a.height-.111;(r.depth>.25||i.label==="\\xleftequilibrium")&&(c-=r.depth);var d;if(s){var u=-e.fontMetrics().axisHeight+s.height+.5*a.height+.111;d=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:u}]},e)}else d=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:a,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),te.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(i,e){var t=Jl.mathMLnode(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(i.body){var r=o4(Oi(i.body,e));if(i.below){var o=o4(Oi(i.below,e));n=new Ee.MathNode("munderover",[t,o,r])}else n=new Ee.MathNode("mover",[t,r])}else if(i.below){var s=o4(Oi(i.below,e));n=new Ee.MathNode("munder",[t,s])}else n=o4(),n=new Ee.MathNode("mover",[t,n]);return n}});var lfe=te.makeSpan;function Oj(i,e){var t=Yn(i.body,e,!0);return lfe([i.mclass],t,e)}function Pj(i,e){var t,n=Co(i.body,e);return i.mclass==="minner"?t=new Ee.MathNode("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new Ee.MathNode("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new Ee.MathNode("mo",n),i.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):i.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):i.mclass==="mopen"||i.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):i.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}Ye({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:Tn(r),isCharacterBox:wt.isCharacterBox(r)}},htmlBuilder:Oj,mathmlBuilder:Pj});var C4=i=>{var e=i.type==="ordgroup"&&i.body.length?i.body[0]:i;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};Ye({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:C4(e[0]),body:Tn(e[1]),isCharacterBox:wt.isCharacterBox(e[1])}}});Ye({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:n}=i,r=e[1],o=e[0],s;n!=="\\stackrel"?s=C4(r):s="mrel";var a={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Tn(r)},l={type:"supsub",mode:o.mode,base:a,sup:n==="\\underset"?null:o,sub:n==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:s,body:[l],isCharacterBox:wt.isCharacterBox(l)}},htmlBuilder:Oj,mathmlBuilder:Pj});Ye({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:C4(e[0]),body:Tn(e[0])}},htmlBuilder(i,e){var t=Yn(i.body,e,!0),n=te.makeSpan([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=Co(i.body,e),n=new Ee.MathNode("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var cfe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},QW=()=>({type:"styling",body:[],mode:"math",style:"display"}),JW=i=>i.type==="textord"&&i.text==="@",dfe=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function ufe(i,e,t){var n=cfe[i];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var r=t.callFunction("\\\\cdleft",[e[0]],[]),o={type:"atom",text:n,mode:"math",family:"rel"},s=t.callFunction("\\Big",[o],[]),a=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[r,s,a]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function hfe(i){var e=[];for(i.gullet.beginGroup(),i.gullet.macros.set("\\cr","\\\\\\relax"),i.gullet.beginGroup();;){e.push(i.parseExpression(!1,"\\\\")),i.gullet.endGroup(),i.gullet.beginGroup();var t=i.fetch().text;if(t==="&"||t==="\\\\")i.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Ie("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],o=0;o-1))if("<>AV".indexOf(c)>-1)for(var u=0;u<2;u++){for(var h=!0,p=l+1;pAV=|." after @',s[l]);var m=ufe(c,d,i),g={type:"styling",body:[m],mode:"math",style:"display"};n.push(g),a=QW()}o%2===0?n.push(a):n.shift(),n=[],r.push(n)}i.gullet.endGroup(),i.gullet.endGroup();var b=new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}Ye({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),n=te.wrapFragment(ci(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=ze(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new Ee.MathNode("mrow",[Oi(i.label,e)]);return t=new Ee.MathNode("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ee.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});Ye({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(i,e){var{parser:t}=i;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(i,e){var t=te.wrapFragment(ci(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Ee.MathNode("mrow",[Oi(i.fragment,e)])}});Ye({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=Wt(e[0],"ordgroup"),r=n.body,o="",s=0;s=1114111)throw new Ie("\\@char with invalid code point "+o);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:c}}});var Fj=(i,e)=>{var t=Yn(i.body,e.withColor(i.color),!1);return te.makeFragment(t)},Hj=(i,e)=>{var t=Co(i.body,e.withColor(i.color)),n=new Ee.MathNode("mstyle",t);return n.setAttribute("mathcolor",i.color),n};Ye({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=Wt(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:Tn(r)}},htmlBuilder:Fj,mathmlBuilder:Hj});Ye({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=Wt(e[0],"color-token").color;t.gullet.macros.set("\\current@color",r);var o=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:r,body:o}},htmlBuilder:Fj,mathmlBuilder:Hj});Ye({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:n}=i,r=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:r&&Wt(r,"size").value}},htmlBuilder(i,e){var t=te.makeSpan(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=ze(cn(i.size,e)))),t},mathmlBuilder(i,e){var t=new Ee.MathNode("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",ze(cn(i.size,e)))),t}});var E8={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Bj=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Ie("Expected a control sequence",i);return e},ffe=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},zj=(i,e,t,n)=>{var r=i.gullet.macros.get(t.text);r==null&&(t.noexpand=!0,r={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,r,n)};Ye({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var n=e.fetch();if(E8[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=E8[n.text]),Wt(e.parseFunction(),"internal");throw new Ie("Invalid token after macro prefix",n)}});Ye({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=e.gullet.popToken(),r=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new Ie("Expected a control sequence",n);for(var o=0,s,a=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),a[o].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Ie('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==o+1)throw new Ie('Argument number "'+n.text+'" out of order');o++,a.push([])}else{if(n.text==="EOF")throw new Ie("Expected a macro definition");a[o].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(t==="\\edef"||t==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(r,{tokens:l,numArgs:o,delimiters:a},t===E8[t]),{type:"internal",mode:e.mode}}});Ye({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=Bj(e.gullet.popToken());e.gullet.consumeSpaces();var r=ffe(e);return zj(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});Ye({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=Bj(e.gullet.popToken()),r=e.gullet.popToken(),o=e.gullet.popToken();return zj(e,n,o,t==="\\\\globalfuture"),e.gullet.pushToken(o),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var $1=function(e,t,n){var r=ji.math[e]&&ji.math[e].replace,o=M8(r||e,t,n);if(!o)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return o},F8=function(e,t,n,r){var o=n.havingBaseStyle(t),s=te.makeSpan(r.concat(o.sizingClasses(n)),[e],n),a=o.sizeMultiplier/n.sizeMultiplier;return s.height*=a,s.depth*=a,s.maxFontSize=o.sizeMultiplier,s},Uj=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ze(o),e.height-=o,e.depth+=o},pfe=function(e,t,n,r,o,s){var a=te.makeSymbol(e,"Main-Regular",o,r),l=F8(a,t,r,s);return n&&Uj(l,r,t),l},mfe=function(e,t,n,r){return te.makeSymbol(e,"Size"+t+"-Regular",n,r)},Wj=function(e,t,n,r,o,s){var a=mfe(e,t,o,r),l=F8(te.makeSpan(["delimsizing","size"+t],[a],r),_t.TEXT,r,s);return n&&Uj(l,r,_t.TEXT),l},c8=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var o=te.makeSpan(["delimsizinginner",r],[te.makeSpan([],[te.makeSymbol(e,t,n)])]);return{type:"elem",elem:o}},d8=function(e,t,n){var r=Ba["Size4-Regular"][e.charCodeAt(0)]?Ba["Size4-Regular"][e.charCodeAt(0)][4]:Ba["Size1-Regular"][e.charCodeAt(0)][4],o=new Ua("inner",whe(e,Math.round(1e3*t))),s=new Vs([o],{width:ze(r),height:ze(t),style:"width:"+ze(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=te.makeSvgSpan([],[s],n);return a.height=t,a.style.height=ze(t),a.style.width=ze(r),{type:"elem",elem:a}},T8=.008,s4={type:"kern",size:-1*T8},gfe=["|","\\lvert","\\rvert","\\vert"],vfe=["\\|","\\lVert","\\rVert","\\Vert"],jj=function(e,t,n,r,o,s){var a,l,c,d,u="",h=0;a=c=d=e,l=null;var p="Size1-Regular";e==="\\uparrow"?c=d="\u23D0":e==="\\Uparrow"?c=d="\u2016":e==="\\downarrow"?a=c="\u23D0":e==="\\Downarrow"?a=c="\u2016":e==="\\updownarrow"?(a="\\uparrow",c="\u23D0",d="\\downarrow"):e==="\\Updownarrow"?(a="\\Uparrow",c="\u2016",d="\\Downarrow"):wt.contains(gfe,e)?(c="\u2223",u="vert",h=333):wt.contains(vfe,e)?(c="\u2225",u="doublevert",h=556):e==="["||e==="\\lbrack"?(a="\u23A1",c="\u23A2",d="\u23A3",p="Size4-Regular",u="lbrack",h=667):e==="]"||e==="\\rbrack"?(a="\u23A4",c="\u23A5",d="\u23A6",p="Size4-Regular",u="rbrack",h=667):e==="\\lfloor"||e==="\u230A"?(c=a="\u23A2",d="\u23A3",p="Size4-Regular",u="lfloor",h=667):e==="\\lceil"||e==="\u2308"?(a="\u23A1",c=d="\u23A2",p="Size4-Regular",u="lceil",h=667):e==="\\rfloor"||e==="\u230B"?(c=a="\u23A5",d="\u23A6",p="Size4-Regular",u="rfloor",h=667):e==="\\rceil"||e==="\u2309"?(a="\u23A4",c=d="\u23A5",p="Size4-Regular",u="rceil",h=667):e==="("||e==="\\lparen"?(a="\u239B",c="\u239C",d="\u239D",p="Size4-Regular",u="lparen",h=875):e===")"||e==="\\rparen"?(a="\u239E",c="\u239F",d="\u23A0",p="Size4-Regular",u="rparen",h=875):e==="\\{"||e==="\\lbrace"?(a="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(a="\u23A7",d="\u23A9",c="\u23AA",p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(a="\u23AB",d="\u23AD",c="\u23AA",p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(a="\u23A7",d="\u23AD",c="\u23AA",p="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(a="\u23AB",d="\u23A9",c="\u23AA",p="Size4-Regular");var m=$1(a,p,o),g=m.height+m.depth,b=$1(c,p,o),S=b.height+b.depth,k=$1(d,p,o),N=k.height+k.depth,A=0,H=1;if(l!==null){var K=$1(l,p,o);A=K.height+K.depth,H=2}var W=g+N+A,re=Math.max(0,Math.ceil((t-W)/(H*S))),ae=W+re*H*S,Ne=r.fontMetrics().axisHeight;n&&(Ne*=r.sizeMultiplier);var he=ae/2-Ne,Xe=[];if(u.length>0){var st=ae-g-N,rt=Math.round(ae*1e3),Nt=xhe(u,Math.round(st*1e3)),Z=new Ua(u,Nt),ye=(h/1e3).toFixed(3)+"em",ge=(rt/1e3).toFixed(3)+"em",$=new Vs([Z],{width:ye,height:ge,viewBox:"0 0 "+h+" "+rt}),Q=te.makeSvgSpan([],[$],r);Q.height=rt/1e3,Q.style.width=ye,Q.style.height=ge,Xe.push({type:"elem",elem:Q})}else{if(Xe.push(c8(d,p,o)),Xe.push(s4),l===null){var ie=ae-g-N+2*T8;Xe.push(d8(c,ie,r))}else{var de=(ae-g-N-A)/2+2*T8;Xe.push(d8(c,de,r)),Xe.push(s4),Xe.push(c8(l,p,o)),Xe.push(s4),Xe.push(d8(c,de,r))}Xe.push(s4),Xe.push(c8(a,p,o))}var $t=r.havingBaseStyle(_t.TEXT),Xt=te.makeVList({positionType:"bottom",positionData:he,children:Xe},$t);return F8(te.makeSpan(["delimsizing","mult"],[Xt],$t),_t.TEXT,r,s)},u8=80,h8=.08,f8=function(e,t,n,r,o){var s=She(e,r,n),a=new Ua(e,s),l=new Vs([a],{width:"400em",height:ze(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return te.makeSvgSpan(["hide-tail"],[l],o)},_fe=function(e,t){var n=t.havingBaseSizing(),r=Gj("\\surd",e*n.sizeMultiplier,qj,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l=0,c=0,d=0,u;return r.type==="small"?(d=1e3+1e3*s+u8,e<1?o=1:e<1.4&&(o=.7),l=(1+s+h8)/o,c=(1+s)/o,a=f8("sqrtMain",l,d,s,t),a.style.minWidth="0.853em",u=.833/o):r.type==="large"?(d=(1e3+u8)*Y1[r.size],c=(Y1[r.size]+s)/o,l=(Y1[r.size]+s+h8)/o,a=f8("sqrtSize"+r.size,l,d,s,t),a.style.minWidth="1.02em",u=1/o):(l=e+s+h8,c=e+s,d=Math.floor(1e3*e+s)+u8,a=f8("sqrtTall",l,d,s,t),a.style.minWidth="0.742em",u=1.056),a.height=c,a.style.height=ze(l),{span:a,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},Vj=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],bfe=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Kj=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Y1=[0,1.2,1.8,2.4,3],yfe=function(e,t,n,r,o){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),wt.contains(Vj,e)||wt.contains(Kj,e))return Wj(e,t,!1,n,r,o);if(wt.contains(bfe,e))return jj(e,Y1[t],!1,n,r,o);throw new Ie("Illegal delimiter: '"+e+"'")},Cfe=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Sfe=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"stack"}],qj=[{type:"small",style:_t.SCRIPTSCRIPT},{type:"small",style:_t.SCRIPT},{type:"small",style:_t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],wfe=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Gj=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size),s=o;st)return n[s]}return n[n.length-1]},$j=function(e,t,n,r,o,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var a;wt.contains(Kj,e)?a=Cfe:wt.contains(Vj,e)?a=qj:a=Sfe;var l=Gj(e,t,a,r);return l.type==="small"?pfe(e,l.style,n,r,o,s):l.type==="large"?Wj(e,l.size,n,r,o,s):jj(e,t,n,r,o,s)},xfe=function(e,t,n,r,o,s){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,l=901,c=5/r.fontMetrics().ptPerEm,d=Math.max(t-a,n+a),u=Math.max(d/500*l,2*d-c);return $j(e,u,!0,r,o,s)},Xl={sqrtImage:_fe,sizedDelim:yfe,sizeToMaxHeight:Y1,customSizedDelim:$j,leftRightDelim:xfe},ZW={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Efe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function S4(i,e){var t=y4(i);if(t&&wt.contains(Efe,t.text))return t;throw t?new Ie("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new Ie("Invalid delimiter type '"+i.type+"'",i)}Ye({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(i,e)=>{var t=S4(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:ZW[i.funcName].size,mclass:ZW[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?te.makeSpan([i.mclass]):Xl.sizedDelim(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(_s(i.delim,i.mode));var t=new Ee.MathNode("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ze(Xl.sizeToMaxHeight[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function ej(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ye({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=i.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Ie("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:S4(e[0],i).text,color:t}}});Ye({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=S4(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=Wt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(i,e)=>{ej(i);for(var t=Yn(i.body,e,!0,["mopen","mclose"]),n=0,r=0,o=!1,s=0;s{ej(i);var t=Co(i.body,e);if(i.left!=="."){var n=new Ee.MathNode("mo",[_s(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new Ee.MathNode("mo",[_s(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return N8(t)}});Ye({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=S4(e[0],i);if(!i.parser.leftrightDepth)throw new Ie("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;if(i.delim===".")t=e0(e,[]);else{t=Xl.sizedDelim(i.delim,1,e,i.mode,[]);var n={delim:i.delim,options:e};t.isMiddle=n}return t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?_s("|","text"):_s(i.delim,i.mode),n=new Ee.MathNode("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var H8=(i,e)=>{var t=te.wrapFragment(ci(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,o,s=0,a=wt.isCharacterBox(i.body);if(n==="sout")o=te.makeSpan(["stretchy","sout"]),o.height=e.fontMetrics().defaultRuleThickness/r,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=cn({number:.6,unit:"pt"},e),c=cn({number:.35,unit:"ex"},e),d=e.havingBaseSizing();r=r/d.sizeMultiplier;var u=t.height+t.depth+l+c;t.style.paddingLeft=ze(u/2+l);var h=Math.floor(1e3*u*r),p=yhe(h),m=new Vs([new Ua("phase",p)],{width:"400em",height:ze(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});o=te.makeSvgSpan(["hide-tail"],[m],e),o.style.height=ze(u),s=t.depth+l+c}else{/cancel/.test(n)?a||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var g=0,b=0,S=0;/box/.test(n)?(S=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:S),b=g):n==="angl"?(S=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*S,b=Math.max(0,.25-t.depth)):(g=a?.2:0,b=g),o=Jl.encloseSpan(t,n,g,b,e),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=ze(S)):n==="angl"&&S!==.049&&(o.style.borderTopWidth=ze(S),o.style.borderRightWidth=ze(S)),s=t.depth+b,i.backgroundColor&&(o.style.backgroundColor=i.backgroundColor,i.borderColor&&(o.style.borderColor=i.borderColor))}var k;if(i.backgroundColor)k=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:t,shift:0}]},e);else{var N=/cancel|phase/.test(n)?["svg-align"]:[];k=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:N}]},e)}return/cancel/.test(n)&&(k.height=t.height,k.depth=t.depth),/cancel/.test(n)&&!a?te.makeSpan(["mord","cancel-lap"],[k],e):te.makeSpan(["mord"],[k],e)},B8=(i,e)=>{var t=0,n=new Ee.MathNode(i.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Oi(i.body,e)]);switch(i.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var r=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(i.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};Ye({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Wt(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:o,body:s}},htmlBuilder:H8,mathmlBuilder:B8});Ye({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(i,e,t){var{parser:n,funcName:r}=i,o=Wt(e[0],"color-token").color,s=Wt(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,borderColor:o,body:a}},htmlBuilder:H8,mathmlBuilder:B8});Ye({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});Ye({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:H8,mathmlBuilder:B8});Ye({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Yj={};function Wa(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},l=0;l{var e=i.parser.settings;if(!e.displayMode)throw new Ie("{"+i.envName+"} can be used only in display mode.")};function z8(i){if(i.indexOf("ed")===-1)return i.indexOf("*")===-1}function pd(i,e,t){var{hskipBeforeAndAfter:n,addJot:r,cols:o,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=e;if(i.gullet.beginGroup(),c||i.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=i.gullet.expandMacroAsText("\\arraystretch");if(p==null)s=1;else if(s=parseFloat(p),!s||s<0)throw new Ie("Invalid \\arraystretch: "+p)}i.gullet.beginGroup();var m=[],g=[m],b=[],S=[],k=l!=null?[]:void 0;function N(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function A(){k&&(i.gullet.macros.get("\\df@tag")?(k.push(i.subparse([new za("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):k.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(N(),S.push(tj(i));;){var H=i.parseExpression(!1,c?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup(),H={type:"ordgroup",mode:i.mode,body:H},t&&(H={type:"styling",mode:i.mode,style:t,body:[H]}),m.push(H);var K=i.fetch().text;if(K==="&"){if(u&&m.length===u){if(c||a)throw new Ie("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(K==="\\end"){A(),m.length===1&&H.type==="styling"&&H.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),S.length0&&(N+=.25),c.push({pos:N,isDashed:fl[Hn]})}for(A(s[0]),n=0;n0&&(he+=k,Wfl))for(n=0;n=a)){var Gi=void 0;(r>0||e.hskipBeforeAndAfter)&&(Gi=wt.deflt(de.pregap,h),Gi!==0&&(Nt=te.makeSpan(["arraycolsep"],[]),Nt.style.width=ze(Gi),rt.push(Nt)));var ai=[];for(n=0;n0){for(var qd=te.makeLineSpan("hline",t,d),i_=te.makeLineSpan("hdashline",t,d),_m=[{type:"elem",elem:l,shift:0}];c.length>0;){var jh=c.pop(),n_=jh.pos-Xe;jh.isDashed?_m.push({type:"elem",elem:i_,shift:n_}):_m.push({type:"elem",elem:qd,shift:n_})}l=te.makeVList({positionType:"individualShift",children:_m},t)}if(ye.length===0)return te.makeSpan(["mord"],[l],t);var fr=te.makeVList({positionType:"individualShift",children:ye},t);return fr=te.makeSpan(["tag"],[fr],t),te.makeFragment([l,fr])},Tfe={c:"center ",l:"left ",r:"right "},Va=function(e,t){for(var n=[],r=new Ee.MathNode("mtd",[],["mtr-glue"]),o=new Ee.MathNode("mtd",[],["mml-eqn-num"]),s=0;s0){var m=e.cols,g="",b=!1,S=0,k=m.length;m[0].type==="separator"&&(h+="top ",S=1),m[m.length-1].type==="separator"&&(h+="bottom ",k-=1);for(var N=S;N0?"left ":"",h+=re[re.length-1].length>0?"right ":"";for(var ae=1;ae-1?"alignat":"align",o=e.envName==="split",s=pd(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:z8(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),a,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var d="",u=0;u0&&p&&(b=1),n[m]={type:"align",align:g,pregap:b,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Wa({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=y4(e[0]),n=t?[e[0]]:Wt(e[0],"ordgroup").body,r=n.map(function(s){var a=O8(s),l=a.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ie("Unknown column alignment: "+l,s)}),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return pd(i.parser,o,U8(i.envName))},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(i){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[i.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var r=i.parser;if(r.consumeSpaces(),r.fetch().text==="["){if(r.consume(),r.consumeSpaces(),t=r.fetch().text,"lcr".indexOf(t)===-1)throw new Ie("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var o=pd(i.parser,n,U8(i.envName)),s=Math.max(0,...o.body.map(a=>a.length));return o.cols=new Array(s).fill({type:"align",align:t}),e?{type:"leftright",mode:i.mode,body:[o],left:e[0],right:e[1],rightColor:void 0}:o},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=pd(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=y4(e[0]),n=t?[e[0]]:Wt(e[0],"ordgroup").body,r=n.map(function(s){var a=O8(s),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Ie("Unknown column alignment: "+l,s)});if(r.length>1)throw new Ie("{subarray} can contain only one column");var o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=pd(i.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new Ie("{subarray} can contain only one column");return o},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(i){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=pd(i.parser,e,U8(i.envName));return{type:"leftright",mode:i.mode,body:[t],left:i.envName.indexOf("r")>-1?".":"\\{",right:i.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Qj,htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){wt.contains(["gather","gather*"],i.envName)&&w4(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:z8(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return pd(i.parser,e,"display")},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Qj,htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){w4(i);var e={autoTag:z8(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return pd(i.parser,e,"display")},htmlBuilder:ja,mathmlBuilder:Va});Wa({type:"array",names:["CD"],props:{numArgs:0},handler(i){return w4(i),hfe(i.parser)},htmlBuilder:ja,mathmlBuilder:Va});R("\\nonumber","\\gdef\\@eqnsw{0}");R("\\notag","\\nonumber");Ye({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new Ie(i.funcName+" valid only within array environment")}});var ij=Yj;Ye({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];if(r.type!=="ordgroup")throw new Ie("Invalid environment name",r);for(var o="",s=0;s{var t=i.font,n=e.withFont(t);return ci(i.body,n)},Zj=(i,e)=>{var t=i.font,n=e.withFont(t);return Oi(i.body,n)},nj={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ye({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=m4(e[0]),o=n;return o in nj&&(o=nj[o]),{type:"font",mode:t.mode,font:o.slice(1),body:r}},htmlBuilder:Jj,mathmlBuilder:Zj});Ye({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,n=e[0],r=wt.isCharacterBox(n);return{type:"mclass",mode:t.mode,mclass:C4(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:r}}});Ye({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,breakOnTokenText:r}=i,{mode:o}=t,s=t.parseExpression(!0,r),a="math"+n.slice(1);return{type:"font",mode:o,font:a,body:{type:"ordgroup",mode:t.mode,body:s}}},htmlBuilder:Jj,mathmlBuilder:Zj});var eV=(i,e)=>{var t=e;return i==="display"?t=t.id>=_t.SCRIPT.id?t.text():_t.DISPLAY:i==="text"&&t.size===_t.DISPLAY.size?t=_t.TEXT:i==="script"?t=_t.SCRIPT:i==="scriptscript"&&(t=_t.SCRIPTSCRIPT),t},W8=(i,e)=>{var t=eV(i.size,e.style),n=t.fracNum(),r=t.fracDen(),o;o=e.havingStyle(n);var s=ci(i.numer,o,e);if(i.continued){var a=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?m=3*h:m=7*h,g=e.fontMetrics().denom1):(u>0?(p=e.fontMetrics().num2,m=h):(p=e.fontMetrics().num3,m=3*h),g=e.fontMetrics().denom2);var b;if(d){var k=e.fontMetrics().axisHeight;p-s.depth-(k+.5*u){var t=new Ee.MathNode("mfrac",[Oi(i.numer,e),Oi(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=cn(i.barSize,e);t.setAttribute("linethickness",ze(n))}var r=eV(i.size,e.style);if(r.size!==e.style.size){t=new Ee.MathNode("mstyle",[t]);var o=r.size===_t.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",o),t.setAttribute("scriptlevel","0")}if(i.leftDelim!=null||i.rightDelim!=null){var s=[];if(i.leftDelim!=null){var a=new Ee.MathNode("mo",[new Ee.TextNode(i.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),i.rightDelim!=null){var l=new Ee.MathNode("mo",[new Ee.TextNode(i.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return N8(s)}return t};Ye({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1],s,a=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,a="(",l=")";break;case"\\\\bracefrac":s=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:r,denom:o,hasBarLine:s,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:W8,mathmlBuilder:j8});Ye({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Ye({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:n}=i,r;switch(t){case"\\over":r="\\frac";break;case"\\choose":r="\\binom";break;case"\\atop":r="\\\\atopfrac";break;case"\\brace":r="\\\\bracefrac";break;case"\\brack":r="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:r,token:n}}});var rj=["display","text","script","scriptscript"],oj=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};Ye({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,n=e[4],r=e[5],o=m4(e[0]),s=o.type==="atom"&&o.family==="open"?oj(o.text):null,a=m4(e[1]),l=a.type==="atom"&&a.family==="close"?oj(a.text):null,c=Wt(e[2],"size"),d,u=null;c.isBlank?d=!0:(u=c.value,d=u.number>0);var h="auto",p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var m=Wt(p.body[0],"textord");h=rj[Number(m.text)]}}else p=Wt(p,"textord"),h=rj[Number(p.text)];return{type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:d,barSize:u,leftDelim:s,rightDelim:l,size:h}},htmlBuilder:W8,mathmlBuilder:j8});Ye({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:n,token:r}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Wt(e[0],"size").value,token:r}}});Ye({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],o=ohe(Wt(e[1],"infix").size),s=e[2],a=o.number>0;return{type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:a,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:W8,mathmlBuilder:j8});var tV=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?ci(i.sup,e.havingStyle(t.sup()),e):ci(i.sub,e.havingStyle(t.sub()),e),r=Wt(i.base,"horizBrace")):r=Wt(i,"horizBrace");var o=ci(r.base,e.havingBaseStyle(_t.DISPLAY)),s=Jl.svgSpan(r,e),a;if(r.isOver?(a=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),a.children[0].children[0].children[1].classes.push("svg-align")):(a=te.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),a.children[0].children[0].children[0].classes.push("svg-align")),n){var l=te.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e);r.isOver?a=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):a=te.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return te.makeSpan(["mord",r.isOver?"mover":"munder"],[a],e)},kfe=(i,e)=>{var t=Jl.mathMLnode(i.label);return new Ee.MathNode(i.isOver?"mover":"munder",[Oi(i.base,e),t])};Ye({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"horizBrace",mode:t.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:tV,mathmlBuilder:kfe});Ye({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=Wt(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:Tn(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=Yn(i.body,e,!1);return te.makeAnchor(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=fd(i.body,e);return t instanceof bo||(t=new bo("mrow",[t])),t.setAttribute("href",i.href),t}});Ye({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=Wt(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var r=[],o=0;o{var{parser:t,funcName:n,token:r}=i,o=Wt(e[0],"raw").string,s=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(n){case"\\htmlClass":l.class=o,a={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,a={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,a={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var c=o.split(","),d=0;d{var t=Yn(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=te.makeSpan(n,t,e);for(var o in i.attributes)o!=="class"&&i.attributes.hasOwnProperty(o)&&r.setAttribute(o,i.attributes[o]);return r},mathmlBuilder:(i,e)=>fd(i.body,e)});Ye({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:Tn(e[0]),mathml:Tn(e[1])}},htmlBuilder:(i,e)=>{var t=Yn(i.html,e,!1);return te.makeFragment(t)},mathmlBuilder:(i,e)=>fd(i.mathml,e)});var p8=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Ie("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!yj(n))throw new Ie("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ye({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:n}=i,r={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(t[0])for(var l=Wt(t[0],"raw").string,c=l.split(","),d=0;d{var t=cn(i.height,e),n=0;i.totalheight.number>0&&(n=cn(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=cn(i.width,e));var o={height:ze(t+n)};r>0&&(o.width=ze(r)),n>0&&(o.verticalAlign=ze(-n));var s=new y8(i.src,i.alt,o);return s.height=t,s.depth=n,s},mathmlBuilder:(i,e)=>{var t=new Ee.MathNode("mglyph",[]);t.setAttribute("alt",i.alt);var n=cn(i.height,e),r=0;if(i.totalheight.number>0&&(r=cn(i.totalheight,e)-n,t.setAttribute("valign",ze(-r))),t.setAttribute("height",ze(n+r)),i.width.number>0){var o=cn(i.width,e);t.setAttribute("width",ze(o))}return t.setAttribute("src",i.src),t}});Ye({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=Wt(e[0],"size");if(t.settings.strict){var o=n[1]==="m",s=r.value.unit==="mu";o?(s||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+r.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:r.value}},htmlBuilder(i,e){return te.makeGlue(i.dimension,e)},mathmlBuilder(i,e){var t=cn(i.dimension,e);return new Ee.SpaceNode(t)}});Ye({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:r}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=te.makeSpan([],[ci(i.body,e)]),t=te.makeSpan(["inner"],[t],e)):t=te.makeSpan(["inner"],[ci(i.body,e)]);var n=te.makeSpan(["fix"],[]),r=te.makeSpan([i.alignment],[t,n],e),o=te.makeSpan(["strut"]);return o.style.height=ze(r.height+r.depth),r.depth&&(o.style.verticalAlign=ze(-r.depth)),r.children.unshift(o),r=te.makeSpan(["thinbox"],[r],e),te.makeSpan(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Ee.MathNode("mpadded",[Oi(i.body,e)]);if(i.alignment!=="rlap"){var n=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});Ye({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:n}=i,r=n.mode;n.switchMode("math");var o=t==="\\("?"\\)":"$",s=n.parseExpression(!1,o);return n.expect(o),n.switchMode(r),{type:"styling",mode:n.mode,style:"text",body:s}}});Ye({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new Ie("Mismatched "+i.funcName)}});var sj=(i,e)=>{switch(e.style.size){case _t.DISPLAY.size:return i.display;case _t.TEXT.size:return i.text;case _t.SCRIPT.size:return i.script;case _t.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};Ye({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:Tn(e[0]),text:Tn(e[1]),script:Tn(e[2]),scriptscript:Tn(e[3])}},htmlBuilder:(i,e)=>{var t=sj(i,e),n=Yn(t,e,!1);return te.makeFragment(n)},mathmlBuilder:(i,e)=>{var t=sj(i,e);return fd(t,e)}});var iV=(i,e,t,n,r,o,s)=>{i=te.makeSpan([],[i]);var a=t&&wt.isCharacterBox(t),l,c;if(e){var d=ci(e,n.havingStyle(r.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var u=ci(t,n.havingStyle(r.sub()),n);l={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-u.height)}}var h;if(c&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+s;h=te.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ze(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ze(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var m=i.height-s;h=te.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ze(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i}]},n)}else if(c){var g=i.depth+s;h=te.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ze(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return i;var b=[h];if(l&&o!==0&&!a){var S=te.makeSpan(["mspace"],[],n);S.style.marginRight=ze(o),b.unshift(S)}return te.makeSpan(["mop","op-limits"],b,n)},nV=["\\smallint"],Kf=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Wt(i.base,"op"),r=!0):o=Wt(i,"op");var s=e.style,a=!1;s.size===_t.DISPLAY.size&&o.symbol&&!wt.contains(nV,o.name)&&(a=!0);var l;if(o.symbol){var c=a?"Size2-Regular":"Size1-Regular",d="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(d=o.name.slice(1),o.name=d==="oiint"?"\\iint":"\\iiint"),l=te.makeSymbol(o.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),d.length>0){var u=l.italic,h=te.staticSvg(d+"Size"+(a?"2":"1"),e);l=te.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:h,shift:a?.08:0}]},e),o.name="\\"+d,l.classes.unshift("mop"),l.italic=u}}else if(o.body){var p=Yn(o.body,e,!0);p.length===1&&p[0]instanceof yo?(l=p[0],l.classes[0]="mop"):l=te.makeSpan(["mop"],p,e)}else{for(var m=[],g=1;g{var t;if(i.symbol)t=new bo("mo",[_s(i.name,i.mode)]),wt.contains(nV,i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new bo("mo",Co(i.body,e));else{t=new bo("mi",[new ku(i.name.slice(1))]);var n=new bo("mo",[_s("\u2061","text")]);i.parentIsSupSub?t=new bo("mrow",[t,n]):t=Mj([t,n])}return t},Ife={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Ye({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=n;return r.length===1&&(r=Ife[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Kf,mathmlBuilder:t0});Ye({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Tn(n)}},htmlBuilder:Kf,mathmlBuilder:t0});var Afe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Ye({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Kf,mathmlBuilder:t0});Ye({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Kf,mathmlBuilder:t0});Ye({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i,n=t;return n.length===1&&(n=Afe[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Kf,mathmlBuilder:t0});var rV=(i,e)=>{var t,n,r=!1,o;i.type==="supsub"?(t=i.sup,n=i.sub,o=Wt(i.base,"operatorname"),r=!0):o=Wt(i,"operatorname");var s;if(o.body.length>0){for(var a=o.body.map(u=>{var h=u.text;return typeof h=="string"?{type:"textord",mode:u.mode,text:h}:u}),l=Yn(a,e.withFont("mathrm"),!0),c=0;c{for(var t=Co(i.body,e.withFont("mathrm")),n=!0,r=0;rd.toText()).join("");t=[new Ee.TextNode(a)]}var l=new Ee.MathNode("mi",t);l.setAttribute("mathvariant","normal");var c=new Ee.MathNode("mo",[_s("\u2061","text")]);return i.parentIsSupSub?new Ee.MathNode("mrow",[l,c]):Ee.newDocumentFragment([l,c])};Ye({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"operatorname",mode:t.mode,body:Tn(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:rV,mathmlBuilder:Lfe});R("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Lu({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?te.makeFragment(Yn(i.body,e,!1)):te.makeSpan(["mord"],Yn(i.body,e,!0),e)},mathmlBuilder(i,e){return fd(i.body,e,!0)}});Ye({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,n=e[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(i,e){var t=ci(i.body,e.havingCrampedStyle()),n=te.makeLineSpan("overline-line",e),r=e.fontMetrics().defaultRuleThickness,o=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]},e);return te.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[new Ee.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ee.MathNode("mover",[Oi(i.body,e),t]);return n.setAttribute("accent","true"),n}});Ye({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"phantom",mode:t.mode,body:Tn(n)}},htmlBuilder:(i,e)=>{var t=Yn(i.body,e.withPhantom(),!1);return te.makeFragment(t)},mathmlBuilder:(i,e)=>{var t=Co(i.body,e);return new Ee.MathNode("mphantom",t)}});Ye({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"hphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=te.makeSpan([],[ci(i.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var n=0;n{var t=Co(Tn(i.body),e),n=new Ee.MathNode("mphantom",t),r=new Ee.MathNode("mpadded",[n]);return r.setAttribute("height","0px"),r.setAttribute("depth","0px"),r}});Ye({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=te.makeSpan(["inner"],[ci(i.body,e.withPhantom())]),n=te.makeSpan(["fix"],[]);return te.makeSpan(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=Co(Tn(i.body),e),n=new Ee.MathNode("mphantom",t),r=new Ee.MathNode("mpadded",[n]);return r.setAttribute("width","0px"),r}});Ye({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=Wt(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=ci(i.body,e),n=cn(i.dy,e);return te.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mpadded",[Oi(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});Ye({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});Ye({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(i,e,t){var{parser:n}=i,r=t[0],o=Wt(e[0],"size"),s=Wt(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&Wt(r,"size").value,width:o.value,height:s.value}},htmlBuilder(i,e){var t=te.makeSpan(["mord","rule"],[],e),n=cn(i.width,e),r=cn(i.height,e),o=i.shift?cn(i.shift,e):0;return t.style.borderRightWidth=ze(n),t.style.borderTopWidth=ze(r),t.style.bottom=ze(o),t.width=n,t.height=r+o,t.depth=-o,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=cn(i.width,e),n=cn(i.height,e),r=i.shift?cn(i.shift,e):0,o=e.color&&e.getColor()||"black",s=new Ee.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",ze(t)),s.setAttribute("height",ze(n));var a=new Ee.MathNode("mpadded",[s]);return r>=0?a.setAttribute("height",ze(r)):(a.setAttribute("height",ze(r)),a.setAttribute("depth",ze(-r))),a.setAttribute("voffset",ze(r)),a}});function oV(i,e,t){for(var n=Yn(i,e,!1),r=e.sizeMultiplier/t.sizeMultiplier,o=0;o{var t=e.havingSize(i.size);return oV(i.body,t,e)};Ye({type:"sizing",names:aj,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!1,t);return{type:"sizing",mode:r.mode,size:aj.indexOf(n)+1,body:o}},htmlBuilder:Mfe,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=Co(i.body,t),r=new Ee.MathNode("mstyle",n);return r.setAttribute("mathsize",ze(t.sizeMultiplier)),r}});Ye({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:n}=i,r=!1,o=!1,s=t[0]&&Wt(t[0],"ordgroup");if(s)for(var a="",l=0;l{var t=te.makeSpan([],[ci(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0,t.children))for(var n=0;n{var t=new Ee.MathNode("mpadded",[Oi(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});Ye({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n}=i,r=t[0],o=e[0];return{type:"sqrt",mode:n.mode,body:o,index:r}},htmlBuilder(i,e){var t=ci(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=te.wrapFragment(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,o=r;e.style.id<_t.TEXT.id&&(o=e.fontMetrics().xHeight);var s=r+o/4,a=t.height+t.depth+s+r,{span:l,ruleWidth:c,advanceWidth:d}=Xl.sqrtImage(a,e),u=l.height-c;u>t.height+t.depth+s&&(s=(s+u-t.height-t.depth)/2);var h=l.height-t.height-s-c;t.style.paddingLeft=ze(d);var p=te.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+h)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(i.index){var m=e.havingStyle(_t.SCRIPTSCRIPT),g=ci(i.index,m,e),b=.6*(p.height-p.depth),S=te.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:g}]},e),k=te.makeSpan(["root"],[S]);return te.makeSpan(["mord","sqrt"],[k,p],e)}else return te.makeSpan(["mord","sqrt"],[p],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new Ee.MathNode("mroot",[Oi(t,e),Oi(n,e)]):new Ee.MathNode("msqrt",[Oi(t,e)])}});var lj={display:_t.DISPLAY,text:_t.TEXT,script:_t.SCRIPT,scriptscript:_t.SCRIPTSCRIPT};Ye({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:n,parser:r}=i,o=r.parseExpression(!0,t),s=n.slice(1,n.length-5);return{type:"styling",mode:r.mode,style:s,body:o}},htmlBuilder(i,e){var t=lj[i.style],n=e.havingStyle(t).withFont("");return oV(i.body,n,e)},mathmlBuilder(i,e){var t=lj[i.style],n=e.havingStyle(t),r=Co(i.body,n),o=new Ee.MathNode("mstyle",r),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=s[i.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});var Dfe=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===_t.DISPLAY.size||n.alwaysHandleSupSub);return r?Kf:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(t.style.size===_t.DISPLAY.size||n.limits);return o?rV:null}else{if(n.type==="accent")return wt.isCharacterBox(n.base)?P8:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?tV:null}else return null}else return null};Lu({type:"supsub",htmlBuilder(i,e){var t=Dfe(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:o}=i,s=ci(n,e),a,l,c=e.fontMetrics(),d=0,u=0,h=n&&wt.isCharacterBox(n);if(r){var p=e.havingStyle(e.style.sup());a=ci(r,p,e),h||(d=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(o){var m=e.havingStyle(e.style.sub());l=ci(o,m,e),h||(u=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===_t.DISPLAY?g=c.sup1:e.style.cramped?g=c.sup3:g=c.sup2;var b=e.sizeMultiplier,S=ze(.5/c.ptPerEm/b),k=null;if(l){var N=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");(s instanceof yo||N)&&(k=ze(-s.italic))}var A;if(a&&l){d=Math.max(d,g,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var H=c.defaultRuleThickness,K=4*H;if(d-a.depth-(l.height-u)0&&(d+=W,u-=W)}var re=[{type:"elem",elem:l,shift:u,marginRight:S,marginLeft:k},{type:"elem",elem:a,shift:-d,marginRight:S}];A=te.makeVList({positionType:"individualShift",children:re},e)}else if(l){u=Math.max(u,c.sub1,l.height-.8*c.xHeight);var ae=[{type:"elem",elem:l,marginLeft:k,marginRight:S}];A=te.makeVList({positionType:"shift",positionData:u,children:ae},e)}else if(a)d=Math.max(d,g,a.depth+.25*c.xHeight),A=te.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:S}]},e);else throw new Error("supsub must have either sup or sub.");var Ne=S8(s,"right")||"mord";return te.makeSpan([Ne],[s,te.makeSpan(["msupsub"],[A])],e)},mathmlBuilder(i,e){var t=!1,n,r;i.base&&i.base.type==="horizBrace"&&(r=!!i.sup,r===i.base.isOver&&(t=!0,n=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var o=[Oi(i.base,e)];i.sub&&o.push(Oi(i.sub,e)),i.sup&&o.push(Oi(i.sup,e));var s;if(t)s=n?"mover":"munder";else if(i.sub)if(i.sup){var c=i.base;c&&c.type==="op"&&c.limits&&e.style===_t.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===_t.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===_t.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===_t.DISPLAY)?s="munder":s="msub"}else{var a=i.base;a&&a.type==="op"&&a.limits&&(e.style===_t.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===_t.DISPLAY)?s="mover":s="msup"}return new Ee.MathNode(s,o)}});Lu({type:"atom",htmlBuilder(i,e){return te.mathsym(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[_s(i.text,i.mode)]);if(i.family==="bin"){var n=R8(i,e);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var sV={mi:"italic",mn:"normal",mtext:"normal"};Lu({type:"mathord",htmlBuilder(i,e){return te.makeOrd(i,e,"mathord")},mathmlBuilder(i,e){var t=new Ee.MathNode("mi",[_s(i.text,i.mode,e)]),n=R8(i,e)||"italic";return n!==sV[t.type]&&t.setAttribute("mathvariant",n),t}});Lu({type:"textord",htmlBuilder(i,e){return te.makeOrd(i,e,"textord")},mathmlBuilder(i,e){var t=_s(i.text,i.mode,e),n=R8(i,e)||"normal",r;return i.mode==="text"?r=new Ee.MathNode("mtext",[t]):/[0-9]/.test(i.text)?r=new Ee.MathNode("mn",[t]):i.text==="\\prime"?r=new Ee.MathNode("mo",[t]):r=new Ee.MathNode("mi",[t]),n!==sV[r.type]&&r.setAttribute("mathvariant",n),r}});var m8={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},g8={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Lu({type:"spacing",htmlBuilder(i,e){if(g8.hasOwnProperty(i.text)){var t=g8[i.text].className||"";if(i.mode==="text"){var n=te.makeOrd(i,e,"textord");return n.classes.push(t),n}else return te.makeSpan(["mspace",t],[te.mathsym(i.text,i.mode,e)],e)}else{if(m8.hasOwnProperty(i.text))return te.makeSpan(["mspace",m8[i.text]],[],e);throw new Ie('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(g8.hasOwnProperty(i.text))t=new Ee.MathNode("mtext",[new Ee.TextNode("\xA0")]);else{if(m8.hasOwnProperty(i.text))return new Ee.MathNode("mspace");throw new Ie('Unknown type of space "'+i.text+'"')}return t}});var cj=()=>{var i=new Ee.MathNode("mtd",[]);return i.setAttribute("width","50%"),i};Lu({type:"tag",mathmlBuilder(i,e){var t=new Ee.MathNode("mtable",[new Ee.MathNode("mtr",[cj(),new Ee.MathNode("mtd",[fd(i.body,e)]),cj(),new Ee.MathNode("mtd",[fd(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var dj={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},uj={"\\textbf":"textbf","\\textmd":"textmd"},Nfe={"\\textit":"textit","\\textup":"textup"},hj=(i,e)=>{var t=i.font;return t?dj[t]?e.withTextFontFamily(dj[t]):uj[t]?e.withTextFontWeight(uj[t]):e.withTextFontShape(Nfe[t]):e};Ye({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"text",mode:t.mode,body:Tn(r),font:n}},htmlBuilder(i,e){var t=hj(i,e),n=Yn(i.body,t,!0);return te.makeSpan(["mord","text"],n,t)},mathmlBuilder(i,e){var t=hj(i,e);return fd(i.body,t)}});Ye({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=ci(i.body,e),n=te.makeLineSpan("underline-line",e),r=e.fontMetrics().defaultRuleThickness,o=te.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]},e);return te.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(i,e){var t=new Ee.MathNode("mo",[new Ee.TextNode("\u203E")]);t.setAttribute("stretchy","true");var n=new Ee.MathNode("munder",[Oi(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});Ye({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=ci(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return te.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){return new Ee.MathNode("mpadded",[Oi(i.body,e)],["vcenter"])}});Ye({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new Ie("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=fj(i),n=[],r=e.havingStyle(e.style.text()),o=0;oi.body.replace(/ /g,i.star?"\u2423":"\xA0"),ud=Aj,aV=`[ \r + ]`,Rfe="\\\\[a-zA-Z@]+",Ofe="\\\\[^\uD800-\uDFFF]",Pfe="("+Rfe+")"+aV+"*",Ffe=`\\\\( |[ \r ]+ -?)[ \r ]*`,D8="[\u0300-\u036F]",Hfe=new RegExp(D8+"+$"),Bfe="("+kV+"+)|"+(Ffe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(D8+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(D8+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Pfe)+("|"+Ofe+")"),k5=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Bfe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Ua("EOF",new Bo(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new Ie("Unexpected character: '"+e[t]+"'",new Ua(e[t],new Bo(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var o=e.indexOf(` -`,this.tokenRegex.lastIndex);return o===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Ua(r,new Bo(this,t,this.tokenRegex.lastIndex))}},N8=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ie("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},zfe=gV;R("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});R("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});R("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});R("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});R("\\@ifnextchar",function(i){var e=i.consumeArgs(3);i.consumeSpaces();var t=i.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});R("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");R("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Rj={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};R("\\char",function(i){var e=i.popToken(),t,n="";if(e.text==="'")t=8,e=i.popToken();else if(e.text==='"')t=16,e=i.popToken();else if(e.text==="`")if(e=i.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Ie("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=Rj[e.text],n==null||n>=t)throw new Ie("Invalid base-"+t+" digit "+e.text);for(var r;(r=Rj[i.future().text])!=null&&r{var n=i.consumeArg().tokens;if(n.length!==1)throw new Ie("\\newcommand's first argument must be a macro name");var r=n[0].text,o=i.isDefined(r);if(o&&!e)throw new Ie("\\newcommand{"+r+"} attempting to redefine "+(r+"; use \\renewcommand"));if(!o&&!t)throw new Ie("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");var s=0;if(n=i.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var a="",l=i.expandNextToken();l.text!=="]"&&l.text!=="EOF";)a+=l.text,l=i.expandNextToken();if(!a.match(/^\s*[0-9]+\s*$/))throw new Ie("Invalid number of arguments: "+a);s=parseInt(a),n=i.consumeArg().tokens}return i.macros.set(r,{tokens:n,numArgs:s}),""};R("\\newcommand",i=>Y8(i,!1,!0));R("\\renewcommand",i=>Y8(i,!0,!1));R("\\providecommand",i=>Y8(i,!0,!0));R("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});R("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});R("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),hd[t],ji.math[t],ji.text[t]),""});R("\\bgroup","{");R("\\egroup","}");R("~","\\nobreakspace");R("\\lq","`");R("\\rq","'");R("\\aa","\\r a");R("\\AA","\\r A");R("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");R("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");R("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");R("\u212C","\\mathscr{B}");R("\u2130","\\mathscr{E}");R("\u2131","\\mathscr{F}");R("\u210B","\\mathscr{H}");R("\u2110","\\mathscr{I}");R("\u2112","\\mathscr{L}");R("\u2133","\\mathscr{M}");R("\u211B","\\mathscr{R}");R("\u212D","\\mathfrak{C}");R("\u210C","\\mathfrak{H}");R("\u2128","\\mathfrak{Z}");R("\\Bbbk","\\Bbb{k}");R("\xB7","\\cdotp");R("\\llap","\\mathllap{\\textrm{#1}}");R("\\rlap","\\mathrlap{\\textrm{#1}}");R("\\clap","\\mathclap{\\textrm{#1}}");R("\\mathstrut","\\vphantom{(}");R("\\underbar","\\underline{\\text{#1}}");R("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');R("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");R("\\ne","\\neq");R("\u2260","\\neq");R("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");R("\u2209","\\notin");R("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");R("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");R("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");R("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");R("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");R("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");R("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");R("\u27C2","\\perp");R("\u203C","\\mathclose{!\\mkern-0.8mu!}");R("\u220C","\\notni");R("\u231C","\\ulcorner");R("\u231D","\\urcorner");R("\u231E","\\llcorner");R("\u231F","\\lrcorner");R("\xA9","\\copyright");R("\xAE","\\textregistered");R("\uFE0F","\\textregistered");R("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');R("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');R("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');R("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');R("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");R("\u22EE","\\vdots");R("\\varGamma","\\mathit{\\Gamma}");R("\\varDelta","\\mathit{\\Delta}");R("\\varTheta","\\mathit{\\Theta}");R("\\varLambda","\\mathit{\\Lambda}");R("\\varXi","\\mathit{\\Xi}");R("\\varPi","\\mathit{\\Pi}");R("\\varSigma","\\mathit{\\Sigma}");R("\\varUpsilon","\\mathit{\\Upsilon}");R("\\varPhi","\\mathit{\\Phi}");R("\\varPsi","\\mathit{\\Psi}");R("\\varOmega","\\mathit{\\Omega}");R("\\substack","\\begin{subarray}{c}#1\\end{subarray}");R("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");R("\\boxed","\\fbox{$\\displaystyle{#1}$}");R("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");R("\\implies","\\DOTSB\\;\\Longrightarrow\\;");R("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Oj={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};R("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in Oj?e=Oj[t]:(t.slice(0,4)==="\\not"||t in ji.math&&wt.contains(["bin","rel"],ji.math[t].group))&&(e="\\dotsb"),e});var X8={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};R("\\dotso",function(i){var e=i.future().text;return e in X8?"\\ldots\\,":"\\ldots"});R("\\dotsc",function(i){var e=i.future().text;return e in X8&&e!==","?"\\ldots\\,":"\\ldots"});R("\\cdots",function(i){var e=i.future().text;return e in X8?"\\@cdots\\,":"\\@cdots"});R("\\dotsb","\\cdots");R("\\dotsm","\\cdots");R("\\dotsi","\\!\\cdots");R("\\dotsx","\\ldots\\,");R("\\DOTSI","\\relax");R("\\DOTSB","\\relax");R("\\DOTSX","\\relax");R("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");R("\\,","\\tmspace+{3mu}{.1667em}");R("\\thinspace","\\,");R("\\>","\\mskip{4mu}");R("\\:","\\tmspace+{4mu}{.2222em}");R("\\medspace","\\:");R("\\;","\\tmspace+{5mu}{.2777em}");R("\\thickspace","\\;");R("\\!","\\tmspace-{3mu}{.1667em}");R("\\negthinspace","\\!");R("\\negmedspace","\\tmspace-{4mu}{.2222em}");R("\\negthickspace","\\tmspace-{5mu}{.277em}");R("\\enspace","\\kern.5em ");R("\\enskip","\\hskip.5em\\relax");R("\\quad","\\hskip1em\\relax");R("\\qquad","\\hskip2em\\relax");R("\\tag","\\@ifstar\\tag@literal\\tag@paren");R("\\tag@paren","\\tag@literal{({#1})}");R("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new Ie("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});R("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");R("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");R("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");R("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");R("\\newline","\\\\\\relax");R("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var IV=ze(za["Main-Regular"]["T".charCodeAt(0)][1]-.7*za["Main-Regular"]["A".charCodeAt(0)][1]);R("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+IV+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");R("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+IV+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");R("\\hspace","\\@ifstar\\@hspacer\\@hspace");R("\\@hspace","\\hskip #1\\relax");R("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");R("\\ordinarycolon",":");R("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");R("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');R("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');R("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');R("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');R("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');R("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');R("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');R("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');R("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');R("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');R("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');R("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');R("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');R("\u2237","\\dblcolon");R("\u2239","\\eqcolon");R("\u2254","\\coloneqq");R("\u2255","\\eqqcolon");R("\u2A74","\\Coloneqq");R("\\ratio","\\vcentcolon");R("\\coloncolon","\\dblcolon");R("\\colonequals","\\coloneqq");R("\\coloncolonequals","\\Coloneqq");R("\\equalscolon","\\eqqcolon");R("\\equalscoloncolon","\\Eqqcolon");R("\\colonminus","\\coloneq");R("\\coloncolonminus","\\Coloneq");R("\\minuscolon","\\eqcolon");R("\\minuscoloncolon","\\Eqcolon");R("\\coloncolonapprox","\\Colonapprox");R("\\coloncolonsim","\\Colonsim");R("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");R("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");R("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");R("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");R("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");R("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");R("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");R("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");R("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");R("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");R("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");R("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");R("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");R("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");R("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");R("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");R("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");R("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");R("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");R("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");R("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");R("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");R("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");R("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");R("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");R("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");R("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");R("\\imath","\\html@mathml{\\@imath}{\u0131}");R("\\jmath","\\html@mathml{\\@jmath}{\u0237}");R("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");R("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");R("\u27E6","\\llbracket");R("\u27E7","\\rrbracket");R("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");R("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");R("\u2983","\\lBrace");R("\u2984","\\rBrace");R("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");R("\u29B5","\\minuso");R("\\darr","\\downarrow");R("\\dArr","\\Downarrow");R("\\Darr","\\Downarrow");R("\\lang","\\langle");R("\\rang","\\rangle");R("\\uarr","\\uparrow");R("\\uArr","\\Uparrow");R("\\Uarr","\\Uparrow");R("\\N","\\mathbb{N}");R("\\R","\\mathbb{R}");R("\\Z","\\mathbb{Z}");R("\\alef","\\aleph");R("\\alefsym","\\aleph");R("\\Alpha","\\mathrm{A}");R("\\Beta","\\mathrm{B}");R("\\bull","\\bullet");R("\\Chi","\\mathrm{X}");R("\\clubs","\\clubsuit");R("\\cnums","\\mathbb{C}");R("\\Complex","\\mathbb{C}");R("\\Dagger","\\ddagger");R("\\diamonds","\\diamondsuit");R("\\empty","\\emptyset");R("\\Epsilon","\\mathrm{E}");R("\\Eta","\\mathrm{H}");R("\\exist","\\exists");R("\\harr","\\leftrightarrow");R("\\hArr","\\Leftrightarrow");R("\\Harr","\\Leftrightarrow");R("\\hearts","\\heartsuit");R("\\image","\\Im");R("\\infin","\\infty");R("\\Iota","\\mathrm{I}");R("\\isin","\\in");R("\\Kappa","\\mathrm{K}");R("\\larr","\\leftarrow");R("\\lArr","\\Leftarrow");R("\\Larr","\\Leftarrow");R("\\lrarr","\\leftrightarrow");R("\\lrArr","\\Leftrightarrow");R("\\Lrarr","\\Leftrightarrow");R("\\Mu","\\mathrm{M}");R("\\natnums","\\mathbb{N}");R("\\Nu","\\mathrm{N}");R("\\Omicron","\\mathrm{O}");R("\\plusmn","\\pm");R("\\rarr","\\rightarrow");R("\\rArr","\\Rightarrow");R("\\Rarr","\\Rightarrow");R("\\real","\\Re");R("\\reals","\\mathbb{R}");R("\\Reals","\\mathbb{R}");R("\\Rho","\\mathrm{P}");R("\\sdot","\\cdot");R("\\sect","\\S");R("\\spades","\\spadesuit");R("\\sub","\\subset");R("\\sube","\\subseteq");R("\\supe","\\supseteq");R("\\Tau","\\mathrm{T}");R("\\thetasym","\\vartheta");R("\\weierp","\\wp");R("\\Zeta","\\mathrm{Z}");R("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");R("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");R("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");R("\\bra","\\mathinner{\\langle{#1}|}");R("\\ket","\\mathinner{|{#1}\\rangle}");R("\\braket","\\mathinner{\\langle{#1}\\rangle}");R("\\Bra","\\left\\langle#1\\right|");R("\\Ket","\\left|#1\\right\\rangle");var AV=i=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.consumeArg().tokens,s=e.macros.get("|"),a=e.macros.get("\\|");e.macros.beginGroup();var l=u=>h=>{i&&(h.macros.set("|",s),r.length&&h.macros.set("\\|",a));var p=u;if(!u&&r.length){var m=h.future();m.text==="|"&&(h.popToken(),p=!0)}return{tokens:p?r:n,numArgs:0}};e.macros.set("|",l(!1)),r.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,d=e.expandTokens([...o,...c,...t]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};R("\\bra@ket",AV(!1));R("\\bra@set",AV(!0));R("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");R("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");R("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");R("\\angln","{\\angl n}");R("\\blue","\\textcolor{##6495ed}{#1}");R("\\orange","\\textcolor{##ffa500}{#1}");R("\\pink","\\textcolor{##ff00af}{#1}");R("\\red","\\textcolor{##df0030}{#1}");R("\\green","\\textcolor{##28ae7b}{#1}");R("\\gray","\\textcolor{gray}{#1}");R("\\purple","\\textcolor{##9d38bd}{#1}");R("\\blueA","\\textcolor{##ccfaff}{#1}");R("\\blueB","\\textcolor{##80f6ff}{#1}");R("\\blueC","\\textcolor{##63d9ea}{#1}");R("\\blueD","\\textcolor{##11accd}{#1}");R("\\blueE","\\textcolor{##0c7f99}{#1}");R("\\tealA","\\textcolor{##94fff5}{#1}");R("\\tealB","\\textcolor{##26edd5}{#1}");R("\\tealC","\\textcolor{##01d1c1}{#1}");R("\\tealD","\\textcolor{##01a995}{#1}");R("\\tealE","\\textcolor{##208170}{#1}");R("\\greenA","\\textcolor{##b6ffb0}{#1}");R("\\greenB","\\textcolor{##8af281}{#1}");R("\\greenC","\\textcolor{##74cf70}{#1}");R("\\greenD","\\textcolor{##1fab54}{#1}");R("\\greenE","\\textcolor{##0d923f}{#1}");R("\\goldA","\\textcolor{##ffd0a9}{#1}");R("\\goldB","\\textcolor{##ffbb71}{#1}");R("\\goldC","\\textcolor{##ff9c39}{#1}");R("\\goldD","\\textcolor{##e07d10}{#1}");R("\\goldE","\\textcolor{##a75a05}{#1}");R("\\redA","\\textcolor{##fca9a9}{#1}");R("\\redB","\\textcolor{##ff8482}{#1}");R("\\redC","\\textcolor{##f9685d}{#1}");R("\\redD","\\textcolor{##e84d39}{#1}");R("\\redE","\\textcolor{##bc2612}{#1}");R("\\maroonA","\\textcolor{##ffbde0}{#1}");R("\\maroonB","\\textcolor{##ff92c6}{#1}");R("\\maroonC","\\textcolor{##ed5fa6}{#1}");R("\\maroonD","\\textcolor{##ca337c}{#1}");R("\\maroonE","\\textcolor{##9e034e}{#1}");R("\\purpleA","\\textcolor{##ddd7ff}{#1}");R("\\purpleB","\\textcolor{##c6b9fc}{#1}");R("\\purpleC","\\textcolor{##aa87ff}{#1}");R("\\purpleD","\\textcolor{##7854ab}{#1}");R("\\purpleE","\\textcolor{##543b78}{#1}");R("\\mintA","\\textcolor{##f5f9e8}{#1}");R("\\mintB","\\textcolor{##edf2df}{#1}");R("\\mintC","\\textcolor{##e0e5cc}{#1}");R("\\grayA","\\textcolor{##f6f7f7}{#1}");R("\\grayB","\\textcolor{##f0f1f2}{#1}");R("\\grayC","\\textcolor{##e3e5e6}{#1}");R("\\grayD","\\textcolor{##d6d8da}{#1}");R("\\grayE","\\textcolor{##babec2}{#1}");R("\\grayF","\\textcolor{##888d93}{#1}");R("\\grayG","\\textcolor{##626569}{#1}");R("\\grayH","\\textcolor{##3b3e40}{#1}");R("\\grayI","\\textcolor{##21242c}{#1}");R("\\kaBlue","\\textcolor{##314453}{#1}");R("\\kaGreen","\\textcolor{##71B307}{#1}");var LV={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},R8=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new N8(zfe,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new k5(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg(["]"])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new Ua("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),o,s=0,a=0;do{if(o=this.popToken(),t.push(o),o.text==="{")++s;else if(o.text==="}"){if(--s,s===-1)throw new Ie("Extra }",o)}else if(o.text==="EOF")throw new Ie("Unexpected end of input in a macro argument, expected '"+(e&&n?e[a]:"}")+"'",o);if(e&&n)if((s===0||s===1&&e[a]==="{")&&o.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(s!==0||n);return r.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:o}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Ie("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;rthis.settings.maxExpand)throw new Ie("Too many expansions: infinite loop or need to increase maxExpand setting");var o=r.tokens,s=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){o=o.slice();for(var a=o.length-1;a>=0;--a){var l=o[a];if(l.text==="#"){if(a===0)throw new Ie("Incomplete placeholder at end of macro body",l);if(l=o[--a],l.text==="#")o.splice(a+1,1);else if(/^[1-9]$/.test(l.text))o.splice(a,2,...s[+l.text-1]);else throw new Ie("Not a valid argument number",l)}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Ua(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(n=>n.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t=="function"?t(this):t;if(typeof r=="string"){var o=0;if(r.indexOf("#")!==-1)for(var s=r.replace(/##/g,"");s.indexOf("#"+(o+1))!==-1;)++o;for(var a=new k5(r,this.settings),l=[],c=a.lex();c.text!=="EOF";)l.push(c),c=a.lex();l.reverse();var d={tokens:l,numArgs:o};return d}return r}isDefined(e){return this.macros.has(e)||hd.hasOwnProperty(e)||ji.math.hasOwnProperty(e)||ji.text.hasOwnProperty(e)||LV.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:hd.hasOwnProperty(e)&&!hd[e].primitive}},Pj=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,_5=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),S8={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},Fj={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},I5=class i{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new R8(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new Ie("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Ua("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var r=this.fetch();if(i.endOfExpression.indexOf(r.text)!==-1||t&&r.text===t||e&&hd[r.text]&&hd[r.text].infix)break;var o=this.parseAtom(t);if(o){if(o.type==="internal")continue}else break;n.push(o)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t=-1,n,r=0;r=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a=ji[this.mode][t].group,l=Bo.range(e),c;if(Mhe.hasOwnProperty(a)){var d=a;c={type:"atom",mode:this.mode,family:d,loc:l,text:t}}else c={type:a,mode:this.mode,loc:l,text:t};s=c}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Bj(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Bo.range(e),text:t};else return null;if(this.consume(),o)for(var u=0;ul&&(l=c):c&&(l!==void 0&&l>-1&&a.push(` -`.repeat(l)||" "),l=-1,a.push(c))}return a.join("")}function BV(i,e,t){return i.type==="element"?$fe(i,e,t):i.type==="text"?t.whitespace==="normal"?zV(i,t):Yfe(i):[]}function $fe(i,e,t){let n=UV(i,t),r=i.children||[],o=-1,s=[];if(Gfe(i))return s;let a,l;for(t6(i)||FV(i)&&e6(e,i,FV)?l=` -`:qfe(i)?(a=2,l=2):HV(i)&&(a=1,l=1);++o{Hr(n,"element",o=>{let s=o.properties&&Array.isArray(o.properties.className)?o.properties.className:[],a=s.includes("math-inline"),l=s.includes("math-display");if(!a&&!l)return;let c=n0(o,{whitespace:"pre"}),d;try{d=$f.renderToString(c,qV({},e,{displayMode:l,throwOnError:!0}))}catch(h){let p=h,m=t?"fail":"message",g=[spe,p.name.toLowerCase()].join(":");if(r[m](p.message,o.position,g),p.name!=="ParseError"){o.children=[{type:"element",tagName:"span",properties:{className:["katex-error"],title:String(p),style:"color:"+(e.errorColor||"#cc0000")},children:[{type:"text",value:c}]}];return}d=$f.renderToString(c,qV({},e,{displayMode:l,throwOnError:!1,strict:"ignore"}))}let u=KV(d,{fragment:!0});o.children=u.children})}}var $V=Fi(Gx(),1);var GV={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before ``",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `` in ``",description:"Unexpected text character `%c`. Only use text in `