diff --git a/static/assets/app.js b/static/assets/app.js index dd4977357..682a1eb29 100644 --- a/static/assets/app.js +++ b/static/assets/app.js @@ -1,15 +1,15 @@ -import{b as Cne}from"./chunk-JY7ZYBHV.js";import{a as Xh}from"./chunk-BZUL2CAN.js";import{$ as mi,$a as Ie,$b as Me,$c as TP,$d as VP,$e as iO,$f as LO,$g as Lre,$h as cF,$i as CF,$j as UF,$k as ey,$l as As,A as li,Aa as Qi,Ab as Vi,Ac as Ir,Ad as G3,Ae as Fi,Af as hO,Ag as OO,Ah as pa,Ai as vl,Aj as Ni,Ak as XF,Al as bz,B as Je,Ba as qn,Bb as rf,Bc as xP,Bd as sf,Be as Si,Bf as f_,Bg as Km,Bh as eF,Bi as ck,Bj as U_,Bk as Xre,Bl as yu,C as A3,Ca as Lm,Cb as O3,Cc as sre,Cd as Y3,Ce as Zt,Cf as pl,Cg as FO,Ch as vu,Ci as dk,Cj as xl,Ck as xk,Cl as ya,D as U9,Da as oP,Db as fP,Dc as W3,Dd as Pt,De as Uc,Df as p_,Dg as zO,Dh as Jm,Di as bF,Dj as xf,Dk as Qre,Dl as lg,E as Jt,Ea as sP,Eb as F3,Ec as are,Ed as Br,Ee as Lo,Ef as fO,Eg as kre,Eh as Dre,Ei as vF,Ej as Vre,Ek as Z_,El as ane,F as j9,Fa as aP,Fb as z3,Fc as CP,Fd as e_,Fe as df,Ff as pO,Fg as v_,Fh as _f,Fi as _F,Fj as Cl,Fk as QF,Fl as vz,G as W9,Ga as R3,Gb as Pc,Gc as lre,Gd as fre,Ge as fl,Gf as mO,Gg as Ere,Gh as Mi,Gi as N_,Gj as j_,Gk as ZF,Gl as lne,H as V9,Ha as gi,Hb as pP,Hc as cl,Hd as Bc,He as l_,Hf as gO,Hg as $m,Hh as Ao,Hi as Lr,Hj as gk,Hk as Zre,Hl as cne,I as Ov,Ia as au,Ib as mP,Ic as SP,Id as pre,Ie as oa,If as Bm,Ig as ha,Ih as tF,Ii as uk,Ij as RF,Ik as Ck,Il as _z,J as Fv,Ja as ys,Jb as gP,Jc as Gv,Jd as X3,Je as di,Jf as bO,Jg as BO,Jh as ma,Ji as ig,Jj as W_,Jk as Sk,Jl as yz,K as D3,Ka as Te,Kb as bP,Kc as Yv,Kd as fu,Ke as JP,Kf as Hm,Kg as Es,Kh as gl,Ki as R_,Kj as bk,Kk as kk,Kl as wz,L as Em,La as lu,Lb as Vv,Lc as Xv,Ld as t_,Le as c_,Lf as da,Lg as Gm,Lh as Vc,Li as ga,Lj as PF,Lk as Jre,Ll as xz,M as q9,Ma as Le,Mb as vP,Mc as cre,Md as FP,Me as d_,Mf as ml,Mg as HO,Mh as qt,Mi as P_,Mj as qre,Mk as JF,Ml as dne,N as zt,Na as lP,Nb as qv,Nc as uu,Nd as i_,Ne as Dn,Nf as vO,Ng as UO,Nh as Ur,Ni as Gn,Nj as OF,Nk as ez,Nl as une,O as Ac,Oa as dn,Ob as B3,Oc as V3,Od as mre,Oe as eO,Of as gu,Og as jO,Oh as iF,Oi as O_,Oj as vk,Ok as tz,Ol as hne,P as K9,Pa as zr,Pb as Di,Pc as zc,Pd as F,Pe as Ut,Pf as _O,Pg as gf,Ph as k_,Pi as _u,Pj as FF,Pk as ene,Pl as fne,Q as Fr,Qa as cP,Qb as fe,Qc as dre,Qd as ei,Qe as tO,Qf as J3,Qg as WO,Qh as rF,Qi as yF,Qj as zF,Qk as J_,Ql as pne,R as Dc,Ra as Wv,Rb as ht,Rc as nf,Rd as af,Re as uf,Rf as yO,Rg as nk,Rh as nF,Ri as rn,Rj as Kre,Rk as iz,Rl as mne,S as kn,Sa as Bt,Sb as it,Sc as Nm,Sd as r_,Se as Z3,Sf as wO,Sg as bf,Sh as Mre,Si as _l,Sj as nn,Sk as rz,Sl as gne,T as $9,Ta as sr,Tb as wt,Tc as kP,Td as zP,Te as $n,Tf as xO,Tg as hn,Th as oF,Ti as F_,Tj as _k,Tk as nz,Tl as bne,U as Mc,Ua as cu,Ub as _P,Uc as Rm,Ud as na,Ue as sa,Uf as CO,Ug as VO,Uh as sF,Ui as wF,Uj as va,Uk as tne,Ul as vne,V as zv,Va as Eo,Vb as ore,Vc as EP,Vd as lf,Ve as mu,Vf as SO,Vg as qO,Vh as aF,Vi as xF,Vj as rg,Vk as Ek,Vl as _ne,W as Tm,Wa as Ke,Wb as Zr,Wc as Pm,Wd as BP,We as jc,Wf as kO,Wg as KO,Wh as E_,Wi as Fre,Wj as Do,Wk as oz,Wl as yne,X as G9,Xa as Xr,Xb as ll,Xc as ure,Xd as HP,Xe as ks,Xf as EO,Xg as Tre,Xh as lF,Xi as ar,Xj as yk,Xk as ine,Xl as wne,Y as Bv,Ya as Ht,Yb as To,Yc as Cs,Yd as UP,Ye as Fm,Yf as ek,Yg as $O,Yh as yf,Yi as Ls,Yj as BF,Yk as sg,Yl as xne,Z as Y9,Za as si,Zb as H3,Zc as hu,Zd as jP,Ze as vt,Zf as TO,Zg as Ire,Zh as ak,Zi as ti,Zj as HF,Zk as Tk,Zl as wu,_ as En,_a as Tn,_b as yP,_c as Qv,_d as WP,_e as aa,_f as IO,_g as GO,_h as T_,_i as ba,_j as fn,_k as sz,_l as wa,a as b,aa as sl,ab as ci,ac as xs,ad as q3,ae as pu,af as vre,ag as AO,ah as ok,ai as dF,aj as zre,ak as V_,al as Ik,am as Ds,b as He,ba as M3,bb as Li,bc as Xo,bd as un,be as ul,bf as rO,bg as DO,bh as vf,bi as Nre,bj as yl,bk as Sl,bl as Lk,c as ft,ca as nre,cb as Go,cc as Mm,cd as K3,ce as n_,cf as hf,cg as MO,ch as mt,ci as er,cj as hk,ck as jF,cl as Ak,d as Yt,da as Hv,db as xr,dc as ia,dd as IP,de as o_,df as _re,dg as NO,dh as Hr,di as es,dj as SF,dk as WF,dl as az,e as $o,ea as X9,eb as ta,ec as Qo,ed as qi,ee as qP,ef as nO,eg as RO,eh as __,ei as I_,ej as kF,ek as VF,el as lz,f as Mv,fa as Uv,fb as Yo,fc as Ci,fd as LP,fe as hl,ff as yre,fg as ua,fh as Are,fi as Rre,fj as fk,fk as _a,fl as cz,g as Co,ga as Q9,gb as ws,gc as Zi,gd as AP,ge as KP,gf as ff,gg as Um,gh as sk,gi as uF,gj as EF,gk as ng,gl as rne,h as km,ha as Z9,hb as Am,hc as Ln,hd as Zv,he as gre,hf as wre,hg as jm,hh as YO,hi as Pre,hj as z_,hk as qF,hl as dz,i as Vt,ia as Zh,ib as Jh,ic as Oc,id as DP,ie as $P,if as oO,ig as Wm,ih as XO,ii as lk,ij as Kc,ik as q_,il as nne,j as Nv,ja as jv,jb as Rc,jc as Fc,jd as MP,je as bre,jf as xre,jg as Vm,jh as QO,ji as Ore,jj as B_,jk as K_,jl as ty,k as z9,ka as J9,kb as pt,kc as Kv,kd as NP,ke as GP,kf as sO,kg as PO,kh as Ts,ki as bl,kj as TF,kk as KF,kl as uz,l as Sn,la as yt,lb as Qr,lc as $v,ld as RP,le as Q3,lf as Cre,lg as m_,lh as Ym,li as L_,lj as Bre,lk as wk,ll as ag,m as Qh,ma as Tr,mb as _t,mc as Oi,md as pi,me as s_,mf as aO,mg as pf,mh as ZO,mi as hF,mj as H_,mk as $re,ml as hz,n as Rv,na as So,nb as In,nc as de,nd as PP,ne as YP,nf as Sre,ng as tk,nh as y_,ni as wf,nj as IF,nk as Cf,nl as Dk,o as Ui,oa as Im,ob as vi,oc as U3,od as hre,oe as An,of as la,og as qm,oh as fa,oi as A_,oj as LF,ok as og,ol as one,p as L3,pa as Vn,pb as At,pc as ra,pd as Jv,pe as XP,pf as je,pg as Mn,ph as w_,pi as D_,pj as AF,pk as $_,pl as fz,q as ii,qa as eP,qb as Wi,qc as Kn,qd as OP,qe as cf,qf as ze,qg as g_,qh as Xm,qi as fF,qj as DF,qk as G_,ql as sne,r as le,ra as Lt,rb as ef,rc as We,rd as Dt,re as QP,rf as lO,rg as en,rh as Qm,ri as eg,rj as Hre,rk as Y_,rl as Sf,s as ce,sa as ko,sb as P3,sc as ee,sd as Cr,se as ZP,sf as zm,sg as bu,sh as x_,si as pF,sj as pk,sk as $F,sl as Mk,t as ji,ta as tP,tb as dP,tc as j3,td as Ji,te as Om,tf as cO,tg as ik,th as JO,ti as Is,tj as wl,tk as X_,tl as iy,u as B9,ua as N3,ub as tf,uc as wP,ud as Zo,ue as Io,uf as Jo,ug as rk,uh as Wc,ui as tg,uj as mk,uk as GF,ul as pz,v as ke,va as iP,vb as al,vc as Ue,vd as Jr,ve as Ki,vf as ca,vg as gr,vh as C_,vi as mF,vj as MF,vk as Gre,vl as mz,w as Pv,wa as Nc,wb as uP,wc as lt,wd as dl,we as Hc,wf as u_,wg as ki,wh as Zm,wi as M_,wj as Ure,wk as YF,wl as Nk,x as H9,xa as Xt,xb as hP,xc as B,xd as mr,xe as a_,xf as h_,xg as mf,xh as Se,xi as gF,xj as jre,xk as Yre,xl as gz,y as pr,ya as rP,yb as du,yc as et,yd as $3,ye as Ss,yf as dO,yg as tn,yh as Rt,yi as qc,yj as NF,yk as kl,yl as Rk,z as ol,za as nP,zb as Dm,zc as Qe,zd as of,ze as st,zf as uO,zg as b_,zh as S_,zi as ts,zj as Wre,zk as Q_,zl as ry}from"./chunk-23JDWT7I.js";import{a as ue,b as xt,c as su,d as so,e as N,f as Xi,g as Gh,h as Wn,i as Yh,j as wr,k as F9}from"./chunk-EP6THQJ3.js";var LB=Xi((VSe,IB)=>{"use strict";var Ty=Object.prototype.hasOwnProperty,TB=Object.prototype.toString,wB=Object.defineProperty,xB=Object.getOwnPropertyDescriptor,CB=function(e){return typeof Array.isArray=="function"?Array.isArray(e):TB.call(e)==="[object Array]"},SB=function(e){if(!e||TB.call(e)!=="[object Object]")return!1;var t=Ty.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ty.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!r)return!1;var n;for(n in e);return typeof n=="undefined"||Ty.call(e,n)},kB=function(e,t){wB&&t.name==="__proto__"?wB(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},EB=function(e,t){if(t==="__proto__")if(Ty.call(e,t)){if(xB)return xB(e,t).value}else return;return e[t]};IB.exports=function i(){var e,t,r,n,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<c;++l)if(e=arguments[l],e!=null)for(t in e)r=EB(a,t),n=EB(e,t),a!==n&&(d&&n&&(SB(n)||(o=CB(n)))?(o?(o=!1,s=r&&CB(r)?r:[]):s=r&&SB(r)?r:{},kB(a,{name:t,newValue:i(d,s,n)})):typeof n!="undefined"&&kB(a,{name:t,newValue:n}));return a}});var cq=N(()=>{});var dq=N(()=>{cq()});var Bme,Hme,bx,cT,vx,Yl,dT,uT,hT,fT,pT=N(()=>{Eo();Ss();sl();dq();lt();Ir();ei();He();wt();Bme=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Hme=function(i,e){return function(t,r){e(t,r,i)}},bx=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},vx=new ht("selectionAnchorSet",!1),Yl=cT=class{static get(e){return e.getContribution(cT.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=vx.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(Qe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Ki().appendText(b("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),sr(b("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(Qe.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()}};Yl.ID="editor.contrib.selectionAnchorController";Yl=cT=Bme([Hme(1,it)],Yl);dT=class extends de{constructor(){super({id:"editor.action.setSelectionAnchor",label:b("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2080),weight:100}})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.setSelectionAnchor()})}},uT=class extends de{constructor(){super({id:"editor.action.goToSelectionAnchor",label:b("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:vx})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.goToSelectionAnchor()})}},hT=class extends de{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:b("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:vx,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2089),weight:100}})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.selectFromAnchorToCursor()})}},fT=class extends de{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:b("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:vx,kbOpts:{kbExpr:F.editorTextFocus,primary:9,weight:100}})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.cancelSelectionAnchor()})}};Ue(Yl.ID,Yl,4);ee(dT);ee(uT);ee(hT);ee(fT)});var uq=N(()=>{});var hq=N(()=>{uq()});var Ume,mT,gT,bT,vT,Fa,_T=N(()=>{Ut();ke();hq();lt();ci();et();Ir();ei();jc();Hr();He();Zi();en();tn();Ume=je("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},b("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),mT=class extends de{constructor(){super({id:"editor.action.jumpToBracket",label:b("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:3165,weight:100}})}run(e,t){var r;(r=Fa.get(t))===null||r===void 0||r.jumpToBracket()}},gT=class extends de{constructor(){super({id:"editor.action.selectToBracket",label:b("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,r){var n;let o=!0;r&&r.selectBrackets===!1&&(o=!1),(n=Fa.get(t))===null||n===void 0||n.selectToBracket(o)}},bT=class extends de{constructor(){super({id:"editor.action.removeBrackets",label:b("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2561,weight:100}})}run(e,t){var r;(r=Fa.get(t))===null||r===void 0||r.removeBrackets(this.id)}},vT=class{constructor(e,t,r){this.position=e,this.brackets=t,this.options=r}},Fa=class i extends ce{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 di(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(70),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(70)&&(this._matchBrackets=this._editor.getOption(70),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(r=>{let n=r.getStartPosition(),o=e.bracketPairs.matchBracket(n),s=null;if(o)o[0].containsPosition(n)&&!o[1].containsPosition(n)?s=o[1].getStartPosition():o[1].containsPosition(n)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(n);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(n);l&&l.range&&(s=l.range.getStartPosition())}}return s?new Qe(s.lineNumber,s.column,s.lineNumber,s.column):new Qe(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),r=[];this._editor.getSelections().forEach(n=>{let o=n.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(B.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&&r.push(new Qe(a.lineNumber,a.column,l.lineNumber,l.column))}),r.length>0&&(this._editor.setSelections(r),this._editor.revealRange(r[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(r=>{let n=r.getPosition(),o=t.bracketPairs.matchBracket(n);o||(o=t.bracketPairs.findEnclosingBrackets(n)),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 r of this._lastBracketsData){let n=r.brackets;n&&(e[t++]={range:n[0],options:r.options},e[t++]={range:n[1],options:r.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(),r=t.getVersionId(),n=[];this._lastVersionId===r&&(n=this._lastBracketsData);let o=[],s=0;for(let u=0,h=e.length;u<h;u++){let f=e[u];f.isEmpty()&&(o[s++]=f.getStartPosition())}o.length>1&&o.sort(Ie.compare);let a=[],l=0,c=0,d=n.length;for(let u=0,h=o.length;u<h;u++){let f=o[u];for(;c<d&&n[c].position.isBefore(f);)c++;if(c<d&&n[c].position.equals(f))a[l++]=n[c];else{let m=t.bracketPairs.matchBracket(f,20),g=i._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!m&&this._matchBrackets==="always"&&(m=t.bracketPairs.findEnclosingBrackets(f,20),g=i._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new vT(f,m,g)}}this._lastBracketsData=a,this._lastVersionId=r}};Fa.ID="editor.contrib.bracketMatchingController";Fa._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=mt.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ki(Ume),position:$n.Center}});Fa._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=mt.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});Ue(Fa.ID,Fa,1);ee(gT);ee(mT);ee(bT);Xo.appendMenuItem(Me.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:b({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})});var _x,fq=N(()=>{et();Ir();_x=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 r=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(r)))if(this._isMovingLeft){let s=new B(r,n-1,r,n),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new B(r,o,r,o),a)}else{let s=new B(r,o,r,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new B(r,n,r,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new Qe(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Qe(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var yx,yT,wT,xT=N(()=>{lt();ei();fq();He();yx=class extends de{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let r=[],n=t.getSelections();for(let o of n)r.push(new _x(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},yT=class extends yx{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:b("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:F.writable})}},wT=class extends yx{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:b("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:F.writable})}};ee(yT);ee(wT)});var CT,ST=N(()=>{lt();Yv();cre();et();ei();He();CT=class extends de{constructor(){super({id:"editor.action.transposeLetters",label:b("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let r=t.getModel(),n=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=r.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let d=l===c?s.getPosition():Xv.rightPosition(r,s.getPosition().lineNumber,s.getPosition().column),u=Xv.leftPosition(r,d),h=Xv.leftPosition(r,u),f=r.getValueInRange(B.fromPositions(h,u)),m=r.getValueInRange(B.fromPositions(u,d)),g=B.fromPositions(h,d);n.push(new cl(g,m+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}};ee(CT)});function TT(i){return i.register(),i}function mq(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,r)=>{let n=t.get(si).getFocusedCodeEditor();if(n&&n.hasTextFocus()){let o=n.getOption(36),s=n.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,r)=>(document.execCommand(e),!0)))}var jme,Wu,Wme,pq,Vme,qme,Kme,kT,ET,IT=N(()=>{V9();En();QO();lt();Tn();ei();He();Zi();Ym();wt();jme=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Wu="9_cutcopypaste",Wme=Mc||document.queryCommandSupported("cut"),pq=Mc||document.queryCommandSupported("copy"),Vme=typeof navigator.clipboard=="undefined"||W9?document.queryCommandSupported("paste"):!0;qme=Wme?TT(new $v({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Mc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Me.EditorContext,group:Wu,title:b("actions.clipboard.cutLabel","Cut"),when:F.writable,order:1},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Me.SimpleEditorContext,group:Wu,title:b("actions.clipboard.cutLabel","Cut"),when:F.writable,order:1}]})):void 0,Kme=pq?TT(new $v({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Mc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Me.EditorContext,group:Wu,title:b("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Me.SimpleEditorContext,group:Wu,title:b("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Xo.appendMenuItem(Me.MenubarEditMenu,{submenu:Me.MenubarCopy,title:{value:b("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Xo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextCopy,title:{value:b("copy as","Copy As"),original:"Copy As"},group:Wu,order:3});Xo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1,when:fe.and(fe.notEquals("resourceScheme","output"),F.editorTextFocus)});Xo.appendMenuItem(Me.EditorTitleContext,{submenu:Me.EditorTitleContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1});Xo.appendMenuItem(Me.ExplorerContext,{submenu:Me.ExplorerContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1});kT=Vme?TT(new $v({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Mc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Me.EditorContext,group:Wu,title:b("actions.clipboard.pasteLabel","Paste"),when:F.writable,order:4},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Me.SimpleEditorContext,group:Wu,title:b("actions.clipboard.pasteLabel","Paste"),when:F.writable,order:4}]})):void 0,ET=class extends de{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:b("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(36)&&t.getSelection().isEmpty()||(sk.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),sk.forceCopyWithSyntaxHighlighting=!1)}};mq(qme,"cut");mq(Kme,"copy");kT&&(kT.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(si),r=i.get(Ts),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&zv?(()=>jme(void 0,void 0,void 0,function*(){let s=yield r.readText();if(s!==""){let a=YO.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=n.getOption(36)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),n.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),kT.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));pq&&ee(ET)});function gq(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>vq(e,t,i.include))||!i.includeSourceActions&&nt.Source.contains(e))}function bq(i,e){let t=e.kind?new nt(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(r=>vq(t,r,i.include))||!i.includeSourceActions&&t&&nt.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function vq(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var $me,nt,Wr,yd,wx,wd=N(()=>{Vt();$me=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},nt=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)}};nt.sep=".";nt.None=new nt("@@none@@");nt.Empty=new nt("");nt.QuickFix=new nt("quickfix");nt.Refactor=new nt("refactor");nt.RefactorExtract=nt.Refactor.append("extract");nt.RefactorInline=nt.Refactor.append("inline");nt.RefactorMove=nt.Refactor.append("move");nt.RefactorRewrite=nt.Refactor.append("rewrite");nt.Source=new nt("source");nt.SourceOrganizeImports=nt.Source.append("organizeImports");nt.SourceFixAll=nt.Source.append("fixAll");nt.SurroundWith=nt.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"})(Wr||(Wr={}));yd=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 nt(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,r){this.kind=e,this.apply=t,this.preferred=r}},wx=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return $me(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let r;try{r=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Yt(n)}r&&(this.action.edit=r.edit)}return this})}}});function E0(i,e,t,r,n,o){var s;return xx(this,void 0,void 0,function*(){let a=r.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:r.type},c=new eF(e,o),d=Gme(i,e,a),u=new le,h=d.map(m=>xx(this,void 0,void 0,function*(){try{n.report(m);let g=yield m.provideCodeActions(e,t,l,c.token);if(g&&u.add(g),c.token.isCancellationRequested)return _q;let w=((g==null?void 0:g.actions)||[]).filter(E=>E&&bq(a,E)),_=Xme(m,w,a.include);return{actions:w.map(E=>new wx(E,m)),documentation:_}}catch(g){if($o(g))throw g;return Yt(g),_q}})),f=i.onDidChange(()=>{let m=i.all(e);Cs(m,d)||c.cancel()});try{let m=yield Promise.all(h),g=m.map(_=>_.actions).flat(),w=[...un(m.map(_=>_.documentation)),...Yme(i,e,r,g)];return new LT(g,w,u)}finally{f.dispose(),c.dispose()}})}function Gme(i,e,t){return i.all(e).filter(r=>r.providedCodeActionKinds?r.providedCodeActionKinds.some(n=>gq(t,new nt(n))):!0)}function*Yme(i,e,t,r){var n,o,s;if(e&&r.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*F9((n=a._getAdditionalMenuItems)===null||n===void 0?void 0:n.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},r.map(l=>l.action))))}function Xme(i,e,t){if(!i.documentation)return;let r=i.documentation.map(n=>({kind:new nt(n.kind),command:n.command}));if(t){let n;for(let o of r)o.kind.contains(t)&&(n?n.kind.contains(o.kind)&&(n=o):n=o);if(n)return n==null?void 0:n.command}for(let n of e)if(n.kind){for(let o of r)if(o.kind.contains(new nt(n.kind)))return o.command}}function yq(i,e,t,r,n=st.None){var o;return xx(this,void 0,void 0,function*(){let s=i.get(Wc),a=i.get(vi),l=i.get(Ln),c=i.get(Mi);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(n),!n.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:r==null?void 0:r.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==C0.OnSave,showPreview:r==null?void 0:r.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let u=Qme(d);c.error(typeof u=="string"?u:b("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Qme(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var xx,Cx,Jf,Sx,kx,Ex,S0,k0,LT,_q,C0,Vu=N(()=>{pi();Si();Vt();ke();Tr();Zm();et();Ir();Rt();Go();vu();He();Wi();Ao();Vc();Oc();wd();xx=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Cx="editor.action.codeAction",Jf="editor.action.quickFix",Sx="editor.action.autoFix",kx="editor.action.refactor",Ex="editor.action.sourceAction",S0="editor.action.organizeImports",k0="editor.action.fixAll",LT=class i extends ce{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return qi(e.diagnostics)?qi(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:qi(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,r){super(),this.documentation=t,this._register(r),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&nt.QuickFix.contains(new nt(e.kind))&&!!e.isPreferred)}},_q={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(C0||(C0={}));At.registerCommand("_executeCodeActionProvider",function(i,e,t,r,n){return xx(this,void 0,void 0,function*(){if(!(e instanceof yt))throw Co();let{codeActionProvider:o}=i.get(Se),s=i.get(Li).getModel(e);if(!s)throw Co();let a=Qe.isISelection(t)?Qe.liftSelection(t):B.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Co();let l=typeof r=="string"?new nt(r):void 0,c=yield E0(o,s,a,{type:1,triggerAction:Wr.Default,filter:{includeSourceActions:!0,include:l}},ma.None,st.None),d=[],u=Math.min(c.validActions.length,typeof n=="number"?n:0);for(let h=0;h<u;h++)d.push(c.validActions[h].resolve(st.None));try{return yield Promise.all(d),c.validActions.map(h=>h.action)}finally{setTimeout(()=>c.dispose(),100)}})})});var Zme,Jme,AT,T0,wq=N(()=>{P3();Vu();wd();Ur();Zme=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Jme=function(i,e){return function(t,r){e(t,r,i)}},T0=AT=class{constructor(e){this.keybindingService=e}getResolver(){let e=new ef(()=>this.keybindingService.getKeybindings().filter(t=>AT.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let r=t.commandArgs;return t.command===S0?r={kind:nt.SourceOrganizeImports.value}:t.command===k0&&(r={kind:nt.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},yd.fromUser(r,{kind:nt.None,apply:"never"}))}));return t=>{if(t.kind){let r=this.bestKeybindingForCodeAction(t,e.value);return r==null?void 0:r.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let r=new nt(e.kind);return t.filter(n=>n.kind.contains(r)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,o)=>n?n.kind.contains(o.kind)?o:n:o,void 0)}};T0.codeActionCommands=[kx,Cx,Ex,S0,k0];T0=AT=Zme([Jme(0,qt)],T0)});var xq=N(()=>{});var Cq=N(()=>{xq()});var Sq=N(()=>{});var kq=N(()=>{Sq()});var I0=N(()=>{Cq();kq()});var Eq=N(()=>{});var Tq=N(()=>{Eq()});var tOe,iOe,rOe,nOe,oOe,sOe,aOe,lOe,cOe,dOe,uOe,hOe,fOe,pOe,mOe,gOe,bOe,vOe,_Oe,yOe,wOe,xOe,COe,SOe,kOe,EOe,TOe,IOe,LOe,AOe,DOe,MOe,NOe,Tx=N(()=>{Tq();He();en();tOe=je("symbolIcon.arrayForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),iOe=je("symbolIcon.booleanForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rOe=je("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),nOe=je("symbolIcon.colorForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oOe=je("symbolIcon.constantForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sOe=je("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),aOe=je("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lOe=je("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),cOe=je("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),dOe=je("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),uOe=je("symbolIcon.fileForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),hOe=je("symbolIcon.folderForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fOe=je("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pOe=je("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mOe=je("symbolIcon.keyForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gOe=je("symbolIcon.keywordForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bOe=je("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vOe=je("symbolIcon.moduleForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_Oe=je("symbolIcon.namespaceForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yOe=je("symbolIcon.nullForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wOe=je("symbolIcon.numberForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xOe=je("symbolIcon.objectForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),COe=je("symbolIcon.operatorForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),SOe=je("symbolIcon.packageForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kOe=je("symbolIcon.propertyForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),EOe=je("symbolIcon.referenceForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),TOe=je("symbolIcon.snippetForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),IOe=je("symbolIcon.stringForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),LOe=je("symbolIcon.structForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),AOe=je("symbolIcon.textForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),DOe=je("symbolIcon.typeParameterForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),MOe=je("symbolIcon.unitForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),NOe=je("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function Lq(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:Iq,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let r=ege.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new nt(o.action.kind):nt.None;for(let a of r)if(a.group.kind.contains(s)){a.actions.push(o);break}}let n=[];for(let o of r)if(o.actions.length){n.push({kind:"header",group:o.group});for(let s of o.actions)n.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return n}var Iq,ege,Aq=N(()=>{I0();Qr();wd();Tx();He();Iq=Object.freeze({kind:nt.Empty,title:b("codeAction.widget.id.more","More Actions...")}),ege=Object.freeze([{kind:nt.QuickFix,title:b("codeAction.widget.id.quickfix","Quick Fix")},{kind:nt.RefactorExtract,title:b("codeAction.widget.id.extract","Extract"),icon:pt.wrench},{kind:nt.RefactorInline,title:b("codeAction.widget.id.inline","Inline"),icon:pt.wrench},{kind:nt.RefactorRewrite,title:b("codeAction.widget.id.convert","Rewrite"),icon:pt.wrench},{kind:nt.RefactorMove,title:b("codeAction.widget.id.move","Move"),icon:pt.wrench},{kind:nt.SurroundWith,title:b("codeAction.widget.id.surround","Surround With"),icon:pt.symbolSnippet},{kind:nt.Source,title:b("codeAction.widget.id.source","Source Action"),icon:pt.symbolFile},Iq])});var Dq=N(()=>{});var Mq=N(()=>{Dq()});var tge,ige,DT,ep,Xl,MT=N(()=>{Bt();rF();Qr();Jt();ke();In();Mq();FO();Vu();He();Ur();tge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ige=function(i,e){return function(t,r){e(t,r,i)}};(function(i){i.Hidden={type:0};class e{constructor(r,n,o,s){this.actions=r,this.trigger=n,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(ep||(ep={}));Xl=DT=class extends ce{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Je),this.onClick=this._onClick.event,this._state=ep.Hidden,this._domNode=Le("div.lightBulbWidget"),this._register(k_.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(r=>{let n=this._editor.getModel();(this.state.type!==1||!n||this.state.editorPosition.lineNumber>=n.getLineCount())&&this.hide()})),this._register(tP(this._domNode,r=>{if(this.state.type!==1)return;this._editor.focus(),r.preventDefault();let{top:n,height:o}=Qi(this._domNode),s=this._editor.getOption(65),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(a+=s),this._onClick.fire({x:r.posx,y:n+o+a,actions:this.state.actions,trigger:this.state.trigger})})),this._register(Lt(this._domNode,"mouseenter",r=>{(r.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(63)&&!this._editor.getOption(63).enabled&&this.hide()})),this._register(li.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var r,n,o,s;this._preferredKbLabel=(n=(r=t.lookupKeybinding(Sx))===null||r===void 0?void 0:r.getLabel())!==null&&n!==void 0?n:void 0,this._quickFixKbLabel=(s=(o=t.lookupKeybinding(Jf))===null||o===void 0?void 0:o.getLabel())!==null&&s!==void 0?s:void 0,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,r){if(e.validActions.length<=0)return this.hide();let n=this._editor.getOptions();if(!n.get(63).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(r),l=o.getOptions().tabSize,c=n.get(49),d=o.getLineContent(s),u=Km(d,l),h=c.spaceWidth*u>22,f=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1),m=s;if(!h){if(s>1&&!f(s-1))m-=1;else if(!f(s+1))m+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new ep.Showing(e,t,r,{position:{lineNumber:m,column:1},preference:DT._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==ep.Hidden&&(this.state=ep.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(..._t.asClassNameArray(pt.lightBulb)),this._domNode.classList.add(..._t.asClassNameArray(pt.lightbulbAutofix)),this._preferredKbLabel)){this.title=b("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(..._t.asClassNameArray(pt.lightbulbAutofix)),this._domNode.classList.add(..._t.asClassNameArray(pt.lightBulb)),this._quickFixKbLabel?this.title=b("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=b("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Xl.ID="editor.contrib.lightbulbWidget";Xl._posPref=[0];Xl=DT=tge([ige(1,qt)],Xl)});var Nq=N(()=>{});var Rq=N(()=>{Nq()});var Pq=N(()=>{});var Oq=N(()=>{Pq()});function RT(i,e,t){return zq(this,void 0,void 0,function*(){try{return yield i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:nge(t)})}catch(r){return ft(r),!1}})}function nge(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var rge,Fq,zq,NT,eo,xd=N(()=>{lF();ak();Vt();Jt();ke();Oq();cF();Zo();Y3();Nre();es();rge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Fq=function(i,e){return function(t,r){e(t,r,i)}},zq=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},eo=NT=class{constructor(e,t,r){this._options=e,this._languageService=t,this._openerService=r,this._onDidRenderAsync=new Je,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,r){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let n=new le,o=n.add(E_(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),r));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(r,n)=>zq(this,void 0,void 0,function*(){var o,s,a;let l;r?l=this._languageService.getLanguageIdByLanguageName(r):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=sf);let c=yield dF(this._languageService,n,l),d=document.createElement("span");if(d.innerHTML=(a=(s=NT._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(49);T_(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:r=>RT(this._openerService,r,e.isTrusted),disposables:t}}}};eo._ttpTokenizer=yf("tokenizeToString",{createHTML(i){return i}});eo=NT=rge([Fq(1,Ji),Fq(2,er)],eo)});var oge,Bq,Ix,Vr,sge,Lx,L0=N(()=>{lF();Eo();Jt();Ss();ke();Rq();lt();et();xd();He();wt();es();Bt();oge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Bq=function(i,e){return function(t,r){e(t,r,i)}},Vr=Ix=class{static get(e){return e.getContribution(Ix.ID)}constructor(e,t,r){this._openerService=r,this._messageWidget=new ji,this._messageListeners=new le,this._mouseOverMessage=!1,this._editor=e,this._visible=Ix.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){sr(a_(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=a_(e)?E_(e,{actionHandler:{callback:n=>RT(this._openerService,n,a_(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new Lx(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(li.debounce(this._editor.onDidBlurEditorText,(n,o)=>o,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&oP(document.activeElement,this._messageWidget.value.getDomNode())||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(Lt(this._messageWidget.value.getDomNode(),gi.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(Lt(this._messageWidget.value.getDomNode(),gi.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let r;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(r?r.containsPosition(n.target.position)||this.closeMessage():r=new B(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Lx.fadeOut(this._messageWidget.value))}};Vr.ID="editor.contrib.messageController";Vr.MESSAGE_VISIBLE=new ht("messageVisible",!1,b("messageVisible","Whether the editor is currently showing an inline message"));Vr=Ix=oge([Bq(1,it),Bq(2,er)],Vr);sge=Oi.bindToContribution(Vr.get);We(new sge({id:"leaveEditorMessage",precondition:Vr.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));Lx=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(r),e.getDomNode().removeEventListener("animationend",t)},r=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:r},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:r},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");typeof n=="string"?(s.classList.add("message"),s.textContent=n):(n.classList.add("message"),s.appendChild(n)),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)}};Ue(Vr.ID,Vr,4)});var Hq=N(()=>{});var PT=N(()=>{Hq()});function age(i){if(i.kind==="action")return i.label}function jq(i){return i.replace(/\r\n|\r|\n/g," ")}var Uq,OT,HT,UT,FT,zT,BT,Ax,Dx,Wq=N(()=>{Bt();gF();fF();Qr();ke();En();In();PT();He();vl();Ur();N_();en();Uq=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},OT=function(i,e){return function(t,r){e(t,r,i)}},HT="acceptSelectedCodeAction",UT="previewSelectedCodeAction",FT=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,r){var n,o;r.text.textContent=(o=(n=e.group)===null||n===void 0?void 0:n.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},zT=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 r=document.createElement("span");r.className="title",e.append(r);let n=new M_(e,Bv);return{container:e,icon:t,text:r,keybinding:n}}renderElement(e,t,r){var n,o,s;if(!((n=e.group)===null||n===void 0)&&n.icon?(r.icon.className=_t.asClassName(e.group.icon),e.group.icon.color&&(r.icon.style.color=la(e.group.icon.color.id))):(r.icon.className=_t.asClassName(pt.lightBulb),r.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;r.text.textContent=jq(e.label),r.keybinding.set(e.keybinding),lP(!!e.keybinding,r.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(HT))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(UT))===null||s===void 0?void 0:s.getLabel();r.container.classList.toggle("option-disabled",e.disabled),e.disabled?r.container.title=e.label:a&&l?this._supportsPreview?r.container.title=b({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):r.container.title=b({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):r.container.title=""}disposeTemplate(e){}};zT=Uq([OT(1,qt)],zT);BT=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Ax=class extends UIEvent{constructor(){super("previewSelectedAction")}};Dx=class extends ce{constructor(e,t,r,n,o,s){super(),this._delegate=n,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 D_(e,this.domNode,a,[new zT(t,this._keybindingService),new FT],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:age},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?jq(l==null?void 0:l.label):"";return l.disabled&&(c=b({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>b({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(vF),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=r,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,n=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);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(n,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 r=t[0],n=this._list.element(r);if(!this.focusCondition(n))return;let o=e?new Ax:new BT;this._list.setSelection([r],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 Ax):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([])}};Dx=Uq([OT(4,qc),OT(5,qt)],Dx)});var lge,jT,qu,Cd,Ku,A0,Vq=N(()=>{Bt();tg();ke();PT();He();Wq();Zi();wt();vl();dl();Ht();en();lge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},jT=function(i,e){return function(t,r){e(t,r,i)}};je("actionBar.toggledBackground",{dark:pl,light:pl,hcDark:pl,hcLight:pl},b("actionBar.toggledBackground","Background color for toggled action items in action bar."));qu={Visible:new ht("codeActionMenuVisible",!1,b("codeActionMenuVisible","Whether the action widget list is visible"))},Cd=Xr("actionWidgetService"),Ku=class extends ce{get isVisible(){return qu.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,r){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=r,this._list=this._register(new ji)}show(e,t,r,n,o,s,a){let l=qu.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Dx,e,t,r,n);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,r){var n;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 le,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(Lt(l,gi.MOUSE_DOWN,m=>m.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(Lt(d,gi.POINTER_MOVE,()=>d.remove())),s.add(Lt(d,gi.MOUSE_DOWN,()=>d.remove()));let u=0;if(r.length){let m=this._createActionBar(".action-widget-action-bar",r);m&&(o.appendChild(m.getContainer().parentElement),s.add(m),u=m.getContainer().offsetWidth)}let h=(n=this._list.value)===null||n===void 0?void 0:n.layout(u);o.style.width=`${h}px`;let f=s.add(ys(e));return s.add(f.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let r=Le(e),n=new Is(r);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};Ku=lge([jT(0,qc),jT(1,it),jT(2,Ke)],Ku);Jr(Cd,Ku,1);A0=100+1e3;Ci(class extends Qo{constructor(){super({id:"hideCodeActionWidget",title:{value:b("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:qu.Visible,keybinding:{weight:A0,primary:9,secondary:[1033]}})}run(i){i.get(Cd).hide()}});Ci(class extends Qo{constructor(){super({id:"selectPrevCodeAction",title:{value:b("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:qu.Visible,keybinding:{weight:A0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.focusPrevious()}});Ci(class extends Qo{constructor(){super({id:"selectNextCodeAction",title:{value:b("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:qu.Visible,keybinding:{weight:A0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.focusNext()}});Ci(class extends Qo{constructor(){super({id:HT,title:{value:b("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:qu.Visible,keybinding:{weight:A0,primary:3,secondary:[2137]}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.acceptSelected()}});Ci(class extends Qo{constructor(){super({id:UT,title:{value:b("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:qu.Visible,keybinding:{weight:A0,primary:2051}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.acceptSelected(!0)}})});var VT,WT,$u,cge,Mx,qT=N(()=>{Ut();Vt();Jt();ke();Io();wt();Vc();wd();Vu();VT=new ht("supportedCodeAction",""),WT=class extends ce{constructor(e,t,r,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=r,this._delay=n,this._autoTriggerTimer=this._register(new oa),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(r=>s_(r,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Wr.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),r=this._editor.getSelection();if(r.isEmpty()&&e.type===2){let{lineNumber:n,column:o}=r.getPosition(),s=t.getLineContent(n);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(n)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return r}};(function(i){i.Empty={type:0};class e{constructor(r,n,o){this.trigger=r,this.position=n,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if($o(s))return cge;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})($u||($u={}));cge=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),Mx=class extends ce{constructor(e,t,r,n,o){super(),this._editor=e,this._registry=t,this._markerService=r,this._progressService=o,this._codeActionOracle=this._register(new ji),this._state=$u.Empty,this._onDidChangeState=this._register(new Je),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=VT.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState($u.Empty,!0))}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState($u.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(89)){let t=this._registry.all(e).flatMap(r=>{var n;return(n=r.providedCodeActionKinds)!==null&&n!==void 0?n:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new WT(this._editor,this._markerService,r=>{var n;if(!r){this.setState($u.Empty);return}let o=Zt(s=>E0(this._registry,e,r.selection,r.trigger,ma.None,s));r.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(o,250)),this.setState(new $u.Triggered(r.trigger,r.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Wr.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&&!this._disposed&&this._onDidChangeState.fire(e))}}});var dge,Ql,Nx,KT,za,Rx=N(()=>{Bt();Vt();P3();ke();ci();Rt();Vu();wq();Aq();MT();L0();He();Vq();Wi();Cr();wt();Ht();R_();Vc();wd();qT();dge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ql=function(i,e){return function(t,r){e(t,r,i)}},Nx=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},za=KT=class extends ce{static get(e){return e.getContribution(KT.ID)}constructor(e,t,r,n,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new ji),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new Mx(this._editor,o.codeActionProvider,t,r,s)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new ef(()=>{let u=this._editor.getContribution(Xl.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=n.createInstance(T0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,r){return this.showCodeActionList(t,r,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,r,n){var o;if(!this._editor.hasModel())return;(o=Vr.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:r,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,r){return Nx(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(yq,e,C0.FromCodeActions,{preview:r,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Wr.QuickFix,filter:{}})}})}update(e){var t,r,n,o,s,a,l;return Nx(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){ft(d);return}if(!this._disposed)if((r=this._lightBulbWidget.value)===null||r===void 0||r.update(c,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.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=Vr.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=Vr.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:r})=>r.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,r){return Nx(this,void 0,void 0,function*(){let n=this._editor.getDomNode();if(!n)return;let o=r.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=Ie.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>Nx(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,Lq(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,n,this._getActionBarActions(e,t,r))})}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),r=Qi(this._editor.getDomNode()),n=r.left+t.left,o=r.top+t.top+t.height;return{x:n,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,r){if(r.fromLightbulb)return[];let n=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 r.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:b("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,r))}:{id:"showMoreActions",label:b("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,r))}),n}};za.ID="editor.contrib.codeActionController";za=KT=dge([Ql(1,ig),Ql(2,it),Ql(3,Ke),Ql(4,Se),Ql(5,gl),Ql(6,vi),Ql(7,Dt),Ql(8,Cd),Ql(9,Ke)],za)});function D0(i){return fe.regex(VT.keys()[0],new RegExp("(\\s|^)"+al(i.value)+"\\b"))}function Gu(i,e,t,r,n=Wr.Default){if(i.hasModel()){let o=za.get(i);o==null||o.manualTriggerAtCurrentPosition(e,n,t,r)}}var $T,Px,Ox,Fx,zx,Bx,Hx,Ux,qq=N(()=>{Di();lt();ei();Vu();He();wt();wd();Rx();qT();$T={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:b("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:b("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[b("args.schema.apply.first","Always apply the first returned code action."),b("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),b("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:b("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};Px=class extends de{constructor(){super({id:Jf,label:b("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),kbOpts:{kbExpr:F.textInputFocus,primary:2137,weight:100}})}run(e,t){return Gu(t,b("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Wr.QuickFix)}},Ox=class extends Oi{constructor(){super({id:Cx,precondition:fe.and(F.writable,F.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:$T}]}})}runEditorCommand(e,t,r){let n=yd.fromUser(r,{kind:nt.Empty,apply:"ifSingle"});return Gu(t,typeof(r==null?void 0:r.kind)=="string"?n.preferred?b("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",r.kind):b("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",r.kind):n.preferred?b("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):b("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}},Fx=class extends de{constructor(){super({id:kx,label:b("refactor.label","Refactor..."),alias:"Refactor...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),kbOpts:{kbExpr:F.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:fe.and(F.writable,D0(nt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:$T}]}})}run(e,t,r){let n=yd.fromUser(r,{kind:nt.Refactor,apply:"never"});return Gu(t,typeof(r==null?void 0:r.kind)=="string"?n.preferred?b("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",r.kind):b("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",r.kind):n.preferred?b("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):b("editor.action.refactor.noneMessage","No refactorings available"),{include:nt.Refactor.contains(n.kind)?n.kind:nt.None,onlyIncludePreferredActions:n.preferred},n.apply,Wr.Refactor)}},zx=class extends de{constructor(){super({id:Ex,label:b("source.label","Source Action..."),alias:"Source Action...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:fe.and(F.writable,D0(nt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:$T}]}})}run(e,t,r){let n=yd.fromUser(r,{kind:nt.Source,apply:"never"});return Gu(t,typeof(r==null?void 0:r.kind)=="string"?n.preferred?b("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",r.kind):b("editor.action.source.noneMessage.kind","No source actions for '{0}' available",r.kind):n.preferred?b("editor.action.source.noneMessage.preferred","No preferred source actions available"):b("editor.action.source.noneMessage","No source actions available"),{include:nt.Source.contains(n.kind)?n.kind:nt.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,Wr.SourceAction)}},Bx=class extends de{constructor(){super({id:S0,label:b("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:fe.and(F.writable,D0(nt.SourceOrganizeImports)),kbOpts:{kbExpr:F.textInputFocus,primary:1581,weight:100}})}run(e,t){return Gu(t,b("editor.action.organize.noneMessage","No organize imports action available"),{include:nt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Wr.OrganizeImports)}},Hx=class extends de{constructor(){super({id:k0,label:b("fixAll.label","Fix All"),alias:"Fix All",precondition:fe.and(F.writable,D0(nt.SourceFixAll))})}run(e,t){return Gu(t,b("fixAll.noneMessage","No fix all action available"),{include:nt.SourceFixAll,includeSourceActions:!0},"ifSingle",Wr.FixAll)}},Ux=class extends de{constructor(){super({id:Sx,label:b("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:fe.and(F.writable,D0(nt.QuickFix)),kbOpts:{kbExpr:F.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Gu(t,b("editor.action.autoFix.noneMessage","No auto fixes available"),{include:nt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Wr.AutoFix)}}});var GT=N(()=>{lt();JO();qq();Rx();MT();He();G3();ll();Ue(za.ID,za,3);Ue(Xl.ID,Xl,4);ee(Px);ee(Fx);ee(zx);ee(Bx);ee(Ux);ee(Hx);We(new Ox);Zr.as(of.Configuration).registerConfiguration(Object.assign(Object.assign({},x_),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:b("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))});function YT(i,e,t){return Kq(this,void 0,void 0,function*(){let r=i.ordered(e),n=new Map,o=new tp,s=r.map((a,l)=>Kq(this,void 0,void 0,function*(){n.set(a,l);try{let c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&o.add(c,a)}catch(c){Yt(c)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:n.get(a.provider)<n.get(l.provider)?-1:n.get(a.provider)>n.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),o})}var Kq,tp,XT=N(()=>{Si();Vt();ke();Fr();Tr();Go();Wi();Rt();Kq=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},tp=class{constructor(){this.lenses=[],this._disposables=new le}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let r of e.lenses)this.lenses.push({symbol:r,provider:t})}};At.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,r]=e;zt(yt.isUri(t)),zt(typeof r=="number"||!r);let{codeLensProvider:n}=i.get(Se),o=i.get(Li).getModel(t);if(!o)throw Co();let s=[],a=new le;return YT(n,o,st.None).then(l=>{a.add(l);let c=[];for(let d of l.lenses)r==null||d.symbol.command?s.push(d.symbol):r-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(o,d.symbol,st.None)).then(u=>s.push(u||d.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var uge,hge,ZT,jx,QT,$q=N(()=>{Ut();z9();lf();et();XT();dl();Ht();_u();uge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},hge=function(i,e){return function(t,r){e(t,r,i)}},ZT=Xr("ICodeLensCache"),jx=class{constructor(e,t){this.lineCount=e,this.data=t}},QT=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new na(20,.75);let t="codelens/cache";JP(()=>e.remove(t,1));let r="codelens/cache2",n=e.get(r,1,"{}");this._deserialize(n),Nv(e.onWillSaveState)(o=>{o.reason===O_.SHUTDOWN&&e.store(r,this._serialize(),1,1)})}put(e,t){let r=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}}}),n=new tp;n.add({lenses:r,dispose:()=>{}},this._fakeProvider);let o=new jx(e.getLineCount(),n);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,r]of this._cache){let n=new Set;for(let o of r.data.lenses)n.add(o.symbol.range.startLineNumber);e[t]={lineCount:r.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let r in t){let n=t[r],o=[];for(let a of n.lines)o.push({range:new B(a,1,a,11)});let s=new tp;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(r,new jx(n.lineCount,s))}}catch(t){}}};QT=uge([hge(0,Gn)],QT);Jr(ZT,QT,1)});var Gq=N(()=>{});var Yq=N(()=>{Gq()});var JT,Wx,ip,Xq,M0,Qq=N(()=>{Bt();Mre();Yq();et();Hr();JT=class{constructor(e,t,r){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=r,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")}},Wx=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 r=[],n=!1;for(let o=0;o<e.length;o++){let s=e[o];if(s&&(n=!0,s.command)){let a=nF(s.command.title.trim());s.command.id?(r.push(Le("a",{id:String(o),title:s.command.tooltip,role:"button"},...a)),this._commands.set(String(o),s.command)):r.push(Le("span",{title:s.command.tooltip},...a)),o+1<e.length&&r.push(Le("span",void 0,"\xA0|\xA0"))}}n?(lu(this._domNode,...r),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):lu(this._domNode,Le("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){let t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}};Wx._idPool=0;ip=class{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let r=0,n=t.length;r<n;r++)this._addDecorationsCallbacks[r](t[r])}},Xq=mt.register({collapseOnReplaceEdit:!0,description:"codelens"}),M0=class{constructor(e,t,r,n,o,s){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a,l=[];this._data.forEach((c,d)=>{c.symbol.command&&l.push(c.symbol),r.addDecoration({range:c.symbol.range,options:Xq},u=>this._decorationIds[d]=u),a?a=B.plusRange(a,c.symbol.range):a=B.lift(c.symbol.range)}),this._viewZone=new JT(a.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new Wx(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 r=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(r&&B.isEmpty(n.range)===r.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((r,n)=>{t.addDecoration({range:r.symbol.range,options:Xq},o=>this._decorationIds[n]=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<this._decorationIds.length;t++){let r=e.getDecorationRange(this._decorationIds[t]);r&&(this._data[t].symbol.range=r)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){let r=e[t];if(r){let{symbol:n}=this._data[t];n.command=r.command||n.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){let e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){let t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}});var fge,N0,pge,rp,eI=N(()=>{Ut();Vt();ke();P_();lt();Qm();ei();XT();$q();Qq();He();Wi();Ao();_l();Ls();Rt();fge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},N0=function(i,e){return function(t,r){e(t,r,i)}},pge=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},rp=class{constructor(e,t,r,n,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=o,this._codeLensCache=s,this._disposables=new le,this._localToDispose=new le,this._lenses=[],this._oldCodeLensModels=new le,this._provideCodeLensDebounce=r.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=r.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new di(()=>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(49)||a.hasChanged(18)||a.hasChanged(17))&&this._updateLensStyle(),a.hasChanged(16)&&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(65)/this._editor.getOption(51)),t=this._editor.getOption(18);return(!t||t<5)&&(t=this._editor.getOption(51)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),r=this._editor.getOption(17),n=this._editor.getOption(49),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),r&&(o.setProperty("--vscode-editorCodeLens-fontFamily",r),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",w_.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,r;(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(),(r=this._currentCodeLensModel)===null||r===void 0||r.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(16))return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(fl(()=>{let n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(let n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){let o=n.onDidChange(()=>r.schedule());this._localToDispose.add(o)}let r=new di(()=>{var n;let o=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Zt(s=>YT(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);r.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},ft)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(r),this._localToDispose.add(ii(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var n;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 ip;a.forEach(d=>{d.dispose(c,s),this._lenses.splice(this._lenses.indexOf(d),1)}),c.commit(o)})}),r.schedule(),this._resolveCodeLensesScheduler.cancel(),(n=this._resolveCodeLensesPromise)===null||n===void 0||n.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{r.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ii(()=>{if(this._editor.getModel()){let n=ga.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let o=n.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}}})),r.schedule()}_disposeAllLenses(e,t){let r=new ip;for(let n of this._lenses)n.dispose(r,t);e&&r.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),r=[],n;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],r.push(n)))}if(!r.length&&!this._lenses.length)return;let o=ga.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new ip,d=0,u=0;for(;u<r.length&&d<this._lenses.length;){let h=r[u][0].symbol.range.startLineNumber,f=this._lenses[d].getLineNumber();f<h?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):f===h?(this._lenses[d].updateCodeLensSymbols(r[u],c),u++,d++):(this._lenses.splice(d,0,new M0(r[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,u++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;u<r.length;)this._lenses.push(new M0(r[u],this._editor,c,l,s.codeLensHeight,()=>this._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 r=[],n=[];if(this._lenses.forEach(a=>{let l=a.computeIfNecessary(t);l&&(r.push(l),n.push(a))}),r.length===0)return;let o=Date.now(),s=Zt(a=>{let l=r.map((c,d)=>{let u=new Array(c.length),h=c.map((f,m)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(g=>{u[m]=g},Yt):(u[m]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!n[d].isDisposed()&&n[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=>{ft(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};rp.ID="css.editor.codeLens";rp=fge([N0(1,Se),N0(2,ar),N0(3,vi),N0(4,Mi),N0(5,ZT)],rp);Ue(rp.ID,rp,1);ee(class extends de{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:F.hasCodeLensProvider,label:b("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return pge(this,void 0,void 0,function*(){if(!t.hasModel())return;let r=e.get(rn),n=e.get(vi),o=e.get(Mi),s=t.getSelection().positionLineNumber,a=t.getContribution(rp.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 r.pick(c,{canPickMany:!1});if(d){if(l.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(d.command.id,...d.command.arguments||[])}catch(u){o.error(u)}}})}})});var Zl,tI=N(()=>{ba();ci();et();Ir();Zl=class i{constructor(e,t,r){this.languageConfigurationService=r,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,r){if(r<0)return!1;let n=t.length,o=e.length;if(r+n>o)return!1;for(let s=0;s<n;s++){let a=e.charCodeAt(r+s),l=t.charCodeAt(s);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,r,n,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=o.getLineContent(a),h=o.getLineContent(c),f=u.lastIndexOf(t,l-1+t.length),m=h.indexOf(r,d-1-r.length);if(f!==-1&&m!==-1)if(a===c)u.substring(f+t.length,m).indexOf(r)>=0&&(f=-1,m=-1);else{let w=u.substring(f+t.length),_=h.substring(0,m);(w.indexOf(r)>=0||_.indexOf(r)>=0)&&(f=-1,m=-1)}let g;f!==-1&&m!==-1?(n&&f+t.length<u.length&&u.charCodeAt(f+t.length)===32&&(t=t+" "),n&&m>0&&h.charCodeAt(m-1)===32&&(r=" "+r,m-=1),g=i._createRemoveBlockCommentOperations(new B(a,f+t.length+1,c,m+1),t,r)):(g=i._createAddBlockCommentOperations(e,t,r,this._insertSpace),this._usedEndToken=g.length===1?r:null);for(let w of g)s.addTrackedEditOperation(w.range,w.text)}static _createRemoveBlockCommentOperations(e,t,r){let n=[];return B.isEmpty(e)?n.push(ti.delete(new B(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+r.length))):(n.push(ti.delete(new B(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(ti.delete(new B(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+r.length)))),n}static _createAddBlockCommentOperations(e,t,r,n){let o=[];return B.isEmpty(e)?o.push(ti.replace(new B(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+r)):(o.push(ti.insert(new Ie(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(ti.insert(new Ie(e.endLineNumber,e.endColumn),(n?" ":"")+r))),o}getEditOperations(e,t){let r=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(r);let o=e.getLanguageIdAtPosition(r,n),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 r=t.getInverseEditOperations();if(r.length===2){let n=r[0],o=r[1];return new Qe(n.range.endLineNumber,n.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let n=r[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Qe(n.endLineNumber,n.endColumn+o,n.endLineNumber,n.endColumn+o)}}}});var Vx,Zq=N(()=>{Di();ba();ci();et();Ir();tI();Vx=class i{constructor(e,t,r,n,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=r,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,r,n){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=r-t+1;c<d;c++)l[c]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,r,n,o,s,a,l){let c=!0,d;e===0?d=!0:e===1?d=!1:d=!0;for(let u=0,h=n.length;u<h;u++){let f=n[u],m=o+u;if(m===o&&a){f.ignore=!0;continue}let g=r.getLineContent(m),w=Dm(g);if(w===-1){f.ignore=s,f.commentStrOffset=g.length;continue}if(c=!1,f.ignore=!1,f.commentStrOffset=w,d&&!Zl._haystackHasNeedleAtOffset(g,f.commentStr,w)&&(e===0?d=!1:e===1||(f.ignore=!0)),d&&t){let _=w+f.commentStrLength;_<g.length&&g.charCodeAt(_)===32&&(f.commentStrLength+=1)}}if(e===0&&c){d=!1;for(let u=0,h=n.length;u<h;u++)n[u].ignore=!1}return{supported:!0,shouldRemoveComments:d,lines:n}}static _gatherPreflightData(e,t,r,n,o,s,a,l){let c=i._gatherPreflightCommentStrings(r,n,o,l);return c===null?{supported:!1}:i._analyzeLines(e,t,r,c,n,s,a,l)}_executeLineComments(e,t,r,n){let o;r.shouldRemoveComments?o=i._createRemoveLineCommentsOperations(r.lines,n.startLineNumber):(i._normalizeInsertionPoint(e,r.lines,n.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(r.lines,n.startLineNumber));let s=new Ie(n.positionLineNumber,n.positionColumn);for(let a=0,l=o.length;a<l;a++)t.addEditOperation(o[a].range,o[a].text),B.isEmpty(o[a].range)&&B.getStartPosition(o[a].range).equals(s)&&e.getLineContent(s.lineNumber).length+1===s.column&&(this._deltaColumn=(o[a].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,r,n){let o=t.startLineNumber,s=t.endLineNumber,a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),l=e.getLineContent(o).lastIndexOf(r,a-1),c=e.getLineContent(s).indexOf(n,t.endColumn-1-r.length);return l!==-1&&c===-1&&(c=e.getLineContent(o).indexOf(n,l+r.length),s=o),l===-1&&c!==-1&&(l=e.getLineContent(s).lastIndexOf(r,c),o=s),t.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(o).indexOf(r),l!==-1&&(c=e.getLineContent(o).indexOf(n,l+r.length))),l!==-1&&e.getLineContent(o).charCodeAt(l+r.length)===32&&(r+=" "),c!==-1&&e.getLineContent(s).charCodeAt(c-1)===32&&(n=" "+n,c-=1),l!==-1&&c!==-1?Zl._createRemoveBlockCommentOperations(new B(o,l+r.length+1,s,c+1),r,n):null}_executeBlockComment(e,t,r){e.tokenization.tokenizeIfCheap(r.startLineNumber);let n=e.getLanguageIdAtPosition(r.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;let s=o.blockCommentStartToken,a=o.blockCommentEndToken,l=this._attemptRemoveBlockComment(e,r,s,a);if(!l){if(r.isEmpty()){let c=e.getLineContent(r.startLineNumber),d=Dm(c);d===-1&&(d=c.length),l=Zl._createAddBlockCommentOperations(new B(r.startLineNumber,d+1,r.startLineNumber,c.length+1),s,a,this._insertSpace)}else l=Zl._createAddBlockCommentOperations(new B(r.startLineNumber,e.getLineFirstNonWhitespaceColumn(r.startLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),s,a,this._insertSpace);l.length===1&&(this._deltaColumn=s.length+1)}this._selectionId=t.trackSelection(r);for(let c of l)t.addEditOperation(c.range,c.text)}getEditOperations(e,t){let r=this._selection;if(this._moveEndPositionDown=!1,r.startLineNumber===r.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new B(r.startLineNumber,e.getLineMaxColumn(r.startLineNumber),r.startLineNumber+1,1),r.startLineNumber===e.getLineCount()?"":` -`),this._selectionId=t.trackSelection(r);return}r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._moveEndPositionDown=!0,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1)));let n=i._gatherPreflightData(this._type,this._insertSpace,e,r.startLineNumber,r.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,r):this._executeBlockComment(e,t,r)}computeCursorState(e,t){let r=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),new Qe(r.selectionStartLineNumber,r.selectionStartColumn+this._deltaColumn,r.positionLineNumber,r.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){let r=[];for(let n=0,o=e.length;n<o;n++){let s=e[n];s.ignore||r.push(ti.delete(new B(t+n,s.commentStrOffset+1,t+n,s.commentStrOffset+s.commentStrLength+1)))}return r}_createAddLineCommentsOperations(e,t){let r=[],n=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){let a=e[o];a.ignore||r.push(ti.insert(new Ie(t+o,a.commentStrOffset+1),a.commentStr+n))}return r}static nextVisibleColumn(e,t,r,n){return r?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,r,n){let o=1073741824,s,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(r+l),u=0;for(let h=0,f=t[l].commentStrOffset;u<o&&h<f;h++)u=i.nextVisibleColumn(u,n,d.charCodeAt(h)===9,1);u<o&&(o=u)}o=Math.floor(o/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(r+l),u=0;for(s=0,a=t[l].commentStrOffset;u<o&&s<a;s++)u=i.nextVisibleColumn(u,n,d.charCodeAt(s)===9,1);u>o?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var R0,iI,rI,nI,oI,sI=N(()=>{sl();lt();et();ei();Br();tI();Zq();He();Zi();R0=class extends de{constructor(e,t){super(t),this._type=e}run(e,t){let r=e.get(Pt);if(!t.hasModel())return;let n=t.getModel(),o=[],s=n.getOptions(),a=t.getOption(22),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>B.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d<l.length;d++){let u=l[d];c.selection.endLineNumber===u.selection.startLineNumber&&(c.index<u.index?u.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=u))}for(let d of l)o.push(new Vx(r,d.selection,s.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},iI=class extends R0{constructor(){super(0,{id:"editor.action.commentLine",label:b("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"5_insert",title:b({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}},rI=class extends R0{constructor(){super(1,{id:"editor.action.addCommentLine",label:b("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2081),weight:100}})}},nI=class extends R0{constructor(){super(2,{id:"editor.action.removeCommentLine",label:b("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2099),weight:100}})}},oI=class extends de{constructor(){super({id:"editor.action.blockComment",label:b("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"5_insert",title:b({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){let r=e.get(Pt);if(!t.hasModel())return;let n=t.getOption(22),o=[],s=t.getSelections();for(let a of s)o.push(new Zl(a,n.insertSpace,r));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}};ee(iI);ee(rI);ee(nI);ee(oI)});var mge,Yu,aI,np,lI,cI=N(()=>{Bt();pF();Rc();ke();En();lt();ei();He();Zi();wt();vl();Ur();Cr();z_();mge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Yu=function(i,e){return function(t,r){e(t,r,i)}},np=aI=class{static get(e){return e.getContribution(aI.ID)}constructor(e,t,r,n,o,s,a,l){this._contextMenuService=t,this._contextViewService=r,this._contextKeyService=n,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new le,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&&sP(d)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(23)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(23)){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(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let r=!1;for(let n of this._editor.getSelections())if(n.containsPosition(e.target.position)){r=!0;break}r||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(23)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Me.SimpleEditorContext:Me.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let r=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.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&&(r.push(new Am(c.id,c.label,d)),l++)}else r.push(c),l++;l&&r.push(new ws)}return r.length&&r.pop(),r}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let r=this._editor.getOption(59);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Qi(this._editor.getDomNode()),l=a.left+s.left,c=a.top+s.top+s.height;n={x:l,y:c}}let o=this._editor.getOption(125)&&!Tm;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:o?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:s=>{let a=this._keybindingFor(s);if(a)return new eg(s,s,{label:!0,keybinding:a.getLabel(),isMenu:!0});let l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new eg(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:r})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||EF(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(71),r=0,n=c=>({id:`menu-action-${++r}`,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-${++r}`,c,d,void 0),s=(c,d,u,h,f)=>{if(!d)return n({label:c,enabled:d,run:()=>{}});let m=w=>()=>{this._configurationService.updateValue(u,w)},g=[];for(let w of f)g.push(n({label:w.label,checked:h===w.value,run:m(w.value)}));return o(c,g)},a=[];a.push(n({label:b("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ws),a.push(n({label:b("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(b("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:b("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:b("context.minimap.size.fill","Fill"),value:"fill"},{label:b("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(b("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:b("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:b("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(125)&&!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()}};np.ID="editor.contrib.contextmenu";np=aI=mge([Yu(1,ts),Yu(2,qc),Yu(3,it),Yu(4,qt),Yu(5,xs),Yu(6,Dt),Yu(7,yl)],np);lI=class extends de{constructor(){super({id:"editor.action.showContextMenu",label:b("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:1092,weight:100}})}run(e,t){var r;(r=np.get(t))===null||r===void 0||r.showContextMenu()}};Ue(np.ID,np,2);ee(lI)});var P0,O0,Xu,dI,uI,hI=N(()=>{ke();lt();ei();He();P0=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,r=e.selections.length;if(t!==r)return!1;for(let n=0;n<t;n++)if(!this.selections[n].equalsSelection(e.selections[n]))return!1;return!0}},O0=class{constructor(e,t,r){this.cursorState=e,this.scrollTop=t,this.scrollLeft=r}},Xu=class i extends ce{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{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 r=new P0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(r)||(this._undoStack.push(new O0(r,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 O0(new P0(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 O0(new P0(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}};Xu.ID="editor.contrib.cursorUndoRedoController";dI=class extends de{constructor(){super({id:"cursorUndo",label:b("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:2099,weight:100}})}run(e,t,r){var n;(n=Xu.get(t))===null||n===void 0||n.cursorUndo()}},uI=class extends de{constructor(){super({id:"cursorRedo",label:b("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,r){var n;(n=Xu.get(t))===null||n===void 0||n.cursorRedo()}};Ue(Xu.ID,Xu,0);ee(dI);ee(uI)});var Jq=N(()=>{});var eK=N(()=>{Jq()});var qx,tK=N(()=>{et();Ir();qx=class{constructor(e,t,r){this.selection=e,this.targetPosition=t,this.copy=r,this.targetSelection=null}getEditOperations(e,t){let r=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new B(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),r),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 Qe(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 Qe(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<this.selection.endLineNumber){this.targetSelection=new Qe(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new Qe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new Qe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}});function op(i){return kn?i.altKey:i.ctrlKey}var Qu,fI=N(()=>{ke();En();eK();lt();ci();et();Ir();Hr();tK();Qu=class i extends ce{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(34)||this._editor.getOption(21)||(op(e)&&(this._modifierPressed=!0),this._mouseDown&&op(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(34)||this._editor.getOption(21)||(op(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 n=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}op(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 Ie(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let r=null;if(e.event.shiftKey){let n=this._editor.getSelection();if(n){let{selectionStartLineNumber:o,selectionStartColumn:s}=n;r=[new Qe(o,s,t.lineNumber,t.column)]}}else r=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new Qe(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(op(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new qx(this._dragSelection,t,op(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 B(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()}};Qu.ID="editor.contrib.dragAndDrop";Qu.TRIGGER_KEY_VALUE=kn?6:5;Qu._DECORATION_OPTIONS=mt.register({description:"dnd-target",className:"dnd-target"});Ue(Qu.ID,Qu,2)});var Sd,F0=N(()=>{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(r){for(let n=0;n<r.length;n++)r[n]=Math.floor(Math.random()*256);return r};let e=new Uint8Array(16),t=[];for(let r=0;r<256;r++)t.push(r.toString(16).padStart(2,"0"));return function(){i(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,o="";return o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o}}()});function z0(i){return{asString:()=>iK(this,void 0,void 0,function*(){return i}),asFile:()=>{},value:typeof i=="string"?i:void 0}}function rK(i,e,t){let r={id:Sd(),name:i,uri:e,data:t};return{asString:()=>iK(this,void 0,void 0,function*(){return""}),asFile:()=>r,value:void 0}}function Kx(i){return i.toLowerCase()}function $x(i,e){return nK(Kx(i),e.map(Kx))}function nK(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[r,n,o]=t;return o==="*"?e.some(s=>s.startsWith(n+"/")):!1}var iK,sp,Zu,B0=N(()=>{pi();Qh();F0();iK=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};sp=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 Sn.some(this,([r,n])=>n.asFile())&&t.push("files"),nK(Kx(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 r=this._entries.get(e);r?r.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 r of t)yield[e,r]}toKey(e){return Kx(e)}};Zu=Object.freeze({create:i=>LP(i.map(e=>e.toString())).join(`\r +import{b as Cne}from"./chunk-JY7ZYBHV.js";import{a as Xh}from"./chunk-BZUL2CAN.js";import{$ as mi,$a as Ie,$b as Me,$c as IP,$d as qP,$e as rO,$f as AO,$g as Lre,$h as dF,$i as SF,$j as jF,$k as ey,$l as As,A as li,Aa as Qi,Ab as Vi,Ac as Ir,Ad as Y3,Ae as Fi,Af as fO,Ag as FO,Ah as pa,Ai as vl,Aj as Ni,Ak as QF,Al as vz,B as Je,Ba as qn,Bb as rf,Bc as CP,Bd as sf,Be as Si,Bf as f_,Bg as Km,Bh as tF,Bi as dk,Bj as U_,Bk as Xre,Bl as yu,C as D3,Ca as Lm,Cb as F3,Cc as sre,Cd as X3,Ce as Zt,Cf as pl,Cg as zO,Ch as vu,Ci as uk,Cj as xl,Ck,Cl as ya,D as j9,Da as sP,Db as pP,Dc as V3,Dd as Pt,De as Uc,Df as p_,Dg as BO,Dh as Jm,Di as vF,Dj as xf,Dk as Qre,Dl as lg,E as Jt,Ea as aP,Eb as z3,Ec as are,Ed as Br,Ee as Lo,Ef as pO,Eg as kre,Eh as Dre,Ei as _F,Ej as Vre,Ek as Z_,El as ane,F as W9,Fa as lP,Fb as B3,Fc as SP,Fd as e_,Fe as df,Ff as mO,Fg as v_,Fh as _f,Fi as yF,Fj as Cl,Fk as ZF,Fl as _z,G as V9,Ga as P3,Gb as Pc,Gc as lre,Gd as fre,Ge as fl,Gf as gO,Gg as Ere,Gh as Mi,Gi as N_,Gj as j_,Gk as JF,Gl as lne,H as q9,Ha as gi,Hb as mP,Hc as cl,Hd as Bc,He as l_,Hf as bO,Hg as $m,Hh as Ao,Hi as Lr,Hj as bk,Hk as Zre,Hl as cne,I as Ov,Ia as au,Ib as gP,Ic as kP,Id as pre,Ie as oa,If as Bm,Ig as ha,Ih as iF,Ii as hk,Ij as PF,Ik as Sk,Il as yz,J as Fv,Ja as ys,Jb as bP,Jc as Gv,Jd as Q3,Je as di,Jf as vO,Jg as HO,Jh as ma,Ji as ig,Jj as W_,Jk as kk,Jl as wz,K as M3,Ka as Te,Kb as vP,Kc as Yv,Kd as fu,Ke as eO,Kf as Hm,Kg as Es,Kh as gl,Ki as R_,Kj as vk,Kk as Ek,Kl as xz,L as Em,La as lu,Lb as Vv,Lc as Xv,Ld as t_,Le as c_,Lf as da,Lg as Gm,Lh as Vc,Li as ga,Lj as OF,Lk as Jre,Ll as Cz,M as K9,Ma as Le,Mb as _P,Mc as cre,Md as zP,Me as d_,Mf as ml,Mg as UO,Mh as qt,Mi as P_,Mj as qre,Mk as ez,Ml as dne,N as zt,Na as cP,Nb as qv,Nc as uu,Nd as i_,Ne as Dn,Nf as _O,Ng as jO,Nh as Ur,Ni as Gn,Nj as FF,Nk as tz,Nl as une,O as Ac,Oa as dn,Ob as H3,Oc as q3,Od as mre,Oe as tO,Of as gu,Og as WO,Oh as rF,Oi as O_,Oj as _k,Ok as iz,Ol as hne,P as $9,Pa as zr,Pb as Di,Pc as zc,Pd as F,Pe as Ut,Pf as yO,Pg as gf,Ph as k_,Pi as _u,Pj as zF,Pk as ene,Pl as fne,Q as Fr,Qa as dP,Qb as fe,Qc as dre,Qd as ei,Qe as iO,Qf as ek,Qg as VO,Qh as nF,Qi as wF,Qj as BF,Qk as J_,Ql as pne,R as Dc,Ra as Wv,Rb as ht,Rc as nf,Rd as af,Re as uf,Rf as wO,Rg as ok,Rh as oF,Ri as rn,Rj as Kre,Rk as rz,Rl as mne,S as kn,Sa as Bt,Sb as it,Sc as Nm,Sd as r_,Se as J3,Sf as xO,Sg as bf,Sh as Mre,Si as _l,Sj as nn,Sk as nz,Sl as gne,T as G9,Ta as sr,Tb as wt,Tc as EP,Td as BP,Te as $n,Tf as CO,Tg as hn,Th as sF,Ti as F_,Tj as yk,Tk as oz,Tl as bne,U as Mc,Ua as cu,Ub as yP,Uc as Rm,Ud as na,Ue as sa,Uf as SO,Ug as qO,Uh as aF,Ui as xF,Uj as va,Uk as tne,Ul as vne,V as zv,Va as Eo,Vb as ore,Vc as TP,Vd as lf,Ve as mu,Vf as kO,Vg as KO,Vh as lF,Vi as CF,Vj as rg,Vk as Tk,Vl as _ne,W as Tm,Wa as Ke,Wb as Zr,Wc as Pm,Wd as HP,We as jc,Wf as EO,Wg as $O,Wh as E_,Wi as Fre,Wj as Do,Wk as sz,Wl as yne,X as Y9,Xa as Xr,Xb as ll,Xc as ure,Xd as UP,Xe as ks,Xf as TO,Xg as Tre,Xh as cF,Xi as ar,Xj as wk,Xk as ine,Xl as wne,Y as Bv,Ya as Ht,Yb as To,Yc as Cs,Yd as jP,Ye as Fm,Yf as tk,Yg as GO,Yh as yf,Yi as Ls,Yj as HF,Yk as sg,Yl as xne,Z as X9,Za as si,Zb as U3,Zc as hu,Zd as WP,Ze as vt,Zf as IO,Zg as Ire,Zh as lk,Zi as ti,Zj as UF,Zk as Ik,Zl as wu,_ as En,_a as Tn,_b as wP,_c as Qv,_d as VP,_e as aa,_f as LO,_g as YO,_h as T_,_i as ba,_j as fn,_k as az,_l as wa,a as b,aa as sl,ab as ci,ac as xs,ad as K3,ae as pu,af as vre,ag as DO,ah as sk,ai as uF,aj as zre,ak as V_,al as Lk,am as Ds,b as He,ba as N3,bb as Li,bc as Xo,bd as un,be as ul,bf as nO,bg as MO,bh as vf,bi as Nre,bj as yl,bk as Sl,bl as Ak,c as ft,ca as nre,cb as Go,cc as Mm,cd as $3,ce as n_,cf as hf,cg as NO,ch as mt,ci as er,cj as fk,ck as WF,cl as Dk,d as Yt,da as Hv,db as xr,dc as ia,dd as LP,de as o_,df as _re,dg as RO,dh as Hr,di as es,dj as kF,dk as VF,dl as lz,e as $o,ea as Q9,eb as ta,ec as Qo,ed as qi,ee as KP,ef as oO,eg as PO,eh as __,ei as I_,ej as EF,ek as qF,el as cz,f as Mv,fa as Uv,fb as Yo,fc as Ci,fd as AP,fe as hl,ff as yre,fg as ua,fh as Are,fi as Rre,fj as pk,fk as _a,fl as dz,g as Co,ga as Z9,gb as ws,gc as Zi,gd as DP,ge as $P,gf as ff,gg as Um,gh as ak,gi as hF,gj as TF,gk as ng,gl as rne,h as km,ha as J9,hb as Am,hc as Ln,hd as Zv,he as gre,hf as wre,hg as jm,hh as XO,hi as Pre,hj as z_,hk as KF,hl as uz,i as Vt,ia as Zh,ib as Jh,ic as Oc,id as MP,ie as GP,if as sO,ig as Wm,ih as QO,ii as ck,ij as Kc,ik as q_,il as nne,j as Nv,ja as jv,jb as Rc,jc as Fc,jd as NP,je as bre,jf as xre,jg as Vm,jh as ZO,ji as Ore,jj as B_,jk as K_,jl as ty,k as B9,ka as eP,kb as pt,kc as Kv,kd as RP,ke as YP,kf as aO,kg as OO,kh as Ts,ki as bl,kj as IF,kk as $F,kl as hz,l as Sn,la as yt,lb as Qr,lc as $v,ld as PP,le as Z3,lf as Cre,lg as m_,lh as Ym,li as L_,lj as Bre,lk as xk,ll as ag,m as Qh,ma as Tr,mb as _t,mc as Oi,md as pi,me as s_,mf as lO,mg as pf,mh as JO,mi as fF,mj as H_,mk as $re,ml as fz,n as Rv,na as So,nb as In,nc as de,nd as OP,ne as XP,nf as Sre,ng as ik,nh as y_,ni as wf,nj as LF,nk as Cf,nl as Mk,o as Ui,oa as Im,ob as vi,oc as j3,od as hre,oe as An,of as la,og as qm,oh as fa,oi as A_,oj as AF,ok as og,ol as one,p as A3,pa as Vn,pb as At,pc as ra,pd as Jv,pe as QP,pf as je,pg as Mn,ph as w_,pi as D_,pj as DF,pk as $_,pl as pz,q as ii,qa as tP,qb as Wi,qc as Kn,qd as FP,qe as cf,qf as ze,qg as g_,qh as Xm,qi as pF,qj as MF,qk as G_,ql as sne,r as le,ra as Lt,rb as ef,rc as We,rd as Dt,re as ZP,rf as cO,rg as en,rh as Qm,ri as eg,rj as Hre,rk as Y_,rl as Sf,s as ce,sa as ko,sb as O3,sc as ee,sd as Cr,se as JP,sf as zm,sg as bu,sh as x_,si as mF,sj as mk,sk as GF,sl as Nk,t as ji,ta as iP,tb as uP,tc as W3,td as Ji,te as Om,tf as dO,tg as rk,th as eF,ti as Is,tj as wl,tk as X_,tl as iy,u as H9,ua as R3,ub as tf,uc as xP,ud as Zo,ue as Io,uf as Jo,ug as nk,uh as Wc,ui as tg,uj as gk,uk as YF,ul as mz,v as ke,va as rP,vb as al,vc as Ue,vd as Jr,ve as Ki,vf as ca,vg as gr,vh as C_,vi as gF,vj as NF,vk as Gre,vl as gz,w as Pv,wa as Nc,wb as hP,wc as lt,wd as dl,we as Hc,wf as u_,wg as ki,wh as Zm,wi as M_,wj as Ure,wk as XF,wl as Rk,x as U9,xa as Xt,xb as fP,xc as B,xd as mr,xe as a_,xf as h_,xg as mf,xh as Se,xi as bF,xj as jre,xk as Yre,xl as bz,y as pr,ya as nP,yb as du,yc as et,yd as G3,ye as Ss,yf as uO,yg as tn,yh as Rt,yi as qc,yj as RF,yk as kl,yl as Pk,z as ol,za as oP,zb as Dm,zc as Qe,zd as of,ze as st,zf as hO,zg as b_,zh as S_,zi as ts,zj as Wre,zk as Q_,zl as ry}from"./chunk-23JDWT7I.js";import{a as ue,b as xt,c as su,d as so,e as N,f as Xi,g as Gh,h as Wn,i as Yh,j as wr,k as z9}from"./chunk-EP6THQJ3.js";var AB=Xi((VSe,LB)=>{"use strict";var Ty=Object.prototype.hasOwnProperty,IB=Object.prototype.toString,xB=Object.defineProperty,CB=Object.getOwnPropertyDescriptor,SB=function(e){return typeof Array.isArray=="function"?Array.isArray(e):IB.call(e)==="[object Array]"},kB=function(e){if(!e||IB.call(e)!=="[object Object]")return!1;var t=Ty.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ty.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!r)return!1;var n;for(n in e);return typeof n=="undefined"||Ty.call(e,n)},EB=function(e,t){xB&&t.name==="__proto__"?xB(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},TB=function(e,t){if(t==="__proto__")if(Ty.call(e,t)){if(CB)return CB(e,t).value}else return;return e[t]};LB.exports=function i(){var e,t,r,n,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<c;++l)if(e=arguments[l],e!=null)for(t in e)r=TB(a,t),n=TB(e,t),a!==n&&(d&&n&&(kB(n)||(o=SB(n)))?(o?(o=!1,s=r&&SB(r)?r:[]):s=r&&kB(r)?r:{},EB(a,{name:t,newValue:i(d,s,n)})):typeof n!="undefined"&&EB(a,{name:t,newValue:n}));return a}});var dq=N(()=>{});var uq=N(()=>{dq()});var Bme,Hme,bx,dT,vx,Yl,uT,hT,fT,pT,mT=N(()=>{Eo();Ss();sl();uq();lt();Ir();ei();He();wt();Bme=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Hme=function(i,e){return function(t,r){e(t,r,i)}},bx=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},vx=new ht("selectionAnchorSet",!1),Yl=dT=class{static get(e){return e.getContribution(dT.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=vx.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(Qe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Ki().appendText(b("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),sr(b("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(Qe.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()}};Yl.ID="editor.contrib.selectionAnchorController";Yl=dT=Bme([Hme(1,it)],Yl);uT=class extends de{constructor(){super({id:"editor.action.setSelectionAnchor",label:b("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2080),weight:100}})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.setSelectionAnchor()})}},hT=class extends de{constructor(){super({id:"editor.action.goToSelectionAnchor",label:b("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:vx})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.goToSelectionAnchor()})}},fT=class extends de{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:b("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:vx,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2089),weight:100}})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.selectFromAnchorToCursor()})}},pT=class extends de{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:b("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:vx,kbOpts:{kbExpr:F.editorTextFocus,primary:9,weight:100}})}run(e,t){var r;return bx(this,void 0,void 0,function*(){(r=Yl.get(t))===null||r===void 0||r.cancelSelectionAnchor()})}};Ue(Yl.ID,Yl,4);ee(uT);ee(hT);ee(fT);ee(pT)});var hq=N(()=>{});var fq=N(()=>{hq()});var Ume,gT,bT,vT,_T,Fa,yT=N(()=>{Ut();ke();fq();lt();ci();et();Ir();ei();jc();Hr();He();Zi();en();tn();Ume=je("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},b("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),gT=class extends de{constructor(){super({id:"editor.action.jumpToBracket",label:b("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:3165,weight:100}})}run(e,t){var r;(r=Fa.get(t))===null||r===void 0||r.jumpToBracket()}},bT=class extends de{constructor(){super({id:"editor.action.selectToBracket",label:b("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,r){var n;let o=!0;r&&r.selectBrackets===!1&&(o=!1),(n=Fa.get(t))===null||n===void 0||n.selectToBracket(o)}},vT=class extends de{constructor(){super({id:"editor.action.removeBrackets",label:b("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2561,weight:100}})}run(e,t){var r;(r=Fa.get(t))===null||r===void 0||r.removeBrackets(this.id)}},_T=class{constructor(e,t,r){this.position=e,this.brackets=t,this.options=r}},Fa=class i extends ce{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 di(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(70),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(70)&&(this._matchBrackets=this._editor.getOption(70),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(r=>{let n=r.getStartPosition(),o=e.bracketPairs.matchBracket(n),s=null;if(o)o[0].containsPosition(n)&&!o[1].containsPosition(n)?s=o[1].getStartPosition():o[1].containsPosition(n)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(n);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(n);l&&l.range&&(s=l.range.getStartPosition())}}return s?new Qe(s.lineNumber,s.column,s.lineNumber,s.column):new Qe(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),r=[];this._editor.getSelections().forEach(n=>{let o=n.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(B.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&&r.push(new Qe(a.lineNumber,a.column,l.lineNumber,l.column))}),r.length>0&&(this._editor.setSelections(r),this._editor.revealRange(r[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(r=>{let n=r.getPosition(),o=t.bracketPairs.matchBracket(n);o||(o=t.bracketPairs.findEnclosingBrackets(n)),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 r of this._lastBracketsData){let n=r.brackets;n&&(e[t++]={range:n[0],options:r.options},e[t++]={range:n[1],options:r.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(),r=t.getVersionId(),n=[];this._lastVersionId===r&&(n=this._lastBracketsData);let o=[],s=0;for(let u=0,h=e.length;u<h;u++){let f=e[u];f.isEmpty()&&(o[s++]=f.getStartPosition())}o.length>1&&o.sort(Ie.compare);let a=[],l=0,c=0,d=n.length;for(let u=0,h=o.length;u<h;u++){let f=o[u];for(;c<d&&n[c].position.isBefore(f);)c++;if(c<d&&n[c].position.equals(f))a[l++]=n[c];else{let m=t.bracketPairs.matchBracket(f,20),g=i._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!m&&this._matchBrackets==="always"&&(m=t.bracketPairs.findEnclosingBrackets(f,20),g=i._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new _T(f,m,g)}}this._lastBracketsData=a,this._lastVersionId=r}};Fa.ID="editor.contrib.bracketMatchingController";Fa._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=mt.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ki(Ume),position:$n.Center}});Fa._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=mt.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});Ue(Fa.ID,Fa,1);ee(bT);ee(gT);ee(vT);Xo.appendMenuItem(Me.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:b({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})});var _x,pq=N(()=>{et();Ir();_x=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 r=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(r)))if(this._isMovingLeft){let s=new B(r,n-1,r,n),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new B(r,o,r,o),a)}else{let s=new B(r,o,r,o+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new B(r,n,r,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new Qe(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Qe(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}});var yx,wT,xT,CT=N(()=>{lt();ei();pq();He();yx=class extends de{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let r=[],n=t.getSelections();for(let o of n)r.push(new _x(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}},wT=class extends yx{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:b("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:F.writable})}},xT=class extends yx{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:b("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:F.writable})}};ee(wT);ee(xT)});var ST,kT=N(()=>{lt();Yv();cre();et();ei();He();ST=class extends de{constructor(){super({id:"editor.action.transposeLetters",label:b("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let r=t.getModel(),n=[],o=t.getSelections();for(let s of o){if(!s.isEmpty())continue;let a=s.startLineNumber,l=s.startColumn,c=r.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let d=l===c?s.getPosition():Xv.rightPosition(r,s.getPosition().lineNumber,s.getPosition().column),u=Xv.leftPosition(r,d),h=Xv.leftPosition(r,u),f=r.getValueInRange(B.fromPositions(h,u)),m=r.getValueInRange(B.fromPositions(u,d)),g=B.fromPositions(h,d);n.push(new cl(g,m+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}};ee(ST)});function IT(i){return i.register(),i}function gq(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,r)=>{let n=t.get(si).getFocusedCodeEditor();if(n&&n.hasTextFocus()){let o=n.getOption(36),s=n.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,r)=>(document.execCommand(e),!0)))}var jme,Wu,Wme,mq,Vme,qme,Kme,ET,TT,LT=N(()=>{q9();En();ZO();lt();Tn();ei();He();Zi();Ym();wt();jme=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Wu="9_cutcopypaste",Wme=Mc||document.queryCommandSupported("cut"),mq=Mc||document.queryCommandSupported("copy"),Vme=typeof navigator.clipboard=="undefined"||V9?document.queryCommandSupported("paste"):!0;qme=Wme?IT(new $v({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Mc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Me.EditorContext,group:Wu,title:b("actions.clipboard.cutLabel","Cut"),when:F.writable,order:1},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Me.SimpleEditorContext,group:Wu,title:b("actions.clipboard.cutLabel","Cut"),when:F.writable,order:1}]})):void 0,Kme=mq?IT(new $v({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Mc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Me.EditorContext,group:Wu,title:b("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Me.SimpleEditorContext,group:Wu,title:b("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Xo.appendMenuItem(Me.MenubarEditMenu,{submenu:Me.MenubarCopy,title:{value:b("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Xo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextCopy,title:{value:b("copy as","Copy As"),original:"Copy As"},group:Wu,order:3});Xo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1,when:fe.and(fe.notEquals("resourceScheme","output"),F.editorTextFocus)});Xo.appendMenuItem(Me.EditorTitleContext,{submenu:Me.EditorTitleContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1});Xo.appendMenuItem(Me.ExplorerContext,{submenu:Me.ExplorerContextShare,title:{value:b("share","Share"),original:"Share"},group:"11_share",order:-1});ET=Vme?IT(new $v({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Mc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Me.MenubarEditMenu,group:"2_ccp",title:b({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Me.EditorContext,group:Wu,title:b("actions.clipboard.pasteLabel","Paste"),when:F.writable,order:4},{menuId:Me.CommandPalette,group:"",title:b("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Me.SimpleEditorContext,group:Wu,title:b("actions.clipboard.pasteLabel","Paste"),when:F.writable,order:4}]})):void 0,TT=class extends de{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:b("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(36)&&t.getSelection().isEmpty()||(ak.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),ak.forceCopyWithSyntaxHighlighting=!1)}};gq(qme,"cut");gq(Kme,"copy");ET&&(ET.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(si),r=i.get(Ts),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&zv?(()=>jme(void 0,void 0,void 0,function*(){let s=yield r.readText();if(s!==""){let a=XO.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=n.getOption(36)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),n.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),ET.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));mq&&ee(TT)});function bq(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>_q(e,t,i.include))||!i.includeSourceActions&&nt.Source.contains(e))}function vq(i,e){let t=e.kind?new nt(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(r=>_q(t,r,i.include))||!i.includeSourceActions&&t&&nt.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function _q(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var $me,nt,Wr,yd,wx,wd=N(()=>{Vt();$me=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},nt=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)}};nt.sep=".";nt.None=new nt("@@none@@");nt.Empty=new nt("");nt.QuickFix=new nt("quickfix");nt.Refactor=new nt("refactor");nt.RefactorExtract=nt.Refactor.append("extract");nt.RefactorInline=nt.Refactor.append("inline");nt.RefactorMove=nt.Refactor.append("move");nt.RefactorRewrite=nt.Refactor.append("rewrite");nt.Source=new nt("source");nt.SourceOrganizeImports=nt.Source.append("organizeImports");nt.SourceFixAll=nt.Source.append("fixAll");nt.SurroundWith=nt.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"})(Wr||(Wr={}));yd=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 nt(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,r){this.kind=e,this.apply=t,this.preferred=r}},wx=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return $me(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let r;try{r=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Yt(n)}r&&(this.action.edit=r.edit)}return this})}}});function E0(i,e,t,r,n,o){var s;return xx(this,void 0,void 0,function*(){let a=r.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:r.type},c=new tF(e,o),d=Gme(i,e,a),u=new le,h=d.map(m=>xx(this,void 0,void 0,function*(){try{n.report(m);let g=yield m.provideCodeActions(e,t,l,c.token);if(g&&u.add(g),c.token.isCancellationRequested)return yq;let w=((g==null?void 0:g.actions)||[]).filter(E=>E&&vq(a,E)),_=Xme(m,w,a.include);return{actions:w.map(E=>new wx(E,m)),documentation:_}}catch(g){if($o(g))throw g;return Yt(g),yq}})),f=i.onDidChange(()=>{let m=i.all(e);Cs(m,d)||c.cancel()});try{let m=yield Promise.all(h),g=m.map(_=>_.actions).flat(),w=[...un(m.map(_=>_.documentation)),...Yme(i,e,r,g)];return new AT(g,w,u)}finally{f.dispose(),c.dispose()}})}function Gme(i,e,t){return i.all(e).filter(r=>r.providedCodeActionKinds?r.providedCodeActionKinds.some(n=>bq(t,new nt(n))):!0)}function*Yme(i,e,t,r){var n,o,s;if(e&&r.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*z9((n=a._getAdditionalMenuItems)===null||n===void 0?void 0:n.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},r.map(l=>l.action))))}function Xme(i,e,t){if(!i.documentation)return;let r=i.documentation.map(n=>({kind:new nt(n.kind),command:n.command}));if(t){let n;for(let o of r)o.kind.contains(t)&&(n?n.kind.contains(o.kind)&&(n=o):n=o);if(n)return n==null?void 0:n.command}for(let n of e)if(n.kind){for(let o of r)if(o.kind.contains(new nt(n.kind)))return o.command}}function wq(i,e,t,r,n=st.None){var o;return xx(this,void 0,void 0,function*(){let s=i.get(Wc),a=i.get(vi),l=i.get(Ln),c=i.get(Mi);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(n),!n.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:r==null?void 0:r.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==C0.OnSave,showPreview:r==null?void 0:r.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let u=Qme(d);c.error(typeof u=="string"?u:b("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Qme(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}var xx,Cx,Jf,Sx,kx,Ex,S0,k0,AT,yq,C0,Vu=N(()=>{pi();Si();Vt();ke();Tr();Zm();et();Ir();Rt();Go();vu();He();Wi();Ao();Vc();Oc();wd();xx=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Cx="editor.action.codeAction",Jf="editor.action.quickFix",Sx="editor.action.autoFix",kx="editor.action.refactor",Ex="editor.action.sourceAction",S0="editor.action.organizeImports",k0="editor.action.fixAll",AT=class i extends ce{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return qi(e.diagnostics)?qi(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:qi(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,r){super(),this.documentation=t,this._register(r),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&nt.QuickFix.contains(new nt(e.kind))&&!!e.isPreferred)}},yq={actions:[],documentation:void 0};(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(C0||(C0={}));At.registerCommand("_executeCodeActionProvider",function(i,e,t,r,n){return xx(this,void 0,void 0,function*(){if(!(e instanceof yt))throw Co();let{codeActionProvider:o}=i.get(Se),s=i.get(Li).getModel(e);if(!s)throw Co();let a=Qe.isISelection(t)?Qe.liftSelection(t):B.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Co();let l=typeof r=="string"?new nt(r):void 0,c=yield E0(o,s,a,{type:1,triggerAction:Wr.Default,filter:{includeSourceActions:!0,include:l}},ma.None,st.None),d=[],u=Math.min(c.validActions.length,typeof n=="number"?n:0);for(let h=0;h<u;h++)d.push(c.validActions[h].resolve(st.None));try{return yield Promise.all(d),c.validActions.map(h=>h.action)}finally{setTimeout(()=>c.dispose(),100)}})})});var Zme,Jme,DT,T0,xq=N(()=>{O3();Vu();wd();Ur();Zme=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Jme=function(i,e){return function(t,r){e(t,r,i)}},T0=DT=class{constructor(e){this.keybindingService=e}getResolver(){let e=new ef(()=>this.keybindingService.getKeybindings().filter(t=>DT.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let r=t.commandArgs;return t.command===S0?r={kind:nt.SourceOrganizeImports.value}:t.command===k0&&(r={kind:nt.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},yd.fromUser(r,{kind:nt.None,apply:"never"}))}));return t=>{if(t.kind){let r=this.bestKeybindingForCodeAction(t,e.value);return r==null?void 0:r.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let r=new nt(e.kind);return t.filter(n=>n.kind.contains(r)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,o)=>n?n.kind.contains(o.kind)?o:n:o,void 0)}};T0.codeActionCommands=[kx,Cx,Ex,S0,k0];T0=DT=Zme([Jme(0,qt)],T0)});var Cq=N(()=>{});var Sq=N(()=>{Cq()});var kq=N(()=>{});var Eq=N(()=>{kq()});var I0=N(()=>{Sq();Eq()});var Tq=N(()=>{});var Iq=N(()=>{Tq()});var tOe,iOe,rOe,nOe,oOe,sOe,aOe,lOe,cOe,dOe,uOe,hOe,fOe,pOe,mOe,gOe,bOe,vOe,_Oe,yOe,wOe,xOe,COe,SOe,kOe,EOe,TOe,IOe,LOe,AOe,DOe,MOe,NOe,Tx=N(()=>{Iq();He();en();tOe=je("symbolIcon.arrayForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),iOe=je("symbolIcon.booleanForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rOe=je("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),nOe=je("symbolIcon.colorForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oOe=je("symbolIcon.constantForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sOe=je("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),aOe=je("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lOe=je("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),cOe=je("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},b("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),dOe=je("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),uOe=je("symbolIcon.fileForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),hOe=je("symbolIcon.folderForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fOe=je("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pOe=je("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mOe=je("symbolIcon.keyForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gOe=je("symbolIcon.keywordForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bOe=je("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},b("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vOe=je("symbolIcon.moduleForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_Oe=je("symbolIcon.namespaceForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yOe=je("symbolIcon.nullForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wOe=je("symbolIcon.numberForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xOe=je("symbolIcon.objectForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),COe=je("symbolIcon.operatorForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),SOe=je("symbolIcon.packageForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kOe=je("symbolIcon.propertyForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),EOe=je("symbolIcon.referenceForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),TOe=je("symbolIcon.snippetForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),IOe=je("symbolIcon.stringForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),LOe=je("symbolIcon.structForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),AOe=je("symbolIcon.textForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),DOe=je("symbolIcon.typeParameterForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),MOe=je("symbolIcon.unitForeground",{dark:ze,light:ze,hcDark:ze,hcLight:ze},b("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),NOe=je("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},b("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))});function Aq(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:Lq,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let r=ege.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new nt(o.action.kind):nt.None;for(let a of r)if(a.group.kind.contains(s)){a.actions.push(o);break}}let n=[];for(let o of r)if(o.actions.length){n.push({kind:"header",group:o.group});for(let s of o.actions)n.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return n}var Lq,ege,Dq=N(()=>{I0();Qr();wd();Tx();He();Lq=Object.freeze({kind:nt.Empty,title:b("codeAction.widget.id.more","More Actions...")}),ege=Object.freeze([{kind:nt.QuickFix,title:b("codeAction.widget.id.quickfix","Quick Fix")},{kind:nt.RefactorExtract,title:b("codeAction.widget.id.extract","Extract"),icon:pt.wrench},{kind:nt.RefactorInline,title:b("codeAction.widget.id.inline","Inline"),icon:pt.wrench},{kind:nt.RefactorRewrite,title:b("codeAction.widget.id.convert","Rewrite"),icon:pt.wrench},{kind:nt.RefactorMove,title:b("codeAction.widget.id.move","Move"),icon:pt.wrench},{kind:nt.SurroundWith,title:b("codeAction.widget.id.surround","Surround With"),icon:pt.symbolSnippet},{kind:nt.Source,title:b("codeAction.widget.id.source","Source Action"),icon:pt.symbolFile},Lq])});var Mq=N(()=>{});var Nq=N(()=>{Mq()});var tge,ige,MT,ep,Xl,NT=N(()=>{Bt();nF();Qr();Jt();ke();In();Nq();zO();Vu();He();Ur();tge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ige=function(i,e){return function(t,r){e(t,r,i)}};(function(i){i.Hidden={type:0};class e{constructor(r,n,o,s){this.actions=r,this.trigger=n,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(ep||(ep={}));Xl=MT=class extends ce{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Je),this.onClick=this._onClick.event,this._state=ep.Hidden,this._domNode=Le("div.lightBulbWidget"),this._register(k_.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(r=>{let n=this._editor.getModel();(this.state.type!==1||!n||this.state.editorPosition.lineNumber>=n.getLineCount())&&this.hide()})),this._register(iP(this._domNode,r=>{if(this.state.type!==1)return;this._editor.focus(),r.preventDefault();let{top:n,height:o}=Qi(this._domNode),s=this._editor.getOption(65),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(a+=s),this._onClick.fire({x:r.posx,y:n+o+a,actions:this.state.actions,trigger:this.state.trigger})})),this._register(Lt(this._domNode,"mouseenter",r=>{(r.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(63)&&!this._editor.getOption(63).enabled&&this.hide()})),this._register(li.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var r,n,o,s;this._preferredKbLabel=(n=(r=t.lookupKeybinding(Sx))===null||r===void 0?void 0:r.getLabel())!==null&&n!==void 0?n:void 0,this._quickFixKbLabel=(s=(o=t.lookupKeybinding(Jf))===null||o===void 0?void 0:o.getLabel())!==null&&s!==void 0?s:void 0,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,r){if(e.validActions.length<=0)return this.hide();let n=this._editor.getOptions();if(!n.get(63).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(r),l=o.getOptions().tabSize,c=n.get(49),d=o.getLineContent(s),u=Km(d,l),h=c.spaceWidth*u>22,f=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1),m=s;if(!h){if(s>1&&!f(s-1))m-=1;else if(!f(s+1))m+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new ep.Showing(e,t,r,{position:{lineNumber:m,column:1},preference:MT._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==ep.Hidden&&(this.state=ep.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(..._t.asClassNameArray(pt.lightBulb)),this._domNode.classList.add(..._t.asClassNameArray(pt.lightbulbAutofix)),this._preferredKbLabel)){this.title=b("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(..._t.asClassNameArray(pt.lightbulbAutofix)),this._domNode.classList.add(..._t.asClassNameArray(pt.lightBulb)),this._quickFixKbLabel?this.title=b("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=b("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Xl.ID="editor.contrib.lightbulbWidget";Xl._posPref=[0];Xl=MT=tge([ige(1,qt)],Xl)});var Rq=N(()=>{});var Pq=N(()=>{Rq()});var Oq=N(()=>{});var Fq=N(()=>{Oq()});function PT(i,e,t){return Bq(this,void 0,void 0,function*(){try{return yield i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:nge(t)})}catch(r){return ft(r),!1}})}function nge(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}var rge,zq,Bq,RT,eo,xd=N(()=>{cF();lk();Vt();Jt();ke();Fq();dF();Zo();X3();Nre();es();rge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},zq=function(i,e){return function(t,r){e(t,r,i)}},Bq=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},eo=RT=class{constructor(e,t,r){this._options=e,this._languageService=t,this._openerService=r,this._onDidRenderAsync=new Je,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,r){if(!e)return{element:document.createElement("span"),dispose:()=>{}};let n=new le,o=n.add(E_(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),r));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(r,n)=>Bq(this,void 0,void 0,function*(){var o,s,a;let l;r?l=this._languageService.getLanguageIdByLanguageName(r):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=sf);let c=yield uF(this._languageService,n,l),d=document.createElement("span");if(d.innerHTML=(a=(s=RT._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(49);T_(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:r=>PT(this._openerService,r,e.isTrusted),disposables:t}}}};eo._ttpTokenizer=yf("tokenizeToString",{createHTML(i){return i}});eo=RT=rge([zq(1,Ji),zq(2,er)],eo)});var oge,Hq,Ix,Vr,sge,Lx,L0=N(()=>{cF();Eo();Jt();Ss();ke();Pq();lt();et();xd();He();wt();es();Bt();oge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Hq=function(i,e){return function(t,r){e(t,r,i)}},Vr=Ix=class{static get(e){return e.getContribution(Ix.ID)}constructor(e,t,r){this._openerService=r,this._messageWidget=new ji,this._messageListeners=new le,this._mouseOverMessage=!1,this._editor=e,this._visible=Ix.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){sr(a_(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=a_(e)?E_(e,{actionHandler:{callback:n=>PT(this._openerService,n,a_(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new Lx(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(li.debounce(this._editor.onDidBlurEditorText,(n,o)=>o,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&sP(document.activeElement,this._messageWidget.value.getDomNode())||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(Lt(this._messageWidget.value.getDomNode(),gi.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(Lt(this._messageWidget.value.getDomNode(),gi.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let r;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(r?r.containsPosition(n.target.position)||this.closeMessage():r=new B(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Lx.fadeOut(this._messageWidget.value))}};Vr.ID="editor.contrib.messageController";Vr.MESSAGE_VISIBLE=new ht("messageVisible",!1,b("messageVisible","Whether the editor is currently showing an inline message"));Vr=Ix=oge([Hq(1,it),Hq(2,er)],Vr);sge=Oi.bindToContribution(Vr.get);We(new sge({id:"leaveEditorMessage",precondition:Vr.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));Lx=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(r),e.getDomNode().removeEventListener("animationend",t)},r=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:r},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:r},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");typeof n=="string"?(s.classList.add("message"),s.textContent=n):(n.classList.add("message"),s.appendChild(n)),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)}};Ue(Vr.ID,Vr,4)});var Uq=N(()=>{});var OT=N(()=>{Uq()});function age(i){if(i.kind==="action")return i.label}function Wq(i){return i.replace(/\r\n|\r|\n/g," ")}var jq,FT,UT,jT,zT,BT,HT,Ax,Dx,Vq=N(()=>{Bt();bF();pF();Qr();ke();En();In();OT();He();vl();Ur();N_();en();jq=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},FT=function(i,e){return function(t,r){e(t,r,i)}},UT="acceptSelectedCodeAction",jT="previewSelectedCodeAction",zT=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,r){var n,o;r.text.textContent=(o=(n=e.group)===null||n===void 0?void 0:n.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},BT=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 r=document.createElement("span");r.className="title",e.append(r);let n=new M_(e,Bv);return{container:e,icon:t,text:r,keybinding:n}}renderElement(e,t,r){var n,o,s;if(!((n=e.group)===null||n===void 0)&&n.icon?(r.icon.className=_t.asClassName(e.group.icon),e.group.icon.color&&(r.icon.style.color=la(e.group.icon.color.id))):(r.icon.className=_t.asClassName(pt.lightBulb),r.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;r.text.textContent=Wq(e.label),r.keybinding.set(e.keybinding),cP(!!e.keybinding,r.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(UT))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(jT))===null||s===void 0?void 0:s.getLabel();r.container.classList.toggle("option-disabled",e.disabled),e.disabled?r.container.title=e.label:a&&l?this._supportsPreview?r.container.title=b({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):r.container.title=b({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):r.container.title=""}disposeTemplate(e){}};BT=jq([FT(1,qt)],BT);HT=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Ax=class extends UIEvent{constructor(){super("previewSelectedAction")}};Dx=class extends ce{constructor(e,t,r,n,o,s){super(),this._delegate=n,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 D_(e,this.domNode,a,[new BT(t,this._keybindingService),new zT],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:age},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?Wq(l==null?void 0:l.label):"";return l.disabled&&(c=b({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>b({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(_F),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=r,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,n=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);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(n,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 r=t[0],n=this._list.element(r);if(!this.focusCondition(n))return;let o=e?new Ax:new HT;this._list.setSelection([r],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 Ax):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([])}};Dx=jq([FT(4,qc),FT(5,qt)],Dx)});var lge,WT,qu,Cd,Ku,A0,qq=N(()=>{Bt();tg();ke();OT();He();Vq();Zi();wt();vl();dl();Ht();en();lge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},WT=function(i,e){return function(t,r){e(t,r,i)}};je("actionBar.toggledBackground",{dark:pl,light:pl,hcDark:pl,hcLight:pl},b("actionBar.toggledBackground","Background color for toggled action items in action bar."));qu={Visible:new ht("codeActionMenuVisible",!1,b("codeActionMenuVisible","Whether the action widget list is visible"))},Cd=Xr("actionWidgetService"),Ku=class extends ce{get isVisible(){return qu.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,r){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=r,this._list=this._register(new ji)}show(e,t,r,n,o,s,a){let l=qu.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Dx,e,t,r,n);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,r){var n;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 le,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(Lt(l,gi.MOUSE_DOWN,m=>m.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(Lt(d,gi.POINTER_MOVE,()=>d.remove())),s.add(Lt(d,gi.MOUSE_DOWN,()=>d.remove()));let u=0;if(r.length){let m=this._createActionBar(".action-widget-action-bar",r);m&&(o.appendChild(m.getContainer().parentElement),s.add(m),u=m.getContainer().offsetWidth)}let h=(n=this._list.value)===null||n===void 0?void 0:n.layout(u);o.style.width=`${h}px`;let f=s.add(ys(e));return s.add(f.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let r=Le(e),n=new Is(r);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};Ku=lge([WT(0,qc),WT(1,it),WT(2,Ke)],Ku);Jr(Cd,Ku,1);A0=100+1e3;Ci(class extends Qo{constructor(){super({id:"hideCodeActionWidget",title:{value:b("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:qu.Visible,keybinding:{weight:A0,primary:9,secondary:[1033]}})}run(i){i.get(Cd).hide()}});Ci(class extends Qo{constructor(){super({id:"selectPrevCodeAction",title:{value:b("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:qu.Visible,keybinding:{weight:A0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.focusPrevious()}});Ci(class extends Qo{constructor(){super({id:"selectNextCodeAction",title:{value:b("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:qu.Visible,keybinding:{weight:A0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.focusNext()}});Ci(class extends Qo{constructor(){super({id:UT,title:{value:b("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:qu.Visible,keybinding:{weight:A0,primary:3,secondary:[2137]}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.acceptSelected()}});Ci(class extends Qo{constructor(){super({id:jT,title:{value:b("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:qu.Visible,keybinding:{weight:A0,primary:2051}})}run(i){let e=i.get(Cd);e instanceof Ku&&e.acceptSelected(!0)}})});var qT,VT,$u,cge,Mx,KT=N(()=>{Ut();Vt();Jt();ke();Io();wt();Vc();wd();Vu();qT=new ht("supportedCodeAction",""),VT=class extends ce{constructor(e,t,r,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=r,this._delay=n,this._autoTriggerTimer=this._register(new oa),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(r=>s_(r,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Wr.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),r=this._editor.getSelection();if(r.isEmpty()&&e.type===2){let{lineNumber:n,column:o}=r.getPosition(),s=t.getLineContent(n);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(n)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return r}};(function(i){i.Empty={type:0};class e{constructor(r,n,o){this.trigger=r,this.position=n,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if($o(s))return cge;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})($u||($u={}));cge=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),Mx=class extends ce{constructor(e,t,r,n,o){super(),this._editor=e,this._registry=t,this._markerService=r,this._progressService=o,this._codeActionOracle=this._register(new ji),this._state=$u.Empty,this._onDidChangeState=this._register(new Je),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=qT.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState($u.Empty,!0))}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState($u.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(89)){let t=this._registry.all(e).flatMap(r=>{var n;return(n=r.providedCodeActionKinds)!==null&&n!==void 0?n:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new VT(this._editor,this._markerService,r=>{var n;if(!r){this.setState($u.Empty);return}let o=Zt(s=>E0(this._registry,e,r.selection,r.trigger,ma.None,s));r.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(o,250)),this.setState(new $u.Triggered(r.trigger,r.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Wr.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&&!this._disposed&&this._onDidChangeState.fire(e))}}});var dge,Ql,Nx,$T,za,Rx=N(()=>{Bt();Vt();O3();ke();ci();Rt();Vu();xq();Dq();NT();L0();He();qq();Wi();Cr();wt();Ht();R_();Vc();wd();KT();dge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ql=function(i,e){return function(t,r){e(t,r,i)}},Nx=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},za=$T=class extends ce{static get(e){return e.getContribution($T.ID)}constructor(e,t,r,n,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new ji),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new Mx(this._editor,o.codeActionProvider,t,r,s)),this._register(this._model.onDidChangeState(u=>this.update(u))),this._lightBulbWidget=new ef(()=>{let u=this._editor.getContribution(Xl.ID);return u&&this._register(u.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),u}),this._resolver=n.createInstance(T0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,r){return this.showCodeActionList(t,r,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,r,n){var o;if(!this._editor.hasModel())return;(o=Vr.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:r,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,r){return Nx(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(wq,e,C0.FromCodeActions,{preview:r,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Wr.QuickFix,filter:{}})}})}update(e){var t,r,n,o,s,a,l;return Nx(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){ft(d);return}if(!this._disposed)if((r=this._lightBulbWidget.value)===null||r===void 0||r.update(c,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.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=Vr.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=Vr.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:r})=>r.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,r){return Nx(this,void 0,void 0,function*(){let n=this._editor.getDomNode();if(!n)return;let o=r.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=Ie.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>Nx(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,Aq(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,n,this._getActionBarActions(e,t,r))})}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),r=Qi(this._editor.getDomNode()),n=r.left+t.left,o=r.top+t.top+t.height;return{x:n,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,r){if(r.fromLightbulb)return[];let n=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 r.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:b("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,r))}:{id:"showMoreActions",label:b("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,r))}),n}};za.ID="editor.contrib.codeActionController";za=$T=dge([Ql(1,ig),Ql(2,it),Ql(3,Ke),Ql(4,Se),Ql(5,gl),Ql(6,vi),Ql(7,Dt),Ql(8,Cd),Ql(9,Ke)],za)});function D0(i){return fe.regex(qT.keys()[0],new RegExp("(\\s|^)"+al(i.value)+"\\b"))}function Gu(i,e,t,r,n=Wr.Default){if(i.hasModel()){let o=za.get(i);o==null||o.manualTriggerAtCurrentPosition(e,n,t,r)}}var GT,Px,Ox,Fx,zx,Bx,Hx,Ux,Kq=N(()=>{Di();lt();ei();Vu();He();wt();wd();Rx();KT();GT={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:b("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:b("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[b("args.schema.apply.first","Always apply the first returned code action."),b("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),b("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:b("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};Px=class extends de{constructor(){super({id:Jf,label:b("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),kbOpts:{kbExpr:F.textInputFocus,primary:2137,weight:100}})}run(e,t){return Gu(t,b("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Wr.QuickFix)}},Ox=class extends Oi{constructor(){super({id:Cx,precondition:fe.and(F.writable,F.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:GT}]}})}runEditorCommand(e,t,r){let n=yd.fromUser(r,{kind:nt.Empty,apply:"ifSingle"});return Gu(t,typeof(r==null?void 0:r.kind)=="string"?n.preferred?b("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",r.kind):b("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",r.kind):n.preferred?b("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):b("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}},Fx=class extends de{constructor(){super({id:kx,label:b("refactor.label","Refactor..."),alias:"Refactor...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),kbOpts:{kbExpr:F.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:fe.and(F.writable,D0(nt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:GT}]}})}run(e,t,r){let n=yd.fromUser(r,{kind:nt.Refactor,apply:"never"});return Gu(t,typeof(r==null?void 0:r.kind)=="string"?n.preferred?b("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",r.kind):b("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",r.kind):n.preferred?b("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):b("editor.action.refactor.noneMessage","No refactorings available"),{include:nt.Refactor.contains(n.kind)?n.kind:nt.None,onlyIncludePreferredActions:n.preferred},n.apply,Wr.Refactor)}},zx=class extends de{constructor(){super({id:Ex,label:b("source.label","Source Action..."),alias:"Source Action...",precondition:fe.and(F.writable,F.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:fe.and(F.writable,D0(nt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:GT}]}})}run(e,t,r){let n=yd.fromUser(r,{kind:nt.Source,apply:"never"});return Gu(t,typeof(r==null?void 0:r.kind)=="string"?n.preferred?b("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",r.kind):b("editor.action.source.noneMessage.kind","No source actions for '{0}' available",r.kind):n.preferred?b("editor.action.source.noneMessage.preferred","No preferred source actions available"):b("editor.action.source.noneMessage","No source actions available"),{include:nt.Source.contains(n.kind)?n.kind:nt.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,Wr.SourceAction)}},Bx=class extends de{constructor(){super({id:S0,label:b("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:fe.and(F.writable,D0(nt.SourceOrganizeImports)),kbOpts:{kbExpr:F.textInputFocus,primary:1581,weight:100}})}run(e,t){return Gu(t,b("editor.action.organize.noneMessage","No organize imports action available"),{include:nt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Wr.OrganizeImports)}},Hx=class extends de{constructor(){super({id:k0,label:b("fixAll.label","Fix All"),alias:"Fix All",precondition:fe.and(F.writable,D0(nt.SourceFixAll))})}run(e,t){return Gu(t,b("fixAll.noneMessage","No fix all action available"),{include:nt.SourceFixAll,includeSourceActions:!0},"ifSingle",Wr.FixAll)}},Ux=class extends de{constructor(){super({id:Sx,label:b("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:fe.and(F.writable,D0(nt.QuickFix)),kbOpts:{kbExpr:F.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Gu(t,b("editor.action.autoFix.noneMessage","No auto fixes available"),{include:nt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Wr.AutoFix)}}});var YT=N(()=>{lt();eF();Kq();Rx();NT();He();Y3();ll();Ue(za.ID,za,3);Ue(Xl.ID,Xl,4);ee(Px);ee(Fx);ee(zx);ee(Bx);ee(Ux);ee(Hx);We(new Ox);Zr.as(of.Configuration).registerConfiguration(Object.assign(Object.assign({},x_),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:b("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}))});function XT(i,e,t){return $q(this,void 0,void 0,function*(){let r=i.ordered(e),n=new Map,o=new tp,s=r.map((a,l)=>$q(this,void 0,void 0,function*(){n.set(a,l);try{let c=yield Promise.resolve(a.provideCodeLenses(e,t));c&&o.add(c,a)}catch(c){Yt(c)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:n.get(a.provider)<n.get(l.provider)?-1:n.get(a.provider)>n.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),o})}var $q,tp,QT=N(()=>{Si();Vt();ke();Fr();Tr();Go();Wi();Rt();$q=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},tp=class{constructor(){this.lenses=[],this._disposables=new le}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(let r of e.lenses)this.lenses.push({symbol:r,provider:t})}};At.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,r]=e;zt(yt.isUri(t)),zt(typeof r=="number"||!r);let{codeLensProvider:n}=i.get(Se),o=i.get(Li).getModel(t);if(!o)throw Co();let s=[],a=new le;return XT(n,o,st.None).then(l=>{a.add(l);let c=[];for(let d of l.lenses)r==null||d.symbol.command?s.push(d.symbol):r-- >0&&d.provider.resolveCodeLens&&c.push(Promise.resolve(d.provider.resolveCodeLens(o,d.symbol,st.None)).then(u=>s.push(u||d.symbol)));return Promise.all(c)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})})});var uge,hge,JT,jx,ZT,Gq=N(()=>{Ut();B9();lf();et();QT();dl();Ht();_u();uge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},hge=function(i,e){return function(t,r){e(t,r,i)}},JT=Xr("ICodeLensCache"),jx=class{constructor(e,t){this.lineCount=e,this.data=t}},ZT=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new na(20,.75);let t="codelens/cache";eO(()=>e.remove(t,1));let r="codelens/cache2",n=e.get(r,1,"{}");this._deserialize(n),Nv(e.onWillSaveState)(o=>{o.reason===O_.SHUTDOWN&&e.store(r,this._serialize(),1,1)})}put(e,t){let r=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}}}),n=new tp;n.add({lenses:r,dispose:()=>{}},this._fakeProvider);let o=new jx(e.getLineCount(),n);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,r]of this._cache){let n=new Set;for(let o of r.data.lenses)n.add(o.symbol.range.startLineNumber);e[t]={lineCount:r.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{let t=JSON.parse(e);for(let r in t){let n=t[r],o=[];for(let a of n.lines)o.push({range:new B(a,1,a,11)});let s=new tp;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(r,new jx(n.lineCount,s))}}catch(t){}}};ZT=uge([hge(0,Gn)],ZT);Jr(JT,ZT,1)});var Yq=N(()=>{});var Xq=N(()=>{Yq()});var eI,Wx,ip,Qq,M0,Zq=N(()=>{Bt();Mre();Xq();et();Hr();eI=class{constructor(e,t,r){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=r,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")}},Wx=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 r=[],n=!1;for(let o=0;o<e.length;o++){let s=e[o];if(s&&(n=!0,s.command)){let a=oF(s.command.title.trim());s.command.id?(r.push(Le("a",{id:String(o),title:s.command.tooltip,role:"button"},...a)),this._commands.set(String(o),s.command)):r.push(Le("span",{title:s.command.tooltip},...a)),o+1<e.length&&r.push(Le("span",void 0,"\xA0|\xA0"))}}n?(lu(this._domNode,...r),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):lu(this._domNode,Le("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){let t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}};Wx._idPool=0;ip=class{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let r=0,n=t.length;r<n;r++)this._addDecorationsCallbacks[r](t[r])}},Qq=mt.register({collapseOnReplaceEdit:!0,description:"codelens"}),M0=class{constructor(e,t,r,n,o,s){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a,l=[];this._data.forEach((c,d)=>{c.symbol.command&&l.push(c.symbol),r.addDecoration({range:c.symbol.range,options:Qq},u=>this._decorationIds[d]=u),a?a=B.plusRange(a,c.symbol.range):a=B.lift(c.symbol.range)}),this._viewZone=new eI(a.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new Wx(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 r=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(r&&B.isEmpty(n.range)===r.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((r,n)=>{t.addDecoration({range:r.symbol.range,options:Qq},o=>this._decorationIds[n]=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<this._decorationIds.length;t++){let r=e.getDecorationRange(this._decorationIds[t]);r&&(this._data[t].symbol.range=r)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){let r=e[t];if(r){let{symbol:n}=this._data[t];n.command=r.command||n.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){let e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){let t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}});var fge,N0,pge,rp,tI=N(()=>{Ut();Vt();ke();P_();lt();Qm();ei();QT();Gq();Zq();He();Wi();Ao();_l();Ls();Rt();fge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},N0=function(i,e){return function(t,r){e(t,r,i)}},pge=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},rp=class{constructor(e,t,r,n,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=o,this._codeLensCache=s,this._disposables=new le,this._localToDispose=new le,this._lenses=[],this._oldCodeLensModels=new le,this._provideCodeLensDebounce=r.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=r.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new di(()=>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(49)||a.hasChanged(18)||a.hasChanged(17))&&this._updateLensStyle(),a.hasChanged(16)&&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(65)/this._editor.getOption(51)),t=this._editor.getOption(18);return(!t||t<5)&&(t=this._editor.getOption(51)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){let{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),r=this._editor.getOption(17),n=this._editor.getOption(49),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),r&&(o.setProperty("--vscode-editorCodeLens-fontFamily",r),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",w_.fontFamily)),this._editor.changeViewZones(s=>{for(let a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,r;(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(),(r=this._currentCodeLensModel)===null||r===void 0||r.dispose()}_onModelChange(){this._localDispose();let e=this._editor.getModel();if(!e||!this._editor.getOption(16))return;let t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(fl(()=>{let n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(let n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){let o=n.onDidChange(()=>r.schedule());this._localToDispose.add(o)}let r=new di(()=>{var n;let o=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Zt(s=>XT(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);r.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},ft)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(r),this._localToDispose.add(ii(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var n;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 ip;a.forEach(d=>{d.dispose(c,s),this._lenses.splice(this._lenses.indexOf(d),1)}),c.commit(o)})}),r.schedule(),this._resolveCodeLensesScheduler.cancel(),(n=this._resolveCodeLensesPromise)===null||n===void 0||n.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{r.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ii(()=>{if(this._editor.getModel()){let n=ga.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let o=n.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}}})),r.schedule()}_disposeAllLenses(e,t){let r=new ip;for(let n of this._lenses)n.dispose(r,t);e&&r.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t=this._editor.getModel().getLineCount(),r=[],n;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],r.push(n)))}if(!r.length&&!this._lenses.length)return;let o=ga.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{let c=new ip,d=0,u=0;for(;u<r.length&&d<this._lenses.length;){let h=r[u][0].symbol.range.startLineNumber,f=this._lenses[d].getLineNumber();f<h?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):f===h?(this._lenses[d].updateCodeLensSymbols(r[u],c),u++,d++):(this._lenses.splice(d,0,new M0(r[u],this._editor,c,l,s.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,u++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;u<r.length;)this._lenses.push(new M0(r[u],this._editor,c,l,s.codeLensHeight,()=>this._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 r=[],n=[];if(this._lenses.forEach(a=>{let l=a.computeIfNecessary(t);l&&(r.push(l),n.push(a))}),r.length===0)return;let o=Date.now(),s=Zt(a=>{let l=r.map((c,d)=>{let u=new Array(c.length),h=c.map((f,m)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(g=>{u[m]=g},Yt):(u[m]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!n[d].isDisposed()&&n[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=>{ft(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};rp.ID="css.editor.codeLens";rp=fge([N0(1,Se),N0(2,ar),N0(3,vi),N0(4,Mi),N0(5,JT)],rp);Ue(rp.ID,rp,1);ee(class extends de{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:F.hasCodeLensProvider,label:b("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return pge(this,void 0,void 0,function*(){if(!t.hasModel())return;let r=e.get(rn),n=e.get(vi),o=e.get(Mi),s=t.getSelection().positionLineNumber,a=t.getContribution(rp.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 r.pick(c,{canPickMany:!1});if(d){if(l.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(d.command.id,...d.command.arguments||[])}catch(u){o.error(u)}}})}})});var Zl,iI=N(()=>{ba();ci();et();Ir();Zl=class i{constructor(e,t,r){this.languageConfigurationService=r,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,r){if(r<0)return!1;let n=t.length,o=e.length;if(r+n>o)return!1;for(let s=0;s<n;s++){let a=e.charCodeAt(r+s),l=t.charCodeAt(s);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,r,n,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=o.getLineContent(a),h=o.getLineContent(c),f=u.lastIndexOf(t,l-1+t.length),m=h.indexOf(r,d-1-r.length);if(f!==-1&&m!==-1)if(a===c)u.substring(f+t.length,m).indexOf(r)>=0&&(f=-1,m=-1);else{let w=u.substring(f+t.length),_=h.substring(0,m);(w.indexOf(r)>=0||_.indexOf(r)>=0)&&(f=-1,m=-1)}let g;f!==-1&&m!==-1?(n&&f+t.length<u.length&&u.charCodeAt(f+t.length)===32&&(t=t+" "),n&&m>0&&h.charCodeAt(m-1)===32&&(r=" "+r,m-=1),g=i._createRemoveBlockCommentOperations(new B(a,f+t.length+1,c,m+1),t,r)):(g=i._createAddBlockCommentOperations(e,t,r,this._insertSpace),this._usedEndToken=g.length===1?r:null);for(let w of g)s.addTrackedEditOperation(w.range,w.text)}static _createRemoveBlockCommentOperations(e,t,r){let n=[];return B.isEmpty(e)?n.push(ti.delete(new B(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+r.length))):(n.push(ti.delete(new B(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(ti.delete(new B(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+r.length)))),n}static _createAddBlockCommentOperations(e,t,r,n){let o=[];return B.isEmpty(e)?o.push(ti.replace(new B(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+r)):(o.push(ti.insert(new Ie(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(ti.insert(new Ie(e.endLineNumber,e.endColumn),(n?" ":"")+r))),o}getEditOperations(e,t){let r=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(r);let o=e.getLanguageIdAtPosition(r,n),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 r=t.getInverseEditOperations();if(r.length===2){let n=r[0],o=r[1];return new Qe(n.range.endLineNumber,n.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let n=r[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Qe(n.endLineNumber,n.endColumn+o,n.endLineNumber,n.endColumn+o)}}}});var Vx,Jq=N(()=>{Di();ba();ci();et();Ir();iI();Vx=class i{constructor(e,t,r,n,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=r,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,r,n){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=r-t+1;c<d;c++)l[c]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,r,n,o,s,a,l){let c=!0,d;e===0?d=!0:e===1?d=!1:d=!0;for(let u=0,h=n.length;u<h;u++){let f=n[u],m=o+u;if(m===o&&a){f.ignore=!0;continue}let g=r.getLineContent(m),w=Dm(g);if(w===-1){f.ignore=s,f.commentStrOffset=g.length;continue}if(c=!1,f.ignore=!1,f.commentStrOffset=w,d&&!Zl._haystackHasNeedleAtOffset(g,f.commentStr,w)&&(e===0?d=!1:e===1||(f.ignore=!0)),d&&t){let _=w+f.commentStrLength;_<g.length&&g.charCodeAt(_)===32&&(f.commentStrLength+=1)}}if(e===0&&c){d=!1;for(let u=0,h=n.length;u<h;u++)n[u].ignore=!1}return{supported:!0,shouldRemoveComments:d,lines:n}}static _gatherPreflightData(e,t,r,n,o,s,a,l){let c=i._gatherPreflightCommentStrings(r,n,o,l);return c===null?{supported:!1}:i._analyzeLines(e,t,r,c,n,s,a,l)}_executeLineComments(e,t,r,n){let o;r.shouldRemoveComments?o=i._createRemoveLineCommentsOperations(r.lines,n.startLineNumber):(i._normalizeInsertionPoint(e,r.lines,n.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(r.lines,n.startLineNumber));let s=new Ie(n.positionLineNumber,n.positionColumn);for(let a=0,l=o.length;a<l;a++)t.addEditOperation(o[a].range,o[a].text),B.isEmpty(o[a].range)&&B.getStartPosition(o[a].range).equals(s)&&e.getLineContent(s.lineNumber).length+1===s.column&&(this._deltaColumn=(o[a].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,r,n){let o=t.startLineNumber,s=t.endLineNumber,a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),l=e.getLineContent(o).lastIndexOf(r,a-1),c=e.getLineContent(s).indexOf(n,t.endColumn-1-r.length);return l!==-1&&c===-1&&(c=e.getLineContent(o).indexOf(n,l+r.length),s=o),l===-1&&c!==-1&&(l=e.getLineContent(s).lastIndexOf(r,c),o=s),t.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(o).indexOf(r),l!==-1&&(c=e.getLineContent(o).indexOf(n,l+r.length))),l!==-1&&e.getLineContent(o).charCodeAt(l+r.length)===32&&(r+=" "),c!==-1&&e.getLineContent(s).charCodeAt(c-1)===32&&(n=" "+n,c-=1),l!==-1&&c!==-1?Zl._createRemoveBlockCommentOperations(new B(o,l+r.length+1,s,c+1),r,n):null}_executeBlockComment(e,t,r){e.tokenization.tokenizeIfCheap(r.startLineNumber);let n=e.getLanguageIdAtPosition(r.startLineNumber,1),o=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!o||!o.blockCommentStartToken||!o.blockCommentEndToken)return;let s=o.blockCommentStartToken,a=o.blockCommentEndToken,l=this._attemptRemoveBlockComment(e,r,s,a);if(!l){if(r.isEmpty()){let c=e.getLineContent(r.startLineNumber),d=Dm(c);d===-1&&(d=c.length),l=Zl._createAddBlockCommentOperations(new B(r.startLineNumber,d+1,r.startLineNumber,c.length+1),s,a,this._insertSpace)}else l=Zl._createAddBlockCommentOperations(new B(r.startLineNumber,e.getLineFirstNonWhitespaceColumn(r.startLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),s,a,this._insertSpace);l.length===1&&(this._deltaColumn=s.length+1)}this._selectionId=t.trackSelection(r);for(let c of l)t.addEditOperation(c.range,c.text)}getEditOperations(e,t){let r=this._selection;if(this._moveEndPositionDown=!1,r.startLineNumber===r.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new B(r.startLineNumber,e.getLineMaxColumn(r.startLineNumber),r.startLineNumber+1,1),r.startLineNumber===e.getLineCount()?"":` +`),this._selectionId=t.trackSelection(r);return}r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._moveEndPositionDown=!0,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1)));let n=i._gatherPreflightData(this._type,this._insertSpace,e,r.startLineNumber,r.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,r):this._executeBlockComment(e,t,r)}computeCursorState(e,t){let r=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),new Qe(r.selectionStartLineNumber,r.selectionStartColumn+this._deltaColumn,r.positionLineNumber,r.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){let r=[];for(let n=0,o=e.length;n<o;n++){let s=e[n];s.ignore||r.push(ti.delete(new B(t+n,s.commentStrOffset+1,t+n,s.commentStrOffset+s.commentStrLength+1)))}return r}_createAddLineCommentsOperations(e,t){let r=[],n=this._insertSpace?" ":"";for(let o=0,s=e.length;o<s;o++){let a=e[o];a.ignore||r.push(ti.insert(new Ie(t+o,a.commentStrOffset+1),a.commentStr+n))}return r}static nextVisibleColumn(e,t,r,n){return r?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,r,n){let o=1073741824,s,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(r+l),u=0;for(let h=0,f=t[l].commentStrOffset;u<o&&h<f;h++)u=i.nextVisibleColumn(u,n,d.charCodeAt(h)===9,1);u<o&&(o=u)}o=Math.floor(o/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;let d=e.getLineContent(r+l),u=0;for(s=0,a=t[l].commentStrOffset;u<o&&s<a;s++)u=i.nextVisibleColumn(u,n,d.charCodeAt(s)===9,1);u>o?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}});var R0,rI,nI,oI,sI,aI=N(()=>{sl();lt();et();ei();Br();iI();Jq();He();Zi();R0=class extends de{constructor(e,t){super(t),this._type=e}run(e,t){let r=e.get(Pt);if(!t.hasModel())return;let n=t.getModel(),o=[],s=n.getOptions(),a=t.getOption(22),l=t.getSelections().map((d,u)=>({selection:d,index:u,ignoreFirstLine:!1}));l.sort((d,u)=>B.compareRangesUsingStarts(d.selection,u.selection));let c=l[0];for(let d=1;d<l.length;d++){let u=l[d];c.selection.endLineNumber===u.selection.startLineNumber&&(c.index<u.index?u.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=u))}for(let d of l)o.push(new Vx(r,d.selection,s.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},rI=class extends R0{constructor(){super(0,{id:"editor.action.commentLine",label:b("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"5_insert",title:b({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}},nI=class extends R0{constructor(){super(1,{id:"editor.action.addCommentLine",label:b("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2081),weight:100}})}},oI=class extends R0{constructor(){super(2,{id:"editor.action.removeCommentLine",label:b("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2099),weight:100}})}},sI=class extends de{constructor(){super({id:"editor.action.blockComment",label:b("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"5_insert",title:b({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){let r=e.get(Pt);if(!t.hasModel())return;let n=t.getOption(22),o=[],s=t.getSelections();for(let a of s)o.push(new Zl(a,n.insertSpace,r));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}};ee(rI);ee(nI);ee(oI);ee(sI)});var mge,Yu,lI,np,cI,dI=N(()=>{Bt();mF();Rc();ke();En();lt();ei();He();Zi();wt();vl();Ur();Cr();z_();mge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Yu=function(i,e){return function(t,r){e(t,r,i)}},np=lI=class{static get(e){return e.getContribution(lI.ID)}constructor(e,t,r,n,o,s,a,l){this._contextMenuService=t,this._contextViewService=r,this._contextKeyService=n,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new le,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&&aP(d)===u.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(23)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(23)){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(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let r=!1;for(let n of this._editor.getSelections())if(n.containsPosition(e.target.position)){r=!0;break}r||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(23)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Me.SimpleEditorContext:Me.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let r=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.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&&(r.push(new Am(c.id,c.label,d)),l++)}else r.push(c),l++;l&&r.push(new ws)}return r.length&&r.pop(),r}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let r=this._editor.getOption(59);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Qi(this._editor.getDomNode()),l=a.left+s.left,c=a.top+s.top+s.height;n={x:l,y:c}}let o=this._editor.getOption(125)&&!Tm;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:o?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:s=>{let a=this._keybindingFor(s);if(a)return new eg(s,s,{label:!0,keybinding:a.getLabel(),isMenu:!0});let l=s;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new eg(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:r})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||TF(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(71),r=0,n=c=>({id:`menu-action-${++r}`,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-${++r}`,c,d,void 0),s=(c,d,u,h,f)=>{if(!d)return n({label:c,enabled:d,run:()=>{}});let m=w=>()=>{this._configurationService.updateValue(u,w)},g=[];for(let w of f)g.push(n({label:w.label,checked:h===w.value,run:m(w.value)}));return o(c,g)},a=[];a.push(n({label:b("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ws),a.push(n({label:b("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(b("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:b("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:b("context.minimap.size.fill","Fill"),value:"fill"},{label:b("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(b("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:b("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:b("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(125)&&!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()}};np.ID="editor.contrib.contextmenu";np=lI=mge([Yu(1,ts),Yu(2,qc),Yu(3,it),Yu(4,qt),Yu(5,xs),Yu(6,Dt),Yu(7,yl)],np);cI=class extends de{constructor(){super({id:"editor.action.showContextMenu",label:b("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:1092,weight:100}})}run(e,t){var r;(r=np.get(t))===null||r===void 0||r.showContextMenu()}};Ue(np.ID,np,2);ee(cI)});var P0,O0,Xu,uI,hI,fI=N(()=>{ke();lt();ei();He();P0=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,r=e.selections.length;if(t!==r)return!1;for(let n=0;n<t;n++)if(!this.selections[n].equalsSelection(e.selections[n]))return!1;return!0}},O0=class{constructor(e,t,r){this.cursorState=e,this.scrollTop=t,this.scrollLeft=r}},Xu=class i extends ce{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{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 r=new P0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(r)||(this._undoStack.push(new O0(r,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 O0(new P0(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 O0(new P0(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}};Xu.ID="editor.contrib.cursorUndoRedoController";uI=class extends de{constructor(){super({id:"cursorUndo",label:b("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:2099,weight:100}})}run(e,t,r){var n;(n=Xu.get(t))===null||n===void 0||n.cursorUndo()}},hI=class extends de{constructor(){super({id:"cursorRedo",label:b("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,r){var n;(n=Xu.get(t))===null||n===void 0||n.cursorRedo()}};Ue(Xu.ID,Xu,0);ee(uI);ee(hI)});var eK=N(()=>{});var tK=N(()=>{eK()});var qx,iK=N(()=>{et();Ir();qx=class{constructor(e,t,r){this.selection=e,this.targetPosition=t,this.copy=r,this.targetSelection=null}getEditOperations(e,t){let r=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new B(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),r),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 Qe(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 Qe(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<this.selection.endLineNumber){this.targetSelection=new Qe(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new Qe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new Qe(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}});function op(i){return kn?i.altKey:i.ctrlKey}var Qu,pI=N(()=>{ke();En();tK();lt();ci();et();Ir();Hr();iK();Qu=class i extends ce{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(34)||this._editor.getOption(21)||(op(e)&&(this._modifierPressed=!0),this._mouseDown&&op(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(34)||this._editor.getOption(21)||(op(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 n=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}op(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 Ie(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let r=null;if(e.event.shiftKey){let n=this._editor.getSelection();if(n){let{selectionStartLineNumber:o,selectionStartColumn:s}=n;r=[new Qe(o,s,t.lineNumber,t.column)]}}else r=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new Qe(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(op(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new qx(this._dragSelection,t,op(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 B(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()}};Qu.ID="editor.contrib.dragAndDrop";Qu.TRIGGER_KEY_VALUE=kn?6:5;Qu._DECORATION_OPTIONS=mt.register({description:"dnd-target",className:"dnd-target"});Ue(Qu.ID,Qu,2)});var Sd,F0=N(()=>{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(r){for(let n=0;n<r.length;n++)r[n]=Math.floor(Math.random()*256);return r};let e=new Uint8Array(16),t=[];for(let r=0;r<256;r++)t.push(r.toString(16).padStart(2,"0"));return function(){i(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,o="";return o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+="-",o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o+=t[e[n++]],o}}()});function z0(i){return{asString:()=>rK(this,void 0,void 0,function*(){return i}),asFile:()=>{},value:typeof i=="string"?i:void 0}}function nK(i,e,t){let r={id:Sd(),name:i,uri:e,data:t};return{asString:()=>rK(this,void 0,void 0,function*(){return""}),asFile:()=>r,value:void 0}}function Kx(i){return i.toLowerCase()}function $x(i,e){return oK(Kx(i),e.map(Kx))}function oK(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[r,n,o]=t;return o==="*"?e.some(s=>s.startsWith(n+"/")):!1}var rK,sp,Zu,B0=N(()=>{pi();Qh();F0();rK=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};sp=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 Sn.some(this,([r,n])=>n.asFile())&&t.push("files"),oK(Kx(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 r=this._entries.get(e);r?r.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 r of t)yield[e,r]}toKey(e){return Kx(e)}};Zu=Object.freeze({create:i=>AP(i.map(e=>e.toString())).join(`\r `),split:i=>i.split(`\r -`),parse:i=>Zu.split(i).filter(e=>!e.startsWith("#"))})});function oK(i){return ap(this,void 0,void 0,function*(){let e=i.get(mr.uriList);if(!e)return[];let t=yield e.asString(),r=[];for(let n of Zu.parse(t))try{r.push({uri:yt.parse(n),originalText:n})}catch(o){}return r})}var pI,H0,ap,mI,U0,Gx,Yx,Xx,Qx,Zx,gI=N(()=>{pi();B0();ke();$3();Im();Io();Tr();Rt();He();z_();pI=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},H0=function(i,e){return function(t,r){e(t,r,i)}},ap=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},mI=b("builtIn","Built-in"),U0=class{provideDocumentPasteEdits(e,t,r,n){return ap(this,void 0,void 0,function*(){let o=yield this.getEdit(r,n);return o?{insertText:o.insertText,label:o.label,detail:o.detail,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}:void 0})}provideDocumentOnDropEdits(e,t,r,n){return ap(this,void 0,void 0,function*(){let o=yield this.getEdit(r,n);return o?{insertText:o.insertText,label:o.label,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}:void 0})}},Gx=class extends U0{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[mr.text],this.pasteMimeTypes=[mr.text]}getEdit(e,t){return ap(this,void 0,void 0,function*(){let r=e.get(mr.text);if(!r||e.has(mr.uriList))return;let n=yield r.asString();return{handledMimeType:mr.text,label:b("text.label","Insert Plain Text"),detail:mI,insertText:n}})}},Yx=class extends U0{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[mr.uriList],this.pasteMimeTypes=[mr.uriList]}getEdit(e,t){return ap(this,void 0,void 0,function*(){let r=yield oK(e);if(!r.length||t.isCancellationRequested)return;let n=0,o=r.map(({uri:a,originalText:l})=>a.scheme===So.file?a.fsPath:(n++,l)).join(" "),s;return n>0?s=r.length>1?b("defaultDropProvider.uriList.uris","Insert Uris"):b("defaultDropProvider.uriList.uri","Insert Uri"):s=r.length>1?b("defaultDropProvider.uriList.paths","Insert Paths"):b("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:mr.uriList,insertText:o,label:s,detail:mI}})}},Xx=class extends U0{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[mr.uriList],this.pasteMimeTypes=[mr.uriList]}getEdit(e,t){return ap(this,void 0,void 0,function*(){let r=yield oK(e);if(!r.length||t.isCancellationRequested)return;let n=un(r.map(({uri:o})=>{let s=this._workspaceContextService.getWorkspaceFolder(o);return s?ZP(s.uri,o):void 0}));if(n.length)return{handledMimeType:mr.uriList,insertText:n.join(" "),label:r.length>1?b("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):b("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:mI}})}};Xx=pI([H0(0,yl)],Xx);Qx=class extends ce{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new Gx)),this._register(e.documentOnDropEditProvider.register("*",new Yx)),this._register(e.documentOnDropEditProvider.register("*",new Xx(t)))}};Qx=pI([H0(0,Se),H0(1,yl)],Qx);Zx=class extends ce{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new Gx)),this._register(e.documentPasteEditProvider.register("*",new Yx)),this._register(e.documentPasteEditProvider.register("*",new Xx(t)))}};Zx=pI([H0(0,Se),H0(1,yl)],Zx)});var vI,bI,gge,lp,_I=N(()=>{ll();vI={EDITORS:"CodeEditors",FILES:"CodeFiles"},bI=class{},gge={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Zr.add(gge.DragAndDropContribution,new bI);lp=class i{constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};lp.INSTANCE=new lp});function yI(i){let e=new sp;for(let t of i.items){let r=t.type;if(t.kind==="string"){let n=new Promise(o=>t.getAsString(o));e.append(r,z0(n))}else if(t.kind==="file"){let n=t.getAsFile();n&&e.append(r,vge(n))}}return e}function vge(i){let e=i.path?yt.parse(i.path):void 0;return rK(i.name,e,()=>bge(this,void 0,void 0,function*(){return new Uint8Array(yield i.arrayBuffer())}))}function Jx(i,e=!1){let t=yI(i),r=t.get(I_.INTERNAL_URI_LIST);if(r)t.replace(mr.uriList,r);else if(e||!t.has(mr.uriList)){let n=[];for(let o of i.items){let s=o.getAsFile();if(s){let a=s.path;try{a?n.push(yt.file(a).toString()):n.push(yt.parse(s.name,!0).toString())}catch(l){}}}n.length&&t.replace(mr.uriList,z0(Zu.create(n)))}for(let n of _ge)t.delete(n);return t}var bge,_ge,wI=N(()=>{Rre();B0();$3();Tr();_I();bge=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};_ge=Object.freeze([vI.EDITORS,vI.FILES,I_.RESOURCES,I_.INTERNAL_URI_LIST])});var e2,j0,xI=N(()=>{e2=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}}},j0=class{constructor(e){this.identifier=e}}});var CI,sK=N(()=>{dl();Ht();xI();CI=Xr("treeViewsDndService");Jr(CI,e2,1)});var aK=N(()=>{});var lK=N(()=>{aK()});var yge,wge,xge,Cge,t2,cp,W0=N(()=>{Bt();Ut();Qr();ke();Di();In();lK();et();Hr();Ht();yge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},wge=function(i,e){return function(t,r){e(t,r,i)}},xge=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Cge=mt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:qv,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),t2=class i extends ce{constructor(e,t,r,n,o){super(),this.typeId=e,this.editor=t,this.range=r,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Le(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=Le("span.icon");this.domNode.append(t),t.classList.add(..._t.asClassNameArray(pt.loading),"codicon-modifier-spin");let r=()=>{let n=this.editor.getOption(65);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};r(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(51)||n.hasChanged(65))&&r()})),this._register(Lt(this.domNode,gi.CLICK,n=>{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)}};t2.baseId="editor.widget.inlineProgressWidget";cp=class extends ce{constructor(e,t,r){super(),this.id=e,this._editor=t,this._instantiationService=r,this._showDelay=500,this._showPromise=this._register(new ji),this._currentWidget=new ji,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,r){return xge(this,void 0,void 0,function*(){let n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=fl(()=>{let o=B.fromPositions(e);this._currentDecorations.set([{range:o,options:Cge}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(t2,this.id,this._editor,o,t,r))},this._showDelay);try{return yield r}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};cp=yge([wge(2,Ke)],cp)});function cK(i,e,t){var r,n;return{edits:[...e.map(o=>new C_(i,typeof t.insertText=="string"?{range:o,text:t.insertText,insertAsSnippet:!1}:{range:o,text:t.insertText.snippet,insertAsSnippet:!0})),...(n=(r=t.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&n!==void 0?n:[]]}}function i2(i){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}let r=new Map;for(let a of i)for(let l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(let c of i)if(c!==a&&t(l,c)){let d=r.get(a);d||(d=[],r.set(a,d)),d.push(c)}if(!r.size)return Array.from(i);let n=new Set,o=[];function s(a){if(!a.length)return[];let l=a[0];if(o.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(n.has(l))return s(a.slice(1));let c=[],d=r.get(l);return d&&(o.push(l),c=s(d),o.pop()),n.add(l),[...c,l,...s(a.slice(1))]}return s(Array.from(i))}var SI=N(()=>{Zm()});var dK=N(()=>{});var uK=N(()=>{dK()});var fK,V0,hK,kI,r2,dp,EI=N(()=>{Bt();Bre();Rc();Jt();ke();uK();Zm();wt();vl();Ht();Ur();fK=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},V0=function(i,e){return function(t,r){e(t,r,i)}},hK=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},r2=kI=class extends ce{constructor(e,t,r,n,o,s,a,l,c,d){super(),this.typeId=e,this.editor=t,this.showCommand=n,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=r.bindTo(c),this.visibleContext.set(!0),this._register(ii(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ii(()=>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=Le(".post-edit-widget"),this.button=this._register(new TF(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(Lt(this.domNode,gi.CLICK,()=>this.showSelector()))}getId(){return kI.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=Qi(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Jh({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};r2.baseId="editor.widget.postEditWidget";r2=kI=fK([V0(7,ts),V0(8,it),V0(9,qt)],r2);dp=class extends ce{constructor(e,t,r,n,o,s){super(),this._id=e,this._editor=t,this._visibleContext=r,this._showCommand=n,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new ji),this._register(li.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,r,n){var o,s;return hK(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=[];(typeof l.insertText=="string"?l.insertText==="":l.insertText.snippet==="")?c=[]:c=e.map(w=>new C_(a.uri,typeof l.insertText=="string"?{range:w,text:l.insertText,insertAsSnippet:!1}:{range:w,text:l.insertText.snippet,insertAsSnippet:!0}));let u={edits:[...c,...(s=(o=l.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&s!==void 0?s:[]]},h=e[0],f=a.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]),m,g;try{m=yield this._bulkEditService.apply(u,{editor:this._editor,token:n}),g=a.getDecorationRange(f[0])}finally{a.deltaDecorations(f,[])}r&&m.isApplied&&t.allEdits.length>1&&this.show(g!=null?g:h,t,w=>hK(this,void 0,void 0,function*(){let _=this._editor.getModel();_&&(yield _.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:w,allEdits:t.allEdits},r,n))}))})}show(e,t,r){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(r2,this._id,this._editor,this._visibleContext,this._showCommand,e,t,r))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};dp=fK([V0(4,Ke),V0(5,Wc)],dp)});var Sge,n2,q0,TI,II,LI,AI,Ju,pK=N(()=>{pi();Ut();B0();ke();wI();et();Rt();xI();sK();vu();W0();He();Cr();wt();_I();Ht();SI();EI();Sge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},n2=function(i,e){return function(t,r){e(t,r,i)}},q0=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},II="editor.experimental.dropIntoEditor.defaultProvider",LI="editor.changeDropType",AI=new ht("dropWidgetVisible",!1,b("dropWidgetVisible","Whether the drop widget is showing")),Ju=TI=class extends ce{static get(e){return e.getContribution(TI.ID)}constructor(e,t,r,n,o){super(),this._configService=r,this._languageFeaturesService=n,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=lp.getInstance(),this._dropProgressManager=this._register(t.createInstance(cp,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(dp,"dropIntoEditor",e,AI,{id:LI,label:b("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(s=>this.onDropIntoEditor(e,s.position,s.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,r){var n;return q0(this,void 0,void 0,function*(){if(!r.dataTransfer||!e.hasModel())return;(n=this._currentOperation)===null||n===void 0||n.cancel(),e.focus(),e.setPosition(t);let o=Zt(s=>q0(this,void 0,void 0,function*(){let a=new pa(e,1,void 0,s);try{let l=yield this.extractDataTransferData(r);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(f=>l.matches(f)):!0),u=yield this.getDropEdits(d,c,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){let h=this.getInitialActiveEditIndex(c,u),f=e.getOption(35).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([B.fromPositions(t)],{activeEditIndex:h,allEdits:u},f,s)}}finally{a.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,b("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o})}getDropEdits(e,t,r,n,o){return q0(this,void 0,void 0,function*(){let s=yield Uc(Promise.all(e.map(l=>q0(this,void 0,void 0,function*(){try{let c=yield l.provideDocumentOnDropEdits(t,r,n,o.token);if(c)return Object.assign(Object.assign({},c),{providerId:l.id})}catch(c){console.error(c)}}))),o.token),a=un(s!=null?s:[]);return i2(a)})}getInitialActiveEditIndex(e,t){let r=this._configService.getValue(II,{resource:e.uri});for(let[n,o]of Object.entries(r)){let s=t.findIndex(a=>o===a.providerId&&a.handledMimeType&&$x(n,[a.handledMimeType]));if(s>=0)return s}return 0}extractDataTransferData(e){return q0(this,void 0,void 0,function*(){if(!e.dataTransfer)return new sp;let t=Jx(e.dataTransfer);if(this.treeItemsTransfer.hasData(j0.prototype)){let r=this.treeItemsTransfer.getData(j0.prototype);if(Array.isArray(r))for(let n of r){let o=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(o)for(let[s,a]of o)t.replace(s,a)}}return t})}};Ju.ID="editor.contrib.dropIntoEditorController";Ju=TI=Sge([n2(1,Ke),n2(2,Dt),n2(3,Se),n2(4,CI)],Ju)});var DI=N(()=>{lt();JO();B_();gI();He();G3();ll();pK();Ue(Ju.ID,Ju,2);We(new class extends Oi{constructor(){super({id:LI,precondition:AI,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var r;(r=Ju.get(e))===null||r===void 0||r.changeDropType()}});Kc(Qx);Zr.as(of.Configuration).registerConfiguration(Object.assign(Object.assign({},x_),{properties:{[II]:{type:"object",scope:5,description:b("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}))});var Ha,mK=N(()=>{et();jc();Hr();en();tn();Ha=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<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(let r of t){let n=r.options;if(n===i._FIND_MATCH_DECORATION||n===i._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(r.id)}return 0}setCurrentFindMatch(e){let t=null,r=0;if(e)for(let n=0,o=this._decorations.length;n<o;n++){let s=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(s)){t=this._decorations[n],r=n+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(n=>{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.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 B(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=n.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),r}set(e,t){this._editor.changeDecorations(r=>{let n=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){n=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 f=1,m=e.length;f<m;f++){let g=e[f].range;h+d>=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(o.push({range:new B(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=g.startLineNumber,h=g.endLineNumber)}o.push({range:new B(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;a<l;a++)s[a]={range:e[a].range,options:n};this._decorations=r.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=r.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>r.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>r.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 r=this._decorations[t],n=this._editor.getModel().getDecorationRange(r);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,r=this._decorations.length;t<r;t++){let n=this._decorations[t],o=this._editor.getModel().getDecorationRange(n);if(!(!o||o.startLineNumber<e.lineNumber)){if(o.startLineNumber>e.lineNumber)return o;if(!(o.startColumn<e.column))return o}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}};Ha._CURRENT_FIND_MATCH_DECORATION=mt.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:ki(m_),position:$n.Center},minimap:{color:ki(tk),position:sa.Inline}});Ha._FIND_MATCH_DECORATION=mt.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:ki(m_),position:$n.Center},minimap:{color:ki(tk),position:sa.Inline}});Ha._FIND_MATCH_NO_OVERVIEW_DECORATION=mt.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});Ha._FIND_MATCH_ONLY_OVERVIEW_DECORATION=mt.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:ki(m_),position:$n.Center}});Ha._RANGE_HIGHLIGHT_DECORATION=mt.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});Ha._FIND_SCOPE_DECORATION=mt.register({description:"find-scope",className:"findScope",isWholeLine:!0})});var o2,gK=N(()=>{et();o2=class{constructor(e,t,r){this._editorSelection=e,this._ranges=t,this._replaceStrings=r,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let r=[];for(let s=0;s<this._ranges.length;s++)r.push({range:this._ranges[s],text:this._replaceStrings[s]});r.sort((s,a)=>B.compareRangesUsingStarts(s.range,a.range));let n=[],o=r[0];for(let s=1;s<r.length;s++)o.range.endLineNumber===r[s].range.startLineNumber&&o.range.endColumn===r[s].range.startColumn?(o.range=o.range.plusRange(r[s].range),o.text=o.text+r[s].text):(n.push(o),o=r[s]);n.push(o);for(let s of n)t.addEditOperation(s.range,s.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}});function MI(i,e){if(i&&i[0]!==""){let t=bK(i,e,"-"),r=bK(i,e,"_");return t&&!r?vK(i,e,"-"):!t&&r?vK(i,e,"_"):i[0].toUpperCase()===i[0]?e.toUpperCase():i[0].toLowerCase()===i[0]?e.toLowerCase():vP(i[0][0])&&e.length>0?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 bK(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 r=e.split(t),n=i[0].split(t),o="";return r.forEach((s,a)=>{o+=MI([n[a]],s)+t}),o.slice(0,-1)}var _K=N(()=>{Di()});function yK(i){if(!i||i.length===0)return new hp(null);let e=[],t=new RI(i);for(let r=0,n=i.length;r<n;r++){let o=i.charCodeAt(r);if(o===92){if(r++,r>=n)break;let s=i.charCodeAt(r);switch(s){case 92:t.emitUnchanged(r-1),t.emitStatic("\\",r+1);break;case 110:t.emitUnchanged(r-1),t.emitStatic(` -`,r+1);break;case 116:t.emitUnchanged(r-1),t.emitStatic(" ",r+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(r-1),t.emitStatic("",r+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(r++,r>=n)break;let s=i.charCodeAt(r);if(s===36){t.emitUnchanged(r-1),t.emitStatic("$",r+1);continue}if(s===48||s===38){t.emitUnchanged(r-1),t.emitMatchIndex(0,r+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(r+1<n){let l=i.charCodeAt(r+1);if(48<=l&&l<=57){r++,a=a*10+(l-48),t.emitUnchanged(r-2),t.emitMatchIndex(a,r+1,e),e.length=0;continue}}t.emitUnchanged(r-1),t.emitMatchIndex(a,r+1,e),e.length=0;continue}}}return t.finalize()}var s2,NI,hp,up,RI,wK=N(()=>{_K();s2=class{constructor(e){this.staticValue=e,this.kind=0}},NI=class{constructor(e){this.pieces=e,this.kind=1}},hp=class i{static fromStaticValue(e){return new i([up.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new s2(""):e.length===1&&e[0].staticValue!==null?this._state=new s2(e[0].staticValue):this._state=new NI(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?MI(e,this._state.staticValue):this._state.staticValue;let r="";for(let n=0,o=this._state.pieces.length;n<o;n++){let s=this._state.pieces[n];if(s.staticValue!==null){r+=s.staticValue;continue}let a=i._substitute(s.matchIndex,e);if(s.caseOps!==null&&s.caseOps.length>0){let l=[],c=s.caseOps.length,d=0;for(let u=0,h=a.length;u<h;u++){if(d>=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("")}r+=a}return r}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let r="";for(;e>0;){if(e<t.length)return(t[e]||"")+r;r=String(e%10)+r,e=Math.floor(e/10)}return"$"+r}},up=class i{static staticValue(e){return new i(e,-1,null)}static caseOps(e,t){return new i(null,e,t)}constructor(e,t,r){this.staticValue=e,this.matchIndex=t,!r||r.length===0?this.caseOps=null:this.caseOps=r.slice(0)}},RI=class{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,r){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=up.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=up.caseOps(e,r),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=up.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new hp(this._result)}}});var ja,cWe,fp,K0,$0,G0,Y0,X0,Q0,ri,Ua,kge,a2,Z0=N(()=>{pi();Ut();ke();Yv();ci();et();Ir();kre();mK();gK();wK();wt();ja=new ht("findWidgetVisible",!1),cWe=ja.toNegated(),fp=new ht("findInputFocussed",!1),K0=new ht("replaceInputFocussed",!1),$0={primary:545,mac:{primary:2593}},G0={primary:565,mac:{primary:2613}},Y0={primary:560,mac:{primary:2608}},X0={primary:554,mac:{primary:2602}},Q0={primary:558,mac:{primary:2606}},ri={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"},Ua=19999,kge=240,a2=class i{constructor(e,t){this._toDispose=new le,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new oa,this._decorations=new Ha(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new di(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(r=>{(r.reason===3||r.reason===5||r.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(r=>{this._ignoreModelContentChanged||(r.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(r=>this._onStateChanged(r))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Ui(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)},kge)):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 r=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?r=t:r=[t]):r=this._decorations.getFindScopes(),r!==null&&(r=r.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new B(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let n=this._findMatches(r,!1,Ua);this._decorations.set(n,r);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&n.length>0){let a=Qv(n.map(l=>l.range),l=>B.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(40).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:r,column:n}=e,o=this._editor.getModel();return t||n===1?(r===1?r=o.getLineCount():r--,n=o.getLineMaxColumn(r)):n--,new Ie(r,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()<Ua){let d=this._decorations.matchBeforePosition(e);d&&d.isEmpty()&&d.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),d=this._decorations.matchBeforePosition(e)),d&&this._setCurrentFindMatch(d);return}if(this._cannotFind())return;let r=this._decorations.getFindScope(),n=i._getSearchRange(this._editor.getModel(),r);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());let{lineNumber:o,column:s}=e,a=this._editor.getModel(),l=new Ie(o,s),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1)),!!c){if(!t&&!n.containsRange(c.range))return this._moveToPrevMatch(c.range.getStartPosition(),!0);this._setCurrentFindMatch(c.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:r,column:n}=e,o=this._editor.getModel();return t||n===o.getLineMaxColumn(r)?(r===o.getLineCount()?r=1:r++,n=1):n++,new Ie(r,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let r=this._decorations.matchBeforePosition(e);r&&this._setCurrentFindMatch(r);return}if(this._decorations.getCount()<Ua){let r=this._decorations.matchAfterPosition(e);r&&r.isEmpty()&&r.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),r=this._decorations.matchAfterPosition(e)),r&&this._setCurrentFindMatch(r);return}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,r,n=!1){if(this._cannotFind())return null;let o=this._decorations.getFindScope(),s=i._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());let{lineNumber:a,column:l}=e,c=this._editor.getModel(),d=new Ie(a,l),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t);return r&&u&&u.range.isEmpty()&&u.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t)),u?!n&&!s.containsRange(u.range)?this._getNextMatch(u.range.getEndPosition(),t,r,!0):u:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){let t=this._decorations.getDecorationRangeAt(e);t&&this._setCurrentFindMatch(t)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?yK(this._state.replaceString):hp.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),r=this._getNextMatch(t.getStartPosition(),!0,!1);if(r)if(t.equalsRange(r.range)){let n=e.buildReplaceString(r.matches,this._state.preserveCase),o=new cl(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new Ie(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(r.range)}_findMatches(e,t,r){let n=(e||[null]).map(o=>i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t,r)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Ua?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new zO(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null).parseSearchRequest();if(!t)return;let r=t.regex;if(!r.multiline){let u="mu";r.ignoreCase&&(u+="i"),r.global&&(u+="g"),r=new RegExp(r.source,u)}let n=this._editor.getModel(),o=n.getValue(1),s=n.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(r,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(r,a.buildReplaceString(null,c));let d=new Gv(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),r=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let s=0,a=r.length;s<a;s++)n[s]=t.buildReplaceString(r[s].matches,this._state.preserveCase);let o=new o2(this._editor.getSelection(),r.map(s=>s.range),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),r=this._findMatches(e,!1,1073741824).map(o=>new Qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),n=this._editor.getSelection();for(let o=0,s=r.length;o<s;o++)if(r[o].equalsRange(n)){r=[n].concat(r.slice(0,o)).concat(r.slice(o+1));break}this._editor.setSelections(r)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}});var xK=N(()=>{});var CK=N(()=>{xK()});var J0,SK=N(()=>{Bt();CK();Hre();L_();Ut();Z0();en();J0=class i extends bl{constructor(e,t,r){super(),this._hideSoon=this._register(new di(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=r,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 n={inputActiveOptionBorder:la(f_),inputActiveOptionForeground:la(p_),inputActiveOptionBackground:la(pl)};this.caseSensitive=this._register(new LF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},n))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new AF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleWholeWordCommand),isChecked:this._state.wholeWord},n))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new DF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleRegexCommand),isChecked:this._state.isRegex},n))),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(Lt(this._domNode,gi.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(Lt(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")}};J0.ID="editor.contrib.findOptionsWidget"});function l2(i,e){return i===1?!0:i===2?!1:e}var c2,kK=N(()=>{Jt();ke();et();Z0();c2=class extends ce{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return l2(this._isRegexOverride,this._isRegex)}get wholeWord(){return l2(this._wholeWordOverride,this._wholeWord)}get matchCase(){return l2(this._matchCaseOverride,this._matchCase)}get preserveCase(){return l2(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 Je),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,r){let n={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,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),typeof r!="undefined"&&(B.equalsRange(this._currentMatch,r)||(this._currentMatch=r,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,r=!0){var n;let o={moveCursor:t,updateHistory:r,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"&&(!((n=e.searchScope)===null||n===void 0)&&n.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(f=>!B.equalsRange(f,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<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Ua}}});var EK=N(()=>{});var TK=N(()=>{EK()});var Ege,Tge,PI,d2,IK=N(()=>{Bt();IF();Ure();L_();Qr();Jt();jre();He();Ege=b("defaultLabel","input"),Tge=b("label.preserveCaseToggle","Preserve Case"),PI=class extends H_{constructor(e){super({icon:pt.preserveCase,title:Tge+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},d2=class extends bl{constructor(e,t,r,n){super(),this._showOptionButtons=r,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Je),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Je),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Je),this._onInput=this._register(new Je),this._onKeyUp=this._register(new Je),this._onPreserveCaseKeyDown=this._register(new Je),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||Ege;let o=n.appendPreserveCaseLabel||"",s=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new MF(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new PI(Object.assign({appendTitle:o,isChecked:!1},n.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 f=d.indexOf(document.activeElement);if(f>=0){let m=-1;h.equals(17)?m=(f+1)%d.length:h.equals(15)&&(f===0?m=d.length-1:m=f-1),h.equals(9)?(d[f].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),au.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 NK(i,e){if(u2.includes(e))throw new Error("Cannot register the same widget multiple times");u2.push(e);let t=new le,r=new ht(OI,!1).bindTo(i),n=new ht(DK,!0).bindTo(i),o=new ht(MK,!0).bindTo(i),s=()=>{r.set(!0),Jl=e},a=()=>{r.set(!1),Jl===e&&(Jl=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(ii(()=>{u2.splice(u2.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:n,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var LK,AK,p2,OI,DK,MK,Jl,u2,h2,f2,FI=N(()=>{Wre();IK();wt();H3();He();ke();LK=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},AK=function(i,e){return function(t,r){e(t,r,i)}},p2=new ht("suggestWidgetVisible",!1,b("suggestWidgetVisible","Whether suggestion are visible")),OI="historyNavigationWidgetFocus",DK="historyNavigationForwardsEnabled",MK="historyNavigationBackwardsEnabled",u2=[];h2=class extends NF{constructor(e,t,r,n){super(e,t,r);let o=this._register(n.createScoped(this.inputBox.element));this._register(NK(o,this.inputBox))}};h2=LK([AK(3,it)],h2);f2=class extends d2{constructor(e,t,r,n,o=!1){super(e,t,o,r);let s=this._register(n.createScoped(this.inputBox.element));this._register(NK(s,this.inputBox))}};f2=LK([AK(3,it)],f2);To.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:fe.and(fe.has(OI),fe.equals(MK,!0),fe.not("isComposing"),p2.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{Jl==null||Jl.showPreviousValue()}});To.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:fe.and(fe.has(OI),fe.equals(DK,!0),fe.not("isComposing"),p2.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{Jl==null||Jl.showNextValue()}})});function zI(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 RK=N(()=>{});function HK(i,e,t){let r=!!e.match(/\n/);if(t&&r&&t.selectionStart>0){i.stopPropagation();return}}function UK(i,e,t){let r=!!e.match(/\n/);if(t&&r&&t.selectionEnd<t.value.length){i.stopPropagation();return}}var Ige,Lge,PK,OK,Age,Dge,Mge,Nge,Rge,Pge,Oge,Fge,zge,Bge,Hge,Uge,jge,Wge,Vge,qge,Kge,$ge,FK,Wa,Gge,Yge,eb,Xge,zK,BK,tb,ib,kd,jK=N(()=>{Bt();Eo();IF();mk();L_();Ut();Qr();Vt();ke();En();Di();TK();et();Z0();He();FI();RK();en();xl();tn();In();rk();Fr();N_();Ige=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Lge=Ni("find-selection",pt.selection,b("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),PK=Ni("find-collapsed",pt.chevronRight,b("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),OK=Ni("find-expanded",pt.chevronDown,b("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Age=Ni("find-replace",pt.replace,b("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Dge=Ni("find-replace-all",pt.replaceAll,b("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Mge=Ni("find-previous-match",pt.arrowUp,b("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Nge=Ni("find-next-match",pt.arrowDown,b("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Rge=b("label.findDialog","Find / Replace"),Pge=b("label.find","Find"),Oge=b("placeholder.find","Find"),Fge=b("label.previousMatchButton","Previous Match"),zge=b("label.nextMatchButton","Next Match"),Bge=b("label.toggleSelectionFind","Find in Selection"),Hge=b("label.closeButton","Close"),Uge=b("label.replace","Replace"),jge=b("placeholder.replace","Replace"),Wge=b("label.replaceButton","Replace"),Vge=b("label.replaceAllButton","Replace All"),qge=b("label.toggleReplaceButton","Toggle Replace"),Kge=b("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Ua),$ge=b("label.matchesLocation","{0} of {1}"),FK=b("label.noResults","No results"),Wa=419,Gge=275,Yge=Gge-54,eb=69,Xge=33,zK="ctrlEnterReplaceAll.windows.donotask",BK=kn?256:2048,tb=class{constructor(e){this.afterLineNumber=e,this.heightInPx=Xge,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};ib=class i extends bl{constructor(e,t,r,n,o,s,a,l,c){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=r,this._contextViewProvider=n,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(zK,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Lo(500),this._register(ii(()=>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(89)&&(this._codeEditor.getOption(89)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(142)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(40)){let u=this._codeEditor.getOption(40).loop;this._state.change({loop:u},!1);let h=this._codeEditor.getOption(40).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new tb(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Ige(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=fp.bindTo(s),this._findFocusTracker=this._register(ys(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=K0.bindTo(s),this._replaceFocusTracker=this._register(ys(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(40).addExtraSpaceOnTop&&(this._viewZone=new tb(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(89)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=qn(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,ft)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=eb+"px",this._state.matchesCount>=Ua?this._matchesCount.title=Kge: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>=Ua&&(t+="+");let r=String(this._state.matchesPosition);r==="0"&&(r="?"),e=tf($ge,r,t)}else e=FK;this._matchesCount.appendChild(document.createTextNode(e)),sr(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),eb=Math.max(eb,this._matchesCount.clientWidth)}_getAriaLabel(e,t,r){if(e===FK)return r===""?b("ariaSearchNoResultEmpty","{0} found",e):b("ariaSearchNoResult","{0} found for '{1}'",e,r);if(t){let n=b("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,r,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${n}`:n}return b("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,r)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,r=this._toggleSelectionFind.checked;this._isVisible&&(r||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 r=!this._codeEditor.getOption(89);this._toggleReplaceBtn.setEnabled(this._isVisible&&r)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(40).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let r=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=r;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(40).seedSearchStringFromSelection&&e){let r=this._codeEditor.getDomNode();if(r){let n=Qi(r),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);let l=rP(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.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(40).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let r=this._viewZone;this._viewZoneId!==void 0||!r||this._codeEditor.changeViewZones(n=>{r.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(r),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+r.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(40).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new tb(0));let r=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===r.heightInPx)return;let s=o-r.heightInPx;r.heightInPx=o,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(82).top,o<=0)return;r.heightInPx=o,this._viewZoneId=n.addZone(r),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||!eP(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 r=e.width,n=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&qn(this._domNode)>Wa){this._domNode.style.maxWidth=`${r-28-n-15}px`,this._replaceInput.width=qn(this._findInput.domNode);return}if(Wa+28+n>=r&&(s=!0),Wa+28+n-eb>=r&&(a=!0),Wa+28+n-eb>=r+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=`${r-28-n-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=qn(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 r=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!B.equalsRange(t,r)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(BK|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 HK(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return UK(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(BK|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Dc&&Mc&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(b("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(zK,!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 HK(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return UK(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 h2(null,this._contextViewProvider,{width:Yge,label:Pge,placeholder:Oge,appendCaseSensitiveLabel:this._keybindingLabelFor(ri.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ri.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ri.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:()=>zI(this._keybindingService),inputBoxStyles:dk,toggleStyles:ck},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()})),$9&&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 kd({label:Fge+this._keybindingLabelFor(ri.PreviousMatchFindAction),icon:Mge,onTrigger:()=>{Ac(this._codeEditor.getAction(ri.PreviousMatchFindAction)).run().then(void 0,ft)}})),this._nextBtn=this._register(new kd({label:zge+this._keybindingLabelFor(ri.NextMatchFindAction),icon:Nge,onTrigger:()=>{Ac(this._codeEditor.getAction(ri.NextMatchFindAction)).run().then(void 0,ft)}}));let r=document.createElement("div");r.className="find-part",r.appendChild(this._findInput.domNode);let n=document.createElement("div");n.className="find-actions",r.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new H_({icon:Lge,title:Bge+this._keybindingLabelFor(ri.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:la(pl),inputActiveOptionBorder:la(f_),inputActiveOptionForeground:la(p_)})),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)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new kd({label:Hge+this._keybindingLabelFor(ri.CloseFindWidgetCommand),icon:U_,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())}})),this._replaceInput=this._register(new f2(null,void 0,{label:Uge,placeholder:jge,appendPreserveCaseLabel:this._keybindingLabelFor(ri.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>zI(this._keybindingService),inputBoxStyles:dk,toggleStyles:ck},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 kd({label:Wge+this._keybindingLabelFor(ri.ReplaceOneAction),icon:Age,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new kd({label:Vge+this._keybindingLabelFor(ri.ReplaceAllAction),icon:Dge,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 kd({label:qge,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=qn(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.ariaLabel=Rge,this._domNode.role="dialog",this._domNode.style.width=`${Wa}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(r),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(o),this._resizeSash=new wl(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=Wa;this._register(this._resizeSash.onDidStart(()=>{a=qn(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c<Wa)return;let d=parseFloat(iP(this._domNode).maxWidth)||0;c>d||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=qn(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=qn(this._domNode);if(l<Wa)return;let c=Wa;if(!this._resized||l===Wa){let d=this._codeEditor.getLayoutInfo();c=d.width-28-d.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=qn(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){let e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};ib.ID="editor.contrib.findWidget";kd=class extends bl{constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+_t.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,r=>{this._opts.onTrigger(),r.preventDefault()}),this.onkeydown(this._domNode,r=>{var n,o;if(r.equals(10)||r.equals(3)){this._opts.onTrigger(),r.preventDefault();return}(o=(n=this._opts).onKeyDown)===null||o===void 0||o.call(n,r)})}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(..._t.asClassNameArray(PK)),this._domNode.classList.add(..._t.asClassNameArray(OK))):(this._domNode.classList.remove(..._t.asClassNameArray(OK)),this._domNode.classList.add(..._t.asClassNameArray(PK)))}};mf((i,e)=>{let t=(g,w)=>{w&&e.addRule(`.monaco-editor ${g} { background-color: ${w}; }`)};t(".findMatch",i.getColor(xO)),t(".currentFindMatch",i.getColor(wO)),t(".findScope",i.getColor(CO));let r=i.getColor(ml);t(".find-widget",r);let n=i.getColor(u_);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);let o=i.getColor(h_);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(kO);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${bu(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(SO);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(EO);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${bu(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(Jo);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(vO);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let u=i.getColor(lO);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);let h=i.getColor(_O);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{let g=i.getColor(gu);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}let f=i.getColor(PO);f&&e.addRule(` +`),parse:i=>Zu.split(i).filter(e=>!e.startsWith("#"))})});function sK(i){return ap(this,void 0,void 0,function*(){let e=i.get(mr.uriList);if(!e)return[];let t=yield e.asString(),r=[];for(let n of Zu.parse(t))try{r.push({uri:yt.parse(n),originalText:n})}catch(o){}return r})}var mI,H0,ap,gI,U0,Gx,Yx,Xx,Qx,Zx,bI=N(()=>{pi();B0();ke();G3();Im();Io();Tr();Rt();He();z_();mI=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},H0=function(i,e){return function(t,r){e(t,r,i)}},ap=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},gI=b("builtIn","Built-in"),U0=class{provideDocumentPasteEdits(e,t,r,n){return ap(this,void 0,void 0,function*(){let o=yield this.getEdit(r,n);return o?{insertText:o.insertText,label:o.label,detail:o.detail,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}:void 0})}provideDocumentOnDropEdits(e,t,r,n){return ap(this,void 0,void 0,function*(){let o=yield this.getEdit(r,n);return o?{insertText:o.insertText,label:o.label,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}:void 0})}},Gx=class extends U0{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[mr.text],this.pasteMimeTypes=[mr.text]}getEdit(e,t){return ap(this,void 0,void 0,function*(){let r=e.get(mr.text);if(!r||e.has(mr.uriList))return;let n=yield r.asString();return{handledMimeType:mr.text,label:b("text.label","Insert Plain Text"),detail:gI,insertText:n}})}},Yx=class extends U0{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[mr.uriList],this.pasteMimeTypes=[mr.uriList]}getEdit(e,t){return ap(this,void 0,void 0,function*(){let r=yield sK(e);if(!r.length||t.isCancellationRequested)return;let n=0,o=r.map(({uri:a,originalText:l})=>a.scheme===So.file?a.fsPath:(n++,l)).join(" "),s;return n>0?s=r.length>1?b("defaultDropProvider.uriList.uris","Insert Uris"):b("defaultDropProvider.uriList.uri","Insert Uri"):s=r.length>1?b("defaultDropProvider.uriList.paths","Insert Paths"):b("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:mr.uriList,insertText:o,label:s,detail:gI}})}},Xx=class extends U0{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[mr.uriList],this.pasteMimeTypes=[mr.uriList]}getEdit(e,t){return ap(this,void 0,void 0,function*(){let r=yield sK(e);if(!r.length||t.isCancellationRequested)return;let n=un(r.map(({uri:o})=>{let s=this._workspaceContextService.getWorkspaceFolder(o);return s?JP(s.uri,o):void 0}));if(n.length)return{handledMimeType:mr.uriList,insertText:n.join(" "),label:r.length>1?b("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):b("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:gI}})}};Xx=mI([H0(0,yl)],Xx);Qx=class extends ce{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new Gx)),this._register(e.documentOnDropEditProvider.register("*",new Yx)),this._register(e.documentOnDropEditProvider.register("*",new Xx(t)))}};Qx=mI([H0(0,Se),H0(1,yl)],Qx);Zx=class extends ce{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new Gx)),this._register(e.documentPasteEditProvider.register("*",new Yx)),this._register(e.documentPasteEditProvider.register("*",new Xx(t)))}};Zx=mI([H0(0,Se),H0(1,yl)],Zx)});var _I,vI,gge,lp,yI=N(()=>{ll();_I={EDITORS:"CodeEditors",FILES:"CodeFiles"},vI=class{},gge={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Zr.add(gge.DragAndDropContribution,new vI);lp=class i{constructor(){}static getInstance(){return i.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};lp.INSTANCE=new lp});function wI(i){let e=new sp;for(let t of i.items){let r=t.type;if(t.kind==="string"){let n=new Promise(o=>t.getAsString(o));e.append(r,z0(n))}else if(t.kind==="file"){let n=t.getAsFile();n&&e.append(r,vge(n))}}return e}function vge(i){let e=i.path?yt.parse(i.path):void 0;return nK(i.name,e,()=>bge(this,void 0,void 0,function*(){return new Uint8Array(yield i.arrayBuffer())}))}function Jx(i,e=!1){let t=wI(i),r=t.get(I_.INTERNAL_URI_LIST);if(r)t.replace(mr.uriList,r);else if(e||!t.has(mr.uriList)){let n=[];for(let o of i.items){let s=o.getAsFile();if(s){let a=s.path;try{a?n.push(yt.file(a).toString()):n.push(yt.parse(s.name,!0).toString())}catch(l){}}}n.length&&t.replace(mr.uriList,z0(Zu.create(n)))}for(let n of _ge)t.delete(n);return t}var bge,_ge,xI=N(()=>{Rre();B0();G3();Tr();yI();bge=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};_ge=Object.freeze([_I.EDITORS,_I.FILES,I_.RESOURCES,I_.INTERNAL_URI_LIST])});var e2,j0,CI=N(()=>{e2=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}}},j0=class{constructor(e){this.identifier=e}}});var SI,aK=N(()=>{dl();Ht();CI();SI=Xr("treeViewsDndService");Jr(SI,e2,1)});var lK=N(()=>{});var cK=N(()=>{lK()});var yge,wge,xge,Cge,t2,cp,W0=N(()=>{Bt();Ut();Qr();ke();Di();In();cK();et();Hr();Ht();yge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},wge=function(i,e){return function(t,r){e(t,r,i)}},xge=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Cge=mt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:qv,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),t2=class i extends ce{constructor(e,t,r,n,o){super(),this.typeId=e,this.editor=t,this.range=r,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Le(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=Le("span.icon");this.domNode.append(t),t.classList.add(..._t.asClassNameArray(pt.loading),"codicon-modifier-spin");let r=()=>{let n=this.editor.getOption(65);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};r(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(51)||n.hasChanged(65))&&r()})),this._register(Lt(this.domNode,gi.CLICK,n=>{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)}};t2.baseId="editor.widget.inlineProgressWidget";cp=class extends ce{constructor(e,t,r){super(),this.id=e,this._editor=t,this._instantiationService=r,this._showDelay=500,this._showPromise=this._register(new ji),this._currentWidget=new ji,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,r){return xge(this,void 0,void 0,function*(){let n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=fl(()=>{let o=B.fromPositions(e);this._currentDecorations.set([{range:o,options:Cge}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(t2,this.id,this._editor,o,t,r))},this._showDelay);try{return yield r}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};cp=yge([wge(2,Ke)],cp)});function dK(i,e,t){var r,n;return{edits:[...e.map(o=>new C_(i,typeof t.insertText=="string"?{range:o,text:t.insertText,insertAsSnippet:!1}:{range:o,text:t.insertText.snippet,insertAsSnippet:!0})),...(n=(r=t.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&n!==void 0?n:[]]}}function i2(i){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}let r=new Map;for(let a of i)for(let l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(let c of i)if(c!==a&&t(l,c)){let d=r.get(a);d||(d=[],r.set(a,d)),d.push(c)}if(!r.size)return Array.from(i);let n=new Set,o=[];function s(a){if(!a.length)return[];let l=a[0];if(o.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(n.has(l))return s(a.slice(1));let c=[],d=r.get(l);return d&&(o.push(l),c=s(d),o.pop()),n.add(l),[...c,l,...s(a.slice(1))]}return s(Array.from(i))}var kI=N(()=>{Zm()});var uK=N(()=>{});var hK=N(()=>{uK()});var pK,V0,fK,EI,r2,dp,TI=N(()=>{Bt();Bre();Rc();Jt();ke();hK();Zm();wt();vl();Ht();Ur();pK=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},V0=function(i,e){return function(t,r){e(t,r,i)}},fK=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},r2=EI=class extends ce{constructor(e,t,r,n,o,s,a,l,c,d){super(),this.typeId=e,this.editor=t,this.showCommand=n,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=r.bindTo(c),this.visibleContext.set(!0),this._register(ii(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ii(()=>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=Le(".post-edit-widget"),this.button=this._register(new IF(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(Lt(this.domNode,gi.CLICK,()=>this.showSelector()))}getId(){return EI.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{let e=Qi(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Jh({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};r2.baseId="editor.widget.postEditWidget";r2=EI=pK([V0(7,ts),V0(8,it),V0(9,qt)],r2);dp=class extends ce{constructor(e,t,r,n,o,s){super(),this._id=e,this._editor=t,this._visibleContext=r,this._showCommand=n,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new ji),this._register(li.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,r,n){var o,s;return fK(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=[];(typeof l.insertText=="string"?l.insertText==="":l.insertText.snippet==="")?c=[]:c=e.map(w=>new C_(a.uri,typeof l.insertText=="string"?{range:w,text:l.insertText,insertAsSnippet:!1}:{range:w,text:l.insertText.snippet,insertAsSnippet:!0}));let u={edits:[...c,...(s=(o=l.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&s!==void 0?s:[]]},h=e[0],f=a.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]),m,g;try{m=yield this._bulkEditService.apply(u,{editor:this._editor,token:n}),g=a.getDecorationRange(f[0])}finally{a.deltaDecorations(f,[])}r&&m.isApplied&&t.allEdits.length>1&&this.show(g!=null?g:h,t,w=>fK(this,void 0,void 0,function*(){let _=this._editor.getModel();_&&(yield _.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:w,allEdits:t.allEdits},r,n))}))})}show(e,t,r){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(r2,this._id,this._editor,this._visibleContext,this._showCommand,e,t,r))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};dp=pK([V0(4,Ke),V0(5,Wc)],dp)});var Sge,n2,q0,II,LI,AI,DI,Ju,mK=N(()=>{pi();Ut();B0();ke();xI();et();Rt();CI();aK();vu();W0();He();Cr();wt();yI();Ht();kI();TI();Sge=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},n2=function(i,e){return function(t,r){e(t,r,i)}},q0=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},LI="editor.experimental.dropIntoEditor.defaultProvider",AI="editor.changeDropType",DI=new ht("dropWidgetVisible",!1,b("dropWidgetVisible","Whether the drop widget is showing")),Ju=II=class extends ce{static get(e){return e.getContribution(II.ID)}constructor(e,t,r,n,o){super(),this._configService=r,this._languageFeaturesService=n,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=lp.getInstance(),this._dropProgressManager=this._register(t.createInstance(cp,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(dp,"dropIntoEditor",e,DI,{id:AI,label:b("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(s=>this.onDropIntoEditor(e,s.position,s.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,r){var n;return q0(this,void 0,void 0,function*(){if(!r.dataTransfer||!e.hasModel())return;(n=this._currentOperation)===null||n===void 0||n.cancel(),e.focus(),e.setPosition(t);let o=Zt(s=>q0(this,void 0,void 0,function*(){let a=new pa(e,1,void 0,s);try{let l=yield this.extractDataTransferData(r);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(f=>l.matches(f)):!0),u=yield this.getDropEdits(d,c,t,l,a);if(a.token.isCancellationRequested)return;if(u.length){let h=this.getInitialActiveEditIndex(c,u),f=e.getOption(35).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([B.fromPositions(t)],{activeEditIndex:h,allEdits:u},f,s)}}finally{a.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,b("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o})}getDropEdits(e,t,r,n,o){return q0(this,void 0,void 0,function*(){let s=yield Uc(Promise.all(e.map(l=>q0(this,void 0,void 0,function*(){try{let c=yield l.provideDocumentOnDropEdits(t,r,n,o.token);if(c)return Object.assign(Object.assign({},c),{providerId:l.id})}catch(c){console.error(c)}}))),o.token),a=un(s!=null?s:[]);return i2(a)})}getInitialActiveEditIndex(e,t){let r=this._configService.getValue(LI,{resource:e.uri});for(let[n,o]of Object.entries(r)){let s=t.findIndex(a=>o===a.providerId&&a.handledMimeType&&$x(n,[a.handledMimeType]));if(s>=0)return s}return 0}extractDataTransferData(e){return q0(this,void 0,void 0,function*(){if(!e.dataTransfer)return new sp;let t=Jx(e.dataTransfer);if(this.treeItemsTransfer.hasData(j0.prototype)){let r=this.treeItemsTransfer.getData(j0.prototype);if(Array.isArray(r))for(let n of r){let o=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(o)for(let[s,a]of o)t.replace(s,a)}}return t})}};Ju.ID="editor.contrib.dropIntoEditorController";Ju=II=Sge([n2(1,Ke),n2(2,Dt),n2(3,Se),n2(4,SI)],Ju)});var MI=N(()=>{lt();eF();B_();bI();He();Y3();ll();mK();Ue(Ju.ID,Ju,2);We(new class extends Oi{constructor(){super({id:AI,precondition:DI,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var r;(r=Ju.get(e))===null||r===void 0||r.changeDropType()}});Kc(Qx);Zr.as(of.Configuration).registerConfiguration(Object.assign(Object.assign({},x_),{properties:{[LI]:{type:"object",scope:5,description:b("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}))});var Ha,gK=N(()=>{et();jc();Hr();en();tn();Ha=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<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(let r of t){let n=r.options;if(n===i._FIND_MATCH_DECORATION||n===i._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(r.id)}return 0}setCurrentFindMatch(e){let t=null,r=0;if(e)for(let n=0,o=this._decorations.length;n<o;n++){let s=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(s)){t=this._decorations[n],r=n+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(n=>{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.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 B(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=n.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),r}set(e,t){this._editor.changeDecorations(r=>{let n=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){n=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 f=1,m=e.length;f<m;f++){let g=e[f].range;h+d>=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(o.push({range:new B(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=g.startLineNumber,h=g.endLineNumber)}o.push({range:new B(u,1,h,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;a<l;a++)s[a]={range:e[a].range,options:n};this._decorations=r.deltaDecorations(this._decorations,s),this._overviewRulerApproximateDecorations=r.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>r.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>r.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 r=this._decorations[t],n=this._editor.getModel().getDecorationRange(r);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,r=this._decorations.length;t<r;t++){let n=this._decorations[t],o=this._editor.getModel().getDecorationRange(n);if(!(!o||o.startLineNumber<e.lineNumber)){if(o.startLineNumber>e.lineNumber)return o;if(!(o.startColumn<e.column))return o}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}};Ha._CURRENT_FIND_MATCH_DECORATION=mt.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:ki(m_),position:$n.Center},minimap:{color:ki(ik),position:sa.Inline}});Ha._FIND_MATCH_DECORATION=mt.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:ki(m_),position:$n.Center},minimap:{color:ki(ik),position:sa.Inline}});Ha._FIND_MATCH_NO_OVERVIEW_DECORATION=mt.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});Ha._FIND_MATCH_ONLY_OVERVIEW_DECORATION=mt.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:ki(m_),position:$n.Center}});Ha._RANGE_HIGHLIGHT_DECORATION=mt.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});Ha._FIND_SCOPE_DECORATION=mt.register({description:"find-scope",className:"findScope",isWholeLine:!0})});var o2,bK=N(()=>{et();o2=class{constructor(e,t,r){this._editorSelection=e,this._ranges=t,this._replaceStrings=r,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let r=[];for(let s=0;s<this._ranges.length;s++)r.push({range:this._ranges[s],text:this._replaceStrings[s]});r.sort((s,a)=>B.compareRangesUsingStarts(s.range,a.range));let n=[],o=r[0];for(let s=1;s<r.length;s++)o.range.endLineNumber===r[s].range.startLineNumber&&o.range.endColumn===r[s].range.startColumn?(o.range=o.range.plusRange(r[s].range),o.text=o.text+r[s].text):(n.push(o),o=r[s]);n.push(o);for(let s of n)t.addEditOperation(s.range,s.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}});function NI(i,e){if(i&&i[0]!==""){let t=vK(i,e,"-"),r=vK(i,e,"_");return t&&!r?_K(i,e,"-"):!t&&r?_K(i,e,"_"):i[0].toUpperCase()===i[0]?e.toUpperCase():i[0].toLowerCase()===i[0]?e.toLowerCase():_P(i[0][0])&&e.length>0?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 vK(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function _K(i,e,t){let r=e.split(t),n=i[0].split(t),o="";return r.forEach((s,a)=>{o+=NI([n[a]],s)+t}),o.slice(0,-1)}var yK=N(()=>{Di()});function wK(i){if(!i||i.length===0)return new hp(null);let e=[],t=new PI(i);for(let r=0,n=i.length;r<n;r++){let o=i.charCodeAt(r);if(o===92){if(r++,r>=n)break;let s=i.charCodeAt(r);switch(s){case 92:t.emitUnchanged(r-1),t.emitStatic("\\",r+1);break;case 110:t.emitUnchanged(r-1),t.emitStatic(` +`,r+1);break;case 116:t.emitUnchanged(r-1),t.emitStatic(" ",r+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(r-1),t.emitStatic("",r+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(r++,r>=n)break;let s=i.charCodeAt(r);if(s===36){t.emitUnchanged(r-1),t.emitStatic("$",r+1);continue}if(s===48||s===38){t.emitUnchanged(r-1),t.emitMatchIndex(0,r+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(r+1<n){let l=i.charCodeAt(r+1);if(48<=l&&l<=57){r++,a=a*10+(l-48),t.emitUnchanged(r-2),t.emitMatchIndex(a,r+1,e),e.length=0;continue}}t.emitUnchanged(r-1),t.emitMatchIndex(a,r+1,e),e.length=0;continue}}}return t.finalize()}var s2,RI,hp,up,PI,xK=N(()=>{yK();s2=class{constructor(e){this.staticValue=e,this.kind=0}},RI=class{constructor(e){this.pieces=e,this.kind=1}},hp=class i{static fromStaticValue(e){return new i([up.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new s2(""):e.length===1&&e[0].staticValue!==null?this._state=new s2(e[0].staticValue):this._state=new RI(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?NI(e,this._state.staticValue):this._state.staticValue;let r="";for(let n=0,o=this._state.pieces.length;n<o;n++){let s=this._state.pieces[n];if(s.staticValue!==null){r+=s.staticValue;continue}let a=i._substitute(s.matchIndex,e);if(s.caseOps!==null&&s.caseOps.length>0){let l=[],c=s.caseOps.length,d=0;for(let u=0,h=a.length;u<h;u++){if(d>=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("")}r+=a}return r}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let r="";for(;e>0;){if(e<t.length)return(t[e]||"")+r;r=String(e%10)+r,e=Math.floor(e/10)}return"$"+r}},up=class i{static staticValue(e){return new i(e,-1,null)}static caseOps(e,t){return new i(null,e,t)}constructor(e,t,r){this.staticValue=e,this.matchIndex=t,!r||r.length===0?this.caseOps=null:this.caseOps=r.slice(0)}},PI=class{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,r){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=up.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=up.caseOps(e,r),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=up.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new hp(this._result)}}});var ja,cWe,fp,K0,$0,G0,Y0,X0,Q0,ri,Ua,kge,a2,Z0=N(()=>{pi();Ut();ke();Yv();ci();et();Ir();kre();gK();bK();xK();wt();ja=new ht("findWidgetVisible",!1),cWe=ja.toNegated(),fp=new ht("findInputFocussed",!1),K0=new ht("replaceInputFocussed",!1),$0={primary:545,mac:{primary:2593}},G0={primary:565,mac:{primary:2613}},Y0={primary:560,mac:{primary:2608}},X0={primary:554,mac:{primary:2602}},Q0={primary:558,mac:{primary:2606}},ri={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"},Ua=19999,kge=240,a2=class i{constructor(e,t){this._toDispose=new le,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new oa,this._decorations=new Ha(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new di(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(r=>{(r.reason===3||r.reason===5||r.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(r=>{this._ignoreModelContentChanged||(r.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(r=>this._onStateChanged(r))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Ui(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)},kge)):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 r=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?r=t:r=[t]):r=this._decorations.getFindScopes(),r!==null&&(r=r.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new B(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let n=this._findMatches(r,!1,Ua);this._decorations.set(n,r);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&n.length>0){let a=Qv(n.map(l=>l.range),l=>B.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(40).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:r,column:n}=e,o=this._editor.getModel();return t||n===1?(r===1?r=o.getLineCount():r--,n=o.getLineMaxColumn(r)):n--,new Ie(r,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()<Ua){let d=this._decorations.matchBeforePosition(e);d&&d.isEmpty()&&d.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),d=this._decorations.matchBeforePosition(e)),d&&this._setCurrentFindMatch(d);return}if(this._cannotFind())return;let r=this._decorations.getFindScope(),n=i._getSearchRange(this._editor.getModel(),r);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());let{lineNumber:o,column:s}=e,a=this._editor.getModel(),l=new Ie(o,s),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,!1)),!!c){if(!t&&!n.containsRange(c.range))return this._moveToPrevMatch(c.range.getStartPosition(),!0);this._setCurrentFindMatch(c.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:r,column:n}=e,o=this._editor.getModel();return t||n===o.getLineMaxColumn(r)?(r===o.getLineCount()?r=1:r++,n=1):n++,new Ie(r,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let r=this._decorations.matchBeforePosition(e);r&&this._setCurrentFindMatch(r);return}if(this._decorations.getCount()<Ua){let r=this._decorations.matchAfterPosition(e);r&&r.isEmpty()&&r.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),r=this._decorations.matchAfterPosition(e)),r&&this._setCurrentFindMatch(r);return}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,r,n=!1){if(this._cannotFind())return null;let o=this._decorations.getFindScope(),s=i._getSearchRange(this._editor.getModel(),o);s.getEndPosition().isBefore(e)&&(e=s.getStartPosition()),e.isBefore(s.getStartPosition())&&(e=s.getStartPosition());let{lineNumber:a,column:l}=e,c=this._editor.getModel(),d=new Ie(a,l),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t);return r&&u&&u.range.isEmpty()&&u.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t)),u?!n&&!s.containsRange(u.range)?this._getNextMatch(u.range.getEndPosition(),t,r,!0):u:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(e){let t=this._decorations.getDecorationRangeAt(e);t&&this._setCurrentFindMatch(t)}moveToMatch(e){this._moveToMatch(e)}_getReplacePattern(){return this._state.isRegex?wK(this._state.replaceString):hp.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),r=this._getNextMatch(t.getStartPosition(),!0,!1);if(r)if(t.equalsRange(r.range)){let n=e.buildReplaceString(r.matches,this._state.preserveCase),o=new cl(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new Ie(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(r.range)}_findMatches(e,t,r){let n=(e||[null]).map(o=>i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null,t,r)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Ua?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new BO(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(128):null).parseSearchRequest();if(!t)return;let r=t.regex;if(!r.multiline){let u="mu";r.ignoreCase&&(u+="i"),r.global&&(u+="g"),r=new RegExp(r.source,u)}let n=this._editor.getModel(),o=n.getValue(1),s=n.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(r,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(r,a.buildReplaceString(null,c));let d=new Gv(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),r=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let s=0,a=r.length;s<a;s++)n[s]=t.buildReplaceString(r[s].matches,this._state.preserveCase);let o=new o2(this._editor.getSelection(),r.map(s=>s.range),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),r=this._findMatches(e,!1,1073741824).map(o=>new Qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),n=this._editor.getSelection();for(let o=0,s=r.length;o<s;o++)if(r[o].equalsRange(n)){r=[n].concat(r.slice(0,o)).concat(r.slice(o+1));break}this._editor.setSelections(r)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}});var CK=N(()=>{});var SK=N(()=>{CK()});var J0,kK=N(()=>{Bt();SK();Hre();L_();Ut();Z0();en();J0=class i extends bl{constructor(e,t,r){super(),this._hideSoon=this._register(new di(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=r,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 n={inputActiveOptionBorder:la(f_),inputActiveOptionForeground:la(p_),inputActiveOptionBackground:la(pl)};this.caseSensitive=this._register(new AF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},n))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new DF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleWholeWordCommand),isChecked:this._state.wholeWord},n))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new MF(Object.assign({appendTitle:this._keybindingLabelFor(ri.ToggleRegexCommand),isChecked:this._state.isRegex},n))),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(Lt(this._domNode,gi.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(Lt(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")}};J0.ID="editor.contrib.findOptionsWidget"});function l2(i,e){return i===1?!0:i===2?!1:e}var c2,EK=N(()=>{Jt();ke();et();Z0();c2=class extends ce{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return l2(this._isRegexOverride,this._isRegex)}get wholeWord(){return l2(this._wholeWordOverride,this._wholeWord)}get matchCase(){return l2(this._matchCaseOverride,this._matchCase)}get preserveCase(){return l2(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 Je),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,r){let n={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,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),typeof r!="undefined"&&(B.equalsRange(this._currentMatch,r)||(this._currentMatch=r,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,r=!0){var n;let o={moveCursor:t,updateHistory:r,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"&&(!((n=e.searchScope)===null||n===void 0)&&n.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(f=>!B.equalsRange(f,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<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Ua}}});var TK=N(()=>{});var IK=N(()=>{TK()});var Ege,Tge,OI,d2,LK=N(()=>{Bt();LF();Ure();L_();Qr();Jt();jre();He();Ege=b("defaultLabel","input"),Tge=b("label.preserveCaseToggle","Preserve Case"),OI=class extends H_{constructor(e){super({icon:pt.preserveCase,title:Tge+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},d2=class extends bl{constructor(e,t,r,n){super(),this._showOptionButtons=r,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Je),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Je),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Je),this._onInput=this._register(new Je),this._onKeyUp=this._register(new Je),this._onPreserveCaseKeyDown=this._register(new Je),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||Ege;let o=n.appendPreserveCaseLabel||"",s=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new NF(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new OI(Object.assign({appendTitle:o,isChecked:!1},n.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 f=d.indexOf(document.activeElement);if(f>=0){let m=-1;h.equals(17)?m=(f+1)%d.length:h.equals(15)&&(f===0?m=d.length-1:m=f-1),h.equals(9)?(d[f].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),au.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 RK(i,e){if(u2.includes(e))throw new Error("Cannot register the same widget multiple times");u2.push(e);let t=new le,r=new ht(FI,!1).bindTo(i),n=new ht(MK,!0).bindTo(i),o=new ht(NK,!0).bindTo(i),s=()=>{r.set(!0),Jl=e},a=()=>{r.set(!1),Jl===e&&(Jl=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(ii(()=>{u2.splice(u2.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:n,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var AK,DK,p2,FI,MK,NK,Jl,u2,h2,f2,zI=N(()=>{Wre();LK();wt();U3();He();ke();AK=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},DK=function(i,e){return function(t,r){e(t,r,i)}},p2=new ht("suggestWidgetVisible",!1,b("suggestWidgetVisible","Whether suggestion are visible")),FI="historyNavigationWidgetFocus",MK="historyNavigationForwardsEnabled",NK="historyNavigationBackwardsEnabled",u2=[];h2=class extends RF{constructor(e,t,r,n){super(e,t,r);let o=this._register(n.createScoped(this.inputBox.element));this._register(RK(o,this.inputBox))}};h2=AK([DK(3,it)],h2);f2=class extends d2{constructor(e,t,r,n,o=!1){super(e,t,o,r);let s=this._register(n.createScoped(this.inputBox.element));this._register(RK(s,this.inputBox))}};f2=AK([DK(3,it)],f2);To.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:fe.and(fe.has(FI),fe.equals(NK,!0),fe.not("isComposing"),p2.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{Jl==null||Jl.showPreviousValue()}});To.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:fe.and(fe.has(FI),fe.equals(MK,!0),fe.not("isComposing"),p2.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{Jl==null||Jl.showNextValue()}})});function BI(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 PK=N(()=>{});function UK(i,e,t){let r=!!e.match(/\n/);if(t&&r&&t.selectionStart>0){i.stopPropagation();return}}function jK(i,e,t){let r=!!e.match(/\n/);if(t&&r&&t.selectionEnd<t.value.length){i.stopPropagation();return}}var Ige,Lge,OK,FK,Age,Dge,Mge,Nge,Rge,Pge,Oge,Fge,zge,Bge,Hge,Uge,jge,Wge,Vge,qge,Kge,$ge,zK,Wa,Gge,Yge,eb,Xge,BK,HK,tb,ib,kd,WK=N(()=>{Bt();Eo();LF();gk();L_();Ut();Qr();Vt();ke();En();Di();IK();et();Z0();He();zI();PK();en();xl();tn();In();nk();Fr();N_();Ige=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Lge=Ni("find-selection",pt.selection,b("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),OK=Ni("find-collapsed",pt.chevronRight,b("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),FK=Ni("find-expanded",pt.chevronDown,b("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Age=Ni("find-replace",pt.replace,b("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Dge=Ni("find-replace-all",pt.replaceAll,b("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Mge=Ni("find-previous-match",pt.arrowUp,b("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Nge=Ni("find-next-match",pt.arrowDown,b("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Rge=b("label.findDialog","Find / Replace"),Pge=b("label.find","Find"),Oge=b("placeholder.find","Find"),Fge=b("label.previousMatchButton","Previous Match"),zge=b("label.nextMatchButton","Next Match"),Bge=b("label.toggleSelectionFind","Find in Selection"),Hge=b("label.closeButton","Close"),Uge=b("label.replace","Replace"),jge=b("placeholder.replace","Replace"),Wge=b("label.replaceButton","Replace"),Vge=b("label.replaceAllButton","Replace All"),qge=b("label.toggleReplaceButton","Toggle Replace"),Kge=b("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Ua),$ge=b("label.matchesLocation","{0} of {1}"),zK=b("label.noResults","No results"),Wa=419,Gge=275,Yge=Gge-54,eb=69,Xge=33,BK="ctrlEnterReplaceAll.windows.donotask",HK=kn?256:2048,tb=class{constructor(e){this.afterLineNumber=e,this.heightInPx=Xge,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};ib=class i extends bl{constructor(e,t,r,n,o,s,a,l,c){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=r,this._contextViewProvider=n,this._keybindingService=o,this._contextKeyService=s,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(BK,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Lo(500),this._register(ii(()=>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(89)&&(this._codeEditor.getOption(89)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(142)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(40)){let u=this._codeEditor.getOption(40).loop;this._state.change({loop:u},!1);let h=this._codeEditor.getOption(40).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new tb(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Ige(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=fp.bindTo(s),this._findFocusTracker=this._register(ys(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=K0.bindTo(s),this._replaceFocusTracker=this._register(ys(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(40).addExtraSpaceOnTop&&(this._viewZone=new tb(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(89)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=qn(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,ft)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=eb+"px",this._state.matchesCount>=Ua?this._matchesCount.title=Kge: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>=Ua&&(t+="+");let r=String(this._state.matchesPosition);r==="0"&&(r="?"),e=tf($ge,r,t)}else e=zK;this._matchesCount.appendChild(document.createTextNode(e)),sr(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),eb=Math.max(eb,this._matchesCount.clientWidth)}_getAriaLabel(e,t,r){if(e===zK)return r===""?b("ariaSearchNoResultEmpty","{0} found",e):b("ariaSearchNoResult","{0} found for '{1}'",e,r);if(t){let n=b("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,r,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${n}`:n}return b("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,r)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,r=this._toggleSelectionFind.checked;this._isVisible&&(r||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 r=!this._codeEditor.getOption(89);this._toggleReplaceBtn.setEnabled(this._isVisible&&r)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(40).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let r=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=r;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(40).seedSearchStringFromSelection&&e){let r=this._codeEditor.getDomNode();if(r){let n=Qi(r),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);let l=nP(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.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(40).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let r=this._viewZone;this._viewZoneId!==void 0||!r||this._codeEditor.changeViewZones(n=>{r.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(r),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+r.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(40).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new tb(0));let r=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===r.heightInPx)return;let s=o-r.heightInPx;r.heightInPx=o,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(82).top,o<=0)return;r.heightInPx=o,this._viewZoneId=n.addZone(r),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||!tP(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 r=e.width,n=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&qn(this._domNode)>Wa){this._domNode.style.maxWidth=`${r-28-n-15}px`,this._replaceInput.width=qn(this._findInput.domNode);return}if(Wa+28+n>=r&&(s=!0),Wa+28+n-eb>=r&&(a=!0),Wa+28+n-eb>=r+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=`${r-28-n-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=qn(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 r=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!B.equalsRange(t,r)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(HK|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 UK(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return jK(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(HK|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Dc&&Mc&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(b("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(BK,!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 UK(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return jK(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 h2(null,this._contextViewProvider,{width:Yge,label:Pge,placeholder:Oge,appendCaseSensitiveLabel:this._keybindingLabelFor(ri.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ri.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ri.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:()=>BI(this._keybindingService),inputBoxStyles:uk,toggleStyles:dk},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()})),G9&&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 kd({label:Fge+this._keybindingLabelFor(ri.PreviousMatchFindAction),icon:Mge,onTrigger:()=>{Ac(this._codeEditor.getAction(ri.PreviousMatchFindAction)).run().then(void 0,ft)}})),this._nextBtn=this._register(new kd({label:zge+this._keybindingLabelFor(ri.NextMatchFindAction),icon:Nge,onTrigger:()=>{Ac(this._codeEditor.getAction(ri.NextMatchFindAction)).run().then(void 0,ft)}}));let r=document.createElement("div");r.className="find-part",r.appendChild(this._findInput.domNode);let n=document.createElement("div");n.className="find-actions",r.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new H_({icon:Lge,title:Bge+this._keybindingLabelFor(ri.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:la(pl),inputActiveOptionBorder:la(f_),inputActiveOptionForeground:la(p_)})),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)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new kd({label:Hge+this._keybindingLabelFor(ri.CloseFindWidgetCommand),icon:U_,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())}})),this._replaceInput=this._register(new f2(null,void 0,{label:Uge,placeholder:jge,appendPreserveCaseLabel:this._keybindingLabelFor(ri.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>BI(this._keybindingService),inputBoxStyles:uk,toggleStyles:dk},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 kd({label:Wge+this._keybindingLabelFor(ri.ReplaceOneAction),icon:Age,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new kd({label:Vge+this._keybindingLabelFor(ri.ReplaceAllAction),icon:Dge,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 kd({label:qge,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=qn(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.ariaLabel=Rge,this._domNode.role="dialog",this._domNode.style.width=`${Wa}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(r),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(o),this._resizeSash=new wl(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=Wa;this._register(this._resizeSash.onDidStart(()=>{a=qn(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c<Wa)return;let d=parseFloat(rP(this._domNode).maxWidth)||0;c>d||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=qn(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=qn(this._domNode);if(l<Wa)return;let c=Wa;if(!this._resized||l===Wa){let d=this._codeEditor.getLayoutInfo();c=d.width-28-d.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=qn(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){let e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}};ib.ID="editor.contrib.findWidget";kd=class extends bl{constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+_t.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,r=>{this._opts.onTrigger(),r.preventDefault()}),this.onkeydown(this._domNode,r=>{var n,o;if(r.equals(10)||r.equals(3)){this._opts.onTrigger(),r.preventDefault();return}(o=(n=this._opts).onKeyDown)===null||o===void 0||o.call(n,r)})}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(..._t.asClassNameArray(OK)),this._domNode.classList.add(..._t.asClassNameArray(FK))):(this._domNode.classList.remove(..._t.asClassNameArray(FK)),this._domNode.classList.add(..._t.asClassNameArray(OK)))}};mf((i,e)=>{let t=(g,w)=>{w&&e.addRule(`.monaco-editor ${g} { background-color: ${w}; }`)};t(".findMatch",i.getColor(CO)),t(".currentFindMatch",i.getColor(xO)),t(".findScope",i.getColor(SO));let r=i.getColor(ml);t(".find-widget",r);let n=i.getColor(u_);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);let o=i.getColor(h_);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(EO);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${bu(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(kO);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(TO);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${bu(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(Jo);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(_O);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let u=i.getColor(cO);u&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${u}; }`);let h=i.getColor(yO);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{let g=i.getColor(gu);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}let f=i.getColor(OO);f&&e.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${f} !important; } - `);let m=i.getColor(cO);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)})});function HI(i,e="single",t=!1){if(!i.hasModel())return null;let r=i.getSelection();if(e==="single"&&r.startLineNumber===r.endLineNumber||e==="multiple"){if(r.isEmpty()){let n=i.getConfiguredWordAtPosition(r.getStartPosition());if(n&&t===!1)return n.word}else if(i.getModel().getValueLengthInRange(r)<Qge)return i.getModel().getValueInRange(r)}return null}var WK,Va,eh,BI,Qge,an,UI,Zge,Jge,jI,WI,m2,VI,qI,KI,g2,$I,GI,e0e,Us,b2=N(()=>{Ut();ke();Di();lt();OO();ei();jc();Z0();SK();kK();jK();He();Zi();Ym();wt();vl();Ur();Ao();_l();_u();tn();WK=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Va=function(i,e){return function(t,r){e(t,r,i)}},eh=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Qge=524288;an=BI=class extends ce{get editor(){return this._editor}static get(e){return e.getContribution(BI.ID)}constructor(e,t,r,n){super(),this._editor=e,this._findWidgetVisible=ja.bindTo(t),this._contextKeyService=t,this._storageService=r,this._clipboardService=n,this._updateHistoryDelayer=new Lo(500),this._state=this._register(new c2),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(40).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!!fp.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=al(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return eh(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let r=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let n=HI(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);n&&(this._state.isRegex?r.searchString=al(n):r.searchString=n)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let n=HI(this._editor,e.seedSearchStringFromSelection);n&&(r.searchString=n)}if(!r.searchString&&e.seedSearchStringFromGlobalClipboard){let n=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;n&&(r.searchString=n)}if(e.forceRevealReplace||r.isReplaceRevealed?r.isReplaceRevealed=!0:this._findWidgetVisible.get()||(r.isReplaceRevealed=!1),e.updateSearchScope){let n=this._editor.getSelections();n.some(o=>!o.isEmpty())&&(r.searchScope=n)}r.loop=e.loop,this._state.change(r,!1),this._model||(this._model=new a2(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 eh(this,void 0,void 0,function*(){return this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};an.ID="editor.contrib.findController";an=BI=WK([Va(1,it),Va(2,Gn),Va(3,Ts)],an);UI=class extends an{constructor(e,t,r,n,o,s,a,l){super(e,r,a,l),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let r=Object.create(null,{_start:{get:()=>super._start}});return eh(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let n=this._editor.getSelection(),o=!1;switch(this._editor.getOption(40).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!n&&n.startLineNumber!==n.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield r._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 ib(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new J0(this._editor,this._state,this._keybindingService))}};UI=WK([Va(1,qc),Va(2,it),Va(3,qt),Va(4,gr),Va(5,Mi),Va(6,Gn),Va(7,Ts)],UI);Zge=j3(new U3({id:ri.StartFindAction,label:b("startFindAction","Find"),alias:"Find",precondition:fe.or(F.focus,fe.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"3_find",title:b({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Zge.addImplementation(0,(i,e,t)=>{let r=an.get(e);return r?r.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(40).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(40).loop}):!1});Jge={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:b("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. + `);let m=i.getColor(dO);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)})});function UI(i,e="single",t=!1){if(!i.hasModel())return null;let r=i.getSelection();if(e==="single"&&r.startLineNumber===r.endLineNumber||e==="multiple"){if(r.isEmpty()){let n=i.getConfiguredWordAtPosition(r.getStartPosition());if(n&&t===!1)return n.word}else if(i.getModel().getValueLengthInRange(r)<Qge)return i.getModel().getValueInRange(r)}return null}var VK,Va,eh,HI,Qge,an,jI,Zge,Jge,WI,VI,m2,qI,KI,$I,g2,GI,YI,e0e,Us,b2=N(()=>{Ut();ke();Di();lt();FO();ei();jc();Z0();kK();EK();WK();He();Zi();Ym();wt();vl();Ur();Ao();_l();_u();tn();VK=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Va=function(i,e){return function(t,r){e(t,r,i)}},eh=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Qge=524288;an=HI=class extends ce{get editor(){return this._editor}static get(e){return e.getContribution(HI.ID)}constructor(e,t,r,n){super(),this._editor=e,this._findWidgetVisible=ja.bindTo(t),this._contextKeyService=t,this._storageService=r,this._clipboardService=n,this._updateHistoryDelayer=new Lo(500),this._state=this._register(new c2),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(40).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!!fp.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=al(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return eh(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let r=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let n=UI(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);n&&(this._state.isRegex?r.searchString=al(n):r.searchString=n)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let n=UI(this._editor,e.seedSearchStringFromSelection);n&&(r.searchString=n)}if(!r.searchString&&e.seedSearchStringFromGlobalClipboard){let n=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;n&&(r.searchString=n)}if(e.forceRevealReplace||r.isReplaceRevealed?r.isReplaceRevealed=!0:this._findWidgetVisible.get()||(r.isReplaceRevealed=!1),e.updateSearchScope){let n=this._editor.getSelections();n.some(o=>!o.isEmpty())&&(r.searchScope=n)}r.loop=e.loop,this._state.change(r,!1),this._model||(this._model=new a2(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 eh(this,void 0,void 0,function*(){return this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(40).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};an.ID="editor.contrib.findController";an=HI=VK([Va(1,it),Va(2,Gn),Va(3,Ts)],an);jI=class extends an{constructor(e,t,r,n,o,s,a,l){super(e,r,a,l),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let r=Object.create(null,{_start:{get:()=>super._start}});return eh(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let n=this._editor.getSelection(),o=!1;switch(this._editor.getOption(40).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!n&&n.startLineNumber!==n.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield r._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 ib(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new J0(this._editor,this._state,this._keybindingService))}};jI=VK([Va(1,qc),Va(2,it),Va(3,qt),Va(4,gr),Va(5,Mi),Va(6,Gn),Va(7,Ts)],jI);Zge=W3(new j3({id:ri.StartFindAction,label:b("startFindAction","Find"),alias:"Find",precondition:fe.or(F.focus,fe.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"3_find",title:b({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Zge.addImplementation(0,(i,e,t)=>{let r=an.get(e);return r?r.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(40).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(40).loop}):!1});Jge={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:b("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. The flag will not be saved for the future. 0: Do Nothing 1: True @@ -25,50 +25,50 @@ 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"}}}}]},jI=class extends de{constructor(){super({id:ri.StartFindWithArgs,label:b("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:Jge})}run(e,t,r){return eh(this,void 0,void 0,function*(){let n=an.get(t);if(n){let o=r?{searchString:r.searchString,replaceString:r.replaceString,isReplaceRevealed:r.replaceString!==void 0,isRegex:r.isRegex,wholeWord:r.matchWholeWord,matchCase:r.isCaseSensitive,preserveCase:r.preserveCase}:{};yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(r==null?void 0:r.findInSelection)||!1,loop:t.getOption(40).loop},o),n.setGlobalBufferTerm(n.getState().searchString)}})}},WI=class extends de{constructor(){super({id:ri.StartFindWithSelection,label:b("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 eh(this,void 0,void 0,function*(){let r=an.get(t);r&&(yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),r.setGlobalBufferTerm(r.getState().searchString))})}},m2=class extends de{run(e,t){return eh(this,void 0,void 0,function*(){let r=an.get(t);r&&!this._run(r)&&(yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(r))})}},VI=class extends m2{constructor(){super({id:ri.NextMatchFindAction,label:b("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:F.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:fe.and(F.focus,fp),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},qI=class extends m2{constructor(){super({id:ri.PreviousMatchFindAction,label:b("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:F.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:fe.and(F.focus,fp),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},KI=class extends de{constructor(){super({id:ri.GoToMatchFindAction,label:b("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:ja}),this._highlightDecorations=[]}run(e,t,r){let n=an.get(t);if(!n)return;let o=n.getState().matchesCount;if(o<1){e.get(Mi).notify({severity:_f.Warning,message:b("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(rn).createInputBox();a.placeholder=b("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=n.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,n.goToMatch(u);let h=n.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=b("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(n.goToMatch(d),a.hide()):a.validationMessage=b("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.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(r=>{this._highlightDecorations=r.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:ki(b_),position:$n.Full}}}])})}},g2=class extends de{run(e,t){return eh(this,void 0,void 0,function*(){let r=an.get(t);if(!r)return;let n=HI(t,"single",!1);n&&r.setSearchString(n),this._run(r)||(yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(r))})}},$I=class extends g2{constructor(){super({id:ri.NextSelectionMatchFindAction,label:b("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},GI=class extends g2{constructor(){super({id:ri.PreviousSelectionMatchFindAction,label:b("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},e0e=j3(new U3({id:ri.StartFindReplaceAction,label:b("startReplace","Replace"),alias:"Replace",precondition:fe.or(F.focus,fe.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"3_find",title:b({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));e0e.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(89))return!1;let r=an.get(e);if(!r)return!1;let n=e.getSelection(),o=r.isFindInputFocused(),s=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(40).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return r.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(40).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(40).loop})});Ue(an.ID,UI,0);ee(jI);ee(WI);ee(VI);ee(qI);ee(KI);ee($I);ee(GI);Us=Oi.bindToContribution(an.get);We(new Us({id:ri.CloseFindWidgetCommand,precondition:ja,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:9,secondary:[1033]}}));We(new Us({id:ri.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:$0.primary,mac:$0.mac,win:$0.win,linux:$0.linux}}));We(new Us({id:ri.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:G0.primary,mac:G0.mac,win:G0.win,linux:G0.linux}}));We(new Us({id:ri.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:Y0.primary,mac:Y0.mac,win:Y0.win,linux:Y0.linux}}));We(new Us({id:ri.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:X0.primary,mac:X0.mac,win:X0.win,linux:X0.linux}}));We(new Us({id:ri.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:Q0.primary,mac:Q0.mac,win:Q0.win,linux:Q0.linux}}));We(new Us({id:ri.ReplaceOneAction,precondition:ja,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:3094}}));We(new Us({id:ri.ReplaceOneAction,precondition:ja,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,K0),primary:3}}));We(new Us({id:ri.ReplaceAllAction,precondition:ja,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:2563}}));We(new Us({id:ri.ReplaceAllAction,precondition:ja,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,K0),primary:void 0,mac:{primary:2051}}}));We(new Us({id:ri.SelectAllMatchesAction,precondition:ja,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:515}}))});var VK=N(()=>{});var qK=N(()=>{VK()});var t0e,KK,zo,$K,rb,ln,YI,nb=N(()=>{t0e={0:" ",1:"u",2:"r"},KK=65535,zo=16777215,$K=4278190080,rb=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,r=e%32;return(this._states[t]&1<<r)!==0}set(e,t){let r=e/32|0,n=e%32,o=this._states[r];t?this._states[r]=o|1<<n:this._states[r]=o&~(1<<n)}},ln=class i{constructor(e,t,r){if(e.length!==t.length||e.length>KK)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new rb(e.length),this._userDefinedStates=new rb(e.length),this._recoveredStates=new rb(e.length),this._types=r,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(r,n)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=r&&this.getEndLineNumber(o)>=n};for(let r=0,n=this._startIndexes.length;r<n;r++){let o=this._startIndexes[r],s=this._endIndexes[r];if(o>zo||s>zo)throw new Error("startLineNumber or endLineNumber must not exceed "+zo);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(r),this._startIndexes[r]=o+((a&255)<<24),this._endIndexes[r]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&zo}getEndLineNumber(e){return this._endIndexes[e]&zo}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 r=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===e&&(this.setCollapsed(n,t),r=!0);return r}toRegion(e){return new YI(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&$K)>>>24)+((this._endIndexes[e]&$K)>>>16);return t===KK?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,r=this._startIndexes.length;if(r===0)return-1;for(;t<r;){let n=Math.floor((t+r)/2);e<this.getStartLineNumber(n)?r=n:t=n+1}return t-1}findRange(e){let t=this.findIndex(e);if(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;t<this.length;t++)e[t]=`[${t0e[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&zo,endLineNumber:this._endIndexes[e]&zo,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){let t=e.length,r=new Uint32Array(t),n=new Uint32Array(t),o=[],s=!1;for(let l=0;l<t;l++){let c=e[l];r[l]=c.startLineNumber,n[l]=c.endLineNumber,o.push(c.type),c.type&&(s=!0)}s||(o=void 0);let a=new i(r,n,o);for(let l=0;l<t;l++)e[l].isCollapsed&&a.setCollapsed(l,!0),a.setSource(l,e[l].source);return a}static sanitizeAndMerge(e,t,r){r=r!=null?r:Number.MAX_VALUE;let n=(g,w)=>Array.isArray(g)?_=>_<w?g[_]:void 0:_=>_<w?g.toFoldRange(_):void 0,o=n(e,e.length),s=n(t,t.length),a=0,l=0,c=o(0),d=s(0),u=[],h,f=0,m=[];for(;c||d;){let g;if(d&&(!c||c.startLineNumber>=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 w=l,_=d;for(;;){if(!_||_.startLineNumber>c.endLineNumber){g=c;break}if(_.source===1&&_.endLineNumber>c.endLineNumber)break;_=s(++w)}c=o(++a)}if(g){for(;h&&h.endLineNumber<g.startLineNumber;)h=u.pop();g.endLineNumber>g.startLineNumber&&g.startLineNumber>f&&g.endLineNumber<=r&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),f=g.startLineNumber,h&&u.push(h),h=g)}}return m}},YI=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 _2(i,e,t){let r=[];for(let n of t){let o=i.getRegionAtLine(n);if(o){let s=!o.isCollapsed;if(r.push(o),e>1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c<e);r.push(...a)}}}i.toggleCollapseState(r)}function th(i,e,t=Number.MAX_VALUE,r){let n=[];if(r&&r.length>0)for(let o of r){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&n.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&c<t);n.push(...a)}}else{let o=i.getRegionsInside(null,(s,a)=>s.isCollapsed!==e&&a<t);n.push(...o)}i.toggleCollapseState(n)}function XI(i,e,t,r){let n=[];for(let o of r){let s=i.getAllRegionsAtLine(o,(a,l)=>a.isCollapsed!==e&&l<=t);n.push(...s)}i.toggleCollapseState(n)}function GK(i,e,t){let r=[];for(let n of t){let o=i.getAllRegionsAtLine(n,s=>s.isCollapsed!==e);o.length>0&&r.push(o[0])}i.toggleCollapseState(r)}function YK(i,e,t,r){let n=(s,a)=>a===e&&s.isCollapsed!==t&&!r.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,n);i.toggleCollapseState(o)}function QI(i,e,t){let r=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&r.push(a[0])}let n=s=>r.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,n);i.toggleCollapseState(o)}function y2(i,e,t){let r=i.textModel,n=i.regions,o=[];for(let s=n.length-1;s>=0;s--)if(t!==n.isCollapsed(s)){let a=n.getStartLineNumber(s);e.test(r.getLineContent(a))&&o.push(n.toRegion(s))}i.toggleCollapseState(o)}function w2(i,e,t){let r=i.regions,n=[];for(let o=r.length-1;o>=0;o--)t!==r.isCollapsed(o)&&e===r.getType(o)&&n.push(r.toRegion(o));i.toggleCollapseState(n)}function XK(i,e){let t=null,r=e.getRegionAtLine(i);if(r!==null&&(t=r.startLineNumber,i===t)){let n=r.parentIndex;n!==-1?t=e.regions.getStartLineNumber(n):t=null}return t}function QK(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let r=t.parentIndex,n=0;for(r!==-1&&(n=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=n)return null;if(t.parentIndex===r)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.startLineNumber<i)return t.startLineNumber;t.regionIndex>0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function ZK(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let r=t.parentIndex,n=0;if(r!==-1)n=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;n=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex<e.regions.length){if(t=e.regions.toRegion(t.regionIndex+1),t.startLineNumber>=n)return null;if(t.parentIndex===r)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<e.regions.length?t=e.regions.toRegion(t.regionIndex+1):t=null}return null}var v2,ZI=N(()=>{Jt();nb();wF();v2=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new Je,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new ln(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((r,n)=>r.regionIndex-n.regionIndex);let t={};this._decorationProvider.changeDecorations(r=>{let n=0,o=-1,s=-1,a=l=>{for(;n<l;){let c=this._regions.getEndLineNumber(n),d=this._regions.isCollapsed(n);if(c<=o){let u=this.regions.getSource(n)!==0;r.changeDecorationOptions(this._editorDecorationIds[n],this._decorationProvider.getDecorationOption(d,c<=s,u))}d&&c>s&&(s=c),n++}};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,r=n=>{for(let o of e)if(!(o.startLineNumber>n.endLineNumber||n.startLineNumber>o.endLineNumber))return!0;return!1};for(let n=0;n<this._regions.length;n++){let o=this._regions.toFoldRange(n);(o.source===0||!r(o))&&t.push(o)}this.updatePost(ln.fromFoldRanges(t))}update(e,t=[]){let r=this._currentFoldedOrManualRanges(t),n=ln.sanitizeAndMerge(e,r,this._textModel.getLineCount());this.updatePost(ln.fromFoldRanges(n))}updatePost(e){let t=[],r=-1;for(let n=0,o=e.length;n<o;n++){let s=e.getStartLineNumber(n),a=e.getEndLineNumber(n),l=e.isCollapsed(n),c=e.getSource(n)!==0,d={startLineNumber:s,startColumn:this._textModel.getLineMaxColumn(s),endLineNumber:a,endColumn:this._textModel.getLineMaxColumn(a)+1};t.push({range:d,options:this._decorationProvider.getDecorationOption(l,a<=r,c)}),l&&a>r&&(r=a)}this._decorationProvider.changeDecorations(n=>this._editorDecorationIds=n.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(n,o)=>{for(let s of e)if(n<s&&s<=o)return!0;return!1},r=[];for(let n=0,o=this._regions.length;n<o;n++){let s=this.regions.isCollapsed(n),a=this.regions.getSource(n);if(s||a!==0){let l=this._regions.toFoldRange(n),c=this._textModel.getDecorationRange(this._editorDecorationIds[n]);c&&(s&&t(c.startLineNumber,c.endLineNumber)&&(s=!1),r.push({startLineNumber:c.startLineNumber,endLineNumber:c.endLineNumber,type:l.type,isCollapsed:s,source:a}))}}return r}getMemento(){let e=this._currentFoldedOrManualRanges(),t=[],r=this._textModel.getLineCount();for(let n=0,o=e.length;n<o;n++){let s=e[n];if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>r)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,r;if(!Array.isArray(e))return;let n=[],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)&&n.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(r=a.source)!==null&&r!==void 0?r:0})}let s=ln.sanitizeAndMerge(this._regions,n,o);this.updatePost(ln.fromFoldRanges(s))}_getLinesChecksum(e,t){return F_(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let r=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){let s=this._regions.toRegion(n);(!t||t(s,o))&&r.push(s),o++,n=s.parentIndex}}return r}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 r=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=n,l=this._regions.length;a<l;a++){let c=this._regions.toRegion(a);if(this._regions.getStartLineNumber(a)<o){for(;s.length>0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&r.push(c)}else break}}else for(let s=n,a=this._regions.length;s<a;s++){let l=this._regions.toRegion(s);if(this._regions.getStartLineNumber(s)<o)(!t||t(l))&&r.push(l);else break}return r}}});function i0e(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function JK(i,e){let t=Qv(i,r=>e<r.startLineNumber)-1;return t>=0&&i[t].endLineNumber>=e?i[t]:null}var x2,e$=N(()=>{pi();Jt();et();vre();x2=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new Je,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||iO(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],r=0,n=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;r<a.length;r++){if(!a.isCollapsed(r))continue;let l=a.getStartLineNumber(r)+1,c=a.getEndLineNumber(r);o<=l&&c<=s||(!e&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===l&&this._hiddenRanges[n].endLineNumber===c?(t.push(this._hiddenRanges[n]),n++):(e=!0,t.push(new B(l,1,c,1))),o=l,s=c)}(this._hasLineChanges||e||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return JK(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,r=this._foldingModel.textModel,n=null,o=s=>((!n||!i0e(s,n))&&(n=JK(this._hiddenRanges,s)),n?n.startLineNumber-1:null);for(let s=0,a=e.length;s<a;s++){let l=e[s],c=o(l.startLineNumber);c&&(l=l.setStartPosition(c,r.getLineMaxColumn(c)),t=!0);let d=o(l.endLineNumber);d&&(l=l.setEndPosition(d,r.getLineMaxColumn(d)),t=!0),e[s]=l}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}});function s0e(i,e,t,r=o0e){let n=i.getOptions().tabSize,o=new JI(r),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,n),h=a[a.length-1];if(u===-1){e&&(h.endAbove=c);continue}let f;if(s&&(f=d.match(s)))if(f[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 r0e,n0e,ih,JI,o0e,eL=N(()=>{FO();nb();r0e=5e3,n0e="indent",ih=class{constructor(e,t,r){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=r,this.id=n0e}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,r=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(s0e(this.editorModel,r,n,this.foldingRangesLimit))}},JI=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,r){if(e>zo||t>zo)return;let n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,r<1e3&&(this._indentOccurrences[r]=(this._indentOccurrences[r]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let r=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)r[s]=this._startIndexes[o],n[s]=this._endIndexes[o];return new ln(r,n)}else{this._foldingRangesLimit.update(this._length,t);let r=0,n=this._indentOccurrences.length;for(let l=0;l<this._indentOccurrences.length;l++){let c=this._indentOccurrences[l];if(c){if(c+r>t){n=l;break}r+=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<n||h===n&&r++<t)&&(s[c]=d,a[c]=this._endIndexes[l],c++)}return new ln(s,a)}}},o0e={limit:r0e,update:()=>{}}});var a0e,ob,sb,t$,i$,tL,zn,iL=N(()=>{Qr();jc();Hr();He();en();xl();tn();In();a0e=je("editor.foldBackground",{light:Mn(J3,.3),dark:Mn(J3,.3),hcDark:null,hcLight:null},b("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);je("editorGutter.foldingControlForeground",{dark:zm,light:zm,hcDark:zm,hcLight:zm},b("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));ob=Ni("folding-expanded",pt.chevronDown,b("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),sb=Ni("folding-collapsed",pt.chevronRight,b("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),t$=Ni("folding-manual-collapsed",sb,b("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),i$=Ni("folding-manual-expanded",ob,b("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),tL={color:ki(a0e),position:sa.Inline},zn=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,r){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?r?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"?r?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:r?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};zn.COLLAPSED_VISUAL_DECORATION=mt.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(sb)});zn.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=mt.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:tL,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(sb)});zn.MANUALLY_COLLAPSED_VISUAL_DECORATION=mt.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(t$)});zn.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=mt.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:tL,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(t$)});zn.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});zn.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:tL,isWholeLine:!0});zn.EXPANDED_VISUAL_DECORATION=mt.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_t.asClassName(ob)});zn.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=mt.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(ob)});zn.MANUALLY_EXPANDED_VISUAL_DECORATION=mt.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_t.asClassName(i$)});zn.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=mt.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(i$)});zn.NO_CONTROLS_EXPANDED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});zn.HIDDEN_RANGE_DECORATION=mt.register({description:"folding-hidden-range-decoration",stickiness:1})});function d0e(i,e,t){let r=null,n=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,l0e,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(r)||(r=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&r.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},Yt));return Promise.all(n).then(o=>r)}function u0e(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),r=new rL(e),n,o=[];for(let s of t)if(!n)n=s,r.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>n.start)if(s.end<=n.end)o.push(n),n=s,r.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>n.end){do n=o.pop();while(n&&s.start>n.end);n&&o.push(n),n=s}r.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return r.toIndentRanges()}var l0e,c0e,rh,rL,nL=N(()=>{Vt();ke();nb();l0e={},c0e="syntax",rh=class{constructor(e,t,r,n,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=r,this.foldingRangesLimit=n,this.fallbackRangeProvider=o,this.id=c0e,this.disposables=new le,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(r))}compute(e){return d0e(this.providers,this.editorModel,e).then(t=>{var r,n;return t?u0e(t,this.foldingRangesLimit):(n=(r=this.fallbackRangeProvider)===null||r===void 0?void 0:r.compute(e))!==null&&n!==void 0?n:null})}dispose(){this.disposables.dispose()}};rL=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,r,n){if(e>zo||t>zo)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=r,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let n=0;n<this._length;n++)t[n]=this._startIndexes[n],r[n]=this._endIndexes[n];return new ln(t,r,this._types)}else{this._foldingRangesLimit.update(this._length,e);let t=0,r=this._nestingLevelCounts.length;for(let a=0;a<this._nestingLevelCounts.length;a++){let l=this._nestingLevelCounts[a];if(l){if(l+t>e){r=a;break}t+=l}}let n=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a<this._length;a++){let c=this._nestingLevels[a];(c<r||c===r&&t++<e)&&(n[l]=this._startIndexes[a],o[l]=this._endIndexes[a],s[l]=this._types[a],l++)}return new ln(n,o,s)}}}});function r$(i){if(!Em(i)){if(!Fv(i))return!1;let e=i;if(!Em(e.levels)&&!D3(e.levels)||!Em(e.direction)&&!Ov(e.direction)||!Em(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(D3)))return!1}return!0}var f0e,ab,p0e,pp,qr,us,lb,Mr,oL,sL,aL,lL,cL,dL,uL,hL,fL,pL,mL,gL,nh,bL,vL,_L,yL,wL,cb=N(()=>{Ut();Si();Vt();sl();ke();Di();Fr();qK();P_();lt();ei();hn();Br();ZI();e$();eL();He();wt();iL();nb();nL();Ao();Ls();ol();Rt();Jt();Wi();Tr();Go();Cr();f0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ab=function(i,e){return function(t,r){e(t,r,i)}},p0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},qr=new ht("foldingEnabled",!1),us=pp=class extends ce{static get(e){return e.getContribution(pp.ID)}static getFoldingRangeProviders(e,t){var r,n;let o=e.foldingRangeProvider.ordered(t);return(n=(r=pp._foldingRangeSelector)===null||r===void 0?void 0:r.call(pp,o,t))!==null&&n!==void 0?n:o}constructor(e,t,r,n,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=r,this.languageFeaturesService=s,this.localToDispose=this._register(new le),this.editor=e,this._foldingLimitReporter=new lb(e);let a=this.editor.getOptions();this._isEnabled=a.get(42),this._useFoldingProviders=a.get(43)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(47),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(45),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 zn(e),this.foldingDecorationProvider.showFoldingControls=a.get(108),this.foldingDecorationProvider.showFoldingHighlights=a.get(44),this.foldingEnabled=qr.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(42)&&(this._isEnabled=this.editor.getOptions().get(42),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(46)&&this.onModelChanged(),l.hasChanged(108)||l.hasChanged(44)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(108),this.foldingDecorationProvider.showFoldingHighlights=c.get(44),this.triggerFoldingModelChanged()}l.hasChanged(43)&&(this._useFoldingProviders=this.editor.getOptions().get(43)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(47)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(47)),l.hasChanged(45)&&(this._foldingImportsByDefault=this.editor.getOptions().get(45))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),r=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:r,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 v2(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new x2(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Lo(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new di(()=>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,r;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,(r=this.rangeProvider)===null||r===void 0||r.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 ih(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let r=pp.getFoldingRangeProviders(this.languageFeaturesService,e);r.length>0&&(this.rangeProvider=new rh(e,r,()=>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 pr,r=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=Zt(o=>r.compute(o));return n.then(o=>{if(o&&n===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(gf.Imports.value,!0);d&&(s=ga.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=>(ft(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 r=this.editor.getSelections();if(r&&r.length>0){let n=[];for(let o of r){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&n.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}n.length&&(t.toggleCollapseState(n),this.reveal(r[0].getPosition()))}}}).then(void 0,ft)}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,r=!1;switch(e.target.type){case 4:{let n=e.target.detail,o=e.target.element.offsetLeft;if(n.offsetX-o<4)return;r=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let n=this.editor.getModel();if(n&&t.startColumn===n.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:r}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let r=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==r)return;if(n){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(r))return}let s=t.getRegionAtLine(r);if(s&&s.startLineNumber===r){let a=s.isCollapsed;if(n||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:r,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};us.ID="editor.contrib.folding";us=pp=f0e([ab(1,it),ab(2,Pt),ab(3,Mi),ab(4,ar),ab(5,Se)],us);lb=class{constructor(e){this.editor=e,this._onDidChange=new Je,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(46)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Mr=class extends de{runEditorCommand(e,t,r){let n=e.get(Pt),o=us.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,r,n);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(r=>r.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(r=>r+1):this.getSelectedLines(t)}run(e,t){}};oL=class extends Mr{constructor(){super({id:"editor.unfold",label:b("unfoldAction.label","Unfold"),alias:"Unfold",precondition:qr,kbOpts:{kbExpr:F.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"}}}}]},WI=class extends de{constructor(){super({id:ri.StartFindWithArgs,label:b("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:Jge})}run(e,t,r){return eh(this,void 0,void 0,function*(){let n=an.get(t);if(n){let o=r?{searchString:r.searchString,replaceString:r.replaceString,isReplaceRevealed:r.replaceString!==void 0,isRegex:r.isRegex,wholeWord:r.matchWholeWord,matchCase:r.isCaseSensitive,preserveCase:r.preserveCase}:{};yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(r==null?void 0:r.findInSelection)||!1,loop:t.getOption(40).loop},o),n.setGlobalBufferTerm(n.getState().searchString)}})}},VI=class extends de{constructor(){super({id:ri.StartFindWithSelection,label:b("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 eh(this,void 0,void 0,function*(){let r=an.get(t);r&&(yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),r.setGlobalBufferTerm(r.getState().searchString))})}},m2=class extends de{run(e,t){return eh(this,void 0,void 0,function*(){let r=an.get(t);r&&!this._run(r)&&(yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(40).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(r))})}},qI=class extends m2{constructor(){super({id:ri.NextMatchFindAction,label:b("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:F.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:fe.and(F.focus,fp),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},KI=class extends m2{constructor(){super({id:ri.PreviousMatchFindAction,label:b("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:F.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:fe.and(F.focus,fp),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},$I=class extends de{constructor(){super({id:ri.GoToMatchFindAction,label:b("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:ja}),this._highlightDecorations=[]}run(e,t,r){let n=an.get(t);if(!n)return;let o=n.getState().matchesCount;if(o<1){e.get(Mi).notify({severity:_f.Warning,message:b("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(rn).createInputBox();a.placeholder=b("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=n.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,n.goToMatch(u);let h=n.getState().currentMatch;h&&this.addDecorations(t,h)}else a.validationMessage=b("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(n.goToMatch(d),a.hide()):a.validationMessage=b("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.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(r=>{this._highlightDecorations=r.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:ki(b_),position:$n.Full}}}])})}},g2=class extends de{run(e,t){return eh(this,void 0,void 0,function*(){let r=an.get(t);if(!r)return;let n=UI(t,"single",!1);n&&r.setSearchString(n),this._run(r)||(yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(40).loop}),this._run(r))})}},GI=class extends g2{constructor(){super({id:ri.NextSelectionMatchFindAction,label:b("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},YI=class extends g2{constructor(){super({id:ri.PreviousSelectionMatchFindAction,label:b("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},e0e=W3(new j3({id:ri.StartFindReplaceAction,label:b("startReplace","Replace"),alias:"Replace",precondition:fe.or(F.focus,fe.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Me.MenubarEditMenu,group:"3_find",title:b({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));e0e.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(89))return!1;let r=an.get(e);if(!r)return!1;let n=e.getSelection(),o=r.isFindInputFocused(),s=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(40).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return r.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(40).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(40).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(40).loop})});Ue(an.ID,jI,0);ee(WI);ee(VI);ee(qI);ee(KI);ee($I);ee(GI);ee(YI);Us=Oi.bindToContribution(an.get);We(new Us({id:ri.CloseFindWidgetCommand,precondition:ja,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:9,secondary:[1033]}}));We(new Us({id:ri.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:$0.primary,mac:$0.mac,win:$0.win,linux:$0.linux}}));We(new Us({id:ri.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:G0.primary,mac:G0.mac,win:G0.win,linux:G0.linux}}));We(new Us({id:ri.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:Y0.primary,mac:Y0.mac,win:Y0.win,linux:Y0.linux}}));We(new Us({id:ri.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:X0.primary,mac:X0.mac,win:X0.win,linux:X0.linux}}));We(new Us({id:ri.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:Q0.primary,mac:Q0.mac,win:Q0.win,linux:Q0.linux}}));We(new Us({id:ri.ReplaceOneAction,precondition:ja,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:3094}}));We(new Us({id:ri.ReplaceOneAction,precondition:ja,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,K0),primary:3}}));We(new Us({id:ri.ReplaceAllAction,precondition:ja,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:2563}}));We(new Us({id:ri.ReplaceAllAction,precondition:ja,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:fe.and(F.focus,K0),primary:void 0,mac:{primary:2051}}}));We(new Us({id:ri.SelectAllMatchesAction,precondition:ja,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:F.focus,primary:515}}))});var qK=N(()=>{});var KK=N(()=>{qK()});var t0e,$K,zo,GK,rb,ln,XI,nb=N(()=>{t0e={0:" ",1:"u",2:"r"},$K=65535,zo=16777215,GK=4278190080,rb=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,r=e%32;return(this._states[t]&1<<r)!==0}set(e,t){let r=e/32|0,n=e%32,o=this._states[r];t?this._states[r]=o|1<<n:this._states[r]=o&~(1<<n)}},ln=class i{constructor(e,t,r){if(e.length!==t.length||e.length>$K)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new rb(e.length),this._userDefinedStates=new rb(e.length),this._recoveredStates=new rb(e.length),this._types=r,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(r,n)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=r&&this.getEndLineNumber(o)>=n};for(let r=0,n=this._startIndexes.length;r<n;r++){let o=this._startIndexes[r],s=this._endIndexes[r];if(o>zo||s>zo)throw new Error("startLineNumber or endLineNumber must not exceed "+zo);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(r),this._startIndexes[r]=o+((a&255)<<24),this._endIndexes[r]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&zo}getEndLineNumber(e){return this._endIndexes[e]&zo}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 r=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===e&&(this.setCollapsed(n,t),r=!0);return r}toRegion(e){return new XI(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&GK)>>>24)+((this._endIndexes[e]&GK)>>>16);return t===$K?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,r=this._startIndexes.length;if(r===0)return-1;for(;t<r;){let n=Math.floor((t+r)/2);e<this.getStartLineNumber(n)?r=n:t=n+1}return t-1}findRange(e){let t=this.findIndex(e);if(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;t<this.length;t++)e[t]=`[${t0e[this.getSource(t)]}${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}toFoldRange(e){return{startLineNumber:this._startIndexes[e]&zo,endLineNumber:this._endIndexes[e]&zo,type:this._types?this._types[e]:void 0,isCollapsed:this.isCollapsed(e),source:this.getSource(e)}}static fromFoldRanges(e){let t=e.length,r=new Uint32Array(t),n=new Uint32Array(t),o=[],s=!1;for(let l=0;l<t;l++){let c=e[l];r[l]=c.startLineNumber,n[l]=c.endLineNumber,o.push(c.type),c.type&&(s=!0)}s||(o=void 0);let a=new i(r,n,o);for(let l=0;l<t;l++)e[l].isCollapsed&&a.setCollapsed(l,!0),a.setSource(l,e[l].source);return a}static sanitizeAndMerge(e,t,r){r=r!=null?r:Number.MAX_VALUE;let n=(g,w)=>Array.isArray(g)?_=>_<w?g[_]:void 0:_=>_<w?g.toFoldRange(_):void 0,o=n(e,e.length),s=n(t,t.length),a=0,l=0,c=o(0),d=s(0),u=[],h,f=0,m=[];for(;c||d;){let g;if(d&&(!c||c.startLineNumber>=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 w=l,_=d;for(;;){if(!_||_.startLineNumber>c.endLineNumber){g=c;break}if(_.source===1&&_.endLineNumber>c.endLineNumber)break;_=s(++w)}c=o(++a)}if(g){for(;h&&h.endLineNumber<g.startLineNumber;)h=u.pop();g.endLineNumber>g.startLineNumber&&g.startLineNumber>f&&g.endLineNumber<=r&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),f=g.startLineNumber,h&&u.push(h),h=g)}}return m}},XI=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 _2(i,e,t){let r=[];for(let n of t){let o=i.getRegionAtLine(n);if(o){let s=!o.isCollapsed;if(r.push(o),e>1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c<e);r.push(...a)}}}i.toggleCollapseState(r)}function th(i,e,t=Number.MAX_VALUE,r){let n=[];if(r&&r.length>0)for(let o of r){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&n.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&c<t);n.push(...a)}}else{let o=i.getRegionsInside(null,(s,a)=>s.isCollapsed!==e&&a<t);n.push(...o)}i.toggleCollapseState(n)}function QI(i,e,t,r){let n=[];for(let o of r){let s=i.getAllRegionsAtLine(o,(a,l)=>a.isCollapsed!==e&&l<=t);n.push(...s)}i.toggleCollapseState(n)}function YK(i,e,t){let r=[];for(let n of t){let o=i.getAllRegionsAtLine(n,s=>s.isCollapsed!==e);o.length>0&&r.push(o[0])}i.toggleCollapseState(r)}function XK(i,e,t,r){let n=(s,a)=>a===e&&s.isCollapsed!==t&&!r.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,n);i.toggleCollapseState(o)}function ZI(i,e,t){let r=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&r.push(a[0])}let n=s=>r.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,n);i.toggleCollapseState(o)}function y2(i,e,t){let r=i.textModel,n=i.regions,o=[];for(let s=n.length-1;s>=0;s--)if(t!==n.isCollapsed(s)){let a=n.getStartLineNumber(s);e.test(r.getLineContent(a))&&o.push(n.toRegion(s))}i.toggleCollapseState(o)}function w2(i,e,t){let r=i.regions,n=[];for(let o=r.length-1;o>=0;o--)t!==r.isCollapsed(o)&&e===r.getType(o)&&n.push(r.toRegion(o));i.toggleCollapseState(n)}function QK(i,e){let t=null,r=e.getRegionAtLine(i);if(r!==null&&(t=r.startLineNumber,i===t)){let n=r.parentIndex;n!==-1?t=e.regions.getStartLineNumber(n):t=null}return t}function ZK(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let r=t.parentIndex,n=0;for(r!==-1&&(n=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=n)return null;if(t.parentIndex===r)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.startLineNumber<i)return t.startLineNumber;t.regionIndex>0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function JK(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let r=t.parentIndex,n=0;if(r!==-1)n=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;n=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex<e.regions.length){if(t=e.regions.toRegion(t.regionIndex+1),t.startLineNumber>=n)return null;if(t.parentIndex===r)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<e.regions.length?t=e.regions.toRegion(t.regionIndex+1):t=null}return null}var v2,JI=N(()=>{Jt();nb();xF();v2=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new Je,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new ln(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((r,n)=>r.regionIndex-n.regionIndex);let t={};this._decorationProvider.changeDecorations(r=>{let n=0,o=-1,s=-1,a=l=>{for(;n<l;){let c=this._regions.getEndLineNumber(n),d=this._regions.isCollapsed(n);if(c<=o){let u=this.regions.getSource(n)!==0;r.changeDecorationOptions(this._editorDecorationIds[n],this._decorationProvider.getDecorationOption(d,c<=s,u))}d&&c>s&&(s=c),n++}};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,r=n=>{for(let o of e)if(!(o.startLineNumber>n.endLineNumber||n.startLineNumber>o.endLineNumber))return!0;return!1};for(let n=0;n<this._regions.length;n++){let o=this._regions.toFoldRange(n);(o.source===0||!r(o))&&t.push(o)}this.updatePost(ln.fromFoldRanges(t))}update(e,t=[]){let r=this._currentFoldedOrManualRanges(t),n=ln.sanitizeAndMerge(e,r,this._textModel.getLineCount());this.updatePost(ln.fromFoldRanges(n))}updatePost(e){let t=[],r=-1;for(let n=0,o=e.length;n<o;n++){let s=e.getStartLineNumber(n),a=e.getEndLineNumber(n),l=e.isCollapsed(n),c=e.getSource(n)!==0,d={startLineNumber:s,startColumn:this._textModel.getLineMaxColumn(s),endLineNumber:a,endColumn:this._textModel.getLineMaxColumn(a)+1};t.push({range:d,options:this._decorationProvider.getDecorationOption(l,a<=r,c)}),l&&a>r&&(r=a)}this._decorationProvider.changeDecorations(n=>this._editorDecorationIds=n.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(n,o)=>{for(let s of e)if(n<s&&s<=o)return!0;return!1},r=[];for(let n=0,o=this._regions.length;n<o;n++){let s=this.regions.isCollapsed(n),a=this.regions.getSource(n);if(s||a!==0){let l=this._regions.toFoldRange(n),c=this._textModel.getDecorationRange(this._editorDecorationIds[n]);c&&(s&&t(c.startLineNumber,c.endLineNumber)&&(s=!1),r.push({startLineNumber:c.startLineNumber,endLineNumber:c.endLineNumber,type:l.type,isCollapsed:s,source:a}))}}return r}getMemento(){let e=this._currentFoldedOrManualRanges(),t=[],r=this._textModel.getLineCount();for(let n=0,o=e.length;n<o;n++){let s=e[n];if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>r)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,r;if(!Array.isArray(e))return;let n=[],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)&&n.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(r=a.source)!==null&&r!==void 0?r:0})}let s=ln.sanitizeAndMerge(this._regions,n,o);this.updatePost(ln.fromFoldRanges(s))}_getLinesChecksum(e,t){return F_(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let r=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){let s=this._regions.toRegion(n);(!t||t(s,o))&&r.push(s),o++,n=s.parentIndex}}return r}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 r=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=n,l=this._regions.length;a<l;a++){let c=this._regions.toRegion(a);if(this._regions.getStartLineNumber(a)<o){for(;s.length>0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&r.push(c)}else break}}else for(let s=n,a=this._regions.length;s<a;s++){let l=this._regions.toRegion(s);if(this._regions.getStartLineNumber(s)<o)(!t||t(l))&&r.push(l);else break}return r}}});function i0e(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function e$(i,e){let t=Qv(i,r=>e<r.startLineNumber)-1;return t>=0&&i[t].endLineNumber>=e?i[t]:null}var x2,t$=N(()=>{pi();Jt();et();vre();x2=class{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new Je,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||rO(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],r=0,n=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;r<a.length;r++){if(!a.isCollapsed(r))continue;let l=a.getStartLineNumber(r)+1,c=a.getEndLineNumber(r);o<=l&&c<=s||(!e&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===l&&this._hiddenRanges[n].endLineNumber===c?(t.push(this._hiddenRanges[n]),n++):(e=!0,t.push(new B(l,1,c,1))),o=l,s=c)}(this._hasLineChanges||e||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return e$(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,r=this._foldingModel.textModel,n=null,o=s=>((!n||!i0e(s,n))&&(n=e$(this._hiddenRanges,s)),n?n.startLineNumber-1:null);for(let s=0,a=e.length;s<a;s++){let l=e[s],c=o(l.startLineNumber);c&&(l=l.setStartPosition(c,r.getLineMaxColumn(c)),t=!0);let d=o(l.endLineNumber);d&&(l=l.setEndPosition(d,r.getLineMaxColumn(d)),t=!0),e[s]=l}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}});function s0e(i,e,t,r=o0e){let n=i.getOptions().tabSize,o=new eL(r),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,n),h=a[a.length-1];if(u===-1){e&&(h.endAbove=c);continue}let f;if(s&&(f=d.match(s)))if(f[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 r0e,n0e,ih,eL,o0e,tL=N(()=>{zO();nb();r0e=5e3,n0e="indent",ih=class{constructor(e,t,r){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=r,this.id=n0e}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,r=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(s0e(this.editorModel,r,n,this.foldingRangesLimit))}},eL=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,r){if(e>zo||t>zo)return;let n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,r<1e3&&(this._indentOccurrences[r]=(this._indentOccurrences[r]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let r=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)r[s]=this._startIndexes[o],n[s]=this._endIndexes[o];return new ln(r,n)}else{this._foldingRangesLimit.update(this._length,t);let r=0,n=this._indentOccurrences.length;for(let l=0;l<this._indentOccurrences.length;l++){let c=this._indentOccurrences[l];if(c){if(c+r>t){n=l;break}r+=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<n||h===n&&r++<t)&&(s[c]=d,a[c]=this._endIndexes[l],c++)}return new ln(s,a)}}},o0e={limit:r0e,update:()=>{}}});var a0e,ob,sb,i$,r$,iL,zn,rL=N(()=>{Qr();jc();Hr();He();en();xl();tn();In();a0e=je("editor.foldBackground",{light:Mn(ek,.3),dark:Mn(ek,.3),hcDark:null,hcLight:null},b("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);je("editorGutter.foldingControlForeground",{dark:zm,light:zm,hcDark:zm,hcLight:zm},b("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));ob=Ni("folding-expanded",pt.chevronDown,b("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),sb=Ni("folding-collapsed",pt.chevronRight,b("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),i$=Ni("folding-manual-collapsed",sb,b("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),r$=Ni("folding-manual-expanded",ob,b("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),iL={color:ki(a0e),position:sa.Inline},zn=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,r){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?r?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"?r?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:r?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};zn.COLLAPSED_VISUAL_DECORATION=mt.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(sb)});zn.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=mt.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:iL,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(sb)});zn.MANUALLY_COLLAPSED_VISUAL_DECORATION=mt.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(i$)});zn.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=mt.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:iL,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(i$)});zn.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});zn.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:iL,isWholeLine:!0});zn.EXPANDED_VISUAL_DECORATION=mt.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_t.asClassName(ob)});zn.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=mt.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(ob)});zn.MANUALLY_EXPANDED_VISUAL_DECORATION=mt.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+_t.asClassName(r$)});zn.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=mt.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:_t.asClassName(r$)});zn.NO_CONTROLS_EXPANDED_RANGE_DECORATION=mt.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});zn.HIDDEN_RANGE_DECORATION=mt.register({description:"folding-hidden-range-decoration",stickiness:1})});function d0e(i,e,t){let r=null,n=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,l0e,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(r)||(r=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&r.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},Yt));return Promise.all(n).then(o=>r)}function u0e(i,e){let t=i.sort((s,a)=>{let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),r=new nL(e),n,o=[];for(let s of t)if(!n)n=s,r.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>n.start)if(s.end<=n.end)o.push(n),n=s,r.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>n.end){do n=o.pop();while(n&&s.start>n.end);n&&o.push(n),n=s}r.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return r.toIndentRanges()}var l0e,c0e,rh,nL,oL=N(()=>{Vt();ke();nb();l0e={},c0e="syntax",rh=class{constructor(e,t,r,n,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=r,this.foldingRangesLimit=n,this.fallbackRangeProvider=o,this.id=c0e,this.disposables=new le,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(r))}compute(e){return d0e(this.providers,this.editorModel,e).then(t=>{var r,n;return t?u0e(t,this.foldingRangesLimit):(n=(r=this.fallbackRangeProvider)===null||r===void 0?void 0:r.compute(e))!==null&&n!==void 0?n:null})}dispose(){this.disposables.dispose()}};nL=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,r,n){if(e>zo||t>zo)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=r,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let n=0;n<this._length;n++)t[n]=this._startIndexes[n],r[n]=this._endIndexes[n];return new ln(t,r,this._types)}else{this._foldingRangesLimit.update(this._length,e);let t=0,r=this._nestingLevelCounts.length;for(let a=0;a<this._nestingLevelCounts.length;a++){let l=this._nestingLevelCounts[a];if(l){if(l+t>e){r=a;break}t+=l}}let n=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a<this._length;a++){let c=this._nestingLevels[a];(c<r||c===r&&t++<e)&&(n[l]=this._startIndexes[a],o[l]=this._endIndexes[a],s[l]=this._types[a],l++)}return new ln(n,o,s)}}}});function n$(i){if(!Em(i)){if(!Fv(i))return!1;let e=i;if(!Em(e.levels)&&!M3(e.levels)||!Em(e.direction)&&!Ov(e.direction)||!Em(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(M3)))return!1}return!0}var f0e,ab,p0e,pp,qr,us,lb,Mr,sL,aL,lL,cL,dL,uL,hL,fL,pL,mL,gL,bL,nh,vL,_L,yL,wL,xL,cb=N(()=>{Ut();Si();Vt();sl();ke();Di();Fr();KK();P_();lt();ei();hn();Br();JI();t$();tL();He();wt();rL();nb();oL();Ao();Ls();ol();Rt();Jt();Wi();Tr();Go();Cr();f0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ab=function(i,e){return function(t,r){e(t,r,i)}},p0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},qr=new ht("foldingEnabled",!1),us=pp=class extends ce{static get(e){return e.getContribution(pp.ID)}static getFoldingRangeProviders(e,t){var r,n;let o=e.foldingRangeProvider.ordered(t);return(n=(r=pp._foldingRangeSelector)===null||r===void 0?void 0:r.call(pp,o,t))!==null&&n!==void 0?n:o}constructor(e,t,r,n,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=r,this.languageFeaturesService=s,this.localToDispose=this._register(new le),this.editor=e,this._foldingLimitReporter=new lb(e);let a=this.editor.getOptions();this._isEnabled=a.get(42),this._useFoldingProviders=a.get(43)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(47),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(45),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 zn(e),this.foldingDecorationProvider.showFoldingControls=a.get(108),this.foldingDecorationProvider.showFoldingHighlights=a.get(44),this.foldingEnabled=qr.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(42)&&(this._isEnabled=this.editor.getOptions().get(42),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(46)&&this.onModelChanged(),l.hasChanged(108)||l.hasChanged(44)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(108),this.foldingDecorationProvider.showFoldingHighlights=c.get(44),this.triggerFoldingModelChanged()}l.hasChanged(43)&&(this._useFoldingProviders=this.editor.getOptions().get(43)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(47)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(47)),l.hasChanged(45)&&(this._foldingImportsByDefault=this.editor.getOptions().get(45))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),r=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:r,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 v2(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new x2(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Lo(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new di(()=>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,r;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,(r=this.rangeProvider)===null||r===void 0||r.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 ih(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let r=pp.getFoldingRangeProviders(this.languageFeaturesService,e);r.length>0&&(this.rangeProvider=new rh(e,r,()=>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 pr,r=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=Zt(o=>r.compute(o));return n.then(o=>{if(o&&n===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(gf.Imports.value,!0);d&&(s=ga.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=>(ft(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 r=this.editor.getSelections();if(r&&r.length>0){let n=[];for(let o of r){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&n.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}n.length&&(t.toggleCollapseState(n),this.reveal(r[0].getPosition()))}}}).then(void 0,ft)}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,r=!1;switch(e.target.type){case 4:{let n=e.target.detail,o=e.target.element.offsetLeft;if(n.offsetX-o<4)return;r=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let n=this.editor.getModel();if(n&&t.startColumn===n.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:r}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let r=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==r)return;if(n){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(r))return}let s=t.getRegionAtLine(r);if(s&&s.startLineNumber===r){let a=s.isCollapsed;if(n||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:r,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};us.ID="editor.contrib.folding";us=pp=f0e([ab(1,it),ab(2,Pt),ab(3,Mi),ab(4,ar),ab(5,Se)],us);lb=class{constructor(e){this.editor=e,this._onDidChange=new Je,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(46)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Mr=class extends de{runEditorCommand(e,t,r){let n=e.get(Pt),o=us.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,r,n);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(r=>r.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(r=>r+1):this.getSelectedLines(t)}run(e,t){}};sL=class extends Mr{constructor(){super({id:"editor.unfold",label:b("unfoldAction.label","Unfold"),alias:"Unfold",precondition:qr,kbOpts:{kbExpr:F.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:r$,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,r,n){let o=n&&n.levels||1,s=this.getLineNumbers(n,r);n&&n.direction==="up"?XI(t,!1,o,s):th(t,!1,o,s)}},sL=class extends Mr{constructor(){super({id:"editor.unfoldRecursively",label:b("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2142),weight:100}})}invoke(e,t,r,n){th(t,!1,Number.MAX_VALUE,this.getSelectedLines(r))}},aL=class extends Mr{constructor(){super({id:"editor.fold",label:b("foldAction.label","Fold"),alias:"Fold",precondition:qr,kbOpts:{kbExpr:F.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:n$,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,r,n){let o=n&&n.levels||1,s=this.getLineNumbers(n,r);n&&n.direction==="up"?QI(t,!1,o,s):th(t,!1,o,s)}},aL=class extends Mr{constructor(){super({id:"editor.unfoldRecursively",label:b("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2142),weight:100}})}invoke(e,t,r,n){th(t,!1,Number.MAX_VALUE,this.getSelectedLines(r))}},lL=class extends Mr{constructor(){super({id:"editor.fold",label:b("foldAction.label","Fold"),alias:"Fold",precondition:qr,kbOpts:{kbExpr:F.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:r$,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,r,n){let o=this.getLineNumbers(n,r),s=n&&n.levels,a=n&&n.direction;typeof s!="number"&&typeof a!="string"?GK(t,!0,o):a==="up"?XI(t,!0,s||1,o):th(t,!0,s||1,o)}},lL=class extends Mr{constructor(){super({id:"editor.toggleFold",label:b("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2090),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);_2(t,1,n)}},cL=class extends Mr{constructor(){super({id:"editor.foldRecursively",label:b("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2140),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);th(t,!0,Number.MAX_VALUE,n)}},dL=class extends Mr{constructor(){super({id:"editor.foldAllBlockComments",label:b("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2138),weight:100}})}invoke(e,t,r,n,o){if(t.regions.hasTypes())w2(t,gf.Comment.value,!0);else{let s=r.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+al(a.blockCommentStartToken));y2(t,l,!0)}}}},uL=class extends Mr{constructor(){super({id:"editor.foldAllMarkerRegions",label:b("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2077),weight:100}})}invoke(e,t,r,n,o){if(t.regions.hasTypes())w2(t,gf.Region.value,!0);else{let s=r.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);y2(t,l,!0)}}}},hL=class extends Mr{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:b("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2078),weight:100}})}invoke(e,t,r,n,o){if(t.regions.hasTypes())w2(t,gf.Region.value,!1);else{let s=r.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);y2(t,l,!1)}}}},fL=class extends Mr{constructor(){super({id:"editor.foldAllExcept",label:b("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2136),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);QI(t,!0,n)}},pL=class extends Mr{constructor(){super({id:"editor.unfoldAllExcept",label:b("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2134),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);QI(t,!1,n)}},mL=class extends Mr{constructor(){super({id:"editor.foldAll",label:b("foldAllAction.label","Fold All"),alias:"Fold All",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2069),weight:100}})}invoke(e,t,r){th(t,!0)}},gL=class extends Mr{constructor(){super({id:"editor.unfoldAll",label:b("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2088),weight:100}})}invoke(e,t,r){th(t,!1)}},nh=class i extends Mr{getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,r){YK(t,this.getFoldingLevel(),!0,this.getSelectedLines(r))}};nh.ID_PREFIX="editor.foldLevel";nh.ID=i=>nh.ID_PREFIX+i;bL=class extends Mr{constructor(){super({id:"editor.gotoParentFold",label:b("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);if(n.length>0){let o=XK(n[0],t);o!==null&&r.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},vL=class extends Mr{constructor(){super({id:"editor.gotoPreviousFold",label:b("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);if(n.length>0){let o=QK(n[0],t);o!==null&&r.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},_L=class extends Mr{constructor(){super({id:"editor.gotoNextFold",label:b("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);if(n.length>0){let o=ZK(n[0],t);o!==null&&r.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},yL=class extends Mr{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:b("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2135),weight:100}})}invoke(e,t,r){var n;let o=[],s=r.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}),r.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=ln.sanitizeAndMerge(t.regions,o,(n=r.getModel())===null||n===void 0?void 0:n.getLineCount());t.updatePost(ln.fromFoldRanges(a))}}}},wL=class extends Mr{constructor(){super({id:"editor.removeManualFoldingRanges",label:b("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2137),weight:100}})}invoke(e,t,r){let n=r.getSelections();if(n){let o=[];for(let s of n){let{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}};Ue(us.ID,us,0);ee(oL);ee(sL);ee(aL);ee(cL);ee(mL);ee(gL);ee(dL);ee(uL);ee(hL);ee(fL);ee(pL);ee(lL);ee(bL);ee(vL);ee(_L);ee(yL);ee(wL);for(let i=1;i<=7;i++)wP(new nh({id:nh.ID(i),label:b("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2048|21+i),weight:100}}));At.registerCommand("_executeFoldingRangeProvider",function(i,...e){return p0e(this,void 0,void 0,function*(){let[t]=e;if(!(t instanceof yt))throw Co();let r=i.get(Se),n=i.get(Li).getModel(t);if(!n)throw Co();let o=i.get(Dt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(Pt),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(f,m)=>{}},c=new ih(n,s,l),d=c;if(a!=="indentation"){let f=us.getFoldingRangeProviders(r,n);f.length&&(d=new rh(n,f,()=>{},l,c))}let u=yield d.compute(st.None),h=[];try{if(u)for(let f=0;f<u.length;f++){let m=u.getType(f);h.push({start:u.getStartLineNumber(f),end:u.getEndLineNumber(f),kind:m?gf.fromValue(m):void 0})}return h}finally{d.dispose()}})})});var xL,CL,SL,kL=N(()=>{lt();Vre();He();xL=class extends de{constructor(){super({id:"editor.action.fontZoomIn",label:b("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){xf.setZoomLevel(xf.getZoomLevel()+1)}},CL=class extends de{constructor(){super({id:"editor.action.fontZoomOut",label:b("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){xf.setZoomLevel(xf.getZoomLevel()-1)}},SL=class extends de{constructor(){super({id:"editor.action.fontZoomReset",label:b("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){xf.setZoomLevel(0)}};ee(xL);ee(CL);ee(SL)});var LL=Xi(oh=>{pi();Si();Vt();sl();ke();lt();Tn();V3();et();ei();j_();Rt();Kre();qre();He();Wi();wt();Ht();Vc();var n$=oh&&oh.__decorate||function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},C2=oh&&oh.__param||function(i,e){return function(t,r){e(t,r,i)}},IL=oh&&oh.__awaiter||function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},db=class{constructor(e,t,r){this._editor=e,this._languageFeaturesService=t,this._workerService=r,this._disposables=new le,this._sessionDisposables=new le,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(n=>{n.hasChanged(55)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(55)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let r=new uu;for(let n of t.autoFormatTriggerCharacters)r.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(n=>{let o=n.charCodeAt(n.length-1);r.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(),r=this._editor.getPosition(),n=new Fi,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){n.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a<l;a++)if(s.changes[a].range.endLineNumber<=r.lineNumber){n.cancel(),o.dispose();return}});zF(this._workerService,this._languageFeaturesService,t,r,e,t.getFormattingOptions(),n.token).then(s=>{n.token.isCancellationRequested||qi(s)&&(PF.execute(this._editor,s,!0),OF(s))}).finally(()=>{o.dispose()})}};db.ID="editor.contrib.autoFormat";db=n$([C2(1,Se),C2(2,Cl)],db);var ub=class{constructor(e,t,r){this.editor=e,this._languageFeaturesService=t,this._instantiationService=r,this._callOnDispose=new le,this._callOnModel=new le,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(54)&&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(vk,this.editor,e,2,ma.None,st.None).catch(ft))}};ub.ID="editor.contrib.formatOnPaste";ub=n$([C2(1,Se),C2(2,Ke)],ub);var EL=class extends de{constructor(){super({id:"editor.action.formatDocument",label:b("formatDocument.label","Format Document"),alias:"Format Document",precondition:fe.and(F.notInCompositeEditor,F.writable,F.hasDocumentFormattingProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return IL(this,void 0,void 0,function*(){if(t.hasModel()){let r=e.get(Ke);yield e.get(gl).showWhile(r.invokeFunction(FF,t,1,ma.None,st.None),250)}})}},TL=class extends de{constructor(){super({id:"editor.action.formatSelection",label:b("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:fe.and(F.writable,F.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2084),weight:100},contextMenuOpts:{when:F.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return IL(this,void 0,void 0,function*(){if(!t.hasModel())return;let r=e.get(Ke),n=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new B(a.startLineNumber,1,a.startLineNumber,n.getLineMaxColumn(a.startLineNumber)):a);yield e.get(gl).showWhile(r.invokeFunction(vk,t,o,1,ma.None,st.None),250)})}};Ue(db.ID,db,2);Ue(ub.ID,ub,2);ee(EL);ee(TL);At.registerCommand("editor.action.format",i=>IL(void 0,void 0,void 0,function*(){let e=i.get(si).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(vi);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var mp,Ed,Bo,ec=N(()=>{mp=class{constructor(e,t,r,n){this.priority=e,this.range=t,this.initialMousePosX=r,this.initialMousePosY=n,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}},Ed=class{constructor(e,t,r,n,o,s){this.priority=e,this.owner=t,this.range=r,this.initialMousePosX=n,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}},Bo=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});var S2,k2,E2,T2=N(()=>{S2="editor.action.inlineSuggest.commit",k2="editor.action.inlineSuggest.showPrevious",E2="editor.action.inlineSuggest.showNext"});var vr,I2=N(()=>{_a();Di();sre();wt();ke();He();vr=class i extends ce{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(fn(r=>{let n=this.model.read(r),o=n==null?void 0:n.state.read(r),s=!!(o!=null&&o.inlineCompletion)&&(o==null?void 0:o.ghostText)!==void 0&&!(o!=null&&o.ghostText.isEmpty());this.inlineCompletionVisible.set(s),o!=null&&o.ghostText&&(o!=null&&o.inlineCompletion)&&this.suppressSuggestions.set(o.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(fn(r=>{let n=this.model.read(r),o=!1,s=!0,a=n==null?void 0:n.ghostText.read(r);if(n!=null&&n.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],d=c[0],u=n.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let f=Dm(d);f===-1&&(f=d.length-1),o=f>0;let m=n.textModel.getOptions().tabSize;s=xP.visibleColumnFromColumn(d,f+1,m)<m}}this.inlineCompletionSuggestsIndentation.set(o),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}};vr.inlineSuggestionVisible=new ht("inlineSuggestionVisible",!1,b("inlineSuggestionVisible","Whether an inline suggestion is visible"));vr.inlineSuggestionHasIndentation=new ht("inlineSuggestionHasIndentation",!1,b("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));vr.inlineSuggestionHasIndentationLessThanTabSize=new ht("inlineSuggestionHasIndentationLessThanTabSize",!0,b("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));vr.suppressSuggestions=new ht("inlineSuggestionSuppressSuggestions",void 0,b("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))});var o$=N(()=>{});var s$=N(()=>{o$()});function a$(i,e){let t=new AL(i),r=e.map(n=>{let o=B.lift(n.range);return{startOffset:t.getOffset(o.getStartPosition()),endOffset:t.getOffset(o.getEndPosition()),text:n.text}});r.sort((n,o)=>o.startOffset-n.startOffset);for(let n of r)i=i.substring(0,n.startOffset)+n.text+i.substring(n.endOffset);return i}function l$(){return m0e}function c$(i,e){let t=new le,r=i.createDecorationsCollection();return t.add(HF({debugName:()=>`Apply decorations from ${e.debugName}`},n=>{let o=e.read(n);r.set(o)})),t.add({dispose:()=>{r.clear()}}),t}function hb(i,e){return new Ie(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function fb(i){let e=1,t=1;for(let r of i)r===` -`?(e++,t=1):t++;return new Ie(e,t)}var AL,m0e,L2,gp=N(()=>{Vt();ke();_a();ci();et();AL=class{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===` -`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}},m0e=[];L2=class{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new km(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new B(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}});function DL(i,e){return i===e?!0:!i||!e?!1:i instanceof Td&&e instanceof Td||i instanceof vp&&e instanceof vp?i.equals(e):!1}var Td,bp,vp,A2=N(()=>{gp();Td=class{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,r)=>t.equals(e.parts[r]))}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],r=e.substr(0,t.column-1);return a$(r,this.parts.map(o=>({range:{startLineNumber:1,endLineNumber:1,startColumn:o.column,endColumn:o.column},text:o.lines.join(` + `,constraint:n$,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,r,n){let o=this.getLineNumbers(n,r),s=n&&n.levels,a=n&&n.direction;typeof s!="number"&&typeof a!="string"?YK(t,!0,o):a==="up"?QI(t,!0,s||1,o):th(t,!0,s||1,o)}},cL=class extends Mr{constructor(){super({id:"editor.toggleFold",label:b("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2090),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);_2(t,1,n)}},dL=class extends Mr{constructor(){super({id:"editor.foldRecursively",label:b("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2140),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);th(t,!0,Number.MAX_VALUE,n)}},uL=class extends Mr{constructor(){super({id:"editor.foldAllBlockComments",label:b("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2138),weight:100}})}invoke(e,t,r,n,o){if(t.regions.hasTypes())w2(t,gf.Comment.value,!0);else{let s=r.getModel();if(!s)return;let a=o.getLanguageConfiguration(s.getLanguageId()).comments;if(a&&a.blockCommentStartToken){let l=new RegExp("^\\s*"+al(a.blockCommentStartToken));y2(t,l,!0)}}}},hL=class extends Mr{constructor(){super({id:"editor.foldAllMarkerRegions",label:b("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2077),weight:100}})}invoke(e,t,r,n,o){if(t.regions.hasTypes())w2(t,gf.Region.value,!0);else{let s=r.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);y2(t,l,!0)}}}},fL=class extends Mr{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:b("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2078),weight:100}})}invoke(e,t,r,n,o){if(t.regions.hasTypes())w2(t,gf.Region.value,!1);else{let s=r.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);y2(t,l,!1)}}}},pL=class extends Mr{constructor(){super({id:"editor.foldAllExcept",label:b("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2136),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);ZI(t,!0,n)}},mL=class extends Mr{constructor(){super({id:"editor.unfoldAllExcept",label:b("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2134),weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);ZI(t,!1,n)}},gL=class extends Mr{constructor(){super({id:"editor.foldAll",label:b("foldAllAction.label","Fold All"),alias:"Fold All",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2069),weight:100}})}invoke(e,t,r){th(t,!0)}},bL=class extends Mr{constructor(){super({id:"editor.unfoldAll",label:b("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2088),weight:100}})}invoke(e,t,r){th(t,!1)}},nh=class i extends Mr{getFoldingLevel(){return parseInt(this.id.substr(i.ID_PREFIX.length))}invoke(e,t,r){XK(t,this.getFoldingLevel(),!0,this.getSelectedLines(r))}};nh.ID_PREFIX="editor.foldLevel";nh.ID=i=>nh.ID_PREFIX+i;vL=class extends Mr{constructor(){super({id:"editor.gotoParentFold",label:b("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);if(n.length>0){let o=QK(n[0],t);o!==null&&r.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},_L=class extends Mr{constructor(){super({id:"editor.gotoPreviousFold",label:b("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);if(n.length>0){let o=ZK(n[0],t);o!==null&&r.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},yL=class extends Mr{constructor(){super({id:"editor.gotoNextFold",label:b("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,weight:100}})}invoke(e,t,r){let n=this.getSelectedLines(r);if(n.length>0){let o=JK(n[0],t);o!==null&&r.setSelection({startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:1})}}},wL=class extends Mr{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:b("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2135),weight:100}})}invoke(e,t,r){var n;let o=[],s=r.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}),r.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=ln.sanitizeAndMerge(t.regions,o,(n=r.getModel())===null||n===void 0?void 0:n.getLineCount());t.updatePost(ln.fromFoldRanges(a))}}}},xL=class extends Mr{constructor(){super({id:"editor.removeManualFoldingRanges",label:b("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2137),weight:100}})}invoke(e,t,r){let n=r.getSelections();if(n){let o=[];for(let s of n){let{startLineNumber:a,endLineNumber:l}=s;o.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(o),e.triggerFoldingModelChanged()}}};Ue(us.ID,us,0);ee(sL);ee(aL);ee(lL);ee(dL);ee(gL);ee(bL);ee(uL);ee(hL);ee(fL);ee(pL);ee(mL);ee(cL);ee(vL);ee(_L);ee(yL);ee(wL);ee(xL);for(let i=1;i<=7;i++)xP(new nh({id:nh.ID(i),label:b("foldLevelAction.label","Fold Level {0}",i),alias:`Fold Level ${i}`,precondition:qr,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2048|21+i),weight:100}}));At.registerCommand("_executeFoldingRangeProvider",function(i,...e){return p0e(this,void 0,void 0,function*(){let[t]=e;if(!(t instanceof yt))throw Co();let r=i.get(Se),n=i.get(Li).getModel(t);if(!n)throw Co();let o=i.get(Dt);if(!o.getValue("editor.folding",{resource:t}))return[];let s=i.get(Pt),a=o.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return o.getValue("editor.foldingMaximumRegions",{resource:t})},update:(f,m)=>{}},c=new ih(n,s,l),d=c;if(a!=="indentation"){let f=us.getFoldingRangeProviders(r,n);f.length&&(d=new rh(n,f,()=>{},l,c))}let u=yield d.compute(st.None),h=[];try{if(u)for(let f=0;f<u.length;f++){let m=u.getType(f);h.push({start:u.getStartLineNumber(f),end:u.getEndLineNumber(f),kind:m?gf.fromValue(m):void 0})}return h}finally{d.dispose()}})})});var CL,SL,kL,EL=N(()=>{lt();Vre();He();CL=class extends de{constructor(){super({id:"editor.action.fontZoomIn",label:b("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){xf.setZoomLevel(xf.getZoomLevel()+1)}},SL=class extends de{constructor(){super({id:"editor.action.fontZoomOut",label:b("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){xf.setZoomLevel(xf.getZoomLevel()-1)}},kL=class extends de{constructor(){super({id:"editor.action.fontZoomReset",label:b("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){xf.setZoomLevel(0)}};ee(CL);ee(SL);ee(kL)});var AL=Xi(oh=>{pi();Si();Vt();sl();ke();lt();Tn();q3();et();ei();j_();Rt();Kre();qre();He();Wi();wt();Ht();Vc();var o$=oh&&oh.__decorate||function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},C2=oh&&oh.__param||function(i,e){return function(t,r){e(t,r,i)}},LL=oh&&oh.__awaiter||function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},db=class{constructor(e,t,r){this._editor=e,this._languageFeaturesService=t,this._workerService=r,this._disposables=new le,this._sessionDisposables=new le,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(n=>{n.hasChanged(55)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(55)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let r=new uu;for(let n of t.autoFormatTriggerCharacters)r.add(n.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(n=>{let o=n.charCodeAt(n.length-1);r.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(),r=this._editor.getPosition(),n=new Fi,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){n.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a<l;a++)if(s.changes[a].range.endLineNumber<=r.lineNumber){n.cancel(),o.dispose();return}});BF(this._workerService,this._languageFeaturesService,t,r,e,t.getFormattingOptions(),n.token).then(s=>{n.token.isCancellationRequested||qi(s)&&(OF.execute(this._editor,s,!0),FF(s))}).finally(()=>{o.dispose()})}};db.ID="editor.contrib.autoFormat";db=o$([C2(1,Se),C2(2,Cl)],db);var ub=class{constructor(e,t,r){this.editor=e,this._languageFeaturesService=t,this._instantiationService=r,this._callOnDispose=new le,this._callOnModel=new le,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(54)&&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(_k,this.editor,e,2,ma.None,st.None).catch(ft))}};ub.ID="editor.contrib.formatOnPaste";ub=o$([C2(1,Se),C2(2,Ke)],ub);var TL=class extends de{constructor(){super({id:"editor.action.formatDocument",label:b("formatDocument.label","Format Document"),alias:"Format Document",precondition:fe.and(F.notInCompositeEditor,F.writable,F.hasDocumentFormattingProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return LL(this,void 0,void 0,function*(){if(t.hasModel()){let r=e.get(Ke);yield e.get(gl).showWhile(r.invokeFunction(zF,t,1,ma.None,st.None),250)}})}},IL=class extends de{constructor(){super({id:"editor.action.formatSelection",label:b("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:fe.and(F.writable,F.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2084),weight:100},contextMenuOpts:{when:F.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return LL(this,void 0,void 0,function*(){if(!t.hasModel())return;let r=e.get(Ke),n=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new B(a.startLineNumber,1,a.startLineNumber,n.getLineMaxColumn(a.startLineNumber)):a);yield e.get(gl).showWhile(r.invokeFunction(_k,t,o,1,ma.None,st.None),250)})}};Ue(db.ID,db,2);Ue(ub.ID,ub,2);ee(TL);ee(IL);At.registerCommand("editor.action.format",i=>LL(void 0,void 0,void 0,function*(){let e=i.get(si).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(vi);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var mp,Ed,Bo,ec=N(()=>{mp=class{constructor(e,t,r,n){this.priority=e,this.range=t,this.initialMousePosX=r,this.initialMousePosY=n,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}},Ed=class{constructor(e,t,r,n,o,s){this.priority=e,this.owner=t,this.range=r,this.initialMousePosX=n,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}},Bo=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}});var S2,k2,E2,T2=N(()=>{S2="editor.action.inlineSuggest.commit",k2="editor.action.inlineSuggest.showPrevious",E2="editor.action.inlineSuggest.showNext"});var vr,I2=N(()=>{_a();Di();sre();wt();ke();He();vr=class i extends ce{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(fn(r=>{let n=this.model.read(r),o=n==null?void 0:n.state.read(r),s=!!(o!=null&&o.inlineCompletion)&&(o==null?void 0:o.ghostText)!==void 0&&!(o!=null&&o.ghostText.isEmpty());this.inlineCompletionVisible.set(s),o!=null&&o.ghostText&&(o!=null&&o.inlineCompletion)&&this.suppressSuggestions.set(o.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(fn(r=>{let n=this.model.read(r),o=!1,s=!0,a=n==null?void 0:n.ghostText.read(r);if(n!=null&&n.selectedSuggestItem&&a&&a.parts.length>0){let{column:l,lines:c}=a.parts[0],d=c[0],u=n.textModel.getLineIndentColumn(a.lineNumber);if(l<=u){let f=Dm(d);f===-1&&(f=d.length-1),o=f>0;let m=n.textModel.getOptions().tabSize;s=CP.visibleColumnFromColumn(d,f+1,m)<m}}this.inlineCompletionSuggestsIndentation.set(o),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}};vr.inlineSuggestionVisible=new ht("inlineSuggestionVisible",!1,b("inlineSuggestionVisible","Whether an inline suggestion is visible"));vr.inlineSuggestionHasIndentation=new ht("inlineSuggestionHasIndentation",!1,b("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));vr.inlineSuggestionHasIndentationLessThanTabSize=new ht("inlineSuggestionHasIndentationLessThanTabSize",!0,b("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"));vr.suppressSuggestions=new ht("inlineSuggestionSuppressSuggestions",void 0,b("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))});var s$=N(()=>{});var a$=N(()=>{s$()});function l$(i,e){let t=new DL(i),r=e.map(n=>{let o=B.lift(n.range);return{startOffset:t.getOffset(o.getStartPosition()),endOffset:t.getOffset(o.getEndPosition()),text:n.text}});r.sort((n,o)=>o.startOffset-n.startOffset);for(let n of r)i=i.substring(0,n.startOffset)+n.text+i.substring(n.endOffset);return i}function c$(){return m0e}function d$(i,e){let t=new le,r=i.createDecorationsCollection();return t.add(UF({debugName:()=>`Apply decorations from ${e.debugName}`},n=>{let o=e.read(n);r.set(o)})),t.add({dispose:()=>{r.clear()}}),t}function hb(i,e){return new Ie(i.lineNumber+e.lineNumber-1,e.lineNumber===1?i.column+e.column-1:e.column)}function fb(i){let e=1,t=1;for(let r of i)r===` +`?(e++,t=1):t++;return new Ie(e,t)}var DL,m0e,L2,gp=N(()=>{Vt();ke();_a();ci();et();DL=class{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===` +`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}},m0e=[];L2=class{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new km(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new B(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}});function ML(i,e){return i===e?!0:!i||!e?!1:i instanceof Td&&e instanceof Td||i instanceof vp&&e instanceof vp?i.equals(e):!1}var Td,bp,vp,A2=N(()=>{gp();Td=class{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,r)=>t.equals(e.parts[r]))}renderForScreenReader(e){if(this.parts.length===0)return"";let t=this.parts[this.parts.length-1],r=e.substr(0,t.column-1);return l$(r,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)}},bp=class{constructor(e,t,r){this.column=e,this.lines=t,this.preview=r}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,r)=>t===e.lines[r])}},vp=class{constructor(e,t,r,n=0){this.lineNumber=e,this.columnRange=t,this.newLines=r,this.additionalReservedLineCount=n,this.parts=[new bp(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)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,r)=>t===e.newLines[r])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}});function v0e(i,e,t,r,n){let o=r.get(32),s=r.get(115),a="none",l=r.get(92),c=r.get(50),d=r.get(49),u=r.get(65),h=new Jv(1e4);h.appendString('<div class="suggest-preview-text">');for(let g=0,w=t.length;g<w;g++){let _=t[g],E=_.content;h.appendString('<div class="view-line'),h.appendString('" style="top:'),h.appendString(String(g*u)),h.appendString('px;width:1000000px;">');let A=Vv(E),L=bP(E),O=$O.createEmpty(E,n);K_(new q_(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,E,!1,A,L,0,O,_.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==ZO.OFF,null),h),h.appendString("</div>")}h.appendString("</div>"),T_(i,d);let f=h.build(),m=d$?d$.createHTML(f):f;i.innerHTML=m}var g0e,b0e,D2,ML,d$,u$=N(()=>{ak();Jt();ke();_a();Di();s$();cF();Qm();ci();et();OP();Zo();jc();Ire();qF();KF();A2();gp();g0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},b0e=function(i,e){return function(t,r){e(t,r,i)}},D2=class extends ce{constructor(e,t,r){super(),this.editor=e,this.model=t,this.languageService=r,this.isDisposed=va("isDisposed",!1),this.currentTextModel=Sl(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=Do(n=>{if(this.isDisposed.read(n))return;let o=this.currentTextModel.read(n);if(o!==this.model.targetTextModel.read(n))return;let s=this.model.ghostText.read(n);if(!s)return;let a=s instanceof vp?s.columnRange:void 0,l=[],c=[];function d(g,w){if(c.length>0){let _=c[c.length-1];w&&_.decorations.push(new ng(_.content.length+1,_.content.length+1+g[0].length,w,0)),_.content+=g[0],g=g.slice(1)}for(let _ of g)c.push({content:_,decorations:w?[new ng(1,_.length+1,w,0)]:[]})}let u=o.getLineContent(s.lineNumber),h,f=0;for(let g of s.parts){let w=g.lines;h===void 0?(l.push({column:g.column,text:w[0],preview:g.preview}),w=w.slice(1)):d([u.substring(f,g.column-1)],void 0),w.length>0&&(d(w,"ghost-text"),h===void 0&&g.column<=u.length&&(h=g.column)),f=g.column-1}h!==void 0&&d([u.substring(f)],void 0);let m=h!==void 0?new L2(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:m,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(n),targetTextModel:o}}),this.decorations=Do(n=>{let o=this.uiState.read(n);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:B.fromPositions(new Ie(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:mu.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new ML(this.editor,this.languageService.languageIdCodec,Do(n=>{let o=this.uiState.read(n);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(ii(()=>{this.isDisposed.set(!0,void 0)})),this._register(c$(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};D2=g0e([b0e(2,Ji)],D2);ML=class extends ce{get viewZoneId(){return this._viewZoneId}constructor(e,t,r){super(),this.editor=e,this.languageIdCodec=t,this.lines=r,this._viewZoneId=void 0,this.editorOptionsChanged=jF("editorOptionChanged",li.filter(this.editor.onDidChangeConfiguration,n=>n.hasChanged(32)||n.hasChanged(115)||n.hasChanged(97)||n.hasChanged(92)||n.hasChanged(50)||n.hasChanged(49)||n.hasChanged(65))),this._register(fn(n=>{let o=this.lines.read(n);this.editorOptionsChanged.read(n),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,r){let n=this.editor.getModel();if(!n)return;let{tabSize:o}=n.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,r);if(a>0){let l=document.createElement("div");v0e(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};d$=yf("editorGhostText",{createHTML:i=>i})});var h$=N(()=>{});var f$=N(()=>{h$()});var p$=N(()=>{});var m$=N(()=>{p$()});var _0e,M2,pb,g$=N(()=>{tg();$re();Rc();Qr();In();Jt();ke();m$();He();_0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},M2=class extends ce{constructor(e,t,r={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new U9),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new le),this.options=r,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new pb(()=>{var n;return(n=this.toggleMenuActionViewItem)===null||n===void 0?void 0:n.show()},r.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Is(this.element,{orientation:r.orientation,ariaLabel:r.ariaLabel,actionRunner:r.actionRunner,allowContextMenu:r.allowContextMenu,highlightToggledItems:r.highlightToggledItems,actionViewItemProvider:(n,o)=>{var s;if(n.id===pb.ID)return this.toggleMenuActionViewItem=new wk(n,n.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_t.asClassNameArray((s=r.moreIcon)!==null&&s!==void 0?s:pt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(r.actionViewItemProvider){let a=r.actionViewItemProvider(n,o);if(a)return a}if(n instanceof Am){let a=new wk(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});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 r=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),r.push(this.toggleMenuAction)),r.forEach(n=>{this.actionBar.push(n,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(n)})})}getKeybindingLabel(e){var t,r,n;let o=this.lookupKeybindings?(r=(t=this.options).getKeyBinding)===null||r===void 0?void 0:r.call(t,e):void 0;return(n=o==null?void 0:o.getLabel())!==null&&n!==void 0?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},pb=class i extends Yo{constructor(e,t){t=t||b("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return _0e(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};pb.ID="toolbar.toggle.more"});var y0e,mb,N2,b$=N(()=>{Bt();Q9();g$();Rc();pi();ke();He();Zi();wt();vl();Ur();Oc();y0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},mb=function(i,e){return function(t,r){e(t,r,i)}},N2=class extends M2{constructor(e,t,r,n,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:c=>{var d;return(d=s.lookupKeybinding(c.id))!==null&&d!==void 0?d:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=r,this._contextKeyService=n,this._contextMenuService=o,this._sessionDisposables=this._store.add(new le);let l=t==null?void 0:t.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(c=>a.publicLog2("workbenchActionExecuted",{id:c.action.id,from:l})))}setActions(e,t=[],r){var n,o,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,u=[],h=!1;if(((n=this._options)===null||n===void 0?void 0:n.hiddenItemStrategy)!==-1)for(let f=0;f<a.length;f++){let m=a[f];!(m instanceof ia)&&!(m instanceof Mm)||m.hideActions&&(c.push(m.hideActions.toggle),m.hideActions.toggle.checked&&d++,m.hideActions.isHidden&&(h=!0,a[f]=void 0,((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==0&&(u[f]=m)))}if(((s=this._options)===null||s===void 0?void 0:s.maxNumberOfItems)!==void 0){let f=0;for(let m=0;m<a.length;m++){let g=a[m];g&&++f>=this._options.maxNumberOfItems&&(a[m]=void 0,u[m]=g)}}K3(a),K3(u),super.setActions(a,ws.join(u,l)),c.length>0&&this._sessionDisposables.add(Lt(this.getElement(),"contextmenu",f=>{var m,g,w,_,E;let A=new Uv(f),L=this.getItemAction(A.target);if(!L)return;A.preventDefault(),A.stopPropagation();let O=!1;if(d===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){O=!0;for(let oe=0;oe<c.length;oe++)if(c[oe].checked){c[oe]=Jh({id:L.id,label:L.label,checked:!0,enabled:!1,run(){}});break}}let U;if(!O&&(L instanceof ia||L instanceof Mm)){if(!L.hideActions)return;U=L.hideActions.hide}else U=Jh({id:"label",label:b("hide","Hide"),enabled:!1,run(){}});let Y=ws.join([U],c);!((g=this._options)===null||g===void 0)&&g.resetMenu&&!r&&(r=[this._options.resetMenu]),h&&r&&(Y.push(new ws),Y.push(Jh({id:"resetThisMenu",label:b("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(r)}))),this._contextMenuService.showContextMenu({getAnchor:()=>A,getActions:()=>Y,menuId:(w=this._options)===null||w===void 0?void 0:w.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(_=this._options)===null||_===void 0?void 0:_.menuOptions),skipTelemetry:typeof((E=this._options)===null||E===void 0?void 0:E.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};N2=y0e([mb(2,xs),mb(3,it),mb(4,ts),mb(5,qt),mb(6,Ln)],N2)});var OL,js,R2,P2,w0e,x0e,Ws,NL,RL,PL,O2=N(()=>{Bt();pF();gF();Rc();pi();Ut();Qr();ke();_a();En();In();f$();ci();hn();T2();He();X_();b$();Zi();Wi();wt();vl();Ht();Ur();Oc();xl();OL=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},js=function(i,e){return function(t,r){e(t,r,i)}},P2=class extends ce{constructor(e,t,r){super(),this.editor=e,this.model=t,this.instantiationService=r,this.alwaysShowToolbar=Sl(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).showToolbar==="always"),this.sessionPosition=void 0,this.position=Do(n=>{var o,s,a;let l=(o=this.model.read(n))===null||o===void 0?void 0:o.ghostText.read(n);if(!this.alwaysShowToolbar.read(n)||!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 Ie(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(UF((n,o)=>{let s=this.model.read(n);if(!s||!this.alwaysShowToolbar.read(n))return;let a=o.add(this.instantiationService.createInstance(Ws,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(ii(()=>e.removeContentWidget(a))),o.add(fn(l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==ha.Explicit&&s.triggerExplicitly()}))}))}};P2=OL([js(2,Ke)],P2);w0e=Ni("inline-suggestion-hints-next",pt.chevronRight,b("parameterHintsNextIcon","Icon for show next parameter hint.")),x0e=Ni("inline-suggestion-hints-previous",pt.chevronLeft,b("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Ws=R2=class extends ce{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,r){let n=new Yo(e,t,r,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=b({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(e,t,r,n,o,s,a,l,c,d,u){super(),this.editor=e,this.withBorder=t,this._position=r,this._currentSuggestionIdx=n,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${R2.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Wv("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Wv("div@toolBar")]),this.previousAction=this.createCommandAction(k2,b("previous","Previous"),_t.asClassName(x0e)),this.availableSuggestionCountAction=new Yo("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(E2,b("next","Next"),_t.asClassName(w0e)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Me.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new di(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new di(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(PL,this.nodes.toolBar,Me.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,f)=>{if(h instanceof ia)return l.createInstance(RL,h,void 0);if(h===this.availableSuggestionCountAction){let m=new NL(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{R2._dropDownVisible=h})),this._register(fn(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(fn(h=>{let f=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(fn(h=>{let f=this._extraCommands.read(h);if(Cs(this.lastCommands,f))return;this.lastCommands=f;let m=f.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:w=>this._commandService.executeCommand(g.id)}));for(let[g,w]of this.inlineCompletionsActionsMenus.getActions())for(let _ of w)_ instanceof ia&&m.push(_);m.length>0&&m.unshift(new ws),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Ws._dropDownVisible=!1;Ws.id=0;Ws=R2=OL([js(6,vi),js(7,Ke),js(8,qt),js(9,it),js(10,xs)],Ws);NL=class extends eg{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}},RL=class extends Y_{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=Wv("div.keybinding").root;new M_(t,Bv,Object.assign({disableTitle:!0},mF)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},PL=class extends N2{constructor(e,t,r,n,o,s,a,l){super(e,Object.assign({resetMenu:t},r),n,o,s,a,l),this.menuId=t,this.options2=r,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,r,n,o,s,a;let l=[],c=[];G_(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(r=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||r===void 0?void 0:r.primaryGroup,(o=(n=this.options2)===null||n===void 0?void 0:n.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),l.unshift(...this.prependedPrimaryActions),this.setActions(l,c)}setPrependedPrimaryActions(e){Cs(this.prependedPrimaryActions,e,(t,r)=>t===r)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Cs(this.additionalActions,e,(t,r)=>t===r)||(this.additionalActions=e,this.updateToolbar())}};PL=OL([js(3,xs),js(4,it),js(5,ts),js(6,qt),js(7,Ln)],PL)});function v$(i,e){let t=new nO,r=new sO(t,c=>e.getLanguageConfiguration(c)),n=new oO(new FL([i]),r),o=aO(n,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=hf(d,c.openingBracket.length),c.child&&(l(c.child,d),d=hf(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=hf(d,c.closingBracket.length);else{let h=r.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,hf(d,c.length));else if(c.kind===4)for(let u of c.children)l(u,d),d=hf(d,u.length)}}return l(o,rO),s}var FL,_$=N(()=>{Cre();_re();Sre();yre();xre();FL=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 y$(i,e){let t=[...i];for(;t.length>0;){let r=t.shift();if(!e(r))break;t.unshift(...r.children)}}var F2,Id,Nr,z2,go,sh,zL,Vs,gb,_p,Ho,ah=N(()=>{F2=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,r=this.value.charCodeAt(e),n;if(n=i._table[r],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(i.isDigitCharacter(r)){n=8;do t+=1,r=this.value.charCodeAt(e+t);while(i.isDigitCharacter(r));return this.pos+=t,{type:n,pos:e,len:t}}if(i.isVariableCharacter(r)){n=9;do r=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(r)||i.isDigitCharacter(r));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,r=this.value.charCodeAt(e+t);while(!isNaN(r)&&typeof i._table[r]=="undefined"&&!i.isDigitCharacter(r)&&!i.isVariableCharacter(r));return this.pos+=t,{type:n,pos:e,len:t}}};F2._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};Id=class{constructor(){this._children=[]}appendChild(e){return e instanceof Nr&&this._children[this._children.length-1]instanceof Nr?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:r}=e,n=r.children.indexOf(e),o=r.children.slice(0);o.splice(n,1,...t),r._children=o,function s(a,l){for(let c of a)c.parent=l,s(c.children,c)}(t,r)}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 _p)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},Nr=class i extends Id{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},z2=class extends Id{},go=class i extends z2{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.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 sh?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}},sh=class i extends Id{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Nr&&(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}},zL=class i extends Id{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,r=!1,n=e.replace(this.regexp,function(){return r=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!r&&this._children.some(o=>o instanceof Vs&&!!o.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(let r of this._children)if(r instanceof Vs){let n=e[r.index]||"";n=r.resolve(n),t+=n}else t+=r.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}},Vs=class i extends Id{constructor(e,t,r,n){super(),this.index=e,this.shorthandName=t,this.ifValue=r,this.elseValue=n}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(r=>r.charAt(0).toUpperCase()+r.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((r,n)=>n===0?r.charAt(0).toLowerCase()+r.substr(1):r.charAt(0).toUpperCase()+r.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},gb=class i extends z2{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 Nr(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}};_p=class i extends Id{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(r){return r instanceof go&&(e.push(r),t=!t||t.index<r.index?r:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){let{all:e}=this.placeholderInfo;return e}offset(e){let t=0,r=!1;return this.walk(n=>n===e?(r=!0,!1):(t+=n.len(),!0)),r?t:-1}fullLen(e){let t=0;return y$([e],r=>(t+=r.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:r}=e;for(;r;)r instanceof go&&t.push(r),r=r.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof gb&&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){y$(this.children,e)}},Ho=class{constructor(){this._scanner=new F2,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,r){let n=new _p;return this.parseFragment(e,n),this.ensureFinalTabstop(n,r!=null?r:!1,t!=null?t:!1),n}parseFragment(e,t){let r=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let n=new Map,o=[];t.walk(l=>(l instanceof go&&(l.isFinalTabstop?n.set(0,void 0):!n.has(l.index)&&l.children.length>0?n.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let d=n.get(l.index);if(!d)return;let u=new go(l.index);u.transform=l.transform;for(let h of d){let f=h.clone();u.appendChild(f),f instanceof go&&n.has(f.index)&&!c.has(f.index)&&(c.add(f.index),s(f,c),c.delete(f.index))}t.replace(l,[u])},a=new Set;for(let l of o)s(l,a);return t.children.slice(r)}ensureFinalTabstop(e,t,r){(t||r&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new go(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let r=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),r}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 n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}let r=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),r}_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 Nr(t)),!0):!1}_parseTabstopOrVariableName(e){let t,r=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new go(Number(t)):new gb(t)),!0):this._backTo(r)}_parseComplexPlaceholder(e){let t,r=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(r);let o=new go(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Nr("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new sh;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(r),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(r),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(r)}_parseChoiceElement(e){let t=this._token,r=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;r.push(n)}return r.length===0?(this._backTo(t),!1):(e.appendChild(new Nr(r.join(""))),!0)}_parseComplexVariable(e){let t,r=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(r);let o=new gb(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Nr("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(r),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(r)}_parseTransform(e){let t=new zL,r="",n="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,r+=o;continue}if(this._token.type!==14){r+=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 Nr(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(r,n)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let r=!1;this._accept(3)&&(r=!0);let n=this._accept(8,!0);if(n)if(r){if(this._accept(4))return e.appendChild(new Vs(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Vs(Number(n))),!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 Vs(Number(n),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Vs(Number(n),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Vs(Number(n),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 Vs(Number(n),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Vs(Number(n),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Nr(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function x$(i,e,t,r,n=st.None,o){return BL(this,void 0,void 0,function*(){let s=C0e(e,t),a=i.all(t),l=new GF;for(let _ of a)_.groupId&&l.add(_.groupId,_);function c(_){if(!_.yieldsToGroupIds)return[];let E=[];for(let A of _.yieldsToGroupIds||[]){let L=l.get(A);for(let O of L)E.push(O)}return E}let d=new Map,u=new Set;function h(_,E){if(E=[...E,_],u.has(_))return E;u.add(_);try{let A=c(_);for(let L of A){let O=h(L,E);if(O)return O}}finally{u.delete(_)}}function f(_){let E=d.get(_);if(E)return E;let A=h(_,[]);A&&Yt(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${A.map(O=>O.toString?O.toString():""+O).join(" -> ")}`));let L=new d_;return d.set(_,L.p),(()=>BL(this,void 0,void 0,function*(){if(!A){let O=c(_);for(let U of O){let Y=yield f(U);if(Y&&Y.items.length>0)return}}try{return yield _.provideInlineCompletions(t,e,r,n)}catch(O){Yt(O);return}}))().then(O=>L.complete(O),O=>L.error(O)),L.p}let m=yield Promise.all(a.map(_=>BL(this,void 0,void 0,function*(){return{provider:_,completions:yield f(_)}}))),g=new Map,w=[];for(let _ of m){let E=_.completions;if(!E)continue;let A=new UL(E,_.provider);w.push(A);for(let L of E.items){let O=jL.from(L,A,s,t,o);g.set(O.hash(),O)}}return new HL(Array.from(g.values()),new Set(g.keys()),w)})}function C0e(i,e){let t=e.getWordAtPosition(i),r=e.getLineMaxColumn(i.lineNumber);return t?new B(i.lineNumber,t.startColumn,i.lineNumber,r):B.fromPositions(i,i.with(void 0,r))}function w$(i,e,t,r){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?v$(a,r):i}var BL,HL,UL,jL,C$=N(()=>{ore();Ut();Si();Gre();Vt();et();_$();gp();ah();BL=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};HL=class{constructor(e,t,r){this.completions=e,this.hashs=t,this.providerResults=r}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},UL=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)}},jL=class i{static from(e,t,r,n,o){let s,a,l=e.range?B.lift(e.range):r;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=w$(s,l.getStartPosition(),n,o);let c=s.length-e.insertText.length;c!==0&&(l=new B(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=w$(e.insertText.snippet,l.getStartPosition(),n,o);let u=e.insertText.snippet.length-c;u!==0&&(l=new B(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}let d=new Ho().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof Nr?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else _P(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||l$(),e,t)}constructor(e,t,r,n,o,s,a,l){this.filterText=e,this.command=t,this.range=r,this.insertText=n,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,r)=>t===e.newLines[r])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}});function v0e(i,e,t,r,n){let o=r.get(32),s=r.get(115),a="none",l=r.get(92),c=r.get(50),d=r.get(49),u=r.get(65),h=new Jv(1e4);h.appendString('<div class="suggest-preview-text">');for(let g=0,w=t.length;g<w;g++){let _=t[g],E=_.content;h.appendString('<div class="view-line'),h.appendString('" style="top:'),h.appendString(String(g*u)),h.appendString('px;width:1000000px;">');let A=Vv(E),L=vP(E),O=GO.createEmpty(E,n);K_(new q_(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,E,!1,A,L,0,O,_.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==JO.OFF,null),h),h.appendString("</div>")}h.appendString("</div>"),T_(i,d);let f=h.build(),m=u$?u$.createHTML(f):f;i.innerHTML=m}var g0e,b0e,D2,NL,u$,h$=N(()=>{lk();Jt();ke();_a();Di();a$();dF();Qm();ci();et();FP();Zo();jc();Ire();KF();$F();A2();gp();g0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},b0e=function(i,e){return function(t,r){e(t,r,i)}},D2=class extends ce{constructor(e,t,r){super(),this.editor=e,this.model=t,this.languageService=r,this.isDisposed=va("isDisposed",!1),this.currentTextModel=Sl(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=Do(n=>{if(this.isDisposed.read(n))return;let o=this.currentTextModel.read(n);if(o!==this.model.targetTextModel.read(n))return;let s=this.model.ghostText.read(n);if(!s)return;let a=s instanceof vp?s.columnRange:void 0,l=[],c=[];function d(g,w){if(c.length>0){let _=c[c.length-1];w&&_.decorations.push(new ng(_.content.length+1,_.content.length+1+g[0].length,w,0)),_.content+=g[0],g=g.slice(1)}for(let _ of g)c.push({content:_,decorations:w?[new ng(1,_.length+1,w,0)]:[]})}let u=o.getLineContent(s.lineNumber),h,f=0;for(let g of s.parts){let w=g.lines;h===void 0?(l.push({column:g.column,text:w[0],preview:g.preview}),w=w.slice(1)):d([u.substring(f,g.column-1)],void 0),w.length>0&&(d(w,"ghost-text"),h===void 0&&g.column<=u.length&&(h=g.column)),f=g.column-1}h!==void 0&&d([u.substring(f)],void 0);let m=h!==void 0?new L2(h,u.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:m,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(n),targetTextModel:o}}),this.decorations=Do(n=>{let o=this.uiState.read(n);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:B.fromPositions(new Ie(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:mu.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new NL(this.editor,this.languageService.languageIdCodec,Do(n=>{let o=this.uiState.read(n);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(ii(()=>{this.isDisposed.set(!0,void 0)})),this._register(d$(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};D2=g0e([b0e(2,Ji)],D2);NL=class extends ce{get viewZoneId(){return this._viewZoneId}constructor(e,t,r){super(),this.editor=e,this.languageIdCodec=t,this.lines=r,this._viewZoneId=void 0,this.editorOptionsChanged=WF("editorOptionChanged",li.filter(this.editor.onDidChangeConfiguration,n=>n.hasChanged(32)||n.hasChanged(115)||n.hasChanged(97)||n.hasChanged(92)||n.hasChanged(50)||n.hasChanged(49)||n.hasChanged(65))),this._register(fn(n=>{let o=this.lines.read(n);this.editorOptionsChanged.read(n),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,r){let n=this.editor.getModel();if(!n)return;let{tabSize:o}=n.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,r);if(a>0){let l=document.createElement("div");v0e(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};u$=yf("editorGhostText",{createHTML:i=>i})});var f$=N(()=>{});var p$=N(()=>{f$()});var m$=N(()=>{});var g$=N(()=>{m$()});var _0e,M2,pb,b$=N(()=>{tg();$re();Rc();Qr();In();Jt();ke();g$();He();_0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},M2=class extends ce{constructor(e,t,r={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new j9),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new le),this.options=r,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new pb(()=>{var n;return(n=this.toggleMenuActionViewItem)===null||n===void 0?void 0:n.show()},r.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Is(this.element,{orientation:r.orientation,ariaLabel:r.ariaLabel,actionRunner:r.actionRunner,allowContextMenu:r.allowContextMenu,highlightToggledItems:r.highlightToggledItems,actionViewItemProvider:(n,o)=>{var s;if(n.id===pb.ID)return this.toggleMenuActionViewItem=new xk(n,n.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_t.asClassNameArray((s=r.moreIcon)!==null&&s!==void 0?s:pt.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(r.actionViewItemProvider){let a=r.actionViewItemProvider(n,o);if(a)return a}if(n instanceof Am){let a=new xk(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});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 r=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),r.push(this.toggleMenuAction)),r.forEach(n=>{this.actionBar.push(n,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(n)})})}getKeybindingLabel(e){var t,r,n;let o=this.lookupKeybindings?(r=(t=this.options).getKeyBinding)===null||r===void 0?void 0:r.call(t,e):void 0;return(n=o==null?void 0:o.getLabel())!==null&&n!==void 0?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},pb=class i extends Yo{constructor(e,t){t=t||b("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return _0e(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};pb.ID="toolbar.toggle.more"});var y0e,mb,N2,v$=N(()=>{Bt();Z9();b$();Rc();pi();ke();He();Zi();wt();vl();Ur();Oc();y0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},mb=function(i,e){return function(t,r){e(t,r,i)}},N2=class extends M2{constructor(e,t,r,n,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:c=>{var d;return(d=s.lookupKeybinding(c.id))!==null&&d!==void 0?d:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=r,this._contextKeyService=n,this._contextMenuService=o,this._sessionDisposables=this._store.add(new le);let l=t==null?void 0:t.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(c=>a.publicLog2("workbenchActionExecuted",{id:c.action.id,from:l})))}setActions(e,t=[],r){var n,o,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,u=[],h=!1;if(((n=this._options)===null||n===void 0?void 0:n.hiddenItemStrategy)!==-1)for(let f=0;f<a.length;f++){let m=a[f];!(m instanceof ia)&&!(m instanceof Mm)||m.hideActions&&(c.push(m.hideActions.toggle),m.hideActions.toggle.checked&&d++,m.hideActions.isHidden&&(h=!0,a[f]=void 0,((o=this._options)===null||o===void 0?void 0:o.hiddenItemStrategy)!==0&&(u[f]=m)))}if(((s=this._options)===null||s===void 0?void 0:s.maxNumberOfItems)!==void 0){let f=0;for(let m=0;m<a.length;m++){let g=a[m];g&&++f>=this._options.maxNumberOfItems&&(a[m]=void 0,u[m]=g)}}$3(a),$3(u),super.setActions(a,ws.join(u,l)),c.length>0&&this._sessionDisposables.add(Lt(this.getElement(),"contextmenu",f=>{var m,g,w,_,E;let A=new Uv(f),L=this.getItemAction(A.target);if(!L)return;A.preventDefault(),A.stopPropagation();let O=!1;if(d===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){O=!0;for(let oe=0;oe<c.length;oe++)if(c[oe].checked){c[oe]=Jh({id:L.id,label:L.label,checked:!0,enabled:!1,run(){}});break}}let U;if(!O&&(L instanceof ia||L instanceof Mm)){if(!L.hideActions)return;U=L.hideActions.hide}else U=Jh({id:"label",label:b("hide","Hide"),enabled:!1,run(){}});let Y=ws.join([U],c);!((g=this._options)===null||g===void 0)&&g.resetMenu&&!r&&(r=[this._options.resetMenu]),h&&r&&(Y.push(new ws),Y.push(Jh({id:"resetThisMenu",label:b("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(r)}))),this._contextMenuService.showContextMenu({getAnchor:()=>A,getActions:()=>Y,menuId:(w=this._options)===null||w===void 0?void 0:w.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(_=this._options)===null||_===void 0?void 0:_.menuOptions),skipTelemetry:typeof((E=this._options)===null||E===void 0?void 0:E.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};N2=y0e([mb(2,xs),mb(3,it),mb(4,ts),mb(5,qt),mb(6,Ln)],N2)});var FL,js,R2,P2,w0e,x0e,Ws,RL,PL,OL,O2=N(()=>{Bt();mF();bF();Rc();pi();Ut();Qr();ke();_a();En();In();p$();ci();hn();T2();He();X_();v$();Zi();Wi();wt();vl();Ht();Ur();Oc();xl();FL=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},js=function(i,e){return function(t,r){e(t,r,i)}},P2=class extends ce{constructor(e,t,r){super(),this.editor=e,this.model=t,this.instantiationService=r,this.alwaysShowToolbar=Sl(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).showToolbar==="always"),this.sessionPosition=void 0,this.position=Do(n=>{var o,s,a;let l=(o=this.model.read(n))===null||o===void 0?void 0:o.ghostText.read(n);if(!this.alwaysShowToolbar.read(n)||!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 Ie(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(jF((n,o)=>{let s=this.model.read(n);if(!s||!this.alwaysShowToolbar.read(n))return;let a=o.add(this.instantiationService.createInstance(Ws,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(ii(()=>e.removeContentWidget(a))),o.add(fn(l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==ha.Explicit&&s.triggerExplicitly()}))}))}};P2=FL([js(2,Ke)],P2);w0e=Ni("inline-suggestion-hints-next",pt.chevronRight,b("parameterHintsNextIcon","Icon for show next parameter hint.")),x0e=Ni("inline-suggestion-hints-previous",pt.chevronLeft,b("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Ws=R2=class extends ce{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,r){let n=new Yo(e,t,r,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=b({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(e,t,r,n,o,s,a,l,c,d,u){super(),this.editor=e,this.withBorder=t,this._position=r,this._currentSuggestionIdx=n,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=u,this.id=`InlineSuggestionHintsContentWidget${R2.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Wv("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Wv("div@toolBar")]),this.previousAction=this.createCommandAction(k2,b("previous","Previous"),_t.asClassName(x0e)),this.availableSuggestionCountAction=new Yo("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(E2,b("next","Next"),_t.asClassName(w0e)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Me.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new di(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new di(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(OL,this.nodes.toolBar,Me.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,f)=>{if(h instanceof ia)return l.createInstance(PL,h,void 0);if(h===this.availableSuggestionCountAction){let m=new RL(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{R2._dropDownVisible=h})),this._register(fn(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(fn(h=>{let f=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(fn(h=>{let f=this._extraCommands.read(h);if(Cs(this.lastCommands,f))return;this.lastCommands=f;let m=f.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:w=>this._commandService.executeCommand(g.id)}));for(let[g,w]of this.inlineCompletionsActionsMenus.getActions())for(let _ of w)_ instanceof ia&&m.push(_);m.length>0&&m.unshift(new ws),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Ws._dropDownVisible=!1;Ws.id=0;Ws=R2=FL([js(6,vi),js(7,Ke),js(8,qt),js(9,it),js(10,xs)],Ws);RL=class extends eg{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}},PL=class extends Y_{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=Wv("div.keybinding").root;new M_(t,Bv,Object.assign({disableTitle:!0},gF)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},OL=class extends N2{constructor(e,t,r,n,o,s,a,l){super(e,Object.assign({resetMenu:t},r),n,o,s,a,l),this.menuId=t,this.options2=r,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,r,n,o,s,a;let l=[],c=[];G_(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(r=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||r===void 0?void 0:r.primaryGroup,(o=(n=this.options2)===null||n===void 0?void 0:n.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),l.unshift(...this.prependedPrimaryActions),this.setActions(l,c)}setPrependedPrimaryActions(e){Cs(this.prependedPrimaryActions,e,(t,r)=>t===r)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Cs(this.additionalActions,e,(t,r)=>t===r)||(this.additionalActions=e,this.updateToolbar())}};OL=FL([js(3,xs),js(4,it),js(5,ts),js(6,qt),js(7,Ln)],OL)});function _$(i,e){let t=new oO,r=new aO(t,c=>e.getLanguageConfiguration(c)),n=new sO(new zL([i]),r),o=lO(n,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=hf(d,c.openingBracket.length),c.child&&(l(c.child,d),d=hf(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=hf(d,c.closingBracket.length);else{let h=r.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,hf(d,c.length));else if(c.kind===4)for(let u of c.children)l(u,d),d=hf(d,u.length)}}return l(o,nO),s}var zL,y$=N(()=>{Cre();_re();Sre();yre();xre();zL=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 w$(i,e){let t=[...i];for(;t.length>0;){let r=t.shift();if(!e(r))break;t.unshift(...r.children)}}var F2,Id,Nr,z2,go,sh,BL,Vs,gb,_p,Ho,ah=N(()=>{F2=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,r=this.value.charCodeAt(e),n;if(n=i._table[r],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(i.isDigitCharacter(r)){n=8;do t+=1,r=this.value.charCodeAt(e+t);while(i.isDigitCharacter(r));return this.pos+=t,{type:n,pos:e,len:t}}if(i.isVariableCharacter(r)){n=9;do r=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(r)||i.isDigitCharacter(r));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,r=this.value.charCodeAt(e+t);while(!isNaN(r)&&typeof i._table[r]=="undefined"&&!i.isDigitCharacter(r)&&!i.isVariableCharacter(r));return this.pos+=t,{type:n,pos:e,len:t}}};F2._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};Id=class{constructor(){this._children=[]}appendChild(e){return e instanceof Nr&&this._children[this._children.length-1]instanceof Nr?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:r}=e,n=r.children.indexOf(e),o=r.children.slice(0);o.splice(n,1,...t),r._children=o,function s(a,l){for(let c of a)c.parent=l,s(c.children,c)}(t,r)}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 _p)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},Nr=class i extends Id{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},z2=class extends Id{},go=class i extends z2{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.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 sh?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}},sh=class i extends Id{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Nr&&(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}},BL=class i extends Id{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,r=!1,n=e.replace(this.regexp,function(){return r=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!r&&this._children.some(o=>o instanceof Vs&&!!o.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(let r of this._children)if(r instanceof Vs){let n=e[r.index]||"";n=r.resolve(n),t+=n}else t+=r.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}},Vs=class i extends Id{constructor(e,t,r,n){super(),this.index=e,this.shorthandName=t,this.ifValue=r,this.elseValue=n}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(r=>r.charAt(0).toUpperCase()+r.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((r,n)=>n===0?r.charAt(0).toLowerCase()+r.substr(1):r.charAt(0).toUpperCase()+r.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},gb=class i extends z2{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 Nr(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}};_p=class i extends Id{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(r){return r instanceof go&&(e.push(r),t=!t||t.index<r.index?r:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){let{all:e}=this.placeholderInfo;return e}offset(e){let t=0,r=!1;return this.walk(n=>n===e?(r=!0,!1):(t+=n.len(),!0)),r?t:-1}fullLen(e){let t=0;return w$([e],r=>(t+=r.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:r}=e;for(;r;)r instanceof go&&t.push(r),r=r.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof gb&&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){w$(this.children,e)}},Ho=class{constructor(){this._scanner=new F2,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,r){let n=new _p;return this.parseFragment(e,n),this.ensureFinalTabstop(n,r!=null?r:!1,t!=null?t:!1),n}parseFragment(e,t){let r=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let n=new Map,o=[];t.walk(l=>(l instanceof go&&(l.isFinalTabstop?n.set(0,void 0):!n.has(l.index)&&l.children.length>0?n.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let d=n.get(l.index);if(!d)return;let u=new go(l.index);u.transform=l.transform;for(let h of d){let f=h.clone();u.appendChild(f),f instanceof go&&n.has(f.index)&&!c.has(f.index)&&(c.add(f.index),s(f,c),c.delete(f.index))}t.replace(l,[u])},a=new Set;for(let l of o)s(l,a);return t.children.slice(r)}ensureFinalTabstop(e,t,r){(t||r&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new go(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let r=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),r}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 n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}let r=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),r}_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 Nr(t)),!0):!1}_parseTabstopOrVariableName(e){let t,r=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new go(Number(t)):new gb(t)),!0):this._backTo(r)}_parseComplexPlaceholder(e){let t,r=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(r);let o=new go(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Nr("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new sh;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(r),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(r),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(r)}_parseChoiceElement(e){let t=this._token,r=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;r.push(n)}return r.length===0?(this._backTo(t),!1):(e.appendChild(new Nr(r.join(""))),!0)}_parseComplexVariable(e){let t,r=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(r);let o=new gb(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Nr("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(r),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(r)}_parseTransform(e){let t=new BL,r="",n="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,r+=o;continue}if(this._token.type!==14){r+=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 Nr(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(r,n)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let r=!1;this._accept(3)&&(r=!0);let n=this._accept(8,!0);if(n)if(r){if(this._accept(4))return e.appendChild(new Vs(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Vs(Number(n))),!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 Vs(Number(n),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Vs(Number(n),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Vs(Number(n),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 Vs(Number(n),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Vs(Number(n),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Nr(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}});function C$(i,e,t,r,n=st.None,o){return HL(this,void 0,void 0,function*(){let s=C0e(e,t),a=i.all(t),l=new YF;for(let _ of a)_.groupId&&l.add(_.groupId,_);function c(_){if(!_.yieldsToGroupIds)return[];let E=[];for(let A of _.yieldsToGroupIds||[]){let L=l.get(A);for(let O of L)E.push(O)}return E}let d=new Map,u=new Set;function h(_,E){if(E=[...E,_],u.has(_))return E;u.add(_);try{let A=c(_);for(let L of A){let O=h(L,E);if(O)return O}}finally{u.delete(_)}}function f(_){let E=d.get(_);if(E)return E;let A=h(_,[]);A&&Yt(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${A.map(O=>O.toString?O.toString():""+O).join(" -> ")}`));let L=new d_;return d.set(_,L.p),(()=>HL(this,void 0,void 0,function*(){if(!A){let O=c(_);for(let U of O){let Y=yield f(U);if(Y&&Y.items.length>0)return}}try{return yield _.provideInlineCompletions(t,e,r,n)}catch(O){Yt(O);return}}))().then(O=>L.complete(O),O=>L.error(O)),L.p}let m=yield Promise.all(a.map(_=>HL(this,void 0,void 0,function*(){return{provider:_,completions:yield f(_)}}))),g=new Map,w=[];for(let _ of m){let E=_.completions;if(!E)continue;let A=new jL(E,_.provider);w.push(A);for(let L of E.items){let O=WL.from(L,A,s,t,o);g.set(O.hash(),O)}}return new UL(Array.from(g.values()),new Set(g.keys()),w)})}function C0e(i,e){let t=e.getWordAtPosition(i),r=e.getLineMaxColumn(i.lineNumber);return t?new B(i.lineNumber,t.startColumn,i.lineNumber,r):B.fromPositions(i,i.with(void 0,r))}function x$(i,e,t,r){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?_$(a,r):i}var HL,UL,jL,WL,S$=N(()=>{ore();Ut();Si();Gre();Vt();et();y$();gp();ah();HL=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};UL=class{constructor(e,t,r){this.completions=e,this.hashs=t,this.providerResults=r}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},jL=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)}},WL=class i{static from(e,t,r,n,o){let s,a,l=e.range?B.lift(e.range):r;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=x$(s,l.getStartPosition(),n,o);let c=s.length-e.insertText.length;c!==0&&(l=new B(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=x$(e.insertText.snippet,l.getStartPosition(),n,o);let u=e.insertText.snippet.length-c;u!==0&&(l=new B(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+u))}let d=new Ho().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof Nr?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else yP(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||c$(),e,t)}constructor(e,t,r,n,o,s,a,l){this.filterText=e,this.command=t,this.range=r,this.insertText=n,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` `),n=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 S0e(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function k0e(i,e){if((qa==null?void 0:qa.originalValue)===i&&(qa==null?void 0:qa.newValue)===e)return qa==null?void 0:qa.changes;{let t=k$(i,e,!0);if(t){let r=S$(t);if(r>0){let n=k$(i,e,!1);n&&S$(n)<r&&(t=n)}}return qa={originalValue:i,newValue:e,changes:t},t}}function S$(i){let e=0;for(let t of i)e+=t.originalLength;return e}function k$(i,e,t){if(i.length>5e3||e.length>5e3)return;function r(c){let d=0;for(let u=0,h=c.length;u<h;u++){let f=c.charCodeAt(u);f>d&&(d=f)}return d}let n=Math.max(r(i),r(e));function o(c){if(c<0)throw new Error("unexpected");return n+c+1}function s(c){let d=0,u=0,h=new Int32Array(c.length);for(let f=0,m=c.length;f<m;f++)if(t&&c[f]==="("){let g=u*100+d;h[f]=o(2*g),d++}else if(t&&c[f]===")"){d=Math.max(d-1,0);let g=u*100+d;h[f]=o(2*g+1),d===0&&u++}else h[f]=c.charCodeAt(f);return h}let a=s(i),l=s(e);return new YF({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var lh,qa,WL=N(()=>{Yre();Di();et();A2();gp();lh=class i{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){let r=t?this.range.intersectRanges(t):this.range;if(!r)return this;let n=e.getValueInRange(r,1),o=Pc(n,this.text),s=hb(this.range.getStartPosition(),fb(n.substring(0,o))),a=this.text.substring(o),l=B.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&S0e(this.range,e.range)}computeGhostText(e,t,r,n=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=Vi(s).length;if(o.range.startColumn-1<=a){let m=Vi(o.text).length,g=s.substring(o.range.startColumn-1,a),[w,_]=[o.range.getStartPosition(),o.range.getEndPosition()],E=w.column+g.length<=_.column?w.delta(0,g.length):_,A=B.fromPositions(E,_),L=o.text.startsWith(g)?o.text.substring(g.length):o.text.substring(m);o=new i(A,L)}let c=e.getValueInRange(o.range),d=k0e(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 f=o.text.length-n;for(let m of d){let g=o.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&r&&r.lineNumber===o.range.startLineNumber&&g<r.column||m.originalLength>0)return;if(m.modifiedLength===0)continue;let w=m.modifiedStart+m.modifiedLength,_=Math.max(m.modifiedStart,Math.min(w,f)),E=o.text.substring(m.modifiedStart,_),A=o.text.substring(_,Math.max(m.modifiedStart,w));if(E.length>0){let L=du(E);h.push(new bp(g,L,!1))}if(A.length>0){let L=du(A);h.push(new bp(g,L,!0))}}return new Td(u,h)}}});function I0e(i,e){return new Promise(t=>{let r,n=setTimeout(()=>{r&&r.dispose(),t()},i);e&&(r=e.onCancellationRequested(()=>{clearTimeout(n),r&&r.dispose(),t()}))})}function L0e(i,e,t){return!i||!e?i===e:t(i,e)}function T$(i){return i.startLineNumber===i.endLineNumber?new Ie(1,1+i.endColumn-i.startColumn):new Ie(1+i.endLineNumber-i.startLineNumber,i.endColumn)}var E0e,E$,T0e,B2,VL,qL,KL,H2,I$=N(()=>{Si();hl();ke();_a();ci();hn();Br();Rt();C$();WL();E0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},E$=function(i,e){return function(t,r){e(t,r,i)}},T0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},B2=class extends ce{constructor(e,t,r,n,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=r,this.languageFeaturesService=n,this.languageConfigurationService=o,this._updateOperation=this._register(new ji),this.inlineCompletions=rg("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=rg("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,r){var n,o;let s=new VL(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((n=this._updateOperation.value)===null||n===void 0)&&n.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 Fi,d=(()=>T0e(this,void 0,void 0,function*(){if((l||t.triggerKind===ha.Automatic)&&(yield I0e(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let f=new Date,m=yield x$(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()-f.getTime());let w=new KL(m,s,this.textModel,this.versionId);if(r){let _=r.toInlineCompletion(void 0);r.canBeReused(this.textModel,e)&&!m.has(_)&&w.prepend(r.inlineCompletion,_.range,!0)}return this._updateOperation.clear(),nn(_=>{a.set(w,_)}),!0}))(),u=new qL(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()}};B2=E0e([E$(3,Se),E$(4,Pt)],B2);VL=class{constructor(e,t,r){this.position=e,this.context=t,this.versionId=r}satisfies(e){return this.position.equals(e.position)&&L0e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,r)=>t.equals(r))&&(e.context.triggerKind===ha.Automatic||this.context.triggerKind===ha.Explicit)&&this.versionId===e.versionId}};qL=class{constructor(e,t,r){this.request=e,this.cancellationTokenSource=t,this.promise=r}dispose(){this.cancellationTokenSource.cancel()}},KL=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,r,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=r,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=Do(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=r.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new H2(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,r){r&&e.source.addRef();let n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new H2(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},H2=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,r,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=r,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=n!=null?n:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new lh(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,r){let n=this._toFilterTextReplacement(r).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(r).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;let o=e.getValueInRange(n.range,1).toLowerCase(),s=n.text.toLowerCase(),a=Math.max(0,t.column-n.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),u=o.substring(a),h=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=h&&(d=d.trimStart(),d.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!jP(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 lh(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return T$(this._getUpdatedRange(e)).isBefore(T$(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 L$(){return yp}function vb(i,e,t,r=tc.default,n={triggerKind:0},o=st.None){return bb(this,void 0,void 0,function*(){let s=new pr;t=t.clone();let a=e.getWordAtPosition(t),l=a?new B(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):B.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],u=new le,h=[],f=!1,m=(w,_,E)=>{var A,L,O;let U=!1;if(!_)return U;for(let Y of _.suggestions)if(!r.kindFilter.has(Y.kind)){if(!r.showDeprecated&&(!((A=Y==null?void 0:Y.tags)===null||A===void 0)&&A.includes(1)))continue;Y.range||(Y.range=c),Y.sortText||(Y.sortText=typeof Y.label=="string"?Y.label:Y.label.label),!f&&Y.insertTextRules&&Y.insertTextRules&4&&(f=Ho.guessNeedsClipboard(Y.insertText)),d.push(new $L(t,Y,_,w)),U=!0}return Rv(_)&&u.add(_),h.push({providerName:(L=w._debugDisplayName)!==null&&L!==void 0?L:"unknown_provider",elapsedProvider:(O=_.duration)!==null&&O!==void 0?O:-1,elapsedOverall:E.elapsed()}),U},g=(()=>bb(this,void 0,void 0,function*(){if(!yp||r.kindFilter.has(27))return;let w=r.providerItemsToReuse.get(yp);if(w){w.forEach(A=>d.push(A));return}if(r.providerFilter.size>0&&!r.providerFilter.has(yp))return;let _=new pr,E=yield yp.provideCompletionItems(e,t,n,o);m(yp,E,_)}))();for(let w of i.orderedGroups(e)){let _=!1;if(yield Promise.all(w.map(E=>bb(this,void 0,void 0,function*(){if(r.providerItemsToReuse.has(E)){let A=r.providerItemsToReuse.get(E);A.forEach(L=>d.push(L)),_=_||A.length>0;return}if(!(r.providerFilter.size>0&&!r.providerFilter.has(E)))try{let A=new pr,L=yield E.provideCompletionItems(e,t,n,o);_=m(E,L,A)||_}catch(A){Yt(A)}}))),_||o.isCancellationRequested)break}return yield g,o.isCancellationRequested?(u.dispose(),Promise.reject(new Mv)):new GL(d.sort(M0e(r.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},u)})}function YL(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLow<e.sortTextLow)return-1;if(i.sortTextLow>e.sortTextLow)return 1}return i.textLabel<e.textLabel?-1:i.textLabel>e.textLabel?1:i.completion.kind-e.completion.kind}function A0e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return YL(i,e)}function D0e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return YL(i,e)}function M0e(i){return U2.get(i)}function A$(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var bb,ct,$a,$L,tc,yp,GL,U2,Ka,ch=N(()=>{Si();Vt();hl();ke();ol();Fr();Tr();ci();et();ta();ah();He();Zi();Wi();wt();Rt();FI();bb=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},ct={Visible:p2,HasFocusedSuggestion:new ht("suggestWidgetHasFocusedSuggestion",!1,b("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new ht("suggestWidgetDetailsVisible",!1,b("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new ht("suggestWidgetMultipleSuggestions",!1,b("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new ht("suggestionMakesTextEdit",!0,b("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new ht("acceptSuggestionOnEnter",!0,b("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new ht("suggestionHasInsertAndReplaceRange",!1,b("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new ht("suggestionInsertMode",void 0,{type:"string",description:b("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new ht("suggestionCanResolve",!1,b("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},$a=new Me("suggestWidgetStatusBar"),$L=class{constructor(e,t,r,n){var o;this.position=e,this.completion=t,this.container=r,this.provider=n,this.isInvalid=!1,this.score=ul.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,B.isIRange(t.range)?(this.editStart=new Ie(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Ie(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Ie(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||B.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Ie(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Ie(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Ie(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||B.spansMultipleLines(t.range.insert)||B.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 n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}resolve(e){return bb(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),r=new pr(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._resolveDuration=r.elapsed(),t.dispose()},n=>{$o(n)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})}return this._resolveCache})}},tc=class{constructor(e=2,t=new Set,r=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=r,this.providerItemsToReuse=n,this.showDeprecated=o}};tc.default=new tc;GL=class{constructor(e,t,r,n){this.items=e,this.needsClipboard=t,this.durations=r,this.disposable=n}};U2=new Map;U2.set(0,A0e);U2.set(2,D0e);U2.set(1,YL);At.registerCommand("_executeCompletionItemProvider",(i,...e)=>bb(void 0,void 0,void 0,function*(){let[t,r,n,o]=e;zt(yt.isUri(t)),zt(Ie.isIPosition(r)),zt(typeof n=="string"||!n),zt(typeof o=="number"||!o);let{completionProvider:s}=i.get(Se),a=yield i.get(xr).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(r),u=yield vb(s,a.object.textEditorModel,d,void 0,{triggerCharacter:n!=null?n:void 0,triggerKind:n?1:0});for(let h of u.items)c.length<(o!=null?o:0)&&c.push(h.resolve(st.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()}}));Ka=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 D$=N(()=>{});var M$=N(()=>{D$()});function XL(i,e=Dc){return $P(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var N$=N(()=>{bre();En()});var N0e,R0e,pYe,_b,yb,wb,xb,Cb,ic,Sb,kb,R$=N(()=>{N$();J9();Io();Di();F0();Br();ah();He();z_();N0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},R0e=function(i,e){return function(t,r){e(t,r,i)}},pYe=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}),_b=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let r=t.resolve(e);if(r!==void 0)return r}}},yb=class{constructor(e,t,r,n){this._model=e,this._selection=t,this._selectionIdx=r,this._overtypingCapturer=n}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let r=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!r&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(r=o.value,n=o.multiline)}if(r&&n&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=Vi(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof Nr&&(a=Vi(du(c.value).pop())),!0));let l=Pc(a,s);r=r.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}return r}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let r=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return r&&r.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)}}}},wb=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Zh(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let r=Zh(this._model.uri.fsPath),n=r.lastIndexOf(".");return n<=0?r:r.slice(0,n)}else{if(t==="TM_DIRECTORY")return Z9(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(cf(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})}}},xb=class{constructor(e,t,r,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=r,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let r=t.split(/\r\n|\n|\r/).filter(n=>!dP(n));if(r.length===this._selectionCount)return r[this._selectionIdx]}return t}}},Cb=class{constructor(e,t,r){this._model=e,this._selection=t,this._languageConfigurationService=r}resolve(e){let{name:t}=e,r=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(r).comments;if(n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};Cb=N0e([R0e(2,Pt)],Cb);ic=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 r=this._date.getTimezoneOffset(),n=r>0?"-":"+",o=Math.trunc(Math.abs(r/60)),s=o<10?"0"+o:o,a=Math.abs(r)-o*60,l=a<10?"0"+a:a;return n+s+":"+l}}};ic.dayNames=[b("Sunday","Sunday"),b("Monday","Monday"),b("Tuesday","Tuesday"),b("Wednesday","Wednesday"),b("Thursday","Thursday"),b("Friday","Friday"),b("Saturday","Saturday")];ic.dayNamesShort=[b("SundayShort","Sun"),b("MondayShort","Mon"),b("TuesdayShort","Tue"),b("WednesdayShort","Wed"),b("ThursdayShort","Thu"),b("FridayShort","Fri"),b("SaturdayShort","Sat")];ic.monthNames=[b("January","January"),b("February","February"),b("March","March"),b("April","April"),b("May","May"),b("June","June"),b("July","July"),b("August","August"),b("September","September"),b("October","October"),b("November","November"),b("December","December")];ic.monthNamesShort=[b("JanuaryShort","Jan"),b("FebruaryShort","Feb"),b("MarchShort","Mar"),b("AprilShort","Apr"),b("MayShort","May"),b("JuneShort","Jun"),b("JulyShort","Jul"),b("AugustShort","Aug"),b("SeptemberShort","Sep"),b("OctoberShort","Oct"),b("NovemberShort","Nov"),b("DecemberShort","Dec")];Sb=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=kF(this._workspaceService.getWorkspace());if(!SF(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(hk(e))return Zh(e.uri.path);let t=Zh(e.configPath.path);return t.endsWith(fk)&&(t=t.substr(0,t.length-fk.length-1)),t}_resoveWorkspacePath(e){if(hk(e))return XL(e.uri.fsPath);let t=Zh(e.configPath.path),r=e.configPath.fsPath;return r.endsWith(t)&&(r=r.substr(0,r.length-t.length-1)),r?XL(r):"/"}},kb=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 P0e,O0e,qs,Eb,P$,wp,QL=N(()=>{pi();ke();Di();M$();ba();et();Ir();Br();Hr();Q_();z_();ah();R$();P0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},O0e=function(i,e){return function(t,r){e(t,r,i)}},Eb=class i{constructor(e,t,r){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=r,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=q3(t.placeholders,go.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 r of this._snippet.placeholders){let n=this._snippet.offset(r),o=this._snippet.fullLen(r),s=B.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),a=r.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(r,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let n=[];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;d<c.length;d++)c[d]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+c[d]);n.push(ti.replace(a,c.join(this._editor.getModel().getEOL())))}n.length>0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let t=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);let r=this._editor.getModel().changeDecorations(n=>{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 Qe(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),n.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);n.changeDecorationOptions(u,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||n.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):r!=null?r:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof go){let r=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(r).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 r;for(let n of t){if(n.isFinalTabstop)break;r||(r=[],e.set(n.index,r));let o=this._placeholderDecorations.get(n),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(n.index);break}r.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 r=this._editor.getModel().getDecorationRange(t);if(r)return{range:r,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof sh,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(r=>{for(let n 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=n.index+(s+1)/this._nestingLevel:l.index=n.index+l.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);let a=this._placeholderDecorations.get(n);r.removeDecoration(a),this._placeholderDecorations.delete(n);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),u=B.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),h=r.addDecoration(u,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=q3(this._snippet.placeholders,go.compareByIndex)})}};Eb._decor={active:mt.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:mt.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:mt.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:mt.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};P$={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},wp=qs=class{static adjustWhitespace(e,t,r,n,o){let s=e.getLineContent(t.lineNumber),a=Vi(s,0,t.column-1),l;return n.walk(c=>{if(!(c instanceof Nr)||c.parent instanceof sh||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(r){let h=n.offset(c);if(h===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:n.toString();let f=l.charCodeAt(h-1);(f===10||f===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let f=1;f<d.length;f++)d[f]=e.normalizeIndentation(a+d[f])}let u=d.join(e.getEOL());return u!==c.value&&(c.parent.replace(c,[new Nr(u)]),l=void 0),!0}),a}static adjustSelection(e,t,r,n){if(r!==0||n!==0){let{positionLineNumber:o,positionColumn:s}=t,a=s-r,l=s+n,c=e.validateRange({startLineNumber:o,startColumn:a,endLineNumber:o,endColumn:l});t=Qe.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,t.getDirection())}return t}static createEditsAndSnippetsFromSelections(e,t,r,n,o,s,a,l,c){let d=[],u=[];if(!e.hasModel())return{edits:d,snippets:u};let h=e.getModel(),f=e.invokeWithinContext(L=>L.get(yl)),m=e.invokeWithinContext(L=>new wb(L.get(kl),h)),g=()=>a,w=h.getValueInRange(qs.adjustSelection(h,e.getSelection(),r,0)),_=h.getValueInRange(qs.adjustSelection(h,e.getSelection(),0,n)),E=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),A=e.getSelections().map((L,O)=>({selection:L,idx:O})).sort((L,O)=>B.compareRangesUsingStarts(L.selection,O.selection));for(let{selection:L,idx:O}of A){let U=qs.adjustSelection(h,L,r,0),Y=qs.adjustSelection(h,L,0,n);w!==h.getValueInRange(U)&&(U=L),_!==h.getValueInRange(Y)&&(Y=L);let oe=L.setStartPosition(U.startLineNumber,U.startColumn).setEndPosition(Y.endLineNumber,Y.endColumn),te=new Ho().parse(t,!0,o),Z=oe.getStartPosition(),ve=qs.adjustWhitespace(h,Z,s||O>0&&E!==h.getLineFirstNonWhitespaceColumn(L.positionLineNumber),te);te.resolveVariables(new _b([m,new xb(g,O,A.length,e.getOption(77)==="spread"),new yb(h,L,O,l),new Cb(h,L,c),new ic,new Sb(f),new kb])),d[O]=ti.replace(oe,te.toString()),d[O].identifier={major:O,minor:0},d[O]._isTracked=!0,u[O]=new Eb(e,te,ve)}return{edits:d,snippets:u}}static createEditsAndSnippetsFromEdits(e,t,r,n,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new Ho,u=new _p,h=new _b([e.invokeWithinContext(m=>new wb(m.get(kl),c)),new xb(()=>o,0,e.getSelections().length,e.getOption(77)==="spread"),new yb(c,e.getSelection(),0,s),new Cb(c,e.getSelection(),a),new ic,new Sb(e.invokeWithinContext(m=>m.get(yl))),new kb]);t=t.sort((m,g)=>B.compareRangesUsingStarts(m.range,g.range));let f=0;for(let m=0;m<t.length;m++){let{range:g,template:w}=t[m];if(m>0){let O=t[m-1].range,U=B.fromPositions(O.getEndPosition(),g.getStartPosition()),Y=new Nr(c.getValueInRange(U));u.appendChild(Y),f+=Y.value.length}let _=d.parseFragment(w,u);qs.adjustWhitespace(c,g.getStartPosition(),!0,u,new Set(_)),u.resolveVariables(h);let E=u.toString(),A=E.slice(f);f=E.length;let L=ti.replace(g,A);L.identifier={major:m,minor:0},L._isTracked=!0,l.push(L)}return d.ensureFinalTabstop(u,r,!0),{edits:l,snippets:[new Eb(e,u,"")]}}constructor(e,t,r=P$,n){this._editor=e,this._template=t,this._options=r,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){Ui(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"?qs.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):qs.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,r=>{let n=r.filter(o=>!!o.identifier);for(let o=0;o<t.length;o++)t[o].initialize(n[o].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):n.map(o=>Qe.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=P$){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:r,snippets:n}=qs.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",r,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;l<n.length;l++)n[l].initialize(s[l].textChange);let a=n[0].isTrivialSnippet;if(!a){for(let l of this._snippets)l.merge(n);console.assert(n.length===0)}return this._snippets[0].hasPlaceholder&&!a?this._move(void 0):s.map(l=>Qe.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 r of this._snippets){let n=r.move(e);t.push(...n)}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<this._snippets.length)return!1;let t=new Map;for(let r of this._snippets){let n=r.computePossibleSelections();if(t.size===0)for(let[o,s]of n){s.sort(B.compareRangesUsingStarts);for(let a of e)if(s[0].containsRange(a)){t.set(o,[]);break}}if(t.size===0)return!1;t.forEach((o,s)=>{o.push(...n.get(s))})}e.sort(B.compareRangesUsingStarts);for(let[r,n]of t){if(n.length!==e.length){t.delete(r);continue}n.sort(B.compareRangesUsingStarts);for(let o=0;o<n.length;o++)if(!n[o].containsRange(e[o])){t.delete(r);continue}}return t.size>0}};wp=qs=P0e([O0e(3,Pt)],wp)});var F0e,j2,xp,O$,rr,W2,Cp=N(()=>{ke();Fr();lt();ci();ei();Br();Rt();ch();He();wt();Kv();QL();F0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},j2=function(i,e){return function(t,r){e(t,r,i)}},O$={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},rr=xp=class{static get(e){return e.getContribution(xp.ID)}constructor(e,t,r,n,o){this._editor=e,this._logService=t,this._languageFeaturesService=r,this._languageConfigurationService=o,this._snippetListener=new le,this._modelVersionId=-1,this._inSnippet=xp.InSnippetMode.bindTo(n),this._hasNextTabstop=xp.HasNextTabstop.bindTo(n),this._hasPrevTabstop=xp.HasPrevTabstop.bindTo(n)}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"?O$:Object.assign(Object.assign({},O$),t))}catch(r){this.cancel(),this._logService.error(r),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){var r;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(zt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new wp(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((r=this._session)===null||r===void 0)&&r.hasChoice){let n={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(d,u)=>{if(!this._session||d!==this._editor.getModel()||!Ie.equals(this._editor.getPosition(),u))return;let{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;let f=d.getValueInRange(h.range),m=!!h.choice.options.find(w=>w.value===f),g=[];for(let w=0;w<h.choice.options.length;w++){let _=h.choice.options[w];g.push({kind:13,label:_.value,insertText:_.value,sortText:"a".repeat(w+1),range:h.range,filterText:m?`${f}_${_.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:b("next","Go to next placeholder...")}})}return{suggestions:g}}},o=this._editor.getModel(),s,a=!1,l=()=>{s==null||s.dispose(),a=!1},c=()=>{a||(s=this._languageFeaturesService.completionProvider.register({language:o.getLanguageId(),pattern:o.uri.fsPath,scheme:o.uri.scheme,exclusive:!0},n),this._snippetListener.add(s),a=!0)};this._choiceCompletions={provider:n,enable:c,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(n=>n.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(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:t}=this._session;if(!t||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{A$(this._editor,this._choiceCompletions.provider)}))}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()}};rr.ID="snippetController2";rr.InSnippetMode=new ht("inSnippetMode",!1,b("inSnippetMode","Whether the editor in current in snippet mode"));rr.HasNextTabstop=new ht("hasNextTabstop",!1,b("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));rr.HasPrevTabstop=new ht("hasPrevTabstop",!1,b("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));rr=xp=F0e([j2(1,Fc),j2(2,Se),j2(3,it),j2(4,Pt)],rr);Ue(rr.ID,rr,4);W2=Oi.bindToContribution(rr.get);We(new W2({id:"jumpToNextSnippetPlaceholder",precondition:fe.and(rr.InSnippetMode,rr.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:2}}));We(new W2({id:"jumpToPrevSnippetPlaceholder",precondition:fe.and(rr.InSnippetMode,rr.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:1026}}));We(new W2({id:"leaveSnippet",precondition:rr.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:9,secondary:[1033]}}));We(new W2({id:"acceptSnippet",precondition:rr.InSnippetMode,handler:i=>i.finish()}))});var z0e,ZL,rc,to,V2,F$=N(()=>{pi();Vt();ke();_a();Fr();ba();ci();et();hn();Br();A2();I$();gp();Cp();Wi();Ht();z0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ZL=function(i,e){return function(t,r){e(t,r,i)}},rc=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.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"})(to||(to={}));V2=class extends ce{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,r,n,o,s,a,l,c,d,u,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=r,this.textModelVersionId=n,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(B2,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=va("isActive",!1),this._forceUpdate=WF("forceUpdate"),this._selectedInlineCompletionId=va("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([to.Redo,to.Undo,to.AcceptWord]),this._fetchInlineCompletions=BF("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ha.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 _=this.selectedInlineCompletion.get(),E=g.preserveCurrentCompletion||_!=null&&_.forwardStable?_:void 0,A=this._source.suggestWidgetInlineCompletions.get(),L=this.selectedSuggestItem.read(m);if(A&&!L){let Y=this._source.inlineCompletions.get();nn(oe=>{Y&&A.request.versionId>Y.request.versionId&&this._source.inlineCompletions.set(A.clone(),oe),this._source.clearSuggestWidgetInlineCompletions(oe)})}let O=this.cursorPosition.read(m),U={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:L==null?void 0:L.toSelectedSuggestionInfo()};return this._source.fetch(O,U,E)}),this._filteredInlineCompletionItems=Do(m=>{let g=this._source.inlineCompletions.read(m);if(!g)return[];let w=this.cursorPosition.read(m);return g.inlineCompletions.filter(E=>E.isVisible(this.textModel,w,m))}),this.selectedInlineCompletionIndex=Do(m=>{let g=this._selectedInlineCompletionId.read(m),w=this._filteredInlineCompletionItems.read(m),_=this._selectedInlineCompletionId===void 0?-1:w.findIndex(E=>E.semanticId===g);return _===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):_}),this.selectedInlineCompletion=Do(m=>{let g=this._filteredInlineCompletionItems.read(m),w=this.selectedInlineCompletionIndex.read(m);return g[w]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=Do(m=>{if(this.lastTriggerKind.read(m)===ha.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=yk({equalityComparer:(m,g)=>!m||!g?m===g:DL(m.ghostText,g.ghostText)&&m.inlineCompletion===g.inlineCompletion&&m.suggestItem===g.suggestItem},m=>{var g;let w=this.textModel,_=this.selectedSuggestItem.read(m);if(_){let E=_.toSingleTextEdit().removeCommonPrefix(w),A=this._computeAugmentedCompletion(E,m);if(!this._suggestPreviewEnabled.read(m)&&!A)return;let O=(g=A==null?void 0:A.edit)!==null&&g!==void 0?g:E,U=A?A.edit.text.length-E.text.length:0,Y=this._suggestPreviewMode.read(m),oe=this.cursorPosition.read(m),te=O.computeGhostText(w,Y,oe,U);return{ghostText:te!=null?te:new Td(O.range.endLineNumber,[]),inlineCompletion:A==null?void 0:A.completion,suggestItem:_}}else{if(!this._isActive.read(m))return;let E=this.selectedInlineCompletion.read(m);if(!E)return;let A=E.toSingleTextEdit(m),L=this._inlineSuggestMode.read(m),O=this.cursorPosition.read(m),U=A.computeGhostText(w,L,O);return U?{ghostText:U,inlineCompletion:E,suggestItem:void 0}:void 0}}),this.ghostText=yk({equalityComparer:DL},m=>{let g=this.state.read(m);if(g)return g.ghostText}),this._register(VF(this._fetchInlineCompletions,!0));let f;this._register(fn(m=>{var g,w;let _=this.state.read(m),E=_==null?void 0:_.inlineCompletion;if((E==null?void 0:E.semanticId)!==(f==null?void 0:f.semanticId)&&(f=E,E)){let A=E.inlineCompletion,L=A.source;(w=(g=L.provider).handleItemDidShow)===null||w===void 0||w.call(g,L.inlineCompletions,A.sourceInlineCompletion,A.insertText)}}))}trigger(e){return rc(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return rc(this,void 0,void 0,function*(){_k(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,ha.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){_k(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentedCompletion(e,t){let r=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),o=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(q9);return DP(o,a=>{let l=a.toSingleTextEdit(t);return l=l.removeCommonPrefix(r,B.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),l.augments(e)?{edit:l,completion:a}:void 0})}_deltaSelectedInlineCompletionIndex(e){return rc(this,void 0,void 0,function*(){yield this.triggerExplicitly();let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let r=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[r].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)})}next(){return rc(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return rc(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t;return rc(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new km;let r=this.state.get();if(!r||r.ghostText.isEmpty()||!r.inlineCompletion)return;let n=r.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),n.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[ti.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition()),(t=rr.get(e))===null||t===void 0||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[ti.replaceMove(n.range,n.insertText),...n.additionalTextEdits]),n.command&&n.source.addRef(),nn(o=>{this._source.clear(o),this._isActive.set(!1,o)}),n.command&&(yield this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,Yt),n.source.removeRef())})}acceptNextWord(e){return rc(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,r)=>{let n=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(n),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=r.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=r.length;let d=/\s+/g.exec(r);return d&&d.index!==void 0&&d.index+d[0].length<l&&(l=d.index+d[0].length),l})})}acceptNextLine(e){return rc(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,r)=>{let n=r.match(/\n/);return n&&n.index!==void 0?n.index+1:r.length})})}_acceptNext(e,t){return rc(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new km;let r=this.state.get();if(!r||r.ghostText.isEmpty()||!r.inlineCompletion)return;let n=r.ghostText,o=r.inlineCompletion.toInlineCompletion(void 0);if(o.snippetInfo||o.filterText!==o.insertText){yield this.accept(e);return}let s=n.parts[0],a=new Ie(n.lineNumber,s.column),l=s.lines.join(` -`),c=t(a,l);if(c===l.length&&n.parts.length===1){this.accept(e);return}let d=l.substring(0,c);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[ti.replace(B.fromPositions(a),d)]);let u=fb(d);e.setPosition(hb(a,u))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let u=B.fromPositions(o.range.getStartPosition(),hb(a,fb(d))),h=e.getModel().getValueInRange(u,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,h.length)}})}handleSuggestAccepted(e){var t,r;let n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),o=this._computeAugmentedCompletion(n,void 0);if(!o)return;let s=o.completion.inlineCompletion;(r=(t=s.source.provider).handlePartialAccept)===null||r===void 0||r.call(t,s.source.inlineCompletions,s.sourceInlineCompletion,n.text.length)}};V2=z0e([ZL(9,Ke),ZL(10,vi),ZL(11,Pt)],V2)});var B0e,z$,Tb,Ib,q2,JL,eA,Lb,Sp,tA=N(()=>{Ut();ke();lf();zre();hn();Cr();dl();Ht();_u();B0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},z$=function(i,e){return function(t,r){e(t,r,i)}},Ib=class{constructor(e){this.name=e}select(e,t,r){if(r.length===0)return 0;let n=r[0].score[0];for(let o=0;o<r.length;o++){let{score:s,completion:a}=r[o];if(s[0]!==n)break;if(a.preselect)return o}return 0}},q2=class extends Ib{constructor(){super("first")}memorize(e,t,r){}toJSON(){}fromJSON(){}},JL=class extends Ib{constructor(){super("recentlyUsed"),this._cache=new na(300,.66),this._seq=0}memorize(e,t,r){let n=`${e.getLanguageId()}/${r.textLabel}`;this._cache.set(n,{touch:this._seq++,type:r.completion.kind,insertText:r.completion.insertText})}select(e,t,r){if(r.length===0)return 0;let n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,r);let o=r[0].score[0],s=-1,a=-1,l=-1;for(let c=0;c<r.length&&r[c].score[0]===o;c++){let d=`${e.getLanguageId()}/${r[c].textLabel}`,u=this._cache.peek(d);if(u&&u.touch>l&&u.type===r[c].completion.kind&&u.insertText===r[c].completion.insertText&&(l=u.touch,a=c),r[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[r,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:$m.fromString(n.type),this._cache.set(r,n);this._seq=this._cache.size}},eA=class extends Ib{constructor(){super("recentlyUsedByPrefix"),this._trie=CF.forStrings(),this._seq=0}memorize(e,t,r){let{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:r.completion.kind,insertText:r.completion.insertText,touch:this._seq++})}select(e,t,r){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,r);let o=`${e.getLanguageId()}/${n}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;a<r.length;a++){let{kind:l,insertText:c}=r[a].completion;if(l===s.type&&c===s.insertText)return a}return super.select(e,t,r)}toJSON(){let e=[];return this._trie.forEach((t,r)=>e.push([r,t])),e.sort((t,r)=>-(t[1].touch-r[1].touch)).forEach((t,r)=>t[1].touch=r),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,r]of e)r.type=typeof r.type=="number"?r.type:$m.fromString(r.type),this._trie.set(t,r)}}},Lb=Tb=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new le,this._persistSoon=new di(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(r=>{r.reason===O_.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,r){this._withStrategy(e,t).memorize(e,t,r),this._persistSoon.schedule()}select(e,t,r){return this._withStrategy(e,t).select(e,t,r)}_withStrategy(e,t){var r;let n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((r=this._strategy)===null||r===void 0?void 0:r.name)!==n){this._saveState();let o=Tb._strategyCtors.get(n)||q2;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${Tb._storagePrefix}/${n}`,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,r=JSON.stringify(this._strategy);this._storageService.store(`${Tb._storagePrefix}/${this._strategy.name}`,r,t,1)}}};Lb._strategyCtors=new Map([["recentlyUsedByPrefix",eA],["recentlyUsed",JL],["first",q2]]);Lb._storagePrefix="suggest/memories";Lb=Tb=B0e([z$(0,Gn),z$(1,Dt)],Lb);Sp=Xr("ISuggestMemories");Jr(Sp,Lb,1)});var H0e,U0e,iA,kp,B$=N(()=>{wt();H0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},U0e=function(i,e){return function(t,r){e(t,r,i)}},kp=iA=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=iA.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(r=>r.hasChanged(121)&&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(121)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let r=this._editor.getModel(),n=this._editor.getSelection(),o=r.getWordAtPosition(n.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===n.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};kp.AtEnd=new ht("atEndOfWord",!1);kp=iA=H0e([U0e(1,it)],kp)});var j0e,W0e,Ab,Ld,H$=N(()=>{wt();j0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},W0e=function(i,e){return function(t,r){e(t,r,i)}},Ld=Ab=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=Ab.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},r){if(e.items.length===0){this.reset();return}if(Ab._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=r,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,r){let n=r;for(let o=t.items.length;o>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===r||!t.items[n].completion.additionalTextEdits));o--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=Ab._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Ld.OtherSuggestions=new ht("hasOtherSuggestions",!1);Ld=Ab=j0e([W0e(1,it)],Ld)});var K2,U$=N(()=>{pi();ke();V3();K2=class{constructor(e,t,r,n){this._disposables=new le,this._disposables.add(r.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(r.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()&&r.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&n(this._active.item)}}))}_onItem(e){if(!e||!qi(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new uu;for(let r of e.item.completion.commitCharacters)r.length>0&&t.add(r.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}});var V0e,Ad,rA=N(()=>{H9();ci();et();V0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Ad=class i{provideSelectionRanges(e,t){return V0e(this,void 0,void 0,function*(){let r=[];for(let n of t){let o=[];r.push(o);let s=new Map;yield new Promise(a=>i._bracketsRightYield(a,0,e,n,s)),yield new Promise(a=>i._bracketsLeftYield(a,0,e,n,s,o))}return r})}static _bracketsRightYield(e,t,r,n,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!n){e();break}let l=r.bracketPairs.findNextBracket(n);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,r,n,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 Pv,o.set(d,h)),h.push(l.range)}}n=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,r,n,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!n){e();break}let c=r.bracketPairs.findPrevBracket(n);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,r,n,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 f=o.get(u);if(f){let m=f.shift();f.size===0&&o.delete(u);let g=B.fromPositions(c.range.getEndPosition(),m.getStartPosition()),w=B.fromPositions(c.range.getStartPosition(),m.getEndPosition());s.push({range:g}),s.push({range:w}),i._addBracketLeading(r,w,s)}}}else{let u=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+1)}n=c.range.getStartPosition()}}static _addBracketLeading(e,t,r){if(t.startLineNumber===t.endLineNumber)return;let n=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(n);o!==0&&o!==t.startColumn&&(r.push({range:B.fromPositions(new Ie(n,o),t.getEndPosition())}),r.push({range:B.fromPositions(new Ie(n,1),t.getEndPosition())}));let s=n-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(r.push({range:B.fromPositions(new Ie(s,a),t.getEndPosition())}),r.push({range:B.fromPositions(new Ie(s,1),t.getEndPosition())}))}}};Ad._maxDuration=30;Ad._maxRounds=2});var q0e,Dd,nA=N(()=>{pi();et();rA();q0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Dd=class i{static create(e,t){return q0e(this,void 0,void 0,function*(){if(!t.getOption(116).localityBonus||!t.hasModel())return i.None;let r=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(r.uri))return i.None;let[o]=yield new Ad().provideSelectionRanges(r,[n]);if(o.length===0)return i.None;let s=yield e.computeWordRanges(r.uri,o[0].range);if(!s)return i.None;let a=r.getWordUntilPosition(n);return delete s[a.word],new class extends i{distance(l,c){if(!n.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(IP(u))return 2<<20;let h=hu(u,B.fromPositions(l),B.compareRangesUsingStarts),f=h>=0?u[h]:u[Math.max(0,~h-1)],m=o.length;for(let g of o){if(!B.containsRange(g.range,f))break;m-=1}return m}}})}};Dd.None=new class extends Dd{distance(){return 0}}});var Db,Ep,oA=N(()=>{pi();hl();Di();Db=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},Ep=class i{constructor(e,t,r,n,o,s,a=n_.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=r,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.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();let e=new Set;for(let[t,r]of this.getItemsByProvider())r.length>0&&r[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:r}=this._lineContext,n="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?o_:qP;for(let c=0;c<s.length;c++){let d=s[c];if(d.isInvalid)continue;let u=this._itemsByProvider.get(d.provider);u?u.push(d):this._itemsByProvider.set(d.provider,[d]);let h=d.position.column-d.editStart.column,f=h+r-(d.position.column-this._column);if(n.length!==f&&(n=f===0?"":t.slice(-f),o=n.toLowerCase()),d.word=n,f===0)d.score=ul.Default;else{let m=0;for(;m<h;){let g=n.charCodeAt(m);if(g===32||g===9)m+=1;else break}if(m>=f)d.score=ul.Default;else if(typeof d.completion.filterText=="string"){let g=l(n,o,m,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;fP(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=VP(n,o,m,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{let g=l(n,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?TP(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.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.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 G0e(i,e,t){if(!e.getContextKeyValue(vr.inlineSuggestionVisible.key))return!0;let r=e.getContextKeyValue(vr.suppressSuggestions.key);return r!==void 0?!r:!i.getOption(61).suppressSuggestions}function Y0e(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let r=e.getContextKeyValue(vr.suppressSuggestions.key);return r!==void 0?!r:!i.getOption(61).suppressSuggestions}var K0e,Md,$0e,sA,nc,$2,j$=N(()=>{Ut();Si();Vt();Jt();ke();Di();Ir();j_();nA();Ym();Cr();wt();Kv();Oc();oA();ch();Rt();hl();Fr();I2();Cp();Fre();K0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Md=function(i,e){return function(t,r){e(t,r,i)}},$0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},nc=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),r=e.getPosition();t.tokenization.tokenizeIfCheap(r.lineNumber);let n=t.getWordAtPosition(r);return!(!n||n.endColumn!==r.column&&n.startColumn+1!==r.column||!isNaN(Number(n.word)))}constructor(e,t,r){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=r}};$2=sA=class{constructor(e,t,r,n,o,s,a,l,c){this._editor=e,this._editorWorkerService=t,this._clipboardService=r,this._telemetryService=n,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._envService=c,this._toDispose=new le,this._triggerCharacterListener=new le,this._triggerQuickSuggest=new oa,this._triggerState=void 0,this._completionDisposables=new le,this._onDidCancel=new Je,this._onDidTrigger=new Je,this._onDidSuggest=new Je,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Qe(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 d=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{d=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{d=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(u=>{d||this._onCursorChange(u)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!d&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Ui(this._triggerCharacterListener),Ui([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(89)||!this._editor.hasModel()||!this._editor.getOption(119))return;let e=new Map;for(let r of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let n of r.triggerCharacters||[]){let o=e.get(n);o||(o=new Set,o.add(L$()),e.set(n,o)),o.add(r)}let t=r=>{var n;if(!Y0e(this._editor,this._contextKeyService,this._configurationService)||nc.shouldAutoTrigger(this._editor))return;if(!r){let a=this._editor.getPosition();r=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let o="";gP(r.charCodeAt(r.length-1))?mP(r.charCodeAt(r.length-2))&&(o=r.substr(r.length-2)):o=r.charAt(r.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:(n=this._completionModel)===null||n===void 0?void 0:n.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;Ka.isAllOff(this._editor.getOption(87))||this._editor.getOption(116).snippetsPreventQuickSuggestions&&(!((e=rr.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!nc.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let t=this._editor.getModel(),r=this._editor.getPosition(),n=this._editor.getOption(87);if(!Ka.isAllOff(n)){if(!Ka.isAllOn(n)){t.tokenization.tokenizeIfCheap(r.lineNumber);let o=t.tokenization.getLineTokens(r.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(r.column-1-1,0)));if(Ka.valueFor(n,s)!=="on")return}G0e(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(88)))}_refilterCompletionItems(){zt(this._editor.hasModel()),zt(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),r=new nc(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(r)}trigger(e){var t,r,n,o,s,a;if(!this._editor.hasModel())return;let l=this._editor.getModel(),c=new nc(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:(r=e.triggerKind)!==null&&r!==void 0?r:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Fi;let u=this._editor.getOption(110),h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}let{itemKind:f,showDeprecated:m}=sA._createSuggestFilter(this._editor),g=new tc(h,(o=(n=e.completionOptions)===null||n===void 0?void 0:n.kindFilter)!==null&&o!==void 0?o:f,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,m),w=Dd.create(this._editorWorkerService,this._editor),_=vb(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),g,d,this._requestToken.token);Promise.all([_,w]).then(([E,A])=>$0e(this,void 0,void 0,function*(){var L;if((L=this._requestToken)===null||L===void 0||L.dispose(),!this._editor.hasModel())return;let O=e==null?void 0:e.clipboardText;if(!O&&E.needsClipboard&&(O=yield this._clipboardService.readText()),this._triggerState===void 0)return;let U=this._editor.getModel(),Y=new nc(U,this._editor.getPosition(),e),oe=Object.assign(Object.assign({},n_.default),{firstMatchCanBeWeak:!this._editor.getOption(116).matchOnWordStartOnly});if(this._completionModel=new Ep(E.items,this._context.column,{leadingLineContent:Y.leadingLineContent,characterCountDelta:Y.column-this._context.column},A,this._editor.getOption(116),this._editor.getOption(110),oe,O),this._completionDisposables.add(E.disposable),this._onNewContext(Y),this._reportDurationsTelemetry(E.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(let te of E.items)te.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${te.provider._debugDisplayName}`,te.completion)})).catch(ft)}_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(110)==="none"&&t.add(27);let n=e.getOption(116);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Vi(e.leadingLineContent)!==Vi(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(nc.shouldAutoTrigger(this._editor)&&this._context){let r=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:r}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,r=new Set;for(let[n,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?r.add(n):t.set(n,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:r,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,r=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let n=nc.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(n&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=t,r=this._completionModel.items.length>0,r&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:r})}}}}};$2=sA=K0e([Md(1,Cl),Md(2,Ts),Md(3,Ln),Md(4,Fc),Md(5,it),Md(6,Dt),Md(7,Se),Md(8,xF)],$2)});var Mb,W$=N(()=>{ke();Mb=class i{constructor(e,t){this._disposables=new le,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let r=e.getSelections(),n=r.length,o=!1;for(let a=0;a<n;a++)if(!r[a].isEmpty()){o=!0;break}if(!o){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];let s=e.getModel();for(let a=0;a<n;a++){let l=r[a];if(s.getValueLengthInRange(l)>i._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(r=>{this._locked=!0})),this._disposables.add(t.onDidCancel(r=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}};Mb._maxSelectionLength=51200});var V$=N(()=>{});var q$=N(()=>{V$()});var X0e,oc,Uo,Tp=N(()=>{Z3();Tn();ez();Wi();wt();Ht();Ao();tn();$_();Br();Rt();X0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},oc=function(i,e){return function(t,r){e(t,r,i)}},Uo=class extends JF{constructor(e,t,r,n,o,s,a,l,c,d,u,h,f){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),r,o,s,a,l,c,d,u,h,f),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){uf(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Uo=X0e([oc(4,Ke),oc(5,si),oc(6,vi),oc(7,it),oc(8,gr),oc(9,Mi),oc(10,Cf),oc(11,Pt),oc(12,Se)],Uo)});var Q0e,aA,lA,G2,$$=N(()=>{Bt();tg();ke();He();X_();Zi();wt();Ht();Q0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},aA=function(i,e){return function(t,r){e(t,r,i)}},lA=class i extends Y_{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=b({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")}},G2=class{constructor(e,t,r,n,o){this._menuId=t,this._menuService=n,this._contextKeyService=o,this._menuDisposables=new le,this.element=Te(e,Le(".suggest-status-bar"));let s=a=>a instanceof ia?r.createInstance(lA,a,void 0):void 0;this._leftActions=new Is(this.element,{actionViewItemProvider:s}),this._rightActions=new Is(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 r=[],n=[];for(let[o,s]of e.getActions())o==="left"?r.push(...s):n.push(...s);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};G2=Q0e([aA(2,Ke),aA(3,xs),aA(4,it)],G2)});var Nd,Y2=N(()=>{Bt();mk();Jt();ke();Nd=class{constructor(){this._onDidWillResize=new Je,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Je,this.onDidResize=this._onDidResize.event,this._sashListener=new le,this._size=new Xt(0,0),this._minSize=new Xt(0,0),this._maxSize=new Xt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new wl(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new wl(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new wl(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:pk.North}),this._southSash=new wl(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:pk.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,r=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,r=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,r=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(r=n.currentX-n.startX,this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(r=-(n.currentX-n.startX),this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(li.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{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)(n=>{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,r,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=r?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){let{height:r,width:n}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(r,Math.min(o,e)),t=Math.max(n,Math.min(s,t));let a=new Xt(t,e);Xt.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}}});function Nb(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var Z0e,J0e,X2,Q2,cA=N(()=>{Bt();A_();Qr();In();Jt();Ss();ke();xd();Y2();He();Ht();Z0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},J0e=function(i,e){return function(t,r){e(t,r,i)}};X2=class{constructor(e,t){this._editor=e,this._onDidClose=new Je,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Je,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new le,this._renderDisposeable=new le,this._borderWidth=1,this._size=new Xt(330,0),this.domNode=Le(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(eo,{editor:e}),this._body=Le(".body"),this._scrollbar=new wf(this._body,{alwaysConsumeMouseWheel:!0}),Te(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Te(this._body,Le(".header")),this._close=Te(this._header,Le("span"+_t.asCSSSelector(pt.close))),this._close.title=b("details.close","Close"),this._type=Te(this._header,Le("p.type")),this._docs=Te(this._body,Le("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(49)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(49),r=t.getMassagedFontFamily(),n=e.get(117)||t.fontSize,o=e.get(118)||t.lineHeight,s=t.fontWeight,a=`${n}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/n}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=r,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(118)||this._editor.getOption(49).lineHeight,t=this._borderWidth,r=t*2;return{lineHeight:e,borderWidth:t,borderHeight:r,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=b("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 r,n;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 S0e(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function k0e(i,e){if((qa==null?void 0:qa.originalValue)===i&&(qa==null?void 0:qa.newValue)===e)return qa==null?void 0:qa.changes;{let t=E$(i,e,!0);if(t){let r=k$(t);if(r>0){let n=E$(i,e,!1);n&&k$(n)<r&&(t=n)}}return qa={originalValue:i,newValue:e,changes:t},t}}function k$(i){let e=0;for(let t of i)e+=t.originalLength;return e}function E$(i,e,t){if(i.length>5e3||e.length>5e3)return;function r(c){let d=0;for(let u=0,h=c.length;u<h;u++){let f=c.charCodeAt(u);f>d&&(d=f)}return d}let n=Math.max(r(i),r(e));function o(c){if(c<0)throw new Error("unexpected");return n+c+1}function s(c){let d=0,u=0,h=new Int32Array(c.length);for(let f=0,m=c.length;f<m;f++)if(t&&c[f]==="("){let g=u*100+d;h[f]=o(2*g),d++}else if(t&&c[f]===")"){d=Math.max(d-1,0);let g=u*100+d;h[f]=o(2*g+1),d===0&&u++}else h[f]=c.charCodeAt(f);return h}let a=s(i),l=s(e);return new XF({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}var lh,qa,VL=N(()=>{Yre();Di();et();A2();gp();lh=class i{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){let r=t?this.range.intersectRanges(t):this.range;if(!r)return this;let n=e.getValueInRange(r,1),o=Pc(n,this.text),s=hb(this.range.getStartPosition(),fb(n.substring(0,o))),a=this.text.substring(o),l=B.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&S0e(this.range,e.range)}computeGhostText(e,t,r,n=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=Vi(s).length;if(o.range.startColumn-1<=a){let m=Vi(o.text).length,g=s.substring(o.range.startColumn-1,a),[w,_]=[o.range.getStartPosition(),o.range.getEndPosition()],E=w.column+g.length<=_.column?w.delta(0,g.length):_,A=B.fromPositions(E,_),L=o.text.startsWith(g)?o.text.substring(g.length):o.text.substring(m);o=new i(A,L)}let c=e.getValueInRange(o.range),d=k0e(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 f=o.text.length-n;for(let m of d){let g=o.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&r&&r.lineNumber===o.range.startLineNumber&&g<r.column||m.originalLength>0)return;if(m.modifiedLength===0)continue;let w=m.modifiedStart+m.modifiedLength,_=Math.max(m.modifiedStart,Math.min(w,f)),E=o.text.substring(m.modifiedStart,_),A=o.text.substring(_,Math.max(m.modifiedStart,w));if(E.length>0){let L=du(E);h.push(new bp(g,L,!1))}if(A.length>0){let L=du(A);h.push(new bp(g,L,!0))}}return new Td(u,h)}}});function I0e(i,e){return new Promise(t=>{let r,n=setTimeout(()=>{r&&r.dispose(),t()},i);e&&(r=e.onCancellationRequested(()=>{clearTimeout(n),r&&r.dispose(),t()}))})}function L0e(i,e,t){return!i||!e?i===e:t(i,e)}function I$(i){return i.startLineNumber===i.endLineNumber?new Ie(1,1+i.endColumn-i.startColumn):new Ie(1+i.endLineNumber-i.startLineNumber,i.endColumn)}var E0e,T$,T0e,B2,qL,KL,$L,H2,L$=N(()=>{Si();hl();ke();_a();ci();hn();Br();Rt();S$();VL();E0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},T$=function(i,e){return function(t,r){e(t,r,i)}},T0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},B2=class extends ce{constructor(e,t,r,n,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=r,this.languageFeaturesService=n,this.languageConfigurationService=o,this._updateOperation=this._register(new ji),this.inlineCompletions=rg("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=rg("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,r){var n,o;let s=new qL(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((n=this._updateOperation.value)===null||n===void 0)&&n.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 Fi,d=(()=>T0e(this,void 0,void 0,function*(){if((l||t.triggerKind===ha.Automatic)&&(yield I0e(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let f=new Date,m=yield C$(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()-f.getTime());let w=new $L(m,s,this.textModel,this.versionId);if(r){let _=r.toInlineCompletion(void 0);r.canBeReused(this.textModel,e)&&!m.has(_)&&w.prepend(r.inlineCompletion,_.range,!0)}return this._updateOperation.clear(),nn(_=>{a.set(w,_)}),!0}))(),u=new KL(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()}};B2=E0e([T$(3,Se),T$(4,Pt)],B2);qL=class{constructor(e,t,r){this.position=e,this.context=t,this.versionId=r}satisfies(e){return this.position.equals(e.position)&&L0e(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,r)=>t.equals(r))&&(e.context.triggerKind===ha.Automatic||this.context.triggerKind===ha.Explicit)&&this.versionId===e.versionId}};KL=class{constructor(e,t,r){this.request=e,this.cancellationTokenSource=t,this.promise=r}dispose(){this.cancellationTokenSource.cancel()}},$L=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,r,n){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=r,this.versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=Do(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=r.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new H2(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,r){r&&e.source.addRef();let n=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new H2(e,n,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},H2=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,r,n){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=r,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=n!=null?n:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new lh(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,r){let n=this._toFilterTextReplacement(r).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(r).getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;let o=e.getValueInRange(n.range,1).toLowerCase(),s=n.text.toLowerCase(),a=Math.max(0,t.column-n.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),u=o.substring(a),h=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=h&&(d=d.trimStart(),d.length===0&&(u=u.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!WP(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 lh(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return I$(this._getUpdatedRange(e)).isBefore(I$(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 A$(){return yp}function vb(i,e,t,r=tc.default,n={triggerKind:0},o=st.None){return bb(this,void 0,void 0,function*(){let s=new pr;t=t.clone();let a=e.getWordAtPosition(t),l=a?new B(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):B.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],u=new le,h=[],f=!1,m=(w,_,E)=>{var A,L,O;let U=!1;if(!_)return U;for(let Y of _.suggestions)if(!r.kindFilter.has(Y.kind)){if(!r.showDeprecated&&(!((A=Y==null?void 0:Y.tags)===null||A===void 0)&&A.includes(1)))continue;Y.range||(Y.range=c),Y.sortText||(Y.sortText=typeof Y.label=="string"?Y.label:Y.label.label),!f&&Y.insertTextRules&&Y.insertTextRules&4&&(f=Ho.guessNeedsClipboard(Y.insertText)),d.push(new GL(t,Y,_,w)),U=!0}return Rv(_)&&u.add(_),h.push({providerName:(L=w._debugDisplayName)!==null&&L!==void 0?L:"unknown_provider",elapsedProvider:(O=_.duration)!==null&&O!==void 0?O:-1,elapsedOverall:E.elapsed()}),U},g=(()=>bb(this,void 0,void 0,function*(){if(!yp||r.kindFilter.has(27))return;let w=r.providerItemsToReuse.get(yp);if(w){w.forEach(A=>d.push(A));return}if(r.providerFilter.size>0&&!r.providerFilter.has(yp))return;let _=new pr,E=yield yp.provideCompletionItems(e,t,n,o);m(yp,E,_)}))();for(let w of i.orderedGroups(e)){let _=!1;if(yield Promise.all(w.map(E=>bb(this,void 0,void 0,function*(){if(r.providerItemsToReuse.has(E)){let A=r.providerItemsToReuse.get(E);A.forEach(L=>d.push(L)),_=_||A.length>0;return}if(!(r.providerFilter.size>0&&!r.providerFilter.has(E)))try{let A=new pr,L=yield E.provideCompletionItems(e,t,n,o);_=m(E,L,A)||_}catch(A){Yt(A)}}))),_||o.isCancellationRequested)break}return yield g,o.isCancellationRequested?(u.dispose(),Promise.reject(new Mv)):new YL(d.sort(M0e(r.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},u)})}function XL(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLow<e.sortTextLow)return-1;if(i.sortTextLow>e.sortTextLow)return 1}return i.textLabel<e.textLabel?-1:i.textLabel>e.textLabel?1:i.completion.kind-e.completion.kind}function A0e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return XL(i,e)}function D0e(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return XL(i,e)}function M0e(i){return U2.get(i)}function D$(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var bb,ct,$a,GL,tc,yp,YL,U2,Ka,ch=N(()=>{Si();Vt();hl();ke();ol();Fr();Tr();ci();et();ta();ah();He();Zi();Wi();wt();Rt();zI();bb=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},ct={Visible:p2,HasFocusedSuggestion:new ht("suggestWidgetHasFocusedSuggestion",!1,b("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new ht("suggestWidgetDetailsVisible",!1,b("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new ht("suggestWidgetMultipleSuggestions",!1,b("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new ht("suggestionMakesTextEdit",!0,b("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new ht("acceptSuggestionOnEnter",!0,b("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new ht("suggestionHasInsertAndReplaceRange",!1,b("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new ht("suggestionInsertMode",void 0,{type:"string",description:b("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new ht("suggestionCanResolve",!1,b("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},$a=new Me("suggestWidgetStatusBar"),GL=class{constructor(e,t,r,n){var o;this.position=e,this.completion=t,this.container=r,this.provider=n,this.isInvalid=!1,this.score=ul.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,B.isIRange(t.range)?(this.editStart=new Ie(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new Ie(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new Ie(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||B.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new Ie(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new Ie(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new Ie(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||B.spansMultipleLines(t.range.insert)||B.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 n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}resolve(e){return bb(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),r=new pr(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._resolveDuration=r.elapsed(),t.dispose()},n=>{$o(n)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})}return this._resolveCache})}},tc=class{constructor(e=2,t=new Set,r=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=r,this.providerItemsToReuse=n,this.showDeprecated=o}};tc.default=new tc;YL=class{constructor(e,t,r,n){this.items=e,this.needsClipboard=t,this.durations=r,this.disposable=n}};U2=new Map;U2.set(0,A0e);U2.set(2,D0e);U2.set(1,XL);At.registerCommand("_executeCompletionItemProvider",(i,...e)=>bb(void 0,void 0,void 0,function*(){let[t,r,n,o]=e;zt(yt.isUri(t)),zt(Ie.isIPosition(r)),zt(typeof n=="string"||!n),zt(typeof o=="number"||!o);let{completionProvider:s}=i.get(Se),a=yield i.get(xr).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(r),u=yield vb(s,a.object.textEditorModel,d,void 0,{triggerCharacter:n!=null?n:void 0,triggerKind:n?1:0});for(let h of u.items)c.length<(o!=null?o:0)&&c.push(h.resolve(st.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()}}));Ka=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 M$=N(()=>{});var N$=N(()=>{M$()});function QL(i,e=Dc){return GP(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var R$=N(()=>{bre();En()});var N0e,R0e,pYe,_b,yb,wb,xb,Cb,ic,Sb,kb,P$=N(()=>{R$();eP();Io();Di();F0();Br();ah();He();z_();N0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},R0e=function(i,e){return function(t,r){e(t,r,i)}},pYe=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}),_b=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let r=t.resolve(e);if(r!==void 0)return r}}},yb=class{constructor(e,t,r,n){this._model=e,this._selection=t,this._selectionIdx=r,this._overtypingCapturer=n}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let r=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!r&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(r=o.value,n=o.multiline)}if(r&&n&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=Vi(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof Nr&&(a=Vi(du(c.value).pop())),!0));let l=Pc(a,s);r=r.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}return r}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let r=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return r&&r.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)}}}},wb=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Zh(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let r=Zh(this._model.uri.fsPath),n=r.lastIndexOf(".");return n<=0?r:r.slice(0,n)}else{if(t==="TM_DIRECTORY")return J9(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(cf(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})}}},xb=class{constructor(e,t,r,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=r,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let r=t.split(/\r\n|\n|\r/).filter(n=>!uP(n));if(r.length===this._selectionCount)return r[this._selectionIdx]}return t}}},Cb=class{constructor(e,t,r){this._model=e,this._selection=t,this._languageConfigurationService=r}resolve(e){let{name:t}=e,r=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(r).comments;if(n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};Cb=N0e([R0e(2,Pt)],Cb);ic=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 r=this._date.getTimezoneOffset(),n=r>0?"-":"+",o=Math.trunc(Math.abs(r/60)),s=o<10?"0"+o:o,a=Math.abs(r)-o*60,l=a<10?"0"+a:a;return n+s+":"+l}}};ic.dayNames=[b("Sunday","Sunday"),b("Monday","Monday"),b("Tuesday","Tuesday"),b("Wednesday","Wednesday"),b("Thursday","Thursday"),b("Friday","Friday"),b("Saturday","Saturday")];ic.dayNamesShort=[b("SundayShort","Sun"),b("MondayShort","Mon"),b("TuesdayShort","Tue"),b("WednesdayShort","Wed"),b("ThursdayShort","Thu"),b("FridayShort","Fri"),b("SaturdayShort","Sat")];ic.monthNames=[b("January","January"),b("February","February"),b("March","March"),b("April","April"),b("May","May"),b("June","June"),b("July","July"),b("August","August"),b("September","September"),b("October","October"),b("November","November"),b("December","December")];ic.monthNamesShort=[b("JanuaryShort","Jan"),b("FebruaryShort","Feb"),b("MarchShort","Mar"),b("AprilShort","Apr"),b("MayShort","May"),b("JuneShort","Jun"),b("JulyShort","Jul"),b("AugustShort","Aug"),b("SeptemberShort","Sep"),b("OctoberShort","Oct"),b("NovemberShort","Nov"),b("DecemberShort","Dec")];Sb=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=EF(this._workspaceService.getWorkspace());if(!kF(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(fk(e))return Zh(e.uri.path);let t=Zh(e.configPath.path);return t.endsWith(pk)&&(t=t.substr(0,t.length-pk.length-1)),t}_resoveWorkspacePath(e){if(fk(e))return QL(e.uri.fsPath);let t=Zh(e.configPath.path),r=e.configPath.fsPath;return r.endsWith(t)&&(r=r.substr(0,r.length-t.length-1)),r?QL(r):"/"}},kb=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 P0e,O0e,qs,Eb,O$,wp,ZL=N(()=>{pi();ke();Di();N$();ba();et();Ir();Br();Hr();Q_();z_();ah();P$();P0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},O0e=function(i,e){return function(t,r){e(t,r,i)}},Eb=class i{constructor(e,t,r){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=r,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=K3(t.placeholders,go.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 r of this._snippet.placeholders){let n=this._snippet.offset(r),o=this._snippet.fullLen(r),s=B.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),a=r.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(r,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let n=[];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;d<c.length;d++)c[d]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+c[d]);n.push(ti.replace(a,c.join(this._editor.getModel().getEOL())))}n.length>0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let t=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);let r=this._editor.getModel().changeDecorations(n=>{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 Qe(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),n.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);n.changeDecorationOptions(u,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||n.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):r!=null?r:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof go){let r=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(r).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 r;for(let n of t){if(n.isFinalTabstop)break;r||(r=[],e.set(n.index,r));let o=this._placeholderDecorations.get(n),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(n.index);break}r.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 r=this._editor.getModel().getDecorationRange(t);if(r)return{range:r,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof sh,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(r=>{for(let n 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=n.index+(s+1)/this._nestingLevel:l.index=n.index+l.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);let a=this._placeholderDecorations.get(n);r.removeDecoration(a),this._placeholderDecorations.delete(n);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),u=B.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),h=r.addDecoration(u,i._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=K3(this._snippet.placeholders,go.compareByIndex)})}};Eb._decor={active:mt.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:mt.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:mt.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:mt.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};O$={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},wp=qs=class{static adjustWhitespace(e,t,r,n,o){let s=e.getLineContent(t.lineNumber),a=Vi(s,0,t.column-1),l;return n.walk(c=>{if(!(c instanceof Nr)||c.parent instanceof sh||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(r){let h=n.offset(c);if(h===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:n.toString();let f=l.charCodeAt(h-1);(f===10||f===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let f=1;f<d.length;f++)d[f]=e.normalizeIndentation(a+d[f])}let u=d.join(e.getEOL());return u!==c.value&&(c.parent.replace(c,[new Nr(u)]),l=void 0),!0}),a}static adjustSelection(e,t,r,n){if(r!==0||n!==0){let{positionLineNumber:o,positionColumn:s}=t,a=s-r,l=s+n,c=e.validateRange({startLineNumber:o,startColumn:a,endLineNumber:o,endColumn:l});t=Qe.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,t.getDirection())}return t}static createEditsAndSnippetsFromSelections(e,t,r,n,o,s,a,l,c){let d=[],u=[];if(!e.hasModel())return{edits:d,snippets:u};let h=e.getModel(),f=e.invokeWithinContext(L=>L.get(yl)),m=e.invokeWithinContext(L=>new wb(L.get(kl),h)),g=()=>a,w=h.getValueInRange(qs.adjustSelection(h,e.getSelection(),r,0)),_=h.getValueInRange(qs.adjustSelection(h,e.getSelection(),0,n)),E=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),A=e.getSelections().map((L,O)=>({selection:L,idx:O})).sort((L,O)=>B.compareRangesUsingStarts(L.selection,O.selection));for(let{selection:L,idx:O}of A){let U=qs.adjustSelection(h,L,r,0),Y=qs.adjustSelection(h,L,0,n);w!==h.getValueInRange(U)&&(U=L),_!==h.getValueInRange(Y)&&(Y=L);let oe=L.setStartPosition(U.startLineNumber,U.startColumn).setEndPosition(Y.endLineNumber,Y.endColumn),te=new Ho().parse(t,!0,o),Z=oe.getStartPosition(),ve=qs.adjustWhitespace(h,Z,s||O>0&&E!==h.getLineFirstNonWhitespaceColumn(L.positionLineNumber),te);te.resolveVariables(new _b([m,new xb(g,O,A.length,e.getOption(77)==="spread"),new yb(h,L,O,l),new Cb(h,L,c),new ic,new Sb(f),new kb])),d[O]=ti.replace(oe,te.toString()),d[O].identifier={major:O,minor:0},d[O]._isTracked=!0,u[O]=new Eb(e,te,ve)}return{edits:d,snippets:u}}static createEditsAndSnippetsFromEdits(e,t,r,n,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new Ho,u=new _p,h=new _b([e.invokeWithinContext(m=>new wb(m.get(kl),c)),new xb(()=>o,0,e.getSelections().length,e.getOption(77)==="spread"),new yb(c,e.getSelection(),0,s),new Cb(c,e.getSelection(),a),new ic,new Sb(e.invokeWithinContext(m=>m.get(yl))),new kb]);t=t.sort((m,g)=>B.compareRangesUsingStarts(m.range,g.range));let f=0;for(let m=0;m<t.length;m++){let{range:g,template:w}=t[m];if(m>0){let O=t[m-1].range,U=B.fromPositions(O.getEndPosition(),g.getStartPosition()),Y=new Nr(c.getValueInRange(U));u.appendChild(Y),f+=Y.value.length}let _=d.parseFragment(w,u);qs.adjustWhitespace(c,g.getStartPosition(),!0,u,new Set(_)),u.resolveVariables(h);let E=u.toString(),A=E.slice(f);f=E.length;let L=ti.replace(g,A);L.identifier={major:m,minor:0},L._isTracked=!0,l.push(L)}return d.ensureFinalTabstop(u,r,!0),{edits:l,snippets:[new Eb(e,u,"")]}}constructor(e,t,r=O$,n){this._editor=e,this._template=t,this._options=r,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){Ui(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"?qs.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):qs.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,r=>{let n=r.filter(o=>!!o.identifier);for(let o=0;o<t.length;o++)t[o].initialize(n[o].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):n.map(o=>Qe.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=O$){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:r,snippets:n}=qs.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",r,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;l<n.length;l++)n[l].initialize(s[l].textChange);let a=n[0].isTrivialSnippet;if(!a){for(let l of this._snippets)l.merge(n);console.assert(n.length===0)}return this._snippets[0].hasPlaceholder&&!a?this._move(void 0):s.map(l=>Qe.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 r of this._snippets){let n=r.move(e);t.push(...n)}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<this._snippets.length)return!1;let t=new Map;for(let r of this._snippets){let n=r.computePossibleSelections();if(t.size===0)for(let[o,s]of n){s.sort(B.compareRangesUsingStarts);for(let a of e)if(s[0].containsRange(a)){t.set(o,[]);break}}if(t.size===0)return!1;t.forEach((o,s)=>{o.push(...n.get(s))})}e.sort(B.compareRangesUsingStarts);for(let[r,n]of t){if(n.length!==e.length){t.delete(r);continue}n.sort(B.compareRangesUsingStarts);for(let o=0;o<n.length;o++)if(!n[o].containsRange(e[o])){t.delete(r);continue}}return t.size>0}};wp=qs=P0e([O0e(3,Pt)],wp)});var F0e,j2,xp,F$,rr,W2,Cp=N(()=>{ke();Fr();lt();ci();ei();Br();Rt();ch();He();wt();Kv();ZL();F0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},j2=function(i,e){return function(t,r){e(t,r,i)}},F$={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},rr=xp=class{static get(e){return e.getContribution(xp.ID)}constructor(e,t,r,n,o){this._editor=e,this._logService=t,this._languageFeaturesService=r,this._languageConfigurationService=o,this._snippetListener=new le,this._modelVersionId=-1,this._inSnippet=xp.InSnippetMode.bindTo(n),this._hasNextTabstop=xp.HasNextTabstop.bindTo(n),this._hasPrevTabstop=xp.HasPrevTabstop.bindTo(n)}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"?F$:Object.assign(Object.assign({},F$),t))}catch(r){this.cancel(),this._logService.error(r),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){var r;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(zt(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new wp(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((r=this._session)===null||r===void 0)&&r.hasChoice){let n={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(d,u)=>{if(!this._session||d!==this._editor.getModel()||!Ie.equals(this._editor.getPosition(),u))return;let{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;let f=d.getValueInRange(h.range),m=!!h.choice.options.find(w=>w.value===f),g=[];for(let w=0;w<h.choice.options.length;w++){let _=h.choice.options[w];g.push({kind:13,label:_.value,insertText:_.value,sortText:"a".repeat(w+1),range:h.range,filterText:m?`${f}_${_.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:b("next","Go to next placeholder...")}})}return{suggestions:g}}},o=this._editor.getModel(),s,a=!1,l=()=>{s==null||s.dispose(),a=!1},c=()=>{a||(s=this._languageFeaturesService.completionProvider.register({language:o.getLanguageId(),pattern:o.uri.fsPath,scheme:o.uri.scheme,exclusive:!0},n),this._snippetListener.add(s),a=!0)};this._choiceCompletions={provider:n,enable:c,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(n=>n.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(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:t}=this._session;if(!t||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{D$(this._editor,this._choiceCompletions.provider)}))}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()}};rr.ID="snippetController2";rr.InSnippetMode=new ht("inSnippetMode",!1,b("inSnippetMode","Whether the editor in current in snippet mode"));rr.HasNextTabstop=new ht("hasNextTabstop",!1,b("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));rr.HasPrevTabstop=new ht("hasPrevTabstop",!1,b("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));rr=xp=F0e([j2(1,Fc),j2(2,Se),j2(3,it),j2(4,Pt)],rr);Ue(rr.ID,rr,4);W2=Oi.bindToContribution(rr.get);We(new W2({id:"jumpToNextSnippetPlaceholder",precondition:fe.and(rr.InSnippetMode,rr.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:2}}));We(new W2({id:"jumpToPrevSnippetPlaceholder",precondition:fe.and(rr.InSnippetMode,rr.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:1026}}));We(new W2({id:"leaveSnippet",precondition:rr.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:F.editorTextFocus,primary:9,secondary:[1033]}}));We(new W2({id:"acceptSnippet",precondition:rr.InSnippetMode,handler:i=>i.finish()}))});var z0e,JL,rc,to,V2,z$=N(()=>{pi();Vt();ke();_a();Fr();ba();ci();et();hn();Br();A2();L$();gp();Cp();Wi();Ht();z0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},JL=function(i,e){return function(t,r){e(t,r,i)}},rc=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.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"})(to||(to={}));V2=class extends ce{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,r,n,o,s,a,l,c,d,u,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=r,this.textModelVersionId=n,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(B2,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=va("isActive",!1),this._forceUpdate=VF("forceUpdate"),this._selectedInlineCompletionId=va("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([to.Redo,to.Undo,to.AcceptWord]),this._fetchInlineCompletions=HF("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:ha.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 _=this.selectedInlineCompletion.get(),E=g.preserveCurrentCompletion||_!=null&&_.forwardStable?_:void 0,A=this._source.suggestWidgetInlineCompletions.get(),L=this.selectedSuggestItem.read(m);if(A&&!L){let Y=this._source.inlineCompletions.get();nn(oe=>{Y&&A.request.versionId>Y.request.versionId&&this._source.inlineCompletions.set(A.clone(),oe),this._source.clearSuggestWidgetInlineCompletions(oe)})}let O=this.cursorPosition.read(m),U={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:L==null?void 0:L.toSelectedSuggestionInfo()};return this._source.fetch(O,U,E)}),this._filteredInlineCompletionItems=Do(m=>{let g=this._source.inlineCompletions.read(m);if(!g)return[];let w=this.cursorPosition.read(m);return g.inlineCompletions.filter(E=>E.isVisible(this.textModel,w,m))}),this.selectedInlineCompletionIndex=Do(m=>{let g=this._selectedInlineCompletionId.read(m),w=this._filteredInlineCompletionItems.read(m),_=this._selectedInlineCompletionId===void 0?-1:w.findIndex(E=>E.semanticId===g);return _===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):_}),this.selectedInlineCompletion=Do(m=>{let g=this._filteredInlineCompletionItems.read(m),w=this.selectedInlineCompletionIndex.read(m);return g[w]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=Do(m=>{if(this.lastTriggerKind.read(m)===ha.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=wk({equalityComparer:(m,g)=>!m||!g?m===g:ML(m.ghostText,g.ghostText)&&m.inlineCompletion===g.inlineCompletion&&m.suggestItem===g.suggestItem},m=>{var g;let w=this.textModel,_=this.selectedSuggestItem.read(m);if(_){let E=_.toSingleTextEdit().removeCommonPrefix(w),A=this._computeAugmentedCompletion(E,m);if(!this._suggestPreviewEnabled.read(m)&&!A)return;let O=(g=A==null?void 0:A.edit)!==null&&g!==void 0?g:E,U=A?A.edit.text.length-E.text.length:0,Y=this._suggestPreviewMode.read(m),oe=this.cursorPosition.read(m),te=O.computeGhostText(w,Y,oe,U);return{ghostText:te!=null?te:new Td(O.range.endLineNumber,[]),inlineCompletion:A==null?void 0:A.completion,suggestItem:_}}else{if(!this._isActive.read(m))return;let E=this.selectedInlineCompletion.read(m);if(!E)return;let A=E.toSingleTextEdit(m),L=this._inlineSuggestMode.read(m),O=this.cursorPosition.read(m),U=A.computeGhostText(w,L,O);return U?{ghostText:U,inlineCompletion:E,suggestItem:void 0}:void 0}}),this.ghostText=wk({equalityComparer:ML},m=>{let g=this.state.read(m);if(g)return g.ghostText}),this._register(qF(this._fetchInlineCompletions,!0));let f;this._register(fn(m=>{var g,w;let _=this.state.read(m),E=_==null?void 0:_.inlineCompletion;if((E==null?void 0:E.semanticId)!==(f==null?void 0:f.semanticId)&&(f=E,E)){let A=E.inlineCompletion,L=A.source;(w=(g=L.provider).handleItemDidShow)===null||w===void 0||w.call(g,L.inlineCompletions,A.sourceInlineCompletion,A.insertText)}}))}trigger(e){return rc(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return rc(this,void 0,void 0,function*(){yk(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,ha.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){yk(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentedCompletion(e,t){let r=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),o=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(K9);return MP(o,a=>{let l=a.toSingleTextEdit(t);return l=l.removeCommonPrefix(r,B.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),l.augments(e)?{edit:l,completion:a}:void 0})}_deltaSelectedInlineCompletionIndex(e){return rc(this,void 0,void 0,function*(){yield this.triggerExplicitly();let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let r=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[r].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)})}next(){return rc(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return rc(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t;return rc(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new km;let r=this.state.get();if(!r||r.ghostText.isEmpty()||!r.inlineCompletion)return;let n=r.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),n.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[ti.replaceMove(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition()),(t=rr.get(e))===null||t===void 0||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[ti.replaceMove(n.range,n.insertText),...n.additionalTextEdits]),n.command&&n.source.addRef(),nn(o=>{this._source.clear(o),this._isActive.set(!1,o)}),n.command&&(yield this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,Yt),n.source.removeRef())})}acceptNextWord(e){return rc(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,r)=>{let n=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(n),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=r.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=r.length;let d=/\s+/g.exec(r);return d&&d.index!==void 0&&d.index+d[0].length<l&&(l=d.index+d[0].length),l})})}acceptNextLine(e){return rc(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,r)=>{let n=r.match(/\n/);return n&&n.index!==void 0?n.index+1:r.length})})}_acceptNext(e,t){return rc(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new km;let r=this.state.get();if(!r||r.ghostText.isEmpty()||!r.inlineCompletion)return;let n=r.ghostText,o=r.inlineCompletion.toInlineCompletion(void 0);if(o.snippetInfo||o.filterText!==o.insertText){yield this.accept(e);return}let s=n.parts[0],a=new Ie(n.lineNumber,s.column),l=s.lines.join(` +`),c=t(a,l);if(c===l.length&&n.parts.length===1){this.accept(e);return}let d=l.substring(0,c);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[ti.replace(B.fromPositions(a),d)]);let u=fb(d);e.setPosition(hb(a,u))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let u=B.fromPositions(o.range.getStartPosition(),hb(a,fb(d))),h=e.getModel().getValueInRange(u,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,h.length)}})}handleSuggestAccepted(e){var t,r;let n=e.toSingleTextEdit().removeCommonPrefix(this.textModel),o=this._computeAugmentedCompletion(n,void 0);if(!o)return;let s=o.completion.inlineCompletion;(r=(t=s.source.provider).handlePartialAccept)===null||r===void 0||r.call(t,s.source.inlineCompletions,s.sourceInlineCompletion,n.text.length)}};V2=z0e([JL(9,Ke),JL(10,vi),JL(11,Pt)],V2)});var B0e,B$,Tb,Ib,q2,eA,tA,Lb,Sp,iA=N(()=>{Ut();ke();lf();zre();hn();Cr();dl();Ht();_u();B0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},B$=function(i,e){return function(t,r){e(t,r,i)}},Ib=class{constructor(e){this.name=e}select(e,t,r){if(r.length===0)return 0;let n=r[0].score[0];for(let o=0;o<r.length;o++){let{score:s,completion:a}=r[o];if(s[0]!==n)break;if(a.preselect)return o}return 0}},q2=class extends Ib{constructor(){super("first")}memorize(e,t,r){}toJSON(){}fromJSON(){}},eA=class extends Ib{constructor(){super("recentlyUsed"),this._cache=new na(300,.66),this._seq=0}memorize(e,t,r){let n=`${e.getLanguageId()}/${r.textLabel}`;this._cache.set(n,{touch:this._seq++,type:r.completion.kind,insertText:r.completion.insertText})}select(e,t,r){if(r.length===0)return 0;let n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,r);let o=r[0].score[0],s=-1,a=-1,l=-1;for(let c=0;c<r.length&&r[c].score[0]===o;c++){let d=`${e.getLanguageId()}/${r[c].textLabel}`,u=this._cache.peek(d);if(u&&u.touch>l&&u.type===r[c].completion.kind&&u.insertText===r[c].completion.insertText&&(l=u.touch,a=c),r[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[r,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:$m.fromString(n.type),this._cache.set(r,n);this._seq=this._cache.size}},tA=class extends Ib{constructor(){super("recentlyUsedByPrefix"),this._trie=SF.forStrings(),this._seq=0}memorize(e,t,r){let{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:r.completion.kind,insertText:r.completion.insertText,touch:this._seq++})}select(e,t,r){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,r);let o=`${e.getLanguageId()}/${n}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;a<r.length;a++){let{kind:l,insertText:c}=r[a].completion;if(l===s.type&&c===s.insertText)return a}return super.select(e,t,r)}toJSON(){let e=[];return this._trie.forEach((t,r)=>e.push([r,t])),e.sort((t,r)=>-(t[1].touch-r[1].touch)).forEach((t,r)=>t[1].touch=r),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,r]of e)r.type=typeof r.type=="number"?r.type:$m.fromString(r.type),this._trie.set(t,r)}}},Lb=Tb=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new le,this._persistSoon=new di(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(r=>{r.reason===O_.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,r){this._withStrategy(e,t).memorize(e,t,r),this._persistSoon.schedule()}select(e,t,r){return this._withStrategy(e,t).select(e,t,r)}_withStrategy(e,t){var r;let n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((r=this._strategy)===null||r===void 0?void 0:r.name)!==n){this._saveState();let o=Tb._strategyCtors.get(n)||q2;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${Tb._storagePrefix}/${n}`,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,r=JSON.stringify(this._strategy);this._storageService.store(`${Tb._storagePrefix}/${this._strategy.name}`,r,t,1)}}};Lb._strategyCtors=new Map([["recentlyUsedByPrefix",tA],["recentlyUsed",eA],["first",q2]]);Lb._storagePrefix="suggest/memories";Lb=Tb=B0e([B$(0,Gn),B$(1,Dt)],Lb);Sp=Xr("ISuggestMemories");Jr(Sp,Lb,1)});var H0e,U0e,rA,kp,H$=N(()=>{wt();H0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},U0e=function(i,e){return function(t,r){e(t,r,i)}},kp=rA=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=rA.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(r=>r.hasChanged(121)&&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(121)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let r=this._editor.getModel(),n=this._editor.getSelection(),o=r.getWordAtPosition(n.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===n.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};kp.AtEnd=new ht("atEndOfWord",!1);kp=rA=H0e([U0e(1,it)],kp)});var j0e,W0e,Ab,Ld,U$=N(()=>{wt();j0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},W0e=function(i,e){return function(t,r){e(t,r,i)}},Ld=Ab=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=Ab.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},r){if(e.items.length===0){this.reset();return}if(Ab._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=r,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,r){let n=r;for(let o=t.items.length;o>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===r||!t.items[n].completion.additionalTextEdits));o--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=Ab._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Ld.OtherSuggestions=new ht("hasOtherSuggestions",!1);Ld=Ab=j0e([W0e(1,it)],Ld)});var K2,j$=N(()=>{pi();ke();q3();K2=class{constructor(e,t,r,n){this._disposables=new le,this._disposables.add(r.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(r.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()&&r.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&n(this._active.item)}}))}_onItem(e){if(!e||!qi(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new uu;for(let r of e.item.completion.commitCharacters)r.length>0&&t.add(r.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}});var V0e,Ad,nA=N(()=>{U9();ci();et();V0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Ad=class i{provideSelectionRanges(e,t){return V0e(this,void 0,void 0,function*(){let r=[];for(let n of t){let o=[];r.push(o);let s=new Map;yield new Promise(a=>i._bracketsRightYield(a,0,e,n,s)),yield new Promise(a=>i._bracketsLeftYield(a,0,e,n,s,o))}return r})}static _bracketsRightYield(e,t,r,n,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!n){e();break}let l=r.bracketPairs.findNextBracket(n);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,r,n,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 Pv,o.set(d,h)),h.push(l.range)}}n=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,r,n,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!n){e();break}let c=r.bracketPairs.findPrevBracket(n);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,r,n,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 f=o.get(u);if(f){let m=f.shift();f.size===0&&o.delete(u);let g=B.fromPositions(c.range.getEndPosition(),m.getStartPosition()),w=B.fromPositions(c.range.getStartPosition(),m.getEndPosition());s.push({range:g}),s.push({range:w}),i._addBracketLeading(r,w,s)}}}else{let u=c.bracketInfo.getOpeningBrackets()[0].bracketText,h=a.has(u)?a.get(u):0;a.set(u,h+1)}n=c.range.getStartPosition()}}static _addBracketLeading(e,t,r){if(t.startLineNumber===t.endLineNumber)return;let n=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(n);o!==0&&o!==t.startColumn&&(r.push({range:B.fromPositions(new Ie(n,o),t.getEndPosition())}),r.push({range:B.fromPositions(new Ie(n,1),t.getEndPosition())}));let s=n-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(r.push({range:B.fromPositions(new Ie(s,a),t.getEndPosition())}),r.push({range:B.fromPositions(new Ie(s,1),t.getEndPosition())}))}}};Ad._maxDuration=30;Ad._maxRounds=2});var q0e,Dd,oA=N(()=>{pi();et();nA();q0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Dd=class i{static create(e,t){return q0e(this,void 0,void 0,function*(){if(!t.getOption(116).localityBonus||!t.hasModel())return i.None;let r=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(r.uri))return i.None;let[o]=yield new Ad().provideSelectionRanges(r,[n]);if(o.length===0)return i.None;let s=yield e.computeWordRanges(r.uri,o[0].range);if(!s)return i.None;let a=r.getWordUntilPosition(n);return delete s[a.word],new class extends i{distance(l,c){if(!n.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(LP(u))return 2<<20;let h=hu(u,B.fromPositions(l),B.compareRangesUsingStarts),f=h>=0?u[h]:u[Math.max(0,~h-1)],m=o.length;for(let g of o){if(!B.containsRange(g.range,f))break;m-=1}return m}}})}};Dd.None=new class extends Dd{distance(){return 0}}});var Db,Ep,sA=N(()=>{pi();hl();Di();Db=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},Ep=class i{constructor(e,t,r,n,o,s,a=n_.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=r,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.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();let e=new Set;for(let[t,r]of this.getItemsByProvider())r.length>0&&r[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:r}=this._lineContext,n="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?o_:KP;for(let c=0;c<s.length;c++){let d=s[c];if(d.isInvalid)continue;let u=this._itemsByProvider.get(d.provider);u?u.push(d):this._itemsByProvider.set(d.provider,[d]);let h=d.position.column-d.editStart.column,f=h+r-(d.position.column-this._column);if(n.length!==f&&(n=f===0?"":t.slice(-f),o=n.toLowerCase()),d.word=n,f===0)d.score=ul.Default;else{let m=0;for(;m<h;){let g=n.charCodeAt(m);if(g===32||g===9)m+=1;else break}if(m>=f)d.score=ul.Default;else if(typeof d.completion.filterText=="string"){let g=l(n,o,m,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;pP(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=qP(n,o,m,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{let g=l(n,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?IP(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.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.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 G0e(i,e,t){if(!e.getContextKeyValue(vr.inlineSuggestionVisible.key))return!0;let r=e.getContextKeyValue(vr.suppressSuggestions.key);return r!==void 0?!r:!i.getOption(61).suppressSuggestions}function Y0e(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let r=e.getContextKeyValue(vr.suppressSuggestions.key);return r!==void 0?!r:!i.getOption(61).suppressSuggestions}var K0e,Md,$0e,aA,nc,$2,W$=N(()=>{Ut();Si();Vt();Jt();ke();Di();Ir();j_();oA();Ym();Cr();wt();Kv();Oc();sA();ch();Rt();hl();Fr();I2();Cp();Fre();K0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Md=function(i,e){return function(t,r){e(t,r,i)}},$0e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},nc=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),r=e.getPosition();t.tokenization.tokenizeIfCheap(r.lineNumber);let n=t.getWordAtPosition(r);return!(!n||n.endColumn!==r.column&&n.startColumn+1!==r.column||!isNaN(Number(n.word)))}constructor(e,t,r){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=r}};$2=aA=class{constructor(e,t,r,n,o,s,a,l,c){this._editor=e,this._editorWorkerService=t,this._clipboardService=r,this._telemetryService=n,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._envService=c,this._toDispose=new le,this._triggerCharacterListener=new le,this._triggerQuickSuggest=new oa,this._triggerState=void 0,this._completionDisposables=new le,this._onDidCancel=new Je,this._onDidTrigger=new Je,this._onDidSuggest=new Je,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Qe(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 d=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{d=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{d=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(u=>{d||this._onCursorChange(u)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!d&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Ui(this._triggerCharacterListener),Ui([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(89)||!this._editor.hasModel()||!this._editor.getOption(119))return;let e=new Map;for(let r of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let n of r.triggerCharacters||[]){let o=e.get(n);o||(o=new Set,o.add(A$()),e.set(n,o)),o.add(r)}let t=r=>{var n;if(!Y0e(this._editor,this._contextKeyService,this._configurationService)||nc.shouldAutoTrigger(this._editor))return;if(!r){let a=this._editor.getPosition();r=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let o="";bP(r.charCodeAt(r.length-1))?gP(r.charCodeAt(r.length-2))&&(o=r.substr(r.length-2)):o=r.charAt(r.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:(n=this._completionModel)===null||n===void 0?void 0:n.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;Ka.isAllOff(this._editor.getOption(87))||this._editor.getOption(116).snippetsPreventQuickSuggestions&&(!((e=rr.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!nc.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let t=this._editor.getModel(),r=this._editor.getPosition(),n=this._editor.getOption(87);if(!Ka.isAllOff(n)){if(!Ka.isAllOn(n)){t.tokenization.tokenizeIfCheap(r.lineNumber);let o=t.tokenization.getLineTokens(r.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(r.column-1-1,0)));if(Ka.valueFor(n,s)!=="on")return}G0e(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(88)))}_refilterCompletionItems(){zt(this._editor.hasModel()),zt(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),r=new nc(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(r)}trigger(e){var t,r,n,o,s,a;if(!this._editor.hasModel())return;let l=this._editor.getModel(),c=new nc(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:(r=e.triggerKind)!==null&&r!==void 0?r:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Fi;let u=this._editor.getOption(110),h=1;switch(u){case"top":h=0;break;case"bottom":h=2;break}let{itemKind:f,showDeprecated:m}=aA._createSuggestFilter(this._editor),g=new tc(h,(o=(n=e.completionOptions)===null||n===void 0?void 0:n.kindFilter)!==null&&o!==void 0?o:f,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,m),w=Dd.create(this._editorWorkerService,this._editor),_=vb(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),g,d,this._requestToken.token);Promise.all([_,w]).then(([E,A])=>$0e(this,void 0,void 0,function*(){var L;if((L=this._requestToken)===null||L===void 0||L.dispose(),!this._editor.hasModel())return;let O=e==null?void 0:e.clipboardText;if(!O&&E.needsClipboard&&(O=yield this._clipboardService.readText()),this._triggerState===void 0)return;let U=this._editor.getModel(),Y=new nc(U,this._editor.getPosition(),e),oe=Object.assign(Object.assign({},n_.default),{firstMatchCanBeWeak:!this._editor.getOption(116).matchOnWordStartOnly});if(this._completionModel=new Ep(E.items,this._context.column,{leadingLineContent:Y.leadingLineContent,characterCountDelta:Y.column-this._context.column},A,this._editor.getOption(116),this._editor.getOption(110),oe,O),this._completionDisposables.add(E.disposable),this._onNewContext(Y),this._reportDurationsTelemetry(E.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(let te of E.items)te.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${te.provider._debugDisplayName}`,te.completion)})).catch(ft)}_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(110)==="none"&&t.add(27);let n=e.getOption(116);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Vi(e.leadingLineContent)!==Vi(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){if(nc.shouldAutoTrigger(this._editor)&&this._context){let r=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:r}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){let t=new Map,r=new Set;for(let[n,o]of this._completionModel.getItemsByProvider())o.length>0&&o[0].container.incomplete?r.add(n):t.set(n,o);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:r,providerItemsToReuse:t}})}else{let t=this._completionModel.lineContext,r=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){let n=nc.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(n&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=t,r=this._completionModel.items.length>0,r&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:r})}}}}};$2=aA=K0e([Md(1,Cl),Md(2,Ts),Md(3,Ln),Md(4,Fc),Md(5,it),Md(6,Dt),Md(7,Se),Md(8,CF)],$2)});var Mb,V$=N(()=>{ke();Mb=class i{constructor(e,t){this._disposables=new le,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;let r=e.getSelections(),n=r.length,o=!1;for(let a=0;a<n;a++)if(!r[a].isEmpty()){o=!0;break}if(!o){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];let s=e.getModel();for(let a=0;a<n;a++){let l=r[a];if(s.getValueLengthInRange(l)>i._maxSelectionLength)return;this._lastOvertyped[a]={value:s.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(r=>{this._locked=!0})),this._disposables.add(t.onDidCancel(r=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}};Mb._maxSelectionLength=51200});var q$=N(()=>{});var K$=N(()=>{q$()});var X0e,oc,Uo,Tp=N(()=>{J3();Tn();tz();Wi();wt();Ht();Ao();tn();$_();Br();Rt();X0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},oc=function(i,e){return function(t,r){e(t,r,i)}},Uo=class extends ez{constructor(e,t,r,n,o,s,a,l,c,d,u,h,f){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),r,o,s,a,l,c,d,u,h,f),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){uf(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Uo=X0e([oc(4,Ke),oc(5,si),oc(6,vi),oc(7,it),oc(8,gr),oc(9,Mi),oc(10,Cf),oc(11,Pt),oc(12,Se)],Uo)});var Q0e,lA,cA,G2,G$=N(()=>{Bt();tg();ke();He();X_();Zi();wt();Ht();Q0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},lA=function(i,e){return function(t,r){e(t,r,i)}},cA=class i extends Y_{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=b({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")}},G2=class{constructor(e,t,r,n,o){this._menuId=t,this._menuService=n,this._contextKeyService=o,this._menuDisposables=new le,this.element=Te(e,Le(".suggest-status-bar"));let s=a=>a instanceof ia?r.createInstance(cA,a,void 0):void 0;this._leftActions=new Is(this.element,{actionViewItemProvider:s}),this._rightActions=new Is(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 r=[],n=[];for(let[o,s]of e.getActions())o==="left"?r.push(...s):n.push(...s);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};G2=Q0e([lA(2,Ke),lA(3,xs),lA(4,it)],G2)});var Nd,Y2=N(()=>{Bt();gk();Jt();ke();Nd=class{constructor(){this._onDidWillResize=new Je,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Je,this.onDidResize=this._onDidResize.event,this._sashListener=new le,this._size=new Xt(0,0),this._minSize=new Xt(0,0),this._maxSize=new Xt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new wl(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new wl(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new wl(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:mk.North}),this._southSash=new wl(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:mk.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,r=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,r=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,r=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(r=n.currentX-n.startX,this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(r=-(n.currentX-n.startX),this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+r),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(li.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{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)(n=>{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,r,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=r?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){let{height:r,width:n}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(r,Math.min(o,e)),t=Math.max(n,Math.min(s,t));let a=new Xt(t,e);Xt.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}}});function Nb(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}var Z0e,J0e,X2,Q2,dA=N(()=>{Bt();A_();Qr();In();Jt();Ss();ke();xd();Y2();He();Ht();Z0e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},J0e=function(i,e){return function(t,r){e(t,r,i)}};X2=class{constructor(e,t){this._editor=e,this._onDidClose=new Je,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Je,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new le,this._renderDisposeable=new le,this._borderWidth=1,this._size=new Xt(330,0),this.domNode=Le(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(eo,{editor:e}),this._body=Le(".body"),this._scrollbar=new wf(this._body,{alwaysConsumeMouseWheel:!0}),Te(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Te(this._body,Le(".header")),this._close=Te(this._header,Le("span"+_t.asCSSSelector(pt.close))),this._close.title=b("details.close","Close"),this._type=Te(this._header,Le("p.type")),this._docs=Te(this._body,Le("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(49)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){let e=this._editor.getOptions(),t=e.get(49),r=t.getMassagedFontFamily(),n=e.get(117)||t.fontSize,o=e.get(118)||t.lineHeight,s=t.fontWeight,a=`${n}px`,l=`${o}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${o/n}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=r,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){let e=this._editor.getOption(118)||this._editor.getOption(49).lineHeight,t=this._borderWidth,r=t*2;return{lineHeight:e,borderWidth:t,borderHeight:r,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=b("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 r,n;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} `,a+=`prefix: ${(r=e.word)!==null&&r!==void 0?r:"(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: ${(n=e.completion.commitCharacters)===null||n===void 0?void 0:n.join("")} -`,s=new Ki().appendCodeblock("empty",a),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!Nb(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,dn(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Vn(this._type),this._type.title="",zr(this._type),this.domNode.classList.add("no-type");if(Vn(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),Vn(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 r=new Xt(e,t);Xt.equals(r,this._size)||(this._size=r,nP(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}};X2=Z0e([J0e(1,Ke)],X2);Q2=class{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new le,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new Nd,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let r,n,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{r=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(r&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=n.width-a.dimension.width,l=!0),a.north&&(o=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:r.top+o,left:r.left+s})}a.done&&(r=void 0,n=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 r;let n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(r=this._userSize)!==null&&r!==void 0?r:this.widget.size,t)}_placeAtAnchor(e,t,r){var n;let o=Nc(document.body),s=this.widget.getLayoutInfo(),a=new Xt(220,2*s.lineHeight),l=e.top,c=function(){let A=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),L=-s.borderWidth+e.left+e.width,O=new Xt(A,o.height-e.top-s.borderHeight-s.verticalPadding),U=O.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:A-t.width,maxSizeTop:O,maxSizeBottom:U,minSize:a.with(Math.min(A,a.width))}}(),d=function(){let A=e.left-s.borderWidth-s.horizontalPadding,L=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),O=new Xt(A,o.height-e.top-s.borderHeight-s.verticalPadding),U=O.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:A-t.width,maxSizeTop:O,maxSizeBottom:U,minSize:a.with(Math.min(A,a.width))}}(),u=function(){let A=e.left,L=-s.borderWidth+e.top+e.height,O=new Xt(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:L,left:A,fit:O.height-t.height,maxSizeBottom:O,maxSizeTop:O,minSize:a.with(O.width)}}(),h=[c,d,u],f=(n=h.find(A=>A.fit>=0))!==null&&n!==void 0?n:h.sort((A,L)=>L.fit-A.fit)[0],m=e.top+e.height-s.borderHeight,g,w=t.height,_=Math.max(f.maxSizeTop.height,f.maxSizeBottom.height);w>_&&(w=_);let E;r?w<=f.maxSizeTop.height?(g=!0,E=f.maxSizeTop):(g=!1,E=f.maxSizeBottom):w<=f.maxSizeBottom.height?(g=!1,E=f.maxSizeBottom):(g=!0,E=f.maxSizeTop),this._applyTopLeft({left:f.left,top:g?f.top:m-w}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,f===c,g,f!==c),this._resizable.minSize=f.minSize,this._resizable.maxSize=E,this._resizable.layout(w,Math.min(E.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 Ks,dA=N(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(Ks||(Ks={}))});function Rb(i,e,t,r){let n=r===Ks.ROOT_FOLDER?["rootfolder-icon"]:r===Ks.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===So.data)o=Om.parseMetaData(t).get(Om.META_DATA_LABEL);else{let s=t.path.match(ebe);s?(o=Z2(s[2].toLowerCase()),s[1]&&n.push(`${Z2(s[1].toLowerCase())}-name-dir-icon`)):o=Z2(t.authority.toLowerCase())}if(r===Ks.FOLDER)n.push(`${o}-name-folder-icon`);else{if(o){if(n.push(`${o}-name-file-icon`),n.push("name-file-icon"),o.length<=255){let a=o.split(".");for(let l=1;l<a.length;l++)n.push(`${a.slice(l).join(".")}-ext-file-icon`)}n.push("ext-file-icon")}let s=tbe(i,e,t);s&&n.push(`${Z2(s)}-lang-file-icon`)}}return n}function tbe(i,e,t){if(!t)return null;let r=null;if(t.scheme===So.data){let o=Om.parseMetaData(t).get(Om.META_DATA_MIME);o&&(r=e.getLanguageIdByMimeType(o))}else{let n=i.getModel(t);n&&(r=n.getLanguageId())}return r&&r!==sf?r:e.guessLanguageIdByFilepathOrFirstLine(t)}function Z2(i){return i.replace(/[\11\12\14\15\40]/g,"/")}var ebe,G$=N(()=>{Im();Io();Y3();dA();ebe=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function fA(i){return`suggest-aria-id:${i}`}function hA(i){return i.replace(/\r\n|\r|\n/g,"")}var ibe,uA,Rd,rbe,nbe,J2,Y$=N(()=>{Bt();iz();Qr();In();Jt();hl();ke();Tr();hn();G$();Go();Zo();He();dA();xl();tn();cA();ibe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},uA=function(i,e){return function(t,r){e(t,r,i)}};rbe=Ni("suggest-more-info",pt.chevronRight,b("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),nbe=new(Rd=class{extract(e,t){if(e.textLabel.match(Rd._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(Rd._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){let r=Rd._regexRelaxed.exec(e.completion.documentation);if(r&&(r.index===0||r.index+r[0].length===e.completion.documentation.length))return t[0]=r[0],!0}return!1}},Rd._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*\))/,Rd._regexStrict=new RegExp(`^${Rd._regexRelaxed.source}$`,"i"),Rd),J2=class{constructor(e,t,r,n){this._editor=e,this._modelService=t,this._languageService=r,this._themeService=n,this._onDidToggleDetails=new Je,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new le,r=e;r.classList.add("show-file-icons");let n=Te(e,Le(".icon")),o=Te(n,Le("span.colorspan")),s=Te(e,Le(".contents")),a=Te(s,Le(".main")),l=Te(a,Le(".icon-label.codicon")),c=Te(a,Le("span.left")),d=Te(a,Le("span.right")),u=new J_(c,{supportHighlights:!0,supportIcons:!0});t.add(u);let h=Te(c,Le("span.signature-label")),f=Te(c,Le("span.qualifier-label")),m=Te(d,Le("span.details-label")),g=Te(d,Le("span.readMore"+_t.asCSSSelector(rbe)));g.title=b("readMore","Read More");let w=()=>{let _=this._editor.getOptions(),E=_.get(49),A=E.getMassagedFontFamily(),L=E.fontFeatureSettings,O=_.get(117)||E.fontSize,U=_.get(118)||E.lineHeight,Y=E.fontWeight,oe=E.letterSpacing,te=`${O}px`,Z=`${U}px`,ve=`${oe}px`;r.style.fontSize=te,r.style.fontWeight=Y,r.style.letterSpacing=ve,a.style.fontFamily=A,a.style.fontFeatureSettings=L,a.style.lineHeight=Z,n.style.height=Z,n.style.width=Z,g.style.height=Z,g.style.width=Z};return w(),t.add(this._editor.onDidChangeConfiguration(_=>{(_.hasChanged(49)||_.hasChanged(117)||_.hasChanged(118))&&w()})),{root:r,left:c,right:d,icon:n,colorspan:o,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:f,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,r){let{completion:n}=e;r.root.id=fA(t),r.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:pu(e.score)},s=[];if(n.kind===19&&nbe.extract(e,s))r.icon.className="icon customcolor",r.iconContainer.className="icon hide",r.colorspan.style.backgroundColor=s[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){r.icon.className="icon hide",r.iconContainer.className="icon hide";let a=Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:e.textLabel}),Ks.FILE),l=Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:n.detail}),Ks.FILE);o.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(r.icon.className="icon hide",r.iconContainer.className="icon hide",o.extraClasses=[Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:e.textLabel}),Ks.FOLDER),Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:n.detail}),Ks.FOLDER)].flat()):(r.icon.className="icon hide",r.iconContainer.className="",r.iconContainer.classList.add("suggest-icon",..._t.asClassNameArray($m.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),r.iconLabel.setLabel(e.textLabel,void 0,o),typeof n.label=="string"?(r.parametersLabel.textContent="",r.detailsLabel.textContent=hA(n.detail||""),r.root.classList.add("string-label")):(r.parametersLabel.textContent=hA(n.label.detail||""),r.detailsLabel.textContent=hA(n.label.description||""),r.root.classList.remove("string-label")),this._editor.getOption(116).showInlineDetails?dn(r.detailsLabel):zr(r.detailsLabel),Nb(e)?(r.right.classList.add("can-expand-details"),dn(r.readMore),r.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},r.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(r.right.classList.remove("can-expand-details"),zr(r.readMore),r.readMore.onmousedown=null,r.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};J2=ibe([uA(1,Li),uA(2,Ji),uA(3,gr)],J2)});var obe,eC,sbe,Ip,tC,abe,pA,Lp,mA,X$=N(()=>{Bt();I0();fF();Ut();Vt();Jt();ke();Pre();Di();q$();Tp();$$();Tx();He();wt();Ht();_u();en();rk();tn();Y2();ch();cA();Y$();N_();Eo();obe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},eC=function(i,e){return function(t,r){e(t,r,i)}},sbe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};je("editorSuggestWidget.background",{dark:ml,light:ml,hcDark:ml,hcLight:ml},b("editorSuggestWidgetBackground","Background color of the suggest widget."));je("editorSuggestWidget.border",{dark:gu,light:gu,hcDark:gu,hcLight:gu},b("editorSuggestWidgetBorder","Border color of the suggest widget."));tC=je("editorSuggestWidget.foreground",{dark:da,light:da,hcDark:da,hcLight:da},b("editorSuggestWidgetForeground","Foreground color of the suggest widget."));je("editorSuggestWidget.selectedForeground",{dark:jm,light:jm,hcDark:jm,hcLight:jm},b("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));je("editorSuggestWidget.selectedIconForeground",{dark:Wm,light:Wm,hcDark:Wm,hcLight:Wm},b("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));abe=je("editorSuggestWidget.selectedBackground",{dark:Vm,light:Vm,hcDark:Vm,hcLight:Vm},b("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));je("editorSuggestWidget.highlightForeground",{dark:ua,light:ua,hcDark:ua,hcLight:ua},b("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));je("editorSuggestWidget.focusHighlightForeground",{dark:Um,light:Um,hcDark:Um,hcLight:Um},b("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));je("editorSuggestWidgetStatus.foreground",{dark:Mn(tC,.5),light:Mn(tC,.5),hcDark:Mn(tC,.5),hcLight:Mn(tC,.5)},b("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));pA=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Uo}`}restore(){var e;let t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{let r=JSON.parse(t);if(Xt.is(r))return Xt.lift(r)}catch(r){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},Lp=Ip=class{constructor(e,t,r,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new ji,this._pendingShowDetails=new ji,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new oa,this._disposables=new le,this._onDidSelect=new A3,this._onDidFocus=new A3,this._onDidHide=new Je,this._onDidShow=new Je,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Je,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new Nd,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new mA(this,e),this._persistedSize=new pA(t,e);class s{constructor(f,m,g=!1,w=!1){this.persistedSize=f,this.currentSize=m,this.persistHeight=g,this.persistWidth=w}}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 f,m,g,w;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:_,defaultSize:E}=this.getLayoutInfo(),A=Math.round(_/2),{width:L,height:O}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-O)<=A)&&(O=(m=(f=a.persistedSize)===null||f===void 0?void 0:f.height)!==null&&m!==void 0?m:E.height),(!a.persistWidth||Math.abs(a.currentSize.width-L)<=A)&&(L=(w=(g=a.persistedSize)===null||g===void 0?void 0:g.width)!==null&&w!==void 0?w:E.width),this._persistedSize.store(new Xt(L,O))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=Te(this.element.domNode,Le(".message")),this._listElement=Te(this.element.domNode,Le(".tree"));let l=o.createInstance(X2,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Q2(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(116).showIcons);c();let d=o.createInstance(J2,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new D_("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>b("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let f=h.textLabel;if(typeof h.completion.label!="string"){let{detail:_,description:E}=h.completion.label;_&&E?f=b("label.full","{0} {1}, {2}",f,_,E):_?f=b("label.detail","{0} {1}",f,_):E&&(f=b("label.desc","{0}, {1}",f,E))}if(!h.isResolved||!this._isDetailsVisible())return f;let{documentation:m,detail:g}=h.completion,w=tf("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return b("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",f,w)}}}),this._list.style(_F({listInactiveFocusBackground:abe,listInactiveFocusOutline:ca})),this._status=o.createInstance(G2,this.element.domNode,$a);let u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(116).showStatusBar);u(),this._disposables.add(n.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(n.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(116)&&(u(),c())})),this._ctxSuggestWidgetVisible=ct.Visible.bindTo(r),this._ctxSuggestWidgetDetailsVisible=ct.DetailsVisible.bindTo(r),this._ctxSuggestWidgetMultipleSuggestions=ct.MultipleSuggestions.bindTo(r),this._ctxSuggestWidgetHasFocusedSuggestion=ct.HasFocusedSuggestion.bindTo(r),this._disposables.add(ko(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 r=this._completionModel;r&&(this._onDidSelect.fire({item:e,index:t,model:r}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=bu(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 r=e.elements[0],n=e.indexes[0];r!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=r,this._list.reveal(n),this._currentSuggestionDetails=Zt(o=>sbe(this,void 0,void 0,function*(){let s=fl(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=o.onCancellationRequested(()=>s.dispose()),l=yield r.resolve(o);return s.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{n>=this._list.length||r!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[r]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:fA(n)}))}).catch(ft)),this._onDidFocus.fire({item:r,index:n,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:zr(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=Ip.LOADING_MESSAGE,zr(this._listElement,this._status.element),dn(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,cu(Ip.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ip.NO_SUGGESTIONS_MESSAGE,zr(this._listElement,this._status.element),dn(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,cu(Ip.NO_SUGGESTIONS_MESSAGE);break;case 3:zr(this._messageElement),dn(this._listElement,this._status.element),this._show();break;case 4:zr(this._messageElement),dn(this._listElement,this._status.element),this._show();break;case 5:zr(this._messageElement),dn(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=fl(()=>this._setState(1),t)))}showSuggestions(e,t,r,n,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),r&&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(n?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(r?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=N3(()=>{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")):(Nb(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=N3(()=>{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(),r=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.height<r&&this._persistedSize.store(t.with(void 0,r))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(e){var t,r,n;if(!this.editor.hasModel()||!this.editor.getDomNode())return;let o=Nc(document.body),s=this.getLayoutInfo();e||(e=s.defaultSize);let a=e.height,l=e.width;if(this._status.element.style.height=`${s.itemHeight}px`,this._state===2||this._state===1)a=s.itemHeight+s.borderHeight,l=s.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Xt(l,a),this._contentWidget.setPreference(2);else{let c=o.width-s.borderHeight-2*s.horizontalPadding;l>c&&(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,f=Qi(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=f.top+m.top+m.height,w=Math.min(o.height-g-s.verticalPadding,u),_=f.top+m.top-s.verticalPadding,E=Math.min(_,u),A=Math.min(Math.max(E,w)+s.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),a<h&&(a=h),a>A&&(a=A);let L=150;a>w||this._forceRenderingAbove&&_>L?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),A=E):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),A=w),this.element.preferredSize=new Xt(d,s.defaultSize.height),this.element.maxSize=new Xt(c,A),this.element.minSize=new Xt(220,h),this._cappedHeight=a===u?{wanted:(n=(r=this._cappedHeight)===null||r===void 0?void 0:r.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){let{width:r,height:n}=this.element.maxSize;e=Math.min(r,e),t=Math.min(n,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(49),t=uF(this.editor.getOption(118)||e.lineHeight,8,1e3),r=!this.editor.getOption(116).showStatusBar||this._state===2||this._state===1?0:t,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:r,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Xt(430,r+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}};Lp.LOADING_MESSAGE=b("suggestWidget.loading","Loading...");Lp.NO_SUGGESTIONS_MESSAGE=b("suggestWidget.noSuggestions","No suggestions.");Lp=Ip=obe([eC(1,Gn),eC(2,it),eC(3,gr),eC(4,Ke)],Lp);mA=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:r,horizontalPadding:n}=this._widget.getLayoutInfo();return new Xt(t+2*r+n,e+2*r)}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 lbe,Ap,gA,cbe,bA,jo,vA,Pb,bo,bn,iC=N(()=>{Eo();pi();Ut();Si();Vt();Jt();nre();ke();En();ol();Fr();P_();lt();ba();ci();et();ei();Cp();ah();tA();B$();He();Wi();wt();Ht();Kv();ch();H$();U$();j$();W$();X$();Oc();Io();wF();lbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ap=function(i,e){return function(t,r){e(t,r,i)}},cbe=!1,bA=class{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){let n=e.getOffsetAt(t),o=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:B.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}},jo=gA=class{static get(e){return e.getContribution(gA.ID)}constructor(e,t,r,n,o,s,a){this._memoryService=t,this._commandService=r,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new ji,this._toDispose=new le,this._selectors=new vA(u=>u.priority),this._onWillInsertSuggestItem=new Je,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance($2,this.editor),this._selectors.register({priority:0,select:(u,h,f)=>this._memoryService.select(u,h,f)});let l=ct.InsertMode.bindTo(n);l.set(e.getOption(116).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(116).insertMode))),this.widget=this._toDispose.add(new c_(()=>{let u=this._instantiationService.createInstance(Lp,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(w=>this._insertSuggestion(w,0),this));let h=new K2(this.editor,u,this.model,w=>this._insertSuggestion(w,2));this._toDispose.add(h);let f=ct.MakesTextEdit.bindTo(this._contextKeyService),m=ct.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=ct.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(ii(()=>{f.reset(),m.reset(),g.reset()})),this._toDispose.add(u.onDidFocus(({item:w})=>{let _=this.editor.getPosition(),E=w.editStart.column,A=_.column,L=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!w.completion.additionalTextEdits&&!(w.completion.insertTextRules&4)&&A-E===w.completion.insertText.length&&(L=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:E,endLineNumber:_.lineNumber,endColumn:A})!==w.completion.insertText),f.set(L),m.set(!Ie.equals(w.editInsertEnd,w.editReplaceEnd)),g.set(!!w.provider.resolveCompletionItem||!!w.completion.documentation||w.completion.detail!==w.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(w=>{if(w.toKeyCodeChord().equals(new M3(!0,!1,!1,!1,33))||kn&&w.toKeyCodeChord().equals(new M3(!1,!1,!1,!0,33))){w.stopPropagation();return}w.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new c_(()=>this._toDispose.add(new Mb(this.editor,this.model)))),this._alternatives=this._toDispose.add(new c_(()=>this._toDispose.add(new Ld(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(kp,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new bA(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 f=!1;if(u.triggerOptions.auto){let m=this.editor.getOption(116);m.selectionMode==="never"||m.selectionMode==="always"?f=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?f=u.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(f=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{cbe||(this.model.cancel(),this.model.clear())}));let c=ct.AcceptSuggestionsOnEnter.bindTo(n),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(),this._onWillInsertSuggestItem.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 r=rr.get(this.editor);if(!r)return;this._onWillInsertSuggestItem.fire({item:e.item});let n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,a=[],l=new Fi;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));this._memoryService.memorize(n,this.editor.getPosition(),s);let d=s.isResolved,u=-1,h=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let m=ga.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(g=>ti.replaceMove(B.lift(g.range),g.text))),m.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!d){let m=new pr,g,w=n.onDidChangeContent(L=>{if(L.isFlush){l.cancel(),w.dispose();return}for(let O of L.changes){let U=B.getEndPosition(O.range);(!g||Ie.isBefore(U,g))&&(g=U)}}),_=t;t|=2;let E=!1,A=this.editor.onWillType(()=>{A.dispose(),E=!0,_&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(g&&s.completion.additionalTextEdits.some(O=>Ie.isBefore(g,B.getStartPosition(O.range))))return!1;E&&this.editor.pushUndoStop();let L=ga.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(O=>ti.replaceMove(B.lift(O.range),O.text))),L.restoreRelativeVerticalPositionOfCursor(this.editor),(E||!(_&2))&&this.editor.pushUndoStop(),!0}).then(L=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",m.elapsed(),L),h=L===!0?1:L===!1?0:-2}).finally(()=>{w.dispose(),A.dispose()}))}let{insertText:f}=s.completion;if(s.completion.insertTextRules&4||(f=Ho.escape(f)),this.model.cancel(),r.insert(f,{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)if(s.completion.command.id===Pb.id)this.model.trigger({auto:!0,retrigger:!0});else{let m=new pr;a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(g=>{s.completion.extensionId?Yt(g):ft(g)}).finally(()=>{u=m.elapsed()}))}t&4&&this._alternatives.value.set(e,m=>{for(l.cancel();n.canUndo();){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(m,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,n,d,u,h),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,r,n,o){var s,a,l;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(a=(s=e.extensionId)===null||s===void 0?void 0:s.value)!==null&&a!==void 0?a:"unknown",providerId:(l=e.provider._debugDisplayName)!==null&&l!==void 0?l:"unknown",kind:e.completion.kind,basenameHash:F_(An(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:XP(t.uri),resolveInfo:e.provider.resolveCompletionItem?r?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:o})}getOverwriteInfo(e,t){zt(this.editor.hasModel());let r=this.editor.getOption(116).insertMode==="replace";t&&(r=!r);let n=e.position.column-e.editStart.column,o=(r?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:n+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(qi(e.completion.additionalTextEdits)){let t=b("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);sr(t)}}triggerSuggest(e,t,r){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,completionOptions:{providerFilter:e,kindFilter:r?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(),r=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=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)(()=>{Ui(s),r()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Ui(s),a.items.length===0){r();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!n(c)){r();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 r=this.widget.value.getFocusedItem(),n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(r,n)}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)}};jo.ID="editor.contrib.suggestController";jo=gA=lbe([Ap(1,Sp),Ap(2,vi),Ap(3,it),Ap(4,Ke),Ap(5,Fc),Ap(6,Ln)],jo);vA=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,r)=>this.prioritySelector(r)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},Pb=class i extends de{constructor(){super({id:i.id,label:b("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:fe.and(F.writable,F.hasCompletionItemProvider,ct.Visible.toNegated()),kbOpts:{kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,r){let n=jo.get(t);if(!n)return;let o;r&&typeof r=="object"&&r.auto===!0&&(o=!0),n.triggerSuggest(void 0,o,void 0)}};Pb.id="editor.action.triggerSuggest";Ue(jo.ID,jo,2);ee(Pb);bo=100+90,bn=Oi.bindToContribution(jo.get);We(new bn({id:"acceptSelectedSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:fe.and(ct.Visible,F.textInputFocus),weight:bo},{primary:3,kbExpr:fe.and(ct.Visible,F.textInputFocus,ct.AcceptSuggestionsOnEnter,ct.MakesTextEdit),weight:bo}],menuOpts:[{menuId:$a,title:b("accept.insert","Insert"),group:"left",order:1,when:ct.HasInsertAndReplaceRange.toNegated()},{menuId:$a,title:b("accept.insert","Insert"),group:"left",order:1,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("insert"))},{menuId:$a,title:b("accept.replace","Replace"),group:"left",order:1,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("replace"))}]}));We(new bn({id:"acceptAlternativeSelectedSuggestion",precondition:fe.and(ct.Visible,F.textInputFocus,ct.HasFocusedSuggestion),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:$a,group:"left",order:2,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("insert")),title:b("accept.replace","Replace")},{menuId:$a,group:"left",order:2,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("replace")),title:b("accept.insert","Insert")}]}));At.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");We(new bn({id:"hideSuggestWidget",precondition:ct.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:9,secondary:[1033]}}));We(new bn({id:"selectNextSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));We(new bn({id:"selectNextPageSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:12,secondary:[2060]}}));We(new bn({id:"selectLastSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));We(new bn({id:"selectPrevSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));We(new bn({id:"selectPrevPageSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:11,secondary:[2059]}}));We(new bn({id:"selectFirstSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));We(new bn({id:"focusSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));We(new bn({id:"focusAndAcceptSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));We(new bn({id:"toggleSuggestionDetails",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:$a,group:"right",order:1,when:fe.and(ct.DetailsVisible,ct.CanResolve),title:b("detail.more","show less")},{menuId:$a,group:"right",order:1,when:fe.and(ct.DetailsVisible.toNegated(),ct.CanResolve),title:b("detail.less","show more")}]}));We(new bn({id:"toggleExplainMode",precondition:ct.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));We(new bn({id:"toggleSuggestionFocus",precondition:ct.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2570,mac:{primary:778}}}));We(new bn({id:"insertBestCompletion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),kp.AtEnd,ct.Visible.toNegated(),Ld.OtherSuggestions.toNegated(),rr.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(Fv(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:bo,primary:2}}));We(new bn({id:"insertNextSuggestion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),Ld.OtherSuggestions,ct.Visible.toNegated(),rr.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2}}));We(new bn({id:"insertPrevSuggestion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),Ld.OtherSuggestions,ct.Visible.toNegated(),rr.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:1026}}));ee(class extends de{constructor(){super({id:"editor.action.resetSuggestSize",label:b("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){var t;(t=jo.get(e))===null||t===void 0||t.resetWidgetSize()}})});function dbe(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var rC,Ob,Q$=N(()=>{Jt();ke();ci();et();hn();ah();QL();iC();_a();WL();pi();rC=class extends ce{get selectedItem(){return this._selectedItem}constructor(e,t,r,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=r,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=va("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(e.onKeyDown(s=>{s.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(s=>{s.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let o=jo.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(l,c,d)=>{var u;nn(_=>this.checkModelVersion(_));let h=this.editor.getModel();if(!h)return-1;let f=(u=this.suggestControllerPreselector())===null||u===void 0?void 0:u.removeCommonPrefix(h);if(!f)return-1;let m=Ie.lift(c),g=d.map((_,E)=>{let L=Ob.fromSuggestion(o,h,m,_,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),O=f.augments(L);return{index:E,valid:O,prefixLength:L.text.length,suggestItem:_}}).filter(_=>_&&_.valid&&_.prefixLength>0),w=RP(g,MP(_=>_.prefixLength,NP));return w?w.index:-1}}));let s=!1,a=()=>{s||(s=!0,this._register(o.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(o.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(o.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(li.once(o.model.onDidTrigger)(l=>{a()})),this._register(o.onWillInsertSuggestItem(l=>{let c=this.editor.getPosition(),d=this.editor.getModel();if(!c||!d)return;let u=Ob.fromSuggestion(o,d,c,l.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!dbe(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,nn(r=>{this.checkModelVersion(r),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,r)}))}getSuggestItemInfo(){let e=jo.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),r=this.editor.getPosition(),n=this.editor.getModel();if(!(!t||!r||!n))return Ob.fromSuggestion(e,n,r,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){let e=jo.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){let e=jo.get(this.editor);e==null||e.forceRenderingAbove()}},Ob=class i{static fromSuggestion(e,t,r,n,o){let{insertText:s}=n.completion,a=!1;if(n.completion.insertTextRules&4){let c=new Ho().parse(s);c.children.length<100&&wp.adjustWhitespace(t,r,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(n,o);return new i(B.fromPositions(r.delta(0,-l.overwriteBefore),r.delta(0,Math.max(l.overwriteAfter,0))),s,n.completion.kind,a)}constructor(e,t,r,n){this.range=e,this.insertText=t,this.completionItemKind=r,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new BO(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new lh(this.range,this.insertText)}}});var ube,Pd,_A,vn,nC=N(()=>{Eo();Jt();ke();_a();r_();ci();Ls();Rt();T2();u$();I2();O2();F$();Q$();He();tne();Wi();Cr();wt();Ht();Ur();ube=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Pd=function(i,e){return function(t,r){e(t,r,i)}},vn=_A=class extends ce{static get(e){return e.getContribution(_A.ID)}constructor(e,t,r,n,o,s,a,l,c){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=r,this.configurationService=n,this.commandService=o,this.debounceService=s,this.languageFeaturesService=a,this.audioCueService=l,this._keybindingService=c,this.model=rg("inlineCompletionModel",void 0),this.textModelVersionId=va("textModelVersionId",-1),this.cursorPosition=va("cursorPosition",new Ie(1,1)),this.suggestWidgetAdaptor=this._register(new rC(this.editor,()=>{var h,f;return(f=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||f===void 0?void 0:f.toSingleTextEdit(void 0)},h=>this.updateObservables(h,to.Other),h=>{nn(f=>{var m;this.updateObservables(f,to.Other),(m=this.model.get())===null||m===void 0||m.handleSuggestAccepted(h)})})),this._enabled=Sl(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(D2,this.editor,{ghostText:this.model.map((h,f)=>h==null?void 0:h.ghostText.read(f)),minReservedLineCount:V_(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new vr(this.contextKeyService,this.model)),this._register(li.runAndSubscribe(e.onDidChangeModel,()=>nn(h=>{this.model.set(void 0,h),this.updateObservables(h,to.Other);let f=e.getModel();if(f){let m=t.createInstance(V2,f,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,Sl(e.onDidChangeConfiguration,()=>e.getOption(116).preview),Sl(e.onDidChangeConfiguration,()=>e.getOption(116).previewMode),Sl(e.onDidChangeConfiguration,()=>e.getOption(61).mode),this._enabled);this.model.set(m,h)}})));let d=h=>{var f;return h.isUndoing?to.Undo:h.isRedoing?to.Redo:!((f=this.model.get())===null||f===void 0)&&f.isAcceptingPartially?to.AcceptWord:to.Other};this._register(e.onDidChangeModelContent(h=>nn(f=>this.updateObservables(f,d(h))))),this._register(e.onDidChangeCursorPosition(h=>nn(f=>{var m;this.updateObservables(f,to.Other),(h.reason===3||h.source==="api")&&((m=this.model.get())===null||m===void 0||m.stop(f))}))),this._register(e.onDidType(()=>nn(h=>{var f;this.updateObservables(h,to.Other),this._enabled.get()&&((f=this.model.get())===null||f===void 0||f.trigger(h))}))),this._register(this.commandService.onDidExecuteCommand(h=>{new Set([af.Tab.id,af.DeleteLeft.id,af.DeleteRight.id,S2,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&nn(m=>{var g;(g=this.model.get())===null||g===void 0||g.trigger(m)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(61).keepOnBlur||Ws.dropDownVisible||nn(h=>{var f;(f=this.model.get())===null||f===void 0||f.stop(h)})})),this._register(fn(h=>{var f;let m=(f=this.model.read(h))===null||f===void 0?void 0:f.state.read(h);m!=null&&m.suggestItem?m.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(ii(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let u;this._register(fn(h=>{let f=this.model.read(h),m=f==null?void 0:f.state.read(h);if(!f||!m||!m.inlineCompletion){u=void 0;return}if(m.inlineCompletion.semanticId!==u){u=m.inlineCompletion.semanticId;let g=f.textModel.getLineContent(m.ghostText.lineNumber);this.audioCueService.playAudioCue(nz.inlineSuggestion).then(()=>{this.editor.getOption(7)&&this.provideScreenReaderUpdate(m.ghostText.renderForScreenReader(g))})}})),this._register(new P2(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){let t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"),n;!t&&r&&this.editor.getOption(146)&&(n=b("showAccessibleViewHint","Inspect this in the accessible view ({0})",r.getAriaLabel())),n?sr(e+", "+n):sr(e)}updateObservables(e,t){var r,n;let o=this.editor.getModel();this.textModelVersionId.set((r=o==null?void 0:o.getVersionId())!==null&&r!==void 0?r:-1,e,t),this.cursorPosition.set((n=this.editor.getPosition())!==null&&n!==void 0?n:new Ie(1,1),e)}shouldShowHoverAt(e){var t;let r=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return r?r.parts.some(n=>e.containsPosition(new Ie(r.lineNumber,n.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};vn.ID="editor.contrib.inlineCompletionsController";vn=_A=ube([Pd(1,Ke),Pd(2,it),Pd(3,Dt),Pd(4,vi),Pd(5,ar),Pd(6,Se),Pd(7,rz),Pd(8,qt)],vn)});var Od,Fb,zb,oC,sC,aC,lC,Bb,Hb,Z$=N(()=>{_a();lt();ei();T2();I2();nC();ch();He();Zi();Cr();wt();Od=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Fb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);(r=n==null?void 0:n.model.get())===null||r===void 0||r.next()})}};Fb.ID=E2;zb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);(r=n==null?void 0:n.model.get())===null||r===void 0||r.previous()})}};zb.ID=k2;oC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:b("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:F.writable})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);(r=n==null?void 0:n.model.get())===null||r===void 0||r.triggerExplicitly()})}},sC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:b("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:fe.and(F.writable,vr.inlineSuggestionVisible)},menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);yield(r=n==null?void 0:n.model.get())===null||r===void 0?void 0:r.acceptNextWord(n.editor)})}},aC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:b("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);yield(r=n==null?void 0:n.model.get())===null||r===void 0?void 0:r.acceptNextLine(n.editor)})}},lC=class extends de{constructor(){super({id:S2,label:b("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:vr.inlineSuggestionVisible,menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:fe.and(vr.inlineSuggestionVisible,F.tabMovesFocus.toNegated(),vr.inlineSuggestionHasIndentationLessThanTabSize,ct.Visible.toNegated(),F.hoverFocused.toNegated())}})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);n&&((r=n.model.get())===null||r===void 0||r.accept(n.editor),n.editor.focus())})}},Bb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:vr.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Od(this,void 0,void 0,function*(){let r=vn.get(t);nn(n=>{var o;(o=r==null?void 0:r.model.get())===null||o===void 0||o.stop(n)})})}};Bb.ID="editor.action.inlineSuggest.hide";Hb=class i extends Qo{constructor(){super({id:i.ID,title:b("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Me.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:fe.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return Od(this,void 0,void 0,function*(){let r=e.get(Dt),o=r.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";r.updateValue("editor.inlineSuggest.showToolbar",o)})}};Hb.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"});var hbe,Ub,yA,cC,J$=N(()=>{Bt();Ss();ke();_a();et();Zo();ec();nC();O2();xd();He();$_();Ht();es();Oc();hbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ub=function(i,e){return function(t,r){e(t,r,i)}},yA=class{constructor(e,t,r){this.owner=e,this.range=t,this.controller=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},cC=class{constructor(e,t,r,n,o,s){this._editor=e,this._languageService=t,this._openerService=r,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=vn.get(this._editor);if(!t)return null;let r=e.target;if(r.type===8){let n=r.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new Ed(1e3,this,B.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return r.type===7&&t.shouldShowHoverAt(r.range)?new Ed(1e3,this,r.range,e.event.posx,e.event.posy,!1):r.type===6&&r.detail.mightBeForeignElement&&t.shouldShowHoverAt(r.range)?new Ed(1e3,this,r.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(61).showToolbar==="always")return[];let r=vn.get(this._editor);return r&&r.shouldShowHoverAt(e.range)?[new yA(this,e.range,r)]:[]}renderHoverParts(e,t){let r=new le,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(7)&&this.renderScreenReaderText(e,n,r);let o=n.controller.model.get(),s=this._instantiationService.createInstance(Ws,this._editor,!1,V_(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(),r.add(s),r}renderScreenReaderText(e,t,r){let n=Le,o=n("div.hover-row.markdown-hover"),s=Te(o,n("div.hover-contents",{"aria-live":"assertive"})),a=r.add(new eo({editor:this._editor},this._languageService,this._openerService)),l=c=>{r.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let d=b("inlineSuggestionFollows","Suggestion:"),u=r.add(a.render(new Ki().appendText(d).appendCodeblock("text",c)));s.replaceChildren(u.element)};r.add(fn(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 lu(s)})),e.fragment.appendChild(o)}};cC=hbe([Ub(1,Ji),Ub(2,er),Ub(3,Cf),Ub(4,Ke),Ub(5,Ln)],cC)});var wA=N(()=>{lt();ec();Z$();J$();nC();Zi();Ue(vn.ID,vn,3);ee(oC);ee(Fb);ee(zb);ee(sC);ee(aC);ee(lC);ee(Bb);Ci(Hb);Bo.register(cC)});var eG=N(()=>{});var tG=N(()=>{eG()});var iG=N(()=>{});var rG=N(()=>{iG()});var nG,fbe,pbe,xA,CA,dC,uC,oG=N(()=>{Bt();mk();aa();aF();ke();Z3();rG();et();Hr();nG=new vt(new ks(0,122,204)),fbe={showArrow:!0,showFrame:!0,className:"",frameColor:nG,arrowColor:nG,keepEditorSelection:!1},pbe="vs.editor.contrib.zoneWidget",xA=class{constructor(e,t,r,n,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=r,this.heightInLines=n,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},CA=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},dC=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(),R3(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(){R3(this._ruleName),aP(`.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:B.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};dC._IdGenerator=new oF(".arrow-decoration-");uC=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new le,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=tO(t),uf(this.options,fbe,!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(r=>{let n=this._getWidth(r);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(r)+"px",this._onWidth(n)}))}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 dC(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 r=e-this._decoratingElementsHeight();this.container.style.height=`${r}px`;let n=this.editor.getLayoutInfo();this._doLayout(r,this._getWidth(n))}(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 r=B.isIRange(e)?B.lift(e):B.fromPositions(e);this._isShowing=!0,this._showImpl(r,t),this._isShowing=!1,this._positionMarkerId.set([{range:r,options:mt.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(65),t=0;if(this.options.showArrow){let r=Math.round(e/3);t+=2*r}if(this.options.showFrame){let r=Math.round(e/9);t+=2*r}return t}_showImpl(e,t){let r=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(65);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(r)),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 xA(s,r.lineNumber,r.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new CA(pbe+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 B(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 wl(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 r=(t.currentY-e.startY)/this.editor.getOption(65),n=r<0?Math.ceil(r):Math.floor(r),o=e.heightInLines+n;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 lG(i){let e=i.get(si).getFocusedCodeEditor();return e instanceof Uo?e.getParentEditor():e}var sG,aG,SA,Rr,jb,mbe,Dp,cG,hC,fC,dG,uG,Itt,Ltt,Att,Dtt,Fd,Mtt,Ntt,Rtt,Ptt,Ott,dh=N(()=>{Bt();tg();Rc();Qr();In();aa();Jt();Z3();tG();lt();Tn();Tp();oG();He();X_();wt();dl();Ht();en();sG=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},aG=function(i,e){return function(t,r){e(t,r,i)}},SA=Xr("IPeekViewService");Jr(SA,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let r=()=>{let n=this._widgets.get(i);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(r)})}},1);(function(i){i.inPeekEditor=new ht("inReferenceSearchEditor",!0,b("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Rr||(Rr={}));jb=class{constructor(e,t){e instanceof Uo&&Rr.inPeekEditor.bindTo(t)}dispose(){}};jb.ID="editor.contrib.referenceController";jb=sG([aG(1,it)],jb);Ue(jb.ID,jb,0);mbe={headerBackgroundColor:vt.white,primaryHeadingColor:vt.fromHex("#333333"),secondaryHeadingColor:vt.fromHex("#6c6c6cb3")},Dp=class extends uC{constructor(e,t,r){super(e,t),this.instantiationService=r,this._onDidClose=new Je,this.onDidClose=this._onDidClose.event,uf(this.options,mbe,!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=Le(".head"),this._bodyElement=Le(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=Le(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),ko(this._titleElement,"click",o=>this._onTitleClick(o))),Te(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Le("span.filename"),this._secondaryHeading=Le("span.dirname"),this._metaHeading=Le("span.meta"),Te(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let r=Le(".peekview-actions");Te(this._headElement,r);let n=this._getActionBarOptions();this._actionbarWidget=new Is(r,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Yo("peekview.close",b("label.close","Close"),_t.asClassName(pt.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:$F.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:Vn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,dn(this._metaHeading)):zr(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let r=Math.ceil(this.editor.getOption(65)*1.2),n=Math.round(e-(r+2));this._doLayoutHead(r,t),this._doLayoutBody(n,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`)}};Dp=sG([aG(2,Ke)],Dp);cG=je("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:vt.black,hcLight:vt.white},b("peekViewTitleBackground","Background color of the peek view title area.")),hC=je("peekViewTitleLabel.foreground",{dark:vt.white,light:vt.black,hcDark:vt.white,hcLight:da},b("peekViewTitleForeground","Color of the peek view title.")),fC=je("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},b("peekViewTitleInfoForeground","Color of the peek view title info.")),dG=je("peekView.border",{dark:Bm,light:Bm,hcDark:Jo,hcLight:Jo},b("peekViewBorder","Color of the peek view borders and arrow.")),uG=je("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:vt.black,hcLight:vt.white},b("peekViewResultsBackground","Background color of the peek view result list.")),Itt=je("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:vt.white,hcLight:da},b("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Ltt=je("peekViewResult.fileForeground",{dark:vt.white,light:"#1E1E1E",hcDark:vt.white,hcLight:da},b("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),Att=je("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},b("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Dtt=je("peekViewResult.selectionForeground",{dark:vt.white,light:"#6C6C6C",hcDark:vt.white,hcLight:da},b("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Fd=je("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:vt.black,hcLight:vt.white},b("peekViewEditorBackground","Background color of the peek view editor.")),Mtt=je("peekViewEditorGutter.background",{dark:Fd,light:Fd,hcDark:Fd,hcLight:Fd},b("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Ntt=je("peekViewEditorStickyScroll.background",{dark:Fd,light:Fd,hcDark:Fd,hcLight:Fd},b("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),Rtt=je("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},b("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),Ptt=je("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},b("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Ott=je("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:ca,hcLight:ca},b("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var bbe,Wo,kA,sc,Bn,Mp=N(()=>{Vt();Jt();aF();ke();lf();Io();Di();et();He();bbe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Wo=class{constructor(e,t,r,n){this.isProviderFirst=e,this.parent=t,this.link=r,this._rangeCallback=n,this.id=sF.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?b({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,An(this.uri),this.range.startLineNumber,this.range.startColumn):b("aria.oneReference","in {0} on line {1} at column {2}",An(this.uri),this.range.startLineNumber,this.range.startColumn)}},kA=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let r=this._modelReference.object.textEditorModel;if(!r)return;let{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:a}=e,l=r.getWordUntilPosition({lineNumber:n,column:o-t}),c=new B(n,l.startColumn,n,o),d=new B(s,a,s,1073741824),u=r.getValueInRange(c).replace(/^\s+/,""),h=r.getValueInRange(e),f=r.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+f,highlight:{start:u.length,end:u.length+h.length}}}},sc=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new zP}dispose(){Ui(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?b("aria.fileReferences.1","1 symbol in {0}, full path {1}",An(this.uri),this.uri.fsPath):b("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,An(this.uri),this.uri.fsPath)}resolve(e){return bbe(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 r=yield e.createModelReference(t.uri);this._previews.set(t.uri,new kA(r))}catch(r){ft(r)}return this})}},Bn=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Je,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[r]=e;e.sort(i._compareReferences);let n;for(let o of e)if((!n||!Q3.isEqual(n.uri,o.uri,!0))&&(n=new sc(this,o.uri),this.groups.push(n)),n.children.length===0||i._compareReferences(o,n.children[n.children.length-1])!==0){let s=new Wo(r===o,n,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),n.children.push(s)}}dispose(){Ui(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?b("aria.result.0","No results found"):this.references.length===1?b("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?b("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):b("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:r}=e,n=r.children.indexOf(e),o=r.children.length,s=r.parent.groups.length;return s===1||t&&n+1<o||!t&&n>0?(t?n=(n+1)%o:n=(n+o-1)%o,r.children[n]):(n=r.parent.groups.indexOf(r),t?(n=(n+1)%s,r.parent.groups[n].children[0]):(n=(n+s-1)%s,r.parent.groups[n].children[r.parent.groups[n].children.length-1]))}nearestReference(e,t){let r=this.references.map((n,o)=>({idx:o,prefixLen:Pc(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,o)=>n.prefixLen>o.prefixLen?-1:n.prefixLen<o.prefixLen?1:n.offsetDist<o.offsetDist?-1:n.offsetDist>o.offsetDist?1:0)[0];if(r)return this.references[r.idx]}referenceAt(e,t){for(let r of this.references)if(r.uri.toString()===e.toString()&&B.containsPosition(r.range,t))return r}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return Q3.compare(e.uri,t.uri)||B.compareRangesUsingStarts(e.range,t.range)}}});var hG=N(()=>{});var fG=N(()=>{hG()});var _C,yC,EA,pC,mC,gC,bC,TA,Np,IA,Rp,vC,pG=N(()=>{Bt();rne();ene();iz();hl();ke();Io();ta();He();Ht();Ur();Q_();N_();Mp();_C=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},yC=function(i,e){return function(t,r){e(t,r,i)}},pC=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Bn||e instanceof sc}getChildren(e){if(e instanceof Bn)return e.groups;if(e instanceof sc)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};pC=_C([yC(0,xr)],pC);mC=class{getHeight(){return 23}getTemplateId(e){return e instanceof sc?Np.id:Rp.id}},gC=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Wo){let r=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(r)return r.value}return An(e.uri)}};gC=_C([yC(0,qt)],gC);bC=class{getId(e){return e instanceof Wo?e.id:e.uri}},TA=class extends ce{constructor(e,t){super(),this._labelService=t;let r=document.createElement("div");r.classList.add("reference-file"),this.file=this._register(new J_(r,{supportHighlights:!0})),this.badge=new cz(Te(r,Le(".count")),{},bF),e.appendChild(r)}set(e,t){let r=cf(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(r,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(b("referencesCount","{0} references",n)):this.badge.setTitleFormat(b("referenceCount","{0} reference",n))}};TA=_C([yC(1,kl)],TA);Np=EA=class{constructor(e){this._instantiationService=e,this.templateId=EA.id}renderTemplate(e){return this._instantiationService.createInstance(TA,e)}renderElement(e,t,r){r.set(e.element,pu(e.filterData))}disposeTemplate(e){e.dispose()}};Np.id="FileReferencesRenderer";Np=EA=_C([yC(0,Ke)],Np);IA=class{constructor(e){this.label=new tz(e)}set(e,t){var r;let n=(r=e.parent.getPreview(e))===null||r===void 0?void 0:r.preview(e.range);if(!n||!n.value)this.label.set(`${An(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:s}=n;t&&!ul.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,pu(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}},Rp=class i{constructor(){this.templateId=i.id}renderTemplate(e){return new IA(e)}renderElement(e,t,r){r.set(e.element,e.filterData)}disposeTemplate(){}};Rp.id="OneReferenceRenderer";vC=class{getWidgetAriaLabel(){return b("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var vbe,ac,mG,wC,xC,LA,CC,gG=N(()=>{Bt();ine();aa();Jt();ke();Im();Io();fG();Tp();et();Hr();Br();Y3();Zo();ta();pG();dh();He();Ht();Ur();Q_();lz();tn();Lre();Mp();vbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ac=function(i,e){return function(t,r){e(t,r,i)}},mG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},wC=class i{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new le,this._callOnModelChange=new le,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=[],r=[];for(let n=0,o=e.children.length;n<o;n++){let s=e.children[n];this._decorationIgnoreSet.has(s.id)||s.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:s.range,options:i.DecorationOptions}),r.push(n))}this._editor.changeDecorations(n=>{let o=n.deltaDecorations([],t);for(let s=0;s<o.length;s++)this._decorations.set(o[s],e.children[r[s]])})}_onDecorationChanged(){let e=[],t=this._editor.getModel();if(t){for(let[r,n]of this._decorations){let o=t.getDecorationRange(r);if(!o)continue;let s=!1;if(!B.equalsRange(o,n.range)){if(B.spansMultipleLines(o))s=!0;else{let a=n.range.endColumn-n.range.startColumn,l=o.endColumn-o.startColumn;a!==l&&(s=!0)}s?(this._decorationIgnoreSet.add(n.id),e.push(r)):n.range=o}}for(let r=0,n=e.length;r<n;r++)this._decorations.delete(e[r]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}};wC.DecorationOptions=mt.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});xC=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,r;try{let n=JSON.parse(e);t=n.ratio,r=n.heightInLines}catch(n){}return{ratio:t||.7,heightInLines:r||18}}},LA=class extends az{},CC=class extends Dp{constructor(e,t,r,n,o,s,a,l,c,d,u,h){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=r,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=d,this._languageService=u,this._languageConfigurationService=h,this._disposeOnNewModel=new le,this._callOnDispose=new le,this._onDidSelectReference=new Je,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Xt(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),Ui(this._preview),Ui(this._previewNotAvailableMessage),Ui(this._tree),Ui(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){let t=e.getColor(dG)||vt.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(cG)||vt.transparent,primaryHeadingColor:e.getColor(hC),secondaryHeadingColor:e.getColor(fC)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=Te(e,Le("div.messages")),zr(this._messageContainer),this._splitView=new oz(e,{orientation:1}),this._previewContainer=Te(e,Le("div.preview.inline"));let t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Uo,this._previewContainer,t,{},this.editor),zr(this._previewContainer),this._previewNotAvailableMessage=new ok(b("missingPreviewMessage","no preview available"),sf,ok.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=Te(e,Le("div.ref-tree.inline"));let r={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new vC,keyboardNavigationLabelProvider:this._instantiationService.createInstance(gC),identityProvider:new bC,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:uG}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(ko(this._treeContainer,"keydown",o=>{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(LA,"ReferencesWidget",this._treeContainer,new mC,[this._instantiationService.createInstance(Np),this._instantiationService.createInstance(Rp)],this._instantiationService.createInstance(pC),r),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})}},Ek.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)}},Ek.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let n=(o,s)=>{o instanceof Wo&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?n(o.element,"side"):o.editorOptions.pinned?n(o.element,"goto"):n(o.element,"show")}),zr(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Xt(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=b("noResults","No results"),dn(this._messageContainer),Promise.resolve(void 0)):(zr(this._messageContainer),this._decorationsManager=new wC(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:r}=e;if(t.detail!==2)return;let n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:r.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),dn(this._treeContainer),dn(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 Wo)return e;if(e instanceof sc&&e.children.length>0)return e.children[0]}revealReference(e){return mG(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return mG(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==So.inMemory?this.setTitle(YP(e.uri),this._uriLabel.getUriLabel(cf(e.uri))):this.setTitle(b("peekView.alternateTitle","References"));let r=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 n=yield r;if(!this._model){n.dispose();return}Ui(this._previewModelReference);let o=n.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=B.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};CC=vbe([ac(3,gr),ac(4,xr),ac(5,Ke),ac(6,SA),ac(7,kl),ac(8,GO),ac(9,qt),ac(10,Ji),ac(11,Pt)],CC)});function hh(i,e){let t=lG(i);if(!t)return;let r=Ga.get(t);r&&e(r)}var _be,Pp,bG,SC,uh,Ga,AA=N(()=>{Ut();Vt();sl();ke();Tn();ci();et();dh();He();Wi();Cr();wt();Ht();H3();lz();Ao();_u();Mp();gG();_be=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Pp=function(i,e){return function(t,r){e(t,r,i)}},bG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},uh=new ht("referenceSearchVisible",!1,b("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),Ga=SC=class{static get(e){return e.getContribution(SC.ID)}constructor(e,t,r,n,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new le,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=uh.bindTo(r)}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,r){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=r,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=xC.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(CC,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(b("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":r?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(b("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,u=new Ie(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(85)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return bG(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let r=this._model.nearestReference(this._editor.getModel().uri,t);if(!r)return;let n=this._model.nextOrPreviousReference(r,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return bG(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,r;(t=this._widget)===null||t===void 0||t.dispose(),(r=this._model)===null||r===void 0||r.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 r;(r=this._widget)===null||r===void 0||r.hide(),this._ignoreModelChangeEvent=!0;let n=B.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,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(n),this._widget.focusOnReferenceTree();else{let a=SC.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(n,Zt(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,ft(o)})}openReference(e,t,r){t||this.closeWidget();let{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:r}},this._editor,t)}};Ga.ID="editor.contrib.referencesController";Ga=SC=_be([Pp(2,it),Pp(3,si),Pp(4,Mi),Pp(5,Ke),Pp(6,Gn),Pp(7,Dt)],Ga);To.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:mi(2089,60),when:fe.or(uh,Rr.inPeekEditor),handler(i){hh(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});To.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:fe.or(uh,Rr.inPeekEditor),handler(i){hh(i,e=>{e.goToNextOrPreviousReference(!0)})}});To.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:fe.or(uh,Rr.inPeekEditor),handler(i){hh(i,e=>{e.goToNextOrPreviousReference(!1)})}});At.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");At.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");At.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");At.registerCommand("closeReferenceSearch",i=>hh(i,e=>e.closeWidget()));To.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:fe.and(Rr.inPeekEditor,fe.not("config.editor.stablePeek"))});To.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:fe.and(uh,fe.not("config.editor.stablePeek"))});To.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:fe.and(uh,Ik,Lk.negate(),Ak.negate()),handler(i){var e;let r=(e=i.get(ey).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(r)&&r[0]instanceof Wo&&hh(i,n=>n.revealReference(r[0]))}});To.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:fe.and(uh,Ik,Lk.negate(),Ak.negate()),handler(i){var e;let r=(e=i.get(ey).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(r)&&r[0]instanceof Wo&&hh(i,n=>n.openReference(r[0],!0,!0))}});At.registerCommand("openReference",i=>{var e;let r=(e=i.get(ey).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(r)&&r[0]instanceof Wo&&hh(i,n=>n.openReference(r[0],!1,!0))})});var vG,Wb,NA,Vb,DA,MA,_G=N(()=>{Jt();ke();Io();lt();Tn();et();He();wt();dl();Ht();Ur();H3();Ao();vG=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Wb=function(i,e){return function(t,r){e(t,r,i)}},NA=new ht("hasSymbols",!1,b("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Vb=Xr("ISymbolNavigationService"),DA=class{constructor(e,t,r,n){this._editorService=t,this._notificationService=r,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=NA.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 r=new MA(this._editorService),n=r.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(s_(u.uri,a.uri))c=!0,d=d||B.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=L3(r,n)}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:B.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"),r=t?b("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):b("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(r)}};DA=vG([Wb(0,it),Wb(1,si),Wb(2,Mi),Wb(3,qt)],DA);Jr(Vb,DA,1);We(new class extends Oi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:NA,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(Vb).revealNext(e)}});To.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:NA,primary:9,handler(i){i.get(Vb).reset()}});MA=class{constructor(e){this._listener=new Map,this._disposables=new le,this._onDidChange=new Je,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(),Ui(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,L3(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)}};MA=vG([Wb(0,si)],MA)});function qb(i,e,t,r){return RA(this,void 0,void 0,function*(){let o=t.ordered(i).map(a=>Promise.resolve(r(a,i,e)).then(void 0,l=>{Yt(l)})),s=yield Promise.all(o);return un(s.flat())})}function fh(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideDefinition(o,s,r))}function PA(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideDeclaration(o,s,r))}function OA(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideImplementation(o,s,r))}function FA(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideTypeDefinition(o,s,r))}function Kb(i,e,t,r,n){return qb(e,t,i,(o,s,a)=>RA(this,void 0,void 0,function*(){let l=yield o.provideReferences(s,a,{includeDeclaration:!0},n);if(!r||!l||l.length!==2)return l;let c=yield o.provideReferences(s,a,{includeDeclaration:!1},n);return c&&c.length===1?c:l}))}function $b(i){return RA(this,void 0,void 0,function*(){let e=yield i(),t=new Bn(e,""),r=t.references.map(n=>n.link);return t.dispose(),r})}var RA,kC=N(()=>{pi();Si();Vt();lt();Rt();Mp();RA=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Kn("_executeDefinitionProvider",(i,e,t)=>{let r=i.get(Se),n=fh(r.definitionProvider,e,t,st.None);return $b(()=>n)});Kn("_executeTypeDefinitionProvider",(i,e,t)=>{let r=i.get(Se),n=FA(r.typeDefinitionProvider,e,t,st.None);return $b(()=>n)});Kn("_executeDeclarationProvider",(i,e,t)=>{let r=i.get(Se),n=PA(r.declarationProvider,e,t,st.None);return $b(()=>n)});Kn("_executeReferenceProvider",(i,e,t)=>{let r=i.get(Se),n=Kb(r.referenceProvider,e,t,!1,st.None);return $b(()=>n)});Kn("_executeImplementationProvider",(i,e,t)=>{let r=i.get(Se),n=OA(r.implementationProvider,e,t,st.None);return $b(()=>n)})});var hs,Gb,Yb,Xb,EC,TC,IC,LC,AC,ph,fs,lc,DC,MC,NC,RC,zA,Qb=N(()=>{Eo();Ut();sl();Fr();Tr();vu();bk();lt();Tn();Tp();ci();et();ei();hn();AA();Mp();_G();L0();dh();He();Zi();Wi();wt();Ht();Ao();Vc();kC();Rt();Qh();sz();hs=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Xo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextPeek,title:b("peek.submenu","Peek"),group:"navigation",order:100});ph=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||Ie.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},fs=class i extends ra{static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(let r of Sn.wrap(t.menu))(r.id===Me.EditorContext||r.id===Me.EditorContextPeek)&&(r.when=fe.and(e.precondition,r.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,r,n){if(!t.hasModel())return Promise.resolve(void 0);let o=e.get(Mi),s=e.get(si),a=e.get(gl),l=e.get(Vb),c=e.get(Se),d=e.get(Ke),u=t.getModel(),h=t.getPosition(),f=ph.is(r)?r:new ph(u,h),m=new pa(t,5),g=Uc(this._getLocationModel(c,f.model,f.position,m.token),m.token).then(w=>hs(this,void 0,void 0,function*(){var _;if(!w||m.token.isCancellationRequested)return;sr(w.ariaMessage);let E;if(w.referenceAt(u.uri,h)){let L=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(L)&&i._allSymbolNavigationCommands.has(L)&&(E=i._allSymbolNavigationCommands.get(L))}let A=w.references.length;if(A===0){if(!this.configuration.muteMessage){let L=u.getWordAtPosition(h);(_=Vr.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(L),h)}}else if(A===1&&E)i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(L=>E.runEditorCommand(L,t,r,n).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,w,n)}),w=>{o.error(w)}).finally(()=>{m.dispose()});return a.showWhile(g,250),g}_onResult(e,t,r,n,o){return hs(this,void 0,void 0,function*(){let s=this._getGoToPreference(r);if(!(r instanceof Uo)&&(this.configuration.openInPeek||s==="peek"&&n.references.length>1))this._openInPeek(r,n,o);else{let a=n.firstReference(),l=n.references.length>1&&s==="gotoAndPeek",c=yield this._openReference(r,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,n,o):n.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,r,n,o){return hs(this,void 0,void 0,function*(){let s;if(HO(r)&&(s=r.targetSelectionRange),s||(s=r.range),!s)return;let a=yield t.openCodeEditor({resource:r.uri,options:{selection:B.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);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,r){let n=Ga.get(e);n&&e.hasModel()?n.toggleWidget(r!=null?r:e.getSelection(),Zt(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};fs._allSymbolNavigationCommands=new Map;fs._activeAlternativeCommands=new Set;lc=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield fh(e.definitionProvider,t,r,n),b("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?b("noResultWord","No definition found for '{0}'",e.word):b("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleDefinitions}};Ci((Gb=class extends lc{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Gb.id,title:{value:b("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:b({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:fe.and(F.hasDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:[{when:F.editorTextFocus,primary:70,weight:100},{when:fe.and(F.editorTextFocus,Tk),primary:2118,weight:100}],menu:[{id:Me.EditorContext,group:"navigation",order:1.1},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),At.registerCommandAlias("editor.action.goToDeclaration",Gb.id)}},Gb.id="editor.action.revealDefinition",Gb));Ci((Yb=class extends lc{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Yb.id,title:{value:b("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:fe.and(F.hasDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:[{when:F.editorTextFocus,primary:mi(2089,70),weight:100},{when:fe.and(F.editorTextFocus,Tk),primary:mi(2089,2118),weight:100}]}),At.registerCommandAlias("editor.action.openDeclarationToTheSide",Yb.id)}},Yb.id="editor.action.revealDefinitionAside",Yb));Ci((Xb=class extends lc{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Xb.id,title:{value:b("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:fe.and(F.hasDefinitionProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Me.EditorContextPeek,group:"peek",order:2}}),At.registerCommandAlias("editor.action.previewDeclaration",Xb.id)}},Xb.id="editor.action.peekDefinition",Xb));DC=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield PA(e.declarationProvider,t,r,n),b("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?b("decl.noResultWord","No declaration found for '{0}'",e.word):b("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(57).multipleDeclarations}};Ci((EC=class extends DC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:EC.id,title:{value:b("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:b({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:fe.and(F.hasDeclarationProvider,F.isInWalkThroughSnippet.toNegated()),menu:[{id:Me.EditorContext,group:"navigation",order:1.3},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?b("decl.noResultWord","No declaration found for '{0}'",e.word):b("decl.generic.noResults","No declaration found")}},EC.id="editor.action.revealDeclaration",EC));Ci(class extends DC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:b("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:fe.and(F.hasDeclarationProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:3}})}});MC=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield FA(e.typeDefinitionProvider,t,r,n),b("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?b("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):b("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleTypeDefinitions}};Ci((TC=class extends MC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:TC.ID,title:{value:b("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:b({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:fe.and(F.hasTypeDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:0,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.4},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},TC.ID="editor.action.goToTypeDefinition",TC));Ci((IC=class extends MC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:IC.ID,title:{value:b("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:fe.and(F.hasTypeDefinitionProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:4}})}},IC.ID="editor.action.peekTypeDefinition",IC));NC=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield OA(e.implementationProvider,t,r,n),b("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?b("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):b("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(57).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(57).multipleImplementations}};Ci((LC=class extends NC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:LC.ID,title:{value:b("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:b({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:fe.and(F.hasImplementationProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:2118,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.45},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},LC.ID="editor.action.goToImplementation",LC));Ci((AC=class extends NC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:AC.ID,title:{value:b("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:fe.and(F.hasImplementationProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:3142,weight:100},menu:{id:Me.EditorContextPeek,group:"peek",order:5}})}},AC.ID="editor.action.peekImplementation",AC));RC=class extends fs{_getNoResultFoundMessage(e){return e?b("references.no","No references found for '{0}'",e.word):b("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(57).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(57).multipleReferences}};Ci(class extends RC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:b("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:b({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:fe.and(F.hasReferenceProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:1094,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.45},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield Kb(e.referenceProvider,t,r,!0,n),b("ref.title","References"))})}});Ci(class extends RC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:b("references.action.label","Peek References"),original:"Peek References"},precondition:fe.and(F.hasReferenceProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield Kb(e.referenceProvider,t,r,!1,n),b("ref.title","References"))})}});zA=class extends fs{constructor(e,t,r){super(e,{id:"editor.action.goToLocation",title:{value:b("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:fe.and(Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=r}_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(this._references,b("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&b("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(57).multipleReferences}_getAlternativeCommand(){return""}};At.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:yt},{name:"position",description:"The position at which to start",constraint:Ie.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,r,n,o,s)=>hs(void 0,void 0,void 0,function*(){zt(yt.isUri(e)),zt(Ie.isIPosition(t)),zt(Array.isArray(r)),zt(typeof n=="undefined"||typeof n=="string"),zt(typeof s=="undefined"||typeof s=="boolean");let a=i.get(si),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(gk(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let d=new class extends zA{_getNoResultFoundMessage(u){return o||super._getNoResultFoundMessage(u)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},r,n);c.get(Ke).invokeFunction(d.run.bind(d),l)})})});At.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:yt},{name:"position",description:"The position at which to start",constraint:Ie.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,r,n)=>hs(void 0,void 0,void 0,function*(){i.get(vi).executeCommand("editor.action.goToLocations",e,t,r,n,void 0,!0)})});At.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{zt(yt.isUri(e)),zt(Ie.isIPosition(t));let r=i.get(Se),n=i.get(si);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(o=>{if(!gk(o)||!o.hasModel())return;let s=Ga.get(o);if(!s)return;let a=Zt(c=>Kb(r.referenceProvider,o.getModel(),Ie.lift(t),!1,c).then(d=>new Bn(d,b("ref.title","References")))),l=new B(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});At.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});var yG=N(()=>{});var wG=N(()=>{yG()});function BA(i,e){return!!i[e]}function xG(i){return i==="altKey"?kn?new Op(57,"metaKey",6,"altKey"):new Op(5,"ctrlKey",6,"altKey"):kn?new Op(6,"altKey",57,"metaKey"):new Op(6,"altKey",5,"ctrlKey")}var Zb,PC,Op,Ya,Jb=N(()=>{Jt();ke();En();Zb=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=BA(e.event,t.triggerModifier),this.hasSideBySideModifier=BA(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},PC=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=BA(e,t.triggerModifier)}},Op=class{constructor(e,t,r,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=r,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};Ya=class extends ce{constructor(e,t){var r;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Je),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Je),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Je),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(r=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&r!==void 0?r:n=>n.target.position?n.target.position.lineNumber:0,this._opts=xG(this._editor.getOption(76)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(76)){let o=xG(this._editor.getOption(76));if(this._opts.equals(o))return;this._opts=o,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new Zb(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new Zb(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new Zb(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new PC(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new PC(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=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){let t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&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 ybe,HA,CG,e1,zd,OC=N(()=>{Ut();Vt();Ss();ke();wG();vu();lt();et();Zo();ta();Jb();dh();He();wt();Qb();kC();Rt();Hr();ybe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},HA=function(i,e){return function(t,r){e(t,r,i)}},CG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},zd=e1=class{constructor(e,t,r,n){this.textModelResolverService=t,this.languageService=r,this.languageFeaturesService=n,this.toUnhook=new le,this.toUnhookForKeyboard=new le,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new Ya(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,a!=null?a:void 0)})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{ft(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(e1.ID)}startFindDefinitionFromCursor(e){return CG(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 r=e.target.position;this.startFindDefinition(r)}startFindDefinition(e){var t;return CG(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();let r=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!r){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===r.startColumn&&this.currentWordAtPosition.endColumn===r.endColumn&&this.currentWordAtPosition.word===r.word)return;this.currentWordAtPosition=r;let n=new S_(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Zt(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){ft(a);return}if(!o||!o.length||!n.validate(this.editor)){this.removeLinkDecorations();return}let s=o[0].originSelectionRange?B.lift(o[0].originSelectionRange):new B(e.lineNumber,r.startColumn,e.lineNumber,r.endColumn);if(o.length>1){let a=s;for(let{originSelectionRange:l}of o)l&&(a=B.plusRange(a,l));this.addDecoration(a,new Ki().appendText(b("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 Ki().appendCodeblock(h||"",u):void 0),l.dispose()})}})}getPreviewValue(e,t,r){let n=r.range;return n.endLineNumber-n.startLineNumber>=e1.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,r){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<r.endLineNumber;a++){let l=e.getLineFirstNonWhitespaceColumn(a);o=Math.min(o,l)}return e.getValueInRange(r).replace(new RegExp(`^\\s{${o-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){let r=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+e1.MAX_SOURCE_PREVIEW_LINES),o=t+1;for(;o<n;o++){let s=e.getLineFirstNonWhitespaceColumn(o);if(r===s)break}return new B(t,1,o+1,1)}addDecoration(e,t){let r={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([r])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var r;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((r=e.target.detail.injectedText)===null||r===void 0?void 0:r.options)instanceof vf)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let r=this.editor.getModel();return r?fh(this.languageFeaturesService.definitionProvider,r,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(r=>{let n=!t&&this.editor.getOption(86)&&!this.isInPeekEditor(r);return new lc({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(r)})}isInPeekEditor(e){let t=e.get(it);return Rr.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};zd.ID="editor.contrib.gotodefinitionatposition";zd.MAX_SOURCE_PREVIEW_LINES=8;zd=e1=ybe([HA(1,xr),HA(2,Ji),HA(3,Se)],zd);Ue(zd.ID,zd,2)});var SG,FC,zC,UA,WA,jA,kG=N(()=>{pi();Jt();ke();H9();Di();Tr();et();dl();Ht();R_();Cr();SG=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},FC=function(i,e){return function(t,r){e(t,r,i)}},zC=class{constructor(e,t,r){this.marker=e,this.index=t,this.total=r}},UA=class{constructor(e,t,r){this._markerService=t,this._configService=r,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._dispoables=new le,this._markers=[],this._nextIdx=-1,yt.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let n=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=O3(a.resource.toString(),l.resource.toString());return c===0&&(n==="position"?c=B.compareRangesUsingStarts(a,l)||Lr.compare(a.severity,l.severity):c=Lr.compare(a.severity,l.severity)||B.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:yt.isUri(e)?e:void 0,severities:Lr.Error|Lr.Warning|Lr.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 zC(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,r){let n=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=hu(this._markers,{resource:e.uri},(s,a)=>O3(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;s<this._markers.length;s++){let a=B.lift(this._markers[s]);if(a.isEmpty()){let l=e.getWordAtPosition(a.getStartPosition());l&&(a=new B(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=s,n=!0;break}if(this._markers[s].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=r?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,r){if(this._markers.length===0)return!1;let n=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,r,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let r=this._markers.findIndex(n=>n.resource.toString()===e.toString());if(!(r<0)){for(;r<this._markers.length;r++)if(B.containsPosition(this._markers[r],t))return new zC(this._markers[r],r+1,this._markers.length)}}};UA=SG([FC(1,ig),FC(2,Dt)],UA);WA=Xr("IMarkerNavigationService"),jA=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new Pv}getMarkerList(e){for(let t of this._provider){let r=t.getMarkerList(e);if(r)return r}return new UA(e,this._markerService,this._configService)}};jA=SG([FC(0,ig),FC(1,Dt)],jA);Jr(WA,jA,1)});var EG=N(()=>{});var TG=N(()=>{EG()});var IG=N(()=>{});var LG=N(()=>{IG()});var BC,AG=N(()=>{LG();Qr();In();Dre();(function(i){function e(t){switch(t){case Jm.Ignore:return"severity-ignore "+_t.asClassName(pt.info);case Jm.Info:return _t.asClassName(pt.info);case Jm.Warning:return _t.asClassName(pt.warning);case Jm.Error:return _t.asClassName(pt.error);default:return""}}i.className=e})(BC||(BC={}))});var wbe,Fp,VA,qA,mh,DG,MG,NG,KA,xbe,HC,Cbe,$A,Sbe,kbe,RG=N(()=>{Bt();A_();pi();aa();Jt();ke();Io();Di();TG();et();dh();He();X_();Zi();wt();Ht();Q_();R_();es();AG();en();tn();wbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Fp=function(i,e){return function(t,r){e(t,r,i)}},qA=class{constructor(e,t,r,n,o){this._openerService=n,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new le,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(ko(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&r(l)})),this._scrollable=new hF(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(){Ui(this._disposables)}update(e){let{source:t,message:r,relatedInformation:n,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=du(r);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);Vn(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 f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){let f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=Le("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 f=Te(this._codeLink,Le("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(Vn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),qi(n)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(65)*.66)}px`,this._lines+=1;for(let f of n){let m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,g.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(g,f);let w=document.createElement("span");w.innerText=f.message,m.appendChild(g),m.appendChild(w),this._lines+=1,h.appendChild(m)}}let c=this._editor.getOption(49),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 Lr.Error:t=b("Error","Error");break;case Lr.Warning:t=b("Warning","Warning");break;case Lr.Info:t=b("Info","Info");break;case Lr.Hint:t=b("Hint","Hint");break}let r=b("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(r=`${n.getLineContent(e.startLineNumber)}, ${r}`),r}},mh=VA=class extends Dp{constructor(e,t,r,n,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=r,this._menuService=n,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new le,this._onDidSelectRelatedInformation=new Je,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Lr.Warning,this._backgroundColor=vt.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(kbe);let t=KA,r=xbe;this._severity===Lr.Warning?(t=HC,r=Cbe):this._severity===Lr.Info&&(t=$A,r=Sbe);let n=e.getColor(t),o=e.getColor(r);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor(hC),secondaryHeadingColor:e.getColor(fC)})}_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(n=>this.editor.focus()));let t=[],r=this._menuService.createMenu(VA.TitleMenu,this._contextKeyService);G_(r,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),r.dispose()}_fillTitleIcon(e){this._icon=Te(e,Le(""))}_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 qA(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,r){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let n=B.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=r>1?b("problems","{0} of {1} problems",t,r):b("change","{0} of {1} problem",t,r);this.setTitle(An(a.uri),l)}this._icon.className=`codicon ${BC.className(Lr.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()}};mh.TitleMenu=new Me("gotoErrorTitleMenu");mh=VA=wbe([Fp(1,gr),Fp(2,er),Fp(3,xs),Fp(4,Ke),Fp(5,it),Fp(6,kl)],mh);DG=g_(fO,pO),MG=g_(mO,gO),NG=g_(Bm,bO),KA=je("editorMarkerNavigationError.background",{dark:DG,light:DG,hcDark:Jo,hcLight:Jo},b("editorMarkerNavigationError","Editor marker navigation widget error color.")),xbe=je("editorMarkerNavigationError.headerBackground",{dark:Mn(KA,.1),light:Mn(KA,.1),hcDark:null,hcLight:null},b("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),HC=je("editorMarkerNavigationWarning.background",{dark:MG,light:MG,hcDark:Jo,hcLight:Jo},b("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Cbe=je("editorMarkerNavigationWarning.headerBackground",{dark:Mn(HC,.1),light:Mn(HC,.1),hcDark:"#0C141F",hcLight:Mn(HC,.2)},b("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),$A=je("editorMarkerNavigationInfo.background",{dark:NG,light:NG,hcDark:Jo,hcLight:Jo},b("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Sbe=je("editorMarkerNavigationInfo.headerBackground",{dark:Mn($A,.1),light:Mn($A,.1),hcDark:null,hcLight:null},b("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),kbe=je("editorMarkerNavigation.background",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},b("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var Ebe,UC,PG,t1,cc,zp,gh,i1,GA,YA,OG,Tbe,jC=N(()=>{Qr();ke();lt();Tn();ci();et();ei();kG();He();Zi();wt();Ht();xl();RG();Ebe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},UC=function(i,e){return function(t,r){e(t,r,i)}},PG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},cc=t1=class{static get(e){return e.getContribution(t1.ID)}constructor(e,t,r,n,o){this._markerNavigationService=t,this._contextKeyService=r,this._editorService=n,this._instantiationService=o,this._sessionDispoables=new le,this._editor=e,this._widgetVisible=OG.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(mh,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(r=>{var n,o,s;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!B.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,r.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 r=this._model.find(this._editor.getModel().uri,this._widget.position);r?this._widget.updateMarker(r.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(r=>{this._editorService.openCodeEditor({resource:r.resource,options:{pinned:!0,revealIfOpened:!0,selection:B.lift(r).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 Ie(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var r,n;return PG(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&&((r=t1.get(s))===null||r===void 0||r.close(),(n=t1.get(s))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};cc.ID="editor.contrib.markerController";cc=t1=Ebe([UC(1,WA),UC(2,it),UC(3,si),UC(4,Ke)],cc);zp=class extends de{constructor(e,t,r){super(r),this._next=e,this._multiFile=t}run(e,t){var r;return PG(this,void 0,void 0,function*(){t.hasModel()&&((r=cc.get(t))===null||r===void 0||r.nagivate(this._next,this._multiFile))})}},gh=class i extends zp{constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:578,weight:100},menuOpts:{menuId:mh.TitleMenu,title:i.LABEL,icon:Ni("marker-navigation-next",pt.arrowDown,b("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};gh.ID="editor.action.marker.next";gh.LABEL=b("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");i1=class i extends zp{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:1602,weight:100},menuOpts:{menuId:mh.TitleMenu,title:i.LABEL,icon:Ni("marker-navigation-previous",pt.arrowUp,b("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};i1.ID="editor.action.marker.prev";i1.LABEL=b("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");GA=class extends zp{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:b("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:F.focus,primary:66,weight:100},menuOpts:{menuId:Me.MenubarGoMenu,title:b({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},YA=class extends zp{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:b("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:F.focus,primary:1090,weight:100},menuOpts:{menuId:Me.MenubarGoMenu,title:b({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Ue(cc.ID,cc,4);ee(gh);ee(i1);ee(GA);ee(YA);OG=new ht("markersNavigationVisible",!1),Tbe=Oi.bindToContribution(cc.get);We(new Tbe({id:"closeMarkersNavigation",precondition:OG,handler:i=>i.close(),kbOpts:{weight:100+50,kbExpr:F.focus,primary:9,secondary:[1033]}}))});var FG=N(()=>{});var zG=N(()=>{FG()});function BG(i,e){return i&&e?b("acessibleViewHint","Inspect this in the accessible view with {0}.",e):i?b("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var WC,Bp,VC,XA=N(()=>{Bt();X9();A_();ke();zG();He();WC=Le,Bp=class extends ce{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 wf(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},VC=class i extends ce{static render(e,t,r){return new i(e,t,r)}constructor(e,t,r){super(),this.actionContainer=Te(e,WC("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Te(this.actionContainer,WC("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Te(this.action,WC(`span.icon.${t.iconClass}`));let n=Te(this.action,WC("span"));n.textContent=r?`${t.label} (${r})`:t.label,this._register(Lt(this.actionContainer,gi.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(Lt(this.actionContainer,gi.KEY_DOWN,o=>{let s=new Hv(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 Ibe,Lbe,QA,Hp,ZA=N(()=>{Ut();Vt();Jt();ke();Ibe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Lbe=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={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),n(a,l,s.done,s.value)})}}function n(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},QA=class{constructor(e,t,r){this.value=e,this.isComplete=t,this.hasLoadingMessage=r}},Hp=class extends ce{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Je),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new di(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new di(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new di(()=>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(59).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=eO(e=>this._computer.computeAsync(e)),Ibe(this,void 0,void 0,function*(){var e,t,r,n;try{try{for(var o=!0,s=Lbe(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){n=a.value,o=!1;let l=n;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(r=s.return)&&(yield r.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){ft(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 QA(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)}}});var Abe,Dbe,qC,HG=N(()=>{Y2();ke();ci();Bt();Abe=30,Dbe=24,qC=class extends ce{constructor(e,t=new Xt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new Nd),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Xt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(r=>{this._resize(new Xt(r.dimension.width,r.dimension.height)),r.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?Ie.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){let t=this._editor.getDomNode(),r=this._editor.getScrolledVisiblePosition(e);return!t||!r?void 0:Qi(t).top+r.top-Abe}_availableVerticalSpaceBelow(e){let t=this._editor.getDomNode(),r=this._editor.getScrolledVisiblePosition(e);if(!t||!r)return;let n=Qi(t),o=Nc(document.body),s=n.top+r.top+r.height;return o.height-s-Dbe}_findPositionPreference(e,t){var r,n;let o=Math.min((r=this._availableVerticalSpaceBelow(t))!==null&&r!==void 0?r:1/0,e),s=Math.min((n=this._availableVerticalSpaceAbove(t))!==null&&n!==void 0?n:1/0,e),a=Math.min(Math.max(s,o),e),l=Math.min(e,a),c;return this._editor.getOption(59).above?c=l<=s?1:2:c=l<=o?2:1,c===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),c}_resize(e){this._resizableNode.layout(e.height,e.width)}}});function WG(i,e,t,r,n,o){let s=t+n/2,a=r+o/2,l=Math.max(Math.abs(i-s)-n/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}var r8,bh,KC,Xa,UG,r1,$C,e8,t8,jG,JA,Mbe,dc,n1,i8,n8=N(()=>{Bt();XA();pi();ke();ci();et();Hr();hn();ZA();ec();Ht();Ur();Ut();ei();wt();HG();Cr();$_();r8=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},bh=function(i,e){return function(t,r){e(t,r,i)}},UG=Le,r1=KC=class extends ce{constructor(e,t,r){super(),this._editor=e,this._instantiationService=t,this._keybindingService=r,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(dc,this._editor)),this._participants=[];for(let n of Bo.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,o)=>n.hoverOrdinal-o.hoverOrdinal),this._computer=new i8(this._editor,this._participants),this._hoverOperation=this._register(new Hp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{if(!this._computer.anchor)return;let o=n.hasLoadingMessage?this._addLoadingMessage(n.value):n.value;this._withResult(new $C(this._computer.anchor,o,n.isComplete))})),this._register(ko(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(bf.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;let t=[];for(let n of this._participants)if(n.suggestHoverAnchor){let o=n.suggestHoverAnchor(e);o&&t.push(o)}let r=e.target;if(r.type===6&&t.push(new mp(0,r.range,e.event.posx,e.event.posy)),r.type===7){let n=this._editor.getOption(49).typicalHalfwidthCharacterWidth/2;!r.detail.isAfterLines&&typeof r.detail.horizontalDistanceToText=="number"&&r.detail.horizontalDistanceToText<n&&t.push(new mp(0,r.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((n,o)=>o.priority-n.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,r,n){this._startShowingOrUpdateHover(new mp(0,e,void 0,void 0),t,r,n,null)}_startShowingOrUpdateHover(e,t,r,n,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,r,n,!1),!0):!1:this._editor.getOption(59).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,r,n,!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,r,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,r,n,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,r,n,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=r,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)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}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 r=t.createLoadingMessage(this._computer.anchor);if(r)return e.slice(0).concat([r])}}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:r,showAtSecondaryPosition:n,highlightRange:o}=KC.computeHoverRanges(this._editor,e.range,t),s=new le,a=s.add(new n1(this._keybindingService)),l=document.createDocumentFragment(),c=null,d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(let h of this._participants){let f=t.filter(m=>m.owner===h);f.length>0&&s.add(h.renderHoverParts(d,f))}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:KC._DECORATION_OPTIONS}]),s.add(ii(()=>{h.clear()}))}this._widget.showAt(l,new t8(c,r,n,this._editor.getOption(59).above,this._computer.shouldFocus,this._computer.source,u,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,r){let n=1;if(e.hasModel()){let c=e._getViewModel(),d=c.coordinatesConverter,u=d.convertModelRangeToViewRange(t),h=new Ie(u.startLineNumber,c.getLineMinColumn(u.startLineNumber));n=d.convertViewPositionToModelPosition(h).column}let o=t.startLineNumber,s=t.startColumn,a=r[0].range,l=null;for(let c of r)a=B.plusRange(a,c.range),c.range.startLineNumber===o&&c.range.endLineNumber===o&&(s=Math.max(Math.min(s,c.range.startColumn),n)),c.forceShowAtRange&&(l=c.range);return{showAtPosition:l?l.getStartPosition():new Ie(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new Ie(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()}};r1._DECORATION_OPTIONS=mt.register({description:"content-hover-highlight",className:"hoverHighlight"});r1=KC=r8([bh(1,Ke),bh(2,qt)],r1);$C=class{constructor(e,t,r){this.anchor=e,this.messages=t,this.isComplete=r}filter(e){let t=this.messages.filter(r=>r.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new e8(this,this.anchor,t,this.isComplete)}},e8=class extends $C{constructor(e,t,r,n){super(t,r,n),this.original=e}filter(e){return this.original.filter(e)}},t8=class{constructor(e,t,r,n,o,s,a,l,c,d){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=r,this.preferAbove=n,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=c,this.disposables=d,this.closestMouseDistance=void 0}},jG=30,JA=10,Mbe=6,dc=Xa=class extends qC{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}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,r,n,o){let s=e.getOption(65)+8,a=150,l=new Xt(a,s);super(e,l),this._configurationService=r,this._accessibilityService=n,this._keybindingService=o,this._hover=this._register(new Bp),this._minimumSize=l,this._hoverVisibleKey=F.hoverVisible.bindTo(t),this._hoverFocusedKey=F.hoverFocused.bindTo(t),Te(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(49)&&this._updateFont()}));let c=this._register(ys(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Xa.ID}static _applyDimensions(e,t,r){let n=typeof t=="number"?`${t}px`:t,o=typeof r=="number"?`${r}px`:r;e.style.width=n,e.style.height=o}_setContentsDomNodeDimensions(e,t){let r=this._hover.contentsDomNode;return Xa._applyDimensions(r,e,t)}_setContainerDomNodeDimensions(e,t){let r=this._hover.containerDomNode;return Xa._applyDimensions(r,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,r){let n=typeof t=="number"?`${t}px`:t,o=typeof r=="number"?`${r}px`:r;e.style.maxWidth=n,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){Xa._applyMaxDimensions(this._hover.contentsDomNode,e,t),Xa._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){let e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){let e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");let t=e.width,r=e.height;this._setHoverWidgetDimensions(t,r),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,r-JA))}_updateResizableNodeMaxDimensions(){var e,t;let r=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,n=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new Xt(r,n),this._setHoverWidgetMaxDimensions(r,n)}_resize(e){var t,r;Xa._lastDimensions=new Xt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(r=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||r===void 0||r.layout()}_findAvailableSpaceVertically(){var e;let t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){let e=this._findAvailableSpaceVertically();if(!e)return;let t=Mbe;return Array.from(this._hover.contentsDomNode.children).forEach(r=>{t+=r.clientHeight}),this._hasHorizontalScrollbar()&&(t+=JA),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");let e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;let e=this._isHoverTextOverflowing(),t=typeof this._contentWidth=="undefined"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<t?Nc(document.body).width-14:this._hover.containerDomNode.clientWidth+2}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 r=Qi(this.getDomNode());typeof this._visibleData.closestMouseDistance=="undefined"&&(this._visibleData.closestMouseDistance=WG(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,r.left,r.top,r.width,r.height));let n=WG(e,t,r.left,r.top,r.width,r.height);return n>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){let{fontSize:e,lineHeight:t}=this._editor.getOption(49),r=this._hover.contentsDomNode;r.style.fontSize=`${e}px`,r.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){let t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){let e=Math.max(this._editor.getLayoutInfo().height/4,250,Xa._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Xa._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var r,n,o,s;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);let a=Lm(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(r=this._findPositionPreference(a,l))!==null&&r!==void 0?r:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout();let c=BG(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(s=(o=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||o===void 0?void 0:o.getAriaLabel())!==null&&s!==void 0?s:"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._visibleData)return;let e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Xt(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){let e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;let r=this._hover.containerDomNode,n=this._hover.contentsDomNode,o=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(qn(r),Math.min(o,e)),this._setContentsDomNodeDimensions(qn(n),Math.min(o,e-JA))}setMinimumDimensions(e){this._minimumSize=new Xt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){let e=typeof this._contentWidth=="undefined"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Xt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();let t=this._hover.containerDomNode,r=Lm(t),n=qn(t);if(this._resizableNode.layout(r,n),this._setHoverWidgetDimensions(n,r),r=Lm(t),n=qn(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(r,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(r)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){let o=Lm(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(o,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-jG})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+jG})}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})}};dc.ID="editor.contrib.resizableContentHoverWidget";dc._lastDimensions=new Xt(0,0);dc=Xa=r8([bh(1,it),bh(2,Dt),bh(3,Cf),bh(4,qt)],dc);n1=class extends ce{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=UG("div.hover-row.status-bar"),this.actionsElement=Te(this.hoverElement,UG("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),r=t?t.getLabel():null;return this._hasContent=!0,this._register(VC.render(this.actionsElement,e,r))}append(e){let t=Te(this.actionsElement,e);return this._hasContent=!0,t}};n1=r8([bh(0,qt)],n1);i8=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 r=e.getModel(),n=t.range.startLineNumber;if(n>r.getLineCount())return[];let o=r.getLineMaxColumn(n);return e.getLineDecorations(n).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===n?s.range.startColumn:1,l=s.range.endLineNumber===n?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 Dn.EMPTY;let r=i._getLineDecorations(this._editor,t);return Dn.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,r,e):Dn.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let r of this._participants)t=t.concat(r.computeSync(this._anchor,e));return un(t)}}});var VG,vh,o8,qG=N(()=>{Bt();pi();Ss();ke();xd();ZA();XA();VG=Le,vh=class i extends ce{constructor(e,t,r){super(),this._renderDisposeables=this._register(new le),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new Bp),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new eo({editor:this._editor},t,r)),this._computer=new o8(this._editor),this._hoverOperation=this._register(new Hp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(49)&&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 r=document.createDocumentFragment();for(let n of t){let o=VG("div.hover-row.markdown-hover"),s=Te(o,VG("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));s.appendChild(a.element),r.appendChild(o)}this._updateContents(r),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(),r=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(65),s=this._hover.containerDomNode.clientHeight,a=r-n-(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`}};vh.ID="editor.contrib.modesGlyphHoverWidget";o8=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){let e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),r=[];if(!t)return r;for(let n of t){if(!n.options.glyphMarginClassName)continue;let o=n.options.glyphMarginHoverMessage;!o||Hc(o)||r.push(...Zv(o).map(e))}return r}}});function Rbe(i,e,t,r,n){return Nbe(this,void 0,void 0,function*(){try{let o=yield Promise.resolve(i.provideHover(t,r,n));if(o&&Obe(o))return new s8(i,o,e)}catch(o){Yt(o)}})}function o1(i,e,t,r){let o=i.ordered(e).map((s,a)=>Rbe(s,a,e,t,r));return Dn.fromPromises(o).coalesce()}function Pbe(i,e,t,r){return o1(i,e,t,r).map(n=>n.hover).toPromise()}function Obe(i){let e=typeof i.range!="undefined",t=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return e&&t}var Nbe,s8,a8=N(()=>{Ut();Si();Vt();lt();Rt();Nbe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},s8=class{constructor(e,t,r){this.provider=e,this.hover=t,this.ordinal=r}};Kn("_executeHoverProvider",(i,e,t)=>{let r=i.get(Se);return Pbe(r.hoverProvider,e,t,st.None)})});function l8(i,e,t,r,n){e.sort((s,a)=>s.ordinal-a.ordinal);let o=new le;for(let s of e)for(let a of s.contents){if(Hc(a))continue;let l=KG("div.hover-row.markdown-hover"),c=Te(l,KG("div.hover-contents")),d=o.add(new eo({editor:t},r,n));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 Fbe,GC,KG,io,Up,YC=N(()=>{Bt();pi();Ut();Ss();ke();xd();ci();et();Zo();a8();He();Cr();es();Rt();Fbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},GC=function(i,e){return function(t,r){e(t,r,i)}},KG=Le,io=class{constructor(e,t,r,n,o){this.owner=e,this.range=t,this.contents=r,this.isBeforeContent=n,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Up=class{constructor(e,t,r,n,o){this._editor=e,this._languageService=t,this._openerService=r,this._configurationService=n,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new io(this,e.range,[new Ki().appendText(b("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let r=this._editor.getModel(),n=e.range.startLineNumber,o=r.getLineMaxColumn(n),s=[],a=1e3,l=r.getLineLength(n),c=r.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(115),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;d>=0&&l>d&&e.range.startColumn>=d&&(h=!0,s.push(new io(this,e.range,[{value:b("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 io(this,e.range,[{value:b("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(let m of t){let g=m.range.startLineNumber===n?m.range.startColumn:1,w=m.range.endLineNumber===n?m.range.endColumn:o,_=m.options.hoverMessage;if(!_||Hc(_))continue;m.options.beforeContentClassName&&(f=!0);let E=new B(e.range.startLineNumber,g,e.range.startLineNumber,w);s.push(new io(this,E,Zv(_),f,a++))}return s}computeAsync(e,t,r){if(!this._editor.hasModel()||e.type!==1)return Dn.EMPTY;let n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return Dn.EMPTY;let o=new Ie(e.range.startLineNumber,e.range.startColumn);return o1(this._languageFeaturesService.hoverProvider,n,o,r).filter(s=>!Hc(s.hover.contents)).map(s=>{let a=s.hover.range?B.lift(s.hover.range):e.range;return new io(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return l8(e,t,this._editor,this._languageService,this._openerService)}};Up=Fbe([GC(1,Ji),GC(2,er),GC(3,Dt),GC(4,Se)],Up)});var zbe,c8,ps,d8,$G,XC,GG=N(()=>{Bt();pi();Ut();Vt();ke();Io();et();Rt();Xre();Vu();Rx();wd();jC();He();R_();es();Vc();zbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},c8=function(i,e){return function(t,r){e(t,r,i)}},ps=Le,d8=class{constructor(e,t,r){this.owner=e,this.range=t,this.marker=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},$G={type:1,filter:{include:nt.QuickFix},triggerAction:Wr.QuickFixHover},XC=class{constructor(e,t,r,n){this._editor=e,this._markerDecorationsService=t,this._openerService=r,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let r=this._editor.getModel(),n=e.range.startLineNumber,o=r.getLineMaxColumn(n),s=[];for(let a of t){let l=a.range.startLineNumber===n?a.range.startColumn:1,c=a.range.endLineNumber===n?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(r.uri,a);if(!d)continue;let u=new B(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new d8(this,u,d))}return s}renderHoverParts(e,t){if(!t.length)return ce.None;let r=new le;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,r)));let n=t.length===1?t[0]:t.sort((o,s)=>Lr.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,n,r),r}renderMarkerHover(e,t){let r=ps("div.hover-row"),n=Te(r,ps("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);let c=Te(n,ps("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=ps("span");if(o){let m=Te(d,ps("span"));m.innerText=o}let u=Te(d,ps("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(Lt(u,"click",m=>{this._openerService.open(a.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));let h=Te(u,ps("span"));h.innerText=a.value;let f=Te(n,d);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{let d=Te(n,ps("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(qi(l))for(let{message:d,resource:u,startLineNumber:h,startColumn:f}of l){let m=Te(n,ps("div"));m.style.marginTop="8px";let g=Te(m,ps("a"));g.innerText=`${An(u)}(${h}, ${f}): `,g.style.cursor="pointer",t.add(Lt(g,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:f}}}).catch(ft)}));let w=Te(m,ps("span"));w.innerText=d,this._editor.applyFontInfo(w)}return r}renderMarkerStatusbar(e,t,r){if((t.marker.severity===Lr.Error||t.marker.severity===Lr.Warning||t.marker.severity===Lr.Info)&&e.statusBar.addAction({label:b("view problem","View Problem"),commandId:gh.ID,run:()=>{var n;e.hide(),(n=cc.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(89)){let n=e.statusBar.append(ps("div"));this.recentMarkerCodeActionsInfo&&(uk.makeKey(this.recentMarkerCodeActionsInfo.marker)===uk.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=b("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ce.None:r.add(fl(()=>n.textContent=b("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=String.fromCharCode(160));let s=this.getCodeActions(t.marker);r.add(ii(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=b("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;r.add(ii(()=>{l||a.dispose()})),e.statusBar.addAction({label:b("quick fixes","Quick Fix..."),commandId:Jf,run:c=>{l=!0;let d=za.get(this._editor),u=Qi(c);e.hide(),d==null||d.showCodeActions($G,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},ft)}}getCodeActions(e){return Zt(t=>E0(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new B(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),$G,ma.None,t))}};XC=zbe([c8(1,XF),c8(2,er),c8(3,Se)],XC)});var YG=N(()=>{});var XG=N(()=>{YG()});var Bbe,QC,u8,ZC,_n,h8,f8,p8,m8,g8,b8,v8,_8,y8,w8,JC=N(()=>{sl();ke();lt();et();ei();Zo();OC();n8();qG();Ht();es();en();tn();ec();YC();GG();O2();Ur();He();XG();Bbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},QC=function(i,e){return function(t,r){e(t,r,i)}},ZC=!1,_n=u8=class{static get(e){return e.getContribution(u8.ID)}constructor(e,t,r,n,o){this._editor=e,this._instantiationService=t,this._openerService=r,this._languageService=n,this._keybindingService=o,this._toUnhook=new le,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(59)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){let e=()=>this._hideWidgets(),t=this._editor.getOption(59);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(r=>this._onEditorMouseDown(r))),this._toUnhook.add(this._editor.onMouseUp(r=>this._onEditorMouseUp(r))),this._toUnhook.add(this._editor.onMouseMove(r=>this._onEditorMouseMove(r))),this._toUnhook.add(this._editor.onKeyDown(r=>this._onKeyDown(r)))):(this._toUnhook.add(this._editor.onMouseMove(r=>this._onEditorMouseMove(r))),this._toUnhook.add(this._editor.onKeyDown(r=>this._onKeyDown(r)))),this._toUnhook.add(this._editor.onMouseLeave(r=>this._onEditorMouseLeave(r))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(r=>this._onEditorScrollChanged(r)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;let r=e.target;if(r.type===9&&r.detail===dc.ID){this._hoverClicked=!0;return}r.type===12&&r.detail===vh.ID||(r.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,r;let n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((r=this._contentWidget)===null||r===void 0)&&r.containsNode(n)||ZC||this._hideWidgets()}_onEditorMouseMove(e){var t,r,n,o,s,a,l,c,d,u,h;let f=e.target;if(!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((r=this._contentWidget)===null||r===void 0)&&r.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&f.type===9&&f.detail===dc.ID||this._isHoverSticky&&(!((n=this._contentWidget)===null||n===void 0)&&n.containsNode((o=e.event.browserEvent.view)===null||o===void 0?void 0:o.document.activeElement))&&!(!((a=(s=e.event.browserEvent.view)===null||s===void 0?void 0:s.getSelection())===null||a===void 0)&&a.isCollapsed)||!this._isHoverSticky&&f.type===9&&f.detail===dc.ID&&(!((l=this._contentWidget)===null||l===void 0)&&l.isColorPickerVisible)||this._isHoverSticky&&f.type===12&&f.detail===vh.ID||this._isHoverSticky&&(!((c=this._contentWidget)===null||c===void 0)&&c.isVisibleFromKeyboard))return;let m=(d=f.element)===null||d===void 0?void 0:d.classList.contains("colorpicker-color-decoration"),g=this._editor.getOption(145);if(m&&(g==="click"&&!this._hoverActivatedByColorDecoratorClick||g==="hover"&&!this._isHoverEnabled&&!ZC||g==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!m&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(u=this._glyphWidget)===null||u===void 0||u.hide();return}if(f.type===2&&f.position){(h=this._contentWidget)===null||h===void 0||h.hide(),this._glyphWidget||(this._glyphWidget=new vh(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(f.position.lineNumber);return}ZC||this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;let r=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=r.kind===1||r.kind===2&&r.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&&!n&&this._hideWidgets()}_hideWidgets(){var e,t,r;ZC||this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Ws.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(r=this._contentWidget)===null||r===void 0||r.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(r1,this._editor)),this._contentWidget}showContentHover(e,t,r,n,o=!1){this._hoverActivatedByColorDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,r,n)}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()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get 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()}};_n.ID="editor.contrib.hover";_n=u8=Bbe([QC(1,Ke),QC(2,er),QC(3,Ji),QC(4,qt)],_n);h8=class extends de{constructor(){super({id:"editor.action.showHover",label:b({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:F.editorTextFocus,primary:mi(2089,2087),weight:100}})}run(e,t,r){if(!t.hasModel())return;let n=_n.get(t);if(!n)return;let o=t.getPosition(),s=new B(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(r!=null&&r.focus);n.isHoverVisible?n.focus():n.showContentHover(s,1,1,a)}},f8=class extends de{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:b({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 r=_n.get(t);if(!r)return;let n=t.getPosition();if(!n)return;let o=new B(n.lineNumber,n.column,n.lineNumber,n.column),s=zd.get(t);if(!s)return;s.startFindDefinitionFromCursor(n).then(()=>{r.showContentHover(o,1,1,!0)})}},p8=class extends de{constructor(){super({id:"editor.action.scrollUpHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:16,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollUp()}},m8=class extends de{constructor(){super({id:"editor.action.scrollDownHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:18,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollDown()}},g8=class extends de{constructor(){super({id:"editor.action.scrollLeftHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:15,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollLeft()}},b8=class extends de{constructor(){super({id:"editor.action.scrollRightHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:17,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollRight()}},v8=class extends de{constructor(){super({id:"editor.action.pageUpHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){let r=_n.get(t);r&&r.pageUp()}},_8=class extends de{constructor(){super({id:"editor.action.pageDownHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){let r=_n.get(t);r&&r.pageDown()}},y8=class extends de{constructor(){super({id:"editor.action.goToTopHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){let r=_n.get(t);r&&r.goToTop()}},w8=class extends de{constructor(){super({id:"editor.action.goToBottomHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){let r=_n.get(t);r&&r.goToBottom()}};Ue(_n.ID,_n,2);ee(h8);ee(f8);ee(p8);ee(m8);ee(g8);ee(b8);ee(v8);ee(_8);ee(y8);ee(w8);Bo.register(Up);Bo.register(XC);mf((i,e)=>{let t=i.getColor(TO);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 yn(i,e){let t=0;for(let r=0;r<i.length;r++)i.charAt(r)===" "?t+=e:t++;return t}function _h(i,e,t){i=i<0?0:i;let r="";if(!t){let n=Math.floor(i/e);i=i%e;for(let o=0;o<n;o++)r+=" "}for(let n=0;n<i;n++)r+=" ";return r}var x8=N(()=>{});function ZG(i,e,t,r,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let o=e.getLanguageConfiguration(i.getLanguageId()).indentationRules;if(!o)return[];for(r=Math.min(r,i.getLineCount());t<=r&&o.unIndentedLinePattern;){let w=i.getLineContent(t);if(!o.unIndentedLinePattern.test(w))break;t++}if(t>r-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(w,_)=>(_=_||1,Bc.shiftIndent(w,w.length+_,s,a,l)),d=(w,_)=>(_=_||1,Bc.unshiftIndent(w,w.length+_,s,a,l)),u=[],h,f=i.getLineContent(t),m=f;if(n!=null){h=n;let w=Vi(f);m=h+f.substring(w.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(m)&&(h=d(h),m=h+f.substring(w.length)),f!==m&&u.push(ti.replaceMove(new Qe(t,1,t,w.length+1),W3(h,a,l)))}else h=Vi(f);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 w=t;w<=r;w++){let _=i.getLineContent(w),E=Vi(_),A=g+_.substring(E.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(A)&&(g=d(g),h=d(h)),E!==g&&u.push(ti.replaceMove(new Qe(w,1,w,E.length+1),W3(g,a,l))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(_))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(A)?(h=c(h),g=h):o.indentNextLinePattern&&o.indentNextLinePattern.test(A)?g=c(g):g=h)}return u}function JG(i,e,t,r){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let n="";for(let s=0;s<t;s++)n+=" ";let o=new RegExp(n,"gi");for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineFirstNonWhitespaceColumn(s);if(l===0&&(l=i.getLineMaxColumn(s)),l===1)continue;let c=new B(s,1,s,l),d=i.getValueInRange(c),u=r?d.replace(/\t/ig,n):d.replace(o," ");e.addEditOperation(c,u)}}var Hbe,Ube,eS,tS,s1,iS,rS,nS,oS,C8,S8,k8,a1,E8,T8,I8=N(()=>{ke();Di();lt();X3();ba();et();Ir();ei();Br();Go();x8();He();_l();are();FP();Hbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ube=function(i,e){return function(t,r){e(t,r,i)}};eS=class i extends de{constructor(){super({id:i.ID,label:b("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:F.writable})}run(e,t){let r=t.getModel();if(!r)return;let n=r.getOptions(),o=t.getSelection();if(!o)return;let s=new E8(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),r.updateOptions({insertSpaces:!0})}};eS.ID="editor.action.indentationToSpaces";tS=class i extends de{constructor(){super({id:i.ID,label:b("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:F.writable})}run(e,t){let r=t.getModel();if(!r)return;let n=r.getOptions(),o=t.getSelection();if(!o)return;let s=new T8(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),r.updateOptions({insertSpaces:!1})}};tS.ID="editor.action.indentationToTabs";s1=class extends de{constructor(e,t,r){super(r),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let r=e.get(rn),n=e.get(Li),o=t.getModel();if(!o)return;let s=n.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?b("configuredTabSize","Configured Tab Size"):d===s.tabSize?b("defaultTabSize","Default Tab Size"):d===a.tabSize?b("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{r.pick(l,{placeHolder:b({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)}},iS=class i extends s1{constructor(){super(!1,!1,{id:i.ID,label:b("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}};iS.ID="editor.action.indentUsingTabs";rS=class i extends s1{constructor(){super(!0,!1,{id:i.ID,label:b("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}};rS.ID="editor.action.indentUsingSpaces";nS=class i extends s1{constructor(){super(!0,!0,{id:i.ID,label:b("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}};nS.ID="editor.action.changeTabDisplaySize";oS=class i extends de{constructor(){super({id:i.ID,label:b("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){let r=e.get(Li),n=t.getModel();if(!n)return;let o=r.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}};oS.ID="editor.action.detectIndentation";C8=class extends de{constructor(){super({id:"editor.action.reindentlines",label:b("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:F.writable})}run(e,t){let r=e.get(Pt),n=t.getModel();if(!n)return;let o=ZG(n,r,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},S8=class extends de{constructor(){super({id:"editor.action.reindentselectedlines",label:b("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:F.writable})}run(e,t){let r=e.get(Pt),n=t.getModel();if(!n)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=ZG(n,r,l,c);s.push(...d)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},k8=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let r of e)r.range&&typeof r.text=="string"&&this._edits.push(r)}getEditOperations(e,t){for(let n of this._edits)t.addEditOperation(B.lift(n.range),n.text);let r=!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?(r=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(r=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),r||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},a1=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new le,this.callOnModel=new le,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(11)<4||this.editor.getOption(54))&&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 r=this.editor.getModel();if(!r||!r.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let n=this.editor.getOption(11),{tabSize:o,indentSize:s,insertSpaces:a}=r.getOptions(),l=[],c={shiftIndent:f=>Bc.shiftIndent(f,f.length+1,o,s,a),unshiftIndent:f=>Bc.unshiftIndent(f,f.length+1,o,s,a)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(r,d)){d++;continue}break}if(d>e.endLineNumber)return;let u=r.getLineContent(d);if(!/\S/.test(u.substring(0,e.startColumn-1))){let f=fu(n,r,r.getLanguageId(),d,c,this._languageConfigurationService);if(f!==null){let m=Vi(u),g=yn(f,o),w=yn(m,o);if(g!==w){let _=_h(g,o,a);l.push({range:new B(d,1,d,m.length+1),text:_}),u=_+u.substr(m.length)}else{let _=t_(r,d,this._languageConfigurationService);if(_===0||_===8)return}}}let h=d;for(;d<e.endLineNumber;){if(!/\S/.test(r.getLineContent(d+1))){d++;continue}break}if(d!==e.endLineNumber){let m=fu(n,{tokenization:{getLineTokens:g=>r.tokenization.getLineTokens(g),getLanguageId:()=>r.getLanguageId(),getLanguageIdAtPosition:(g,w)=>r.getLanguageIdAtPosition(g,w)},getLineContent:g=>g===h?u:r.getLineContent(g)},r.getLanguageId(),d+1,c,this._languageConfigurationService);if(m!==null){let g=yn(m,o),w=yn(Vi(r.getLineContent(d+1)),o);if(g!==w){let _=g-w;for(let E=d+1;E<=e.endLineNumber;E++){let A=r.getLineContent(E),L=Vi(A),U=yn(L,o)+_,Y=_h(U,o,a);Y!==L&&l.push({range:new B(E,1,E,L.length+1),text:Y})}}}}if(l.length>0){this.editor.pushUndoStop();let f=new k8(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",f),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let r=e.getLineFirstNonWhitespaceColumn(t);if(r===0)return!0;let n=e.tokenization.getLineTokens(t);if(n.getCount()>0){let o=n.findTokenIndexAtOffset(r);if(o>=0&&n.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};a1.ID="editor.contrib.autoIndentOnPaste";a1=Hbe([Ube(1,Pt)],a1);E8=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),JG(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}},T8=class{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),JG(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}};Ue(a1.ID,a1,2);ee(eS);ee(tS);ee(iS);ee(rS);ee(nS);ee(oS);ee(C8);ee(S8)});function eY(i){return yt.from({scheme:So.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var sS,l1,L8,c1,A8=N(()=>{Vt();ke();ci();et();Im();Tr();sS=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},l1=class{constructor(e,t){this.range=e,this.direction=t}},L8=class i{constructor(e,t,r){this.hint=e,this.anchor=t,this.provider=r,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 sS(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,r;return sS(this,void 0,void 0,function*(){try{let n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=n==null?void 0:n.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(r=n==null?void 0:n.label)!==null&&r!==void 0?r:this.hint.label,this._isResolved=!0}catch(n){Yt(n),this._isResolved=!1}})}},c1=class i{static create(e,t,r,n){return sS(this,void 0,void 0,function*(){let o=[],s=e.ordered(t).reverse().map(a=>r.map(l=>sS(this,void 0,void 0,function*(){try{let c=yield a.provideInlayHints(t,l,n);c!=null&&c.hints.length&&o.push([c,a])}catch(c){Yt(c)}})));if(yield Promise.all(s.flat()),n.isCancellationRequested||t.isDisposed())throw new Mv;return new i(r,o,t)})}constructor(e,t,r){this._disposables=new le,this.ranges=e,this.provider=new Set;let n=[];for(let[o,s]of t){this._disposables.add(o),this.provider.add(s);for(let a of o.hints){let l=r.validatePosition(a.position),c="before",d=i._getRangeAtPosition(r,l),u;d.getStartPosition().isBefore(l)?(u=B.fromPositions(d.getStartPosition(),l),c="after"):(u=B.fromPositions(l,d.getEndPosition()),c="before"),n.push(new L8(a,new l1(u,c),s))}}this.items=n.sort((o,s)=>Ie.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let r=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new B(r,n.startColumn,r,n.endColumn);e.tokenization.tokenizeIfCheap(r);let o=e.tokenization.getLineTokens(r),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&&a<o.getCount()-1&&(l=o.getStartOffset(a+1),c=o.getEndOffset(a+1))),new B(r,l+1,r,c+1)}}});function tY(i,e,t,r){var n;return d1(this,void 0,void 0,function*(){let o=i.get(xr),s=i.get(ts),a=i.get(vi),l=i.get(Ke),c=i.get(Mi);if(yield r.item.resolve(st.None),!r.part.location)return;let d=r.part.location,u=[],h=new Set(Xo.getMenuItems(Me.EditorContext).map(m=>yP(m)?m.command.id:Sd()));for(let m of fs.all())h.has(m.desc.id)&&u.push(new Yo(m.desc.id,ia.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>d1(this,void 0,void 0,function*(){let g=yield o.createModelReference(d.uri);try{let w=new ph(g.object.textEditorModel,B.getStartPosition(d.range)),_=r.item.anchor.range;yield l.invokeFunction(m.runEditorCommand.bind(m),e,w,_)}finally{g.dispose()}})));if(r.part.command){let{command:m}=r.part;u.push(new ws),u.push(new Yo(m.id,m.title,void 0,!0,()=>d1(this,void 0,void 0,function*(){var g;try{yield a.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(w){c.notify({severity:_f.Error,source:r.item.provider.displayName,message:w})}})))}let f=e.getOption(125);s.showContextMenu({domForShadowRoot:f&&(n=e.getDomNode())!==null&&n!==void 0?n:void 0,getAnchor:()=>{let m=Qi(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function aS(i,e,t,r){return d1(this,void 0,void 0,function*(){let o=yield i.get(xr).createModelReference(r.uri);yield t.invokeWithinContext(s=>d1(this,void 0,void 0,function*(){let a=e.hasSideBySideModifier,l=s.get(it),c=Rr.inPeekEditor.getValue(l),d=!a&&t.getOption(86)&&!c;return new lc({openToSide:a,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new ph(o.object.textEditorModel,B.getStartPosition(r.range)),B.lift(r.range))})),o.dispose()})}var d1,D8=N(()=>{Bt();Rc();Si();F0();et();ta();Qb();dh();Zi();Wi();wt();vl();Ht();Ao();d1=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})}});function Wbe(i){let e="\xA0";return i.replace(/[ \t]/g,e)}var jbe,jp,Wp,lS,M8,iY,Vp,N8,uc,P8=N(()=>{Bt();pi();Ut();Si();Vt();ke();lf();Fr();Tr();QF();P_();Qm();ba();et();hn();jc();Hr();Ls();Rt();ta();Jb();A8();D8();Wi();dl();Ht();Ao();en();tn();jbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},jp=function(i,e){return function(t,r){e(t,r,i)}},Wp=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},M8=class i{constructor(){this._entries=new na(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let r=i._key(e);this._entries.set(r,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},iY=Xr("IInlayHintsCache");Jr(iY,M8,1);Vp=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]}},N8=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},uc=lS=class{static get(e){var t;return(t=e.getContribution(lS.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,r,n,o,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new le,this._sessionDisposables=new le,this._decorationsMetadata=new Map,this._ruleFactory=new Z_(this._editor),this._activeRenderMode=0,this._debounceInfo=r.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(138)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(138);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;let r=this._inlayHintsCache.get(t);r&&this._updateHintsDecorators([t.getFullModelRange()],r),this._sessionDisposables.add(ii(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let n,o=new Set,s=new di(()=>Wp(this,void 0,void 0,function*(){let a=Date.now();n==null||n.dispose(!0),n=new Fi;let l=t.onWillDispose(()=>n==null?void 0:n.cancel());try{let c=n.token,d=yield c1.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){ft(c)}finally{n.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(s),this._sessionDisposables.add(ii(()=>n==null?void 0:n.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(cP.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 le,t=e.add(new Ya(this._editor)),r=new le;return e.add(r),e.add(t.onMouseMoveOrRelevantKeyDown(n=>{let[o]=n,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){r.clear();return}let l=new Fi;r.add(ii(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new N8(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,d=new B(c,1,c,a.getLineMaxColumn(c)),u=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],u),r.add(ii(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],u)}))})),e.add(t.onCancel(()=>r.clear())),e.add(t.onExecute(n=>Wp(this,void 0,void 0,function*(){let o=this._getInlayHintLabelPart(n);if(o){let s=o.part;s.location?this._instaService.invokeFunction(aS,n,this._editor,s.location):WO.is(s.command)&&(yield this._invokeCommand(s.command,o.item))}}))),e}_getInlineHintsForRange(e){let t=new Set;for(let r of this._decorationsMetadata.values())e.containsRange(r.item.anchor.range)&&t.add(r.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>Wp(this,void 0,void 0,function*(){if(t.event.detail!==2)return;let r=this._getInlayHintLabelPart(t);if(r&&(t.event.preventDefault(),yield r.item.resolve(st.None),qi(r.item.hint.textEdits))){let n=r.item.hint.textEdits.map(o=>ti.replace(B.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",n),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>Wp(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;let t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(tY,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;let r=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(r instanceof vf&&(r==null?void 0:r.attachedData)instanceof Vp)return r.attachedData}_invokeCommand(e,t){var r;return Wp(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(r=e.arguments)!==null&&r!==void 0?r:[])}catch(n){this._notificationService.notify({severity:_f.Error,source:t.provider.displayName,message:n})}})}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[r,n]of this._decorationsMetadata){if(t.has(n.item))continue;let o=e.getDecorationRange(r);if(o){let s=new l1(o,n.item.anchor.direction),a=n.item.with({anchor:s});t.set(n.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),r=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(let o of r.sort(B.compareRangesUsingStarts)){let s=t.validateRange(new B(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));n.length===0||!B.areIntersectingOrTouching(n[n.length-1],s)?n.push(s):n[n.length-1]=B.plusRange(n[n.length-1],s)}return n}_updateHintsDecorators(e,t){var r,n;let o=[],s=(g,w,_,E,A)=>{let L={content:_,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:w.className,cursorStops:E,attachedData:A};o.push({item:g,classNameRef:w,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?L:void 0}}})},a=(g,w)=>{let _=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(g,_,"\u200A",w?mu.Right:mu.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 w=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let _=0;_<w.length;_++){let E=w[_],A=_===0,L=_===w.length-1,O={fontSize:`${l}px`,fontFamily:`var(${h}), ${w_.fontFamily}`,verticalAlign:u?"baseline":"middle",unicodeBidi:"isolate"};qi(g.hint.textEdits)&&(O.cursor="default"),this._fillInColors(O,g.hint),(E.command||E.location)&&((r=this._activeInlayHintPart)===null||r===void 0?void 0:r.part.item)===g&&this._activeInlayHintPart.part.index===_&&(O.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(O.color=ki(IO),O.cursor="pointer")),d&&(A&&L?(O.padding=`1px ${Math.max(1,l/4)|0}px`,O.borderRadius=`${l/4|0}px`):A?(O.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,O.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):L?(O.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,O.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):O.padding="1px 0 1px 0"),s(g,this._ruleFactory.createClassNameRef(O),Wbe(E.label),L&&!g.hint.paddingRight?mu.Right:mu.None,new Vp(g,_))}if(g.hint.paddingRight&&a(g,!0),o.length>lS._MAX_DECORATORS)break}let f=[];for(let g of e)for(let{id:w}of(n=this._editor.getDecorationsInRange(g))!==null&&n!==void 0?n:[]){let _=this._decorationsMetadata.get(w);_&&(f.push(w),_.classNameRef.dispose(),this._decorationsMetadata.delete(w))}let m=ga.capture(this._editor);this._editor.changeDecorations(g=>{let w=g.deltaDecorations(f,o.map(_=>_.decoration));for(let _=0;_<w.length;_++){let E=o[_];this._decorationsMetadata.set(w[_],E)}}),m.restore(this._editor)}_fillInColors(e,t){t.kind===nk.Parameter?(e.backgroundColor=ki(RO),e.color=ki(NO)):t.kind===nk.Type?(e.backgroundColor=ki(MO),e.color=ki(DO)):(e.backgroundColor=ki(AO),e.color=ki(LO))}_getLayoutInfo(){let e=this._editor.getOption(138),t=e.padding,r=this._editor.getOption(51),n=this._editor.getOption(48),o=e.fontSize;(!o||o<5||o>r)&&(o=r);let s=e.fontFamily||n;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===n&&o===r}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};uc.ID="editor.contrib.InlayHints";uc._MAX_DECORATORS=1500;uc=lS=jbe([jp(1,Se),jp(2,ar),jp(3,iY),jp(4,vi),jp(5,Mi),jp(6,Ke)],uc);At.registerCommand("_executeInlayHintProvider",(i,...e)=>Wp(void 0,void 0,void 0,function*(){let[t,r]=e;zt(yt.isUri(t)),zt(B.isIRange(r));let{inlayHintsProvider:n}=i.get(Se),o=yield i.get(xr).createModelReference(t);try{let s=yield c1.create(n,o.object.textEditorModel,[B.lift(r)],st.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}}))});var Vbe,u1,rY,qbe,cS,dS,nY=N(()=>{Ut();Ss();ci();Hr();ec();Zo();ta();a8();YC();P8();Cr();es();Rt();He();En();A8();pi();Vbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},u1=function(i,e){return function(t,r){e(t,r,i)}},rY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},qbe=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={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),n(a,l,s.done,s.value)})}}function n(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},cS=class extends Ed{constructor(e,t,r,n){super(10,t,e.item.anchor.range,r,n,!0),this.part=e}},dS=class extends Up{constructor(e,t,r,n,o,s){super(e,t,r,n,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!uc.get(this._editor)||e.target.type!==6)return null;let n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return n instanceof vf&&n.attachedData instanceof Vp?new cS(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,r){return e instanceof cS?new Dn(n=>rY(this,void 0,void 0,function*(){var o,s,a,l;let{part:c}=e;if(yield c.item.resolve(r),r.isCancellationRequested)return;let d;typeof c.item.hint.tooltip=="string"?d=new Ki().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&n.emitOne(new io(this,e.range,[d],!1,0)),qi(c.item.hint.textEdits)&&n.emitOne(new io(this,e.range,[new Ki().appendText(b("hint.dbl","Double-click to insert"))],!1,10001));let u;if(typeof c.part.tooltip=="string"?u=new Ki().appendText(c.part.tooltip):c.part.tooltip&&(u=c.part.tooltip),u&&n.emitOne(new io(this,e.range,[u],!1,1)),c.part.location||c.part.command){let w,E=this._editor.getOption(76)==="altKey"?kn?b("links.navigate.kb.meta.mac","cmd + click"):b("links.navigate.kb.meta","ctrl + click"):kn?b("links.navigate.kb.alt.mac","option + click"):b("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?w=new Ki().appendText(b("hint.defAndCommand","Go to Definition ({0}), right click for more",E)):c.part.location?w=new Ki().appendText(b("hint.def","Go to Definition ({0})",E)):c.part.command&&(w=new Ki(`[${b("hint.cmd","Execute Command")}](${eY(c.part.command)} "${c.part.command.title}") (${E})`,{isTrusted:!0})),w&&n.emitOne(new io(this,e.range,[w],!1,1e4))}let h=yield this._resolveInlayHintLabelPartHover(c,r);try{for(var f=!0,m=qbe(h),g;g=yield m.next(),o=g.done,!o;f=!0){l=g.value,f=!1;let w=l;n.emitOne(w)}}catch(w){s={error:w}}finally{try{!f&&!o&&(a=m.return)&&(yield a.call(m))}finally{if(s)throw s.error}}})):Dn.EMPTY}_resolveInlayHintLabelPartHover(e,t){return rY(this,void 0,void 0,function*(){if(!e.part.location)return Dn.EMPTY;let{uri:r,range:n}=e.part.location,o=yield this._resolverService.createModelReference(r);try{let s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?o1(this._languageFeaturesService.hoverProvider,s,new Ie(n.startLineNumber,n.startColumn),t).filter(a=>!Hc(a.hover.contents)).map(a=>new io(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Dn.EMPTY}finally{o.dispose()}})}};dS=Vbe([u1(1,Ji),u1(2,er),u1(3,Dt),u1(4,xr),u1(5,Se)],dS)});var O8=N(()=>{lt();ec();P8();nY();Ue(uc.ID,uc,1);Bo.register(dS)});var uS,oY=N(()=>{Ir();uS=class{constructor(e,t,r){this._editRange=e,this._originalSelection=t,this._text=r}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Qe(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new Qe(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}});var sY=N(()=>{});var aY=N(()=>{sY()});var B8=Xi(h1=>{Ut();Vt();vu();lt();et();Ir();ei();Hr();j_();He();oY();aY();var Kbe=h1&&h1.__decorate||function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},$be=h1&&h1.__param||function(i,e){return function(t,r){e(t,r,i)}},hS,Bd=hS=class{static get(e){return e.getContribution(hS.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var r;(r=this.currentRequest)===null||r===void 0||r.cancel();let n=this.editor.getSelection(),o=this.editor.getModel();if(!o||!n)return;let s=n;if(s.startLineNumber!==s.endLineNumber)return;let a=new S_(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Zt(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=B.lift(c.range),h=c.range,f=c.value.length-(s.endColumn-s.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+c.value.length},f>1&&(s=new Qe(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+f-1));let m=new uS(u,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:hS.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=df(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(ft)}).catch(ft)):Promise.resolve(void 0)}};Bd.ID="editor.contrib.inPlaceReplaceController";Bd.DECORATION=mt.register({description:"in-place-replace",className:"valueSetReplacement"});Bd=hS=Kbe([$be(1,Cl)],Bd);var F8=class extends de{constructor(){super({id:"editor.action.inPlaceReplace.up",label:b("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3159,weight:100}})}run(e,t){let r=Bd.get(t);return r?r.run(this.id,!1):Promise.resolve(void 0)}},z8=class extends de{constructor(){super({id:"editor.action.inPlaceReplace.down",label:b("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3161,weight:100}})}run(e,t){let r=Bd.get(t);return r?r.run(this.id,!0):Promise.resolve(void 0)}};Ue(Bd.ID,Bd,4);ee(F8);ee(z8)});var H8,U8=N(()=>{lt();EP();ei();He();H8=class extends de{constructor(){super({id:"expandLineSelection",label:b("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:F.textInputFocus,primary:2090}})}run(e,t,r){if(r=r||{},!t.hasModel())return;let n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(r.source,3,Rm.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(r.source,!0)}};ee(H8)});function Gbe(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=[],r=0,n=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(n<o&&e[n].lineNumber===s&&(d=e[n].column,n++,d===c)||l.length===0)continue;let u=rf(l),h=0;if(u===-1)h=1;else if(u!==l.length-1)h=u+2;else continue;h=Math.max(d,h),t[r++]=ti.delete(new B(s,h,s,c))}return t}var fS,lY=N(()=>{Di();ba();et();fS=class{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let r=Gbe(e,this._cursors);for(let n=0,o=r.length;n<o;n++){let s=r[n];t.addEditOperation(s.range,s.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var f1,cY=N(()=>{et();Ir();f1=class{constructor(e,t,r){this._selection=e,this._isCopyingDown=t,this._noop=r||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let r=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._endLineNumberDelta=1,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1)));let n=[];for(let s=r.startLineNumber;s<=r.endLineNumber;s++)n.push(e.getLineContent(s));let o=n.join(` +`,s=new Ki().appendCodeblock("empty",a),o=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!Nb(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,dn(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Vn(this._type),this._type.title="",zr(this._type),this.domNode.classList.add("no-type");if(Vn(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),Vn(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 r=new Xt(e,t);Xt.equals(r,this._size)||(this._size=r,oP(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}};X2=Z0e([J0e(1,Ke)],X2);Q2=class{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new le,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new Nd,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let r,n,o=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{r=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(r&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(s=n.width-a.dimension.width,l=!0),a.north&&(o=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:r.top+o,left:r.left+s})}a.done&&(r=void 0,n=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 r;let n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(r=this._userSize)!==null&&r!==void 0?r:this.widget.size,t)}_placeAtAnchor(e,t,r){var n;let o=Nc(document.body),s=this.widget.getLayoutInfo(),a=new Xt(220,2*s.lineHeight),l=e.top,c=function(){let A=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),L=-s.borderWidth+e.left+e.width,O=new Xt(A,o.height-e.top-s.borderHeight-s.verticalPadding),U=O.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:A-t.width,maxSizeTop:O,maxSizeBottom:U,minSize:a.with(Math.min(A,a.width))}}(),d=function(){let A=e.left-s.borderWidth-s.horizontalPadding,L=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),O=new Xt(A,o.height-e.top-s.borderHeight-s.verticalPadding),U=O.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:l,left:L,fit:A-t.width,maxSizeTop:O,maxSizeBottom:U,minSize:a.with(Math.min(A,a.width))}}(),u=function(){let A=e.left,L=-s.borderWidth+e.top+e.height,O=new Xt(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:L,left:A,fit:O.height-t.height,maxSizeBottom:O,maxSizeTop:O,minSize:a.with(O.width)}}(),h=[c,d,u],f=(n=h.find(A=>A.fit>=0))!==null&&n!==void 0?n:h.sort((A,L)=>L.fit-A.fit)[0],m=e.top+e.height-s.borderHeight,g,w=t.height,_=Math.max(f.maxSizeTop.height,f.maxSizeBottom.height);w>_&&(w=_);let E;r?w<=f.maxSizeTop.height?(g=!0,E=f.maxSizeTop):(g=!1,E=f.maxSizeBottom):w<=f.maxSizeBottom.height?(g=!1,E=f.maxSizeBottom):(g=!0,E=f.maxSizeTop),this._applyTopLeft({left:f.left,top:g?f.top:m-w}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,f===c,g,f!==c),this._resizable.minSize=f.minSize,this._resizable.maxSize=E,this._resizable.layout(w,Math.min(E.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 Ks,uA=N(()=>{(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(Ks||(Ks={}))});function Rb(i,e,t,r){let n=r===Ks.ROOT_FOLDER?["rootfolder-icon"]:r===Ks.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===So.data)o=Om.parseMetaData(t).get(Om.META_DATA_LABEL);else{let s=t.path.match(ebe);s?(o=Z2(s[2].toLowerCase()),s[1]&&n.push(`${Z2(s[1].toLowerCase())}-name-dir-icon`)):o=Z2(t.authority.toLowerCase())}if(r===Ks.FOLDER)n.push(`${o}-name-folder-icon`);else{if(o){if(n.push(`${o}-name-file-icon`),n.push("name-file-icon"),o.length<=255){let a=o.split(".");for(let l=1;l<a.length;l++)n.push(`${a.slice(l).join(".")}-ext-file-icon`)}n.push("ext-file-icon")}let s=tbe(i,e,t);s&&n.push(`${Z2(s)}-lang-file-icon`)}}return n}function tbe(i,e,t){if(!t)return null;let r=null;if(t.scheme===So.data){let o=Om.parseMetaData(t).get(Om.META_DATA_MIME);o&&(r=e.getLanguageIdByMimeType(o))}else{let n=i.getModel(t);n&&(r=n.getLanguageId())}return r&&r!==sf?r:e.guessLanguageIdByFilepathOrFirstLine(t)}function Z2(i){return i.replace(/[\11\12\14\15\40]/g,"/")}var ebe,Y$=N(()=>{Im();Io();X3();uA();ebe=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/});function pA(i){return`suggest-aria-id:${i}`}function fA(i){return i.replace(/\r\n|\r|\n/g,"")}var ibe,hA,Rd,rbe,nbe,J2,X$=N(()=>{Bt();rz();Qr();In();Jt();hl();ke();Tr();hn();Y$();Go();Zo();He();uA();xl();tn();dA();ibe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},hA=function(i,e){return function(t,r){e(t,r,i)}};rbe=Ni("suggest-more-info",pt.chevronRight,b("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),nbe=new(Rd=class{extract(e,t){if(e.textLabel.match(Rd._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(Rd._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){let r=Rd._regexRelaxed.exec(e.completion.documentation);if(r&&(r.index===0||r.index+r[0].length===e.completion.documentation.length))return t[0]=r[0],!0}return!1}},Rd._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*\))/,Rd._regexStrict=new RegExp(`^${Rd._regexRelaxed.source}$`,"i"),Rd),J2=class{constructor(e,t,r,n){this._editor=e,this._modelService=t,this._languageService=r,this._themeService=n,this._onDidToggleDetails=new Je,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){let t=new le,r=e;r.classList.add("show-file-icons");let n=Te(e,Le(".icon")),o=Te(n,Le("span.colorspan")),s=Te(e,Le(".contents")),a=Te(s,Le(".main")),l=Te(a,Le(".icon-label.codicon")),c=Te(a,Le("span.left")),d=Te(a,Le("span.right")),u=new J_(c,{supportHighlights:!0,supportIcons:!0});t.add(u);let h=Te(c,Le("span.signature-label")),f=Te(c,Le("span.qualifier-label")),m=Te(d,Le("span.details-label")),g=Te(d,Le("span.readMore"+_t.asCSSSelector(rbe)));g.title=b("readMore","Read More");let w=()=>{let _=this._editor.getOptions(),E=_.get(49),A=E.getMassagedFontFamily(),L=E.fontFeatureSettings,O=_.get(117)||E.fontSize,U=_.get(118)||E.lineHeight,Y=E.fontWeight,oe=E.letterSpacing,te=`${O}px`,Z=`${U}px`,ve=`${oe}px`;r.style.fontSize=te,r.style.fontWeight=Y,r.style.letterSpacing=ve,a.style.fontFamily=A,a.style.fontFeatureSettings=L,a.style.lineHeight=Z,n.style.height=Z,n.style.width=Z,g.style.height=Z,g.style.width=Z};return w(),t.add(this._editor.onDidChangeConfiguration(_=>{(_.hasChanged(49)||_.hasChanged(117)||_.hasChanged(118))&&w()})),{root:r,left:c,right:d,icon:n,colorspan:o,iconLabel:u,iconContainer:l,parametersLabel:h,qualifierLabel:f,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,r){let{completion:n}=e;r.root.id=pA(t),r.colorspan.style.backgroundColor="";let o={labelEscapeNewLines:!0,matches:pu(e.score)},s=[];if(n.kind===19&&nbe.extract(e,s))r.icon.className="icon customcolor",r.iconContainer.className="icon hide",r.colorspan.style.backgroundColor=s[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){r.icon.className="icon hide",r.iconContainer.className="icon hide";let a=Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:e.textLabel}),Ks.FILE),l=Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:n.detail}),Ks.FILE);o.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(r.icon.className="icon hide",r.iconContainer.className="icon hide",o.extraClasses=[Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:e.textLabel}),Ks.FOLDER),Rb(this._modelService,this._languageService,yt.from({scheme:"fake",path:n.detail}),Ks.FOLDER)].flat()):(r.icon.className="icon hide",r.iconContainer.className="",r.iconContainer.classList.add("suggest-icon",..._t.asClassNameArray($m.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),r.iconLabel.setLabel(e.textLabel,void 0,o),typeof n.label=="string"?(r.parametersLabel.textContent="",r.detailsLabel.textContent=fA(n.detail||""),r.root.classList.add("string-label")):(r.parametersLabel.textContent=fA(n.label.detail||""),r.detailsLabel.textContent=fA(n.label.description||""),r.root.classList.remove("string-label")),this._editor.getOption(116).showInlineDetails?dn(r.detailsLabel):zr(r.detailsLabel),Nb(e)?(r.right.classList.add("can-expand-details"),dn(r.readMore),r.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},r.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(r.right.classList.remove("can-expand-details"),zr(r.readMore),r.readMore.onmousedown=null,r.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};J2=ibe([hA(1,Li),hA(2,Ji),hA(3,gr)],J2)});var obe,eC,sbe,Ip,tC,abe,mA,Lp,gA,Q$=N(()=>{Bt();I0();pF();Ut();Vt();Jt();ke();Pre();Di();K$();Tp();G$();Tx();He();wt();Ht();_u();en();nk();tn();Y2();ch();dA();X$();N_();Eo();obe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},eC=function(i,e){return function(t,r){e(t,r,i)}},sbe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};je("editorSuggestWidget.background",{dark:ml,light:ml,hcDark:ml,hcLight:ml},b("editorSuggestWidgetBackground","Background color of the suggest widget."));je("editorSuggestWidget.border",{dark:gu,light:gu,hcDark:gu,hcLight:gu},b("editorSuggestWidgetBorder","Border color of the suggest widget."));tC=je("editorSuggestWidget.foreground",{dark:da,light:da,hcDark:da,hcLight:da},b("editorSuggestWidgetForeground","Foreground color of the suggest widget."));je("editorSuggestWidget.selectedForeground",{dark:jm,light:jm,hcDark:jm,hcLight:jm},b("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));je("editorSuggestWidget.selectedIconForeground",{dark:Wm,light:Wm,hcDark:Wm,hcLight:Wm},b("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));abe=je("editorSuggestWidget.selectedBackground",{dark:Vm,light:Vm,hcDark:Vm,hcLight:Vm},b("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));je("editorSuggestWidget.highlightForeground",{dark:ua,light:ua,hcDark:ua,hcLight:ua},b("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));je("editorSuggestWidget.focusHighlightForeground",{dark:Um,light:Um,hcDark:Um,hcLight:Um},b("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));je("editorSuggestWidgetStatus.foreground",{dark:Mn(tC,.5),light:Mn(tC,.5),hcDark:Mn(tC,.5),hcLight:Mn(tC,.5)},b("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));mA=class{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Uo}`}restore(){var e;let t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{let r=JSON.parse(t);if(Xt.is(r))return Xt.lift(r)}catch(r){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}},Lp=Ip=class{constructor(e,t,r,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new ji,this._pendingShowDetails=new ji,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new oa,this._disposables=new le,this._onDidSelect=new D3,this._onDidFocus=new D3,this._onDidHide=new Je,this._onDidShow=new Je,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Je,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new Nd,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new gA(this,e),this._persistedSize=new mA(t,e);class s{constructor(f,m,g=!1,w=!1){this.persistedSize=f,this.currentSize=m,this.persistHeight=g,this.persistWidth=w}}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 f,m,g,w;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:_,defaultSize:E}=this.getLayoutInfo(),A=Math.round(_/2),{width:L,height:O}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-O)<=A)&&(O=(m=(f=a.persistedSize)===null||f===void 0?void 0:f.height)!==null&&m!==void 0?m:E.height),(!a.persistWidth||Math.abs(a.currentSize.width-L)<=A)&&(L=(w=(g=a.persistedSize)===null||g===void 0?void 0:g.width)!==null&&w!==void 0?w:E.width),this._persistedSize.store(new Xt(L,O))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=Te(this.element.domNode,Le(".message")),this._listElement=Te(this.element.domNode,Le(".tree"));let l=o.createInstance(X2,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Q2(l,this.editor);let c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(116).showIcons);c();let d=o.createInstance(J2,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new D_("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>b("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let f=h.textLabel;if(typeof h.completion.label!="string"){let{detail:_,description:E}=h.completion.label;_&&E?f=b("label.full","{0} {1}, {2}",f,_,E):_?f=b("label.detail","{0} {1}",f,_):E&&(f=b("label.desc","{0}, {1}",f,E))}if(!h.isResolved||!this._isDetailsVisible())return f;let{documentation:m,detail:g}=h.completion,w=tf("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return b("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",f,w)}}}),this._list.style(yF({listInactiveFocusBackground:abe,listInactiveFocusOutline:ca})),this._status=o.createInstance(G2,this.element.domNode,$a);let u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(116).showStatusBar);u(),this._disposables.add(n.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(n.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(116)&&(u(),c())})),this._ctxSuggestWidgetVisible=ct.Visible.bindTo(r),this._ctxSuggestWidgetDetailsVisible=ct.DetailsVisible.bindTo(r),this._ctxSuggestWidgetMultipleSuggestions=ct.MultipleSuggestions.bindTo(r),this._ctxSuggestWidgetHasFocusedSuggestion=ct.HasFocusedSuggestion.bindTo(r),this._disposables.add(ko(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 r=this._completionModel;r&&(this._onDidSelect.fire({item:e,index:t,model:r}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=bu(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 r=e.elements[0],n=e.indexes[0];r!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=r,this._list.reveal(n),this._currentSuggestionDetails=Zt(o=>sbe(this,void 0,void 0,function*(){let s=fl(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),a=o.onCancellationRequested(()=>s.dispose()),l=yield r.resolve(o);return s.dispose(),a.dispose(),l})),this._currentSuggestionDetails.then(()=>{n>=this._list.length||r!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[r]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:pA(n)}))}).catch(ft)),this._onDidFocus.fire({item:r,index:n,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:zr(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=Ip.LOADING_MESSAGE,zr(this._listElement,this._status.element),dn(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,cu(Ip.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Ip.NO_SUGGESTIONS_MESSAGE,zr(this._listElement,this._status.element),dn(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,cu(Ip.NO_SUGGESTIONS_MESSAGE);break;case 3:zr(this._messageElement),dn(this._listElement,this._status.element),this._show();break;case 4:zr(this._messageElement),dn(this._listElement,this._status.element),this._show();break;case 5:zr(this._messageElement),dn(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=fl(()=>this._setState(1),t)))}showSuggestions(e,t,r,n,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),r&&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(n?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(r?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=R3(()=>{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")):(Nb(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=R3(()=>{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(),r=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.height<r&&this._persistedSize.store(t.with(void 0,r))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(e){var t,r,n;if(!this.editor.hasModel()||!this.editor.getDomNode())return;let o=Nc(document.body),s=this.getLayoutInfo();e||(e=s.defaultSize);let a=e.height,l=e.width;if(this._status.element.style.height=`${s.itemHeight}px`,this._state===2||this._state===1)a=s.itemHeight+s.borderHeight,l=s.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Xt(l,a),this._contentWidget.setPreference(2);else{let c=o.width-s.borderHeight-2*s.horizontalPadding;l>c&&(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,f=Qi(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=f.top+m.top+m.height,w=Math.min(o.height-g-s.verticalPadding,u),_=f.top+m.top-s.verticalPadding,E=Math.min(_,u),A=Math.min(Math.max(E,w)+s.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),a<h&&(a=h),a>A&&(a=A);let L=150;a>w||this._forceRenderingAbove&&_>L?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),A=E):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),A=w),this.element.preferredSize=new Xt(d,s.defaultSize.height),this.element.maxSize=new Xt(c,A),this.element.minSize=new Xt(220,h),this._cappedHeight=a===u?{wanted:(n=(r=this._cappedHeight)===null||r===void 0?void 0:r.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_resize(e,t){let{width:r,height:n}=this.element.maxSize;e=Math.min(r,e),t=Math.min(n,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(49),t=hF(this.editor.getOption(118)||e.lineHeight,8,1e3),r=!this.editor.getOption(116).showStatusBar||this._state===2||this._state===1?0:t,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:r,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Xt(430,r+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}};Lp.LOADING_MESSAGE=b("suggestWidget.loading","Loading...");Lp.NO_SUGGESTIONS_MESSAGE=b("suggestWidget.noSuggestions","No suggestions.");Lp=Ip=obe([eC(1,Gn),eC(2,it),eC(3,gr),eC(4,Ke)],Lp);gA=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:r,horizontalPadding:n}=this._widget.getLayoutInfo();return new Xt(t+2*r+n,e+2*r)}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 lbe,Ap,bA,cbe,vA,jo,_A,Pb,bo,bn,iC=N(()=>{Eo();pi();Ut();Si();Vt();Jt();nre();ke();En();ol();Fr();P_();lt();ba();ci();et();ei();Cp();ah();iA();H$();He();Wi();wt();Ht();Kv();ch();U$();j$();W$();V$();Q$();Oc();Io();xF();lbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ap=function(i,e){return function(t,r){e(t,r,i)}},cbe=!1,vA=class{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){let n=e.getOffsetAt(t),o=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:B.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}},jo=bA=class{static get(e){return e.getContribution(bA.ID)}constructor(e,t,r,n,o,s,a){this._memoryService=t,this._commandService=r,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._telemetryService=a,this._lineSuffix=new ji,this._toDispose=new le,this._selectors=new _A(u=>u.priority),this._onWillInsertSuggestItem=new Je,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance($2,this.editor),this._selectors.register({priority:0,select:(u,h,f)=>this._memoryService.select(u,h,f)});let l=ct.InsertMode.bindTo(n);l.set(e.getOption(116).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(116).insertMode))),this.widget=this._toDispose.add(new c_(()=>{let u=this._instantiationService.createInstance(Lp,this.editor);this._toDispose.add(u),this._toDispose.add(u.onDidSelect(w=>this._insertSuggestion(w,0),this));let h=new K2(this.editor,u,this.model,w=>this._insertSuggestion(w,2));this._toDispose.add(h);let f=ct.MakesTextEdit.bindTo(this._contextKeyService),m=ct.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=ct.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(ii(()=>{f.reset(),m.reset(),g.reset()})),this._toDispose.add(u.onDidFocus(({item:w})=>{let _=this.editor.getPosition(),E=w.editStart.column,A=_.column,L=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!w.completion.additionalTextEdits&&!(w.completion.insertTextRules&4)&&A-E===w.completion.insertText.length&&(L=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:E,endLineNumber:_.lineNumber,endColumn:A})!==w.completion.insertText),f.set(L),m.set(!Ie.equals(w.editInsertEnd,w.editReplaceEnd)),g.set(!!w.provider.resolveCompletionItem||!!w.completion.documentation||w.completion.detail!==w.completion.label)})),this._toDispose.add(u.onDetailsKeyDown(w=>{if(w.toKeyCodeChord().equals(new N3(!0,!1,!1,!1,33))||kn&&w.toKeyCodeChord().equals(new N3(!1,!1,!1,!0,33))){w.stopPropagation();return}w.toKeyCodeChord().isModifierKey()||this.editor.focus()})),u})),this._overtypingCapturer=this._toDispose.add(new c_(()=>this._toDispose.add(new Mb(this.editor,this.model)))),this._alternatives=this._toDispose.add(new c_(()=>this._toDispose.add(new Ld(this.editor,this._contextKeyService)))),this._toDispose.add(o.createInstance(kp,e)),this._toDispose.add(this.model.onDidTrigger(u=>{this.widget.value.showTriggered(u.auto,u.shy?250:50),this._lineSuffix.value=new vA(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 f=!1;if(u.triggerOptions.auto){let m=this.editor.getOption(116);m.selectionMode==="never"||m.selectionMode==="always"?f=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?f=u.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(f=u.triggerOptions.triggerKind===1&&!u.triggerOptions.refilter)}this.widget.value.showSuggestions(u.completionModel,h,u.isFrozen,u.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(u=>{u.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{cbe||(this.model.cancel(),this.model.clear())}));let c=ct.AcceptSuggestionsOnEnter.bindTo(n),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(),this._onWillInsertSuggestItem.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 r=rr.get(this.editor);if(!r)return;this._onWillInsertSuggestItem.fire({item:e.item});let n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,a=[],l=new Fi;t&1||this.editor.pushUndoStop();let c=this.getOverwriteInfo(s,!!(t&8));this._memoryService.memorize(n,this.editor.getPosition(),s);let d=s.isResolved,u=-1,h=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();let m=ga.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(g=>ti.replaceMove(B.lift(g.range),g.text))),m.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!d){let m=new pr,g,w=n.onDidChangeContent(L=>{if(L.isFlush){l.cancel(),w.dispose();return}for(let O of L.changes){let U=B.getEndPosition(O.range);(!g||Ie.isBefore(U,g))&&(g=U)}}),_=t;t|=2;let E=!1,A=this.editor.onWillType(()=>{A.dispose(),E=!0,_&2||this.editor.pushUndoStop()});a.push(s.resolve(l.token).then(()=>{if(!s.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(g&&s.completion.additionalTextEdits.some(O=>Ie.isBefore(g,B.getStartPosition(O.range))))return!1;E&&this.editor.pushUndoStop();let L=ga.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(O=>ti.replaceMove(B.lift(O.range),O.text))),L.restoreRelativeVerticalPositionOfCursor(this.editor),(E||!(_&2))&&this.editor.pushUndoStop(),!0}).then(L=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",m.elapsed(),L),h=L===!0?1:L===!1?0:-2}).finally(()=>{w.dispose(),A.dispose()}))}let{insertText:f}=s.completion;if(s.completion.insertTextRules&4||(f=Ho.escape(f)),this.model.cancel(),r.insert(f,{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)if(s.completion.command.id===Pb.id)this.model.trigger({auto:!0,retrigger:!0});else{let m=new pr;a.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(g=>{s.completion.extensionId?Yt(g):ft(g)}).finally(()=>{u=m.elapsed()}))}t&4&&this._alternatives.value.set(e,m=>{for(l.cancel();n.canUndo();){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(m,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(s,n,d,u,h),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,r,n,o){var s,a,l;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(a=(s=e.extensionId)===null||s===void 0?void 0:s.value)!==null&&a!==void 0?a:"unknown",providerId:(l=e.provider._debugDisplayName)!==null&&l!==void 0?l:"unknown",kind:e.completion.kind,basenameHash:F_(An(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:QP(t.uri),resolveInfo:e.provider.resolveCompletionItem?r?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:o})}getOverwriteInfo(e,t){zt(this.editor.hasModel());let r=this.editor.getOption(116).insertMode==="replace";t&&(r=!r);let n=e.position.column-e.editStart.column,o=(r?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:n+s,overwriteAfter:o+a}}_alertCompletionItem(e){if(qi(e.completion.additionalTextEdits)){let t=b("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);sr(t)}}triggerSuggest(e,t,r){this.editor.hasModel()&&(this.model.trigger({auto:t!=null?t:!1,completionOptions:{providerFilter:e,kindFilter:r?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(),r=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=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)(()=>{Ui(s),r()},void 0,s),this.model.onDidSuggest(({completionModel:a})=>{if(Ui(s),a.items.length===0){r();return}let l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!n(c)){r();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 r=this.widget.value.getFocusedItem(),n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(r,n)}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)}};jo.ID="editor.contrib.suggestController";jo=bA=lbe([Ap(1,Sp),Ap(2,vi),Ap(3,it),Ap(4,Ke),Ap(5,Fc),Ap(6,Ln)],jo);_A=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,r)=>this.prioritySelector(r)-this.prioritySelector(t)),{dispose:()=>{let t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}},Pb=class i extends de{constructor(){super({id:i.id,label:b("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:fe.and(F.writable,F.hasCompletionItemProvider,ct.Visible.toNegated()),kbOpts:{kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,r){let n=jo.get(t);if(!n)return;let o;r&&typeof r=="object"&&r.auto===!0&&(o=!0),n.triggerSuggest(void 0,o,void 0)}};Pb.id="editor.action.triggerSuggest";Ue(jo.ID,jo,2);ee(Pb);bo=100+90,bn=Oi.bindToContribution(jo.get);We(new bn({id:"acceptSelectedSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:fe.and(ct.Visible,F.textInputFocus),weight:bo},{primary:3,kbExpr:fe.and(ct.Visible,F.textInputFocus,ct.AcceptSuggestionsOnEnter,ct.MakesTextEdit),weight:bo}],menuOpts:[{menuId:$a,title:b("accept.insert","Insert"),group:"left",order:1,when:ct.HasInsertAndReplaceRange.toNegated()},{menuId:$a,title:b("accept.insert","Insert"),group:"left",order:1,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("insert"))},{menuId:$a,title:b("accept.replace","Replace"),group:"left",order:1,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("replace"))}]}));We(new bn({id:"acceptAlternativeSelectedSuggestion",precondition:fe.and(ct.Visible,F.textInputFocus,ct.HasFocusedSuggestion),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:$a,group:"left",order:2,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("insert")),title:b("accept.replace","Replace")},{menuId:$a,group:"left",order:2,when:fe.and(ct.HasInsertAndReplaceRange,ct.InsertMode.isEqualTo("replace")),title:b("accept.insert","Insert")}]}));At.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");We(new bn({id:"hideSuggestWidget",precondition:ct.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:9,secondary:[1033]}}));We(new bn({id:"selectNextSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));We(new bn({id:"selectNextPageSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:12,secondary:[2060]}}));We(new bn({id:"selectLastSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));We(new bn({id:"selectPrevSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));We(new bn({id:"selectPrevPageSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:11,secondary:[2059]}}));We(new bn({id:"selectFirstSuggestion",precondition:fe.and(ct.Visible,fe.or(ct.MultipleSuggestions,ct.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));We(new bn({id:"focusSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));We(new bn({id:"focusAndAcceptSuggestion",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));We(new bn({id:"toggleSuggestionDetails",precondition:fe.and(ct.Visible,ct.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:$a,group:"right",order:1,when:fe.and(ct.DetailsVisible,ct.CanResolve),title:b("detail.more","show less")},{menuId:$a,group:"right",order:1,when:fe.and(ct.DetailsVisible.toNegated(),ct.CanResolve),title:b("detail.less","show more")}]}));We(new bn({id:"toggleExplainMode",precondition:ct.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));We(new bn({id:"toggleSuggestionFocus",precondition:ct.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2570,mac:{primary:778}}}));We(new bn({id:"insertBestCompletion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),kp.AtEnd,ct.Visible.toNegated(),Ld.OtherSuggestions.toNegated(),rr.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(Fv(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:bo,primary:2}}));We(new bn({id:"insertNextSuggestion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),Ld.OtherSuggestions,ct.Visible.toNegated(),rr.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:2}}));We(new bn({id:"insertPrevSuggestion",precondition:fe.and(F.textInputFocus,fe.equals("config.editor.tabCompletion","on"),Ld.OtherSuggestions,ct.Visible.toNegated(),rr.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:bo,kbExpr:F.textInputFocus,primary:1026}}));ee(class extends de{constructor(){super({id:"editor.action.resetSuggestSize",label:b("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(i,e){var t;(t=jo.get(e))===null||t===void 0||t.resetWidgetSize()}})});function dbe(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}var rC,Ob,Z$=N(()=>{Jt();ke();ci();et();hn();ah();ZL();iC();_a();VL();pi();rC=class extends ce{get selectedItem(){return this._selectedItem}constructor(e,t,r,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=r,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=va("suggestWidgetInlineCompletionProvider.selectedItem",void 0),this._register(e.onKeyDown(s=>{s.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(s=>{s.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));let o=jo.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(l,c,d)=>{var u;nn(_=>this.checkModelVersion(_));let h=this.editor.getModel();if(!h)return-1;let f=(u=this.suggestControllerPreselector())===null||u===void 0?void 0:u.removeCommonPrefix(h);if(!f)return-1;let m=Ie.lift(c),g=d.map((_,E)=>{let L=Ob.fromSuggestion(o,h,m,_,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),O=f.augments(L);return{index:E,valid:O,prefixLength:L.text.length,suggestItem:_}}).filter(_=>_&&_.valid&&_.prefixLength>0),w=PP(g,NP(_=>_.prefixLength,RP));return w?w.index:-1}}));let s=!1,a=()=>{s||(s=!0,this._register(o.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(o.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(o.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(li.once(o.model.onDidTrigger)(l=>{a()})),this._register(o.onWillInsertSuggestItem(l=>{let c=this.editor.getPosition(),d=this.editor.getModel();if(!c||!d)return;let u=Ob.fromSuggestion(o,d,c,l.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){let t=this.getSuggestItemInfo();(this._isActive!==e||!dbe(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,nn(r=>{this.checkModelVersion(r),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,r)}))}getSuggestItemInfo(){let e=jo.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;let t=e.widget.value.getFocusedItem(),r=this.editor.getPosition(),n=this.editor.getModel();if(!(!t||!r||!n))return Ob.fromSuggestion(e,n,r,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){let e=jo.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){let e=jo.get(this.editor);e==null||e.forceRenderingAbove()}},Ob=class i{static fromSuggestion(e,t,r,n,o){let{insertText:s}=n.completion,a=!1;if(n.completion.insertTextRules&4){let c=new Ho().parse(s);c.children.length<100&&wp.adjustWhitespace(t,r,!0,c),s=c.toString(),a=!0}let l=e.getOverwriteInfo(n,o);return new i(B.fromPositions(r.delta(0,-l.overwriteBefore),r.delta(0,Math.max(l.overwriteAfter,0))),s,n.completion.kind,a)}constructor(e,t,r,n){this.range=e,this.insertText=t,this.completionItemKind=r,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new HO(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new lh(this.range,this.insertText)}}});var ube,Pd,yA,vn,nC=N(()=>{Eo();Jt();ke();_a();r_();ci();Ls();Rt();T2();h$();I2();O2();z$();Z$();He();tne();Wi();Cr();wt();Ht();Ur();ube=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Pd=function(i,e){return function(t,r){e(t,r,i)}},vn=yA=class extends ce{static get(e){return e.getContribution(yA.ID)}constructor(e,t,r,n,o,s,a,l,c){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=r,this.configurationService=n,this.commandService=o,this.debounceService=s,this.languageFeaturesService=a,this.audioCueService=l,this._keybindingService=c,this.model=rg("inlineCompletionModel",void 0),this.textModelVersionId=va("textModelVersionId",-1),this.cursorPosition=va("cursorPosition",new Ie(1,1)),this.suggestWidgetAdaptor=this._register(new rC(this.editor,()=>{var h,f;return(f=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||f===void 0?void 0:f.toSingleTextEdit(void 0)},h=>this.updateObservables(h,to.Other),h=>{nn(f=>{var m;this.updateObservables(f,to.Other),(m=this.model.get())===null||m===void 0||m.handleSuggestAccepted(h)})})),this._enabled=Sl(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(61).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(D2,this.editor,{ghostText:this.model.map((h,f)=>h==null?void 0:h.ghostText.read(f)),minReservedLineCount:V_(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new vr(this.contextKeyService,this.model)),this._register(li.runAndSubscribe(e.onDidChangeModel,()=>nn(h=>{this.model.set(void 0,h),this.updateObservables(h,to.Other);let f=e.getModel();if(f){let m=t.createInstance(V2,f,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,Sl(e.onDidChangeConfiguration,()=>e.getOption(116).preview),Sl(e.onDidChangeConfiguration,()=>e.getOption(116).previewMode),Sl(e.onDidChangeConfiguration,()=>e.getOption(61).mode),this._enabled);this.model.set(m,h)}})));let d=h=>{var f;return h.isUndoing?to.Undo:h.isRedoing?to.Redo:!((f=this.model.get())===null||f===void 0)&&f.isAcceptingPartially?to.AcceptWord:to.Other};this._register(e.onDidChangeModelContent(h=>nn(f=>this.updateObservables(f,d(h))))),this._register(e.onDidChangeCursorPosition(h=>nn(f=>{var m;this.updateObservables(f,to.Other),(h.reason===3||h.source==="api")&&((m=this.model.get())===null||m===void 0||m.stop(f))}))),this._register(e.onDidType(()=>nn(h=>{var f;this.updateObservables(h,to.Other),this._enabled.get()&&((f=this.model.get())===null||f===void 0||f.trigger(h))}))),this._register(this.commandService.onDidExecuteCommand(h=>{new Set([af.Tab.id,af.DeleteLeft.id,af.DeleteRight.id,S2,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&nn(m=>{var g;(g=this.model.get())===null||g===void 0||g.trigger(m)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(61).keepOnBlur||Ws.dropDownVisible||nn(h=>{var f;(f=this.model.get())===null||f===void 0||f.stop(h)})})),this._register(fn(h=>{var f;let m=(f=this.model.read(h))===null||f===void 0?void 0:f.state.read(h);m!=null&&m.suggestItem?m.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(ii(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let u;this._register(fn(h=>{let f=this.model.read(h),m=f==null?void 0:f.state.read(h);if(!f||!m||!m.inlineCompletion){u=void 0;return}if(m.inlineCompletion.semanticId!==u){u=m.inlineCompletion.semanticId;let g=f.textModel.getLineContent(m.ghostText.lineNumber);this.audioCueService.playAudioCue(oz.inlineSuggestion).then(()=>{this.editor.getOption(7)&&this.provideScreenReaderUpdate(m.ghostText.renderForScreenReader(g))})}})),this._register(new P2(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){let t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"),n;!t&&r&&this.editor.getOption(146)&&(n=b("showAccessibleViewHint","Inspect this in the accessible view ({0})",r.getAriaLabel())),n?sr(e+", "+n):sr(e)}updateObservables(e,t){var r,n;let o=this.editor.getModel();this.textModelVersionId.set((r=o==null?void 0:o.getVersionId())!==null&&r!==void 0?r:-1,e,t),this.cursorPosition.set((n=this.editor.getPosition())!==null&&n!==void 0?n:new Ie(1,1),e)}shouldShowHoverAt(e){var t;let r=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return r?r.parts.some(n=>e.containsPosition(new Ie(r.lineNumber,n.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};vn.ID="editor.contrib.inlineCompletionsController";vn=yA=ube([Pd(1,Ke),Pd(2,it),Pd(3,Dt),Pd(4,vi),Pd(5,ar),Pd(6,Se),Pd(7,nz),Pd(8,qt)],vn)});var Od,Fb,zb,oC,sC,aC,lC,Bb,Hb,J$=N(()=>{_a();lt();ei();T2();I2();nC();ch();He();Zi();Cr();wt();Od=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Fb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);(r=n==null?void 0:n.model.get())===null||r===void 0||r.next()})}};Fb.ID=E2;zb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);(r=n==null?void 0:n.model.get())===null||r===void 0||r.previous()})}};zb.ID=k2;oC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:b("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:F.writable})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);(r=n==null?void 0:n.model.get())===null||r===void 0||r.triggerExplicitly()})}},sC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:b("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:fe.and(F.writable,vr.inlineSuggestionVisible)},menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);yield(r=n==null?void 0:n.model.get())===null||r===void 0?void 0:r.acceptNextWord(n.editor)})}},aC=class extends de{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:b("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:fe.and(F.writable,vr.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);yield(r=n==null?void 0:n.model.get())===null||r===void 0?void 0:r.acceptNextLine(n.editor)})}},lC=class extends de{constructor(){super({id:S2,label:b("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:vr.inlineSuggestionVisible,menuOpts:[{menuId:Me.InlineSuggestionToolbar,title:b("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:fe.and(vr.inlineSuggestionVisible,F.tabMovesFocus.toNegated(),vr.inlineSuggestionHasIndentationLessThanTabSize,ct.Visible.toNegated(),F.hoverFocused.toNegated())}})}run(e,t){var r;return Od(this,void 0,void 0,function*(){let n=vn.get(t);n&&((r=n.model.get())===null||r===void 0||r.accept(n.editor),n.editor.focus())})}},Bb=class i extends de{constructor(){super({id:i.ID,label:b("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:vr.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return Od(this,void 0,void 0,function*(){let r=vn.get(t);nn(n=>{var o;(o=r==null?void 0:r.model.get())===null||o===void 0||o.stop(n)})})}};Bb.ID="editor.action.inlineSuggest.hide";Hb=class i extends Qo{constructor(){super({id:i.ID,title:b("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Me.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:fe.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return Od(this,void 0,void 0,function*(){let r=e.get(Dt),o=r.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";r.updateValue("editor.inlineSuggest.showToolbar",o)})}};Hb.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"});var hbe,Ub,wA,cC,eG=N(()=>{Bt();Ss();ke();_a();et();Zo();ec();nC();O2();xd();He();$_();Ht();es();Oc();hbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ub=function(i,e){return function(t,r){e(t,r,i)}},wA=class{constructor(e,t,r){this.owner=e,this.range=t,this.controller=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},cC=class{constructor(e,t,r,n,o,s){this._editor=e,this._languageService=t,this._openerService=r,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){let t=vn.get(this._editor);if(!t)return null;let r=e.target;if(r.type===8){let n=r.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new Ed(1e3,this,B.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return r.type===7&&t.shouldShowHoverAt(r.range)?new Ed(1e3,this,r.range,e.event.posx,e.event.posy,!1):r.type===6&&r.detail.mightBeForeignElement&&t.shouldShowHoverAt(r.range)?new Ed(1e3,this,r.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(61).showToolbar==="always")return[];let r=vn.get(this._editor);return r&&r.shouldShowHoverAt(e.range)?[new wA(this,e.range,r)]:[]}renderHoverParts(e,t){let r=new le,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(7)&&this.renderScreenReaderText(e,n,r);let o=n.controller.model.get(),s=this._instantiationService.createInstance(Ws,this._editor,!1,V_(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(),r.add(s),r}renderScreenReaderText(e,t,r){let n=Le,o=n("div.hover-row.markdown-hover"),s=Te(o,n("div.hover-contents",{"aria-live":"assertive"})),a=r.add(new eo({editor:this._editor},this._languageService,this._openerService)),l=c=>{r.add(a.onDidRenderAsync(()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()}));let d=b("inlineSuggestionFollows","Suggestion:"),u=r.add(a.render(new Ki().appendText(d).appendCodeblock("text",c)));s.replaceChildren(u.element)};r.add(fn(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 lu(s)})),e.fragment.appendChild(o)}};cC=hbe([Ub(1,Ji),Ub(2,er),Ub(3,Cf),Ub(4,Ke),Ub(5,Ln)],cC)});var xA=N(()=>{lt();ec();J$();eG();nC();Zi();Ue(vn.ID,vn,3);ee(oC);ee(Fb);ee(zb);ee(sC);ee(aC);ee(lC);ee(Bb);Ci(Hb);Bo.register(cC)});var tG=N(()=>{});var iG=N(()=>{tG()});var rG=N(()=>{});var nG=N(()=>{rG()});var oG,fbe,pbe,CA,SA,dC,uC,sG=N(()=>{Bt();gk();aa();lF();ke();J3();nG();et();Hr();oG=new vt(new ks(0,122,204)),fbe={showArrow:!0,showFrame:!0,className:"",frameColor:oG,arrowColor:oG,keepEditorSelection:!1},pbe="vs.editor.contrib.zoneWidget",CA=class{constructor(e,t,r,n,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=r,this.heightInLines=n,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}},SA=class{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}},dC=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(),P3(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(){P3(this._ruleName),lP(`.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:B.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};dC._IdGenerator=new sF(".arrow-decoration-");uC=class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new le,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=iO(t),uf(this.options,fbe,!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(r=>{let n=this._getWidth(r);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(r)+"px",this._onWidth(n)}))}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 dC(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 r=e-this._decoratingElementsHeight();this.container.style.height=`${r}px`;let n=this.editor.getLayoutInfo();this._doLayout(r,this._getWidth(n))}(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 r=B.isIRange(e)?B.lift(e):B.fromPositions(e);this._isShowing=!0,this._showImpl(r,t),this._isShowing=!1,this._positionMarkerId.set([{range:r,options:mt.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(65),t=0;if(this.options.showArrow){let r=Math.round(e/3);t+=2*r}if(this.options.showFrame){let r=Math.round(e/9);t+=2*r}return t}_showImpl(e,t){let r=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";let s=document.createElement("div");s.style.overflow="hidden";let a=this.editor.getOption(65);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(r)),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 CA(s,r.lineNumber,r.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new SA(pbe+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 B(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 wl(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 r=(t.currentY-e.startY)/this.editor.getOption(65),n=r<0?Math.ceil(r):Math.floor(r),o=e.heightInLines+n;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 cG(i){let e=i.get(si).getFocusedCodeEditor();return e instanceof Uo?e.getParentEditor():e}var aG,lG,kA,Rr,jb,mbe,Dp,dG,hC,fC,uG,hG,Itt,Ltt,Att,Dtt,Fd,Mtt,Ntt,Rtt,Ptt,Ott,dh=N(()=>{Bt();tg();Rc();Qr();In();aa();Jt();J3();iG();lt();Tn();Tp();sG();He();X_();wt();dl();Ht();en();aG=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},lG=function(i,e){return function(t,r){e(t,r,i)}},kA=Xr("IPeekViewService");Jr(kA,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){let t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());let r=()=>{let n=this._widgets.get(i);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(r)})}},1);(function(i){i.inPeekEditor=new ht("inReferenceSearchEditor",!0,b("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(Rr||(Rr={}));jb=class{constructor(e,t){e instanceof Uo&&Rr.inPeekEditor.bindTo(t)}dispose(){}};jb.ID="editor.contrib.referenceController";jb=aG([lG(1,it)],jb);Ue(jb.ID,jb,0);mbe={headerBackgroundColor:vt.white,primaryHeadingColor:vt.fromHex("#333333"),secondaryHeadingColor:vt.fromHex("#6c6c6cb3")},Dp=class extends uC{constructor(e,t,r){super(e,t),this.instantiationService=r,this._onDidClose=new Je,this.onDidClose=this._onDidClose.event,uf(this.options,mbe,!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=Le(".head"),this._bodyElement=Le(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=Le(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),ko(this._titleElement,"click",o=>this._onTitleClick(o))),Te(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Le("span.filename"),this._secondaryHeading=Le("span.dirname"),this._metaHeading=Le("span.meta"),Te(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);let r=Le(".peekview-actions");Te(this._headElement,r);let n=this._getActionBarOptions();this._actionbarWidget=new Is(r,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Yo("peekview.close",b("label.close","Close"),_t.asClassName(pt.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:GF.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:Vn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,dn(this._metaHeading)):zr(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}let r=Math.ceil(this.editor.getOption(65)*1.2),n=Math.round(e-(r+2));this._doLayoutHead(r,t),this._doLayoutBody(n,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`)}};Dp=aG([lG(2,Ke)],Dp);dG=je("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:vt.black,hcLight:vt.white},b("peekViewTitleBackground","Background color of the peek view title area.")),hC=je("peekViewTitleLabel.foreground",{dark:vt.white,light:vt.black,hcDark:vt.white,hcLight:da},b("peekViewTitleForeground","Color of the peek view title.")),fC=je("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},b("peekViewTitleInfoForeground","Color of the peek view title info.")),uG=je("peekView.border",{dark:Bm,light:Bm,hcDark:Jo,hcLight:Jo},b("peekViewBorder","Color of the peek view borders and arrow.")),hG=je("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:vt.black,hcLight:vt.white},b("peekViewResultsBackground","Background color of the peek view result list.")),Itt=je("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:vt.white,hcLight:da},b("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Ltt=je("peekViewResult.fileForeground",{dark:vt.white,light:"#1E1E1E",hcDark:vt.white,hcLight:da},b("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),Att=je("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},b("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Dtt=je("peekViewResult.selectionForeground",{dark:vt.white,light:"#6C6C6C",hcDark:vt.white,hcLight:da},b("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Fd=je("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:vt.black,hcLight:vt.white},b("peekViewEditorBackground","Background color of the peek view editor.")),Mtt=je("peekViewEditorGutter.background",{dark:Fd,light:Fd,hcDark:Fd,hcLight:Fd},b("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Ntt=je("peekViewEditorStickyScroll.background",{dark:Fd,light:Fd,hcDark:Fd,hcLight:Fd},b("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),Rtt=je("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},b("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),Ptt=je("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},b("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Ott=je("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:ca,hcLight:ca},b("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))});var bbe,Wo,EA,sc,Bn,Mp=N(()=>{Vt();Jt();lF();ke();lf();Io();Di();et();He();bbe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Wo=class{constructor(e,t,r,n){this.isProviderFirst=e,this.parent=t,this.link=r,this._rangeCallback=n,this.id=aF.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?b({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,An(this.uri),this.range.startLineNumber,this.range.startColumn):b("aria.oneReference","in {0} on line {1} at column {2}",An(this.uri),this.range.startLineNumber,this.range.startColumn)}},EA=class{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){let r=this._modelReference.object.textEditorModel;if(!r)return;let{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:a}=e,l=r.getWordUntilPosition({lineNumber:n,column:o-t}),c=new B(n,l.startColumn,n,o),d=new B(s,a,s,1073741824),u=r.getValueInRange(c).replace(/^\s+/,""),h=r.getValueInRange(e),f=r.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+f,highlight:{start:u.length,end:u.length+h.length}}}},sc=class{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new BP}dispose(){Ui(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){let e=this.children.length;return e===1?b("aria.fileReferences.1","1 symbol in {0}, full path {1}",An(this.uri),this.uri.fsPath):b("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,An(this.uri),this.uri.fsPath)}resolve(e){return bbe(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 r=yield e.createModelReference(t.uri);this._previews.set(t.uri,new EA(r))}catch(r){ft(r)}return this})}},Bn=class i{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Je,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;let[r]=e;e.sort(i._compareReferences);let n;for(let o of e)if((!n||!Z3.isEqual(n.uri,o.uri,!0))&&(n=new sc(this,o.uri),this.groups.push(n)),n.children.length===0||i._compareReferences(o,n.children[n.children.length-1])!==0){let s=new Wo(r===o,n,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),n.children.push(s)}}dispose(){Ui(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?b("aria.result.0","No results found"):this.references.length===1?b("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?b("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):b("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:r}=e,n=r.children.indexOf(e),o=r.children.length,s=r.parent.groups.length;return s===1||t&&n+1<o||!t&&n>0?(t?n=(n+1)%o:n=(n+o-1)%o,r.children[n]):(n=r.parent.groups.indexOf(r),t?(n=(n+1)%s,r.parent.groups[n].children[0]):(n=(n+s-1)%s,r.parent.groups[n].children[r.parent.groups[n].children.length-1]))}nearestReference(e,t){let r=this.references.map((n,o)=>({idx:o,prefixLen:Pc(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,o)=>n.prefixLen>o.prefixLen?-1:n.prefixLen<o.prefixLen?1:n.offsetDist<o.offsetDist?-1:n.offsetDist>o.offsetDist?1:0)[0];if(r)return this.references[r.idx]}referenceAt(e,t){for(let r of this.references)if(r.uri.toString()===e.toString()&&B.containsPosition(r.range,t))return r}firstReference(){for(let e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return Z3.compare(e.uri,t.uri)||B.compareRangesUsingStarts(e.range,t.range)}}});var fG=N(()=>{});var pG=N(()=>{fG()});var _C,yC,TA,pC,mC,gC,bC,IA,Np,LA,Rp,vC,mG=N(()=>{Bt();rne();ene();rz();hl();ke();Io();ta();He();Ht();Ur();Q_();N_();Mp();_C=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},yC=function(i,e){return function(t,r){e(t,r,i)}},pC=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Bn||e instanceof sc}getChildren(e){if(e instanceof Bn)return e.groups;if(e instanceof sc)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};pC=_C([yC(0,xr)],pC);mC=class{getHeight(){return 23}getTemplateId(e){return e instanceof sc?Np.id:Rp.id}},gC=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Wo){let r=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(r)return r.value}return An(e.uri)}};gC=_C([yC(0,qt)],gC);bC=class{getId(e){return e instanceof Wo?e.id:e.uri}},IA=class extends ce{constructor(e,t){super(),this._labelService=t;let r=document.createElement("div");r.classList.add("reference-file"),this.file=this._register(new J_(r,{supportHighlights:!0})),this.badge=new dz(Te(r,Le(".count")),{},vF),e.appendChild(r)}set(e,t){let r=cf(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(r,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});let n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(b("referencesCount","{0} references",n)):this.badge.setTitleFormat(b("referenceCount","{0} reference",n))}};IA=_C([yC(1,kl)],IA);Np=TA=class{constructor(e){this._instantiationService=e,this.templateId=TA.id}renderTemplate(e){return this._instantiationService.createInstance(IA,e)}renderElement(e,t,r){r.set(e.element,pu(e.filterData))}disposeTemplate(e){e.dispose()}};Np.id="FileReferencesRenderer";Np=TA=_C([yC(0,Ke)],Np);LA=class{constructor(e){this.label=new iz(e)}set(e,t){var r;let n=(r=e.parent.getPreview(e))===null||r===void 0?void 0:r.preview(e.range);if(!n||!n.value)this.label.set(`${An(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{let{value:o,highlight:s}=n;t&&!ul.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,pu(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}},Rp=class i{constructor(){this.templateId=i.id}renderTemplate(e){return new LA(e)}renderElement(e,t,r){r.set(e.element,e.filterData)}disposeTemplate(){}};Rp.id="OneReferenceRenderer";vC=class{getWidgetAriaLabel(){return b("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}});var vbe,ac,gG,wC,xC,AA,CC,bG=N(()=>{Bt();ine();aa();Jt();ke();Im();Io();pG();Tp();et();Hr();Br();X3();Zo();ta();mG();dh();He();Ht();Ur();Q_();cz();tn();Lre();Mp();vbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ac=function(i,e){return function(t,r){e(t,r,i)}},gG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},wC=class i{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new le,this._callOnModelChange=new le,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=[],r=[];for(let n=0,o=e.children.length;n<o;n++){let s=e.children[n];this._decorationIgnoreSet.has(s.id)||s.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:s.range,options:i.DecorationOptions}),r.push(n))}this._editor.changeDecorations(n=>{let o=n.deltaDecorations([],t);for(let s=0;s<o.length;s++)this._decorations.set(o[s],e.children[r[s]])})}_onDecorationChanged(){let e=[],t=this._editor.getModel();if(t){for(let[r,n]of this._decorations){let o=t.getDecorationRange(r);if(!o)continue;let s=!1;if(!B.equalsRange(o,n.range)){if(B.spansMultipleLines(o))s=!0;else{let a=n.range.endColumn-n.range.startColumn,l=o.endColumn-o.startColumn;a!==l&&(s=!0)}s?(this._decorationIgnoreSet.add(n.id),e.push(r)):n.range=o}}for(let r=0,n=e.length;r<n;r++)this._decorations.delete(e[r]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}};wC.DecorationOptions=mt.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});xC=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,r;try{let n=JSON.parse(e);t=n.ratio,r=n.heightInLines}catch(n){}return{ratio:t||.7,heightInLines:r||18}}},AA=class extends lz{},CC=class extends Dp{constructor(e,t,r,n,o,s,a,l,c,d,u,h){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},s),this._defaultTreeKeyboardSupport=t,this.layoutData=r,this._textModelResolverService=o,this._instantiationService=s,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=d,this._languageService=u,this._languageConfigurationService=h,this._disposeOnNewModel=new le,this._callOnDispose=new le,this._onDidSelectReference=new Je,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Xt(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),Ui(this._preview),Ui(this._previewNotAvailableMessage),Ui(this._tree),Ui(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){let t=e.getColor(uG)||vt.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(dG)||vt.transparent,primaryHeadingColor:e.getColor(hC),secondaryHeadingColor:e.getColor(fC)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=Te(e,Le("div.messages")),zr(this._messageContainer),this._splitView=new sz(e,{orientation:1}),this._previewContainer=Te(e,Le("div.preview.inline"));let t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Uo,this._previewContainer,t,{},this.editor),zr(this._previewContainer),this._previewNotAvailableMessage=new sk(b("missingPreviewMessage","no preview available"),sf,sk.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=Te(e,Le("div.ref-tree.inline"));let r={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new vC,keyboardNavigationLabelProvider:this._instantiationService.createInstance(gC),identityProvider:new bC,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:hG}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(ko(this._treeContainer,"keydown",o=>{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(AA,"ReferencesWidget",this._treeContainer,new mC,[this._instantiationService.createInstance(Np),this._instantiationService.createInstance(Rp)],this._instantiationService.createInstance(pC),r),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})}},Tk.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)}},Tk.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let n=(o,s)=>{o instanceof Wo&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?n(o.element,"side"):o.editorOptions.pinned?n(o.element,"goto"):n(o.element,"show")}),zr(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Xt(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=b("noResults","No results"),dn(this._messageContainer),Promise.resolve(void 0)):(zr(this._messageContainer),this._decorationsManager=new wC(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:r}=e;if(t.detail!==2)return;let n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:r.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),dn(this._treeContainer),dn(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 Wo)return e;if(e instanceof sc&&e.children.length>0)return e.children[0]}revealReference(e){return gG(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return gG(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==So.inMemory?this.setTitle(XP(e.uri),this._uriLabel.getUriLabel(cf(e.uri))):this.setTitle(b("peekView.alternateTitle","References"));let r=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 n=yield r;if(!this._model){n.dispose();return}Ui(this._previewModelReference);let o=n.object;if(o){let s=this._preview.getModel()===o.textEditorModel?0:1,a=B.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};CC=vbe([ac(3,gr),ac(4,xr),ac(5,Ke),ac(6,kA),ac(7,kl),ac(8,YO),ac(9,qt),ac(10,Ji),ac(11,Pt)],CC)});function hh(i,e){let t=cG(i);if(!t)return;let r=Ga.get(t);r&&e(r)}var _be,Pp,vG,SC,uh,Ga,DA=N(()=>{Ut();Vt();sl();ke();Tn();ci();et();dh();He();Wi();Cr();wt();Ht();U3();cz();Ao();_u();Mp();bG();_be=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Pp=function(i,e){return function(t,r){e(t,r,i)}},vG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},uh=new ht("referenceSearchVisible",!1,b("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'")),Ga=SC=class{static get(e){return e.getContribution(SC.ID)}constructor(e,t,r,n,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new le,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=uh.bindTo(r)}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,r){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=r,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=xC.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(CC,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(b("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":r?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(b("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,u=new Ie(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(85)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return vG(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;let t=this._widget.position;if(!t)return;let r=this._model.nearestReference(this._editor.getModel().uri,t);if(!r)return;let n=this._model.nextOrPreviousReference(r,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return vG(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,r;(t=this._widget)===null||t===void 0||t.dispose(),(r=this._model)===null||r===void 0||r.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 r;(r=this._widget)===null||r===void 0||r.hide(),this._ignoreModelChangeEvent=!0;let n=B.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,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(n),this._widget.focusOnReferenceTree();else{let a=SC.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(n,Zt(c=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,ft(o)})}openReference(e,t,r){t||this.closeWidget();let{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:r}},this._editor,t)}};Ga.ID="editor.contrib.referencesController";Ga=SC=_be([Pp(2,it),Pp(3,si),Pp(4,Mi),Pp(5,Ke),Pp(6,Gn),Pp(7,Dt)],Ga);To.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:mi(2089,60),when:fe.or(uh,Rr.inPeekEditor),handler(i){hh(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});To.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:fe.or(uh,Rr.inPeekEditor),handler(i){hh(i,e=>{e.goToNextOrPreviousReference(!0)})}});To.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:fe.or(uh,Rr.inPeekEditor),handler(i){hh(i,e=>{e.goToNextOrPreviousReference(!1)})}});At.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");At.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");At.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");At.registerCommand("closeReferenceSearch",i=>hh(i,e=>e.closeWidget()));To.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:fe.and(Rr.inPeekEditor,fe.not("config.editor.stablePeek"))});To.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:fe.and(uh,fe.not("config.editor.stablePeek"))});To.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:fe.and(uh,Lk,Ak.negate(),Dk.negate()),handler(i){var e;let r=(e=i.get(ey).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(r)&&r[0]instanceof Wo&&hh(i,n=>n.revealReference(r[0]))}});To.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:fe.and(uh,Lk,Ak.negate(),Dk.negate()),handler(i){var e;let r=(e=i.get(ey).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(r)&&r[0]instanceof Wo&&hh(i,n=>n.openReference(r[0],!0,!0))}});At.registerCommand("openReference",i=>{var e;let r=(e=i.get(ey).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(r)&&r[0]instanceof Wo&&hh(i,n=>n.openReference(r[0],!1,!0))})});var _G,Wb,RA,Vb,MA,NA,yG=N(()=>{Jt();ke();Io();lt();Tn();et();He();wt();dl();Ht();Ur();U3();Ao();_G=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Wb=function(i,e){return function(t,r){e(t,r,i)}},RA=new ht("hasSymbols",!1,b("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Vb=Xr("ISymbolNavigationService"),MA=class{constructor(e,t,r,n){this._editorService=t,this._notificationService=r,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=RA.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 r=new NA(this._editorService),n=r.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(s_(u.uri,a.uri))c=!0,d=d||B.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=A3(r,n)}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:B.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"),r=t?b("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):b("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(r)}};MA=_G([Wb(0,it),Wb(1,si),Wb(2,Mi),Wb(3,qt)],MA);Jr(Vb,MA,1);We(new class extends Oi{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:RA,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(Vb).revealNext(e)}});To.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:RA,primary:9,handler(i){i.get(Vb).reset()}});NA=class{constructor(e){this._listener=new Map,this._disposables=new le,this._onDidChange=new Je,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(),Ui(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,A3(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)}};NA=_G([Wb(0,si)],NA)});function qb(i,e,t,r){return PA(this,void 0,void 0,function*(){let o=t.ordered(i).map(a=>Promise.resolve(r(a,i,e)).then(void 0,l=>{Yt(l)})),s=yield Promise.all(o);return un(s.flat())})}function fh(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideDefinition(o,s,r))}function OA(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideDeclaration(o,s,r))}function FA(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideImplementation(o,s,r))}function zA(i,e,t,r){return qb(e,t,i,(n,o,s)=>n.provideTypeDefinition(o,s,r))}function Kb(i,e,t,r,n){return qb(e,t,i,(o,s,a)=>PA(this,void 0,void 0,function*(){let l=yield o.provideReferences(s,a,{includeDeclaration:!0},n);if(!r||!l||l.length!==2)return l;let c=yield o.provideReferences(s,a,{includeDeclaration:!1},n);return c&&c.length===1?c:l}))}function $b(i){return PA(this,void 0,void 0,function*(){let e=yield i(),t=new Bn(e,""),r=t.references.map(n=>n.link);return t.dispose(),r})}var PA,kC=N(()=>{pi();Si();Vt();lt();Rt();Mp();PA=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Kn("_executeDefinitionProvider",(i,e,t)=>{let r=i.get(Se),n=fh(r.definitionProvider,e,t,st.None);return $b(()=>n)});Kn("_executeTypeDefinitionProvider",(i,e,t)=>{let r=i.get(Se),n=zA(r.typeDefinitionProvider,e,t,st.None);return $b(()=>n)});Kn("_executeDeclarationProvider",(i,e,t)=>{let r=i.get(Se),n=OA(r.declarationProvider,e,t,st.None);return $b(()=>n)});Kn("_executeReferenceProvider",(i,e,t)=>{let r=i.get(Se),n=Kb(r.referenceProvider,e,t,!1,st.None);return $b(()=>n)});Kn("_executeImplementationProvider",(i,e,t)=>{let r=i.get(Se),n=FA(r.implementationProvider,e,t,st.None);return $b(()=>n)})});var hs,Gb,Yb,Xb,EC,TC,IC,LC,AC,ph,fs,lc,DC,MC,NC,RC,BA,Qb=N(()=>{Eo();Ut();sl();Fr();Tr();vu();vk();lt();Tn();Tp();ci();et();ei();hn();DA();Mp();yG();L0();dh();He();Zi();Wi();wt();Ht();Ao();Vc();kC();Rt();Qh();az();hs=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Xo.appendMenuItem(Me.EditorContext,{submenu:Me.EditorContextPeek,title:b("peek.submenu","Peek"),group:"navigation",order:100});ph=class i{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof i||Ie.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}},fs=class i extends ra{static all(){return i._allSymbolNavigationCommands.values()}static _patchConfig(e){let t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(let r of Sn.wrap(t.menu))(r.id===Me.EditorContext||r.id===Me.EditorContextPeek)&&(r.when=fe.and(e.precondition,r.when));return t}constructor(e,t){super(i._patchConfig(t)),this.configuration=e,i._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,r,n){if(!t.hasModel())return Promise.resolve(void 0);let o=e.get(Mi),s=e.get(si),a=e.get(gl),l=e.get(Vb),c=e.get(Se),d=e.get(Ke),u=t.getModel(),h=t.getPosition(),f=ph.is(r)?r:new ph(u,h),m=new pa(t,5),g=Uc(this._getLocationModel(c,f.model,f.position,m.token),m.token).then(w=>hs(this,void 0,void 0,function*(){var _;if(!w||m.token.isCancellationRequested)return;sr(w.ariaMessage);let E;if(w.referenceAt(u.uri,h)){let L=this._getAlternativeCommand(t);!i._activeAlternativeCommands.has(L)&&i._allSymbolNavigationCommands.has(L)&&(E=i._allSymbolNavigationCommands.get(L))}let A=w.references.length;if(A===0){if(!this.configuration.muteMessage){let L=u.getWordAtPosition(h);(_=Vr.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(L),h)}}else if(A===1&&E)i._activeAlternativeCommands.add(this.desc.id),d.invokeFunction(L=>E.runEditorCommand(L,t,r,n).finally(()=>{i._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,w,n)}),w=>{o.error(w)}).finally(()=>{m.dispose()});return a.showWhile(g,250),g}_onResult(e,t,r,n,o){return hs(this,void 0,void 0,function*(){let s=this._getGoToPreference(r);if(!(r instanceof Uo)&&(this.configuration.openInPeek||s==="peek"&&n.references.length>1))this._openInPeek(r,n,o);else{let a=n.firstReference(),l=n.references.length>1&&s==="gotoAndPeek",c=yield this._openReference(r,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,n,o):n.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,r,n,o){return hs(this,void 0,void 0,function*(){let s;if(UO(r)&&(s=r.targetSelectionRange),s||(s=r.range),!s)return;let a=yield t.openCodeEditor({resource:r.uri,options:{selection:B.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);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,r){let n=Ga.get(e);n&&e.hasModel()?n.toggleWidget(r!=null?r:e.getSelection(),Zt(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};fs._allSymbolNavigationCommands=new Map;fs._activeAlternativeCommands=new Set;lc=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield fh(e.definitionProvider,t,r,n),b("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?b("noResultWord","No definition found for '{0}'",e.word):b("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleDefinitions}};Ci((Gb=class extends lc{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Gb.id,title:{value:b("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:b({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:fe.and(F.hasDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:[{when:F.editorTextFocus,primary:70,weight:100},{when:fe.and(F.editorTextFocus,Ik),primary:2118,weight:100}],menu:[{id:Me.EditorContext,group:"navigation",order:1.1},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),At.registerCommandAlias("editor.action.goToDeclaration",Gb.id)}},Gb.id="editor.action.revealDefinition",Gb));Ci((Yb=class extends lc{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Yb.id,title:{value:b("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:fe.and(F.hasDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:[{when:F.editorTextFocus,primary:mi(2089,70),weight:100},{when:fe.and(F.editorTextFocus,Ik),primary:mi(2089,2118),weight:100}]}),At.registerCommandAlias("editor.action.openDeclarationToTheSide",Yb.id)}},Yb.id="editor.action.revealDefinitionAside",Yb));Ci((Xb=class extends lc{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Xb.id,title:{value:b("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:fe.and(F.hasDefinitionProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Me.EditorContextPeek,group:"peek",order:2}}),At.registerCommandAlias("editor.action.previewDeclaration",Xb.id)}},Xb.id="editor.action.peekDefinition",Xb));DC=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield OA(e.declarationProvider,t,r,n),b("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?b("decl.noResultWord","No declaration found for '{0}'",e.word):b("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(57).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(57).multipleDeclarations}};Ci((EC=class extends DC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:EC.id,title:{value:b("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:b({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:fe.and(F.hasDeclarationProvider,F.isInWalkThroughSnippet.toNegated()),menu:[{id:Me.EditorContext,group:"navigation",order:1.3},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?b("decl.noResultWord","No declaration found for '{0}'",e.word):b("decl.generic.noResults","No declaration found")}},EC.id="editor.action.revealDeclaration",EC));Ci(class extends DC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:b("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:fe.and(F.hasDeclarationProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:3}})}});MC=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield zA(e.typeDefinitionProvider,t,r,n),b("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?b("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):b("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(57).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(57).multipleTypeDefinitions}};Ci((TC=class extends MC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:TC.ID,title:{value:b("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:b({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:fe.and(F.hasTypeDefinitionProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:0,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.4},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},TC.ID="editor.action.goToTypeDefinition",TC));Ci((IC=class extends MC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:IC.ID,title:{value:b("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:fe.and(F.hasTypeDefinitionProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:4}})}},IC.ID="editor.action.peekTypeDefinition",IC));NC=class extends fs{_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield FA(e.implementationProvider,t,r,n),b("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?b("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):b("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(57).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(57).multipleImplementations}};Ci((LC=class extends NC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:LC.ID,title:{value:b("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:b({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:fe.and(F.hasImplementationProvider,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:2118,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.45},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},LC.ID="editor.action.goToImplementation",LC));Ci((AC=class extends NC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:AC.ID,title:{value:b("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:fe.and(F.hasImplementationProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:3142,weight:100},menu:{id:Me.EditorContextPeek,group:"peek",order:5}})}},AC.ID="editor.action.peekImplementation",AC));RC=class extends fs{_getNoResultFoundMessage(e){return e?b("references.no","No references found for '{0}'",e.word):b("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(57).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(57).multipleReferences}};Ci(class extends RC{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:b("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:b({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:fe.and(F.hasReferenceProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),keybinding:{when:F.editorTextFocus,primary:1094,weight:100},menu:[{id:Me.EditorContext,group:"navigation",order:1.45},{id:Me.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield Kb(e.referenceProvider,t,r,!0,n),b("ref.title","References"))})}});Ci(class extends RC{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:b("references.action.label","Peek References"),original:"Peek References"},precondition:fe.and(F.hasReferenceProvider,Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated()),menu:{id:Me.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(yield Kb(e.referenceProvider,t,r,!1,n),b("ref.title","References"))})}});BA=class extends fs{constructor(e,t,r){super(e,{id:"editor.action.goToLocation",title:{value:b("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:fe.and(Rr.notInPeekEditor,F.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=r}_getLocationModel(e,t,r,n){return hs(this,void 0,void 0,function*(){return new Bn(this._references,b("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&b("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(57).multipleReferences}_getAlternativeCommand(){return""}};At.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:yt},{name:"position",description:"The position at which to start",constraint:Ie.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,r,n,o,s)=>hs(void 0,void 0,void 0,function*(){zt(yt.isUri(e)),zt(Ie.isIPosition(t)),zt(Array.isArray(r)),zt(typeof n=="undefined"||typeof n=="string"),zt(typeof s=="undefined"||typeof s=="boolean");let a=i.get(si),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(bk(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{let d=new class extends BA{_getNoResultFoundMessage(u){return o||super._getNoResultFoundMessage(u)}}({muteMessage:!o,openInPeek:!!s,openToSide:!1},r,n);c.get(Ke).invokeFunction(d.run.bind(d),l)})})});At.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:yt},{name:"position",description:"The position at which to start",constraint:Ie.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,r,n)=>hs(void 0,void 0,void 0,function*(){i.get(vi).executeCommand("editor.action.goToLocations",e,t,r,n,void 0,!0)})});At.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{zt(yt.isUri(e)),zt(Ie.isIPosition(t));let r=i.get(Se),n=i.get(si);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(o=>{if(!bk(o)||!o.hasModel())return;let s=Ga.get(o);if(!s)return;let a=Zt(c=>Kb(r.referenceProvider,o.getModel(),Ie.lift(t),!1,c).then(d=>new Bn(d,b("ref.title","References")))),l=new B(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});At.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")});var wG=N(()=>{});var xG=N(()=>{wG()});function HA(i,e){return!!i[e]}function CG(i){return i==="altKey"?kn?new Op(57,"metaKey",6,"altKey"):new Op(5,"ctrlKey",6,"altKey"):kn?new Op(6,"altKey",57,"metaKey"):new Op(6,"altKey",5,"ctrlKey")}var Zb,PC,Op,Ya,Jb=N(()=>{Jt();ke();En();Zb=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=HA(e.event,t.triggerModifier),this.hasSideBySideModifier=HA(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}},PC=class{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=HA(e,t.triggerModifier)}},Op=class{constructor(e,t,r,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=r,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}};Ya=class extends ce{constructor(e,t){var r;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Je),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Je),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Je),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(r=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&r!==void 0?r:n=>n.target.position?n.target.position.lineNumber:0,this._opts=CG(this._editor.getOption(76)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(76)){let o=CG(this._editor.getOption(76));if(this._opts.equals(o))return;this._opts=o,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new Zb(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new Zb(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new Zb(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new PC(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new PC(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=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){let t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&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 ybe,UA,SG,e1,zd,OC=N(()=>{Ut();Vt();Ss();ke();xG();vu();lt();et();Zo();ta();Jb();dh();He();wt();Qb();kC();Rt();Hr();ybe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},UA=function(i,e){return function(t,r){e(t,r,i)}},SG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},zd=e1=class{constructor(e,t,r,n){this.textModelResolverService=t,this.languageService=r,this.languageFeaturesService=n,this.toUnhook=new le,this.toUnhookForKeyboard=new le,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();let o=new Ya(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,a!=null?a:void 0)})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{ft(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(e1.ID)}startFindDefinitionFromCursor(e){return SG(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 r=e.target.position;this.startFindDefinition(r)}startFindDefinition(e){var t;return SG(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();let r=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!r){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===r.startColumn&&this.currentWordAtPosition.endColumn===r.endColumn&&this.currentWordAtPosition.word===r.word)return;this.currentWordAtPosition=r;let n=new S_(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Zt(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){ft(a);return}if(!o||!o.length||!n.validate(this.editor)){this.removeLinkDecorations();return}let s=o[0].originSelectionRange?B.lift(o[0].originSelectionRange):new B(e.lineNumber,r.startColumn,e.lineNumber,r.endColumn);if(o.length>1){let a=s;for(let{originSelectionRange:l}of o)l&&(a=B.plusRange(a,l));this.addDecoration(a,new Ki().appendText(b("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 Ki().appendCodeblock(h||"",u):void 0),l.dispose()})}})}getPreviewValue(e,t,r){let n=r.range;return n.endLineNumber-n.startLineNumber>=e1.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,r){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<r.endLineNumber;a++){let l=e.getLineFirstNonWhitespaceColumn(a);o=Math.min(o,l)}return e.getValueInRange(r).replace(new RegExp(`^\\s{${o-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){let r=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+e1.MAX_SOURCE_PREVIEW_LINES),o=t+1;for(;o<n;o++){let s=e.getLineFirstNonWhitespaceColumn(o);if(r===s)break}return new B(t,1,o+1,1)}addDecoration(e,t){let r={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([r])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var r;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((r=e.target.detail.injectedText)===null||r===void 0?void 0:r.options)instanceof vf)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){let r=this.editor.getModel();return r?fh(this.languageFeaturesService.definitionProvider,r,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(r=>{let n=!t&&this.editor.getOption(86)&&!this.isInPeekEditor(r);return new lc({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(r)})}isInPeekEditor(e){let t=e.get(it);return Rr.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};zd.ID="editor.contrib.gotodefinitionatposition";zd.MAX_SOURCE_PREVIEW_LINES=8;zd=e1=ybe([UA(1,xr),UA(2,Ji),UA(3,Se)],zd);Ue(zd.ID,zd,2)});var kG,FC,zC,jA,VA,WA,EG=N(()=>{pi();Jt();ke();U9();Di();Tr();et();dl();Ht();R_();Cr();kG=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},FC=function(i,e){return function(t,r){e(t,r,i)}},zC=class{constructor(e,t,r){this.marker=e,this.index=t,this.total=r}},jA=class{constructor(e,t,r){this._markerService=t,this._configService=r,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._dispoables=new le,this._markers=[],this._nextIdx=-1,yt.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);let n=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let c=F3(a.resource.toString(),l.resource.toString());return c===0&&(n==="position"?c=B.compareRangesUsingStarts(a,l)||Lr.compare(a.severity,l.severity):c=Lr.compare(a.severity,l.severity)||B.compareRangesUsingStarts(a,l)),c},s=()=>{this._markers=this._markerService.read({resource:yt.isUri(e)?e:void 0,severities:Lr.Error|Lr.Warning|Lr.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 zC(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,r){let n=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=hu(this._markers,{resource:e.uri},(s,a)=>F3(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;s<this._markers.length;s++){let a=B.lift(this._markers[s]);if(a.isEmpty()){let l=e.getWordAtPosition(a.getStartPosition());l&&(a=new B(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=s,n=!0;break}if(this._markers[s].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=r?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,r){if(this._markers.length===0)return!1;let n=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,r,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let r=this._markers.findIndex(n=>n.resource.toString()===e.toString());if(!(r<0)){for(;r<this._markers.length;r++)if(B.containsPosition(this._markers[r],t))return new zC(this._markers[r],r+1,this._markers.length)}}};jA=kG([FC(1,ig),FC(2,Dt)],jA);VA=Xr("IMarkerNavigationService"),WA=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new Pv}getMarkerList(e){for(let t of this._provider){let r=t.getMarkerList(e);if(r)return r}return new jA(e,this._markerService,this._configService)}};WA=kG([FC(0,ig),FC(1,Dt)],WA);Jr(VA,WA,1)});var TG=N(()=>{});var IG=N(()=>{TG()});var LG=N(()=>{});var AG=N(()=>{LG()});var BC,DG=N(()=>{AG();Qr();In();Dre();(function(i){function e(t){switch(t){case Jm.Ignore:return"severity-ignore "+_t.asClassName(pt.info);case Jm.Info:return _t.asClassName(pt.info);case Jm.Warning:return _t.asClassName(pt.warning);case Jm.Error:return _t.asClassName(pt.error);default:return""}}i.className=e})(BC||(BC={}))});var wbe,Fp,qA,KA,mh,MG,NG,RG,$A,xbe,HC,Cbe,GA,Sbe,kbe,PG=N(()=>{Bt();A_();pi();aa();Jt();ke();Io();Di();IG();et();dh();He();X_();Zi();wt();Ht();Q_();R_();es();DG();en();tn();wbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Fp=function(i,e){return function(t,r){e(t,r,i)}},KA=class{constructor(e,t,r,n,o){this._openerService=n,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new le,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(ko(this._relatedBlock,"click",a=>{a.preventDefault();let l=this._relatedDiagnostics.get(a.target);l&&r(l)})),this._scrollable=new fF(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(){Ui(this._disposables)}update(e){let{source:t,message:r,relatedInformation:n,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=du(r);this._lines=a.length,this._longestLineLength=0;for(let h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);Vn(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 f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){let f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=Le("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 f=Te(this._codeLink,Le("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(Vn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),qi(n)){let h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(65)*.66)}px`,this._lines+=1;for(let f of n){let m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,g.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(g,f);let w=document.createElement("span");w.innerText=f.message,m.appendChild(g),m.appendChild(w),this._lines+=1,h.appendChild(m)}}let c=this._editor.getOption(49),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 Lr.Error:t=b("Error","Error");break;case Lr.Warning:t=b("Warning","Warning");break;case Lr.Info:t=b("Info","Info");break;case Lr.Hint:t=b("Hint","Hint");break}let r=b("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(r=`${n.getLineContent(e.startLineNumber)}, ${r}`),r}},mh=qA=class extends Dp{constructor(e,t,r,n,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=r,this._menuService=n,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new le,this._onDidSelectRelatedInformation=new Je,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Lr.Warning,this._backgroundColor=vt.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(kbe);let t=$A,r=xbe;this._severity===Lr.Warning?(t=HC,r=Cbe):this._severity===Lr.Info&&(t=GA,r=Sbe);let n=e.getColor(t),o=e.getColor(r);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor(hC),secondaryHeadingColor:e.getColor(fC)})}_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(n=>this.editor.focus()));let t=[],r=this._menuService.createMenu(qA.TitleMenu,this._contextKeyService);G_(r,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),r.dispose()}_fillTitleIcon(e){this._icon=Te(e,Le(""))}_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 KA(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,r){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let n=B.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());let a=this.editor.getModel();if(a){let l=r>1?b("problems","{0} of {1} problems",t,r):b("change","{0} of {1} problem",t,r);this.setTitle(An(a.uri),l)}this._icon.className=`codicon ${BC.className(Lr.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()}};mh.TitleMenu=new Me("gotoErrorTitleMenu");mh=qA=wbe([Fp(1,gr),Fp(2,er),Fp(3,xs),Fp(4,Ke),Fp(5,it),Fp(6,kl)],mh);MG=g_(pO,mO),NG=g_(gO,bO),RG=g_(Bm,vO),$A=je("editorMarkerNavigationError.background",{dark:MG,light:MG,hcDark:Jo,hcLight:Jo},b("editorMarkerNavigationError","Editor marker navigation widget error color.")),xbe=je("editorMarkerNavigationError.headerBackground",{dark:Mn($A,.1),light:Mn($A,.1),hcDark:null,hcLight:null},b("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),HC=je("editorMarkerNavigationWarning.background",{dark:NG,light:NG,hcDark:Jo,hcLight:Jo},b("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Cbe=je("editorMarkerNavigationWarning.headerBackground",{dark:Mn(HC,.1),light:Mn(HC,.1),hcDark:"#0C141F",hcLight:Mn(HC,.2)},b("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),GA=je("editorMarkerNavigationInfo.background",{dark:RG,light:RG,hcDark:Jo,hcLight:Jo},b("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Sbe=je("editorMarkerNavigationInfo.headerBackground",{dark:Mn(GA,.1),light:Mn(GA,.1),hcDark:null,hcLight:null},b("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),kbe=je("editorMarkerNavigation.background",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},b("editorMarkerNavigationBackground","Editor marker navigation widget background."))});var Ebe,UC,OG,t1,cc,zp,gh,i1,YA,XA,FG,Tbe,jC=N(()=>{Qr();ke();lt();Tn();ci();et();ei();EG();He();Zi();wt();Ht();xl();PG();Ebe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},UC=function(i,e){return function(t,r){e(t,r,i)}},OG=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},cc=t1=class{static get(e){return e.getContribution(t1.ID)}constructor(e,t,r,n,o){this._markerNavigationService=t,this._contextKeyService=r,this._editorService=n,this._instantiationService=o,this._sessionDispoables=new le,this._editor=e,this._widgetVisible=FG.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(mh,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(r=>{var n,o,s;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!B.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,r.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 r=this._model.find(this._editor.getModel().uri,this._widget.position);r?this._widget.updateMarker(r.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(r=>{this._editorService.openCodeEditor({resource:r.resource,options:{pinned:!0,revealIfOpened:!0,selection:B.lift(r).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 Ie(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var r,n;return OG(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&&((r=t1.get(s))===null||r===void 0||r.close(),(n=t1.get(s))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};cc.ID="editor.contrib.markerController";cc=t1=Ebe([UC(1,VA),UC(2,it),UC(3,si),UC(4,Ke)],cc);zp=class extends de{constructor(e,t,r){super(r),this._next=e,this._multiFile=t}run(e,t){var r;return OG(this,void 0,void 0,function*(){t.hasModel()&&((r=cc.get(t))===null||r===void 0||r.nagivate(this._next,this._multiFile))})}},gh=class i extends zp{constructor(){super(!0,!1,{id:i.ID,label:i.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:578,weight:100},menuOpts:{menuId:mh.TitleMenu,title:i.LABEL,icon:Ni("marker-navigation-next",pt.arrowDown,b("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}};gh.ID="editor.action.marker.next";gh.LABEL=b("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");i1=class i extends zp{constructor(){super(!1,!1,{id:i.ID,label:i.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:1602,weight:100},menuOpts:{menuId:mh.TitleMenu,title:i.LABEL,icon:Ni("marker-navigation-previous",pt.arrowUp,b("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}};i1.ID="editor.action.marker.prev";i1.LABEL=b("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");YA=class extends zp{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:b("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:F.focus,primary:66,weight:100},menuOpts:{menuId:Me.MenubarGoMenu,title:b({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}},XA=class extends zp{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:b("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:F.focus,primary:1090,weight:100},menuOpts:{menuId:Me.MenubarGoMenu,title:b({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}};Ue(cc.ID,cc,4);ee(gh);ee(i1);ee(YA);ee(XA);FG=new ht("markersNavigationVisible",!1),Tbe=Oi.bindToContribution(cc.get);We(new Tbe({id:"closeMarkersNavigation",precondition:FG,handler:i=>i.close(),kbOpts:{weight:100+50,kbExpr:F.focus,primary:9,secondary:[1033]}}))});var zG=N(()=>{});var BG=N(()=>{zG()});function HG(i,e){return i&&e?b("acessibleViewHint","Inspect this in the accessible view with {0}.",e):i?b("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var WC,Bp,VC,QA=N(()=>{Bt();Q9();A_();ke();BG();He();WC=Le,Bp=class extends ce{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 wf(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}},VC=class i extends ce{static render(e,t,r){return new i(e,t,r)}constructor(e,t,r){super(),this.actionContainer=Te(e,WC("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Te(this.actionContainer,WC("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Te(this.action,WC(`span.icon.${t.iconClass}`));let n=Te(this.action,WC("span"));n.textContent=r?`${t.label} (${r})`:t.label,this._register(Lt(this.actionContainer,gi.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(Lt(this.actionContainer,gi.KEY_DOWN,o=>{let s=new Hv(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 Ibe,Lbe,ZA,Hp,JA=N(()=>{Ut();Vt();Jt();ke();Ibe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Lbe=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={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),n(a,l,s.done,s.value)})}}function n(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},ZA=class{constructor(e,t,r){this.value=e,this.isComplete=t,this.hasLoadingMessage=r}},Hp=class extends ce{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Je),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new di(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new di(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new di(()=>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(59).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=tO(e=>this._computer.computeAsync(e)),Ibe(this,void 0,void 0,function*(){var e,t,r,n;try{try{for(var o=!0,s=Lbe(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){n=a.value,o=!1;let l=n;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(r=s.return)&&(yield r.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){ft(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 ZA(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)}}});var Abe,Dbe,qC,UG=N(()=>{Y2();ke();ci();Bt();Abe=30,Dbe=24,qC=class extends ce{constructor(e,t=new Xt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new Nd),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Xt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(r=>{this._resize(new Xt(r.dimension.width,r.dimension.height)),r.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?Ie.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){let t=this._editor.getDomNode(),r=this._editor.getScrolledVisiblePosition(e);return!t||!r?void 0:Qi(t).top+r.top-Abe}_availableVerticalSpaceBelow(e){let t=this._editor.getDomNode(),r=this._editor.getScrolledVisiblePosition(e);if(!t||!r)return;let n=Qi(t),o=Nc(document.body),s=n.top+r.top+r.height;return o.height-s-Dbe}_findPositionPreference(e,t){var r,n;let o=Math.min((r=this._availableVerticalSpaceBelow(t))!==null&&r!==void 0?r:1/0,e),s=Math.min((n=this._availableVerticalSpaceAbove(t))!==null&&n!==void 0?n:1/0,e),a=Math.min(Math.max(s,o),e),l=Math.min(e,a),c;return this._editor.getOption(59).above?c=l<=s?1:2:c=l<=o?2:1,c===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),c}_resize(e){this._resizableNode.layout(e.height,e.width)}}});function VG(i,e,t,r,n,o){let s=t+n/2,a=r+o/2,l=Math.max(Math.abs(i-s)-n/2,0),c=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+c*c)}var n8,bh,KC,Xa,jG,r1,$C,t8,i8,WG,e8,Mbe,dc,n1,r8,o8=N(()=>{Bt();QA();pi();ke();ci();et();Hr();hn();JA();ec();Ht();Ur();Ut();ei();wt();UG();Cr();$_();n8=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},bh=function(i,e){return function(t,r){e(t,r,i)}},jG=Le,r1=KC=class extends ce{constructor(e,t,r){super(),this._editor=e,this._instantiationService=t,this._keybindingService=r,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(dc,this._editor)),this._participants=[];for(let n of Bo.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,o)=>n.hoverOrdinal-o.hoverOrdinal),this._computer=new r8(this._editor,this._participants),this._hoverOperation=this._register(new Hp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{if(!this._computer.anchor)return;let o=n.hasLoadingMessage?this._addLoadingMessage(n.value):n.value;this._withResult(new $C(this._computer.anchor,o,n.isComplete))})),this._register(ko(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(bf.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;let t=[];for(let n of this._participants)if(n.suggestHoverAnchor){let o=n.suggestHoverAnchor(e);o&&t.push(o)}let r=e.target;if(r.type===6&&t.push(new mp(0,r.range,e.event.posx,e.event.posy)),r.type===7){let n=this._editor.getOption(49).typicalHalfwidthCharacterWidth/2;!r.detail.isAfterLines&&typeof r.detail.horizontalDistanceToText=="number"&&r.detail.horizontalDistanceToText<n&&t.push(new mp(0,r.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((n,o)=>o.priority-n.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,r,n){this._startShowingOrUpdateHover(new mp(0,e,void 0,void 0),t,r,n,null)}_startShowingOrUpdateHover(e,t,r,n,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,r,n,!1),!0):!1:this._editor.getOption(59).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,r,n,!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,r,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,r,n,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,r,n,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=r,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)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}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 r=t.createLoadingMessage(this._computer.anchor);if(r)return e.slice(0).concat([r])}}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:r,showAtSecondaryPosition:n,highlightRange:o}=KC.computeHoverRanges(this._editor,e.range,t),s=new le,a=s.add(new n1(this._keybindingService)),l=document.createDocumentFragment(),c=null,d={fragment:l,statusBar:a,setColorPicker:h=>c=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(let h of this._participants){let f=t.filter(m=>m.owner===h);f.length>0&&s.add(h.renderHoverParts(d,f))}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:KC._DECORATION_OPTIONS}]),s.add(ii(()=>{h.clear()}))}this._widget.showAt(l,new i8(c,r,n,this._editor.getOption(59).above,this._computer.shouldFocus,this._computer.source,u,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,r){let n=1;if(e.hasModel()){let c=e._getViewModel(),d=c.coordinatesConverter,u=d.convertModelRangeToViewRange(t),h=new Ie(u.startLineNumber,c.getLineMinColumn(u.startLineNumber));n=d.convertViewPositionToModelPosition(h).column}let o=t.startLineNumber,s=t.startColumn,a=r[0].range,l=null;for(let c of r)a=B.plusRange(a,c.range),c.range.startLineNumber===o&&c.range.endLineNumber===o&&(s=Math.max(Math.min(s,c.range.startColumn),n)),c.forceShowAtRange&&(l=c.range);return{showAtPosition:l?l.getStartPosition():new Ie(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new Ie(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()}};r1._DECORATION_OPTIONS=mt.register({description:"content-hover-highlight",className:"hoverHighlight"});r1=KC=n8([bh(1,Ke),bh(2,qt)],r1);$C=class{constructor(e,t,r){this.anchor=e,this.messages=t,this.isComplete=r}filter(e){let t=this.messages.filter(r=>r.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new t8(this,this.anchor,t,this.isComplete)}},t8=class extends $C{constructor(e,t,r,n){super(t,r,n),this.original=e}filter(e){return this.original.filter(e)}},i8=class{constructor(e,t,r,n,o,s,a,l,c,d){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=r,this.preferAbove=n,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=c,this.disposables=d,this.closestMouseDistance=void 0}},WG=30,e8=10,Mbe=6,dc=Xa=class extends qC{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}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,r,n,o){let s=e.getOption(65)+8,a=150,l=new Xt(a,s);super(e,l),this._configurationService=r,this._accessibilityService=n,this._keybindingService=o,this._hover=this._register(new Bp),this._minimumSize=l,this._hoverVisibleKey=F.hoverVisible.bindTo(t),this._hoverFocusedKey=F.hoverFocused.bindTo(t),Te(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(49)&&this._updateFont()}));let c=this._register(ys(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Xa.ID}static _applyDimensions(e,t,r){let n=typeof t=="number"?`${t}px`:t,o=typeof r=="number"?`${r}px`:r;e.style.width=n,e.style.height=o}_setContentsDomNodeDimensions(e,t){let r=this._hover.contentsDomNode;return Xa._applyDimensions(r,e,t)}_setContainerDomNodeDimensions(e,t){let r=this._hover.containerDomNode;return Xa._applyDimensions(r,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,r){let n=typeof t=="number"?`${t}px`:t,o=typeof r=="number"?`${r}px`:r;e.style.maxWidth=n,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){Xa._applyMaxDimensions(this._hover.contentsDomNode,e,t),Xa._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){let e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){let e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");let t=e.width,r=e.height;this._setHoverWidgetDimensions(t,r),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,r-e8))}_updateResizableNodeMaxDimensions(){var e,t;let r=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,n=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new Xt(r,n),this._setHoverWidgetMaxDimensions(r,n)}_resize(e){var t,r;Xa._lastDimensions=new Xt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(r=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||r===void 0||r.layout()}_findAvailableSpaceVertically(){var e;let t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){let e=this._findAvailableSpaceVertically();if(!e)return;let t=Mbe;return Array.from(this._hover.contentsDomNode.children).forEach(r=>{t+=r.clientHeight}),this._hasHorizontalScrollbar()&&(t+=e8),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");let e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;let e=this._isHoverTextOverflowing(),t=typeof this._contentWidth=="undefined"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<t?Nc(document.body).width-14:this._hover.containerDomNode.clientWidth+2}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 r=Qi(this.getDomNode());typeof this._visibleData.closestMouseDistance=="undefined"&&(this._visibleData.closestMouseDistance=VG(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,r.left,r.top,r.width,r.height));let n=VG(e,t,r.left,r.top,r.width,r.height);return n>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){let{fontSize:e,lineHeight:t}=this._editor.getOption(49),r=this._hover.contentsDomNode;r.style.fontSize=`${e}px`,r.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){let t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){let e=Math.max(this._editor.getLayoutInfo().height/4,250,Xa._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Xa._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var r,n,o,s;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);let a=Lm(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(r=this._findPositionPreference(a,l))!==null&&r!==void 0?r:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout();let c=HG(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(s=(o=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||o===void 0?void 0:o.getAriaLabel())!==null&&s!==void 0?s:"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._visibleData)return;let e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Xt(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){let e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;let r=this._hover.containerDomNode,n=this._hover.contentsDomNode,o=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(qn(r),Math.min(o,e)),this._setContentsDomNodeDimensions(qn(n),Math.min(o,e-e8))}setMinimumDimensions(e){this._minimumSize=new Xt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){let e=typeof this._contentWidth=="undefined"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Xt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();let t=this._hover.containerDomNode,r=Lm(t),n=qn(t);if(this._resizableNode.layout(r,n),this._setHoverWidgetDimensions(n,r),r=Lm(t),n=qn(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(r,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(r)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){let o=Lm(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(o,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){let e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(49);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-WG})}scrollRight(){let e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+WG})}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})}};dc.ID="editor.contrib.resizableContentHoverWidget";dc._lastDimensions=new Xt(0,0);dc=Xa=n8([bh(1,it),bh(2,Dt),bh(3,Cf),bh(4,qt)],dc);n1=class extends ce{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=jG("div.hover-row.status-bar"),this.actionsElement=Te(this.hoverElement,jG("div.actions"))}addAction(e){let t=this._keybindingService.lookupKeybinding(e.commandId),r=t?t.getLabel():null;return this._hasContent=!0,this._register(VC.render(this.actionsElement,e,r))}append(e){let t=Te(this.actionsElement,e);return this._hasContent=!0,t}};n1=n8([bh(0,qt)],n1);r8=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 r=e.getModel(),n=t.range.startLineNumber;if(n>r.getLineCount())return[];let o=r.getLineMaxColumn(n);return e.getLineDecorations(n).filter(s=>{if(s.options.isWholeLine)return!0;let a=s.range.startLineNumber===n?s.range.startColumn:1,l=s.range.endLineNumber===n?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 Dn.EMPTY;let r=i._getLineDecorations(this._editor,t);return Dn.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,r,e):Dn.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];let e=i._getLineDecorations(this._editor,this._anchor),t=[];for(let r of this._participants)t=t.concat(r.computeSync(this._anchor,e));return un(t)}}});var qG,vh,s8,KG=N(()=>{Bt();pi();Ss();ke();xd();JA();QA();qG=Le,vh=class i extends ce{constructor(e,t,r){super(),this._renderDisposeables=this._register(new le),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new Bp),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new eo({editor:this._editor},t,r)),this._computer=new s8(this._editor),this._hoverOperation=this._register(new Hp(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(49)&&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 r=document.createDocumentFragment();for(let n of t){let o=qG("div.hover-row.markdown-hover"),s=Te(o,qG("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));s.appendChild(a.element),r.appendChild(o)}this._updateContents(r),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(),r=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),o=this._editor.getOption(65),s=this._hover.containerDomNode.clientHeight,a=r-n-(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`}};vh.ID="editor.contrib.modesGlyphHoverWidget";s8=class{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){let e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),r=[];if(!t)return r;for(let n of t){if(!n.options.glyphMarginClassName)continue;let o=n.options.glyphMarginHoverMessage;!o||Hc(o)||r.push(...Zv(o).map(e))}return r}}});function Rbe(i,e,t,r,n){return Nbe(this,void 0,void 0,function*(){try{let o=yield Promise.resolve(i.provideHover(t,r,n));if(o&&Obe(o))return new a8(i,o,e)}catch(o){Yt(o)}})}function o1(i,e,t,r){let o=i.ordered(e).map((s,a)=>Rbe(s,a,e,t,r));return Dn.fromPromises(o).coalesce()}function Pbe(i,e,t,r){return o1(i,e,t,r).map(n=>n.hover).toPromise()}function Obe(i){let e=typeof i.range!="undefined",t=typeof i.contents!="undefined"&&i.contents&&i.contents.length>0;return e&&t}var Nbe,a8,l8=N(()=>{Ut();Si();Vt();lt();Rt();Nbe=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},a8=class{constructor(e,t,r){this.provider=e,this.hover=t,this.ordinal=r}};Kn("_executeHoverProvider",(i,e,t)=>{let r=i.get(Se);return Pbe(r.hoverProvider,e,t,st.None)})});function c8(i,e,t,r,n){e.sort((s,a)=>s.ordinal-a.ordinal);let o=new le;for(let s of e)for(let a of s.contents){if(Hc(a))continue;let l=$G("div.hover-row.markdown-hover"),c=Te(l,$G("div.hover-contents")),d=o.add(new eo({editor:t},r,n));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 Fbe,GC,$G,io,Up,YC=N(()=>{Bt();pi();Ut();Ss();ke();xd();ci();et();Zo();l8();He();Cr();es();Rt();Fbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},GC=function(i,e){return function(t,r){e(t,r,i)}},$G=Le,io=class{constructor(e,t,r,n,o){this.owner=e,this.range=t,this.contents=r,this.isBeforeContent=n,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},Up=class{constructor(e,t,r,n,o){this._editor=e,this._languageService=t,this._openerService=r,this._configurationService=n,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new io(this,e.range,[new Ki().appendText(b("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let r=this._editor.getModel(),n=e.range.startLineNumber,o=r.getLineMaxColumn(n),s=[],a=1e3,l=r.getLineLength(n),c=r.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(115),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c}),h=!1;d>=0&&l>d&&e.range.startColumn>=d&&(h=!0,s.push(new io(this,e.range,[{value:b("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 io(this,e.range,[{value:b("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(let m of t){let g=m.range.startLineNumber===n?m.range.startColumn:1,w=m.range.endLineNumber===n?m.range.endColumn:o,_=m.options.hoverMessage;if(!_||Hc(_))continue;m.options.beforeContentClassName&&(f=!0);let E=new B(e.range.startLineNumber,g,e.range.startLineNumber,w);s.push(new io(this,E,Zv(_),f,a++))}return s}computeAsync(e,t,r){if(!this._editor.hasModel()||e.type!==1)return Dn.EMPTY;let n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return Dn.EMPTY;let o=new Ie(e.range.startLineNumber,e.range.startColumn);return o1(this._languageFeaturesService.hoverProvider,n,o,r).filter(s=>!Hc(s.hover.contents)).map(s=>{let a=s.hover.range?B.lift(s.hover.range):e.range;return new io(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return c8(e,t,this._editor,this._languageService,this._openerService)}};Up=Fbe([GC(1,Ji),GC(2,er),GC(3,Dt),GC(4,Se)],Up)});var zbe,d8,ps,u8,GG,XC,YG=N(()=>{Bt();pi();Ut();Vt();ke();Io();et();Rt();Xre();Vu();Rx();wd();jC();He();R_();es();Vc();zbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},d8=function(i,e){return function(t,r){e(t,r,i)}},ps=Le,u8=class{constructor(e,t,r){this.owner=e,this.range=t,this.marker=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},GG={type:1,filter:{include:nt.QuickFix},triggerAction:Wr.QuickFixHover},XC=class{constructor(e,t,r,n){this._editor=e,this._markerDecorationsService=t,this._openerService=r,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];let r=this._editor.getModel(),n=e.range.startLineNumber,o=r.getLineMaxColumn(n),s=[];for(let a of t){let l=a.range.startLineNumber===n?a.range.startColumn:1,c=a.range.endLineNumber===n?a.range.endColumn:o,d=this._markerDecorationsService.getMarker(r.uri,a);if(!d)continue;let u=new B(e.range.startLineNumber,l,e.range.startLineNumber,c);s.push(new u8(this,u,d))}return s}renderHoverParts(e,t){if(!t.length)return ce.None;let r=new le;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,r)));let n=t.length===1?t[0]:t.sort((o,s)=>Lr.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,n,r),r}renderMarkerHover(e,t){let r=ps("div.hover-row"),n=Te(r,ps("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);let c=Te(n,ps("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=s,o||a)if(a&&typeof a!="string"){let d=ps("span");if(o){let m=Te(d,ps("span"));m.innerText=o}let u=Te(d,ps("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(Lt(u,"click",m=>{this._openerService.open(a.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));let h=Te(u,ps("span"));h.innerText=a.value;let f=Te(n,d);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{let d=Te(n,ps("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(qi(l))for(let{message:d,resource:u,startLineNumber:h,startColumn:f}of l){let m=Te(n,ps("div"));m.style.marginTop="8px";let g=Te(m,ps("a"));g.innerText=`${An(u)}(${h}, ${f}): `,g.style.cursor="pointer",t.add(Lt(g,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:f}}}).catch(ft)}));let w=Te(m,ps("span"));w.innerText=d,this._editor.applyFontInfo(w)}return r}renderMarkerStatusbar(e,t,r){if((t.marker.severity===Lr.Error||t.marker.severity===Lr.Warning||t.marker.severity===Lr.Info)&&e.statusBar.addAction({label:b("view problem","View Problem"),commandId:gh.ID,run:()=>{var n;e.hide(),(n=cc.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(89)){let n=e.statusBar.append(ps("div"));this.recentMarkerCodeActionsInfo&&(hk.makeKey(this.recentMarkerCodeActionsInfo.marker)===hk.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=b("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);let o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ce.None:r.add(fl(()=>n.textContent=b("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=String.fromCharCode(160));let s=this.getCodeActions(t.marker);r.add(ii(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=b("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;r.add(ii(()=>{l||a.dispose()})),e.statusBar.addAction({label:b("quick fixes","Quick Fix..."),commandId:Jf,run:c=>{l=!0;let d=za.get(this._editor),u=Qi(c);e.hide(),d==null||d.showCodeActions(GG,a,{x:u.left,y:u.top,width:u.width,height:u.height})}})},ft)}}getCodeActions(e){return Zt(t=>E0(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new B(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),GG,ma.None,t))}};XC=zbe([d8(1,QF),d8(2,er),d8(3,Se)],XC)});var XG=N(()=>{});var QG=N(()=>{XG()});var Bbe,QC,h8,ZC,_n,f8,p8,m8,g8,b8,v8,_8,y8,w8,x8,JC=N(()=>{sl();ke();lt();et();ei();Zo();OC();o8();KG();Ht();es();en();tn();ec();YC();YG();O2();Ur();He();QG();Bbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},QC=function(i,e){return function(t,r){e(t,r,i)}},ZC=!1,_n=h8=class{static get(e){return e.getContribution(h8.ID)}constructor(e,t,r,n,o){this._editor=e,this._instantiationService=t,this._openerService=r,this._languageService=n,this._keybindingService=o,this._toUnhook=new le,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(59)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){let e=()=>this._hideWidgets(),t=this._editor.getOption(59);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(r=>this._onEditorMouseDown(r))),this._toUnhook.add(this._editor.onMouseUp(r=>this._onEditorMouseUp(r))),this._toUnhook.add(this._editor.onMouseMove(r=>this._onEditorMouseMove(r))),this._toUnhook.add(this._editor.onKeyDown(r=>this._onKeyDown(r)))):(this._toUnhook.add(this._editor.onMouseMove(r=>this._onEditorMouseMove(r))),this._toUnhook.add(this._editor.onKeyDown(r=>this._onKeyDown(r)))),this._toUnhook.add(this._editor.onMouseLeave(r=>this._onEditorMouseLeave(r))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(r=>this._onEditorScrollChanged(r)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;let r=e.target;if(r.type===9&&r.detail===dc.ID){this._hoverClicked=!0;return}r.type===12&&r.detail===vh.ID||(r.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,r;let n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((r=this._contentWidget)===null||r===void 0)&&r.containsNode(n)||ZC||this._hideWidgets()}_onEditorMouseMove(e){var t,r,n,o,s,a,l,c,d,u,h;let f=e.target;if(!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((r=this._contentWidget)===null||r===void 0)&&r.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&f.type===9&&f.detail===dc.ID||this._isHoverSticky&&(!((n=this._contentWidget)===null||n===void 0)&&n.containsNode((o=e.event.browserEvent.view)===null||o===void 0?void 0:o.document.activeElement))&&!(!((a=(s=e.event.browserEvent.view)===null||s===void 0?void 0:s.getSelection())===null||a===void 0)&&a.isCollapsed)||!this._isHoverSticky&&f.type===9&&f.detail===dc.ID&&(!((l=this._contentWidget)===null||l===void 0)&&l.isColorPickerVisible)||this._isHoverSticky&&f.type===12&&f.detail===vh.ID||this._isHoverSticky&&(!((c=this._contentWidget)===null||c===void 0)&&c.isVisibleFromKeyboard))return;let m=(d=f.element)===null||d===void 0?void 0:d.classList.contains("colorpicker-color-decoration"),g=this._editor.getOption(145);if(m&&(g==="click"&&!this._hoverActivatedByColorDecoratorClick||g==="hover"&&!this._isHoverEnabled&&!ZC||g==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!m&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(u=this._glyphWidget)===null||u===void 0||u.hide();return}if(f.type===2&&f.position){(h=this._contentWidget)===null||h===void 0||h.hide(),this._glyphWidget||(this._glyphWidget=new vh(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(f.position.lineNumber);return}ZC||this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;let r=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=r.kind===1||r.kind===2&&r.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&&!n&&this._hideWidgets()}_hideWidgets(){var e,t,r;ZC||this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Ws.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(r=this._contentWidget)===null||r===void 0||r.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(r1,this._editor)),this._contentWidget}showContentHover(e,t,r,n,o=!1){this._hoverActivatedByColorDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,r,n)}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()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get 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()}};_n.ID="editor.contrib.hover";_n=h8=Bbe([QC(1,Ke),QC(2,er),QC(3,Ji),QC(4,qt)],_n);f8=class extends de{constructor(){super({id:"editor.action.showHover",label:b({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:F.editorTextFocus,primary:mi(2089,2087),weight:100}})}run(e,t,r){if(!t.hasModel())return;let n=_n.get(t);if(!n)return;let o=t.getPosition(),s=new B(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(r!=null&&r.focus);n.isHoverVisible?n.focus():n.showContentHover(s,1,1,a)}},p8=class extends de{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:b({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 r=_n.get(t);if(!r)return;let n=t.getPosition();if(!n)return;let o=new B(n.lineNumber,n.column,n.lineNumber,n.column),s=zd.get(t);if(!s)return;s.startFindDefinitionFromCursor(n).then(()=>{r.showContentHover(o,1,1,!0)})}},m8=class extends de{constructor(){super({id:"editor.action.scrollUpHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:16,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollUp()}},g8=class extends de{constructor(){super({id:"editor.action.scrollDownHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:18,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollDown()}},b8=class extends de{constructor(){super({id:"editor.action.scrollLeftHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:15,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollLeft()}},v8=class extends de{constructor(){super({id:"editor.action.scrollRightHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:17,weight:100}})}run(e,t){let r=_n.get(t);r&&r.scrollRight()}},_8=class extends de{constructor(){super({id:"editor.action.pageUpHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){let r=_n.get(t);r&&r.pageUp()}},y8=class extends de{constructor(){super({id:"editor.action.pageDownHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){let r=_n.get(t);r&&r.pageDown()}},w8=class extends de{constructor(){super({id:"editor.action.goToTopHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){let r=_n.get(t);r&&r.goToTop()}},x8=class extends de{constructor(){super({id:"editor.action.goToBottomHover",label:b({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:F.hoverFocused,kbOpts:{kbExpr:F.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){let r=_n.get(t);r&&r.goToBottom()}};Ue(_n.ID,_n,2);ee(f8);ee(p8);ee(m8);ee(g8);ee(b8);ee(v8);ee(_8);ee(y8);ee(w8);ee(x8);Bo.register(Up);Bo.register(XC);mf((i,e)=>{let t=i.getColor(IO);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 yn(i,e){let t=0;for(let r=0;r<i.length;r++)i.charAt(r)===" "?t+=e:t++;return t}function _h(i,e,t){i=i<0?0:i;let r="";if(!t){let n=Math.floor(i/e);i=i%e;for(let o=0;o<n;o++)r+=" "}for(let n=0;n<i;n++)r+=" ";return r}var C8=N(()=>{});function JG(i,e,t,r,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];let o=e.getLanguageConfiguration(i.getLanguageId()).indentationRules;if(!o)return[];for(r=Math.min(r,i.getLineCount());t<=r&&o.unIndentedLinePattern;){let w=i.getLineContent(t);if(!o.unIndentedLinePattern.test(w))break;t++}if(t>r-1)return[];let{tabSize:s,indentSize:a,insertSpaces:l}=i.getOptions(),c=(w,_)=>(_=_||1,Bc.shiftIndent(w,w.length+_,s,a,l)),d=(w,_)=>(_=_||1,Bc.unshiftIndent(w,w.length+_,s,a,l)),u=[],h,f=i.getLineContent(t),m=f;if(n!=null){h=n;let w=Vi(f);m=h+f.substring(w.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(m)&&(h=d(h),m=h+f.substring(w.length)),f!==m&&u.push(ti.replaceMove(new Qe(t,1,t,w.length+1),V3(h,a,l)))}else h=Vi(f);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 w=t;w<=r;w++){let _=i.getLineContent(w),E=Vi(_),A=g+_.substring(E.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(A)&&(g=d(g),h=d(h)),E!==g&&u.push(ti.replaceMove(new Qe(w,1,w,E.length+1),V3(g,a,l))),!(o.unIndentedLinePattern&&o.unIndentedLinePattern.test(_))&&(o.increaseIndentPattern&&o.increaseIndentPattern.test(A)?(h=c(h),g=h):o.indentNextLinePattern&&o.indentNextLinePattern.test(A)?g=c(g):g=h)}return u}function eY(i,e,t,r){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let n="";for(let s=0;s<t;s++)n+=" ";let o=new RegExp(n,"gi");for(let s=1,a=i.getLineCount();s<=a;s++){let l=i.getLineFirstNonWhitespaceColumn(s);if(l===0&&(l=i.getLineMaxColumn(s)),l===1)continue;let c=new B(s,1,s,l),d=i.getValueInRange(c),u=r?d.replace(/\t/ig,n):d.replace(o," ");e.addEditOperation(c,u)}}var Hbe,Ube,eS,tS,s1,iS,rS,nS,oS,S8,k8,E8,a1,T8,I8,L8=N(()=>{ke();Di();lt();Q3();ba();et();Ir();ei();Br();Go();C8();He();_l();are();zP();Hbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ube=function(i,e){return function(t,r){e(t,r,i)}};eS=class i extends de{constructor(){super({id:i.ID,label:b("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:F.writable})}run(e,t){let r=t.getModel();if(!r)return;let n=r.getOptions(),o=t.getSelection();if(!o)return;let s=new T8(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),r.updateOptions({insertSpaces:!0})}};eS.ID="editor.action.indentationToSpaces";tS=class i extends de{constructor(){super({id:i.ID,label:b("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:F.writable})}run(e,t){let r=t.getModel();if(!r)return;let n=r.getOptions(),o=t.getSelection();if(!o)return;let s=new I8(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),r.updateOptions({insertSpaces:!1})}};tS.ID="editor.action.indentationToTabs";s1=class extends de{constructor(e,t,r){super(r),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){let r=e.get(rn),n=e.get(Li),o=t.getModel();if(!o)return;let s=n.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?b("configuredTabSize","Configured Tab Size"):d===s.tabSize?b("defaultTabSize","Default Tab Size"):d===a.tabSize?b("currentTabSize","Current Tab Size"):void 0})),c=Math.min(o.getOptions().tabSize-1,7);setTimeout(()=>{r.pick(l,{placeHolder:b({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)}},iS=class i extends s1{constructor(){super(!1,!1,{id:i.ID,label:b("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}};iS.ID="editor.action.indentUsingTabs";rS=class i extends s1{constructor(){super(!0,!1,{id:i.ID,label:b("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}};rS.ID="editor.action.indentUsingSpaces";nS=class i extends s1{constructor(){super(!0,!0,{id:i.ID,label:b("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}};nS.ID="editor.action.changeTabDisplaySize";oS=class i extends de{constructor(){super({id:i.ID,label:b("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){let r=e.get(Li),n=t.getModel();if(!n)return;let o=r.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}};oS.ID="editor.action.detectIndentation";S8=class extends de{constructor(){super({id:"editor.action.reindentlines",label:b("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:F.writable})}run(e,t){let r=e.get(Pt),n=t.getModel();if(!n)return;let o=JG(n,r,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}},k8=class extends de{constructor(){super({id:"editor.action.reindentselectedlines",label:b("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:F.writable})}run(e,t){let r=e.get(Pt),n=t.getModel();if(!n)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=JG(n,r,l,c);s.push(...d)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}},E8=class{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let r of e)r.range&&typeof r.text=="string"&&this._edits.push(r)}getEditOperations(e,t){for(let n of this._edits)t.addEditOperation(B.lift(n.range),n.text);let r=!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?(r=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(r=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),r||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}},a1=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new le,this.callOnModel=new le,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(11)<4||this.editor.getOption(54))&&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 r=this.editor.getModel();if(!r||!r.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;let n=this.editor.getOption(11),{tabSize:o,indentSize:s,insertSpaces:a}=r.getOptions(),l=[],c={shiftIndent:f=>Bc.shiftIndent(f,f.length+1,o,s,a),unshiftIndent:f=>Bc.unshiftIndent(f,f.length+1,o,s,a)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(r,d)){d++;continue}break}if(d>e.endLineNumber)return;let u=r.getLineContent(d);if(!/\S/.test(u.substring(0,e.startColumn-1))){let f=fu(n,r,r.getLanguageId(),d,c,this._languageConfigurationService);if(f!==null){let m=Vi(u),g=yn(f,o),w=yn(m,o);if(g!==w){let _=_h(g,o,a);l.push({range:new B(d,1,d,m.length+1),text:_}),u=_+u.substr(m.length)}else{let _=t_(r,d,this._languageConfigurationService);if(_===0||_===8)return}}}let h=d;for(;d<e.endLineNumber;){if(!/\S/.test(r.getLineContent(d+1))){d++;continue}break}if(d!==e.endLineNumber){let m=fu(n,{tokenization:{getLineTokens:g=>r.tokenization.getLineTokens(g),getLanguageId:()=>r.getLanguageId(),getLanguageIdAtPosition:(g,w)=>r.getLanguageIdAtPosition(g,w)},getLineContent:g=>g===h?u:r.getLineContent(g)},r.getLanguageId(),d+1,c,this._languageConfigurationService);if(m!==null){let g=yn(m,o),w=yn(Vi(r.getLineContent(d+1)),o);if(g!==w){let _=g-w;for(let E=d+1;E<=e.endLineNumber;E++){let A=r.getLineContent(E),L=Vi(A),U=yn(L,o)+_,Y=_h(U,o,a);Y!==L&&l.push({range:new B(E,1,E,L.length+1),text:Y})}}}}if(l.length>0){this.editor.pushUndoStop();let f=new E8(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",f),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);let r=e.getLineFirstNonWhitespaceColumn(t);if(r===0)return!0;let n=e.tokenization.getLineTokens(t);if(n.getCount()>0){let o=n.findTokenIndexAtOffset(r);if(o>=0&&n.getStandardTokenType(o)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};a1.ID="editor.contrib.autoIndentOnPaste";a1=Hbe([Ube(1,Pt)],a1);T8=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)}},I8=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)}};Ue(a1.ID,a1,2);ee(eS);ee(tS);ee(iS);ee(rS);ee(nS);ee(oS);ee(S8);ee(k8)});function tY(i){return yt.from({scheme:So.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}var sS,l1,A8,c1,D8=N(()=>{Vt();ke();ci();et();Im();Tr();sS=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},l1=class{constructor(e,t){this.range=e,this.direction=t}},A8=class i{constructor(e,t,r){this.hint=e,this.anchor=t,this.provider=r,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 sS(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,r;return sS(this,void 0,void 0,function*(){try{let n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=n==null?void 0:n.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(r=n==null?void 0:n.label)!==null&&r!==void 0?r:this.hint.label,this._isResolved=!0}catch(n){Yt(n),this._isResolved=!1}})}},c1=class i{static create(e,t,r,n){return sS(this,void 0,void 0,function*(){let o=[],s=e.ordered(t).reverse().map(a=>r.map(l=>sS(this,void 0,void 0,function*(){try{let c=yield a.provideInlayHints(t,l,n);c!=null&&c.hints.length&&o.push([c,a])}catch(c){Yt(c)}})));if(yield Promise.all(s.flat()),n.isCancellationRequested||t.isDisposed())throw new Mv;return new i(r,o,t)})}constructor(e,t,r){this._disposables=new le,this.ranges=e,this.provider=new Set;let n=[];for(let[o,s]of t){this._disposables.add(o),this.provider.add(s);for(let a of o.hints){let l=r.validatePosition(a.position),c="before",d=i._getRangeAtPosition(r,l),u;d.getStartPosition().isBefore(l)?(u=B.fromPositions(d.getStartPosition(),l),c="after"):(u=B.fromPositions(l,d.getEndPosition()),c="before"),n.push(new A8(a,new l1(u,c),s))}}this.items=n.sort((o,s)=>Ie.compare(o.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){let r=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new B(r,n.startColumn,r,n.endColumn);e.tokenization.tokenizeIfCheap(r);let o=e.tokenization.getLineTokens(r),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&&a<o.getCount()-1&&(l=o.getStartOffset(a+1),c=o.getEndOffset(a+1))),new B(r,l+1,r,c+1)}}});function iY(i,e,t,r){var n;return d1(this,void 0,void 0,function*(){let o=i.get(xr),s=i.get(ts),a=i.get(vi),l=i.get(Ke),c=i.get(Mi);if(yield r.item.resolve(st.None),!r.part.location)return;let d=r.part.location,u=[],h=new Set(Xo.getMenuItems(Me.EditorContext).map(m=>wP(m)?m.command.id:Sd()));for(let m of fs.all())h.has(m.desc.id)&&u.push(new Yo(m.desc.id,ia.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>d1(this,void 0,void 0,function*(){let g=yield o.createModelReference(d.uri);try{let w=new ph(g.object.textEditorModel,B.getStartPosition(d.range)),_=r.item.anchor.range;yield l.invokeFunction(m.runEditorCommand.bind(m),e,w,_)}finally{g.dispose()}})));if(r.part.command){let{command:m}=r.part;u.push(new ws),u.push(new Yo(m.id,m.title,void 0,!0,()=>d1(this,void 0,void 0,function*(){var g;try{yield a.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(w){c.notify({severity:_f.Error,source:r.item.provider.displayName,message:w})}})))}let f=e.getOption(125);s.showContextMenu({domForShadowRoot:f&&(n=e.getDomNode())!==null&&n!==void 0?n:void 0,getAnchor:()=>{let m=Qi(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function aS(i,e,t,r){return d1(this,void 0,void 0,function*(){let o=yield i.get(xr).createModelReference(r.uri);yield t.invokeWithinContext(s=>d1(this,void 0,void 0,function*(){let a=e.hasSideBySideModifier,l=s.get(it),c=Rr.inPeekEditor.getValue(l),d=!a&&t.getOption(86)&&!c;return new lc({openToSide:a,openInPeek:d,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(s,new ph(o.object.textEditorModel,B.getStartPosition(r.range)),B.lift(r.range))})),o.dispose()})}var d1,M8=N(()=>{Bt();Rc();Si();F0();et();ta();Qb();dh();Zi();Wi();wt();vl();Ht();Ao();d1=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})}});function Wbe(i){let e="\xA0";return i.replace(/[ \t]/g,e)}var jbe,jp,Wp,lS,N8,rY,Vp,R8,uc,O8=N(()=>{Bt();pi();Ut();Si();Vt();ke();lf();Fr();Tr();ZF();P_();Qm();ba();et();hn();jc();Hr();Ls();Rt();ta();Jb();D8();M8();Wi();dl();Ht();Ao();en();tn();jbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},jp=function(i,e){return function(t,r){e(t,r,i)}},Wp=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},N8=class i{constructor(){this._entries=new na(50)}get(e){let t=i._key(e);return this._entries.get(t)}set(e,t){let r=i._key(e);this._entries.set(r,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}},rY=Xr("IInlayHintsCache");Jr(rY,N8,1);Vp=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]}},R8=class{constructor(e,t){this.part=e,this.hasTriggerModifier=t}},uc=lS=class{static get(e){var t;return(t=e.getContribution(lS.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,r,n,o,s,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=a,this._disposables=new le,this._sessionDisposables=new le,this._decorationsMetadata=new Map,this._ruleFactory=new Z_(this._editor),this._activeRenderMode=0,this._debounceInfo=r.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(138)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();let e=this._editor.getOption(138);if(e.enabled==="off")return;let t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;let r=this._inlayHintsCache.get(t);r&&this._updateHintsDecorators([t.getFullModelRange()],r),this._sessionDisposables.add(ii(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let n,o=new Set,s=new di(()=>Wp(this,void 0,void 0,function*(){let a=Date.now();n==null||n.dispose(!0),n=new Fi;let l=t.onWillDispose(()=>n==null?void 0:n.cancel());try{let c=n.token,d=yield c1.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){ft(c)}finally{n.dispose(),l.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(s),this._sessionDisposables.add(ii(()=>n==null?void 0:n.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(dP.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 le,t=e.add(new Ya(this._editor)),r=new le;return e.add(r),e.add(t.onMouseMoveOrRelevantKeyDown(n=>{let[o]=n,s=this._getInlayHintLabelPart(o),a=this._editor.getModel();if(!s||!a){r.clear();return}let l=new Fi;r.add(ii(()=>l.dispose(!0))),s.item.resolve(l.token),this._activeInlayHintPart=s.part.command||s.part.location?new R8(s,o.hasTriggerModifier):void 0;let c=a.validatePosition(s.item.hint.position).lineNumber,d=new B(c,1,c,a.getLineMaxColumn(c)),u=this._getInlineHintsForRange(d);this._updateHintsDecorators([d],u),r.add(ii(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([d],u)}))})),e.add(t.onCancel(()=>r.clear())),e.add(t.onExecute(n=>Wp(this,void 0,void 0,function*(){let o=this._getInlayHintLabelPart(n);if(o){let s=o.part;s.location?this._instaService.invokeFunction(aS,n,this._editor,s.location):VO.is(s.command)&&(yield this._invokeCommand(s.command,o.item))}}))),e}_getInlineHintsForRange(e){let t=new Set;for(let r of this._decorationsMetadata.values())e.containsRange(r.item.anchor.range)&&t.add(r.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>Wp(this,void 0,void 0,function*(){if(t.event.detail!==2)return;let r=this._getInlayHintLabelPart(t);if(r&&(t.event.preventDefault(),yield r.item.resolve(st.None),qi(r.item.hint.textEdits))){let n=r.item.hint.textEdits.map(o=>ti.replace(B.lift(o.range),o.text));this._editor.executeEdits("inlayHint.default",n),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>Wp(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;let t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(iY,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;let r=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(r instanceof vf&&(r==null?void 0:r.attachedData)instanceof Vp)return r.attachedData}_invokeCommand(e,t){var r;return Wp(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(r=e.arguments)!==null&&r!==void 0?r:[])}catch(n){this._notificationService.notify({severity:_f.Error,source:t.provider.displayName,message:n})}})}_cacheHintsForFastRestore(e){let t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){let t=new Map;for(let[r,n]of this._decorationsMetadata){if(t.has(n.item))continue;let o=e.getDecorationRange(r);if(o){let s=new l1(o,n.item.anchor.direction),a=n.item.with({anchor:s});t.set(n.item,a)}}return Array.from(t.values())}_getHintsRanges(){let t=this._editor.getModel(),r=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(let o of r.sort(B.compareRangesUsingStarts)){let s=t.validateRange(new B(o.startLineNumber-30,o.startColumn,o.endLineNumber+30,o.endColumn));n.length===0||!B.areIntersectingOrTouching(n[n.length-1],s)?n.push(s):n[n.length-1]=B.plusRange(n[n.length-1],s)}return n}_updateHintsDecorators(e,t){var r,n;let o=[],s=(g,w,_,E,A)=>{let L={content:_,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:w.className,cursorStops:E,attachedData:A};o.push({item:g,classNameRef:w,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?L:void 0}}})},a=(g,w)=>{let _=this._ruleFactory.createClassNameRef({width:`${l/3|0}px`,display:"inline-block"});s(g,_,"\u200A",w?mu.Right:mu.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 w=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let _=0;_<w.length;_++){let E=w[_],A=_===0,L=_===w.length-1,O={fontSize:`${l}px`,fontFamily:`var(${h}), ${w_.fontFamily}`,verticalAlign:u?"baseline":"middle",unicodeBidi:"isolate"};qi(g.hint.textEdits)&&(O.cursor="default"),this._fillInColors(O,g.hint),(E.command||E.location)&&((r=this._activeInlayHintPart)===null||r===void 0?void 0:r.part.item)===g&&this._activeInlayHintPart.part.index===_&&(O.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(O.color=ki(LO),O.cursor="pointer")),d&&(A&&L?(O.padding=`1px ${Math.max(1,l/4)|0}px`,O.borderRadius=`${l/4|0}px`):A?(O.padding=`1px 0 1px ${Math.max(1,l/4)|0}px`,O.borderRadius=`${l/4|0}px 0 0 ${l/4|0}px`):L?(O.padding=`1px ${Math.max(1,l/4)|0}px 1px 0`,O.borderRadius=`0 ${l/4|0}px ${l/4|0}px 0`):O.padding="1px 0 1px 0"),s(g,this._ruleFactory.createClassNameRef(O),Wbe(E.label),L&&!g.hint.paddingRight?mu.Right:mu.None,new Vp(g,_))}if(g.hint.paddingRight&&a(g,!0),o.length>lS._MAX_DECORATORS)break}let f=[];for(let g of e)for(let{id:w}of(n=this._editor.getDecorationsInRange(g))!==null&&n!==void 0?n:[]){let _=this._decorationsMetadata.get(w);_&&(f.push(w),_.classNameRef.dispose(),this._decorationsMetadata.delete(w))}let m=ga.capture(this._editor);this._editor.changeDecorations(g=>{let w=g.deltaDecorations(f,o.map(_=>_.decoration));for(let _=0;_<w.length;_++){let E=o[_];this._decorationsMetadata.set(w[_],E)}}),m.restore(this._editor)}_fillInColors(e,t){t.kind===ok.Parameter?(e.backgroundColor=ki(PO),e.color=ki(RO)):t.kind===ok.Type?(e.backgroundColor=ki(NO),e.color=ki(MO)):(e.backgroundColor=ki(DO),e.color=ki(AO))}_getLayoutInfo(){let e=this._editor.getOption(138),t=e.padding,r=this._editor.getOption(51),n=this._editor.getOption(48),o=e.fontSize;(!o||o<5||o>r)&&(o=r);let s=e.fontFamily||n;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===n&&o===r}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};uc.ID="editor.contrib.InlayHints";uc._MAX_DECORATORS=1500;uc=lS=jbe([jp(1,Se),jp(2,ar),jp(3,rY),jp(4,vi),jp(5,Mi),jp(6,Ke)],uc);At.registerCommand("_executeInlayHintProvider",(i,...e)=>Wp(void 0,void 0,void 0,function*(){let[t,r]=e;zt(yt.isUri(t)),zt(B.isIRange(r));let{inlayHintsProvider:n}=i.get(Se),o=yield i.get(xr).createModelReference(t);try{let s=yield c1.create(n,o.object.textEditorModel,[B.lift(r)],st.None),a=s.items.map(l=>l.hint);return setTimeout(()=>s.dispose(),0),a}finally{o.dispose()}}))});var Vbe,u1,nY,qbe,cS,dS,oY=N(()=>{Ut();Ss();ci();Hr();ec();Zo();ta();l8();YC();O8();Cr();es();Rt();He();En();D8();pi();Vbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},u1=function(i,e){return function(t,r){e(t,r,i)}},nY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},qbe=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={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),n(a,l,s.done,s.value)})}}function n(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}},cS=class extends Ed{constructor(e,t,r,n){super(10,t,e.item.anchor.range,r,n,!0),this.part=e}},dS=class extends Up{constructor(e,t,r,n,o,s){super(e,t,r,n,s),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!uc.get(this._editor)||e.target.type!==6)return null;let n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return n instanceof vf&&n.attachedData instanceof Vp?new cS(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,r){return e instanceof cS?new Dn(n=>nY(this,void 0,void 0,function*(){var o,s,a,l;let{part:c}=e;if(yield c.item.resolve(r),r.isCancellationRequested)return;let d;typeof c.item.hint.tooltip=="string"?d=new Ki().appendText(c.item.hint.tooltip):c.item.hint.tooltip&&(d=c.item.hint.tooltip),d&&n.emitOne(new io(this,e.range,[d],!1,0)),qi(c.item.hint.textEdits)&&n.emitOne(new io(this,e.range,[new Ki().appendText(b("hint.dbl","Double-click to insert"))],!1,10001));let u;if(typeof c.part.tooltip=="string"?u=new Ki().appendText(c.part.tooltip):c.part.tooltip&&(u=c.part.tooltip),u&&n.emitOne(new io(this,e.range,[u],!1,1)),c.part.location||c.part.command){let w,E=this._editor.getOption(76)==="altKey"?kn?b("links.navigate.kb.meta.mac","cmd + click"):b("links.navigate.kb.meta","ctrl + click"):kn?b("links.navigate.kb.alt.mac","option + click"):b("links.navigate.kb.alt","alt + click");c.part.location&&c.part.command?w=new Ki().appendText(b("hint.defAndCommand","Go to Definition ({0}), right click for more",E)):c.part.location?w=new Ki().appendText(b("hint.def","Go to Definition ({0})",E)):c.part.command&&(w=new Ki(`[${b("hint.cmd","Execute Command")}](${tY(c.part.command)} "${c.part.command.title}") (${E})`,{isTrusted:!0})),w&&n.emitOne(new io(this,e.range,[w],!1,1e4))}let h=yield this._resolveInlayHintLabelPartHover(c,r);try{for(var f=!0,m=qbe(h),g;g=yield m.next(),o=g.done,!o;f=!0){l=g.value,f=!1;let w=l;n.emitOne(w)}}catch(w){s={error:w}}finally{try{!f&&!o&&(a=m.return)&&(yield a.call(m))}finally{if(s)throw s.error}}})):Dn.EMPTY}_resolveInlayHintLabelPartHover(e,t){return nY(this,void 0,void 0,function*(){if(!e.part.location)return Dn.EMPTY;let{uri:r,range:n}=e.part.location,o=yield this._resolverService.createModelReference(r);try{let s=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(s)?o1(this._languageFeaturesService.hoverProvider,s,new Ie(n.startLineNumber,n.startColumn),t).filter(a=>!Hc(a.hover.contents)).map(a=>new io(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal)):Dn.EMPTY}finally{o.dispose()}})}};dS=Vbe([u1(1,Ji),u1(2,er),u1(3,Dt),u1(4,xr),u1(5,Se)],dS)});var F8=N(()=>{lt();ec();O8();oY();Ue(uc.ID,uc,1);Bo.register(dS)});var uS,sY=N(()=>{Ir();uS=class{constructor(e,t,r){this._editRange=e,this._originalSelection=t,this._text=r}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Qe(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new Qe(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}});var aY=N(()=>{});var lY=N(()=>{aY()});var H8=Xi(h1=>{Ut();Vt();vu();lt();et();Ir();ei();Hr();j_();He();sY();lY();var Kbe=h1&&h1.__decorate||function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},$be=h1&&h1.__param||function(i,e){return function(t,r){e(t,r,i)}},hS,Bd=hS=class{static get(e){return e.getContribution(hS.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var r;(r=this.currentRequest)===null||r===void 0||r.cancel();let n=this.editor.getSelection(),o=this.editor.getModel();if(!o||!n)return;let s=n;if(s.startLineNumber!==s.endLineNumber)return;let a=new S_(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Zt(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=B.lift(c.range),h=c.range,f=c.value.length-(s.endColumn-s.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+c.value.length},f>1&&(s=new Qe(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+f-1));let m=new uS(u,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:hS.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=df(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(ft)}).catch(ft)):Promise.resolve(void 0)}};Bd.ID="editor.contrib.inPlaceReplaceController";Bd.DECORATION=mt.register({description:"in-place-replace",className:"valueSetReplacement"});Bd=hS=Kbe([$be(1,Cl)],Bd);var z8=class extends de{constructor(){super({id:"editor.action.inPlaceReplace.up",label:b("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3159,weight:100}})}run(e,t){let r=Bd.get(t);return r?r.run(this.id,!1):Promise.resolve(void 0)}},B8=class extends de{constructor(){super({id:"editor.action.inPlaceReplace.down",label:b("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3161,weight:100}})}run(e,t){let r=Bd.get(t);return r?r.run(this.id,!0):Promise.resolve(void 0)}};Ue(Bd.ID,Bd,4);ee(z8);ee(B8)});var U8,j8=N(()=>{lt();TP();ei();He();U8=class extends de{constructor(){super({id:"expandLineSelection",label:b("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:F.textInputFocus,primary:2090}})}run(e,t,r){if(r=r||{},!t.hasModel())return;let n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(r.source,3,Rm.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(r.source,!0)}};ee(U8)});function Gbe(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=[],r=0,n=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(n<o&&e[n].lineNumber===s&&(d=e[n].column,n++,d===c)||l.length===0)continue;let u=rf(l),h=0;if(u===-1)h=1;else if(u!==l.length-1)h=u+2;else continue;h=Math.max(d,h),t[r++]=ti.delete(new B(s,h,s,c))}return t}var fS,cY=N(()=>{Di();ba();et();fS=class{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let r=Gbe(e,this._cursors);for(let n=0,o=r.length;n<o;n++){let s=r[n];t.addEditOperation(s.range,s.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}});var f1,dY=N(()=>{et();Ir();f1=class{constructor(e,t,r){this._selection=e,this._isCopyingDown=t,this._noop=r||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let r=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,r.startLineNumber<r.endLineNumber&&r.endColumn===1&&(this._endLineNumberDelta=1,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1)));let n=[];for(let s=r.startLineNumber;s<=r.endLineNumber;s++)n.push(e.getLineContent(s));let o=n.join(` `);o===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new B(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber+1,1),r.endLineNumber===e.getLineCount()?"":` `):this._isCopyingDown?t.addEditOperation(new B(r.startLineNumber,1,r.startLineNumber,1),o+` `):t.addEditOperation(new B(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),` -`+o),this._selectionId=t.trackSelection(r),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let r=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=r.startLineNumber,o=r.startColumn,s=r.endLineNumber,a=r.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,a=1),r=Qe.createWithDirection(n,o,s,a,this._selectionDirection)}return r}}});var Ybe,Xbe,pS,dY=N(()=>{Di();X3();et();Ir();ure();Br();x8();FP();fre();Ybe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Xbe=function(i,e){return function(t,r){e(t,r,i)}},pS=class{constructor(e,t,r,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=r,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let r=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){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 n=this._selection;n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));let{tabSize:o,indentSize:s,insertSpaces:a}=e.getOptions(),l=this.buildIndentConverter(o,s,a),c={tokenization:{getLineTokens:d=>e.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,u)=>e.getLanguageIdAtPosition(d,u)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){let d=n.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new B(1,1,1,1),null):(t.addEditOperation(new B(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new B(u,1,u,e.getLineMaxColumn(u)),null)),n=new Qe(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=n.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new B(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,n)){let f=this.matchEnterRule(e,l,o,d,n.startLineNumber-1);if(f!==null){let g=Vi(e.getLineContent(d)),w=f+yn(g,o);h=_h(w,o,a)+this.trimStart(u)}else{c.getLineContent=w=>w===n.startLineNumber?e.getLineContent(d):e.getLineContent(w);let g=fu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber,l,this._languageConfigurationService);if(g!==null){let w=Vi(e.getLineContent(d)),_=yn(g,o),E=yn(w,o);_!==E&&(h=_h(_,o,a)+this.trimStart(u))}}t.addEditOperation(new B(n.startLineNumber,1,n.startLineNumber,1),h+` +`+o),this._selectionId=t.trackSelection(r),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let r=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=r.startLineNumber,o=r.startColumn,s=r.endLineNumber,a=r.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,o=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,a=1),r=Qe.createWithDirection(n,o,s,a,this._selectionDirection)}return r}}});var Ybe,Xbe,pS,uY=N(()=>{Di();Q3();et();Ir();ure();Br();C8();zP();fre();Ybe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Xbe=function(i,e){return function(t,r){e(t,r,i)}},pS=class{constructor(e,t,r,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=r,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let r=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){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 n=this._selection;n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));let{tabSize:o,indentSize:s,insertSpaces:a}=e.getOptions(),l=this.buildIndentConverter(o,s,a),c={tokenization:{getLineTokens:d=>e.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,u)=>e.getLanguageIdAtPosition(d,u)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){let d=n.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new B(1,1,1,1),null):(t.addEditOperation(new B(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new B(u,1,u,e.getLineMaxColumn(u)),null)),n=new Qe(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=n.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new B(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,n)){let f=this.matchEnterRule(e,l,o,d,n.startLineNumber-1);if(f!==null){let g=Vi(e.getLineContent(d)),w=f+yn(g,o);h=_h(w,o,a)+this.trimStart(u)}else{c.getLineContent=w=>w===n.startLineNumber?e.getLineContent(d):e.getLineContent(w);let g=fu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber,l,this._languageConfigurationService);if(g!==null){let w=Vi(e.getLineContent(d)),_=yn(g,o),E=yn(w,o);_!==E&&(h=_h(_,o,a)+this.trimStart(u))}}t.addEditOperation(new B(n.startLineNumber,1,n.startLineNumber,1),h+` `);let m=this.matchEnterRuleMovingDown(e,l,o,n.startLineNumber,d,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,n,o,a,m);else{c.getLineContent=w=>w===n.startLineNumber?h:w>=n.startLineNumber+1&&w<=n.endLineNumber+1?e.getLineContent(w-1):e.getLineContent(w);let g=fu(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,l,this._languageConfigurationService);if(g!==null){let w=Vi(e.getLineContent(n.startLineNumber)),_=yn(g,o),E=yn(w,o);if(_!==E){let A=_-E;this.getIndentEditsOfMovingBlock(e,t,n,o,a,A)}}}}else t.addEditOperation(new B(n.startLineNumber,1,n.startLineNumber,1),h+` `)}else if(d=n.startLineNumber-1,u=e.getLineContent(d),t.addEditOperation(new B(d,1,d+1,1),null),t.addEditOperation(new B(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),` -`+u),this.shouldAutoIndent(e,n)){c.getLineContent=f=>f===d?e.getLineContent(n.startLineNumber):e.getLineContent(f);let h=this.matchEnterRule(e,l,o,n.startLineNumber,n.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,n,o,a,h);else{let f=fu(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),d,l,this._languageConfigurationService);if(f!==null){let m=Vi(e.getLineContent(n.startLineNumber)),g=yn(f,o),w=yn(m,o);if(g!==w){let _=g-w;this.getIndentEditsOfMovingBlock(e,t,n,o,a,_)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,r){return{shiftIndent:n=>Bc.shiftIndent(n,n.length+1,e,t,r),unshiftIndent:n=>Bc.unshiftIndent(n,n.length+1,e,t,r)}}parseEnterResult(e,t,r,n,o){if(o){let s=o.indentation;o.indentAction===Pm.None||o.indentAction===Pm.Indent?s=o.indentation+o.appendText:o.indentAction===Pm.IndentOutdent?s=o.indentation:o.indentAction===Pm.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(n);if(this.trimStart(a).indexOf(this.trimStart(s))>=0){let l=Vi(e.getLineContent(n)),c=Vi(s),d=t_(e,n,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));let u=yn(c,r),h=yn(l,r);return u-h}}return null}matchEnterRuleMovingDown(e,t,r,n,o,s){if(rf(s)>=0){let a=e.getLineMaxColumn(o),l=e_(this._autoIndent,e,new B(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,r,n,l)}else{let a=n-1;for(;a>=1;){let d=e.getLineContent(a);if(rf(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=e_(this._autoIndent,e,new B(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,r,n,c)}}matchEnterRule(e,t,r,n,o,s){let a=o;for(;a>=1;){let d;if(a===o&&s!==void 0?d=s:d=e.getLineContent(a),rf(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=e_(this._autoIndent,e,new B(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,r,n,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let r=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(r!==n||this._languageConfigurationService.getLanguageConfiguration(r).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,r,n,o,s){for(let a=r.startLineNumber;a<=r.endLineNumber;a++){let l=e.getLineContent(a),c=Vi(l),u=yn(c,n)+s,h=_h(u,n,o);h!==c&&(t.addEditOperation(new B(a,1,a,c.length+1),h),a===r.endLineNumber&&r.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let r=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&r.startLineNumber<r.endLineNumber&&(r=r.setEndPosition(r.endLineNumber,2)),r}};pS=Ybe([Xbe(3,Pt)],pS)});function uY(i,e,t){let r=e.startLineNumber,n=e.endLineNumber;if(e.endColumn===1&&n--,r>=n)return null;let o=[];for(let a=r;a<=n;a++)o.push(i.getLineContent(a));let s=o.slice(0);return s.sort(yh.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:r,endLineNumber:n,before:o,after:s}}function Qbe(i,e,t){let r=uY(i,e,t);return r?ti.replace(new B(r.startLineNumber,1,r.endLineNumber,i.getLineMaxColumn(r.endLineNumber)),r.after.join(` -`)):null}var yh,hY=N(()=>{ba();et();yh=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 r=Qbe(e,this.selection,this.descending);r&&t.addEditOperation(r.range,r.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,r){if(e===null)return!1;let n=uY(e,t,r);if(!n)return!1;for(let o=0,s=n.before.length;o<s;o++)if(n.before[o]!==n.after[o])return!0;return!1}};yh._COLLATOR=null});var mS,j8,W8,V8,gS,q8,K8,bS,$8,G8,Y8,vS,X8,Q8,Z8,J8,e7,_S,t7,i7,r7,n7,Hd,o7,s7,hc,p1,wh,m1,xh,a7=N(()=>{sl();r_();lt();Yv();lY();mre();ba();ci();et();Ir();ei();cY();dY();hY();He();Zi();Br();mS=class extends de{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let r=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));r.sort((s,a)=>B.compareRangesUsingStarts(s.selection,a.selection));let n=r[0];for(let s=1;s<r.length;s++){let a=r[s];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}let o=[];for(let s of r)o.push(new f1(s.selection,this.down,s.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},j8=class extends mS{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:b("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}},W8=class extends mS{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:b("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}},V8=class extends de{constructor(){super({id:"editor.action.duplicateSelection",label:b("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:F.writable,menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,r){if(!t.hasModel())return;let n=[],o=t.getSelections(),s=t.getModel();for(let a of o)if(a.isEmpty())n.push(new f1(a,!0));else{let l=new Qe(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new SP(l,s.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},gS=class extends de{constructor(e,t){super(t),this.down=e}run(e,t){let r=e.get(Pt),n=[],o=t.getSelections()||[],s=t.getOption(11);for(let a of o)n.push(new pS(a,this.down,s,r));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},q8=class extends gS{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:b("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}},K8=class extends gS{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:b("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}},bS=class extends de{constructor(e,t){super(t),this.descending=e}run(e,t){let r=t.getSelections()||[];for(let o of r)if(!yh.canRun(t.getModel(),o,this.descending))return;let n=[];for(let o=0,s=r.length;o<s;o++)n[o]=new yh(r[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},$8=class extends bS{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:b("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:F.writable})}},G8=class extends bS{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:b("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:F.writable})}},Y8=class extends de{constructor(){super({id:"editor.action.removeDuplicateLines",label:b("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:F.writable})}run(e,t){if(!t.hasModel())return;let r=t.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let n=[],o=[],s=0;for(let a of t.getSelections()){let l=new Set,c=[];for(let f=a.startLineNumber;f<=a.endLineNumber;f++){let m=r.getLineContent(f);l.has(m)||(c.push(m),l.add(m))}let d=new Qe(a.startLineNumber,1,a.endLineNumber,r.getLineMaxColumn(a.endLineNumber)),u=a.startLineNumber-s,h=new Qe(u,1,u+c.length-1,c[c.length-1].length);n.push(ti.replace(d,c.join(` -`))),o.push(h),s+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}},vS=class i extends de{constructor(){super({id:i.ID,label:b("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2102),weight:100}})}run(e,t,r){let n=[];r.reason==="auto-save"&&(n=(t.getSelections()||[]).map(a=>new Ie(a.positionLineNumber,a.positionColumn)));let o=t.getSelection();if(o===null)return;let s=new fS(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};vS.ID="editor.action.trimTrailingWhitespace";X8=class extends de{constructor(){super({id:"editor.action.deleteLines",label:b("lines.delete","Delete Line"),alias:"Delete Line",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let r=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let o=0,s=[],a=[];for(let l=0,c=r.length;l<c;l++){let d=r[l],u=d.startLineNumber,h=d.endLineNumber,f=1,m=n.getLineMaxColumn(h);h<n.getLineCount()?(h+=1,m=1):u>1&&(u-=1,f=n.getLineMaxColumn(u)),s.push(ti.replace(new Qe(u,f,h,m),"")),a.push(new Qe(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.startLineNumber<o.endLineNumber&&o.endColumn===1&&(s-=1),{startLineNumber:o.startLineNumber,selectionStartColumn:o.selectionStartColumn,endLineNumber:s,positionColumn:o.positionColumn}});t.sort((o,s)=>o.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);let r=[],n=t[0];for(let o=1;o<t.length;o++)n.endLineNumber+1>=t[o].startLineNumber?n.endLineNumber=t[o].endLineNumber:(r.push(n),n=t[o]);return r.push(n),r}},Q8=class extends de{constructor(){super({id:"editor.action.indentLines",label:b("lines.indent","Indent Line"),alias:"Indent Line",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2142,weight:100}})}run(e,t){let r=t._getViewModel();r&&(t.pushUndoStop(),t.executeCommands(this.id,i_.indent(r.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},Z8=class extends de{constructor(){super({id:"editor.action.outdentLines",label:b("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2140,weight:100}})}run(e,t){af.Outdent.runEditorCommand(e,t,null)}},J8=class extends de{constructor(){super({id:"editor.action.insertLineBefore",label:b("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3075,weight:100}})}run(e,t){let r=t._getViewModel();r&&(t.pushUndoStop(),t.executeCommands(this.id,i_.lineInsertBefore(r.cursorConfig,t.getModel(),t.getSelections())))}},e7=class extends de{constructor(){super({id:"editor.action.insertLineAfter",label:b("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2051,weight:100}})}run(e,t){let r=t._getViewModel();r&&(t.pushUndoStop(),t.executeCommands(this.id,i_.lineInsertAfter(r.cursorConfig,t.getModel(),t.getSelections())))}},_S=class extends de{run(e,t){if(!t.hasModel())return;let r=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let l=0,c=n.length-1;l<c;l++){let d=n[l],u=n[l+1];B.intersectRanges(d,u)===null?o.push(d):n[l+1]=B.plusRange(d,u)}o.push(n[n.length-1]);let s=this._getEndCursorState(r,o),a=o.map(l=>ti.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},t7=class extends _S{constructor(){super({id:"deleteAllLeft",label:b("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let r=null,n=[],o=0;return t.forEach(s=>{let a;if(s.endColumn===1&&o>0){let l=s.startLineNumber-o;a=new Qe(l,s.startColumn,l,s.startColumn)}else a=new Qe(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?r=a:n.push(a)}),r&&n.unshift(r),n}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let r=t,n=e.getModel();return n===null?[]:(r.sort(B.compareRangesUsingStarts),r=r.map(o=>{if(o.isEmpty())if(o.startColumn===1){let s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:n.getLineContent(s).length+1;return new B(s,a,o.startLineNumber,1)}else return new B(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new B(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),r)}},i7=class extends _S{constructor(){super({id:"deleteAllRight",label:b("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let r=null,n=[];for(let o=0,s=t.length,a=0;o<s;o++){let l=t[o],c=new Qe(l.startLineNumber-a,l.startColumn,l.startLineNumber-a,l.startColumn);l.intersectRanges(e)?r=c:n.push(c)}return r&&n.unshift(r),n}_getRangesToDelete(e){let t=e.getModel();if(t===null)return[];let r=e.getSelections();if(r===null)return[];let n=r.map(o=>{if(o.isEmpty()){let s=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new B(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new B(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return n.sort(B.compareRangesUsingStarts),n}},r7=class extends de{constructor(){super({id:"editor.action.joinLines",label:b("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let r=t.getSelections();if(r===null)return;let n=t.getSelection();if(n===null)return;r.sort(B.compareRangesUsingStarts);let o=[],s=r.reduce((h,f)=>h.isEmpty()?h.endLineNumber===f.startLineNumber?(n.equalsSelection(h)&&(n=f),f):f.startLineNumber>h.endLineNumber+1?(o.push(h),f):new Qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>h.endLineNumber?(o.push(h),f):new Qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],d=n,u=0;for(let h=0,f=o.length;h<f;h++){let m=o[h],g=m.startLineNumber,w=1,_=0,E,A,L=a.getLineContent(m.endLineNumber).length-m.endColumn;if(m.isEmpty()||m.startLineNumber===m.endLineNumber){let Y=m.getStartPosition();Y.lineNumber<a.getLineCount()?(E=g+1,A=a.getLineMaxColumn(E)):(E=Y.lineNumber,A=a.getLineMaxColumn(Y.lineNumber))}else E=m.endLineNumber,A=a.getLineMaxColumn(E);let O=a.getLineContent(g);for(let Y=g+1;Y<=E;Y++){let oe=a.getLineContent(Y),te=a.getLineFirstNonWhitespaceColumn(Y);if(te>=1){let Z=!0;O===""&&(Z=!1),Z&&(O.charAt(O.length-1)===" "||O.charAt(O.length-1)===" ")&&(Z=!1,O=O.replace(/[\s\uFEFF\xA0]+$/g," "));let ve=oe.substr(te-1);O+=(Z?" ":"")+ve,Z?_=ve.length+1:_=ve.length}else _=0}let U=new B(g,w,E,A);if(!U.isEmpty()){let Y;m.isEmpty()?(l.push(ti.replace(U,O)),Y=new Qe(U.startLineNumber-u,O.length-_+1,g-u,O.length-_+1)):m.startLineNumber===m.endLineNumber?(l.push(ti.replace(U,O)),Y=new Qe(m.startLineNumber-u,m.startColumn,m.endLineNumber-u,m.endColumn)):(l.push(ti.replace(U,O)),Y=new Qe(m.startLineNumber-u,m.startColumn,m.startLineNumber-u,O.length-L)),B.intersectRanges(U,n)!==null?d=Y:c.push(Y)}u+=U.endLineNumber-U.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},n7=class extends de{constructor(){super({id:"editor.action.transpose",label:b("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:F.writable})}run(e,t){let r=t.getSelections();if(r===null)return;let n=t.getModel();if(n===null)return;let o=[];for(let s=0,a=r.length;s<a;s++){let l=r[s];if(!l.isEmpty())continue;let c=l.getStartPosition(),d=n.getLineMaxColumn(c.lineNumber);if(c.column>=d){if(c.lineNumber===n.getLineCount())continue;let u=new B(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=n.getValueInRange(u).split("").reverse().join("");o.push(new cl(new Qe(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let u=new B(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=n.getValueInRange(u).split("").reverse().join("");o.push(new Gv(u,h,new Qe(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},Hd=class extends de{run(e,t){let r=t.getSelections();if(r===null)return;let n=t.getModel();if(n===null)return;let o=t.getOption(128),s=[];for(let a of r)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let d=new B(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=n.getValueInRange(d);s.push(ti.replace(d,this._modifyText(u,o)))}else{let l=n.getValueInRange(a);s.push(ti.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},o7=class extends Hd{constructor(){super({id:"editor.action.transformToUppercase",label:b("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:F.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},s7=class extends Hd{constructor(){super({id:"editor.action.transformToLowercase",label:b("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:F.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},hc=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}},p1=class i extends Hd{constructor(){super({id:"editor.action.transformToTitlecase",label:b("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:F.writable})}_modifyText(e,t){let r=i.titleBoundary.get();return r?e.toLocaleLowerCase().replace(r,n=>n.toLocaleUpperCase()):e}};p1.titleBoundary=new hc("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");wh=class i extends Hd{constructor(){super({id:"editor.action.transformToSnakecase",label:b("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:F.writable})}_modifyText(e,t){let r=i.caseBoundary.get(),n=i.singleLetters.get();return!r||!n?e:e.replace(r,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase()}};wh.caseBoundary=new hc("(\\p{Ll})(\\p{Lu})","gmu");wh.singleLetters=new hc("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");m1=class i extends Hd{constructor(){super({id:"editor.action.transformToCamelcase",label:b("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:F.writable})}_modifyText(e,t){let r=i.wordBoundary.get();if(!r)return e;let n=e.split(r);return n.shift()+n.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}};m1.wordBoundary=new hc("[_\\s-]","gm");xh=class i extends Hd{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:b("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:F.writable})}_modifyText(e,t){let r=i.caseBoundary.get(),n=i.singleLetters.get(),o=i.underscoreBoundary.get();return!r||!n||!o?e:e.replace(o,"$1-$3").replace(r,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase()}};xh.caseBoundary=new hc("(\\p{Ll})(\\p{Lu})","gmu");xh.singleLetters=new hc("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");xh.underscoreBoundary=new hc("(\\S)(_)(\\S)","gm");ee(j8);ee(W8);ee(V8);ee(q8);ee(K8);ee($8);ee(G8);ee(Y8);ee(vS);ee(X8);ee(Q8);ee(Z8);ee(J8);ee(e7);ee(t7);ee(i7);ee(r7);ee(n7);ee(o7);ee(s7);wh.caseBoundary.isSupported()&&wh.singleLetters.isSupported()&&ee(wh);m1.wordBoundary.isSupported()&&ee(m1);p1.titleBoundary.isSupported()&&ee(p1);xh.isSupported()&&ee(xh)});var fY=N(()=>{});var pY=N(()=>{fY()});function gY(i,e,t,r){let n=i.ordered(e);return l_(n.map(o=>()=>l7(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,r)}catch(s){Yt(s);return}})),o=>!!o&&qi(o==null?void 0:o.ranges))}var Zbe,yS,l7,wS,mY,Jbe,Ud,c7,e1e,eut,u7=N(()=>{pi();Ut();Si();aa();Vt();Jt();ke();Di();Tr();lt();Tn();ci();et();ei();Hr();Br();He();wt();Rt();en();Ls();ol();pY();Zbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},yS=function(i,e){return function(t,r){e(t,r,i)}},l7=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},mY=new ht("LinkedEditingInputVisible",!1),Jbe="linked-editing-decoration",Ud=wS=class extends ce{static get(e){return e.getContribution(wS.ID)}constructor(e,t,r,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new le),this._editor=e,this._providers=r.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=mY.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 le),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(68)||s.hasChanged(91))&&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(),r=t!==null&&(this._editor.getOption(68)||this._editor.getOption(91))&&this._providers.has(t);if(r===this._enabled&&!e||(this._enabled=r,this.clearRanges(),this._localToDispose.clear(),!r||t===null))return;this._localToDispose.add(li.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let n=new Lo(this._debounceInformation.get(t)),o=()=>{var l;this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},s=new Lo(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:()=>{n.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),r=this._currentDecorations.getRange(0);if(!r||r.startLineNumber!==r.endLineNumber)return this.clearRanges();let n=t.getValueInRange(r);if(this._currentWordPattern){let s=n.match(this._currentWordPattern);if((s?s[0].length:0)!==n.length)return this.clearRanges()}let o=[];for(let s=1,a=this._currentDecorations.length;s<a;s++){let l=this._currentDecorations.getRange(s);if(l)if(l.startLineNumber!==l.endLineNumber)o.push({range:l,text:n});else{let c=t.getValueInRange(l),d=n,u=l.startColumn,h=l.endColumn,f=Pc(c,d);u+=f,c=c.substr(f),d=d.substr(f);let m=pP(c,d);h-=m,c=c.substr(0,c.length-m),d=d.substr(0,d.length-m),(u!==h||d.length!==0)&&o.push({range:new B(l.startLineNumber,u,l.endLineNumber,h),text:d})}}if(o.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;let s=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(s)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return l7(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}let t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}let r=this._editor.getModel(),n=r.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){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=n;let o=Zt(s=>l7(this,void 0,void 0,function*(){try{let a=new pr(!1),l=yield gY(this._providers,r,t,s);if(this._debounceInformation.update(r,a.elapsed()),o!==this._currentRequest||(this._currentRequest=null,n!==r.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,f=c.length;h<f;h++)if(B.containsPosition(c[h],t)){if(d=!0,h!==0){let m=c[h];c.splice(h,1),c.unshift(m)}break}if(!d){this.clearRanges();return}let u=c.map(h=>({range:h,options:wS.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){$o(a)||ft(a),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};Ud.ID="editor.contrib.linkedEditing";Ud.DECORATION=mt.register({description:"linked-editing",stickiness:0,className:Jbe});Ud=wS=Zbe([yS(1,it),yS(2,Se),yS(3,Pt),yS(4,ar)],Ud);c7=class extends de{constructor(){super({id:"editor.action.linkedEditing",label:b("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:fe.and(F.writable,F.hasRenameProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let r=e.get(si),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return yt.isUri(n)&&Ie.isIPosition(o)?r.openCodeEditor({resource:n},r.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let r=Ud.get(t);return r?Promise.resolve(r.updateRanges(!0)):Promise.resolve()}},e1e=Oi.bindToContribution(Ud.get);We(new e1e({id:"cancelLinkedEditingInput",precondition:mY,handler:i=>i.clearRanges(),kbOpts:{kbExpr:F.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));eut=je("editor.linkedEditingBackground",{dark:vt.fromHex("#f00").transparent(.3),light:vt.fromHex("#f00").transparent(.3),hcDark:vt.fromHex("#f00").transparent(.3),hcLight:vt.white},b("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Kn("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:r}=i.get(Se);return gY(r,e,t,st.None)});Ue(Ud.ID,Ud,1);ee(c7)});var bY=N(()=>{});var vY=N(()=>{bY()});function f7(i,e,t){let r=[],n=i.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,t)).then(a=>{a&&(r[s]=[a,o])},Yt));return Promise.all(n).then(()=>{let o=new xS(un(r));return t.isCancellationRequested?(o.dispose(),new xS([])):o})}var _Y,h7,xS,yY=N(()=>{pi();Si();Vt();ke();Fr();Tr();et();Go();Wi();Rt();_Y=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},h7=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 _Y(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"))})}},xS=class i{constructor(e){this._disposables=new le;let t=[];for(let[r,n]of e){let o=r.links.map(s=>new h7(s,n));t=i._union(t,o),Rv(r)&&this._disposables.add(r)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let r=[],n,o,s,a;for(n=0,s=0,o=e.length,a=t.length;n<o&&s<a;){let l=e[n],c=t[s];if(B.areIntersectingOrTouching(l.range,c.range)){n++;continue}B.compareRangesUsingStarts(l.range,c.range)<0?(r.push(l),n++):(r.push(c),s++)}for(;n<o;n++)r.push(e[n]);for(;s<a;s++)r.push(t[s]);return r}};At.registerCommand("_executeLinkProvider",(i,...e)=>_Y(void 0,void 0,void 0,function*(){let[t,r]=e;zt(t instanceof yt),typeof r!="number"&&(r=0);let{linkProvider:n}=i.get(Se),o=i.get(Li).getModel(t);if(!o)return[];let s=yield f7(n,o,st.None);if(!s)return[];for(let l=0;l<Math.min(r,s.links.length);l++)yield s.links[l].resolve(st.None);let a=s.links.slice(0);return s.dispose(),a}))});function r1e(i,e){let t=i.url&&/^command:/i.test(i.url.toString()),r=i.tooltip?i.tooltip:t?b("links.navigate.executeCmd","Execute command"):b("links.navigate.follow","Follow link"),n=e?kn?b("links.navigate.kb.meta.mac","cmd + click"):b("links.navigate.kb.meta","ctrl + click"):kn?b("links.navigate.kb.alt.mac","option + click"):b("links.navigate.kb.alt","alt + click");if(i.url){let o="";if(/^command:/i.test(i.url.toString())){let a=i.url.toString().match(/^command:([^?#]+)/);if(a){let l=a[1];o=b("tooltip.explanation","Execute command {0}",l)}}return new Ki("",!0).appendLink(i.url.toString(!0).replace(/ /g,"%20"),r,o).appendMarkdown(` (${n})`)}else return new Ki().appendText(`${r} (${n})`)}var t1e,CS,i1e,p7,qp,wY,SS,m7,g7=N(()=>{Ut();Si();Vt();Ss();ke();Im();En();Io();ol();Tr();vY();lt();Hr();Ls();Rt();Jb();yY();He();Ao();es();t1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},CS=function(i,e){return function(t,r){e(t,r,i)}},i1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},qp=p7=class extends ce{static get(e){return e.getContribution(p7.ID)}constructor(e,t,r,n,o){super(),this.editor=e,this.openerService=t,this.notificationService=r,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new di(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new Ya(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(69)&&(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 i1e(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(69))return;let e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Zt(t=>f7(this.providers,e,t));try{let t=new pr(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){ft(t)}finally{this.computePromise=null}}})}updateDecorations(e){let t=this.editor.getOption(76)==="altKey",r=[],n=Object.keys(this.currentOccurrences);for(let s of n){let a=this.currentOccurrences[s];r.push(a.decorationId)}let o=[];if(e)for(let s of e)o.push(SS.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(r,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l<c;l++){let d=new SS(e[l],a[l]);this.currentOccurrences[d.decorationId]=d}})}_onEditorMouseMove(e,t){let r=this.editor.getOption(76)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();let n=this.getLinkOccurrence(e.target.position);n&&this.editor.changeDecorations(o=>{n.activate(o,r),this.activeLinkDecorationId=n.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(76)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(r=>{t.deactivate(r,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,r=!1){if(!this.openerService)return;let{link:n}=e;n.resolve(st.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===So.file&&o.startsWith(`${So.file}:`)){let a=yt.parse(o);if(a.scheme===So.file){let l=GP(a),c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(o=QP(s,c))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:r,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{let s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(b("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):s==="missing"?this.notificationService.warn(b("missing.url","Failed to open this link because its target is missing.")):ft(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 r of t){let n=this.currentOccurrences[r.id];if(n)return n}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()}};qp.ID="editor.linkDetector";qp=p7=t1e([CS(1,er),CS(2,Mi),CS(3,Se),CS(4,ar)],qp);wY={general:mt.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:mt.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},SS=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,r){let n=Object.assign({},r?wY.active:wY.general);return n.hoverMessage=r1e(e,t),n}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))}};m7=class extends de{constructor(){super({id:"editor.action.openLink",label:b("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let r=qp.get(t);if(!r||!t.hasModel())return;let n=t.getSelections();for(let o of n){let s=r.getLinkOccurrence(o.getEndPosition());s&&r.openLinkOccurrence(s,!1)}}};Ue(qp.ID,qp,1);ee(m7)});var g1,b7=N(()=>{ke();lt();g1=class extends ce{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let r=this._editor.getOption(115);r>=0&&t.target.type===6&&t.target.position.column>=r&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};g1.ID="editor.contrib.longLinesHelper";Ue(g1.ID,g1,2)});var xY=N(()=>{});var CY=N(()=>{xY()});function SY(i){return i===Gm.Write?a1e:i===Gm.Text?l1e:u1e}function kY(i){return i?d1e:c1e}var kS,ES,n1e,o1e,s1e,a1e,l1e,c1e,d1e,u1e,v7=N(()=>{CY();jc();Hr();hn();He();en();tn();kS=je("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},b("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);je("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},b("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);je("editor.wordHighlightTextBackground",{light:kS,dark:kS,hcDark:kS,hcLight:kS},b("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);ES=je("editor.wordHighlightBorder",{light:null,dark:null,hcDark:ca,hcLight:ca},b("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));je("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:ca,hcLight:ca},b("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));je("editor.wordHighlightTextBorder",{light:ES,dark:ES,hcDark:ES,hcLight:ES},b("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));n1e=je("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},b("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),o1e=je("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},b("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),s1e=je("editorOverviewRuler.wordHighlightTextForeground",{dark:pf,light:pf,hcDark:pf,hcLight:pf},b("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),a1e=mt.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:ki(o1e),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}}),l1e=mt.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:ki(s1e),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}}),c1e=mt.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:ki(pf),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}}),d1e=mt.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),u1e=mt.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:ki(n1e),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}});mf((i,e)=>{let t=i.getColor(yO);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function Wd(i,e){let t=e.filter(r=>!i.find(n=>n.equals(r)));if(t.length>=1){let r=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),n=t.length===1?b("cursorAdded","Cursor added: {0}",r):b("cursorsAdded","Cursors added: {0}",r);cu(n)}}function TY(i,e,t){let r=EY(i,e[0],!t);for(let n=1,o=e.length;n<o;n++){let s=e[n];if(s.isEmpty())return!1;let a=EY(i,s,!t);if(r!==a)return!1}return!0}function EY(i,e,t){let r=i.getValueInRange(e);return t?r.toLowerCase():r}var h1e,f1e,_7,y7,w7,x7,C7,S7,Kp,TS,Ch,jd,k7,E7,T7,I7,L7,A7,D7,b1,M7,N7,R7=N(()=>{Eo();Ut();sl();ke();lt();EP();et();Ir();ei();b2();He();Zi();wt();Rt();v7();Ht();h1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},f1e=function(i,e){return function(t,r){e(t,r,i)}};y7=class extends de{constructor(){super({id:"editor.action.insertCursorAbove",label:b("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,r){if(!t.hasModel())return;let n=!0;r&&r.logicalLine===!1&&(n=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(r.source,3,Rm.addCursorUp(o,s,n)),o.revealTopMostCursor(r.source),Wd(s,o.getCursorStates())}},w7=class extends de{constructor(){super({id:"editor.action.insertCursorBelow",label:b("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,r){if(!t.hasModel())return;let n=!0;r&&r.logicalLine===!1&&(n=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(r.source,3,Rm.addCursorDown(o,s,n)),o.revealBottomMostCursor(r.source),Wd(s,o.getCursorStates())}},x7=class extends de{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:b("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,r){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let o=t.getLineMaxColumn(n);r.push(new Qe(n,o,n,o))}e.endColumn>1&&r.push(new Qe(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let r=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),a=[];n.forEach(l=>this.getCursorsForSelection(l,r,a)),a.length>0&&t.setSelections(a),Wd(s,o.getCursorStates())}},C7=class extends de{constructor(){super({id:"editor.action.addCursorsToBottom",label:b("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let r=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let l=r[0].startLineNumber;l<=n;l++)o.push(new Qe(l,r[0].startColumn,l,r[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),Wd(a,s.getCursorStates())}},S7=class extends de{constructor(){super({id:"editor.action.addCursorsToTop",label:b("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let r=t.getSelections(),n=[];for(let a=r[0].startLineNumber;a>=1;a--)n.push(new Qe(a,r[0].startColumn,a,r[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),Wd(s,o.getCursorStates())}},Kp=class{constructor(e,t,r){this.selections=e,this.revealRange=t,this.revealScrollType=r}},TS=class i{static create(e,t){if(!e.hasModel())return null;let r=t.getState();if(!e.hasTextFocus()&&r.isRevealed&&r.searchString.length>0)return new i(e,t,!1,r.searchString,r.wholeWord,r.matchCase,null);let n=!1,o,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(n=!0,o=!0,s=!0):(o=r.wholeWord,s=r.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 Qe(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` -`);return new i(e,t,n,c,o,s,d)}constructor(e,t,r,n,o,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=r,this.searchText=n,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 Kp(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 Kp(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],r=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return r?new Qe(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.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 Kp(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 Kp(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],r=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return r?new Qe(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.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(128):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824)}},Ch=class i extends ce{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new le),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=TS.create(this._editor,e);if(!t)return;this._session=t;let r={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(r.wholeWordOverride=1,r.matchCaseOverride=1,r.isRegexOverride=2),e.getState().change(r,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.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 r=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return r?new Qe(t.startLineNumber,r.startColumn,t.startLineNumber,r.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 n=e.getState().matchCase;if(!TY(this._editor.getModel(),t,n)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(s,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null,r=e.getState();if(r.isRevealed&&r.searchString.length>0&&r.isRegex){let n=this._editor.getModel();r.searchScope?t=n.findMatches(r.searchString,r.searchScope,r.isRegex,r.matchCase,r.wholeWord?this._editor.getOption(128):null,!1,1073741824):t=n.findMatches(r.searchString,!0,r.isRegex,r.matchCase,r.wholeWord?this._editor.getOption(128):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(r.searchScope)}if(t.length>0){let n=this._editor.getSelection();for(let o=0,s=t.length;o<s;o++){let a=t[o];if(a.range.intersectRanges(n)){t[o]=t[0],t[0]=a;break}}this._setSelections(t.map(o=>new Qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};Ch.ID="editor.contrib.multiCursorController";jd=class extends de{run(e,t){let r=Ch.get(t);if(!r)return;let n=t._getViewModel();if(n){let o=n.getCursorStates(),s=an.get(t);if(s)this._run(r,s);else{let a=e.get(Ke).createInstance(an,t);this._run(r,a),a.dispose()}Wd(o,n.getCursorStates())}}},k7=class extends jd{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:b("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2082,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},E7=class extends jd{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:b("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},T7=class extends jd{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:b("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:mi(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},I7=class extends jd{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:b("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)}},L7=class extends jd{constructor(){super({id:"editor.action.selectHighlights",label:b("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:3114,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},A7=class extends jd{constructor(){super({id:"editor.action.changeAll",label:b("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:fe.and(F.writable,F.editorTextFocus),kbOpts:{kbExpr:F.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},D7=class{constructor(e,t,r,n,o){this._model=e,this._searchText=t,this._matchCase=r,this._wordSeparators=n,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(B.compareRangesUsingStarts)),this._cachedFindMatches}},b1=_7=class extends ce{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(106),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new di(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(n=>{this._isEnabled=e.getOption(106)})),this._register(e.onDidChangeCursorSelection(n=>{this._isEnabled&&(n.selection.isEmpty()?n.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(n=>{this._setState(null)})),this._register(e.onDidChangeModelContent(n=>{this._isEnabled&&this.updateSoon.schedule()}));let r=an.get(e);r&&this._register(r.getState().onFindReplaceStateChange(n=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(_7._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,r){if(!t||!r.hasModel())return null;let n=r.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;let o=Ch.get(r);if(!o)return null;let s=an.get(r);if(!s)return null;let a=o.getSession(s);if(!a){let d=r.getSelections();if(d.length>1){let h=s.getState().matchCase;if(!TY(r.getModel(),d,h))return null}a=TS.create(r,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 D7(r.getModel(),a.searchText,a.matchCase,a.wholeWord?r.getOption(128):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 r=this.state.findMatches(),n=this.editor.getSelections();n.sort(B.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=r.length,u=n.length;l<d;){let h=r[l];if(c>=u)o.push(h),l++;else{let f=B.compareRangesUsingStarts(h,n[c]);f<0?((n[c].isEmpty()||!B.areIntersecting(h,n[c]))&&o.push(h),l++):(f>0||l++,c++)}}let s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(79),a=o.map(l=>({range:l,options:kY(s)}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};b1.ID="editor.contrib.selectionHighlighter";b1=_7=h1e([f1e(1,Se)],b1);M7=class extends de{constructor(){super({id:"editor.action.focusNextCursor",label:b("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:b("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,r){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let o=Array.from(n.getCursorStates()),s=o.shift();s&&(o.push(s),n.setCursorStates(r.source,3,o),n.revealPrimaryCursor(r.source,!0),Wd(o,n.getCursorStates()))}},N7=class extends de{constructor(){super({id:"editor.action.focusPreviousCursor",label:b("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:b("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,r){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let o=Array.from(n.getCursorStates()),s=o.pop();s&&(o.unshift(s),n.setCursorStates(r.source,3,o),n.revealPrimaryCursor(r.source,!0),Wd(o,n.getCursorStates()))}};Ue(Ch.ID,Ch,4);Ue(b1.ID,b1,1);ee(y7);ee(w7);ee(x7);ee(k7);ee(E7);ee(T7);ee(I7);ee(L7);ee(A7);ee(C7);ee(S7);ee(M7);ee(N7)});function P7(i,e,t,r,n){return IY(this,void 0,void 0,function*(){let o=i.ordered(e);for(let s of o)try{let a=yield s.provideSignatureHelp(e,t,n,r);if(a)return a}catch(a){Yt(a)}})}var IY,fc,IS=N(()=>{Si();Vt();Fr();Tr();ci();hn();Rt();ta();Wi();wt();IY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},fc={Visible:new ht("parameterHintsVisible",!1),MultipleSignatures:new ht("parameterHintsMultipleSignatures",!1)};At.registerCommand("_executeSignatureHelpProvider",(i,...e)=>IY(void 0,void 0,void 0,function*(){let[t,r,n]=e;zt(yt.isUri(t)),zt(Ie.isIPosition(r)),zt(typeof n=="string"||!n);let o=i.get(Se),s=yield i.get(xr).createModelReference(t);try{let a=yield P7(o.signatureHelpProvider,s.object.textEditorModel,Ie.lift(r),{triggerKind:Es.Invoke,isRetrigger:!1,triggerCharacter:n},st.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}}))});function m1e(i,e){switch(e.triggerKind){case Es.Invoke:return e;case Es.ContentChange:return i;case Es.TriggerCharacter:default:return e}}var p1e,Vd,v1,LY=N(()=>{Ut();Vt();Jt();ke();V3();hn();IS();p1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};(function(i){i.Default={type:0};class e{constructor(n,o){this.request=n,this.previouslyActiveHints=o,this.type=2}}i.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}i.Active=t})(Vd||(Vd={}));v1=class i extends ce{constructor(e,t,r=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Je),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Vd.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new ji),this.triggerChars=new uu,this.retriggerChars=new uu,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Lo(r),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(n=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(n=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(n=>this.onCursorChange(n))),this._register(this.editor.onDidChangeModelContent(n=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(n=>this.onDidType(n))),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=Vd.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let r=this.editor.getModel();if(!r||!this.providers.has(r))return;let n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(ft)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,r=t%e===e-1,n=this.editor.getOption(84).cycle;if((e<2||r)&&!n){this.cancel();return}this.updateActiveSignature(r&&n?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,r=t===0,n=this.editor.getOption(84).cycle;if((e<2||r)&&!n){this.cancel();return}this.updateActiveSignature(r&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new Vd.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return p1e(this,void 0,void 0,function*(){let t=this.state.type===1||this.state.type===2,r=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let n=this._pendingTriggers.reduce(m1e);this._pendingTriggers=[];let o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:r};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new Vd.Pending(Zt(l=>P7(this.providers,s,a,o,l)),r);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 Vd.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=Vd.Default),ft(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 r of t.signatureHelpTriggerCharacters||[])if(r.length){let n=r.charCodeAt(0);this.triggerChars.add(n),this.retriggerChars.add(n)}for(let r of t.signatureHelpRetriggerCharacters||[])r.length&&this.retriggerChars.add(r.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,r=e.charCodeAt(t);(this.triggerChars.has(r)||this.isTriggered&&this.retriggerChars.has(r))&&this.trigger({triggerKind:Es.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Es.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Es.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(84).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};v1.DEFAULT_DELAY=120});var AY=N(()=>{});var DY=N(()=>{AY()});var g1e,O7,F7,vo,b1e,v1e,_1,MY=N(()=>{Bt();Eo();A_();Qr();Jt();ke();Di();Fr();DY();Zo();xd();IS();He();wt();es();en();xl();In();g1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},O7=function(i,e){return function(t,r){e(t,r,i)}},vo=Le,b1e=Ni("parameter-hints-next",pt.chevronDown,b("parameterHintsNextIcon","Icon for show next parameter hint.")),v1e=Ni("parameter-hints-previous",pt.chevronUp,b("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),_1=F7=class extends ce{constructor(e,t,r,n,o){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new le),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new eo({editor:e},o,n)),this.keyVisible=fc.Visible.bindTo(r),this.keyMultipleSignatures=fc.MultipleSignatures.bindTo(r)}createParameterHintDOMNodes(){let e=vo(".editor-widget.parameter-hints-widget"),t=Te(e,vo(".phwrapper"));t.tabIndex=-1;let r=Te(t,vo(".controls")),n=Te(r,vo(".button"+_t.asCSSSelector(v1e))),o=Te(r,vo(".overloads")),s=Te(r,vo(".button"+_t.asCSSSelector(b1e)));this._register(Lt(n,"click",h=>{au.stop(h),this.previous()})),this._register(Lt(s,"click",h=>{au.stop(h),this.next()}));let a=vo(".body"),l=new wf(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=Te(a,vo(".signature")),d=Te(a,vo(".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(49);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(49)).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 r=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",r),this.keyMultipleSignatures.set(r),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let n=e.signatures[e.activeSignature];if(!n)return;let o=Te(this.domNodes.signature,vo(".code")),s=this.editor.getOption(49);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;let a=n.parameters.length>0,l=(t=n.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(o,n,l);else{let u=Te(o,vo("span"));u.textContent=n.label}let c=n.parameters[l];if(c!=null&&c.documentation){let u=vo("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{let h=this.renderMarkdownDocs(c.documentation);u.appendChild(h.element)}Te(this.domNodes.docs,vo("p",{},u))}if(n.documentation!==void 0)if(typeof n.documentation=="string")Te(this.domNodes.docs,vo("p",{},n.documentation));else{let u=this.renderMarkdownDocs(n.documentation);Te(this.domNodes.docs,u.element)}let d=this.hasDocs(n,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=n.parameters[l];Array.isArray(h.label)?u=n.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),n.documentation&&(u+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==u&&(sr(b("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 r;(r=this.domNodes)===null||r===void 0||r.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Ac(t.documentation).length>0||t&&typeof t.documentation=="object"&&Ac(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Ac(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Ac(e.documentation.value).length>0)}renderParameters(e,t,r){let[n,o]=this.getParameterLabelOffsets(t,r),s=document.createElement("span");s.textContent=t.label.substring(0,n);let a=document.createElement("span");a.textContent=t.label.substring(n,o),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(o),Te(e,s,a,l)}getParameterLabelOffsets(e,t){let r=e.parameters[t];if(r){if(Array.isArray(r.label))return r.label;if(r.label.length){let n=new RegExp(`(\\W|^)${al(r.label)}(?=\\W|$)`,"g");n.test(e.label);let o=n.lastIndex-r.label.length;return o>=0?[o,n.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 F7.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let r=this.domNodes.element.getElementsByClassName("phwrapper");r.length&&(r[0].style.maxHeight=t)}};_1.ID="editor.widget.parameterHintsWidget";_1=F7=g1e([O7(2,it),O7(3,er),O7(4,Ji)],_1);je("editorHoverWidget.highlightForeground",{dark:ua,light:ua,hcDark:ua,hcLight:ua},b("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var _1e,NY,z7,Sh,B7,H7,U7,j7=N(()=>{P3();ke();lt();ei();hn();Rt();LY();IS();He();wt();Ht();MY();_1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},NY=function(i,e){return function(t,r){e(t,r,i)}},Sh=z7=class extends ce{static get(e){return e.getContribution(z7.ID)}constructor(e,t,r){super(),this.editor=e,this.model=this._register(new v1(e,r.signatureHelpProvider)),this._register(this.model.onChangedHints(n=>{var o;n?(this.widget.value.show(),this.widget.value.render(n)):(o=this.widget.rawValue)===null||o===void 0||o.hide()})),this.widget=new ef(()=>this._register(t.createInstance(_1,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)}};Sh.ID="editor.controller.parameterHints";Sh=z7=_1e([NY(1,Ke),NY(2,Se)],Sh);B7=class extends de{constructor(){super({id:"editor.action.triggerParameterHints",label:b("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:F.hasSignatureHelpProvider,kbOpts:{kbExpr:F.editorTextFocus,primary:3082,weight:100}})}run(e,t){let r=Sh.get(t);r==null||r.trigger({triggerKind:Es.Invoke})}};Ue(Sh.ID,Sh,2);ee(B7);H7=100+75,U7=Oi.bindToContribution(Sh.get);We(new U7({id:"closeParameterHints",precondition:fc.Visible,handler:i=>i.cancel(),kbOpts:{weight:H7,kbExpr:F.focus,primary:9,secondary:[1033]}}));We(new U7({id:"showPrevParameterHint",precondition:fe.and(fc.Visible,fc.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:H7,kbExpr:F.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));We(new U7({id:"showNextParameterHint",precondition:fe.and(fc.Visible,fc.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:H7,kbExpr:F.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var RY=N(()=>{});var PY=N(()=>{RY()});var y1e,W7,y1,LS,OY=N(()=>{ke();PY();ci();He();wt();Ur();en();tn();y1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},W7=function(i,e){return function(t,r){e(t,r,i)}},y1=new ht("renameInputVisible",!1,b("renameInputVisible","Whether the rename input widget is visible")),LS=class{constructor(e,t,r,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=r,this._keybindingService=n,this._disposables=new le,this.allowEditorOverflow=!0,this._visibleContextKey=y1.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(49)&&this._updateFont()})),this._disposables.add(r.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",b("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,r,n,o;if(!this._input||!this._domNode)return;let s=e.getColor(u_),a=e.getColor(h_);this._domNode.style.backgroundColor=String((t=e.getColor(ml))!==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((r=e.getColor(uO))!==null&&r!==void 0?r:""),this._input.style.backgroundColor=String((n=e.getColor(dO))!==null&&n!==void 0?n:"");let l=e.getColor(hO);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(49);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[r,n]=this._acceptKeybindings;return this._label.innerText=b({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(r))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(n))===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,r,n,o,s){this._domNode.classList.toggle("preview",o),this._position=new Ie(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",r.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);let a=new le;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)}};LS=y1e([W7(2,gr),W7(3,qt),W7(4,it)],LS)});function x1e(i,e,t,r){return Eh(this,void 0,void 0,function*(){let n=new w1(e,t,i),o=yield n.resolveRenameLocation(st.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(r,st.None)})}var w1e,kh,Eh,V7,w1,Th,q7,K7,$7=N(()=>{Eo();Ut();Si();Vt();ke();Fr();Tr();vu();lt();Zm();Tn();ci();et();ei();nne();L0();He();G3();wt();Ht();Kv();Ao();Vc();ll();OY();Rt();w1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},kh=function(i,e){return function(t,r){e(t,r,i)}},Eh=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},w1=class{constructor(e,t,r){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=r.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Eh(this,void 0,void 0,function*(){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){let n=this._providers[this._providerRenameIdx];if(!n.resolveRenameLocation)break;let o=yield n.resolveRenameLocation(this.model,this.position,e);if(o){if(o.rejectReason){t.push(o.rejectReason);continue}return o}}let r=this.model.getWordAtPosition(this.position);return r?{range:new B(this.position.lineNumber,r.startColumn,this.position.lineNumber,r.endColumn),text:r.word,rejectReason:t.length>0?t.join(` +`+u),this.shouldAutoIndent(e,n)){c.getLineContent=f=>f===d?e.getLineContent(n.startLineNumber):e.getLineContent(f);let h=this.matchEnterRule(e,l,o,n.startLineNumber,n.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,n,o,a,h);else{let f=fu(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),d,l,this._languageConfigurationService);if(f!==null){let m=Vi(e.getLineContent(n.startLineNumber)),g=yn(f,o),w=yn(m,o);if(g!==w){let _=g-w;this.getIndentEditsOfMovingBlock(e,t,n,o,a,_)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,r){return{shiftIndent:n=>Bc.shiftIndent(n,n.length+1,e,t,r),unshiftIndent:n=>Bc.unshiftIndent(n,n.length+1,e,t,r)}}parseEnterResult(e,t,r,n,o){if(o){let s=o.indentation;o.indentAction===Pm.None||o.indentAction===Pm.Indent?s=o.indentation+o.appendText:o.indentAction===Pm.IndentOutdent?s=o.indentation:o.indentAction===Pm.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let a=e.getLineContent(n);if(this.trimStart(a).indexOf(this.trimStart(s))>=0){let l=Vi(e.getLineContent(n)),c=Vi(s),d=t_(e,n,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));let u=yn(c,r),h=yn(l,r);return u-h}}return null}matchEnterRuleMovingDown(e,t,r,n,o,s){if(rf(s)>=0){let a=e.getLineMaxColumn(o),l=e_(this._autoIndent,e,new B(o,a,o,a),this._languageConfigurationService);return this.parseEnterResult(e,t,r,n,l)}else{let a=n-1;for(;a>=1;){let d=e.getLineContent(a);if(rf(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=e_(this._autoIndent,e,new B(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,r,n,c)}}matchEnterRule(e,t,r,n,o,s){let a=o;for(;a>=1;){let d;if(a===o&&s!==void 0?d=s:d=e.getLineContent(a),rf(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=e_(this._autoIndent,e,new B(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,r,n,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;let r=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(r!==n||this._languageConfigurationService.getLanguageConfiguration(r).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,r,n,o,s){for(let a=r.startLineNumber;a<=r.endLineNumber;a++){let l=e.getLineContent(a),c=Vi(l),u=yn(c,n)+s,h=_h(u,n,o);h!==c&&(t.addEditOperation(new B(a,1,a,c.length+1),h),a===r.endLineNumber&&r.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let r=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&r.startLineNumber<r.endLineNumber&&(r=r.setEndPosition(r.endLineNumber,2)),r}};pS=Ybe([Xbe(3,Pt)],pS)});function hY(i,e,t){let r=e.startLineNumber,n=e.endLineNumber;if(e.endColumn===1&&n--,r>=n)return null;let o=[];for(let a=r;a<=n;a++)o.push(i.getLineContent(a));let s=o.slice(0);return s.sort(yh.getCollator().compare),t===!0&&(s=s.reverse()),{startLineNumber:r,endLineNumber:n,before:o,after:s}}function Qbe(i,e,t){let r=hY(i,e,t);return r?ti.replace(new B(r.startLineNumber,1,r.endLineNumber,i.getLineMaxColumn(r.endLineNumber)),r.after.join(` +`)):null}var yh,fY=N(()=>{ba();et();yh=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 r=Qbe(e,this.selection,this.descending);r&&t.addEditOperation(r.range,r.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,r){if(e===null)return!1;let n=hY(e,t,r);if(!n)return!1;for(let o=0,s=n.before.length;o<s;o++)if(n.before[o]!==n.after[o])return!0;return!1}};yh._COLLATOR=null});var mS,W8,V8,q8,gS,K8,$8,bS,G8,Y8,X8,vS,Q8,Z8,J8,e7,t7,_S,i7,r7,n7,o7,Hd,s7,a7,hc,p1,wh,m1,xh,l7=N(()=>{sl();r_();lt();Yv();cY();mre();ba();ci();et();Ir();ei();dY();uY();fY();He();Zi();Br();mS=class extends de{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;let r=t.getSelections().map((s,a)=>({selection:s,index:a,ignore:!1}));r.sort((s,a)=>B.compareRangesUsingStarts(s.selection,a.selection));let n=r[0];for(let s=1;s<r.length;s++){let a=r[s];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}let o=[];for(let s of r)o.push(new f1(s.selection,this.down,s.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},W8=class extends mS{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:b("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}},V8=class extends mS{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:b("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}},q8=class extends de{constructor(){super({id:"editor.action.duplicateSelection",label:b("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:F.writable,menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,r){if(!t.hasModel())return;let n=[],o=t.getSelections(),s=t.getModel();for(let a of o)if(a.isEmpty())n.push(new f1(a,!0));else{let l=new Qe(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new kP(l,s.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},gS=class extends de{constructor(e,t){super(t),this.down=e}run(e,t){let r=e.get(Pt),n=[],o=t.getSelections()||[],s=t.getOption(11);for(let a of o)n.push(new pS(a,this.down,s,r));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},K8=class extends gS{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:b("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}},$8=class extends gS{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:b("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"2_line",title:b({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}},bS=class extends de{constructor(e,t){super(t),this.descending=e}run(e,t){let r=t.getSelections()||[];for(let o of r)if(!yh.canRun(t.getModel(),o,this.descending))return;let n=[];for(let o=0,s=r.length;o<s;o++)n[o]=new yh(r[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}},G8=class extends bS{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:b("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:F.writable})}},Y8=class extends bS{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:b("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:F.writable})}},X8=class extends de{constructor(){super({id:"editor.action.removeDuplicateLines",label:b("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:F.writable})}run(e,t){if(!t.hasModel())return;let r=t.getModel();if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let n=[],o=[],s=0;for(let a of t.getSelections()){let l=new Set,c=[];for(let f=a.startLineNumber;f<=a.endLineNumber;f++){let m=r.getLineContent(f);l.has(m)||(c.push(m),l.add(m))}let d=new Qe(a.startLineNumber,1,a.endLineNumber,r.getLineMaxColumn(a.endLineNumber)),u=a.startLineNumber-s,h=new Qe(u,1,u+c.length-1,c[c.length-1].length);n.push(ti.replace(d,c.join(` +`))),o.push(h),s+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}},vS=class i extends de{constructor(){super({id:i.ID,label:b("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:mi(2089,2102),weight:100}})}run(e,t,r){let n=[];r.reason==="auto-save"&&(n=(t.getSelections()||[]).map(a=>new Ie(a.positionLineNumber,a.positionColumn)));let o=t.getSelection();if(o===null)return;let s=new fS(o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}};vS.ID="editor.action.trimTrailingWhitespace";Q8=class extends de{constructor(){super({id:"editor.action.deleteLines",label:b("lines.delete","Delete Line"),alias:"Delete Line",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let r=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let o=0,s=[],a=[];for(let l=0,c=r.length;l<c;l++){let d=r[l],u=d.startLineNumber,h=d.endLineNumber,f=1,m=n.getLineMaxColumn(h);h<n.getLineCount()?(h+=1,m=1):u>1&&(u-=1,f=n.getLineMaxColumn(u)),s.push(ti.replace(new Qe(u,f,h,m),"")),a.push(new Qe(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.startLineNumber<o.endLineNumber&&o.endColumn===1&&(s-=1),{startLineNumber:o.startLineNumber,selectionStartColumn:o.selectionStartColumn,endLineNumber:s,positionColumn:o.positionColumn}});t.sort((o,s)=>o.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber);let r=[],n=t[0];for(let o=1;o<t.length;o++)n.endLineNumber+1>=t[o].startLineNumber?n.endLineNumber=t[o].endLineNumber:(r.push(n),n=t[o]);return r.push(n),r}},Z8=class extends de{constructor(){super({id:"editor.action.indentLines",label:b("lines.indent","Indent Line"),alias:"Indent Line",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2142,weight:100}})}run(e,t){let r=t._getViewModel();r&&(t.pushUndoStop(),t.executeCommands(this.id,i_.indent(r.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}},J8=class extends de{constructor(){super({id:"editor.action.outdentLines",label:b("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2140,weight:100}})}run(e,t){af.Outdent.runEditorCommand(e,t,null)}},e7=class extends de{constructor(){super({id:"editor.action.insertLineBefore",label:b("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:3075,weight:100}})}run(e,t){let r=t._getViewModel();r&&(t.pushUndoStop(),t.executeCommands(this.id,i_.lineInsertBefore(r.cursorConfig,t.getModel(),t.getSelections())))}},t7=class extends de{constructor(){super({id:"editor.action.insertLineAfter",label:b("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:2051,weight:100}})}run(e,t){let r=t._getViewModel();r&&(t.pushUndoStop(),t.executeCommands(this.id,i_.lineInsertAfter(r.cursorConfig,t.getModel(),t.getSelections())))}},_S=class extends de{run(e,t){if(!t.hasModel())return;let r=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let l=0,c=n.length-1;l<c;l++){let d=n[l],u=n[l+1];B.intersectRanges(d,u)===null?o.push(d):n[l+1]=B.plusRange(d,u)}o.push(n[n.length-1]);let s=this._getEndCursorState(r,o),a=o.map(l=>ti.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,s),t.pushUndoStop()}},i7=class extends _S{constructor(){super({id:"deleteAllLeft",label:b("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let r=null,n=[],o=0;return t.forEach(s=>{let a;if(s.endColumn===1&&o>0){let l=s.startLineNumber-o;a=new Qe(l,s.startColumn,l,s.startColumn)}else a=new Qe(s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn);o+=s.endLineNumber-s.startLineNumber,s.intersectRanges(e)?r=a:n.push(a)}),r&&n.unshift(r),n}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let r=t,n=e.getModel();return n===null?[]:(r.sort(B.compareRangesUsingStarts),r=r.map(o=>{if(o.isEmpty())if(o.startColumn===1){let s=Math.max(1,o.startLineNumber-1),a=o.startLineNumber===1?1:n.getLineContent(s).length+1;return new B(s,a,o.startLineNumber,1)}else return new B(o.startLineNumber,1,o.startLineNumber,o.startColumn);else return new B(o.startLineNumber,1,o.endLineNumber,o.endColumn)}),r)}},r7=class extends _S{constructor(){super({id:"deleteAllRight",label:b("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let r=null,n=[];for(let o=0,s=t.length,a=0;o<s;o++){let l=t[o],c=new Qe(l.startLineNumber-a,l.startColumn,l.startLineNumber-a,l.startColumn);l.intersectRanges(e)?r=c:n.push(c)}return r&&n.unshift(r),n}_getRangesToDelete(e){let t=e.getModel();if(t===null)return[];let r=e.getSelections();if(r===null)return[];let n=r.map(o=>{if(o.isEmpty()){let s=t.getLineMaxColumn(o.startLineNumber);return o.startColumn===s?new B(o.startLineNumber,o.startColumn,o.startLineNumber+1,1):new B(o.startLineNumber,o.startColumn,o.startLineNumber,s)}return o});return n.sort(B.compareRangesUsingStarts),n}},n7=class extends de{constructor(){super({id:"editor.action.joinLines",label:b("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:F.writable,kbOpts:{kbExpr:F.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let r=t.getSelections();if(r===null)return;let n=t.getSelection();if(n===null)return;r.sort(B.compareRangesUsingStarts);let o=[],s=r.reduce((h,f)=>h.isEmpty()?h.endLineNumber===f.startLineNumber?(n.equalsSelection(h)&&(n=f),f):f.startLineNumber>h.endLineNumber+1?(o.push(h),f):new Qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>h.endLineNumber?(o.push(h),f):new Qe(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn));o.push(s);let a=t.getModel();if(a===null)return;let l=[],c=[],d=n,u=0;for(let h=0,f=o.length;h<f;h++){let m=o[h],g=m.startLineNumber,w=1,_=0,E,A,L=a.getLineContent(m.endLineNumber).length-m.endColumn;if(m.isEmpty()||m.startLineNumber===m.endLineNumber){let Y=m.getStartPosition();Y.lineNumber<a.getLineCount()?(E=g+1,A=a.getLineMaxColumn(E)):(E=Y.lineNumber,A=a.getLineMaxColumn(Y.lineNumber))}else E=m.endLineNumber,A=a.getLineMaxColumn(E);let O=a.getLineContent(g);for(let Y=g+1;Y<=E;Y++){let oe=a.getLineContent(Y),te=a.getLineFirstNonWhitespaceColumn(Y);if(te>=1){let Z=!0;O===""&&(Z=!1),Z&&(O.charAt(O.length-1)===" "||O.charAt(O.length-1)===" ")&&(Z=!1,O=O.replace(/[\s\uFEFF\xA0]+$/g," "));let ve=oe.substr(te-1);O+=(Z?" ":"")+ve,Z?_=ve.length+1:_=ve.length}else _=0}let U=new B(g,w,E,A);if(!U.isEmpty()){let Y;m.isEmpty()?(l.push(ti.replace(U,O)),Y=new Qe(U.startLineNumber-u,O.length-_+1,g-u,O.length-_+1)):m.startLineNumber===m.endLineNumber?(l.push(ti.replace(U,O)),Y=new Qe(m.startLineNumber-u,m.startColumn,m.endLineNumber-u,m.endColumn)):(l.push(ti.replace(U,O)),Y=new Qe(m.startLineNumber-u,m.startColumn,m.startLineNumber-u,O.length-L)),B.intersectRanges(U,n)!==null?d=Y:c.push(Y)}u+=U.endLineNumber-U.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}},o7=class extends de{constructor(){super({id:"editor.action.transpose",label:b("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:F.writable})}run(e,t){let r=t.getSelections();if(r===null)return;let n=t.getModel();if(n===null)return;let o=[];for(let s=0,a=r.length;s<a;s++){let l=r[s];if(!l.isEmpty())continue;let c=l.getStartPosition(),d=n.getLineMaxColumn(c.lineNumber);if(c.column>=d){if(c.lineNumber===n.getLineCount())continue;let u=new B(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=n.getValueInRange(u).split("").reverse().join("");o.push(new cl(new Qe(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let u=new B(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=n.getValueInRange(u).split("").reverse().join("");o.push(new Gv(u,h,new Qe(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}},Hd=class extends de{run(e,t){let r=t.getSelections();if(r===null)return;let n=t.getModel();if(n===null)return;let o=t.getOption(128),s=[];for(let a of r)if(a.isEmpty()){let l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;let d=new B(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=n.getValueInRange(d);s.push(ti.replace(d,this._modifyText(u,o)))}else{let l=n.getValueInRange(a);s.push(ti.replace(a,this._modifyText(l,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}},s7=class extends Hd{constructor(){super({id:"editor.action.transformToUppercase",label:b("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:F.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}},a7=class extends Hd{constructor(){super({id:"editor.action.transformToLowercase",label:b("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:F.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}},hc=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}},p1=class i extends Hd{constructor(){super({id:"editor.action.transformToTitlecase",label:b("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:F.writable})}_modifyText(e,t){let r=i.titleBoundary.get();return r?e.toLocaleLowerCase().replace(r,n=>n.toLocaleUpperCase()):e}};p1.titleBoundary=new hc("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");wh=class i extends Hd{constructor(){super({id:"editor.action.transformToSnakecase",label:b("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:F.writable})}_modifyText(e,t){let r=i.caseBoundary.get(),n=i.singleLetters.get();return!r||!n?e:e.replace(r,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase()}};wh.caseBoundary=new hc("(\\p{Ll})(\\p{Lu})","gmu");wh.singleLetters=new hc("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");m1=class i extends Hd{constructor(){super({id:"editor.action.transformToCamelcase",label:b("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:F.writable})}_modifyText(e,t){let r=i.wordBoundary.get();if(!r)return e;let n=e.split(r);return n.shift()+n.map(s=>s.substring(0,1).toLocaleUpperCase()+s.substring(1)).join("")}};m1.wordBoundary=new hc("[_\\s-]","gm");xh=class i extends Hd{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:b("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:F.writable})}_modifyText(e,t){let r=i.caseBoundary.get(),n=i.singleLetters.get(),o=i.underscoreBoundary.get();return!r||!n||!o?e:e.replace(o,"$1-$3").replace(r,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase()}};xh.caseBoundary=new hc("(\\p{Ll})(\\p{Lu})","gmu");xh.singleLetters=new hc("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");xh.underscoreBoundary=new hc("(\\S)(_)(\\S)","gm");ee(W8);ee(V8);ee(q8);ee(K8);ee($8);ee(G8);ee(Y8);ee(X8);ee(vS);ee(Q8);ee(Z8);ee(J8);ee(e7);ee(t7);ee(i7);ee(r7);ee(n7);ee(o7);ee(s7);ee(a7);wh.caseBoundary.isSupported()&&wh.singleLetters.isSupported()&&ee(wh);m1.wordBoundary.isSupported()&&ee(m1);p1.titleBoundary.isSupported()&&ee(p1);xh.isSupported()&&ee(xh)});var pY=N(()=>{});var mY=N(()=>{pY()});function bY(i,e,t,r){let n=i.ordered(e);return l_(n.map(o=>()=>c7(this,void 0,void 0,function*(){try{return yield o.provideLinkedEditingRanges(e,t,r)}catch(s){Yt(s);return}})),o=>!!o&&qi(o==null?void 0:o.ranges))}var Zbe,yS,c7,wS,gY,Jbe,Ud,d7,e1e,eut,h7=N(()=>{pi();Ut();Si();aa();Vt();Jt();ke();Di();Tr();lt();Tn();ci();et();ei();Hr();Br();He();wt();Rt();en();Ls();ol();mY();Zbe=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},yS=function(i,e){return function(t,r){e(t,r,i)}},c7=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},gY=new ht("LinkedEditingInputVisible",!1),Jbe="linked-editing-decoration",Ud=wS=class extends ce{static get(e){return e.getContribution(wS.ID)}constructor(e,t,r,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new le),this._editor=e,this._providers=r.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=gY.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 le),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(68)||s.hasChanged(91))&&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(),r=t!==null&&(this._editor.getOption(68)||this._editor.getOption(91))&&this._providers.has(t);if(r===this._enabled&&!e||(this._enabled=r,this.clearRanges(),this._localToDispose.clear(),!r||t===null))return;this._localToDispose.add(li.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));let n=new Lo(this._debounceInformation.get(t)),o=()=>{var l;this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),(l=this._debounceDuration)!==null&&l!==void 0?l:this._debounceInformation.get(t))},s=new Lo(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:()=>{n.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;let t=this._editor.getModel(),r=this._currentDecorations.getRange(0);if(!r||r.startLineNumber!==r.endLineNumber)return this.clearRanges();let n=t.getValueInRange(r);if(this._currentWordPattern){let s=n.match(this._currentWordPattern);if((s?s[0].length:0)!==n.length)return this.clearRanges()}let o=[];for(let s=1,a=this._currentDecorations.length;s<a;s++){let l=this._currentDecorations.getRange(s);if(l)if(l.startLineNumber!==l.endLineNumber)o.push({range:l,text:n});else{let c=t.getValueInRange(l),d=n,u=l.startColumn,h=l.endColumn,f=Pc(c,d);u+=f,c=c.substr(f),d=d.substr(f);let m=mP(c,d);h-=m,c=c.substr(0,c.length-m),d=d.substr(0,d.length-m),(u!==h||d.length!==0)&&o.push({range:new B(l.startLineNumber,u,l.endLineNumber,h),text:d})}}if(o.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;let s=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(s)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return c7(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}let t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}let r=this._editor.getModel(),n=r.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){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=n;let o=Zt(s=>c7(this,void 0,void 0,function*(){try{let a=new pr(!1),l=yield bY(this._providers,r,t,s);if(this._debounceInformation.update(r,a.elapsed()),o!==this._currentRequest||(this._currentRequest=null,n!==r.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,f=c.length;h<f;h++)if(B.containsPosition(c[h],t)){if(d=!0,h!==0){let m=c[h];c.splice(h,1),c.unshift(m)}break}if(!d){this.clearRanges();return}let u=c.map(h=>({range:h,options:wS.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(u),this._syncRangesToken++}catch(a){$o(a)||ft(a),(this._currentRequest===o||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=o,o})}};Ud.ID="editor.contrib.linkedEditing";Ud.DECORATION=mt.register({description:"linked-editing",stickiness:0,className:Jbe});Ud=wS=Zbe([yS(1,it),yS(2,Se),yS(3,Pt),yS(4,ar)],Ud);d7=class extends de{constructor(){super({id:"editor.action.linkedEditing",label:b("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:fe.and(F.writable,F.hasRenameProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){let r=e.get(si),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return yt.isUri(n)&&Ie.isIPosition(o)?r.openCodeEditor({resource:n},r.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let r=Ud.get(t);return r?Promise.resolve(r.updateRanges(!0)):Promise.resolve()}},e1e=Oi.bindToContribution(Ud.get);We(new e1e({id:"cancelLinkedEditingInput",precondition:gY,handler:i=>i.clearRanges(),kbOpts:{kbExpr:F.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));eut=je("editor.linkedEditingBackground",{dark:vt.fromHex("#f00").transparent(.3),light:vt.fromHex("#f00").transparent(.3),hcDark:vt.fromHex("#f00").transparent(.3),hcLight:vt.white},b("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Kn("_executeLinkedEditingProvider",(i,e,t)=>{let{linkedEditingRangeProvider:r}=i.get(Se);return bY(r,e,t,st.None)});Ue(Ud.ID,Ud,1);ee(d7)});var vY=N(()=>{});var _Y=N(()=>{vY()});function p7(i,e,t){let r=[],n=i.ordered(e).reverse().map((o,s)=>Promise.resolve(o.provideLinks(e,t)).then(a=>{a&&(r[s]=[a,o])},Yt));return Promise.all(n).then(()=>{let o=new xS(un(r));return t.isCancellationRequested?(o.dispose(),new xS([])):o})}var yY,f7,xS,wY=N(()=>{pi();Si();Vt();ke();Fr();Tr();et();Go();Wi();Rt();yY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},f7=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 yY(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"))})}},xS=class i{constructor(e){this._disposables=new le;let t=[];for(let[r,n]of e){let o=r.links.map(s=>new f7(s,n));t=i._union(t,o),Rv(r)&&this._disposables.add(r)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let r=[],n,o,s,a;for(n=0,s=0,o=e.length,a=t.length;n<o&&s<a;){let l=e[n],c=t[s];if(B.areIntersectingOrTouching(l.range,c.range)){n++;continue}B.compareRangesUsingStarts(l.range,c.range)<0?(r.push(l),n++):(r.push(c),s++)}for(;n<o;n++)r.push(e[n]);for(;s<a;s++)r.push(t[s]);return r}};At.registerCommand("_executeLinkProvider",(i,...e)=>yY(void 0,void 0,void 0,function*(){let[t,r]=e;zt(t instanceof yt),typeof r!="number"&&(r=0);let{linkProvider:n}=i.get(Se),o=i.get(Li).getModel(t);if(!o)return[];let s=yield p7(n,o,st.None);if(!s)return[];for(let l=0;l<Math.min(r,s.links.length);l++)yield s.links[l].resolve(st.None);let a=s.links.slice(0);return s.dispose(),a}))});function r1e(i,e){let t=i.url&&/^command:/i.test(i.url.toString()),r=i.tooltip?i.tooltip:t?b("links.navigate.executeCmd","Execute command"):b("links.navigate.follow","Follow link"),n=e?kn?b("links.navigate.kb.meta.mac","cmd + click"):b("links.navigate.kb.meta","ctrl + click"):kn?b("links.navigate.kb.alt.mac","option + click"):b("links.navigate.kb.alt","alt + click");if(i.url){let o="";if(/^command:/i.test(i.url.toString())){let a=i.url.toString().match(/^command:([^?#]+)/);if(a){let l=a[1];o=b("tooltip.explanation","Execute command {0}",l)}}return new Ki("",!0).appendLink(i.url.toString(!0).replace(/ /g,"%20"),r,o).appendMarkdown(` (${n})`)}else return new Ki().appendText(`${r} (${n})`)}var t1e,CS,i1e,m7,qp,xY,SS,g7,b7=N(()=>{Ut();Si();Vt();Ss();ke();Im();En();Io();ol();Tr();_Y();lt();Hr();Ls();Rt();Jb();wY();He();Ao();es();t1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},CS=function(i,e){return function(t,r){e(t,r,i)}},i1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},qp=m7=class extends ce{static get(e){return e.getContribution(m7.ID)}constructor(e,t,r,n,o){super(),this.editor=e,this.openerService=t,this.notificationService=r,this.languageFeaturesService=n,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new di(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;let s=this._register(new Ya(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(69)&&(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 i1e(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(69))return;let e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Zt(t=>p7(this.providers,e,t));try{let t=new pr(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){ft(t)}finally{this.computePromise=null}}})}updateDecorations(e){let t=this.editor.getOption(76)==="altKey",r=[],n=Object.keys(this.currentOccurrences);for(let s of n){let a=this.currentOccurrences[s];r.push(a.decorationId)}let o=[];if(e)for(let s of e)o.push(SS.decoration(s,t));this.editor.changeDecorations(s=>{let a=s.deltaDecorations(r,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l<c;l++){let d=new SS(e[l],a[l]);this.currentOccurrences[d.decorationId]=d}})}_onEditorMouseMove(e,t){let r=this.editor.getOption(76)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();let n=this.getLinkOccurrence(e.target.position);n&&this.editor.changeDecorations(o=>{n.activate(o,r),this.activeLinkDecorationId=n.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){let e=this.editor.getOption(76)==="altKey";if(this.activeLinkDecorationId){let t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(r=>{t.deactivate(r,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,r=!1){if(!this.openerService)return;let{link:n}=e;n.resolve(st.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){let s=this.editor.getModel().uri;if(s.scheme===So.file&&o.startsWith(`${So.file}:`)){let a=yt.parse(o);if(a.scheme===So.file){let l=YP(a),c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(o=ZP(s,c))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:r,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{let s=o instanceof Error?o.message:o;s==="invalid"?this.notificationService.warn(b("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):s==="missing"?this.notificationService.warn(b("missing.url","Failed to open this link because its target is missing.")):ft(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 r of t){let n=this.currentOccurrences[r.id];if(n)return n}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()}};qp.ID="editor.linkDetector";qp=m7=t1e([CS(1,er),CS(2,Mi),CS(3,Se),CS(4,ar)],qp);xY={general:mt.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:mt.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},SS=class i{static decoration(e,t){return{range:e.range,options:i._getOptions(e,t,!1)}}static _getOptions(e,t,r){let n=Object.assign({},r?xY.active:xY.general);return n.hoverMessage=r1e(e,t),n}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))}};g7=class extends de{constructor(){super({id:"editor.action.openLink",label:b("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let r=qp.get(t);if(!r||!t.hasModel())return;let n=t.getSelections();for(let o of n){let s=r.getLinkOccurrence(o.getEndPosition());s&&r.openLinkOccurrence(s,!1)}}};Ue(qp.ID,qp,1);ee(g7)});var g1,v7=N(()=>{ke();lt();g1=class extends ce{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{let r=this._editor.getOption(115);r>=0&&t.target.type===6&&t.target.position.column>=r&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};g1.ID="editor.contrib.longLinesHelper";Ue(g1.ID,g1,2)});var CY=N(()=>{});var SY=N(()=>{CY()});function kY(i){return i===Gm.Write?a1e:i===Gm.Text?l1e:u1e}function EY(i){return i?d1e:c1e}var kS,ES,n1e,o1e,s1e,a1e,l1e,c1e,d1e,u1e,_7=N(()=>{SY();jc();Hr();hn();He();en();tn();kS=je("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},b("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);je("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},b("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);je("editor.wordHighlightTextBackground",{light:kS,dark:kS,hcDark:kS,hcLight:kS},b("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);ES=je("editor.wordHighlightBorder",{light:null,dark:null,hcDark:ca,hcLight:ca},b("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));je("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:ca,hcLight:ca},b("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));je("editor.wordHighlightTextBorder",{light:ES,dark:ES,hcDark:ES,hcLight:ES},b("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));n1e=je("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},b("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),o1e=je("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},b("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),s1e=je("editorOverviewRuler.wordHighlightTextForeground",{dark:pf,light:pf,hcDark:pf,hcLight:pf},b("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),a1e=mt.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:ki(o1e),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}}),l1e=mt.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:ki(s1e),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}}),c1e=mt.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:ki(pf),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}}),d1e=mt.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),u1e=mt.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:ki(n1e),position:$n.Center},minimap:{color:ki(qm),position:sa.Inline}});mf((i,e)=>{let t=i.getColor(wO);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)})});function Wd(i,e){let t=e.filter(r=>!i.find(n=>n.equals(r)));if(t.length>=1){let r=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),n=t.length===1?b("cursorAdded","Cursor added: {0}",r):b("cursorsAdded","Cursors added: {0}",r);cu(n)}}function IY(i,e,t){let r=TY(i,e[0],!t);for(let n=1,o=e.length;n<o;n++){let s=e[n];if(s.isEmpty())return!1;let a=TY(i,s,!t);if(r!==a)return!1}return!0}function TY(i,e,t){let r=i.getValueInRange(e);return t?r.toLowerCase():r}var h1e,f1e,y7,w7,x7,C7,S7,k7,Kp,TS,Ch,jd,E7,T7,I7,L7,A7,D7,M7,b1,N7,R7,P7=N(()=>{Eo();Ut();sl();ke();lt();TP();et();Ir();ei();b2();He();Zi();wt();Rt();_7();Ht();h1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},f1e=function(i,e){return function(t,r){e(t,r,i)}};w7=class extends de{constructor(){super({id:"editor.action.insertCursorAbove",label:b("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,r){if(!t.hasModel())return;let n=!0;r&&r.logicalLine===!1&&(n=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(r.source,3,Rm.addCursorUp(o,s,n)),o.revealTopMostCursor(r.source),Wd(s,o.getCursorStates())}},x7=class extends de{constructor(){super({id:"editor.action.insertCursorBelow",label:b("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,r){if(!t.hasModel())return;let n=!0;r&&r.logicalLine===!1&&(n=!1);let o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();let s=o.getCursorStates();o.setCursorStates(r.source,3,Rm.addCursorDown(o,s,n)),o.revealBottomMostCursor(r.source),Wd(s,o.getCursorStates())}},C7=class extends de{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:b("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,r){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let o=t.getLineMaxColumn(n);r.push(new Qe(n,o,n,o))}e.endColumn>1&&r.push(new Qe(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;let r=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),a=[];n.forEach(l=>this.getCursorsForSelection(l,r,a)),a.length>0&&t.setSelections(a),Wd(s,o.getCursorStates())}},S7=class extends de{constructor(){super({id:"editor.action.addCursorsToBottom",label:b("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;let r=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let l=r[0].startLineNumber;l<=n;l++)o.push(new Qe(l,r[0].startColumn,l,r[0].endColumn));let s=t._getViewModel(),a=s.getCursorStates();o.length>0&&t.setSelections(o),Wd(a,s.getCursorStates())}},k7=class extends de{constructor(){super({id:"editor.action.addCursorsToTop",label:b("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;let r=t.getSelections(),n=[];for(let a=r[0].startLineNumber;a>=1;a--)n.push(new Qe(a,r[0].startColumn,a,r[0].endColumn));let o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),Wd(s,o.getCursorStates())}},Kp=class{constructor(e,t,r){this.selections=e,this.revealRange=t,this.revealScrollType=r}},TS=class i{static create(e,t){if(!e.hasModel())return null;let r=t.getState();if(!e.hasTextFocus()&&r.isRevealed&&r.searchString.length>0)return new i(e,t,!1,r.searchString,r.wholeWord,r.matchCase,null);let n=!1,o,s,a=e.getSelections();a.length===1&&a[0].isEmpty()?(n=!0,o=!0,s=!0):(o=r.wholeWord,s=r.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 Qe(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` +`);return new i(e,t,n,c,o,s,d)}constructor(e,t,r,n,o,s,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=r,this.searchText=n,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 Kp(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 Kp(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],r=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return r?new Qe(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.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 Kp(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 Kp(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){let n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();let e=this._editor.getSelections(),t=e[e.length-1],r=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1);return r?new Qe(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.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(128):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(128):null,!1,1073741824)}},Ch=class i extends ce{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._sessionDispose=this._register(new le),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){let t=TS.create(this._editor,e);if(!t)return;this._session=t;let r={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(r.wholeWordOverride=1,r.matchCaseOverride=1,r.isRegexOverride=2),e.getState().change(r,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.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 r=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return r?new Qe(t.startLineNumber,r.startColumn,t.startLineNumber,r.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 n=e.getState().matchCase;if(!IY(this._editor.getModel(),t,n)){let s=this._editor.getModel(),a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(s,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null,r=e.getState();if(r.isRevealed&&r.searchString.length>0&&r.isRegex){let n=this._editor.getModel();r.searchScope?t=n.findMatches(r.searchString,r.searchScope,r.isRegex,r.matchCase,r.wholeWord?this._editor.getOption(128):null,!1,1073741824):t=n.findMatches(r.searchString,!0,r.isRegex,r.matchCase,r.wholeWord?this._editor.getOption(128):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(r.searchScope)}if(t.length>0){let n=this._editor.getSelection();for(let o=0,s=t.length;o<s;o++){let a=t[o];if(a.range.intersectRanges(n)){t[o]=t[0],t[0]=a;break}}this._setSelections(t.map(o=>new Qe(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}};Ch.ID="editor.contrib.multiCursorController";jd=class extends de{run(e,t){let r=Ch.get(t);if(!r)return;let n=t._getViewModel();if(n){let o=n.getCursorStates(),s=an.get(t);if(s)this._run(r,s);else{let a=e.get(Ke).createInstance(an,t);this._run(r,a),a.dispose()}Wd(o,n.getCursorStates())}}},E7=class extends jd{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:b("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2082,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}},T7=class extends jd{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:b("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}},I7=class extends jd{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:b("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:mi(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}},L7=class extends jd{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:b("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)}},A7=class extends jd{constructor(){super({id:"editor.action.selectHighlights",label:b("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:3114,weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"3_multi",title:b({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}},D7=class extends jd{constructor(){super({id:"editor.action.changeAll",label:b("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:fe.and(F.writable,F.editorTextFocus),kbOpts:{kbExpr:F.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}},M7=class{constructor(e,t,r,n,o){this._model=e,this._searchText=t,this._matchCase=r,this._wordSeparators=n,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(B.compareRangesUsingStarts)),this._cachedFindMatches}},b1=y7=class extends ce{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(106),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new di(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(n=>{this._isEnabled=e.getOption(106)})),this._register(e.onDidChangeCursorSelection(n=>{this._isEnabled&&(n.selection.isEmpty()?n.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(n=>{this._setState(null)})),this._register(e.onDidChangeModelContent(n=>{this._isEnabled&&this.updateSoon.schedule()}));let r=an.get(e);r&&this._register(r.getState().onFindReplaceStateChange(n=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(y7._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,r){if(!t||!r.hasModel())return null;let n=r.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;let o=Ch.get(r);if(!o)return null;let s=an.get(r);if(!s)return null;let a=o.getSession(s);if(!a){let d=r.getSelections();if(d.length>1){let h=s.getState().matchCase;if(!IY(r.getModel(),d,h))return null}a=TS.create(r,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 M7(r.getModel(),a.searchText,a.matchCase,a.wholeWord?r.getOption(128):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 r=this.state.findMatches(),n=this.editor.getSelections();n.sort(B.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=r.length,u=n.length;l<d;){let h=r[l];if(c>=u)o.push(h),l++;else{let f=B.compareRangesUsingStarts(h,n[c]);f<0?((n[c].isEmpty()||!B.areIntersecting(h,n[c]))&&o.push(h),l++):(f>0||l++,c++)}}let s=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(79),a=o.map(l=>({range:l,options:EY(s)}));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};b1.ID="editor.contrib.selectionHighlighter";b1=y7=h1e([f1e(1,Se)],b1);N7=class extends de{constructor(){super({id:"editor.action.focusNextCursor",label:b("mutlicursor.focusNextCursor","Focus Next Cursor"),description:{description:b("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,r){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let o=Array.from(n.getCursorStates()),s=o.shift();s&&(o.push(s),n.setCursorStates(r.source,3,o),n.revealPrimaryCursor(r.source,!0),Wd(o,n.getCursorStates()))}},R7=class extends de{constructor(){super({id:"editor.action.focusPreviousCursor",label:b("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),description:{description:b("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,r){if(!t.hasModel())return;let n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();let o=Array.from(n.getCursorStates()),s=o.pop();s&&(o.unshift(s),n.setCursorStates(r.source,3,o),n.revealPrimaryCursor(r.source,!0),Wd(o,n.getCursorStates()))}};Ue(Ch.ID,Ch,4);Ue(b1.ID,b1,1);ee(w7);ee(x7);ee(C7);ee(E7);ee(T7);ee(I7);ee(L7);ee(A7);ee(D7);ee(S7);ee(k7);ee(N7);ee(R7)});function O7(i,e,t,r,n){return LY(this,void 0,void 0,function*(){let o=i.ordered(e);for(let s of o)try{let a=yield s.provideSignatureHelp(e,t,n,r);if(a)return a}catch(a){Yt(a)}})}var LY,fc,IS=N(()=>{Si();Vt();Fr();Tr();ci();hn();Rt();ta();Wi();wt();LY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},fc={Visible:new ht("parameterHintsVisible",!1),MultipleSignatures:new ht("parameterHintsMultipleSignatures",!1)};At.registerCommand("_executeSignatureHelpProvider",(i,...e)=>LY(void 0,void 0,void 0,function*(){let[t,r,n]=e;zt(yt.isUri(t)),zt(Ie.isIPosition(r)),zt(typeof n=="string"||!n);let o=i.get(Se),s=yield i.get(xr).createModelReference(t);try{let a=yield O7(o.signatureHelpProvider,s.object.textEditorModel,Ie.lift(r),{triggerKind:Es.Invoke,isRetrigger:!1,triggerCharacter:n},st.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{s.dispose()}}))});function m1e(i,e){switch(e.triggerKind){case Es.Invoke:return e;case Es.ContentChange:return i;case Es.TriggerCharacter:default:return e}}var p1e,Vd,v1,AY=N(()=>{Ut();Vt();Jt();ke();q3();hn();IS();p1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};(function(i){i.Default={type:0};class e{constructor(n,o){this.request=n,this.previouslyActiveHints=o,this.type=2}}i.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}i.Active=t})(Vd||(Vd={}));v1=class i extends ce{constructor(e,t,r=i.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Je),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Vd.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new ji),this.triggerChars=new uu,this.retriggerChars=new uu,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Lo(r),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(n=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(n=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(n=>this.onCursorChange(n))),this._register(this.editor.onDidChangeModelContent(n=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(n=>this.onDidType(n))),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=Vd.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){let r=this.editor.getModel();if(!r||!this.providers.has(r))return;let n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(ft)}next(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,r=t%e===e-1,n=this.editor.getOption(84).cycle;if((e<2||r)&&!n){this.cancel();return}this.updateActiveSignature(r&&n?0:t+1)}previous(){if(this.state.type!==1)return;let e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,r=t===0,n=this.editor.getOption(84).cycle;if((e<2||r)&&!n){this.cancel();return}this.updateActiveSignature(r&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new Vd.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return p1e(this,void 0,void 0,function*(){let t=this.state.type===1||this.state.type===2,r=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;let n=this._pendingTriggers.reduce(m1e);this._pendingTriggers=[];let o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:r};if(!this.editor.hasModel())return!1;let s=this.editor.getModel(),a=this.editor.getPosition();this.state=new Vd.Pending(Zt(l=>O7(this.providers,s,a,o,l)),r);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 Vd.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=Vd.Default),ft(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 r of t.signatureHelpTriggerCharacters||[])if(r.length){let n=r.charCodeAt(0);this.triggerChars.add(n),this.retriggerChars.add(n)}for(let r of t.signatureHelpRetriggerCharacters||[])r.length&&this.retriggerChars.add(r.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;let t=e.length-1,r=e.charCodeAt(t);(this.triggerChars.has(r)||this.isTriggered&&this.retriggerChars.has(r))&&this.trigger({triggerKind:Es.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:Es.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:Es.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(84).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};v1.DEFAULT_DELAY=120});var DY=N(()=>{});var MY=N(()=>{DY()});var g1e,F7,z7,vo,b1e,v1e,_1,NY=N(()=>{Bt();Eo();A_();Qr();Jt();ke();Di();Fr();MY();Zo();xd();IS();He();wt();es();en();xl();In();g1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},F7=function(i,e){return function(t,r){e(t,r,i)}},vo=Le,b1e=Ni("parameter-hints-next",pt.chevronDown,b("parameterHintsNextIcon","Icon for show next parameter hint.")),v1e=Ni("parameter-hints-previous",pt.chevronUp,b("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),_1=z7=class extends ce{constructor(e,t,r,n,o){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new le),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new eo({editor:e},o,n)),this.keyVisible=fc.Visible.bindTo(r),this.keyMultipleSignatures=fc.MultipleSignatures.bindTo(r)}createParameterHintDOMNodes(){let e=vo(".editor-widget.parameter-hints-widget"),t=Te(e,vo(".phwrapper"));t.tabIndex=-1;let r=Te(t,vo(".controls")),n=Te(r,vo(".button"+_t.asCSSSelector(v1e))),o=Te(r,vo(".overloads")),s=Te(r,vo(".button"+_t.asCSSSelector(b1e)));this._register(Lt(n,"click",h=>{au.stop(h),this.previous()})),this._register(Lt(s,"click",h=>{au.stop(h),this.next()}));let a=vo(".body"),l=new wf(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());let c=Te(a,vo(".signature")),d=Te(a,vo(".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(49);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(49)).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 r=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",r),this.keyMultipleSignatures.set(r),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";let n=e.signatures[e.activeSignature];if(!n)return;let o=Te(this.domNodes.signature,vo(".code")),s=this.editor.getOption(49);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;let a=n.parameters.length>0,l=(t=n.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(o,n,l);else{let u=Te(o,vo("span"));u.textContent=n.label}let c=n.parameters[l];if(c!=null&&c.documentation){let u=vo("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{let h=this.renderMarkdownDocs(c.documentation);u.appendChild(h.element)}Te(this.domNodes.docs,vo("p",{},u))}if(n.documentation!==void 0)if(typeof n.documentation=="string")Te(this.domNodes.docs,vo("p",{},n.documentation));else{let u=this.renderMarkdownDocs(n.documentation);Te(this.domNodes.docs,u.element)}let d=this.hasDocs(n,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=n.parameters[l];Array.isArray(h.label)?u=n.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),n.documentation&&(u+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==u&&(sr(b("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 r;(r=this.domNodes)===null||r===void 0||r.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Ac(t.documentation).length>0||t&&typeof t.documentation=="object"&&Ac(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Ac(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Ac(e.documentation.value).length>0)}renderParameters(e,t,r){let[n,o]=this.getParameterLabelOffsets(t,r),s=document.createElement("span");s.textContent=t.label.substring(0,n);let a=document.createElement("span");a.textContent=t.label.substring(n,o),a.className="parameter active";let l=document.createElement("span");l.textContent=t.label.substring(o),Te(e,s,a,l)}getParameterLabelOffsets(e,t){let r=e.parameters[t];if(r){if(Array.isArray(r.label))return r.label;if(r.label.length){let n=new RegExp(`(\\W|^)${al(r.label)}(?=\\W|$)`,"g");n.test(e.label);let o=n.lastIndex-r.label.length;return o>=0?[o,n.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 z7.ID}updateMaxHeight(){if(!this.domNodes)return;let t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;let r=this.domNodes.element.getElementsByClassName("phwrapper");r.length&&(r[0].style.maxHeight=t)}};_1.ID="editor.widget.parameterHintsWidget";_1=z7=g1e([F7(2,it),F7(3,er),F7(4,Ji)],_1);je("editorHoverWidget.highlightForeground",{dark:ua,light:ua,hcDark:ua,hcLight:ua},b("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."))});var _1e,RY,B7,Sh,H7,U7,j7,W7=N(()=>{O3();ke();lt();ei();hn();Rt();AY();IS();He();wt();Ht();NY();_1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},RY=function(i,e){return function(t,r){e(t,r,i)}},Sh=B7=class extends ce{static get(e){return e.getContribution(B7.ID)}constructor(e,t,r){super(),this.editor=e,this.model=this._register(new v1(e,r.signatureHelpProvider)),this._register(this.model.onChangedHints(n=>{var o;n?(this.widget.value.show(),this.widget.value.render(n)):(o=this.widget.rawValue)===null||o===void 0||o.hide()})),this.widget=new ef(()=>this._register(t.createInstance(_1,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)}};Sh.ID="editor.controller.parameterHints";Sh=B7=_1e([RY(1,Ke),RY(2,Se)],Sh);H7=class extends de{constructor(){super({id:"editor.action.triggerParameterHints",label:b("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:F.hasSignatureHelpProvider,kbOpts:{kbExpr:F.editorTextFocus,primary:3082,weight:100}})}run(e,t){let r=Sh.get(t);r==null||r.trigger({triggerKind:Es.Invoke})}};Ue(Sh.ID,Sh,2);ee(H7);U7=100+75,j7=Oi.bindToContribution(Sh.get);We(new j7({id:"closeParameterHints",precondition:fc.Visible,handler:i=>i.cancel(),kbOpts:{weight:U7,kbExpr:F.focus,primary:9,secondary:[1033]}}));We(new j7({id:"showPrevParameterHint",precondition:fe.and(fc.Visible,fc.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:U7,kbExpr:F.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));We(new j7({id:"showNextParameterHint",precondition:fe.and(fc.Visible,fc.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:U7,kbExpr:F.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))});var PY=N(()=>{});var OY=N(()=>{PY()});var y1e,V7,y1,LS,FY=N(()=>{ke();OY();ci();He();wt();Ur();en();tn();y1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},V7=function(i,e){return function(t,r){e(t,r,i)}},y1=new ht("renameInputVisible",!1,b("renameInputVisible","Whether the rename input widget is visible")),LS=class{constructor(e,t,r,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=r,this._keybindingService=n,this._disposables=new le,this.allowEditorOverflow=!0,this._visibleContextKey=y1.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(49)&&this._updateFont()})),this._disposables.add(r.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",b("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,r,n,o;if(!this._input||!this._domNode)return;let s=e.getColor(u_),a=e.getColor(h_);this._domNode.style.backgroundColor=String((t=e.getColor(ml))!==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((r=e.getColor(hO))!==null&&r!==void 0?r:""),this._input.style.backgroundColor=String((n=e.getColor(uO))!==null&&n!==void 0?n:"");let l=e.getColor(fO);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(49);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[r,n]=this._acceptKeybindings;return this._label.innerText=b({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(r))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(n))===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,r,n,o,s){this._domNode.classList.toggle("preview",o),this._position=new Ie(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",r.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);let a=new le;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)}};LS=y1e([V7(2,gr),V7(3,qt),V7(4,it)],LS)});function x1e(i,e,t,r){return Eh(this,void 0,void 0,function*(){let n=new w1(e,t,i),o=yield n.resolveRenameLocation(st.None);return o!=null&&o.rejectReason?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(r,st.None)})}var w1e,kh,Eh,q7,w1,Th,K7,$7,G7=N(()=>{Eo();Ut();Si();Vt();ke();Fr();Tr();vu();lt();Zm();Tn();ci();et();ei();nne();L0();He();Y3();wt();Ht();Kv();Ao();Vc();ll();FY();Rt();w1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},kh=function(i,e){return function(t,r){e(t,r,i)}},Eh=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},w1=class{constructor(e,t,r){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=r.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Eh(this,void 0,void 0,function*(){let t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){let n=this._providers[this._providerRenameIdx];if(!n.resolveRenameLocation)break;let o=yield n.resolveRenameLocation(this.model,this.position,e);if(o){if(o.rejectReason){t.push(o.rejectReason);continue}return o}}let r=this.model.getWordAtPosition(this.position);return r?{range:new B(this.position.lineNumber,r.startColumn,this.position.lineNumber,r.endColumn),text:r.word,rejectReason:t.length>0?t.join(` `):void 0}:{range:B.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` `):void 0}})}provideRenameEdits(e,t){return Eh(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,r,n){return Eh(this,void 0,void 0,function*(){let o=this._providers[t];if(!o)return{edits:[],rejectReason:r.join(` -`)};let s=yield o.provideRenameEdits(this.model,this.position,e,n);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,r.concat(s.rejectReason),n)}else return this._provideRenameEdits(e,t+1,r.concat(b("no result","No result.")),n);return s})}};Th=V7=class{static get(e){return e.getContribution(V7.ID)}constructor(e,t,r,n,o,s,a,l){this.editor=e,this._instaService=t,this._notificationService=r,this._bulkEditService=n,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new le,this._cts=new Fi,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(LS,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Eh(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new Fi,!this.editor.hasModel())return;let r=this.editor.getPosition(),n=new w1(this.editor.getModel(),r,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;let o=new pa(this.editor,5,void 0,this._cts.token),s;try{let m=n.resolveRenameLocation(o.token);this._progressService.showWhile(m,250),s=yield m}catch(m){(e=Vr.get(this.editor))===null||e===void 0||e.showMessage(m||b("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),r);return}finally{o.dispose()}if(!s)return;if(s.rejectReason){(t=Vr.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,r);return}if(o.token.isCancellationRequested)return;let a=new pa(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!B.isEmpty(l)&&!B.spansMultipleLines(l)&&B.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 f=Uc(n.provideRenameEdits(h.newName,a.token),a.token).then(m=>Eh(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(B.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:b("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,h.newName),code:"undoredo.rename",quotableLabel:b("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&sr(b("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(b("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(b("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{a.dispose()});return this._progressService.showWhile(f,250),f})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};Th.ID="editor.contrib.renameController";Th=V7=w1e([kh(1,Ke),kh(2,Mi),kh(3,Wc),kh(4,gl),kh(5,Fc),kh(6,dz),kh(7,Se)],Th);q7=class extends de{constructor(){super({id:"editor.action.rename",label:b("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:fe.and(F.writable,F.hasRenameProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let r=e.get(si),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return yt.isUri(n)&&Ie.isIPosition(o)?r.openCodeEditor({resource:n},r.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let r=Th.get(t);return r?r.run():Promise.resolve()}};Ue(Th.ID,Th,4);ee(q7);K7=Oi.bindToContribution(Th.get);We(new K7({id:"acceptRenameInput",precondition:y1,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:3}}));We(new K7({id:"acceptRenameInputWithPreview",precondition:fe.and(y1,fe.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:1024+3}}));We(new K7({id:"cancelRenameInput",precondition:y1,handler:i=>i.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:F.focus,primary:9,secondary:[1033]}}));Kn("_executeDocumentRenameProvider",function(i,e,t,...r){let[n]=r;zt(typeof n=="string");let{renameProvider:o}=i.get(Se);return x1e(o,e,t,n)});Kn("_executePrepareRename",function(i,e,t){return Eh(this,void 0,void 0,function*(){let{renameProvider:r}=i.get(Se),o=yield new w1(e,t,r).resolveRenameLocation(st.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})});Zr.as(of.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:b("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function C1e(i){for(let e=0,t=i.length;e<t;e+=4){let r=i[e+0],n=i[e+1],o=i[e+2],s=i[e+3];i[e+0]=s,i[e+1]=o,i[e+2]=n,i[e+3]=r}}function S1e(i){let e=new Uint8Array(i.buffer,i.byteOffset,i.length*4);return Y9()||C1e(e),PP.wrap(e)}function G7(i){let e=new Uint32Array(k1e(i)),t=0;if(e[t++]=i.id,i.type==="full")e[t++]=1,e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length;else{e[t++]=2,e[t++]=i.deltas.length;for(let r of i.deltas)e[t++]=r.start,e[t++]=r.deleteCount,r.data?(e[t++]=r.data.length,e.set(r.data,t),t+=r.data.length):e[t++]=0}return S1e(e)}function k1e(i){let e=0;if(e+=1+1,i.type==="full")e+=1+i.data.length;else{e+=1,e+=(1+1+1)*i.deltas.length;for(let t of i.deltas)t.data&&(e+=t.data.length)}return e}var FY=N(()=>{hre();En()});function x1(i){return i&&!!i.data}function Q7(i){return i&&Array.isArray(i.edits)}function Z7(i,e){return i.has(e)}function E1e(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function J7(i,e,t,r,n){return qd(this,void 0,void 0,function*(){let o=E1e(i,e),s=yield Promise.all(o.map(a=>qd(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?r:null,n)}catch(d){c=d,l=null}return(!l||!x1(l)&&!Q7(l))&&(l=null),new Y7(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 T1e(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function zY(i,e){return i.has(e)}function BY(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function AS(i,e,t,r){return qd(this,void 0,void 0,function*(){let n=BY(i,e),o=yield Promise.all(n.map(s=>qd(this,void 0,void 0,function*(){let a;try{a=yield s.provideDocumentRangeSemanticTokens(e,t,r)}catch(l){Yt(l),a=null}return(!a||!x1(a))&&(a=null),new X7(s,a)})));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null})}var qd,Y7,X7,eD=N(()=>{Si();Vt();Tr();Go();Wi();Fr();FY();et();Rt();qd=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Y7=class{constructor(e,t,r){this.provider=e,this.tokens=t,this.error=r}};X7=class{constructor(e,t){this.provider=e,this.tokens=t}};At.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t]=e;zt(t instanceof yt);let r=i.get(Li).getModel(t);if(!r)return;let{documentSemanticTokensProvider:n}=i.get(Se),o=T1e(n,r);return o?o[0].getLegend():i.get(vi).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));At.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t]=e;zt(t instanceof yt);let r=i.get(Li).getModel(t);if(!r)return;let{documentSemanticTokensProvider:n}=i.get(Se);if(!Z7(n,r))return i.get(vi).executeCommand("_provideDocumentRangeSemanticTokens",t,r.getFullModelRange());let o=yield J7(n,r,null,null,st.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!x1(a))return;let l=G7({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));At.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t,r]=e;zt(t instanceof yt);let n=i.get(Li).getModel(t);if(!n)return;let{documentRangeSemanticTokensProvider:o}=i.get(Se),s=BY(o,n);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!r||!B.isIRange(r))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=yield AS(o,n,B.lift(r),st.None);if(a)return a.provider.getLegend()}));At.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t,r]=e;zt(t instanceof yt),zt(B.isIRange(r));let n=i.get(Li).getModel(t);if(!n)return;let{documentRangeSemanticTokensProvider:o}=i.get(Se),s=yield AS(o,n,B.lift(r),st.None);if(!(!s||!s.tokens))return G7({id:0,type:"full",data:s.tokens.data})}))});function S1(i,e,t){var r;let n=(r=t.getValue(C1,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||r===void 0?void 0:r.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var C1,tD=N(()=>{C1="editor.semanticHighlighting"});var HY,Qa,Kd,iD,k1,rD,nD=N(()=>{ke();Vt();Go();Cr();Ut();Si();tn();uz();eD();Ls();ol();Rt();hz();B_();tD();HY=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Qa=function(i,e){return function(t,r){e(t,r,i)}},iD=class extends ce{constructor(e,t,r,n,o,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new k1(d,e,r,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()];S1(d,r,n)?u||a(d):u&&l(d,u)}};this._register(t.onModelAdded(d=>{S1(d,r,n)&&a(d)})),this._register(t.onModelRemoved(d=>{let u=this._watchers[d.uri.toString()];u&&l(d,u)})),this._register(n.onDidChangeConfiguration(d=>{d.affectsConfiguration(C1)&&c()})),this._register(r.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};iD=HY([Qa(0,ag),Qa(1,Li),Qa(2,gr),Qa(3,Dt),Qa(4,ar),Qa(5,Se)],iD);k1=Kd=class extends ce{constructor(e,t,r,n,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:Kd.REQUEST_MIN_DELAY,max:Kd.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new di(()=>this._fetchDocumentSemanticTokensNow(),Kd.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=()=>{Ui(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(r.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),Ui(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!Z7(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Fi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,r=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=J7(this._provider,this._model,t,r,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new pr(!1);n.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&&($o(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||ft(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,r,n,o){o=Math.min(o,r.length-n,e.length-t);for(let s=0;s<o;s++)r[n+s]=e[t+s]}_setDocumentSemanticTokens(e,t,r,n){let o=this._currentDocumentResponse,s=()=>{(n.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||!r){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(Q7(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 f=t.edits[h];if(f.start>l.length){r.warnInvalidEditStart(o.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let m=d-(f.start+f.deleteCount);m>0&&(Kd._copy(l,d-m,c,u-m,m),u-=m),f.data&&(Kd._copy(f.data,0,c,u-f.data.length,f.data.length),u-=f.data.length),d=f.start}d>0&&Kd._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(x1(t)){this._currentDocumentResponse=new rD(e,t.resultId,t.data);let a=ty(t,r,this._model.getLanguageId());if(n.length>0)for(let l of n)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()}};k1.REQUEST_MIN_DELAY=300;k1.REQUEST_MAX_DELAY=2e3;k1=Kd=HY([Qa(1,ag),Qa(2,gr),Qa(3,ar),Qa(4,Se)],k1);rD=class{constructor(e,t,r){this.provider=e,this.resultId=t,this.data=r}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};Kc(iD)});var I1e,E1,T1,oD=N(()=>{Ut();ke();lt();eD();tD();uz();Cr();tn();Ls();ol();Rt();hz();I1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},E1=function(i,e){return function(t,r){e(t,r,i)}},T1=class extends ce{constructor(e,t,r,n,o,s){super(),this._semanticTokensStylingService=t,this._themeService=r,this._configurationService=n,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new di(()=>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(C1)&&(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,r=this._outstandingRequests.length;t<r;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;let e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!S1(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!zY(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}let t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(r=>this._requestRange(e,r)))}_requestRange(e,t){let r=e.getVersionId(),n=Zt(s=>Promise.resolve(AS(this._provider,e,t,s))),o=new pr(!1);return n.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==r)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,ty(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};T1.ID="editor.contrib.viewportSemanticTokens";T1=I1e([E1(1,ag),E1(2,gr),E1(3,Dt),E1(4,ar),E1(5,Se)],T1);Ue(T1.ID,T1,1)});var DS,UY=N(()=>{Di();et();DS=class{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let r=[];for(let n of t){let o=[];r.push(o),this.selectSubwords&&this._addInWordRanges(o,e,n),this._addWordRanges(o,e,n),this._addWhitespaceLine(o,e,n),o.push({range:e.getFullModelRange()})}return r}_addInWordRanges(e,t,r){let n=t.getWordAtPosition(r);if(!n)return;let{word:o,startColumn:s}=n,a=r.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(F3(u)&&z3(d))break;d=u}for(l+=1;c<o.length;c++){let u=o.charCodeAt(c);if(z3(u)&&F3(d))break;if(u===95||u===45)break;d=u}l<c&&e.push({range:new B(r.lineNumber,s+l,r.lineNumber,s+c)})}_addWordRanges(e,t,r){let n=t.getWordAtPosition(r);n&&e.push({range:new B(r.lineNumber,n.startColumn,r.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,r){t.getLineLength(r.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(r.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(r.lineNumber)===0&&e.push({range:new B(r.lineNumber,1,r.lineNumber,t.getLineMaxColumn(r.lineNumber))})}}});function jY(i,e,t,r,n){return NS(this,void 0,void 0,function*(){let o=i.all(e).concat(new DS(r.selectSubwords));o.length===1&&o.unshift(new Ad);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(c=>{if(qi(c)&&c.length===t.length)for(let d=0;d<t.length;d++){a[d]||(a[d]=[]);for(let u of c[d])B.isIRange(u.range)&&B.containsPosition(u.range,t[d])&&a[d].push(B.lift(u.range))}},Yt));return yield Promise.all(s),a.map(l=>{if(l.length===0)return[];l.sort((h,f)=>Ie.isBefore(h.getStartPosition(),f.getStartPosition())?1:Ie.isBefore(f.getStartPosition(),h.getStartPosition())||Ie.isBefore(h.getEndPosition(),f.getEndPosition())?-1:Ie.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);let c=[],d;for(let h of l)(!d||B.containsRange(h,d)&&!B.equalsRange(h,d))&&(c.push(h),d=h);if(!r.selectLeadingAndTrailingWhitespace)return c;let u=[c[0]];for(let h=1;h<c.length;h++){let f=c[h-1],m=c[h];if(m.startLineNumber!==f.startLineNumber||m.endLineNumber!==f.endLineNumber){let g=new B(f.startLineNumber,e.getLineFirstNonWhitespaceColumn(f.startLineNumber),f.endLineNumber,e.getLineLastNonWhitespaceColumn(f.endLineNumber));g.containsRange(f)&&!g.equalsRange(f)&&m.containsRange(g)&&!m.equalsRange(g)&&u.push(g);let w=new B(f.startLineNumber,1,f.endLineNumber,e.getLineMaxColumn(f.endLineNumber));w.containsRange(f)&&!w.equalsRange(g)&&m.containsRange(w)&&!m.equalsRange(w)&&u.push(w)}u.push(m)}return u})})}var L1e,A1e,NS,sD,aD,$p,MS,lD,cD,dD=N(()=>{pi();Si();Vt();lt();ci();et();Ir();ei();rA();UY();He();Zi();Wi();Rt();ta();Fr();Tr();L1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},A1e=function(i,e){return function(t,r){e(t,r,i)}},NS=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},aD=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 r=new i(t,this.ranges);return r.ranges[t].equalsRange(this.ranges[this.index])?r.mov(e):r}},$p=sD=class{static get(e){return e.getContribution(sD.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 NS(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),r=this._editor.getModel();if(this._state||(yield jY(this._languageFeaturesService.selectionRangeProvider,r,t.map(o=>o.getPosition()),this._editor.getOption(111),st.None).then(o=>{var s;if(!(!qi(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Cs(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new aD(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 n=this._state.map(o=>Qe.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}};$p.ID="editor.contrib.smartSelectController";$p=sD=L1e([A1e(1,Se)],$p);MS=class extends de{constructor(e,t){super(t),this._forward=e}run(e,t){return NS(this,void 0,void 0,function*(){let r=$p.get(t);r&&(yield r.run(this._forward))})}},lD=class extends MS{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:b("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"1_basic",title:b({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};At.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");cD=class extends MS{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:b("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"1_basic",title:b({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Ue($p.ID,$p,4);ee(lD);ee(cD);At.registerCommand("_executeSelectionRangeProvider",function(i,...e){return NS(this,void 0,void 0,function*(){let[t,r]=e;zt(yt.isUri(t));let n=i.get(Se).selectionRangeProvider,o=yield i.get(xr).createModelReference(t);try{return jY(n,o.object.textEditorModel,r,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},st.None)}finally{o.dispose()}})})});var WY,VY=N(()=>{He();WY=Object.freeze({View:{value:b("view","View"),original:"View"},Help:{value:b("help","Help"),original:"Help"},Test:{value:b("test","Test"),original:"Test"},File:{value:b("file","File"),original:"File"},Preferences:{value:b("preferences","Preferences"),original:"Preferences"},Developer:{value:b({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}})});var qY=N(()=>{});var KY=N(()=>{qY()});var D1e,I1,$Y,GY,RS,uD,hD,YY=N(()=>{Bt();ak();ke();In();KY();Zre();Tp();ci();OP();qF();KF();cb();iL();ZI();D1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},I1=class{constructor(e,t,r,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=r,this.showEndForLine=n}},$Y=yf("stickyScrollViewLayer",{createHTML:i=>i}),GY="data-sticky-line-index",RS=class extends ce{constructor(e){super(),this._editor=e,this._foldingIconStore=new le,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(65),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Uo),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);let t=()=>{this._linesDomNode.style.left=this._editor.getOption(113).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(113)&&t(),r.hasChanged(65)&&(this._lineHeight=this._editor.getOption(65))})),this._register(this._editor.onDidScrollChange(r=>{r.scrollLeftChanged&&t(),r.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(r=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getCurrentLines(){return this._lineNumbers}setState(e){if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;let r=[...e.startLineNumbers];e.showEndForLine!==null&&(r[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=r}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode()}_updateWidgetWidth(){let e=this._editor.getLayoutInfo(),r=this._editor.getOption(71).side==="left"?e.contentLeft-e.minimap.minimapCanvasOuterWidth:e.contentLeft;this._lineNumbersDomNode.style.width=`${r}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),Vn(this._lineNumbersDomNode),Vn(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(let t of this._stickyLines){let r=t.foldingIcon;r&&r.setVisible(e?!0:r.isCollapsed)}}_renderRootNode(){var e;return D1e(this,void 0,void 0,function*(){let t=yield(e=us.get(this._editor))===null||e===void 0?void 0:e.getFoldingModel(),r=this._editor.getLayoutInfo();for(let[s,a]of this._lineNumbers.entries()){let l=this._renderChildNode(s,a,r,t);this._linesDomNode.appendChild(l.lineDomNode),this._lineNumbersDomNode.appendChild(l.lineNumberDomNode),this._stickyLines.push(l)}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));let n=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(n===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${n}px`,this._linesDomNodeScrollable.style.height=`${n}px`,this._rootDomNode.style.height=`${n}px`,this._editor.getOption(71).side==="left"?this._rootDomNode.style.marginLeft=r.minimap.minimapCanvasOuterWidth+"px":this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(108)==="mouseover"&&(this._foldingIconStore.add(Lt(this._lineNumbersDomNode,gi.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(Lt(this._lineNumbersDomNode,gi.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,r,n){let o=this._editor._getViewModel(),s=o.coordinatesConverter.convertModelPositionToViewPosition(new Ie(t,1)).lineNumber,a=o.getViewLineRenderingData(s),l=this._editor.getOption(71).side,c=this._editor.getOption(66),d;try{d=ng.filter(a.inlineDecorations,s,a.minColumn,a.maxColumn)}catch(te){d=[]}let u=new q_(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,d,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),h=new Jv(2e3),f=K_(u,h),m;$Y?m=$Y.createHTML(h.build()):m=h.build();let g=document.createElement("span");g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=m;let w=document.createElement("span");w.className="sticky-line-number",w.style.lineHeight=`${this._lineHeight}px`;let _=l==="left"?r.contentLeft-r.minimap.minimapCanvasOuterWidth:r.contentLeft;w.style.width=`${_}px`;let E=document.createElement("span");c.renderType===1||c.renderType===3&&t%10===0?E.innerText=t.toString():c.renderType===2&&(E.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),E.className="sticky-line-number-inner",E.style.lineHeight=`${this._lineHeight}px`,E.style.width=`${r.lineNumbersWidth}px`,E.style.float="left",l==="left"?E.style.paddingLeft=`${r.lineNumbersLeft-r.minimap.minimapCanvasOuterWidth}px`:l==="right"&&(E.style.paddingLeft=`${r.lineNumbersLeft}px`),w.appendChild(E);let A=this._renderFoldingIconForLine(w,n,e,t);this._editor.applyFontInfo(g),this._editor.applyFontInfo(E),g.setAttribute("role","listitem"),g.setAttribute(GY,String(e)),g.tabIndex=0,w.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,w.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;let L=e===this._lineNumbers.length-1,O="0",U="1";g.style.zIndex=L?O:U,w.style.zIndex=L?O:U;let Y=`${e*this._lineHeight+this._lastLineRelativePosition+(A!=null&&A.isCollapsed?1:0)}px`,oe=`${e*this._lineHeight}px`;return g.style.top=L?Y:oe,w.style.top=L?Y:oe,new uD(t,g,w,A,f.characterMapping)}_renderFoldingIconForLine(e,t,r,n){let o=this._editor.getOption(108);if(!t||o==="never")return;let s=t.regions,a=s.findRange(n),l=s.getStartLineNumber(a);if(!(n===l))return;let d=s.isCollapsed(a),u=new hD(d,this._lineHeight);return e.append(u.domNode),u.setVisible(this._isOnGlyphMargin?!0:d||o==="always"),this._foldingIconStore.add(Lt(u.domNode,gi.CLICK,()=>{_2(t,Number.MAX_VALUE,[n]),u.isCollapsed=!d;let h=(d?this._editor.getTopForLineNumber(l):this._editor.getTopForLineNumber(s.getEndLineNumber(a)))-this._lineHeight*r+1;this._editor.setScrollTop(h)})),u}_updateMinContentWidth(){this._minContentWidthInPx=0;for(let e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._stickyLines.length&&this._stickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;let t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;let r=ZF(t.characterMapping,e,0);return new Ie(t.lineNumber,r)}getLineNumberFromChildDomNode(e){var t,r;return(r=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&r!==void 0?r:null}_getRenderedStickyLineFromChildDomNode(e){let t=this.getStickyLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getStickyLineIndexFromChildDomNode(e){for(;e&&e!==this._rootDomNode;){let t=e.getAttribute(GY);if(t)return parseInt(t,10);e=e.parentElement}return null}},uD=class{constructor(e,t,r,n,o){this.lineNumber=e,this.lineDomNode=t,this.lineNumberDomNode=r,this.foldingIcon=n,this.characterMapping=o}},hD=class{constructor(e,t){this.isCollapsed=e,this.dimension=t,this.domNode=document.createElement("div"),this.domNode.style.width=`${t}px`,this.domNode.style.height=`${t}px`,this.domNode.className=_t.asClassName(e?sb:ob)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}});var M1e,fD,N1e,$d,Gp,L1,A1,Ih,pD,D1=N(()=>{pi();Si();Vt();Qh();lf();ci();et();Ls();Ht();dl();Go();ke();Rt();M1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},fD=function(i,e){return function(t,r){e(t,r,i)}},N1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},$d=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let r;typeof e=="string"?r=`${t.id}/${e}`:(r=`${t.id}/${e.name}`,t.children.get(r)!==void 0&&(r=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=r;for(let o=0;t.children.get(n)!==void 0;o++)n=`${r}_${o}`;return n}static empty(e){return e.children.size===0}},Gp=class extends $d{constructor(e,t,r){super(),this.id=e,this.parent=t,this.symbol=r,this.children=new Map}},L1=class extends $d{constructor(e,t,r,n){super(),this.id=e,this.parent=t,this.label=r,this.order=n,this.children=new Map}},A1=class i extends $d{static create(e,t,r){let n=new Fi(r),o=new i(t.uri),s=e.ordered(t),a=s.map((c,d)=>{var u;let h=$d.findId(`provider_${d}`,o),f=new L1(h,o,(u=c.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,n.token)).then(m=>{for(let g of m||[])i._makeOutlineElement(g,f);return f},m=>(Yt(m),f)).then(m=>{$d.empty(m)?m.remove():o._groups.set(h,m)})}),l=e.onDidChange(()=>{let c=e.ordered(t);Cs(c,s)||n.cancel()});return Promise.all(a).then(()=>n.token.isCancellationRequested&&!r.isCancellationRequested?i.create(e,t,r):o._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(e,t){let r=$d.findId(e,t),n=new Gp(r,t,e);if(e.children)for(let o of e.children)i._makeOutlineElement(o,n);t.children.set(n.id,n)}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,r]of this._groups)r.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=Sn.first(this._groups.values());for(let[,r]of t.children)r.parent=this,this.children.set(r.id,r)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof Gp?e.push(t.symbol):e.push(...Sn.map(t.children.values(),r=>r.symbol));return e.sort((t,r)=>B.compareRangesUsingStarts(t.range,r.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((r,n)=>Ie.compare(B.getStartPosition(r.range),B.getStartPosition(n.range))||Ie.compare(B.getEndPosition(n.range),B.getEndPosition(r.range)))}static _flattenDocumentSymbols(e,t,r){for(let n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||r,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&i._flattenDocumentSymbols(e,n.children,n.name)}},Ih=Xr("IOutlineModelService"),pD=class{constructor(e,t,r){this._languageFeaturesService=e,this._disposables=new le,this._cache=new na(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(r.onModelRemoved(n=>{this._cache.delete(n.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return N1e(this,void 0,void 0,function*(){let r=this._languageFeaturesService.documentSymbolProvider,n=r.ordered(e),o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!Cs(o.provider,n)){let a=new Fi;o={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:a,promise:A1.create(r,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()}})}};pD=M1e([fD(0,Se),fD(1,ar),fD(2,Li)],pD);Jr(Ih,pD,1)});var pc,Lh,M1,mD=N(()=>{pc=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},Lh=class{constructor(e,t,r){this.range=e,this.children=t,this.parent=r}},M1=class{constructor(e,t,r,n){this.uri=e,this.version=t,this.element=r,this.outlineProviderId=n}}});var zS,R1,XY,N1,Gd,PS,OS,gD,FS,bD,vD,QY=N(()=>{ke();Rt();D1();Ut();cb();nL();eL();Br();Vt();mD();Qh();zS=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},R1=function(i,e){return function(t,r){e(t,r,i)}},XY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(N1||(N1={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(Gd||(Gd={}));PS=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=r,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Lo(300)),this._updateOperation=this._register(new le);let o=new gD(r),s=new vD(this._editor,r),a=new bD(this._editor,t);switch(n){case N1.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(a);break;case N1.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case N1.INDENTATION_MODEL:this._modelProviders.push(a);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,r){return XY(this,void 0,void 0,function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>XY(this,void 0,void 0,function*(){for(let n of this._modelProviders){let{statusPromise:o,modelPromise:s}=n.computeStickyModel(e,t,r);this._modelPromise=s;let a=yield o;if(this._modelPromise!==s)return null;switch(a){case Gd.CANCELED:return this._updateOperation.clear(),null;case Gd.VALID:return n.stickyModel}}return null})).catch(n=>(ft(n),null))})}};PS=zS([R1(1,Pt),R1(2,Se)],PS);OS=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Gd.INVALID}computeStickyModel(e,t,r){if(r.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let n=Zt(o=>this.createModelFromProvider(e,t,o));return{statusPromise:n.then(o=>this.isModelValid(o)?r.isCancellationRequested?Gd.CANCELED:(this._stickyModel=this.createStickyModel(e,t,r,o),Gd.VALID):this._invalid()).then(void 0,o=>(ft(o),Gd.CANCELED)),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}},gD=class extends OS{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,r){return A1.create(this._languageFeaturesService.documentSymbolProvider,e,r)}createStickyModel(e,t,r,n){var o;let{stickyOutlineElement:s,providerID:a}=this._stickyModelFromOutlineModel(n,(o=this._stickyModel)===null||o===void 0?void 0:o.outlineProviderId);return new M1(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let r;if(Sn.first(e.children.values())instanceof L1){let a=Sn.find(e.children.values(),l=>l.id===t);if(a)r=a.children;else{let l="",c=-1,d;for(let[u,h]of e.children.entries()){let f=this._findSumOfRangesOfGroup(h);f>c&&(d=h,c=f,l=h.id)}t=l,r=d.children}}else r=e.children;let n=[],o=Array.from(r.values()).sort((a,l)=>{let c=new pc(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new pc(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,d)});for(let a of o)n.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new Lh(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let r=[];for(let o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)r.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(let s of o.children.values())r.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));r.sort((o,s)=>this._comparator(o.range,s.range));let n=new pc(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new Lh(n,r,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 r of e.children.values())t+=this._findSumOfRangesOfGroup(r);return e instanceof Gp?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};gD=zS([R1(0,Se)],gD);FS=class extends OS{constructor(e){super(),this._foldingLimitReporter=new lb(e)}createStickyModel(e,t,r,n){let o=this._fromFoldingRegions(n);return new M1(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,r=[],n=new Lh(void 0,[],void 0);for(let o=0;o<t;o++){let s=e.getParentIndex(o),a;s!==-1?a=r[s]:a=n;let l=new Lh(new pc(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],a);a.children.push(l),r.push(l)}return n}},bD=class extends FS{constructor(e,t){super(e),this._languageConfigurationService=t}createModelFromProvider(e,t,r){return new ih(e,this._languageConfigurationService,this._foldingLimitReporter).compute(r)}};bD=zS([R1(1,Pt)],bD);vD=class extends FS{constructor(e,t){super(e),this._languageFeaturesService=t}isProviderValid(e){return us.getFoldingRangeProviders(this._languageFeaturesService,e).length>0}createModelFromProvider(e,t,r){let n=us.getFoldingRangeProviders(this._languageFeaturesService,e);return new rh(e,n,()=>this.createModelFromProvider(e,t,r),this._foldingLimitReporter,void 0).compute(r)}};vD=zS([R1(1,Se)],vD)});var R1e,ZY,JY,_D,BS,eX=N(()=>{ke();Rt();Si();Ut();pi();Jt();Br();QY();R1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ZY=function(i,e){return function(t,r){e(t,r,i)}},JY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},_D=class{constructor(e,t,r){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=r}},BS=class extends ce{constructor(e,t,r){super(),this._languageFeaturesService=t,this._languageConfigurationService=r,this._onDidChangeStickyScroll=this._register(new Je),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new le),this._updateSoon=this._register(new di(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(113)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(113),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new PS(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),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 JY(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new Fi,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return JY(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider){this._model=null;return}let t=this._editor.getModel(),r=t.getVersionId(),n=yield this._stickyModelProvider.update(t,r,e);e.isCancellationRequested||(this._model=n)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,r,n,o){if(t.children.length===0)return;let s=o,a=[];for(let d=0;d<t.children.length;d++){let u=t.children[d];u.range&&a.push(u.range.startLineNumber)}let l=this.updateIndex(hu(a,e.startLineNumber,(d,u)=>d-u)),c=this.updateIndex(hu(a,e.startLineNumber+n,(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,f=u.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,r.push(new _D(h,f-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,r,n+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,r,n,o)}}getCandidateStickyLinesIntersecting(e){var t,r;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);let o=(r=this._editor._getViewModel())===null||r===void 0?void 0:r.getHiddenAreas();if(o)for(let s of o)n=n.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return n}};BS=R1e([ZY(1,Se),ZY(2,Pt)],BS)});var P1e,Yp,tX,yD,ms,wD=N(()=>{ke();Rt();YY();eX();Ht();vl();Zi();wt();ei();Jb();et();kC();D8();ci();Si();Br();Ls();Bt();mD();Q9();P1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Yp=function(i,e){return function(t,r){e(t,r,i)}},tX=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},ms=yD=class extends ce{constructor(e,t,r,n,o,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=r,this._instaService=n,this._contextKeyService=a,this._sessionStore=new le,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._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new RS(this._editor),this._stickyLineCandidateProvider=new BS(this._editor,r,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new I1([],[],0),this._readConfiguration();let l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(d=>{(d.hasChanged(113)||d.hasChanged(71)||d.hasChanged(65)||d.hasChanged(108))&&this._readConfiguration()})),this._register(Lt(l,gi.CONTEXT_MENU,d=>tX(this,void 0,void 0,function*(){this._onContextMenu(d)}))),this._stickyScrollFocusedContextKey=F.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=F.stickyScrollVisible.bindTo(this._contextKeyService);let c=this._register(ys(l));this._register(c.onDidBlur(d=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(d=>{this.focus()})),this._registerMouseListeners(),this._register(Lt(l,gi.MOUSE_DOWN,d=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(yD.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}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new le,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(B.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){let e=this._register(new le),t=this._register(new Ya(this._editor,{extractLineNumberFromMouseEvent:o=>{let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);return s?s.lineNumber:0}})),r=o=>{if(!this._editor.hasModel()||o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return null;let s=o.target.element;if(!s||s.innerText!==s.innerHTML)return null;let a=this._stickyScrollWidget.getEditorPositionFromNode(s);return a?{range:new B(a.lineNumber,a.column,a.lineNumber,a.column+s.innerText.length),textElement:s}:null},n=this._stickyScrollWidget.getDomNode();this._register(ko(n,gi.CLICK,o=>{if(o.ctrlKey||o.altKey||o.metaKey||!o.leftButton)return;if(o.shiftKey){let a=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(o.target);if(a===null)return;let l=new Ie(this._endLineNumbers[a],1);this._revealLineInCenterIfOutsideViewport(l);return}let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target);if(!s){let a=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);if(a===null)return;s=new Ie(a,1)}this._revealPosition(s)})),this._register(ko(n,gi.MOUSE_MOVE,o=>{if(o.shiftKey){let s=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(o.target);if(s===null||this._showEndForLine!==null&&this._showEndForLine===s)return;this._showEndForLine=s,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(Lt(n,gi.MOUSE_LEAVE,o=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([o,s])=>{let a=r(o);if(!a||!o.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}let{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;let d=new Fi;e.add(ii(()=>d.dispose(!0)));let u;fh(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Ie(l.startLineNumber,l.startColumn+1),d.token).then(h=>{if(!d.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;let f=c;u!==f?(e.clear(),u=f,u.style.textDecoration="underline",e.add(ii(()=>{u.style.textDecoration="none"}))):u||(u=f,u.style.textDecoration="underline",e.add(ii(()=>{u.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(o=>tX(this,void 0,void 0,function*(){if(o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return;let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);s&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:s.lineNumber,column:1})),this._instaService.invokeFunction(aS,o,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e){let t=new Uv(e);this._contextMenuService.showContextMenu({menuId:Me.StickyScrollContext,getAnchor:()=>t})}_readConfiguration(){let e=this._editor.getOption(113);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(r=>{r.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(r=>this._onTokensChange(r))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(66).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let r of t)for(let n of e.ranges)if(r>=n.fromLineNumber&&r<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){let t=this._editor.getLayoutInfo().height/this._editor.getOption(65);this._maxStickyLines=Math.round(t*.25)}_renderStickyScroll(){let e=this._editor.getModel();if(!e||e.isTooLargeForTokenization()){this._stickyScrollWidget.setState(void 0);return}let t=this._stickyLineCandidateProvider.getVersionId();if(t===void 0||t===e.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{let r=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(r)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){let e=this._editor.getOption(65),t=Math.min(this._maxStickyLines,this._editor.getOption(113).maxLineCount),r=this._editor.getScrollTop(),n=0,o=[],s=[],a=this._editor.getVisibleRanges();if(a.length!==0){let l=new pc(a[0].startLineNumber,a[a.length-1].endLineNumber),c=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(let d of c){let u=d.startLineNumber,h=d.endLineNumber,f=d.nestingDepth;if(h-u>0){let m=(f-1)*e,g=f*e,w=this._editor.getBottomForLineNumber(u)-r,_=this._editor.getTopForLineNumber(h)-r,E=this._editor.getBottomForLineNumber(h)-r;if(m>_&&m<=E){o.push(u),s.push(h+1),n=E-g;break}else g>w&&g<=E&&(o.push(u),s.push(h+1));if(o.length===t)break}}}return this._endLineNumbers=s,new I1(o,s,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};ms.ID="store.contrib.stickyScrollController";ms=yD=P1e([Yp(1,ts),Yp(2,Se),Yp(3,Ke),Yp(4,Pt),Yp(5,ar),Yp(6,it)],ms)});var O1e,HS,KS,US,jS,WS,VS,qS,iX=N(()=>{lt();He();VY();Zi();Cr();wt();ei();wD();O1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},HS=class extends Qo{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:b("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:b({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:WY.View,toggled:{condition:fe.equals("config.editor.stickyScroll.enabled",!0),title:b("stickyScroll","Sticky Scroll"),mnemonicTitle:b({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:Me.CommandPalette},{id:Me.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Me.StickyScrollContext}]})}run(e){return O1e(this,void 0,void 0,function*(){let t=e.get(Dt),r=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",r)})}},KS=100,US=class extends ra{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:b("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:b({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:fe.and(fe.has("config.editor.stickyScroll.enabled"),F.stickyScrollVisible),menu:[{id:Me.CommandPalette}]})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.focus()}},jS=class extends ra{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:b("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:18}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.focusNext()}},WS=class extends ra{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:b("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:16}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.focusPrevious()}},VS=class extends ra{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:b("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:3}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.goToFocused()}},qS=class extends ra{constructor(){super({id:"editor.action.selectEditor",title:{value:b("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:9}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.selectEditor()}}});var xD=N(()=>{lt();iX();wD();Zi();Ue(ms.ID,ms,1);Ci(HS);Ci(US);Ci(WS);Ci(jS);Ci(VS);Ci(qS)});var ED,Dh,F1e,Ah,CD,SD,kD,$S,TD=N(()=>{Si();hl();Qh();ke();lt();Tn();et();Rt();oA();ch();tA();nA();Ym();Ht();ED=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Dh=function(i,e){return function(t,r){e(t,r,i)}},F1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},CD=class{constructor(e,t,r,n,o,s){this.range=e,this.insertText=t,this.filterText=r,this.additionalTextEdits=n,this.command=o,this.completion=s}},SD=class extends B9{constructor(e,t,r,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=r,this.completionModel=n,this._suggestMemoryService=s}canBeReused(e,t,r){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===r.startColumn&&this.word.endColumn<r.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var e;let t=[],{items:r}=this.completionModel,n=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},r),o=Sn.slice(r,n),s=Sn.slice(r,0,n),a=5;for(let l of Sn.concat(o,s)){if(l.score===ul.Default)continue;let c=new B(l.editStart.lineNumber,l.editStart.column,l.editInsertEnd.lineNumber,l.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),d=l.completion.insertTextRules&&l.completion.insertTextRules&4?{snippet:l.completion.insertText}:l.completion.insertText;t.push(new CD(c,d,(e=l.filterTextLow)!==null&&e!==void 0?e:l.labelLow,l.completion.additionalTextEdits,l.completion.command,l)),a-->=0&&l.resolve(st.None)}return t}};SD=ED([Dh(5,Sp)],SD);kD=class{constructor(e,t,r,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=r,this._suggestMemoryService=n}provideInlineCompletions(e,t,r,n){var o;return F1e(this,void 0,void 0,function*(){if(r.selectedSuggestionInfo)return;let s=this._getEditorOption(87,e);if(Ka.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(Ka.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 B(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,c))){let f=new Db(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),u=this._lastResult}else{let f=yield vb(this._languageFeatureService.completionProvider,e,t,new tc(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},n),m;f.needsClipboard&&(m=yield this._clipboardService.readText());let g=new Ep(f.items,t.column,new Db(h,0),Dd.None,this._getEditorOption(116,e),this._getEditorOption(110,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);u=new SD(e,t.lineNumber,c,g,f,this._suggestMemoryService)}return this._lastResult=u,u})}handleItemDidShow(e,t){t.completion.resolve(st.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var r;let n=e.getValueInRange(B.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((r=s.triggerCharacters)===null||r===void 0)&&r.includes(n)&&o.add(s);if(o.size!==0)return{providers:o,ch:n}}};kD=ED([Dh(1,Se),Dh(2,Ts),Dh(3,Sp)],kD);$S=Ah=class{constructor(e,t,r,n){if(++Ah._counter===1){let o=n.createInstance(kD,(s,a)=>{var l;return((l=r.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(s)});Ah._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Ah._counter===0&&((e=Ah._disposable)===null||e===void 0||e.dispose(),Ah._disposable=void 0)}};$S._counter=0;$S=Ah=ED([Dh(1,Se),Dh(2,si),Dh(3,Ke)],$S);Ue("suggest.inlineCompletionsProvider",$S,0)});var rX=N(()=>{});var nX=N(()=>{rX()});var oX=N(()=>{});var sX=N(()=>{oX()});var aX=N(()=>{});var lX=N(()=>{aX()});var z1e,B1e,GS,cX=N(()=>{Bt();Are();X9();rF();Jt();ke();es();lX();z1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},B1e=function(i,e){return function(t,r){e(t,r,i)}},GS=class extends ce{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,r={},n){var o;super(),this._link=t,this._enabled=!0,this.el=Te(e,Le("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 Hv(u)).filter(u=>u.keyCode===3).event,c=this._register(new __(this.el,iF.Tap)).event;this._register(k_.addTarget(this.el));let d=li.any(s.event,l,c);this._register(d(u=>{this.enabled&&(au.stop(u,!0),r!=null&&r.opener?r.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};GS=z1e([B1e(3,er)],GS)});var dX,uX,H1e,YS,ID,hX=N(()=>{sX();Bt();tg();Rc();ke();xd();Ht();cX();xl();In();dX=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},uX=function(i,e){return function(t,r){e(t,r,i)}},H1e=26,YS=class extends ce{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(ID))}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,H1e)}};YS=dX([uX(1,Ke)],YS);ID=class extends ce{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(eo,{}),this.element=Le("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=Le("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Vn(this.element)}show(e){Vn(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let r=Te(this.element,Le("div.icon-container"));r.setAttribute("aria-hidden","true"),e.icon&&r.appendChild(Le(`div${_t.asCSSSelector(e.icon)}`));let n=Te(this.element,Le("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=Te(this.element,Le("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(GS,this.messageActionsContainer,Object.assign(Object.assign({},s),{tabIndex:-1}),{}));let o=Te(this.element,Le("div.action-container"));this.actionBar=this._register(new Is(o)),this.actionBar.push(this._register(new Yo("banner.close","Close Banner",_t.asClassName(U_),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};ID=dX([uX(0,Ke)],ID)});function j1e(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 ND(i){return`U+${i.toString(16).padStart(4,"0")}`}function LD(i){let e=`\`${ND(i)}\``;return B3.isInvisibleCharacter(i)||(e+=` "${`${W1e(i)}`}"`),e}function W1e(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function fX(i,e){return Dk.computeUnicodeHighlightReason(i,e)}function V1e(i,e){return Kr(this,void 0,void 0,function*(){let t=i.getValue(fa.allowedCharacters),r;typeof t=="object"&&t?r=t:r={};for(let n of e)r[String.fromCodePoint(n)]=!0;yield i.updateValue(fa.allowedCharacters,r,2)})}function q1e(i,e){var t;return Kr(this,void 0,void 0,function*(){let r=(t=i.inspect(fa.allowedLocales).user)===null||t===void 0?void 0:t.value,n;typeof r=="object"&&r?n=Object.assign({},r):n={};for(let o of e)n[o]=!0;yield i.updateValue(fa.allowedLocales,n,2)})}function K1e(i){throw new Error(`Unexpected value: ${i}`)}var OD,Xp,Kr,U1e,Qp,AD,DD,MD,Zp,RD,PD,Yd,Jp,em,P1,FD=N(()=>{Ut();Qr();Ss();ke();En();Di();nX();lt();Qm();Hr();one();j_();Zo();Jre();ec();YC();hX();He();Cr();Ht();es();_l();xl();sne();OD=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Xp=function(i,e){return function(t,r){e(t,r,i)}},Kr=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},U1e=Ni("extensions-warning-message",pt.warning,b("warningIcon","Icon shown with a warning message in the extensions editor.")),Qp=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=r,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:b("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new em};else if(o.ambiguousCharacterCount>=s)a={message:b("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Yd};else if(o.invisibleCharacterCount>=s)a={message:b("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Jp};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:U1e,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(YS,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(123),this._register(r.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(123)&&(this._options=e.getOption(123),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=j1e(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(r=>r===!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(r=>r.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(r=>r==="_os"?new Intl.NumberFormat().resolvedOptions().locale:r==="_vscode"?G9:r)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new AD(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new DD(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Qp.ID="editor.contrib.unicodeHighlighter";Qp=OD([Xp(1,Cl),Xp(2,fz),Xp(3,Ke)],Qp);AD=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._options=t,this._updateState=r,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new di(()=>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 r=[];if(!t.hasMore)for(let n of t.ranges)r.push({range:n,options:Zp.instance.getDecorationFromOptions(this._options)});this._decorations.set(r)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!Ck(t,e))return null;let r=t.getValueInRange(e.range);return{reason:fX(r,this._options),inComment:Sk(t,e),inString:kk(t,e)}}};AD=OD([Xp(3,Cl)],AD);DD=class extends ce{constructor(e,t,r){super(),this._editor=e,this._options=t,this._updateState=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new di(()=>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=[],r={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let n of e){let o=Dk.computeUnicodeHighlights(this._model,this._options,n);for(let s of o.ranges)r.ranges.push(s);r.ambiguousCharacterCount+=r.ambiguousCharacterCount,r.invisibleCharacterCount+=r.invisibleCharacterCount,r.nonBasicAsciiCharacterCount+=r.nonBasicAsciiCharacterCount,r.hasMore=r.hasMore||o.hasMore}if(!r.hasMore)for(let n of r.ranges)t.push({range:n,options:Zp.instance.getDecorationFromOptions(this._options)});this._updateState(r),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),r=t.getValueInRange(e.range);return Ck(t,e)?{reason:fX(r,this._options),inComment:Sk(t,e),inString:kk(t,e)}:null}},MD=class{constructor(e,t,r){this._editor=e,this._languageService=t,this._openerService=r,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let r=this._editor.getModel(),n=this._editor.getContribution(Qp.ID);if(!n)return[];let o=[],s=new Set,a=300;for(let l of t){let c=n.getDecorationInfo(l);if(!c)continue;let u=r.getValueInRange(l.range).codePointAt(0),h=LD(u),f;switch(c.reason.kind){case 0:{Vv(c.reason.confusableWith)?f=b("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,LD(c.reason.confusableWith.codePointAt(0))):f=b("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,LD(c.reason.confusableWith.codePointAt(0)));break}case 1:f=b("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=b("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);let m={codePoint:u,reason:c.reason,inComment:c.inComment,inString:c.inString},g=b("unicodeHighlight.adjustSettings","Adjust settings"),w=`command:${P1.ID}?${encodeURIComponent(JSON.stringify(m))}`,_=new Ki("",!0).appendMarkdown(f).appendText(" ").appendLink(w,g);o.push(new io(this,l.range,[_],!1,a++))}return o}renderHoverParts(e,t){return l8(e,t,this._editor,this._languageService,this._openerService)}};MD=OD([Xp(1,Ji),Xp(2,er)],MD);Zp=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let r=`${e}${t}`,n=this.map.get(r);return n||(n=mt.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(r,n)),n}};Zp.instance=new Zp;RD=class extends de{constructor(){super({id:Yd.ID,label:b("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.includeComments,!1,2)})}},PD=class extends de{constructor(){super({id:Yd.ID,label:b("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.includeStrings,!1,2)})}},Yd=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.ambiguousCharacters,!1,2)})}};Yd.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";Jp=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.invisibleCharacters,!1,2)})}};Jp.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";em=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.nonBasicASCII,!1,2)})}};em.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";P1=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,r){return Kr(this,void 0,void 0,function*(){let{codePoint:n,reason:o,inString:s,inComment:a}=r,l=String.fromCodePoint(n),c=e.get(rn),d=e.get(Dt);function u(m){return B3.isInvisibleCharacter(m)?b("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",ND(m)):b("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${ND(m)} "${l}"`)}let h=[];if(o.kind===0)for(let m of o.notAmbiguousInLocales)h.push({label:b("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>Kr(this,void 0,void 0,function*(){q1e(d,[m])})});if(h.push({label:u(n),run:()=>V1e(d,[n])}),a){let m=new RD;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(s){let m=new PD;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}if(o.kind===0){let m=new Yd;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===1){let m=new Jp;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===2){let m=new em;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else K1e(o);let f=yield c.pick(h,{title:b("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});f&&(yield f.run())})}};P1.ID="editor.action.unicodeHighlight.showExcludeOptions";ee(Yd);ee(Jp);ee(em);ee(P1);Ue(Qp.ID,Qp,1);Bo.register(MD)});function Y1e(i,e,t){i.setModelProperty(e.uri,mX,t)}function X1e(i,e){return i.getModelProperty(e.uri,mX)}var $1e,pX,G1e,mX,O1,zD=N(()=>{ke();Io();lt();Tn();He();Mk();$1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},pX=function(i,e){return function(t,r){e(t,r,i)}},G1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},mX="ignoreUnusualLineTerminators";O1=class extends ce{constructor(e,t,r){super(),this._editor=e,this._dialogService=t,this._codeEditorService=r,this._isPresentingDialog=!1,this._config=this._editor.getOption(124),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(124)&&(this._config=this._editor.getOption(124),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return G1e(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||X1e(this._codeEditorService,e)===!0||this._editor.getOption(89))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let r;try{this._isPresentingDialog=!0,r=yield this._dialogService.confirm({title:b("unusualLineTerminators.title","Unusual Line Terminators"),message:b("unusualLineTerminators.message","Detected unusual line terminators"),detail:b("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`.",An(e.uri)),primaryButton:b({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:b("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!r.confirmed){Y1e(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};O1.ID="editor.contrib.unusualLineTerminatorsDetector";O1=$1e([pX(1,Sf),pX(2,si)],O1);Ue(O1.ID,O1,1)});function bX(i,e,t,r){let n=i.ordered(e);return l_(n.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,r)).then(void 0,Yt)),qi)}function Z1e(i,e,t,r){return i.has(e)?new HD(e,t,r,i):new UD(e,t,r)}var Q1e,gX,BD,ZS,XS,HD,UD,jD,Mh,QS,WD,VD,qD,KD=N(()=>{Eo();pi();Ut();Si();Vt();ke();lt();et();ei();hn();He();wt();Rt();v7();Qh();Q1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},gX=function(i,e){return function(t,r){e(t,r,i)}},ZS=new ht("hasWordHighlights",!1);XS=class{constructor(e,t,r){this._model=e,this._selection=t,this._wordSeparators=r,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Zt(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let r=e.getWordAtPosition(t.getPosition());return r?new B(t.startLineNumber,r.startColumn,t.startLineNumber,r.endColumn):null}isValid(e,t,r){let n=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=r.length;!l&&c<d;c++){let u=r.getRange(c);u&&u.startLineNumber===n&&u.startColumn<=o&&u.endColumn>=s&&(l=!0)}return l}cancel(){this.result.cancel()}},HD=class extends XS{constructor(e,t,r,n){super(e,t,r),this._providers=n}_compute(e,t,r,n){return bX(this._providers,e,t.getPosition(),n).then(o=>o||[])}},UD=class extends XS{constructor(e,t,r){super(e,t,r),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,r,n){return df(250,n).then(()=>{if(!t.isEmpty())return[];let o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,r,!1).map(a=>({range:a.range,kind:Gm.Text}))})}isValid(e,t,r){let n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,r)}};Kn("_executeDocumentHighlights",(i,e,t)=>{let r=i.get(Se);return bX(r.documentHighlightProvider,e,t,st.None)});jD=class{constructor(e,t,r,n){this.toUnhook=new le,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=r,this._hasWordHighlights=ZS.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(79),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(o=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(o)})),this.toUnhook.add(e.onDidChangeModelContent(o=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(o=>{let s=this.editor.getOption(79);this.occurrencesHighlight!==s&&(this.occurrencesHighlight=s,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(B.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),r=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[r];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(n.startLineNumber);sr(`${s}, ${r+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),r=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[r];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(n.startLineNumber);sr(`${s}, ${r+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,r=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:r})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,r=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<r){this._stopAll();return}let o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let s=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=Z1e(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(128)),this.workerRequest.result.then(a=>{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},ft)}}_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:SY(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(let t of this.linkedHighlighters())(t==null?void 0:t.editor.getModel())===this.editor.getModel()&&(t._stopAll(),t.decorations.set(e),t._hasWordHighlights.set(t.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}},Mh=BD=class extends ce{static get(e){return e.getContribution(BD.ID)}constructor(e,t,r){super(),this.wordHighlighter=null,this.linkedContributions=new Set;let n=()=>{e.hasModel()&&(this.wordHighlighter=new jD(e,r.documentHighlightProvider,()=>Sn.map(this.linkedContributions,o=>o.wordHighlighter),t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()})),n()}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()}};Mh.ID="editor.contrib.wordHighlighter";Mh=BD=Q1e([gX(1,it),gX(2,Se)],Mh);QS=class extends de{constructor(e,t){super(t),this._isNext=e}run(e,t){let r=Mh.get(t);r&&(this._isNext?r.moveNext():r.moveBack())}},WD=class extends QS{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:b("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:ZS,kbOpts:{kbExpr:F.editorTextFocus,primary:65,weight:100}})}},VD=class extends QS{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:b("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:ZS,kbOpts:{kbExpr:F.editorTextFocus,primary:1089,weight:100}})}},qD=class extends de{constructor(){super({id:"editor.action.wordHighlight.trigger",label:b("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:ZS.toNegated(),kbOpts:{kbExpr:F.editorTextFocus,primary:0,weight:100}})}run(e,t,r){let n=Mh.get(t);n&&n.restoreViewState(!0)}};Ue(Mh.ID,Mh,0);ee(WD);ee(VD);ee(qD)});var Nh,Za,Ja,$D,GD,YD,XD,QD,ZD,JD,eM,tM,iM,rM,nM,oM,sM,aM,lM,Rh,F1,z1,cM,dM,uM,hM,fM,pM,mM,JS=N(()=>{lt();Yv();Qm();lre();kP();dre();ci();et();Ir();ei();Br();He();$_();wt();sz();Nh=class extends Oi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,r){if(!t.hasModel())return;let n=zc(t.getOption(128)),o=t.getModel(),a=t.getSelections().map(l=>{let c=new Ie(l.positionLineNumber,l.positionColumn),d=this._move(n,o,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>CP.fromModelSelection(l))),a.length===1){let l=new Ie(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,r){return r?new Qe(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Qe(t.lineNumber,t.column,t.lineNumber,t.column)}},Za=class extends Nh{_move(e,t,r,n){return nf.moveWordLeft(e,t,r,n)}},Ja=class extends Nh{_move(e,t,r,n){return nf.moveWordRight(e,t,r,n)}},$D=class extends Za{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},GD=class extends Za{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},YD=class extends Za{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},XD=class extends Za{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},QD=class extends Za{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},ZD=class extends Za{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},JD=class extends Za{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},eM=class extends Za{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},tM=class extends Ja{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},iM=class extends Ja{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},rM=class extends Ja{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},nM=class extends Ja{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},oM=class extends Ja{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},sM=class extends Ja{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},aM=class extends Ja{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},lM=class extends Ja{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},Rh=class extends Oi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,r){let n=e.get(Pt);if(!t.hasModel())return;let o=zc(t.getOption(128)),s=t.getModel(),a=t.getSelections(),l=t.getOption(6),c=t.getOption(10),d=n.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(f=>{let m=this._delete({wordSeparators:o,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(8),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new cl(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},F1=class extends Rh{_delete(e,t){let r=nf.deleteWordLeft(e,t);return r||new B(1,1,1,1)}},z1=class extends Rh{_delete(e,t){let r=nf.deleteWordRight(e,t);if(r)return r;let n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new B(n,o,n,o)}},cM=class extends F1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:F.writable})}},dM=class extends F1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:F.writable})}},uM=class extends F1{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},hM=class extends z1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:F.writable})}},fM=class extends z1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:F.writable})}},pM=class extends z1{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},mM=class extends de{constructor(){super({id:"deleteInsideWord",precondition:F.writable,label:b("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,r){if(!t.hasModel())return;let n=zc(t.getOption(128)),o=t.getModel(),a=t.getSelections().map(l=>{let c=nf.deleteInsideWord(n,o,l);return new cl(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};We(new $D);We(new GD);We(new YD);We(new XD);We(new QD);We(new ZD);We(new tM);We(new iM);We(new rM);We(new nM);We(new oM);We(new sM);We(new JD);We(new eM);We(new aM);We(new lM);We(new cM);We(new dM);We(new uM);We(new hM);We(new fM);We(new pM);ee(mM)});var gM,bM,e4,vM,_M,t4,yM,wM,xM=N(()=>{lt();kP();et();ei();JS();Wi();gM=class extends Rh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let r=Nm.deleteWordPartLeft(e);return r||new B(1,1,1,1)}},bM=class extends Rh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let r=Nm.deleteWordPartRight(e);if(r)return r;let n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new B(n,o,n,o)}},e4=class extends Nh{_move(e,t,r,n){return Nm.moveWordPartLeft(e,t,r)}},vM=class extends e4{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};At.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");_M=class extends e4{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};At.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");t4=class extends Nh{_move(e,t,r,n){return Nm.moveWordPartRight(e,t,r)}},yM=class extends t4{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},wM=class extends t4{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};We(new gM);We(new bM);We(new vM);We(new _M);We(new yM);We(new wM)});var B1,CM=N(()=>{Ss();ke();lt();L0();He();B1=class extends ce{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=Vr.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(90);t||(this.editor.isSimpleWidget?t=new Ki(b("editor.simple.readonly","Cannot edit in read-only input")):t=new Ki(b("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};B1.ID="editor.contrib.readOnlyMessageController";Ue(B1.ID,B1,2)});var vX=N(()=>{});var _X=N(()=>{vX()});var EM=Xi(H1=>{_X();Bt();aa();ke();lt();hn();wre();Tre();Zo();pz();yu();var J1e=H1&&H1.__decorate||function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},yX=H1&&H1.__param||function(i,e){return function(t,r){e(t,r,i)}},SM,tm=SM=class extends ce{static get(e){return e.getContribution(SM.ID)}constructor(e,t,r){super(),this._editor=e,this._languageService=r,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(bf.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new i4(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};tm.ID="editor.contrib.inspectTokens";tm=SM=J1e([yX(1,iy),yX(2,Ji)],tm);var kM=class extends de{constructor(){super({id:"editor.action.inspectTokens",label:mz.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let r=tm.get(t);r==null||r.launch()}};function eve(i){let e="";for(let t=0,r=i.length;t<r;t++){let n=i.charCodeAt(t);switch(n){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(n)}}return e}function tve(i,e){let t=bf.get(e);if(t)return t;let r=i.encodeLanguageId(e);return{getInitialState:()=>VO,tokenize:(n,o,s)=>qO(e,s),tokenizeEncoded:(n,o,s)=>KO(r,s)}}var i4=class i extends ce{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=tve(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(r=>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),r=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){r=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(r<t.tokens1.length){let l=t.tokens1[r].offset,c=r+1<t.tokens1.length?t.tokens1[r+1].offset:o.length;s=o.substring(l,c)}lu(this._domNode,Le("h2.tm-token",void 0,eve(s),Le("span.tm-token-length",void 0,`${s.length} ${s.length===1?"char":"chars"}`))),Te(this._domNode,Le("hr.tokens-inspect-separator",{style:"clear:both"}));let a=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;Te(this._domNode,Le("table.tm-metadata-table",void 0,Le("tbody",void 0,Le("tr",void 0,Le("td.tm-metadata-key",void 0,"language"),Le("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"token type"),Le("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"font style"),Le("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"foreground"),Le("td.tm-metadata-value",void 0,`${a?vt.Format.CSS.formatHex(a.foreground):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"background"),Le("td.tm-metadata-value",void 0,`${a?vt.Format.CSS.formatHex(a.background):"-?-"}`))))),Te(this._domNode,Le("hr.tokens-inspect-separator")),r<t.tokens1.length&&Te(this._domNode,Le("span.tm-token-type",void 0,t.tokens1[r].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=bf.getColorMap(),r=ff.getLanguageId(e),n=ff.getTokenType(e),o=ff.getFontStyle(e),s=ff.getForeground(e),a=ff.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(r),tokenType:n,fontStyle:o,foreground:t[s],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),r=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:r.tokens,tokens2:n.tokens,endState:r.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let r=1;r<e;r++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(r),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};i4._ID="editor.contrib.inspectTokensWidget";Ue(tm.ID,tm,4);ee(kM)});var ive,wX,U1,j1,xX=N(()=>{He();ll();ke();Ur();lg();_l();ive=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},wX=function(i,e){return function(t,r){e(t,r,i)}},j1=U1=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Zr.as(ya.Quickaccess)}provide(e){let t=new le;return t.add(e.onDidAccept(()=>{let[r]=e.selectedItems;r&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(r=>{let n=this.registry.getQuickAccessProvider(r.substr(U1.PREFIX.length));n&&n.prefix&&n.prefix!==U1.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(r=>r.prefix!==U1.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,r)=>t.prefix.localeCompare(r.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let r=t.prefix||e.prefix,n=r||"\u2026";return{prefix:r,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:b("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}})}};j1.PREFIX="?";j1=U1=ive([wX(0,rn),wX(1,qt)],j1)});var TM=N(()=>{ll();lg();yu();xX();Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:j1,prefix:"",helpEntries:[{description:gz.helpQuickAccessActionLabel}]})});var im,IM=N(()=>{z9();ke();bk();jc();OO();tn();Eo();im=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var r;let n=new le;e.canAcceptInBackground=!!(!((r=this.options)===null||r===void 0)&&r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=n.add(new ji);return o.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),n}doProvide(e,t){var r;let n=new le,o=this.activeTextEditorControl;if(o&&this.canProvideWithTextEditor(o)){let s={editor:o},a=W_(o);if(a){let l=(r=o.saveViewState())!==null&&r!==void 0?r:void 0;n.add(a.onDidChangeCursorPosition(()=>{var c;l=(c=o.saveViewState())!==null&&c!==void 0?c:void 0})),s.restoreViewState=()=>{l&&o===this.activeTextEditorControl&&o.restoreViewState(l)},n.add(Nv(t.onCancellationRequested)(()=>{var c;return(c=s.restoreViewState)===null||c===void 0?void 0:c.call(s)}))}n.add(ii(()=>this.clearDecorations(o))),n.add(this.provideWithTextEditor(s,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 r=e.getModel();r&&"getLineContent"in r&&cu(`${r.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return RF(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(r=>{let n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.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:ki(b_),position:$n.Full}}}],[s,a]=r.deltaDecorations(n,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(r=>{r.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}});var W1,CX=N(()=>{ke();bk();IM();He();W1=class i extends im{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=b("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ce.None}provideWithTextEditor(e,t,r){let n=e.editor,o=new le;o.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(n,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(n,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}let d=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(d,0),this.addDecorations(n,d)};s(),o.add(t.onDidChangeValue(()=>s()));let a=W_(n);return a&&a.getOptions().get(66).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(ii(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let r=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),n=this.lineCount(e)+1;return{lineNumber:r[0]>0?r[0]:n+r[0],column:r[1]}}getPickLabel(e,t,r){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,r)?b("gotoLineColumnLabel","Go to line {0} and character {1}.",t,r):b("gotoLineLabel","Go to line {0}.",t);let n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?b("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):b("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,r){if(!r||typeof r!="number")return!1;let n=this.getModel(e);if(!n)return!1;let o={lineNumber:t,column:r};return n.validatePosition(o).equals(o)}lineCount(e){var t,r;return(r=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&r!==void 0?r:0}};W1.PREFIX=":"});var rve,nve,V1,q1,LM=N(()=>{CX();ll();lg();Tn();yu();Jt();lt();ei();_l();rve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},nve=function(i,e){return function(t,r){e(t,r,i)}},V1=class extends W1{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};V1=rve([nve(0,si)],V1);q1=class i extends de{constructor(){super({id:i.ID,label:Nk.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(rn).quickAccess.show(V1.PREFIX)}};q1.ID="editor.action.gotoLine";ee(q1);Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:V1,prefix:V1.PREFIX,helpEntries:[{description:Nk.gotoLineActionLabel,commandId:q1.ID}]})});function n4(i,e,t=0,r=0){let n=e;return n.values&&n.values.length>1?ove(i,n.values,t,r):TX(i,e,t,r)}function ove(i,e,t,r){let n=0,o=[];for(let s of e){let[a,l]=TX(i,s,t,r);if(typeof a!="number")return EX;n+=a,o.push(...l)}return[n,sve(o)]}function TX(i,e,t,r){let n=o_(e.original,e.originalLowercase,t,i,i.toLowerCase(),r,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],pu(n)]:EX}function sve(i){let e=i.sort((n,o)=>n.start-o.start),t=[],r;for(let n of e)!r||!ave(r,n)?(r=n,t.push(n)):(r.start=Math.min(r.start,n.start),r.end=Math.max(r.end,n.end));return t}function ave(i,e){return!(i.end<e.start||e.end<i.start)}function SX(i){return i.startsWith('"')&&i.endsWith('"')}function r4(i){typeof i!="string"&&(i="");let e=i.toLowerCase(),{pathNormalized:t,normalized:r,normalizedLowercase:n}=kX(i),o=t.indexOf(jv)>=0,s=SX(i),a,l=i.split(IX);if(l.length>1)for(let c of l){let d=SX(c),{pathNormalized:u,normalized:h,normalizedLowercase:f}=kX(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:f,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:r,normalizedLowercase:n,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function kX(i){let e;Dc?e=i.replace(/\//g,jv):e=i.replace(/\\/g,jv);let t=hP(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function AM(i){return Array.isArray(i)?r4(i.map(e=>e.original).join(IX)):r4(i.original)}var EX,dvt,IX,LX=N(()=>{hl();J9();En();Di();EX=[void 0,[]];dvt=Object.freeze({score:0});IX=" "});var lve,AX,K1,rm,$s,DM,MM,DX=N(()=>{Ut();Si();Qr();In();LX();ke();Di();et();hn();D1();IM();He();Rt();pi();lve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},AX=function(i,e){return function(t,r){e(t,r,i)}},K1=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},$s=rm=class extends im{constructor(e,t,r=Object.create(null)){super(r),this._languageFeaturesService=e,this._outlineModelService=t,this.options=r,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,b("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ce.None}provideWithTextEditor(e,t,r){let n=e.editor,o=this.getModel(n);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,r):this.doProvideWithoutEditorSymbols(e,o,t,r):ce.None}doProvideWithoutEditorSymbols(e,t,r,n){let o=new le;return this.provideLabelPick(r,b("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),K1(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||n.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,r,n))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return K1(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let r=new d_,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),r.complete(!0))}));return t.add(ii(()=>r.complete(!1))),r.p})}doProvideWithEditorSymbols(e,t,r,n){var o;let s=e.editor,a=new le;a.add(r.onDidAccept(u=>{let[h]=r.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:r.keyMods,preserveFocus:u.inBackground}),u.inBackground||r.hide())})),a.add(r.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:r.keyMods,forceSideBySide:!0}),r.hide())}));let l=this.getDocumentSymbols(t,n),c,d=u=>K1(this,void 0,void 0,function*(){c==null||c.dispose(!0),r.busy=!1,c=new Fi(n),r.busy=!0;try{let h=r4(r.value.substr(rm.PREFIX.length).trim()),f=yield this.doGetSymbolPicks(l,h,void 0,c.token);if(n.isCancellationRequested)return;if(f.length>0){if(r.items=f,u&&h.original.length===0){let m=AP(f,g=>!!(g.type!=="separator"&&g.range&&B.containsPosition(g.range.decoration,u)));m&&(r.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(r,b("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(r,b("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(r.busy=!1)}});return a.add(r.onDidChangeValue(()=>d(void 0))),d((o=s.getSelection())===null||o===void 0?void 0:o.getPosition()),a.add(r.onDidChangeActive(()=>{let[u]=r.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}doGetSymbolPicks(e,t,r,n){var o,s;return K1(this,void 0,void 0,function*(){let a=yield e;if(n.isCancellationRequested)return[];let l=t.original.indexOf(rm.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=AM(t.values[0]),u=AM(t.values.slice(1))):d=t;let h,f=(s=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||s===void 0?void 0:s.call(o);f&&(h=[{iconClass:f==="right"?_t.asClassName(pt.splitHorizontal):_t.asClassName(pt.splitVertical),tooltip:f==="right"?b("openToSide","Open to the Side"):b("openToBottom","Open to the Bottom")}]);let m=[];for(let _=0;_<a.length;_++){let E=a[_],A=uP(E.name),L=`$(${jO.toIcon(E.kind).id}) ${A}`,O=L.length-A.length,U=E.containerName;r!=null&&r.extraContainerLabel&&(U?U=`${r.extraContainerLabel} \u2022 ${U}`:U=r.extraContainerLabel);let Y,oe,te,Z;if(t.original.length>c){let Pe=!1;if(d!==t&&([Y,oe]=n4(L,Object.assign(Object.assign({},t),{values:void 0}),c,O),typeof Y=="number"&&(Pe=!0)),typeof Y!="number"&&([Y,oe]=n4(L,d,c,O),typeof Y!="number"))continue;if(!Pe&&u){if(U&&u.original.length>0&&([te,Z]=n4(U,u)),typeof te!="number")continue;typeof Y=="number"&&(Y+=te)}}let ve=E.tags&&E.tags.indexOf(1)>=0;m.push({index:_,kind:E.kind,score:Y,label:L,ariaLabel:UO(E.name,E.kind),description:U,highlights:ve?void 0:{label:oe,description:Z},range:{selection:B.collapseToStart(E.selectionRange),decoration:E.range},strikethrough:ve,buttons:h})}let g=m.sort((_,E)=>l?this.compareByKindAndScore(_,E):this.compareByScore(_,E)),w=[];if(l){let L=function(){E&&typeof _=="number"&&A>0&&(E.label=tf(MM[_]||DM,A))},_,E,A=0;for(let O of g)_!==O.kind?(L(),_=O.kind,A=1,E={type:"separator"},w.push(E)):A++,w.push(O);L()}else g.length>0&&(w=[{label:b("symbols","symbols ({0})",m.length),type:"separator"},...g]);return w})}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.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){let r=MM[e.kind]||DM,n=MM[t.kind]||DM,o=r.localeCompare(n);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return K1(this,void 0,void 0,function*(){let r=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:r.asListOfDocumentSymbols()})}};$s.PREFIX="@";$s.SCOPE_PREFIX=":";$s.PREFIX_BY_CATEGORY=`${rm.PREFIX}${rm.SCOPE_PREFIX}`;$s=rm=lve([AX(0,Se),AX(1,Ih)],$s);DM=b("property","properties ({0})"),MM={5:b("method","methods ({0})"),11:b("function","functions ({0})"),8:b("_constructor","constructors ({0})"),12:b("variable","variables ({0})"),4:b("class","classes ({0})"),22:b("struct","structs ({0})"),23:b("event","events ({0})"),24:b("operator","operators ({0})"),10:b("interface","interfaces ({0})"),2:b("namespace","namespaces ({0})"),3:b("package","packages ({0})"),25:b("typeParameter","type parameters ({0})"),1:b("modules","modules ({0})"),6:b("property","properties ({0})"),9:b("enum","enumerations ({0})"),21:b("enumMember","enumeration members ({0})"),14:b("string","strings ({0})"),0:b("file","files ({0})"),17:b("array","arrays ({0})"),15:b("number","numbers ({0})"),16:b("boolean","booleans ({0})"),18:b("object","objects ({0})"),19:b("key","keys ({0})"),7:b("field","fields ({0})"),13:b("constant","constants ({0})")}});var cve,NM,RM,$1,PM=N(()=>{I0();Tx();DX();ll();lg();Tn();yu();Jt();lt();ei();_l();D1();Rt();cve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},NM=function(i,e){return function(t,r){e(t,r,i)}},RM=class extends $s{constructor(e,t,r){super(t,r),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};RM=cve([NM(0,si),NM(1,Se),NM(2,Ih)],RM);$1=class i extends de{constructor(){super({id:i.ID,label:ry.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:F.hasDocumentSymbolProvider,kbOpts:{kbExpr:F.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(rn).quickAccess.show($s.PREFIX,{itemActivation:yF.NONE})}};$1.ID="editor.action.quickOutline";ee($1);Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:RM,prefix:$s.PREFIX,helpEntries:[{description:ry.quickOutlineActionLabel,prefix:$s.PREFIX,commandId:$1.ID},{description:ry.quickOutlineByCategoryActionLabel,prefix:$s.PREFIX_BY_CATEGORY}]})});function OM(i,e){return e&&(i.stack||i.stacktrace)?b("stackTrace.format","{0}: {1}",NX(i),MX(i.stack)||MX(i.stacktrace)):NX(i)}function MX(i){return Array.isArray(i)?i.join(` -`):i}function NX(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"?b("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function FM(i=null,e=!1){if(!i)return b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=un(i),r=FM(t[0],e);return t.length>1?b("error.moreErrors","{0} ({1} errors in total)",r,t.length):r}if(Ov(i))return i;if(i.detail){let t=i.detail;if(t.error)return OM(t.error,e);if(t.exception)return OM(t.exception,e)}return i.stack?OM(i,e):i.message?i.message:b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var RX=N(()=>{pi();Fr();He()});function zM(i){let e=i;return Array.isArray(e.items)}function PX(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var G1,nm,o4,OX=N(()=>{Ut();Si();ke();Fr();G1=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.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"})(nm||(nm={}));o4=class extends ce{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,r){var n;let o=new le;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=o.add(new ji),l=()=>G1(this,void 0,void 0,function*(){let c=a.value=new le;s==null||s.dispose(!0),e.busy=!1,s=new Fi(t);let d=s.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,c,d,r),f=(g,w)=>{var _;let E,A;if(zM(g)?(E=g.items,A=g.active):E=g,E.length===0){if(w)return!1;(u.length>0||e.hideInput)&&(!((_=this.options)===null||_===void 0)&&_.noResultsPick)&&(K9(this.options.noResultsPick)?E=[this.options.noResultsPick(u)]:E=[this.options.noResultsPick])}return e.items=E,A&&(e.activeItems=[A]),!0},m=g=>G1(this,void 0,void 0,function*(){let w=!1,_=!1;yield Promise.all([(()=>G1(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield df(g.mergeDelay),d.isCancellationRequested)||_||(w=f(g.picks,!0))}))(),(()=>G1(this,void 0,void 0,function*(){e.busy=!0;try{let E=yield g.additionalPicks;if(d.isCancellationRequested)return;let A,L;zM(g.picks)?(A=g.picks.items,L=g.picks.active):A=g.picks;let O,U;if(zM(E)?(O=E.items,U=E.active):O=E,O.length>0||!w){let Y;if(!L&&!U){let oe=e.activeItems[0];oe&&A.indexOf(oe)!==-1&&(Y=oe)}f({items:[...A,...O],active:L||U||Y})}}finally{d.isCancellationRequested||(e.busy=!1),_=!0}}))()])});if(h!==null)if(PX(h))yield m(h);else if(!(h instanceof Promise))f(h);else{e.busy=!0;try{let g=yield h;if(d.isCancellationRequested)return;PX(g)?yield m(g):f(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})=>G1(this,void 0,void 0,function*(){var u,h;if(typeof d.trigger=="function"){let f=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(f>=0){let m=d.trigger(f,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case nm.NO_ACTION:break;case nm.CLOSE_PICKER:e.hide();break;case nm.REFRESH_PICKER:l();break;case nm.REMOVE_ITEM:{let w=e.items.indexOf(d);if(w!==-1){let _=e.items.slice(),E=_.splice(w,1),A=e.activeItems.filter(O=>O!==E[0]),L=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,A&&(e.activeItems=A),e.keepScrollPosition=L}break}}}}}))),o}}});var FX,Ph,BM,Y1,ur,om,Oh,zX=N(()=>{RX();Vt();hl();ke();lf();He();Wi();Cr();Mk();Ht();Ur();OX();_u();Oc();FX=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ph=function(i,e){return function(t,r){e(t,r,i)}},BM=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},om=Y1=class extends o4{constructor(e,t,r,n,o,s){super(Y1.PREFIX,e),this.instantiationService=t,this.keybindingService=r,this.commandService=n,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(Oh)),this.options=e}_getPicks(e,t,r,n){var o,s,a,l;return BM(this,void 0,void 0,function*(){let c=yield this.getCommandPicks(r);if(r.isCancellationRequested)return[];let d=[];for(let g of c){let w=(o=Y1.WORD_FILTER(e,g.label))!==null&&o!==void 0?o:void 0,_=g.commandAlias&&(s=Y1.WORD_FILTER(e,g.commandAlias))!==null&&s!==void 0?s:void 0;w||_?(g.highlights={label:w,detail:this.options.showAlias?_:void 0},d.push(g)):e===g.commandId&&d.push(g)}let u=new Map;for(let g of d){let w=u.get(g.label);w?(g.description=g.commandId,w.description=w.commandId):u.set(g.label,g)}d.sort((g,w)=>{let _=this.commandsHistory.peek(g.commandId),E=this.commandsHistory.peek(w.commandId);if(_&&E)return _>E?-1:1;if(_)return-1;if(E)return 1;if(this.options.suggestedCommandIds){let A=this.options.suggestedCommandIds.has(g.commandId),L=this.options.suggestedCommandIds.has(w.commandId);if(A&&L)return 0;if(A)return-1;if(L)return 1}return g.label.localeCompare(w.label)});let h=[],f=!1,m=!!this.options.suggestedCommandIds;for(let g=0;g<d.length;g++){let w=d[g];g===0&&this.commandsHistory.peek(w.commandId)&&(h.push({type:"separator",label:b("recentlyUsed","recently used")}),f=!0),m&&!this.commandsHistory.peek(w.commandId)&&(!((a=this.options.suggestedCommandIds)===null||a===void 0)&&a.has(w.commandId))&&(h.push({type:"separator",label:b("commonlyUsed","commonly used")}),f=!0,m=!1),f&&!this.commandsHistory.peek(w.commandId)&&!(!((l=this.options.suggestedCommandIds)===null||l===void 0)&&l.has(w.commandId))&&(h.push({type:"separator",label:b("morecCommands","other commands")}),f=!1),h.push(this.toCommandPick(w,n))}return this.hasAdditionalCommandPicks(e,r)?{picks:h,additionalPicks:(()=>BM(this,void 0,void 0,function*(){let g=yield this.getAdditionalCommandPicks(c,d,e,r);return r.isCancellationRequested?[]:g.map(w=>this.toCommandPick(w,n))}))()}:h})}toCommandPick(e,t){if(e.type==="separator")return e;let r=this.keybindingService.lookupKeybinding(e.commandId),n=r?b("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,r.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:r,accept:()=>BM(this,void 0,void 0,function*(){var o,s;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{!((s=e.args)===null||s===void 0)&&s.length?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(a){$o(a)||this.dialogService.error(b("canNotRun","Command '{0}' resulted in an error",e.label),FM(a))}})})}};om.PREFIX=">";om.WORD_FILTER=BP(HP,WP,UP);om=Y1=FX([Ph(1,Ke),Ph(2,qt),Ph(3,vi),Ph(4,Ln),Ph(5,Sf)],om);Oh=ur=class extends ce{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=ur.getConfiguredCommandHistoryLength(this.configurationService),ur.cache&&ur.cache.limit!==this.configuredCommandsHistoryLength&&(ur.cache.limit=this.configuredCommandsHistoryLength,ur.saveState(this.storageService)))}load(){let e=this.storageService.get(ur.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(n){}let r=ur.cache=new na(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((o,s)=>o.value-s.value),n.forEach(o=>r.set(o.key,o.value))}ur.counter=this.storageService.getNumber(ur.PREF_KEY_COUNTER,0,ur.counter)}push(e){ur.cache&&(ur.cache.set(e,ur.counter++),ur.saveState(this.storageService))}peek(e){var t;return(t=ur.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!ur.cache)return;let t={usesLRU:!0,entries:[]};ur.cache.forEach((r,n)=>t.entries.push({key:n,value:r})),e.store(ur.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(ur.PREF_KEY_COUNTER,ur.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,r;let o=(r=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||r===void 0?void 0:r.history;return typeof o=="number"?o:ur.DEFAULT_COMMANDS_HISTORY_LENGTH}};Oh.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Oh.PREF_KEY_CACHE="commandPalette.mru.cache";Oh.PREF_KEY_COUNTER="commandPalette.mru.counter";Oh.counter=1;Oh=ur=FX([Ph(0,Gn),Ph(1,Dt)],Oh)});var s4,BX=N(()=>{gre();zX();s4=class extends om{constructor(e,t,r,n,o,s){super(e,t,r,n,o,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let r of e.getSupportedActions())t.push({commandId:r.id,commandAlias:r.alias,label:KP(r.label)||r.id});return t}}});var dve,sm,HX,X1,Q1,HM=N(()=>{ll();lg();yu();Tn();BX();Ht();Ur();Wi();Oc();Mk();lt();ei();_l();dve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},sm=function(i,e){return function(t,r){e(t,r,i)}},HX=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},X1=class extends s4{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,r,n,o,s){super({showAlias:!1},e,r,n,o,s),this.codeEditorService=t}getCommandPicks(){return HX(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return HX(this,void 0,void 0,function*(){return[]})}};X1=dve([sm(0,Ke),sm(1,si),sm(2,qt),sm(3,vi),sm(4,Ln),sm(5,Sf)],X1);Q1=class i extends de{constructor(){super({id:i.ID,label:Rk.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(rn).quickAccess.show(X1.PREFIX)}};Q1.ID="editor.action.quickCommand";ee(Q1);Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:X1,prefix:X1.PREFIX,helpEntries:[{description:Rk.quickCommandHelp,commandId:Q1.ID}]})});var uve,am,UM,jM=N(()=>{lt();Tn();AA();Cr();wt();Ht();Ao();_u();uve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},am=function(i,e){return function(t,r){e(t,r,i)}},UM=class extends Ga{constructor(e,t,r,n,o,s,a){super(!0,e,t,r,n,o,s,a)}};UM=uve([am(1,it),am(2,si),am(3,Mi),am(4,Ke),am(5,Gn),am(6,Dt)],UM);Ue(Ga.ID,UM,4)});function yve(){return import("./jsonMode-ILQOKGQC.js")}var hve,fve,pve,mve,UX,gve,Z1,bve,vve,_ve,jX,WM=N(()=>{Ds();Ds();hve=Object.defineProperty,fve=Object.getOwnPropertyDescriptor,pve=Object.getOwnPropertyNames,mve=Object.prototype.hasOwnProperty,UX=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pve(e))!mve.call(i,n)&&n!==t&&hve(i,n,{get:()=>e[n],enumerable:!(r=fve(e,n))||r.enumerable});return i},gve=(i,e,t)=>(UX(i,e,"default"),t&&UX(t,e,"default")),Z1={};gve(Z1,As);bve=class{constructor(i,e,t){wr(this,"_onDidChange",new Z1.Emitter);wr(this,"_diagnosticsOptions");wr(this,"_modeConfiguration");wr(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)}},vve={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},_ve={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},jX=new bve("json",vve,_ve);Z1.languages.json={jsonDefaults:jX};Z1.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Z1.languages.onLanguage("json",()=>{yve().then(i=>i.setupMode(jX))})});function ie(i){let e=i.id;VX[e]=i,J1.languages.register(i);let t=qX.getOrCreate(e);J1.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),J1.languages.onLanguageEncountered(e,async()=>{let r=await t.load();J1.languages.setLanguageConfiguration(e,r.conf)})}var wve,xve,Cve,Sve,WX,kve,J1,VX,VM,qX,Ge=N(()=>{Ds();wve=Object.defineProperty,xve=Object.getOwnPropertyDescriptor,Cve=Object.getOwnPropertyNames,Sve=Object.prototype.hasOwnProperty,WX=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Cve(e))!Sve.call(i,n)&&n!==t&&wve(i,n,{get:()=>e[n],enumerable:!(r=xve(e,n))||r.enumerable});return i},kve=(i,e,t)=>(WX(i,e,"default"),t&&WX(t,e,"default")),J1={};kve(J1,As);VX={},VM={},qX=class{constructor(i){wr(this,"_languageId");wr(this,"_loadingTriggered");wr(this,"_lazyLoadPromise");wr(this,"_lazyLoadPromiseResolve");wr(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return VM[i]||(VM[i]=new qX(i)),VM[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,VX[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}}});var qM=N(()=>{Ge();ie({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>import("./elixir-I7MUXEB2.js")})});var KM=N(()=>{Ge();ie({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>import("./markdown-GNMXFE7H.js")})});var $M=N(()=>{Ge();ie({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>import("./javascript-6A7FQGGU.js")})});var GM=N(()=>{Ge();ie({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>import("./sql-5LBGPTDB.js")})});var YM=N(()=>{Ge();ie({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>import("./css-MRJBVA6L.js")})});var XM=N(()=>{Ge();ie({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-CMHOMJOM.js")})});var QM=N(()=>{Ge();ie({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>import("./xml-5NTT7CCO.js")})});var ZM=N(()=>{Ge();ie({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>import("./dockerfile-QFITLKOJ.js")})});var iQ=Xi(()=>{});var l4=Xi((a4,rQ)=>{(function(i,e){typeof a4=="object"?rQ.exports=a4=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(a4,function(){var i=i||function(e,t){var r;if(typeof window!="undefined"&&window.crypto&&(r=window.crypto),typeof self!="undefined"&&self.crypto&&(r=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window!="undefined"&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global!="undefined"&&global.crypto&&(r=global.crypto),!r&&typeof su=="function")try{r=iQ()}catch(_){}var n=function(){if(r){if(typeof r.getRandomValues=="function")try{return r.getRandomValues(new Uint32Array(1))[0]}catch(_){}if(typeof r.randomBytes=="function")try{return r.randomBytes(4).readInt32LE()}catch(_){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function _(){}return function(E){var A;return _.prototype=E,A=new _,_.prototype=null,A}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(_){var E=o(this);return _&&E.mixIn(_),(!E.hasOwnProperty("init")||this.init===E.init)&&(E.init=function(){E.$super.init.apply(this,arguments)}),E.init.prototype=E,E.$super=this,E},create:function(){var _=this.extend();return _.init.apply(_,arguments),_},init:function(){},mixIn:function(_){for(var E in _)_.hasOwnProperty(E)&&(this[E]=_[E]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(_,E){_=this.words=_||[],E!=t?this.sigBytes=E:this.sigBytes=_.length*4},toString:function(_){return(_||u).stringify(this)},concat:function(_){var E=this.words,A=_.words,L=this.sigBytes,O=_.sigBytes;if(this.clamp(),L%4)for(var U=0;U<O;U++){var Y=A[U>>>2]>>>24-U%4*8&255;E[L+U>>>2]|=Y<<24-(L+U)%4*8}else for(var oe=0;oe<O;oe+=4)E[L+oe>>>2]=A[oe>>>2];return this.sigBytes+=O,this},clamp:function(){var _=this.words,E=this.sigBytes;_[E>>>2]&=4294967295<<32-E%4*8,_.length=e.ceil(E/4)},clone:function(){var _=l.clone.call(this);return _.words=this.words.slice(0),_},random:function(_){for(var E=[],A=0;A<_;A+=4)E.push(n());return new c.init(E,_)}}),d=s.enc={},u=d.Hex={stringify:function(_){for(var E=_.words,A=_.sigBytes,L=[],O=0;O<A;O++){var U=E[O>>>2]>>>24-O%4*8&255;L.push((U>>>4).toString(16)),L.push((U&15).toString(16))}return L.join("")},parse:function(_){for(var E=_.length,A=[],L=0;L<E;L+=2)A[L>>>3]|=parseInt(_.substr(L,2),16)<<24-L%8*4;return new c.init(A,E/2)}},h=d.Latin1={stringify:function(_){for(var E=_.words,A=_.sigBytes,L=[],O=0;O<A;O++){var U=E[O>>>2]>>>24-O%4*8&255;L.push(String.fromCharCode(U))}return L.join("")},parse:function(_){for(var E=_.length,A=[],L=0;L<E;L++)A[L>>>2]|=(_.charCodeAt(L)&255)<<24-L%4*8;return new c.init(A,E)}},f=d.Utf8={stringify:function(_){try{return decodeURIComponent(escape(h.stringify(_)))}catch(E){throw new Error("Malformed UTF-8 data")}},parse:function(_){return h.parse(unescape(encodeURIComponent(_)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(_){typeof _=="string"&&(_=f.parse(_)),this._data.concat(_),this._nDataBytes+=_.sigBytes},_process:function(_){var E,A=this._data,L=A.words,O=A.sigBytes,U=this.blockSize,Y=U*4,oe=O/Y;_?oe=e.ceil(oe):oe=e.max((oe|0)-this._minBufferSize,0);var te=oe*U,Z=e.min(te*4,O);if(te){for(var ve=0;ve<te;ve+=U)this._doProcessBlock(L,ve);E=L.splice(0,te),A.sigBytes-=Z}return new c.init(E,Z)},clone:function(){var _=l.clone.call(this);return _._data=this._data.clone(),_},_minBufferSize:0}),g=a.Hasher=m.extend({cfg:l.extend(),init:function(_){this.cfg=this.cfg.extend(_),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(_){return this._append(_),this._process(),this},finalize:function(_){_&&this._append(_);var E=this._doFinalize();return E},blockSize:512/32,_createHelper:function(_){return function(E,A){return new _.init(A).finalize(E)}},_createHmacHelper:function(_){return function(E,A){return new w.HMAC.init(_,A).finalize(E)}}}),w=s.algo={};return s}(Math);return i})});var oQ=Xi((c4,nQ)=>{(function(i,e){typeof c4=="object"?nQ.exports=c4=e(l4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(c4,function(i){return function(e){var t=i,r=t.lib,n=r.WordArray,o=r.Hasher,s=t.algo,a=[];(function(){for(var f=0;f<64;f++)a[f]=e.abs(e.sin(f+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(f,m){for(var g=0;g<16;g++){var w=m+g,_=f[w];f[w]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var E=this._hash.words,A=f[m+0],L=f[m+1],O=f[m+2],U=f[m+3],Y=f[m+4],oe=f[m+5],te=f[m+6],Z=f[m+7],ve=f[m+8],Pe=f[m+9],Ee=f[m+10],Oe=f[m+11],Xe=f[m+12],dt=f[m+13],be=f[m+14],we=f[m+15],X=E[0],R=E[1],ne=E[2],me=E[3];X=c(X,R,ne,me,A,7,a[0]),me=c(me,X,R,ne,L,12,a[1]),ne=c(ne,me,X,R,O,17,a[2]),R=c(R,ne,me,X,U,22,a[3]),X=c(X,R,ne,me,Y,7,a[4]),me=c(me,X,R,ne,oe,12,a[5]),ne=c(ne,me,X,R,te,17,a[6]),R=c(R,ne,me,X,Z,22,a[7]),X=c(X,R,ne,me,ve,7,a[8]),me=c(me,X,R,ne,Pe,12,a[9]),ne=c(ne,me,X,R,Ee,17,a[10]),R=c(R,ne,me,X,Oe,22,a[11]),X=c(X,R,ne,me,Xe,7,a[12]),me=c(me,X,R,ne,dt,12,a[13]),ne=c(ne,me,X,R,be,17,a[14]),R=c(R,ne,me,X,we,22,a[15]),X=d(X,R,ne,me,L,5,a[16]),me=d(me,X,R,ne,te,9,a[17]),ne=d(ne,me,X,R,Oe,14,a[18]),R=d(R,ne,me,X,A,20,a[19]),X=d(X,R,ne,me,oe,5,a[20]),me=d(me,X,R,ne,Ee,9,a[21]),ne=d(ne,me,X,R,we,14,a[22]),R=d(R,ne,me,X,Y,20,a[23]),X=d(X,R,ne,me,Pe,5,a[24]),me=d(me,X,R,ne,be,9,a[25]),ne=d(ne,me,X,R,U,14,a[26]),R=d(R,ne,me,X,ve,20,a[27]),X=d(X,R,ne,me,dt,5,a[28]),me=d(me,X,R,ne,O,9,a[29]),ne=d(ne,me,X,R,Z,14,a[30]),R=d(R,ne,me,X,Xe,20,a[31]),X=u(X,R,ne,me,oe,4,a[32]),me=u(me,X,R,ne,ve,11,a[33]),ne=u(ne,me,X,R,Oe,16,a[34]),R=u(R,ne,me,X,be,23,a[35]),X=u(X,R,ne,me,L,4,a[36]),me=u(me,X,R,ne,Y,11,a[37]),ne=u(ne,me,X,R,Z,16,a[38]),R=u(R,ne,me,X,Ee,23,a[39]),X=u(X,R,ne,me,dt,4,a[40]),me=u(me,X,R,ne,A,11,a[41]),ne=u(ne,me,X,R,U,16,a[42]),R=u(R,ne,me,X,te,23,a[43]),X=u(X,R,ne,me,Pe,4,a[44]),me=u(me,X,R,ne,Xe,11,a[45]),ne=u(ne,me,X,R,we,16,a[46]),R=u(R,ne,me,X,O,23,a[47]),X=h(X,R,ne,me,A,6,a[48]),me=h(me,X,R,ne,Z,10,a[49]),ne=h(ne,me,X,R,be,15,a[50]),R=h(R,ne,me,X,oe,21,a[51]),X=h(X,R,ne,me,Xe,6,a[52]),me=h(me,X,R,ne,U,10,a[53]),ne=h(ne,me,X,R,Ee,15,a[54]),R=h(R,ne,me,X,L,21,a[55]),X=h(X,R,ne,me,ve,6,a[56]),me=h(me,X,R,ne,we,10,a[57]),ne=h(ne,me,X,R,te,15,a[58]),R=h(R,ne,me,X,dt,21,a[59]),X=h(X,R,ne,me,Y,6,a[60]),me=h(me,X,R,ne,Oe,10,a[61]),ne=h(ne,me,X,R,O,15,a[62]),R=h(R,ne,me,X,Pe,21,a[63]),E[0]=E[0]+X|0,E[1]=E[1]+R|0,E[2]=E[2]+ne|0,E[3]=E[3]+me|0},_doFinalize:function(){var f=this._data,m=f.words,g=this._nDataBytes*8,w=f.sigBytes*8;m[w>>>5]|=128<<24-w%32;var _=e.floor(g/4294967296),E=g;m[(w+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,m[(w+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,f.sigBytes=(m.length+1)*4,this._process();for(var A=this._hash,L=A.words,O=0;O<4;O++){var U=L[O];L[O]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}return A},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});function c(f,m,g,w,_,E,A){var L=f+(m&g|~m&w)+_+A;return(L<<E|L>>>32-E)+m}function d(f,m,g,w,_,E,A){var L=f+(m&w|g&~w)+_+A;return(L<<E|L>>>32-E)+m}function u(f,m,g,w,_,E,A){var L=f+(m^g^w)+_+A;return(L<<E|L>>>32-E)+m}function h(f,m,g,w,_,E,A){var L=f+(g^(m|~w))+_+A;return(L<<E|L>>>32-E)+m}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var aQ=Xi((d4,sQ)=>{(function(i,e){typeof d4=="object"?sQ.exports=d4=e(l4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(d4,function(i){return function(e){var t=i,r=t.lib,n=r.WordArray,o=r.Hasher,s=t.algo,a=[],l=[];(function(){function u(g){for(var w=e.sqrt(g),_=2;_<=w;_++)if(!(g%_))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var f=2,m=0;m<64;)u(f)&&(m<8&&(a[m]=h(e.pow(f,1/2))),l[m]=h(e.pow(f,1/3)),m++),f++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(u,h){for(var f=this._hash.words,m=f[0],g=f[1],w=f[2],_=f[3],E=f[4],A=f[5],L=f[6],O=f[7],U=0;U<64;U++){if(U<16)c[U]=u[h+U]|0;else{var Y=c[U-15],oe=(Y<<25|Y>>>7)^(Y<<14|Y>>>18)^Y>>>3,te=c[U-2],Z=(te<<15|te>>>17)^(te<<13|te>>>19)^te>>>10;c[U]=oe+c[U-7]+Z+c[U-16]}var ve=E&A^~E&L,Pe=m&g^m&w^g&w,Ee=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),Oe=(E<<26|E>>>6)^(E<<21|E>>>11)^(E<<7|E>>>25),Xe=O+Oe+ve+l[U]+c[U],dt=Ee+Pe;O=L,L=A,A=E,E=_+Xe|0,_=w,w=g,g=m,m=Xe+dt|0}f[0]=f[0]+m|0,f[1]=f[1]+g|0,f[2]=f[2]+w|0,f[3]=f[3]+_|0,f[4]=f[4]+E|0,f[5]=f[5]+A|0,f[6]=f[6]+L|0,f[7]=f[7]+O|0},_doFinalize:function(){var u=this._data,h=u.words,f=this._nDataBytes*8,m=u.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=e.floor(f/4294967296),h[(m+64>>>9<<4)+15]=f,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 cQ=Xi((u4,lQ)=>{(function(i,e){typeof u4=="object"?lQ.exports=u4=e(l4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(u4,function(i){return function(){var e=i,t=e.lib,r=t.WordArray,n=e.enc,o=n.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var u=[],h=0;h<c;h+=3)for(var f=l[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,w=f<<16|m<<8|g,_=0;_<4&&h+_*.75<c;_++)u.push(d.charAt(w>>>6*(3-_)&63));var E=d.charAt(64);if(E)for(;u.length%4;)u.push(E);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<c.length;u++)d[c.charCodeAt(u)]=u}var h=c.charAt(64);if(h){var f=a.indexOf(h);f!==-1&&(l=f)}return s(a,l,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(a,l,c){for(var d=[],u=0,h=0;h<l;h++)if(h%4){var f=c[a.charCodeAt(h-1)]<<h%4*2,m=c[a.charCodeAt(h)]>>>6-h%4*2,g=f|m;d[u>>>2]|=g<<24-u%4*8,u++}return r.create(d,u)}}(),i.enc.Base64})});var jQ=Xi(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0});k4.default=void 0;var Pi=(Ds(),Yh(As)),r_e=(X3(),Yh(pre));function n_e(i,e){return l_e(i)||a_e(i,e)||s_e(i,e)||o_e()}function o_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 s_e(i,e){if(i){if(typeof i=="string")return RQ(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 RQ(i,e)}}function RQ(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=i[t];return r}function a_e(i,e){var t=i==null?null:typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r=[],n=!0,o=!1,s,a;try{for(t=t.call(i);!(n=(s=t.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(l){o=!0,a=l}finally{try{!n&&t.return!=null&&t.return()}finally{if(o)throw a}}return r}}function l_e(i){if(Array.isArray(i))return i}function gN(i){"@babel/helpers - typeof";return gN=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},gN(i)}function zQ(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function PQ(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}function BQ(i,e,t){return e&&PQ(i.prototype,e),t&&PQ(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var c_e={Bottom:4},d_e={readOnly:65,cursorWidth:20,fontInfo:32},u_e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function h_e(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||u_e.test(i))}function S4(i,e){if(!(this instanceof S4))return new S4(i,e);this.line=i,this.ch=e}function f_e(i,e,t){i.dispatch(e,t)}function cv(i){return function(){}}var OQ,FQ;String.prototype.normalize?(OQ=function(e){return e.normalize("NFD").toLowerCase()},FQ=function(e){return e.normalize("NFD")}):(OQ=function(e){return e.toLowerCase()},FQ=function(e){return e});var HQ=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};HQ.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.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var r=t==e;else var r=t&&(e.test?e.test(t):e(t));if(r)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},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,r){if(typeof e=="string"){var n=function(l){return r?l.toLowerCase():l},o=this.string.substr(this.pos,e.length);if(n(o)==n(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 gs(i){return new S4(i.lineNumber-1,i.column-1)}function $r(i){return new Pi.Position(i.line+1,i.ch+1)}var p_e=function(){function i(e,t,r,n){zQ(this,i),this.cm=e,this.id=t,this.lineNumber=r+1,this.column=n+1,e.marks[this.id]=this}return BQ(i,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return gs(this)}}]),i}();function UQ(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=!0,r=Pi.KeyCode[i.keyCode];i.key&&(r=i.key,t=!1);var n=r,o=e;switch(i.keyCode){case Pi.KeyCode.Shift:case Pi.KeyCode.Meta:case Pi.KeyCode.Alt:case Pi.KeyCode.Ctrl:return n;case Pi.KeyCode.Escape:o=!0,n="Esc";break;case Pi.KeyCode.Space:o=!0;break}return r.startsWith("Key")||r.startsWith("KEY_")?n=r[r.length-1].toLowerCase():r.startsWith("Digit")?n=r.slice(5,6):r.startsWith("Numpad")?n=r.slice(6,7):r.endsWith("Arrow")?(o=!0,n=r.substring(0,r.length-5)):(r.startsWith("US_")||r.startsWith("Bracket")||!n)&&(n=i.browserEvent.key),!o&&!i.altKey&&!i.ctrlKey&&!i.metaKey?n=i.key||i.browserEvent.key:(i.altKey&&(n="Alt-".concat(n)),i.ctrlKey&&(n="Ctrl-".concat(n)),i.metaKey&&(n="Meta-".concat(n)),i.shiftKey&&(n="Shift-".concat(n))),n.length===1&&t&&(n="'".concat(n,"'")),n}var or=function(){function i(e){zQ(this,i),m_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 BQ(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,r){var n=!1,o=t,s=this.editor.getPosition(),a=new Pi.Range(s.lineNumber,s.column,s.lineNumber,s.column+1),l=!0;if(t.startsWith("'"))o=t[1];else if(o==="Enter")o=` +`)};let s=yield o.provideRenameEdits(this.model,this.position,e,n);if(s){if(s.rejectReason)return this._provideRenameEdits(e,t+1,r.concat(s.rejectReason),n)}else return this._provideRenameEdits(e,t+1,r.concat(b("no result","No result.")),n);return s})}};Th=q7=class{static get(e){return e.getContribution(q7.ID)}constructor(e,t,r,n,o,s,a,l){this.editor=e,this._instaService=t,this._notificationService=r,this._bulkEditService=n,this._progressService=o,this._logService=s,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new le,this._cts=new Fi,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(LS,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Eh(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new Fi,!this.editor.hasModel())return;let r=this.editor.getPosition(),n=new w1(this.editor.getModel(),r,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;let o=new pa(this.editor,5,void 0,this._cts.token),s;try{let m=n.resolveRenameLocation(o.token);this._progressService.showWhile(m,250),s=yield m}catch(m){(e=Vr.get(this.editor))===null||e===void 0||e.showMessage(m||b("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),r);return}finally{o.dispose()}if(!s)return;if(s.rejectReason){(t=Vr.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,r);return}if(o.token.isCancellationRequested)return;let a=new pa(this.editor,5,s.range,this._cts.token),l=this.editor.getSelection(),c=0,d=s.text.length;!B.isEmpty(l)&&!B.spansMultipleLines(l)&&B.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 f=Uc(n.provideRenameEdits(h.newName,a.token),a.token).then(m=>Eh(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(B.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:b("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,h.newName),code:"undoredo.rename",quotableLabel:b("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&sr(b("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(b("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(b("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{a.dispose()});return this._progressService.showWhile(f,250),f})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};Th.ID="editor.contrib.renameController";Th=q7=w1e([kh(1,Ke),kh(2,Mi),kh(3,Wc),kh(4,gl),kh(5,Fc),kh(6,uz),kh(7,Se)],Th);K7=class extends de{constructor(){super({id:"editor.action.rename",label:b("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:fe.and(F.writable,F.hasRenameProvider),kbOpts:{kbExpr:F.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){let r=e.get(si),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return yt.isUri(n)&&Ie.isIPosition(o)?r.openCodeEditor({resource:n},r.getActiveCodeEditor()).then(s=>{s&&(s.setPosition(o),s.invokeWithinContext(a=>(this.reportTelemetry(a,s),this.run(a,s))))},ft):super.runCommand(e,t)}run(e,t){let r=Th.get(t);return r?r.run():Promise.resolve()}};Ue(Th.ID,Th,4);ee(K7);$7=Oi.bindToContribution(Th.get);We(new $7({id:"acceptRenameInput",precondition:y1,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:3}}));We(new $7({id:"acceptRenameInputWithPreview",precondition:fe.and(y1,fe.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:fe.and(F.focus,fe.not("isComposing")),primary:1024+3}}));We(new $7({id:"cancelRenameInput",precondition:y1,handler:i=>i.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:F.focus,primary:9,secondary:[1033]}}));Kn("_executeDocumentRenameProvider",function(i,e,t,...r){let[n]=r;zt(typeof n=="string");let{renameProvider:o}=i.get(Se);return x1e(o,e,t,n)});Kn("_executePrepareRename",function(i,e,t){return Eh(this,void 0,void 0,function*(){let{renameProvider:r}=i.get(Se),o=yield new w1(e,t,r).resolveRenameLocation(st.None);if(o!=null&&o.rejectReason)throw new Error(o.rejectReason);return o})});Zr.as(of.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:b("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})});function C1e(i){for(let e=0,t=i.length;e<t;e+=4){let r=i[e+0],n=i[e+1],o=i[e+2],s=i[e+3];i[e+0]=s,i[e+1]=o,i[e+2]=n,i[e+3]=r}}function S1e(i){let e=new Uint8Array(i.buffer,i.byteOffset,i.length*4);return X9()||C1e(e),OP.wrap(e)}function Y7(i){let e=new Uint32Array(k1e(i)),t=0;if(e[t++]=i.id,i.type==="full")e[t++]=1,e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length;else{e[t++]=2,e[t++]=i.deltas.length;for(let r of i.deltas)e[t++]=r.start,e[t++]=r.deleteCount,r.data?(e[t++]=r.data.length,e.set(r.data,t),t+=r.data.length):e[t++]=0}return S1e(e)}function k1e(i){let e=0;if(e+=1+1,i.type==="full")e+=1+i.data.length;else{e+=1,e+=(1+1+1)*i.deltas.length;for(let t of i.deltas)t.data&&(e+=t.data.length)}return e}var zY=N(()=>{hre();En()});function x1(i){return i&&!!i.data}function Z7(i){return i&&Array.isArray(i.edits)}function J7(i,e){return i.has(e)}function E1e(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function eD(i,e,t,r,n){return qd(this,void 0,void 0,function*(){let o=E1e(i,e),s=yield Promise.all(o.map(a=>qd(this,void 0,void 0,function*(){let l,c=null;try{l=yield a.provideDocumentSemanticTokens(e,a===t?r:null,n)}catch(d){c=d,l=null}return(!l||!x1(l)&&!Z7(l))&&(l=null),new X7(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 T1e(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:null}function BY(i,e){return i.has(e)}function HY(i,e){let t=i.orderedGroups(e);return t.length>0?t[0]:[]}function AS(i,e,t,r){return qd(this,void 0,void 0,function*(){let n=HY(i,e),o=yield Promise.all(n.map(s=>qd(this,void 0,void 0,function*(){let a;try{a=yield s.provideDocumentRangeSemanticTokens(e,t,r)}catch(l){Yt(l),a=null}return(!a||!x1(a))&&(a=null),new Q7(s,a)})));for(let s of o)if(s.tokens)return s;return o.length>0?o[0]:null})}var qd,X7,Q7,tD=N(()=>{Si();Vt();Tr();Go();Wi();Fr();zY();et();Rt();qd=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};X7=class{constructor(e,t,r){this.provider=e,this.tokens=t,this.error=r}};Q7=class{constructor(e,t){this.provider=e,this.tokens=t}};At.registerCommand("_provideDocumentSemanticTokensLegend",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t]=e;zt(t instanceof yt);let r=i.get(Li).getModel(t);if(!r)return;let{documentSemanticTokensProvider:n}=i.get(Se),o=T1e(n,r);return o?o[0].getLegend():i.get(vi).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));At.registerCommand("_provideDocumentSemanticTokens",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t]=e;zt(t instanceof yt);let r=i.get(Li).getModel(t);if(!r)return;let{documentSemanticTokensProvider:n}=i.get(Se);if(!J7(n,r))return i.get(vi).executeCommand("_provideDocumentRangeSemanticTokens",t,r.getFullModelRange());let o=yield eD(n,r,null,null,st.None);if(!o)return;let{provider:s,tokens:a}=o;if(!a||!x1(a))return;let l=Y7({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));At.registerCommand("_provideDocumentRangeSemanticTokensLegend",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t,r]=e;zt(t instanceof yt);let n=i.get(Li).getModel(t);if(!n)return;let{documentRangeSemanticTokensProvider:o}=i.get(Se),s=HY(o,n);if(s.length===0)return;if(s.length===1)return s[0].getLegend();if(!r||!B.isIRange(r))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();let a=yield AS(o,n,B.lift(r),st.None);if(a)return a.provider.getLegend()}));At.registerCommand("_provideDocumentRangeSemanticTokens",(i,...e)=>qd(void 0,void 0,void 0,function*(){let[t,r]=e;zt(t instanceof yt),zt(B.isIRange(r));let n=i.get(Li).getModel(t);if(!n)return;let{documentRangeSemanticTokensProvider:o}=i.get(Se),s=yield AS(o,n,B.lift(r),st.None);if(!(!s||!s.tokens))return Y7({id:0,type:"full",data:s.tokens.data})}))});function S1(i,e,t){var r;let n=(r=t.getValue(C1,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))===null||r===void 0?void 0:r.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var C1,iD=N(()=>{C1="editor.semanticHighlighting"});var UY,Qa,Kd,rD,k1,nD,oD=N(()=>{ke();Vt();Go();Cr();Ut();Si();tn();hz();tD();Ls();ol();Rt();fz();B_();iD();UY=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Qa=function(i,e){return function(t,r){e(t,r,i)}},rD=class extends ce{constructor(e,t,r,n,o,s){super(),this._watchers=Object.create(null);let a=d=>{this._watchers[d.uri.toString()]=new k1(d,e,r,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()];S1(d,r,n)?u||a(d):u&&l(d,u)}};this._register(t.onModelAdded(d=>{S1(d,r,n)&&a(d)})),this._register(t.onModelRemoved(d=>{let u=this._watchers[d.uri.toString()];u&&l(d,u)})),this._register(n.onDidChangeConfiguration(d=>{d.affectsConfiguration(C1)&&c()})),this._register(r.onDidColorThemeChange(c))}dispose(){for(let e of Object.values(this._watchers))e.dispose();super.dispose()}};rD=UY([Qa(0,ag),Qa(1,Li),Qa(2,gr),Qa(3,Dt),Qa(4,ar),Qa(5,Se)],rD);k1=Kd=class extends ce{constructor(e,t,r,n,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:Kd.REQUEST_MIN_DELAY,max:Kd.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new di(()=>this._fetchDocumentSemanticTokensNow(),Kd.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=()=>{Ui(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(r.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),Ui(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!J7(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;let e=new Fi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,r=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=eD(this._provider,this._model,t,r,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;let o=[],s=this._model.onDidChangeContent(l=>{o.push(l)}),a=new pr(!1);n.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&&($o(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||ft(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,r,n,o){o=Math.min(o,r.length-n,e.length-t);for(let s=0;s<o;s++)r[n+s]=e[t+s]}_setDocumentSemanticTokens(e,t,r,n){let o=this._currentDocumentResponse,s=()=>{(n.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||!r){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),s();return}if(Z7(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 f=t.edits[h];if(f.start>l.length){r.warnInvalidEditStart(o.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}let m=d-(f.start+f.deleteCount);m>0&&(Kd._copy(l,d-m,c,u-m,m),u-=m),f.data&&(Kd._copy(f.data,0,c,u-f.data.length,f.data.length),u-=f.data.length),d=f.start}d>0&&Kd._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(x1(t)){this._currentDocumentResponse=new nD(e,t.resultId,t.data);let a=ty(t,r,this._model.getLanguageId());if(n.length>0)for(let l of n)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()}};k1.REQUEST_MIN_DELAY=300;k1.REQUEST_MAX_DELAY=2e3;k1=Kd=UY([Qa(1,ag),Qa(2,gr),Qa(3,ar),Qa(4,Se)],k1);nD=class{constructor(e,t,r){this.provider=e,this.resultId=t,this.data=r}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};Kc(rD)});var I1e,E1,T1,sD=N(()=>{Ut();ke();lt();tD();iD();hz();Cr();tn();Ls();ol();Rt();fz();I1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},E1=function(i,e){return function(t,r){e(t,r,i)}},T1=class extends ce{constructor(e,t,r,n,o,s){super(),this._semanticTokensStylingService=t,this._themeService=r,this._configurationService=n,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new di(()=>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(C1)&&(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,r=this._outstandingRequests.length;t<r;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;let e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!S1(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!BY(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}let t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(r=>this._requestRange(e,r)))}_requestRange(e,t){let r=e.getVersionId(),n=Zt(s=>Promise.resolve(AS(this._provider,e,t,s))),o=new pr(!1);return n.then(s=>{if(this._debounceInformation.update(e,o.elapsed()),!s||!s.tokens||e.isDisposed()||e.getVersionId()!==r)return;let{provider:a,tokens:l}=s,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,ty(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(n),()=>this._removeOutstandingRequest(n)),n}};T1.ID="editor.contrib.viewportSemanticTokens";T1=I1e([E1(1,ag),E1(2,gr),E1(3,Dt),E1(4,ar),E1(5,Se)],T1);Ue(T1.ID,T1,1)});var DS,jY=N(()=>{Di();et();DS=class{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){let r=[];for(let n of t){let o=[];r.push(o),this.selectSubwords&&this._addInWordRanges(o,e,n),this._addWordRanges(o,e,n),this._addWhitespaceLine(o,e,n),o.push({range:e.getFullModelRange()})}return r}_addInWordRanges(e,t,r){let n=t.getWordAtPosition(r);if(!n)return;let{word:o,startColumn:s}=n,a=r.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(z3(u)&&B3(d))break;d=u}for(l+=1;c<o.length;c++){let u=o.charCodeAt(c);if(B3(u)&&z3(d))break;if(u===95||u===45)break;d=u}l<c&&e.push({range:new B(r.lineNumber,s+l,r.lineNumber,s+c)})}_addWordRanges(e,t,r){let n=t.getWordAtPosition(r);n&&e.push({range:new B(r.lineNumber,n.startColumn,r.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,r){t.getLineLength(r.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(r.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(r.lineNumber)===0&&e.push({range:new B(r.lineNumber,1,r.lineNumber,t.getLineMaxColumn(r.lineNumber))})}}});function WY(i,e,t,r,n){return NS(this,void 0,void 0,function*(){let o=i.all(e).concat(new DS(r.selectSubwords));o.length===1&&o.unshift(new Ad);let s=[],a=[];for(let l of o)s.push(Promise.resolve(l.provideSelectionRanges(e,t,n)).then(c=>{if(qi(c)&&c.length===t.length)for(let d=0;d<t.length;d++){a[d]||(a[d]=[]);for(let u of c[d])B.isIRange(u.range)&&B.containsPosition(u.range,t[d])&&a[d].push(B.lift(u.range))}},Yt));return yield Promise.all(s),a.map(l=>{if(l.length===0)return[];l.sort((h,f)=>Ie.isBefore(h.getStartPosition(),f.getStartPosition())?1:Ie.isBefore(f.getStartPosition(),h.getStartPosition())||Ie.isBefore(h.getEndPosition(),f.getEndPosition())?-1:Ie.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);let c=[],d;for(let h of l)(!d||B.containsRange(h,d)&&!B.equalsRange(h,d))&&(c.push(h),d=h);if(!r.selectLeadingAndTrailingWhitespace)return c;let u=[c[0]];for(let h=1;h<c.length;h++){let f=c[h-1],m=c[h];if(m.startLineNumber!==f.startLineNumber||m.endLineNumber!==f.endLineNumber){let g=new B(f.startLineNumber,e.getLineFirstNonWhitespaceColumn(f.startLineNumber),f.endLineNumber,e.getLineLastNonWhitespaceColumn(f.endLineNumber));g.containsRange(f)&&!g.equalsRange(f)&&m.containsRange(g)&&!m.equalsRange(g)&&u.push(g);let w=new B(f.startLineNumber,1,f.endLineNumber,e.getLineMaxColumn(f.endLineNumber));w.containsRange(f)&&!w.equalsRange(g)&&m.containsRange(w)&&!m.equalsRange(w)&&u.push(w)}u.push(m)}return u})})}var L1e,A1e,NS,aD,lD,$p,MS,cD,dD,uD=N(()=>{pi();Si();Vt();lt();ci();et();Ir();ei();nA();jY();He();Zi();Wi();Rt();ta();Fr();Tr();L1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},A1e=function(i,e){return function(t,r){e(t,r,i)}},NS=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},lD=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 r=new i(t,this.ranges);return r.ranges[t].equalsRange(this.ranges[this.index])?r.mov(e):r}},$p=aD=class{static get(e){return e.getContribution(aD.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 NS(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=this._editor.getSelections(),r=this._editor.getModel();if(this._state||(yield WY(this._languageFeaturesService.selectionRangeProvider,r,t.map(o=>o.getPosition()),this._editor.getOption(111),st.None).then(o=>{var s;if(!(!qi(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Cs(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new lD(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 n=this._state.map(o=>Qe.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}};$p.ID="editor.contrib.smartSelectController";$p=aD=L1e([A1e(1,Se)],$p);MS=class extends de{constructor(e,t){super(t),this._forward=e}run(e,t){return NS(this,void 0,void 0,function*(){let r=$p.get(t);r&&(yield r.run(this._forward))})}},cD=class extends MS{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:b("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"1_basic",title:b({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}};At.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");dD=class extends MS{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:b("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:F.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Me.MenubarSelectionMenu,group:"1_basic",title:b({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}};Ue($p.ID,$p,4);ee(cD);ee(dD);At.registerCommand("_executeSelectionRangeProvider",function(i,...e){return NS(this,void 0,void 0,function*(){let[t,r]=e;zt(yt.isUri(t));let n=i.get(Se).selectionRangeProvider,o=yield i.get(xr).createModelReference(t);try{return WY(n,o.object.textEditorModel,r,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},st.None)}finally{o.dispose()}})})});var VY,qY=N(()=>{He();VY=Object.freeze({View:{value:b("view","View"),original:"View"},Help:{value:b("help","Help"),original:"Help"},Test:{value:b("test","Test"),original:"Test"},File:{value:b("file","File"),original:"File"},Preferences:{value:b("preferences","Preferences"),original:"Preferences"},Developer:{value:b({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer"),original:"Developer"}})});var KY=N(()=>{});var $Y=N(()=>{KY()});var D1e,I1,GY,YY,RS,hD,fD,XY=N(()=>{Bt();lk();ke();In();$Y();Zre();Tp();ci();FP();KF();$F();cb();rL();JI();D1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},I1=class{constructor(e,t,r,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=r,this.showEndForLine=n}},GY=yf("stickyScrollViewLayer",{createHTML:i=>i}),YY="data-sticky-line-index",RS=class extends ce{constructor(e){super(),this._editor=e,this._foldingIconStore=new le,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(65),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Uo),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);let t=()=>{this._linesDomNode.style.left=this._editor.getOption(113).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(113)&&t(),r.hasChanged(65)&&(this._lineHeight=this._editor.getOption(65))})),this._register(this._editor.onDidScrollChange(r=>{r.scrollLeftChanged&&t(),r.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(r=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getCurrentLines(){return this._lineNumbers}setState(e){if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;let r=[...e.startLineNumbers];e.showEndForLine!==null&&(r[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=r}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode()}_updateWidgetWidth(){let e=this._editor.getLayoutInfo(),r=this._editor.getOption(71).side==="left"?e.contentLeft-e.minimap.minimapCanvasOuterWidth:e.contentLeft;this._lineNumbersDomNode.style.width=`${r}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.minimap.minimapCanvasOuterWidth-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),Vn(this._lineNumbersDomNode),Vn(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(let t of this._stickyLines){let r=t.foldingIcon;r&&r.setVisible(e?!0:r.isCollapsed)}}_renderRootNode(){var e;return D1e(this,void 0,void 0,function*(){let t=yield(e=us.get(this._editor))===null||e===void 0?void 0:e.getFoldingModel(),r=this._editor.getLayoutInfo();for(let[s,a]of this._lineNumbers.entries()){let l=this._renderChildNode(s,a,r,t);this._linesDomNode.appendChild(l.lineDomNode),this._lineNumbersDomNode.appendChild(l.lineNumberDomNode),this._stickyLines.push(l)}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));let n=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(n===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${n}px`,this._linesDomNodeScrollable.style.height=`${n}px`,this._rootDomNode.style.height=`${n}px`,this._editor.getOption(71).side==="left"?this._rootDomNode.style.marginLeft=r.minimap.minimapCanvasOuterWidth+"px":this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(108)==="mouseover"&&(this._foldingIconStore.add(Lt(this._lineNumbersDomNode,gi.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(Lt(this._lineNumbersDomNode,gi.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,r,n){let o=this._editor._getViewModel(),s=o.coordinatesConverter.convertModelPositionToViewPosition(new Ie(t,1)).lineNumber,a=o.getViewLineRenderingData(s),l=this._editor.getOption(71).side,c=this._editor.getOption(66),d;try{d=ng.filter(a.inlineDecorations,s,a.minColumn,a.maxColumn)}catch(te){d=[]}let u=new q_(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,d,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),h=new Jv(2e3),f=K_(u,h),m;GY?m=GY.createHTML(h.build()):m=h.build();let g=document.createElement("span");g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=m;let w=document.createElement("span");w.className="sticky-line-number",w.style.lineHeight=`${this._lineHeight}px`;let _=l==="left"?r.contentLeft-r.minimap.minimapCanvasOuterWidth:r.contentLeft;w.style.width=`${_}px`;let E=document.createElement("span");c.renderType===1||c.renderType===3&&t%10===0?E.innerText=t.toString():c.renderType===2&&(E.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),E.className="sticky-line-number-inner",E.style.lineHeight=`${this._lineHeight}px`,E.style.width=`${r.lineNumbersWidth}px`,E.style.float="left",l==="left"?E.style.paddingLeft=`${r.lineNumbersLeft-r.minimap.minimapCanvasOuterWidth}px`:l==="right"&&(E.style.paddingLeft=`${r.lineNumbersLeft}px`),w.appendChild(E);let A=this._renderFoldingIconForLine(w,n,e,t);this._editor.applyFontInfo(g),this._editor.applyFontInfo(E),g.setAttribute("role","listitem"),g.setAttribute(YY,String(e)),g.tabIndex=0,w.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,w.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;let L=e===this._lineNumbers.length-1,O="0",U="1";g.style.zIndex=L?O:U,w.style.zIndex=L?O:U;let Y=`${e*this._lineHeight+this._lastLineRelativePosition+(A!=null&&A.isCollapsed?1:0)}px`,oe=`${e*this._lineHeight}px`;return g.style.top=L?Y:oe,w.style.top=L?Y:oe,new hD(t,g,w,A,f.characterMapping)}_renderFoldingIconForLine(e,t,r,n){let o=this._editor.getOption(108);if(!t||o==="never")return;let s=t.regions,a=s.findRange(n),l=s.getStartLineNumber(a);if(!(n===l))return;let d=s.isCollapsed(a),u=new fD(d,this._lineHeight);return e.append(u.domNode),u.setVisible(this._isOnGlyphMargin?!0:d||o==="always"),this._foldingIconStore.add(Lt(u.domNode,gi.CLICK,()=>{_2(t,Number.MAX_VALUE,[n]),u.isCollapsed=!d;let h=(d?this._editor.getTopForLineNumber(l):this._editor.getTopForLineNumber(s.getEndLineNumber(a)))-this._lineHeight*r+1;this._editor.setScrollTop(h)})),u}_updateMinContentWidth(){this._minContentWidthInPx=0;for(let e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._stickyLines.length&&this._stickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;let t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;let r=JF(t.characterMapping,e,0);return new Ie(t.lineNumber,r)}getLineNumberFromChildDomNode(e){var t,r;return(r=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&r!==void 0?r:null}_getRenderedStickyLineFromChildDomNode(e){let t=this.getStickyLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getStickyLineIndexFromChildDomNode(e){for(;e&&e!==this._rootDomNode;){let t=e.getAttribute(YY);if(t)return parseInt(t,10);e=e.parentElement}return null}},hD=class{constructor(e,t,r,n,o){this.lineNumber=e,this.lineDomNode=t,this.lineNumberDomNode=r,this.foldingIcon=n,this.characterMapping=o}},fD=class{constructor(e,t){this.isCollapsed=e,this.dimension=t,this.domNode=document.createElement("div"),this.domNode.style.width=`${t}px`,this.domNode.style.height=`${t}px`,this.domNode.className=_t.asClassName(e?sb:ob)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}});var M1e,pD,N1e,$d,Gp,L1,A1,Ih,mD,D1=N(()=>{pi();Si();Vt();Qh();lf();ci();et();Ls();Ht();dl();Go();ke();Rt();M1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},pD=function(i,e){return function(t,r){e(t,r,i)}},N1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},$d=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let r;typeof e=="string"?r=`${t.id}/${e}`:(r=`${t.id}/${e.name}`,t.children.get(r)!==void 0&&(r=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=r;for(let o=0;t.children.get(n)!==void 0;o++)n=`${r}_${o}`;return n}static empty(e){return e.children.size===0}},Gp=class extends $d{constructor(e,t,r){super(),this.id=e,this.parent=t,this.symbol=r,this.children=new Map}},L1=class extends $d{constructor(e,t,r,n){super(),this.id=e,this.parent=t,this.label=r,this.order=n,this.children=new Map}},A1=class i extends $d{static create(e,t,r){let n=new Fi(r),o=new i(t.uri),s=e.ordered(t),a=s.map((c,d)=>{var u;let h=$d.findId(`provider_${d}`,o),f=new L1(h,o,(u=c.displayName)!==null&&u!==void 0?u:"Unknown Outline Provider",d);return Promise.resolve(c.provideDocumentSymbols(t,n.token)).then(m=>{for(let g of m||[])i._makeOutlineElement(g,f);return f},m=>(Yt(m),f)).then(m=>{$d.empty(m)?m.remove():o._groups.set(h,m)})}),l=e.onDidChange(()=>{let c=e.ordered(t);Cs(c,s)||n.cancel()});return Promise.all(a).then(()=>n.token.isCancellationRequested&&!r.isCancellationRequested?i.create(e,t,r):o._compact()).finally(()=>{l.dispose()})}static _makeOutlineElement(e,t){let r=$d.findId(e,t),n=new Gp(r,t,e);if(e.children)for(let o of e.children)i._makeOutlineElement(o,n);t.children.set(n.id,n)}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,r]of this._groups)r.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=Sn.first(this._groups.values());for(let[,r]of t.children)r.parent=this,this.children.set(r.id,r)}return this}getTopLevelSymbols(){let e=[];for(let t of this.children.values())t instanceof Gp?e.push(t.symbol):e.push(...Sn.map(t.children.values(),r=>r.symbol));return e.sort((t,r)=>B.compareRangesUsingStarts(t.range,r.range))}asListOfDocumentSymbols(){let e=this.getTopLevelSymbols(),t=[];return i._flattenDocumentSymbols(t,e,""),t.sort((r,n)=>Ie.compare(B.getStartPosition(r.range),B.getStartPosition(n.range))||Ie.compare(B.getEndPosition(n.range),B.getEndPosition(r.range)))}static _flattenDocumentSymbols(e,t,r){for(let n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||r,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&i._flattenDocumentSymbols(e,n.children,n.name)}},Ih=Xr("IOutlineModelService"),mD=class{constructor(e,t,r){this._languageFeaturesService=e,this._disposables=new le,this._cache=new na(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(r.onModelRemoved(n=>{this._cache.delete(n.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return N1e(this,void 0,void 0,function*(){let r=this._languageFeaturesService.documentSymbolProvider,n=r.ordered(e),o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!Cs(o.provider,n)){let a=new Fi;o={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:a,promise:A1.create(r,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()}})}};mD=M1e([pD(0,Se),pD(1,ar),pD(2,Li)],mD);Jr(Ih,mD,1)});var pc,Lh,M1,gD=N(()=>{pc=class{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}},Lh=class{constructor(e,t,r){this.range=e,this.children=t,this.parent=r}},M1=class{constructor(e,t,r,n){this.uri=e,this.version=t,this.element=r,this.outlineProviderId=n}}});var zS,R1,QY,N1,Gd,PS,OS,bD,FS,vD,_D,ZY=N(()=>{ke();Rt();D1();Ut();cb();oL();tL();Br();Vt();gD();Qh();zS=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},R1=function(i,e){return function(t,r){e(t,r,i)}},QY=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(N1||(N1={}));(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(Gd||(Gd={}));PS=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=r,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Lo(300)),this._updateOperation=this._register(new le);let o=new bD(r),s=new _D(this._editor,r),a=new vD(this._editor,t);switch(n){case N1.OUTLINE_MODEL:this._modelProviders.push(o),this._modelProviders.push(s),this._modelProviders.push(a);break;case N1.FOLDING_PROVIDER_MODEL:this._modelProviders.push(s),this._modelProviders.push(a);break;case N1.INDENTATION_MODEL:this._modelProviders.push(a);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,r){return QY(this,void 0,void 0,function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>QY(this,void 0,void 0,function*(){for(let n of this._modelProviders){let{statusPromise:o,modelPromise:s}=n.computeStickyModel(e,t,r);this._modelPromise=s;let a=yield o;if(this._modelPromise!==s)return null;switch(a){case Gd.CANCELED:return this._updateOperation.clear(),null;case Gd.VALID:return n.stickyModel}}return null})).catch(n=>(ft(n),null))})}};PS=zS([R1(1,Pt),R1(2,Se)],PS);OS=class{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,Gd.INVALID}computeStickyModel(e,t,r){if(r.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};let n=Zt(o=>this.createModelFromProvider(e,t,o));return{statusPromise:n.then(o=>this.isModelValid(o)?r.isCancellationRequested?Gd.CANCELED:(this._stickyModel=this.createStickyModel(e,t,r,o),Gd.VALID):this._invalid()).then(void 0,o=>(ft(o),Gd.CANCELED)),modelPromise:n}}isModelValid(e){return!0}isProviderValid(e){return!0}},bD=class extends OS{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,r){return A1.create(this._languageFeaturesService.documentSymbolProvider,e,r)}createStickyModel(e,t,r,n){var o;let{stickyOutlineElement:s,providerID:a}=this._stickyModelFromOutlineModel(n,(o=this._stickyModel)===null||o===void 0?void 0:o.outlineProviderId);return new M1(e.uri,t,s,a)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let r;if(Sn.first(e.children.values())instanceof L1){let a=Sn.find(e.children.values(),l=>l.id===t);if(a)r=a.children;else{let l="",c=-1,d;for(let[u,h]of e.children.entries()){let f=this._findSumOfRangesOfGroup(h);f>c&&(d=h,c=f,l=h.id)}t=l,r=d.children}}else r=e.children;let n=[],o=Array.from(r.values()).sort((a,l)=>{let c=new pc(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),d=new pc(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,d)});for(let a of o)n.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new Lh(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){let r=[];for(let o of e.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==t)r.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(let s of o.children.values())r.push(this._stickyModelFromOutlineElement(s,o.symbol.selectionRange.startLineNumber));r.sort((o,s)=>this._comparator(o.range,s.range));let n=new pc(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new Lh(n,r,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 r of e.children.values())t+=this._findSumOfRangesOfGroup(r);return e instanceof Gp?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};bD=zS([R1(0,Se)],bD);FS=class extends OS{constructor(e){super(),this._foldingLimitReporter=new lb(e)}createStickyModel(e,t,r,n){let o=this._fromFoldingRegions(n);return new M1(e.uri,t,o,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){let t=e.length,r=[],n=new Lh(void 0,[],void 0);for(let o=0;o<t;o++){let s=e.getParentIndex(o),a;s!==-1?a=r[s]:a=n;let l=new Lh(new pc(e.getStartLineNumber(o),e.getEndLineNumber(o)+1),[],a);a.children.push(l),r.push(l)}return n}},vD=class extends FS{constructor(e,t){super(e),this._languageConfigurationService=t}createModelFromProvider(e,t,r){return new ih(e,this._languageConfigurationService,this._foldingLimitReporter).compute(r)}};vD=zS([R1(1,Pt)],vD);_D=class extends FS{constructor(e,t){super(e),this._languageFeaturesService=t}isProviderValid(e){return us.getFoldingRangeProviders(this._languageFeaturesService,e).length>0}createModelFromProvider(e,t,r){let n=us.getFoldingRangeProviders(this._languageFeaturesService,e);return new rh(e,n,()=>this.createModelFromProvider(e,t,r),this._foldingLimitReporter,void 0).compute(r)}};_D=zS([R1(1,Se)],_D)});var R1e,JY,eX,yD,BS,tX=N(()=>{ke();Rt();Si();Ut();pi();Jt();Br();ZY();R1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},JY=function(i,e){return function(t,r){e(t,r,i)}},eX=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},yD=class{constructor(e,t,r){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=r}},BS=class extends ce{constructor(e,t,r){super(),this._languageFeaturesService=t,this._languageConfigurationService=r,this._onDidChangeStickyScroll=this._register(new Je),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new le),this._updateSoon=this._register(new di(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(113)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(113),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new PS(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),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 eX(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new Fi,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return eX(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider){this._model=null;return}let t=this._editor.getModel(),r=t.getVersionId(),n=yield this._stickyModelProvider.update(t,r,e);e.isCancellationRequested||(this._model=n)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,r,n,o){if(t.children.length===0)return;let s=o,a=[];for(let d=0;d<t.children.length;d++){let u=t.children[d];u.range&&a.push(u.range.startLineNumber)}let l=this.updateIndex(hu(a,e.startLineNumber,(d,u)=>d-u)),c=this.updateIndex(hu(a,e.startLineNumber+n,(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,f=u.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==s&&(s=h,r.push(new yD(h,f-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,r,n+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,u,r,n,o)}}getCandidateStickyLinesIntersecting(e){var t,r;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);let o=(r=this._editor._getViewModel())===null||r===void 0?void 0:r.getHiddenAreas();if(o)for(let s of o)n=n.filter(a=>!(a.startLineNumber>=s.startLineNumber&&a.endLineNumber<=s.endLineNumber+1));return n}};BS=R1e([JY(1,Se),JY(2,Pt)],BS)});var P1e,Yp,iX,wD,ms,xD=N(()=>{ke();Rt();XY();tX();Ht();vl();Zi();wt();ei();Jb();et();kC();M8();ci();Si();Br();Ls();Bt();gD();Z9();P1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Yp=function(i,e){return function(t,r){e(t,r,i)}},iX=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},ms=wD=class extends ce{constructor(e,t,r,n,o,s,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=r,this._instaService=n,this._contextKeyService=a,this._sessionStore=new le,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._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new RS(this._editor),this._stickyLineCandidateProvider=new BS(this._editor,r,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new I1([],[],0),this._readConfiguration();let l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(d=>{(d.hasChanged(113)||d.hasChanged(71)||d.hasChanged(65)||d.hasChanged(108))&&this._readConfiguration()})),this._register(Lt(l,gi.CONTEXT_MENU,d=>iX(this,void 0,void 0,function*(){this._onContextMenu(d)}))),this._stickyScrollFocusedContextKey=F.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=F.stickyScrollVisible.bindTo(this._contextKeyService);let c=this._register(ys(l));this._register(c.onDidBlur(d=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(d=>{this.focus()})),this._registerMouseListeners(),this._register(Lt(l,gi.MOUSE_DOWN,d=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(wD.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}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new le,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){let e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(B.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){let e=this._register(new le),t=this._register(new Ya(this._editor,{extractLineNumberFromMouseEvent:o=>{let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);return s?s.lineNumber:0}})),r=o=>{if(!this._editor.hasModel()||o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return null;let s=o.target.element;if(!s||s.innerText!==s.innerHTML)return null;let a=this._stickyScrollWidget.getEditorPositionFromNode(s);return a?{range:new B(a.lineNumber,a.column,a.lineNumber,a.column+s.innerText.length),textElement:s}:null},n=this._stickyScrollWidget.getDomNode();this._register(ko(n,gi.CLICK,o=>{if(o.ctrlKey||o.altKey||o.metaKey||!o.leftButton)return;if(o.shiftKey){let a=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(o.target);if(a===null)return;let l=new Ie(this._endLineNumbers[a],1);this._revealLineInCenterIfOutsideViewport(l);return}let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target);if(!s){let a=this._stickyScrollWidget.getLineNumberFromChildDomNode(o.target);if(a===null)return;s=new Ie(a,1)}this._revealPosition(s)})),this._register(ko(n,gi.MOUSE_MOVE,o=>{if(o.shiftKey){let s=this._stickyScrollWidget.getStickyLineIndexFromChildDomNode(o.target);if(s===null||this._showEndForLine!==null&&this._showEndForLine===s)return;this._showEndForLine=s,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(Lt(n,gi.MOUSE_LEAVE,o=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([o,s])=>{let a=r(o);if(!a||!o.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}let{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;let d=new Fi;e.add(ii(()=>d.dispose(!0)));let u;fh(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new Ie(l.startLineNumber,l.startColumn+1),d.token).then(h=>{if(!d.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;let f=c;u!==f?(e.clear(),u=f,u.style.textDecoration="underline",e.add(ii(()=>{u.style.textDecoration="none"}))):u||(u=f,u.style.textDecoration="underline",e.add(ii(()=>{u.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(o=>iX(this,void 0,void 0,function*(){if(o.target.type!==12||o.target.detail!==this._stickyScrollWidget.getId())return;let s=this._stickyScrollWidget.getEditorPositionFromNode(o.target.element);s&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:s.lineNumber,column:1})),this._instaService.invokeFunction(aS,o,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e){let t=new Uv(e);this._contextMenuService.showContextMenu({menuId:Me.StickyScrollContext,getAnchor:()=>t})}_readConfiguration(){let e=this._editor.getOption(113);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(r=>{r.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(r=>this._onTokensChange(r))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(66).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(e){let t=this._stickyScrollWidget.getCurrentLines();for(let r of t)for(let n of e.ranges)if(r>=n.fromLineNumber&&r<=n.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll()}_onDidResize(){let t=this._editor.getLayoutInfo().height/this._editor.getOption(65);this._maxStickyLines=Math.round(t*.25)}_renderStickyScroll(){let e=this._editor.getModel();if(!e||e.isTooLargeForTokenization()){this._stickyScrollWidget.setState(void 0);return}let t=this._stickyLineCandidateProvider.getVersionId();if(t===void 0||t===e.getVersionId())if(this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{let r=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(r)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){let e=this._editor.getOption(65),t=Math.min(this._maxStickyLines,this._editor.getOption(113).maxLineCount),r=this._editor.getScrollTop(),n=0,o=[],s=[],a=this._editor.getVisibleRanges();if(a.length!==0){let l=new pc(a[0].startLineNumber,a[a.length-1].endLineNumber),c=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(let d of c){let u=d.startLineNumber,h=d.endLineNumber,f=d.nestingDepth;if(h-u>0){let m=(f-1)*e,g=f*e,w=this._editor.getBottomForLineNumber(u)-r,_=this._editor.getTopForLineNumber(h)-r,E=this._editor.getBottomForLineNumber(h)-r;if(m>_&&m<=E){o.push(u),s.push(h+1),n=E-g;break}else g>w&&g<=E&&(o.push(u),s.push(h+1));if(o.length===t)break}}}return this._endLineNumbers=s,new I1(o,s,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};ms.ID="store.contrib.stickyScrollController";ms=wD=P1e([Yp(1,ts),Yp(2,Se),Yp(3,Ke),Yp(4,Pt),Yp(5,ar),Yp(6,it)],ms)});var O1e,HS,KS,US,jS,WS,VS,qS,rX=N(()=>{lt();He();qY();Zi();Cr();wt();ei();xD();O1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},HS=class extends Qo{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:b("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:b({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:VY.View,toggled:{condition:fe.equals("config.editor.stickyScroll.enabled",!0),title:b("stickyScroll","Sticky Scroll"),mnemonicTitle:b({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:Me.CommandPalette},{id:Me.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Me.StickyScrollContext}]})}run(e){return O1e(this,void 0,void 0,function*(){let t=e.get(Dt),r=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",r)})}},KS=100,US=class extends ra{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:b("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:b({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:fe.and(fe.has("config.editor.stickyScroll.enabled"),F.stickyScrollVisible),menu:[{id:Me.CommandPalette}]})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.focus()}},jS=class extends ra{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:b("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:18}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.focusNext()}},WS=class extends ra{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:b("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:16}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.focusPrevious()}},VS=class extends ra{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:b("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:3}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.goToFocused()}},qS=class extends ra{constructor(){super({id:"editor.action.selectEditor",title:{value:b("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:F.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:KS,primary:9}})}runEditorCommand(e,t){var r;(r=ms.get(t))===null||r===void 0||r.selectEditor()}}});var CD=N(()=>{lt();rX();xD();Zi();Ue(ms.ID,ms,1);Ci(HS);Ci(US);Ci(WS);Ci(jS);Ci(VS);Ci(qS)});var TD,Dh,F1e,Ah,SD,kD,ED,$S,ID=N(()=>{Si();hl();Qh();ke();lt();Tn();et();Rt();sA();ch();iA();oA();Ym();Ht();TD=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Dh=function(i,e){return function(t,r){e(t,r,i)}},F1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},SD=class{constructor(e,t,r,n,o,s){this.range=e,this.insertText=t,this.filterText=r,this.additionalTextEdits=n,this.command=o,this.completion=s}},kD=class extends H9{constructor(e,t,r,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=r,this.completionModel=n,this._suggestMemoryService=s}canBeReused(e,t,r){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===r.startColumn&&this.word.endColumn<r.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var e;let t=[],{items:r}=this.completionModel,n=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},r),o=Sn.slice(r,n),s=Sn.slice(r,0,n),a=5;for(let l of Sn.concat(o,s)){if(l.score===ul.Default)continue;let c=new B(l.editStart.lineNumber,l.editStart.column,l.editInsertEnd.lineNumber,l.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),d=l.completion.insertTextRules&&l.completion.insertTextRules&4?{snippet:l.completion.insertText}:l.completion.insertText;t.push(new SD(c,d,(e=l.filterTextLow)!==null&&e!==void 0?e:l.labelLow,l.completion.additionalTextEdits,l.completion.command,l)),a-->=0&&l.resolve(st.None)}return t}};kD=TD([Dh(5,Sp)],kD);ED=class{constructor(e,t,r,n){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=r,this._suggestMemoryService=n}provideInlineCompletions(e,t,r,n){var o;return F1e(this,void 0,void 0,function*(){if(r.selectedSuggestionInfo)return;let s=this._getEditorOption(87,e);if(Ka.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(Ka.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 B(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(!((o=this._lastResult)===null||o===void 0)&&o.canBeReused(e,t.lineNumber,c))){let f=new Db(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),u=this._lastResult}else{let f=yield vb(this._languageFeatureService.completionProvider,e,t,new tc(void 0,void 0,d==null?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},n),m;f.needsClipboard&&(m=yield this._clipboardService.readText());let g=new Ep(f.items,t.column,new Db(h,0),Dd.None,this._getEditorOption(116,e),this._getEditorOption(110,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);u=new kD(e,t.lineNumber,c,g,f,this._suggestMemoryService)}return this._lastResult=u,u})}handleItemDidShow(e,t){t.completion.resolve(st.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var r;let n=e.getValueInRange(B.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(let s of this._languageFeatureService.completionProvider.all(e))!((r=s.triggerCharacters)===null||r===void 0)&&r.includes(n)&&o.add(s);if(o.size!==0)return{providers:o,ch:n}}};ED=TD([Dh(1,Se),Dh(2,Ts),Dh(3,Sp)],ED);$S=Ah=class{constructor(e,t,r,n){if(++Ah._counter===1){let o=n.createInstance(ED,(s,a)=>{var l;return((l=r.listCodeEditors().find(d=>d.getModel()===a))!==null&&l!==void 0?l:e).getOption(s)});Ah._disposable=t.inlineCompletionsProvider.register("*",o)}}dispose(){var e;--Ah._counter===0&&((e=Ah._disposable)===null||e===void 0||e.dispose(),Ah._disposable=void 0)}};$S._counter=0;$S=Ah=TD([Dh(1,Se),Dh(2,si),Dh(3,Ke)],$S);Ue("suggest.inlineCompletionsProvider",$S,0)});var nX=N(()=>{});var oX=N(()=>{nX()});var sX=N(()=>{});var aX=N(()=>{sX()});var lX=N(()=>{});var cX=N(()=>{lX()});var z1e,B1e,GS,dX=N(()=>{Bt();Are();Q9();nF();Jt();ke();es();cX();z1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},B1e=function(i,e){return function(t,r){e(t,r,i)}},GS=class extends ce{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,r={},n){var o;super(),this._link=t,this._enabled=!0,this.el=Te(e,Le("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 Hv(u)).filter(u=>u.keyCode===3).event,c=this._register(new __(this.el,rF.Tap)).event;this._register(k_.addTarget(this.el));let d=li.any(s.event,l,c);this._register(d(u=>{this.enabled&&(au.stop(u,!0),r!=null&&r.opener?r.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};GS=z1e([B1e(3,er)],GS)});var uX,hX,H1e,YS,LD,fX=N(()=>{aX();Bt();tg();Rc();ke();xd();Ht();dX();xl();In();uX=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},hX=function(i,e){return function(t,r){e(t,r,i)}},H1e=26,YS=class extends ce{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(LD))}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,H1e)}};YS=uX([hX(1,Ke)],YS);LD=class extends ce{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(eo,{}),this.element=Le("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=Le("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Vn(this.element)}show(e){Vn(this.element);let t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);let r=Te(this.element,Le("div.icon-container"));r.setAttribute("aria-hidden","true"),e.icon&&r.appendChild(Le(`div${_t.asCSSSelector(e.icon)}`));let n=Te(this.element,Le("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=Te(this.element,Le("div.message-actions-container")),e.actions)for(let s of e.actions)this._register(this.instantiationService.createInstance(GS,this.messageActionsContainer,Object.assign(Object.assign({},s),{tabIndex:-1}),{}));let o=Te(this.element,Le("div.action-container"));this.actionBar=this._register(new Is(o)),this.actionBar.push(this._register(new Yo("banner.close","Close Banner",_t.asClassName(U_),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};LD=uX([hX(0,Ke)],LD)});function j1e(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 RD(i){return`U+${i.toString(16).padStart(4,"0")}`}function AD(i){let e=`\`${RD(i)}\``;return H3.isInvisibleCharacter(i)||(e+=` "${`${W1e(i)}`}"`),e}function W1e(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function pX(i,e){return Mk.computeUnicodeHighlightReason(i,e)}function V1e(i,e){return Kr(this,void 0,void 0,function*(){let t=i.getValue(fa.allowedCharacters),r;typeof t=="object"&&t?r=t:r={};for(let n of e)r[String.fromCodePoint(n)]=!0;yield i.updateValue(fa.allowedCharacters,r,2)})}function q1e(i,e){var t;return Kr(this,void 0,void 0,function*(){let r=(t=i.inspect(fa.allowedLocales).user)===null||t===void 0?void 0:t.value,n;typeof r=="object"&&r?n=Object.assign({},r):n={};for(let o of e)n[o]=!0;yield i.updateValue(fa.allowedLocales,n,2)})}function K1e(i){throw new Error(`Unexpected value: ${i}`)}var FD,Xp,Kr,U1e,Qp,DD,MD,ND,Zp,PD,OD,Yd,Jp,em,P1,zD=N(()=>{Ut();Qr();Ss();ke();En();Di();oX();lt();Qm();Hr();one();j_();Zo();Jre();ec();YC();fX();He();Cr();Ht();es();_l();xl();sne();FD=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Xp=function(i,e){return function(t,r){e(t,r,i)}},Kr=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},U1e=Ni("extensions-warning-message",pt.warning,b("warningIcon","Icon shown with a warning message in the extensions editor.")),Qp=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=r,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:b("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new em};else if(o.ambiguousCharacterCount>=s)a={message:b("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new Yd};else if(o.invisibleCharacterCount>=s)a={message:b("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new Jp};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:U1e,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(YS,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(123),this._register(r.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(123)&&(this._options=e.getOption(123),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=j1e(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(r=>r===!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(r=>r.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(r=>r==="_os"?new Intl.NumberFormat().resolvedOptions().locale:r==="_vscode"?Y9:r)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new DD(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new MD(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};Qp.ID="editor.contrib.unicodeHighlighter";Qp=FD([Xp(1,Cl),Xp(2,pz),Xp(3,Ke)],Qp);DD=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._options=t,this._updateState=r,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new di(()=>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 r=[];if(!t.hasMore)for(let n of t.ranges)r.push({range:n,options:Zp.instance.getDecorationFromOptions(this._options)});this._decorations.set(r)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel();if(!Sk(t,e))return null;let r=t.getValueInRange(e.range);return{reason:pX(r,this._options),inComment:kk(t,e),inString:Ek(t,e)}}};DD=FD([Xp(3,Cl)],DD);MD=class extends ce{constructor(e,t,r){super(),this._editor=e,this._options=t,this._updateState=r,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new di(()=>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=[],r={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(let n of e){let o=Mk.computeUnicodeHighlights(this._model,this._options,n);for(let s of o.ranges)r.ranges.push(s);r.ambiguousCharacterCount+=r.ambiguousCharacterCount,r.invisibleCharacterCount+=r.invisibleCharacterCount,r.nonBasicAsciiCharacterCount+=r.nonBasicAsciiCharacterCount,r.hasMore=r.hasMore||o.hasMore}if(!r.hasMore)for(let n of r.ranges)t.push({range:n,options:Zp.instance.getDecorationFromOptions(this._options)});this._updateState(r),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;let t=this._editor.getModel(),r=t.getValueInRange(e.range);return Sk(t,e)?{reason:pX(r,this._options),inComment:kk(t,e),inString:Ek(t,e)}:null}},ND=class{constructor(e,t,r){this._editor=e,this._languageService=t,this._openerService=r,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];let r=this._editor.getModel(),n=this._editor.getContribution(Qp.ID);if(!n)return[];let o=[],s=new Set,a=300;for(let l of t){let c=n.getDecorationInfo(l);if(!c)continue;let u=r.getValueInRange(l.range).codePointAt(0),h=AD(u),f;switch(c.reason.kind){case 0:{Vv(c.reason.confusableWith)?f=b("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,AD(c.reason.confusableWith.codePointAt(0))):f=b("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,AD(c.reason.confusableWith.codePointAt(0)));break}case 1:f=b("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=b("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(s.has(f))continue;s.add(f);let m={codePoint:u,reason:c.reason,inComment:c.inComment,inString:c.inString},g=b("unicodeHighlight.adjustSettings","Adjust settings"),w=`command:${P1.ID}?${encodeURIComponent(JSON.stringify(m))}`,_=new Ki("",!0).appendMarkdown(f).appendText(" ").appendLink(w,g);o.push(new io(this,l.range,[_],!1,a++))}return o}renderHoverParts(e,t){return c8(e,t,this._editor,this._languageService,this._openerService)}};ND=FD([Xp(1,Ji),Xp(2,er)],ND);Zp=class{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){let r=`${e}${t}`,n=this.map.get(r);return n||(n=mt.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(r,n)),n}};Zp.instance=new Zp;PD=class extends de{constructor(){super({id:Yd.ID,label:b("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.includeComments,!1,2)})}},OD=class extends de{constructor(){super({id:Yd.ID,label:b("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.includeStrings,!1,2)})}},Yd=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.ambiguousCharacters,!1,2)})}};Yd.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";Jp=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.invisibleCharacters,!1,2)})}};Jp.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";em=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=b("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,r){return Kr(this,void 0,void 0,function*(){let n=e==null?void 0:e.get(Dt);n&&this.runAction(n)})}runAction(e){return Kr(this,void 0,void 0,function*(){yield e.updateValue(fa.nonBasicASCII,!1,2)})}};em.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";P1=class i extends de{constructor(){super({id:i.ID,label:b("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,r){return Kr(this,void 0,void 0,function*(){let{codePoint:n,reason:o,inString:s,inComment:a}=r,l=String.fromCodePoint(n),c=e.get(rn),d=e.get(Dt);function u(m){return H3.isInvisibleCharacter(m)?b("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",RD(m)):b("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${RD(m)} "${l}"`)}let h=[];if(o.kind===0)for(let m of o.notAmbiguousInLocales)h.push({label:b("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>Kr(this,void 0,void 0,function*(){q1e(d,[m])})});if(h.push({label:u(n),run:()=>V1e(d,[n])}),a){let m=new PD;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(s){let m=new OD;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}if(o.kind===0){let m=new Yd;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===1){let m=new Jp;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else if(o.kind===2){let m=new em;h.push({label:m.label,run:()=>Kr(this,void 0,void 0,function*(){return m.runAction(d)})})}else K1e(o);let f=yield c.pick(h,{title:b("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});f&&(yield f.run())})}};P1.ID="editor.action.unicodeHighlight.showExcludeOptions";ee(Yd);ee(Jp);ee(em);ee(P1);Ue(Qp.ID,Qp,1);Bo.register(ND)});function Y1e(i,e,t){i.setModelProperty(e.uri,gX,t)}function X1e(i,e){return i.getModelProperty(e.uri,gX)}var $1e,mX,G1e,gX,O1,BD=N(()=>{ke();Io();lt();Tn();He();Nk();$1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},mX=function(i,e){return function(t,r){e(t,r,i)}},G1e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},gX="ignoreUnusualLineTerminators";O1=class extends ce{constructor(e,t,r){super(),this._editor=e,this._dialogService=t,this._codeEditorService=r,this._isPresentingDialog=!1,this._config=this._editor.getOption(124),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(124)&&(this._config=this._editor.getOption(124),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return G1e(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;let e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||X1e(this._codeEditorService,e)===!0||this._editor.getOption(89))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let r;try{this._isPresentingDialog=!0,r=yield this._dialogService.confirm({title:b("unusualLineTerminators.title","Unusual Line Terminators"),message:b("unusualLineTerminators.message","Detected unusual line terminators"),detail:b("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`.",An(e.uri)),primaryButton:b({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:b("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!r.confirmed){Y1e(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};O1.ID="editor.contrib.unusualLineTerminatorsDetector";O1=$1e([mX(1,Sf),mX(2,si)],O1);Ue(O1.ID,O1,1)});function vX(i,e,t,r){let n=i.ordered(e);return l_(n.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,r)).then(void 0,Yt)),qi)}function Z1e(i,e,t,r){return i.has(e)?new UD(e,t,r,i):new jD(e,t,r)}var Q1e,bX,HD,ZS,XS,UD,jD,WD,Mh,QS,VD,qD,KD,$D=N(()=>{Eo();pi();Ut();Si();Vt();ke();lt();et();ei();hn();He();wt();Rt();_7();Qh();Q1e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},bX=function(i,e){return function(t,r){e(t,r,i)}},ZS=new ht("hasWordHighlights",!1);XS=class{constructor(e,t,r){this._model=e,this._selection=t,this._wordSeparators=r,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Zt(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){let r=e.getWordAtPosition(t.getPosition());return r?new B(t.startLineNumber,r.startColumn,t.startLineNumber,r.endColumn):null}isValid(e,t,r){let n=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=r.length;!l&&c<d;c++){let u=r.getRange(c);u&&u.startLineNumber===n&&u.startColumn<=o&&u.endColumn>=s&&(l=!0)}return l}cancel(){this.result.cancel()}},UD=class extends XS{constructor(e,t,r,n){super(e,t,r),this._providers=n}_compute(e,t,r,n){return vX(this._providers,e,t.getPosition(),n).then(o=>o||[])}},jD=class extends XS{constructor(e,t,r){super(e,t,r),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,r,n){return df(250,n).then(()=>{if(!t.isEmpty())return[];let o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,r,!1).map(a=>({range:a.range,kind:Gm.Text}))})}isValid(e,t,r){let n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,r)}};Kn("_executeDocumentHighlights",(i,e,t)=>{let r=i.get(Se);return vX(r.documentHighlightProvider,e,t,st.None)});WD=class{constructor(e,t,r,n){this.toUnhook=new le,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=r,this._hasWordHighlights=ZS.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(79),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(o=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(o)})),this.toUnhook.add(e.onDidChangeModelContent(o=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(o=>{let s=this.editor.getOption(79);this.occurrencesHighlight!==s&&(this.occurrencesHighlight=s,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(B.compareRangesUsingStarts)}moveNext(){let e=this._getSortedHighlights(),r=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[r];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(n.startLineNumber);sr(`${s}, ${r+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),r=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[r];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);let o=this._getWord();if(o){let s=this.editor.getModel().getLineContent(n.startLineNumber);sr(`${s}, ${r+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,r=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:r})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,r=e.endColumn,n=this._getWord();if(!n||n.startColumn>t||n.endColumn<r){this._stopAll();return}let o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let s=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=Z1e(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(128)),this.workerRequest.result.then(a=>{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},ft)}}_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:kY(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(let t of this.linkedHighlighters())(t==null?void 0:t.editor.getModel())===this.editor.getModel()&&(t._stopAll(),t.decorations.set(e),t._hasWordHighlights.set(t.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}},Mh=HD=class extends ce{static get(e){return e.getContribution(HD.ID)}constructor(e,t,r){super(),this.wordHighlighter=null,this.linkedContributions=new Set;let n=()=>{e.hasModel()&&(this.wordHighlighter=new WD(e,r.documentHighlightProvider,()=>Sn.map(this.linkedContributions,o=>o.wordHighlighter),t))};this._register(e.onDidChangeModel(o=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),n()})),n()}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()}};Mh.ID="editor.contrib.wordHighlighter";Mh=HD=Q1e([bX(1,it),bX(2,Se)],Mh);QS=class extends de{constructor(e,t){super(t),this._isNext=e}run(e,t){let r=Mh.get(t);r&&(this._isNext?r.moveNext():r.moveBack())}},VD=class extends QS{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:b("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:ZS,kbOpts:{kbExpr:F.editorTextFocus,primary:65,weight:100}})}},qD=class extends QS{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:b("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:ZS,kbOpts:{kbExpr:F.editorTextFocus,primary:1089,weight:100}})}},KD=class extends de{constructor(){super({id:"editor.action.wordHighlight.trigger",label:b("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:ZS.toNegated(),kbOpts:{kbExpr:F.editorTextFocus,primary:0,weight:100}})}run(e,t,r){let n=Mh.get(t);n&&n.restoreViewState(!0)}};Ue(Mh.ID,Mh,0);ee(VD);ee(qD);ee(KD)});var Nh,Za,Ja,GD,YD,XD,QD,ZD,JD,eM,tM,iM,rM,nM,oM,sM,aM,lM,cM,Rh,F1,z1,dM,uM,hM,fM,pM,mM,gM,JS=N(()=>{lt();Yv();Qm();lre();EP();dre();ci();et();Ir();ei();Br();He();$_();wt();az();Nh=class extends Oi{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,r){if(!t.hasModel())return;let n=zc(t.getOption(128)),o=t.getModel(),a=t.getSelections().map(l=>{let c=new Ie(l.positionLineNumber,l.positionColumn),d=this._move(n,o,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>SP.fromModelSelection(l))),a.length===1){let l=new Ie(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,r){return r?new Qe(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Qe(t.lineNumber,t.column,t.lineNumber,t.column)}},Za=class extends Nh{_move(e,t,r,n){return nf.moveWordLeft(e,t,r,n)}},Ja=class extends Nh{_move(e,t,r,n){return nf.moveWordRight(e,t,r,n)}},GD=class extends Za{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},YD=class extends Za{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},XD=class extends Za{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}},QD=class extends Za{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},ZD=class extends Za{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},JD=class extends Za{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}},eM=class extends Za{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},tM=class extends Za{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},iM=class extends Ja{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},rM=class extends Ja{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}},nM=class extends Ja{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},oM=class extends Ja{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},sM=class extends Ja{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:fe.and(F.textInputFocus,(e=fe.and(og,sg))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}},aM=class extends Ja{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},lM=class extends Ja{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},cM=class extends Ja{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,r,n){return super._move(zc(Xm.wordSeparators.defaultValue),t,r,n)}},Rh=class extends Oi{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,r){let n=e.get(Pt);if(!t.hasModel())return;let o=zc(t.getOption(128)),s=t.getModel(),a=t.getSelections(),l=t.getOption(6),c=t.getOption(10),d=n.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),h=a.map(f=>{let m=this._delete({wordSeparators:o,model:s,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(8),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:d,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new cl(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}},F1=class extends Rh{_delete(e,t){let r=nf.deleteWordLeft(e,t);return r||new B(1,1,1,1)}},z1=class extends Rh{_delete(e,t){let r=nf.deleteWordRight(e,t);if(r)return r;let n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new B(n,o,n,o)}},dM=class extends F1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:F.writable})}},uM=class extends F1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:F.writable})}},hM=class extends F1{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},fM=class extends z1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:F.writable})}},pM=class extends z1{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:F.writable})}},mM=class extends z1{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},gM=class extends de{constructor(){super({id:"deleteInsideWord",precondition:F.writable,label:b("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,r){if(!t.hasModel())return;let n=zc(t.getOption(128)),o=t.getModel(),a=t.getSelections().map(l=>{let c=nf.deleteInsideWord(n,o,l);return new cl(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}};We(new GD);We(new YD);We(new XD);We(new QD);We(new ZD);We(new JD);We(new iM);We(new rM);We(new nM);We(new oM);We(new sM);We(new aM);We(new eM);We(new tM);We(new lM);We(new cM);We(new dM);We(new uM);We(new hM);We(new fM);We(new pM);We(new mM);ee(gM)});var bM,vM,e4,_M,yM,t4,wM,xM,CM=N(()=>{lt();EP();et();ei();JS();Wi();bM=class extends Rh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let r=Nm.deleteWordPartLeft(e);return r||new B(1,1,1,1)}},vM=class extends Rh{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:F.writable,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let r=Nm.deleteWordPartRight(e);if(r)return r;let n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new B(n,o,n,o)}},e4=class extends Nh{_move(e,t,r,n){return Nm.moveWordPartLeft(e,t,r)}},_M=class extends e4{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};At.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");yM=class extends e4{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};At.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");t4=class extends Nh{_move(e,t,r,n){return Nm.moveWordPartRight(e,t,r)}},wM=class extends t4{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},xM=class extends t4{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:F.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};We(new bM);We(new vM);We(new _M);We(new yM);We(new wM);We(new xM)});var B1,SM=N(()=>{Ss();ke();lt();L0();He();B1=class extends ce{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){let e=Vr.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(90);t||(this.editor.isSimpleWidget?t=new Ki(b("editor.simple.readonly","Cannot edit in read-only input")):t=new Ki(b("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};B1.ID="editor.contrib.readOnlyMessageController";Ue(B1.ID,B1,2)});var _X=N(()=>{});var yX=N(()=>{_X()});var TM=Xi(H1=>{yX();Bt();aa();ke();lt();hn();wre();Tre();Zo();mz();yu();var J1e=H1&&H1.__decorate||function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},wX=H1&&H1.__param||function(i,e){return function(t,r){e(t,r,i)}},kM,tm=kM=class extends ce{static get(e){return e.getContribution(kM.ID)}constructor(e,t,r){super(),this._editor=e,this._languageService=r,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(bf.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new i4(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};tm.ID="editor.contrib.inspectTokens";tm=kM=J1e([wX(1,iy),wX(2,Ji)],tm);var EM=class extends de{constructor(){super({id:"editor.action.inspectTokens",label:gz.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let r=tm.get(t);r==null||r.launch()}};function eve(i){let e="";for(let t=0,r=i.length;t<r;t++){let n=i.charCodeAt(t);switch(n){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(n)}}return e}function tve(i,e){let t=bf.get(e);if(t)return t;let r=i.encodeLanguageId(e);return{getInitialState:()=>qO,tokenize:(n,o,s)=>KO(e,s),tokenizeEncoded:(n,o,s)=>$O(r,s)}}var i4=class i extends ce{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=tve(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(r=>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),r=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){r=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(r<t.tokens1.length){let l=t.tokens1[r].offset,c=r+1<t.tokens1.length?t.tokens1[r+1].offset:o.length;s=o.substring(l,c)}lu(this._domNode,Le("h2.tm-token",void 0,eve(s),Le("span.tm-token-length",void 0,`${s.length} ${s.length===1?"char":"chars"}`))),Te(this._domNode,Le("hr.tokens-inspect-separator",{style:"clear:both"}));let a=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;Te(this._domNode,Le("table.tm-metadata-table",void 0,Le("tbody",void 0,Le("tr",void 0,Le("td.tm-metadata-key",void 0,"language"),Le("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"token type"),Le("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"font style"),Le("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"foreground"),Le("td.tm-metadata-value",void 0,`${a?vt.Format.CSS.formatHex(a.foreground):"-?-"}`)),Le("tr",void 0,Le("td.tm-metadata-key",void 0,"background"),Le("td.tm-metadata-value",void 0,`${a?vt.Format.CSS.formatHex(a.background):"-?-"}`))))),Te(this._domNode,Le("hr.tokens-inspect-separator")),r<t.tokens1.length&&Te(this._domNode,Le("span.tm-token-type",void 0,t.tokens1[r].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=bf.getColorMap(),r=ff.getLanguageId(e),n=ff.getTokenType(e),o=ff.getFontStyle(e),s=ff.getForeground(e),a=ff.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(r),tokenType:n,fontStyle:o,foreground:t[s],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),r=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),n=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:r.tokens,tokens2:n.tokens,endState:r.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let r=1;r<e;r++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(r),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};i4._ID="editor.contrib.inspectTokensWidget";Ue(tm.ID,tm,4);ee(EM)});var ive,xX,U1,j1,CX=N(()=>{He();ll();ke();Ur();lg();_l();ive=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},xX=function(i,e){return function(t,r){e(t,r,i)}},j1=U1=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Zr.as(ya.Quickaccess)}provide(e){let t=new le;return t.add(e.onDidAccept(()=>{let[r]=e.selectedItems;r&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(r=>{let n=this.registry.getQuickAccessProvider(r.substr(U1.PREFIX.length));n&&n.prefix&&n.prefix!==U1.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(r=>r.prefix!==U1.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,r)=>t.prefix.localeCompare(r.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{let r=t.prefix||e.prefix,n=r||"\u2026";return{prefix:r,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:b("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}})}};j1.PREFIX="?";j1=U1=ive([xX(0,rn),xX(1,qt)],j1)});var IM=N(()=>{ll();lg();yu();CX();Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:j1,prefix:"",helpEntries:[{description:bz.helpQuickAccessActionLabel}]})});var im,LM=N(()=>{B9();ke();vk();jc();FO();tn();Eo();im=class{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var r;let n=new le;e.canAcceptInBackground=!!(!((r=this.options)===null||r===void 0)&&r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o=n.add(new ji);return o.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange(()=>{o.value=void 0,o.value=this.doProvide(e,t)})),n}doProvide(e,t){var r;let n=new le,o=this.activeTextEditorControl;if(o&&this.canProvideWithTextEditor(o)){let s={editor:o},a=W_(o);if(a){let l=(r=o.saveViewState())!==null&&r!==void 0?r:void 0;n.add(a.onDidChangeCursorPosition(()=>{var c;l=(c=o.saveViewState())!==null&&c!==void 0?c:void 0})),s.restoreViewState=()=>{l&&o===this.activeTextEditorControl&&o.restoreViewState(l)},n.add(Nv(t.onCancellationRequested)(()=>{var c;return(c=s.restoreViewState)===null||c===void 0?void 0:c.call(s)}))}n.add(ii(()=>this.clearDecorations(o))),n.add(this.provideWithTextEditor(s,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 r=e.getModel();r&&"getLineContent"in r&&cu(`${r.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return PF(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(r=>{let n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.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:ki(b_),position:$n.Full}}}],[s,a]=r.deltaDecorations(n,o);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:a}})}clearDecorations(e){let t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(r=>{r.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}});var W1,SX=N(()=>{ke();vk();LM();He();W1=class i extends im{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){let t=b("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ce.None}provideWithTextEditor(e,t,r){let n=e.editor,o=new le;o.add(t.onDidAccept(l=>{let[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(n,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(n,t.value.trim().substr(i.PREFIX.length)),c=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}let d=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(d,0),this.addDecorations(n,d)};s(),o.add(t.onDidChangeValue(()=>s()));let a=W_(n);return a&&a.getOptions().get(66).renderType===2&&(a.updateOptions({lineNumbers:"on"}),o.add(ii(()=>a.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){let r=t.split(/,|:|#/).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)),n=this.lineCount(e)+1;return{lineNumber:r[0]>0?r[0]:n+r[0],column:r[1]}}getPickLabel(e,t,r){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,r)?b("gotoLineColumnLabel","Go to line {0} and character {1}.",t,r):b("gotoLineLabel","Go to line {0}.",t);let n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?b("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):b("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,r){if(!r||typeof r!="number")return!1;let n=this.getModel(e);if(!n)return!1;let o={lineNumber:t,column:r};return n.validatePosition(o).equals(o)}lineCount(e){var t,r;return(r=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&r!==void 0?r:0}};W1.PREFIX=":"});var rve,nve,V1,q1,AM=N(()=>{SX();ll();lg();Tn();yu();Jt();lt();ei();_l();rve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},nve=function(i,e){return function(t,r){e(t,r,i)}},V1=class extends W1{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};V1=rve([nve(0,si)],V1);q1=class i extends de{constructor(){super({id:i.ID,label:Rk.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(rn).quickAccess.show(V1.PREFIX)}};q1.ID="editor.action.gotoLine";ee(q1);Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:V1,prefix:V1.PREFIX,helpEntries:[{description:Rk.gotoLineActionLabel,commandId:q1.ID}]})});function n4(i,e,t=0,r=0){let n=e;return n.values&&n.values.length>1?ove(i,n.values,t,r):IX(i,e,t,r)}function ove(i,e,t,r){let n=0,o=[];for(let s of e){let[a,l]=IX(i,s,t,r);if(typeof a!="number")return TX;n+=a,o.push(...l)}return[n,sve(o)]}function IX(i,e,t,r){let n=o_(e.original,e.originalLowercase,t,i,i.toLowerCase(),r,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return n?[n[0],pu(n)]:TX}function sve(i){let e=i.sort((n,o)=>n.start-o.start),t=[],r;for(let n of e)!r||!ave(r,n)?(r=n,t.push(n)):(r.start=Math.min(r.start,n.start),r.end=Math.max(r.end,n.end));return t}function ave(i,e){return!(i.end<e.start||e.end<i.start)}function kX(i){return i.startsWith('"')&&i.endsWith('"')}function r4(i){typeof i!="string"&&(i="");let e=i.toLowerCase(),{pathNormalized:t,normalized:r,normalizedLowercase:n}=EX(i),o=t.indexOf(jv)>=0,s=kX(i),a,l=i.split(LX);if(l.length>1)for(let c of l){let d=kX(c),{pathNormalized:u,normalized:h,normalizedLowercase:f}=EX(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:f,expectContiguousMatch:d}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:r,normalizedLowercase:n,values:a,containsPathSeparator:o,expectContiguousMatch:s}}function EX(i){let e;Dc?e=i.replace(/\//g,jv):e=i.replace(/\\/g,jv);let t=fP(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function DM(i){return Array.isArray(i)?r4(i.map(e=>e.original).join(LX)):r4(i.original)}var TX,dvt,LX,AX=N(()=>{hl();eP();En();Di();TX=[void 0,[]];dvt=Object.freeze({score:0});LX=" "});var lve,DX,K1,rm,$s,MM,NM,MX=N(()=>{Ut();Si();Qr();In();AX();ke();Di();et();hn();D1();LM();He();Rt();pi();lve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},DX=function(i,e){return function(t,r){e(t,r,i)}},K1=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},$s=rm=class extends im{constructor(e,t,r=Object.create(null)){super(r),this._languageFeaturesService=e,this._outlineModelService=t,this.options=r,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,b("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ce.None}provideWithTextEditor(e,t,r){let n=e.editor,o=this.getModel(n);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,r):this.doProvideWithoutEditorSymbols(e,o,t,r):ce.None}doProvideWithoutEditorSymbols(e,t,r,n){let o=new le;return this.provideLabelPick(r,b("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),K1(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||n.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,r,n))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return K1(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;let r=new d_,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),r.complete(!0))}));return t.add(ii(()=>r.complete(!1))),r.p})}doProvideWithEditorSymbols(e,t,r,n){var o;let s=e.editor,a=new le;a.add(r.onDidAccept(u=>{let[h]=r.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:r.keyMods,preserveFocus:u.inBackground}),u.inBackground||r.hide())})),a.add(r.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:r.keyMods,forceSideBySide:!0}),r.hide())}));let l=this.getDocumentSymbols(t,n),c,d=u=>K1(this,void 0,void 0,function*(){c==null||c.dispose(!0),r.busy=!1,c=new Fi(n),r.busy=!0;try{let h=r4(r.value.substr(rm.PREFIX.length).trim()),f=yield this.doGetSymbolPicks(l,h,void 0,c.token);if(n.isCancellationRequested)return;if(f.length>0){if(r.items=f,u&&h.original.length===0){let m=DP(f,g=>!!(g.type!=="separator"&&g.range&&B.containsPosition(g.range.decoration,u)));m&&(r.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(r,b("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(r,b("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(r.busy=!1)}});return a.add(r.onDidChangeValue(()=>d(void 0))),d((o=s.getSelection())===null||o===void 0?void 0:o.getPosition()),a.add(r.onDidChangeActive(()=>{let[u]=r.activeItems;u&&u.range&&(s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration))})),a}doGetSymbolPicks(e,t,r,n){var o,s;return K1(this,void 0,void 0,function*(){let a=yield e;if(n.isCancellationRequested)return[];let l=t.original.indexOf(rm.SCOPE_PREFIX)===0,c=l?1:0,d,u;t.values&&t.values.length>1?(d=DM(t.values[0]),u=DM(t.values.slice(1))):d=t;let h,f=(s=(o=this.options)===null||o===void 0?void 0:o.openSideBySideDirection)===null||s===void 0?void 0:s.call(o);f&&(h=[{iconClass:f==="right"?_t.asClassName(pt.splitHorizontal):_t.asClassName(pt.splitVertical),tooltip:f==="right"?b("openToSide","Open to the Side"):b("openToBottom","Open to the Bottom")}]);let m=[];for(let _=0;_<a.length;_++){let E=a[_],A=hP(E.name),L=`$(${WO.toIcon(E.kind).id}) ${A}`,O=L.length-A.length,U=E.containerName;r!=null&&r.extraContainerLabel&&(U?U=`${r.extraContainerLabel} \u2022 ${U}`:U=r.extraContainerLabel);let Y,oe,te,Z;if(t.original.length>c){let Pe=!1;if(d!==t&&([Y,oe]=n4(L,Object.assign(Object.assign({},t),{values:void 0}),c,O),typeof Y=="number"&&(Pe=!0)),typeof Y!="number"&&([Y,oe]=n4(L,d,c,O),typeof Y!="number"))continue;if(!Pe&&u){if(U&&u.original.length>0&&([te,Z]=n4(U,u)),typeof te!="number")continue;typeof Y=="number"&&(Y+=te)}}let ve=E.tags&&E.tags.indexOf(1)>=0;m.push({index:_,kind:E.kind,score:Y,label:L,ariaLabel:jO(E.name,E.kind),description:U,highlights:ve?void 0:{label:oe,description:Z},range:{selection:B.collapseToStart(E.selectionRange),decoration:E.range},strikethrough:ve,buttons:h})}let g=m.sort((_,E)=>l?this.compareByKindAndScore(_,E):this.compareByScore(_,E)),w=[];if(l){let L=function(){E&&typeof _=="number"&&A>0&&(E.label=tf(NM[_]||MM,A))},_,E,A=0;for(let O of g)_!==O.kind?(L(),_=O.kind,A=1,E={type:"separator"},w.push(E)):A++,w.push(O);L()}else g.length>0&&(w=[{label:b("symbols","symbols ({0})",m.length),type:"separator"},...g]);return w})}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.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){let r=NM[e.kind]||MM,n=NM[t.kind]||MM,o=r.localeCompare(n);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return K1(this,void 0,void 0,function*(){let r=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:r.asListOfDocumentSymbols()})}};$s.PREFIX="@";$s.SCOPE_PREFIX=":";$s.PREFIX_BY_CATEGORY=`${rm.PREFIX}${rm.SCOPE_PREFIX}`;$s=rm=lve([DX(0,Se),DX(1,Ih)],$s);MM=b("property","properties ({0})"),NM={5:b("method","methods ({0})"),11:b("function","functions ({0})"),8:b("_constructor","constructors ({0})"),12:b("variable","variables ({0})"),4:b("class","classes ({0})"),22:b("struct","structs ({0})"),23:b("event","events ({0})"),24:b("operator","operators ({0})"),10:b("interface","interfaces ({0})"),2:b("namespace","namespaces ({0})"),3:b("package","packages ({0})"),25:b("typeParameter","type parameters ({0})"),1:b("modules","modules ({0})"),6:b("property","properties ({0})"),9:b("enum","enumerations ({0})"),21:b("enumMember","enumeration members ({0})"),14:b("string","strings ({0})"),0:b("file","files ({0})"),17:b("array","arrays ({0})"),15:b("number","numbers ({0})"),16:b("boolean","booleans ({0})"),18:b("object","objects ({0})"),19:b("key","keys ({0})"),7:b("field","fields ({0})"),13:b("constant","constants ({0})")}});var cve,RM,PM,$1,OM=N(()=>{I0();Tx();MX();ll();lg();Tn();yu();Jt();lt();ei();_l();D1();Rt();cve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},RM=function(i,e){return function(t,r){e(t,r,i)}},PM=class extends $s{constructor(e,t,r){super(t,r),this.editorService=e,this.onDidActiveTextEditorControlChange=li.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};PM=cve([RM(0,si),RM(1,Se),RM(2,Ih)],PM);$1=class i extends de{constructor(){super({id:i.ID,label:ry.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:F.hasDocumentSymbolProvider,kbOpts:{kbExpr:F.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(rn).quickAccess.show($s.PREFIX,{itemActivation:wF.NONE})}};$1.ID="editor.action.quickOutline";ee($1);Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:PM,prefix:$s.PREFIX,helpEntries:[{description:ry.quickOutlineActionLabel,prefix:$s.PREFIX,commandId:$1.ID},{description:ry.quickOutlineByCategoryActionLabel,prefix:$s.PREFIX_BY_CATEGORY}]})});function FM(i,e){return e&&(i.stack||i.stacktrace)?b("stackTrace.format","{0}: {1}",RX(i),NX(i.stack)||NX(i.stacktrace)):RX(i)}function NX(i){return Array.isArray(i)?i.join(` +`):i}function RX(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"?b("nodeExceptionMessage","A system error occurred ({0})",i.message):i.message||b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function zM(i=null,e=!1){if(!i)return b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){let t=un(i),r=zM(t[0],e);return t.length>1?b("error.moreErrors","{0} ({1} errors in total)",r,t.length):r}if(Ov(i))return i;if(i.detail){let t=i.detail;if(t.error)return FM(t.error,e);if(t.exception)return FM(t.exception,e)}return i.stack?FM(i,e):i.message?i.message:b("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var PX=N(()=>{pi();Fr();He()});function BM(i){let e=i;return Array.isArray(e.items)}function OX(i){let e=i;return!!e.picks&&e.additionalPicks instanceof Promise}var G1,nm,o4,FX=N(()=>{Ut();Si();ke();Fr();G1=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.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"})(nm||(nm={}));o4=class extends ce{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,r){var n;let o=new le;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s,a=o.add(new ji),l=()=>G1(this,void 0,void 0,function*(){let c=a.value=new le;s==null||s.dispose(!0),e.busy=!1,s=new Fi(t);let d=s.token,u=e.value.substr(this.prefix.length).trim(),h=this._getPicks(u,c,d,r),f=(g,w)=>{var _;let E,A;if(BM(g)?(E=g.items,A=g.active):E=g,E.length===0){if(w)return!1;(u.length>0||e.hideInput)&&(!((_=this.options)===null||_===void 0)&&_.noResultsPick)&&($9(this.options.noResultsPick)?E=[this.options.noResultsPick(u)]:E=[this.options.noResultsPick])}return e.items=E,A&&(e.activeItems=[A]),!0},m=g=>G1(this,void 0,void 0,function*(){let w=!1,_=!1;yield Promise.all([(()=>G1(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield df(g.mergeDelay),d.isCancellationRequested)||_||(w=f(g.picks,!0))}))(),(()=>G1(this,void 0,void 0,function*(){e.busy=!0;try{let E=yield g.additionalPicks;if(d.isCancellationRequested)return;let A,L;BM(g.picks)?(A=g.picks.items,L=g.picks.active):A=g.picks;let O,U;if(BM(E)?(O=E.items,U=E.active):O=E,O.length>0||!w){let Y;if(!L&&!U){let oe=e.activeItems[0];oe&&A.indexOf(oe)!==-1&&(Y=oe)}f({items:[...A,...O],active:L||U||Y})}}finally{d.isCancellationRequested||(e.busy=!1),_=!0}}))()])});if(h!==null)if(OX(h))yield m(h);else if(!(h instanceof Promise))f(h);else{e.busy=!0;try{let g=yield h;if(d.isCancellationRequested)return;OX(g)?yield m(g):f(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})=>G1(this,void 0,void 0,function*(){var u,h;if(typeof d.trigger=="function"){let f=(h=(u=d.buttons)===null||u===void 0?void 0:u.indexOf(c))!==null&&h!==void 0?h:-1;if(f>=0){let m=d.trigger(f,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case nm.NO_ACTION:break;case nm.CLOSE_PICKER:e.hide();break;case nm.REFRESH_PICKER:l();break;case nm.REMOVE_ITEM:{let w=e.items.indexOf(d);if(w!==-1){let _=e.items.slice(),E=_.splice(w,1),A=e.activeItems.filter(O=>O!==E[0]),L=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,A&&(e.activeItems=A),e.keepScrollPosition=L}break}}}}}))),o}}});var zX,Ph,HM,Y1,ur,om,Oh,BX=N(()=>{PX();Vt();hl();ke();lf();He();Wi();Cr();Nk();Ht();Ur();FX();_u();Oc();zX=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ph=function(i,e){return function(t,r){e(t,r,i)}},HM=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},om=Y1=class extends o4{constructor(e,t,r,n,o,s){super(Y1.PREFIX,e),this.instantiationService=t,this.keybindingService=r,this.commandService=n,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(Oh)),this.options=e}_getPicks(e,t,r,n){var o,s,a,l;return HM(this,void 0,void 0,function*(){let c=yield this.getCommandPicks(r);if(r.isCancellationRequested)return[];let d=[];for(let g of c){let w=(o=Y1.WORD_FILTER(e,g.label))!==null&&o!==void 0?o:void 0,_=g.commandAlias&&(s=Y1.WORD_FILTER(e,g.commandAlias))!==null&&s!==void 0?s:void 0;w||_?(g.highlights={label:w,detail:this.options.showAlias?_:void 0},d.push(g)):e===g.commandId&&d.push(g)}let u=new Map;for(let g of d){let w=u.get(g.label);w?(g.description=g.commandId,w.description=w.commandId):u.set(g.label,g)}d.sort((g,w)=>{let _=this.commandsHistory.peek(g.commandId),E=this.commandsHistory.peek(w.commandId);if(_&&E)return _>E?-1:1;if(_)return-1;if(E)return 1;if(this.options.suggestedCommandIds){let A=this.options.suggestedCommandIds.has(g.commandId),L=this.options.suggestedCommandIds.has(w.commandId);if(A&&L)return 0;if(A)return-1;if(L)return 1}return g.label.localeCompare(w.label)});let h=[],f=!1,m=!!this.options.suggestedCommandIds;for(let g=0;g<d.length;g++){let w=d[g];g===0&&this.commandsHistory.peek(w.commandId)&&(h.push({type:"separator",label:b("recentlyUsed","recently used")}),f=!0),m&&!this.commandsHistory.peek(w.commandId)&&(!((a=this.options.suggestedCommandIds)===null||a===void 0)&&a.has(w.commandId))&&(h.push({type:"separator",label:b("commonlyUsed","commonly used")}),f=!0,m=!1),f&&!this.commandsHistory.peek(w.commandId)&&!(!((l=this.options.suggestedCommandIds)===null||l===void 0)&&l.has(w.commandId))&&(h.push({type:"separator",label:b("morecCommands","other commands")}),f=!1),h.push(this.toCommandPick(w,n))}return this.hasAdditionalCommandPicks(e,r)?{picks:h,additionalPicks:(()=>HM(this,void 0,void 0,function*(){let g=yield this.getAdditionalCommandPicks(c,d,e,r);return r.isCancellationRequested?[]:g.map(w=>this.toCommandPick(w,n))}))()}:h})}toCommandPick(e,t){if(e.type==="separator")return e;let r=this.keybindingService.lookupKeybinding(e.commandId),n=r?b("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,r.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:r,accept:()=>HM(this,void 0,void 0,function*(){var o,s;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{!((s=e.args)===null||s===void 0)&&s.length?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(a){$o(a)||this.dialogService.error(b("canNotRun","Command '{0}' resulted in an error",e.label),zM(a))}})})}};om.PREFIX=">";om.WORD_FILTER=HP(UP,VP,jP);om=Y1=zX([Ph(1,Ke),Ph(2,qt),Ph(3,vi),Ph(4,Ln),Ph(5,Sf)],om);Oh=ur=class extends ce{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=ur.getConfiguredCommandHistoryLength(this.configurationService),ur.cache&&ur.cache.limit!==this.configuredCommandsHistoryLength&&(ur.cache.limit=this.configuredCommandsHistoryLength,ur.saveState(this.storageService)))}load(){let e=this.storageService.get(ur.PREF_KEY_CACHE,0),t;if(e)try{t=JSON.parse(e)}catch(n){}let r=ur.cache=new na(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((o,s)=>o.value-s.value),n.forEach(o=>r.set(o.key,o.value))}ur.counter=this.storageService.getNumber(ur.PREF_KEY_COUNTER,0,ur.counter)}push(e){ur.cache&&(ur.cache.set(e,ur.counter++),ur.saveState(this.storageService))}peek(e){var t;return(t=ur.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!ur.cache)return;let t={usesLRU:!0,entries:[]};ur.cache.forEach((r,n)=>t.entries.push({key:n,value:r})),e.store(ur.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(ur.PREF_KEY_COUNTER,ur.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,r;let o=(r=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||r===void 0?void 0:r.history;return typeof o=="number"?o:ur.DEFAULT_COMMANDS_HISTORY_LENGTH}};Oh.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Oh.PREF_KEY_CACHE="commandPalette.mru.cache";Oh.PREF_KEY_COUNTER="commandPalette.mru.counter";Oh.counter=1;Oh=ur=zX([Ph(0,Gn),Ph(1,Dt)],Oh)});var s4,HX=N(()=>{gre();BX();s4=class extends om{constructor(e,t,r,n,o,s){super(e,t,r,n,o,s)}getCodeEditorCommandPicks(){let e=this.activeTextEditorControl;if(!e)return[];let t=[];for(let r of e.getSupportedActions())t.push({commandId:r.id,commandAlias:r.alias,label:$P(r.label)||r.id});return t}}});var dve,sm,UX,X1,Q1,UM=N(()=>{ll();lg();yu();Tn();HX();Ht();Ur();Wi();Oc();Nk();lt();ei();_l();dve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},sm=function(i,e){return function(t,r){e(t,r,i)}},UX=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},X1=class extends s4{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,r,n,o,s){super({showAlias:!1},e,r,n,o,s),this.codeEditorService=t}getCommandPicks(){return UX(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return UX(this,void 0,void 0,function*(){return[]})}};X1=dve([sm(0,Ke),sm(1,si),sm(2,qt),sm(3,vi),sm(4,Ln),sm(5,Sf)],X1);Q1=class i extends de{constructor(){super({id:i.ID,label:Pk.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:F.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(rn).quickAccess.show(X1.PREFIX)}};Q1.ID="editor.action.quickCommand";ee(Q1);Zr.as(ya.Quickaccess).registerQuickAccessProvider({ctor:X1,prefix:X1.PREFIX,helpEntries:[{description:Pk.quickCommandHelp,commandId:Q1.ID}]})});var uve,am,jM,WM=N(()=>{lt();Tn();DA();Cr();wt();Ht();Ao();_u();uve=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},am=function(i,e){return function(t,r){e(t,r,i)}},jM=class extends Ga{constructor(e,t,r,n,o,s,a){super(!0,e,t,r,n,o,s,a)}};jM=uve([am(1,it),am(2,si),am(3,Mi),am(4,Ke),am(5,Gn),am(6,Dt)],jM);Ue(Ga.ID,jM,4)});function yve(){return import("./jsonMode-ILQOKGQC.js")}var hve,fve,pve,mve,jX,gve,Z1,bve,vve,_ve,WX,VM=N(()=>{Ds();Ds();hve=Object.defineProperty,fve=Object.getOwnPropertyDescriptor,pve=Object.getOwnPropertyNames,mve=Object.prototype.hasOwnProperty,jX=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pve(e))!mve.call(i,n)&&n!==t&&hve(i,n,{get:()=>e[n],enumerable:!(r=fve(e,n))||r.enumerable});return i},gve=(i,e,t)=>(jX(i,e,"default"),t&&jX(t,e,"default")),Z1={};gve(Z1,As);bve=class{constructor(i,e,t){wr(this,"_onDidChange",new Z1.Emitter);wr(this,"_diagnosticsOptions");wr(this,"_modeConfiguration");wr(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)}},vve={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},_ve={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},WX=new bve("json",vve,_ve);Z1.languages.json={jsonDefaults:WX};Z1.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Z1.languages.onLanguage("json",()=>{yve().then(i=>i.setupMode(WX))})});function ie(i){let e=i.id;qX[e]=i,J1.languages.register(i);let t=KX.getOrCreate(e);J1.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),J1.languages.onLanguageEncountered(e,async()=>{let r=await t.load();J1.languages.setLanguageConfiguration(e,r.conf)})}var wve,xve,Cve,Sve,VX,kve,J1,qX,qM,KX,Ge=N(()=>{Ds();wve=Object.defineProperty,xve=Object.getOwnPropertyDescriptor,Cve=Object.getOwnPropertyNames,Sve=Object.prototype.hasOwnProperty,VX=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Cve(e))!Sve.call(i,n)&&n!==t&&wve(i,n,{get:()=>e[n],enumerable:!(r=xve(e,n))||r.enumerable});return i},kve=(i,e,t)=>(VX(i,e,"default"),t&&VX(t,e,"default")),J1={};kve(J1,As);qX={},qM={},KX=class{constructor(i){wr(this,"_languageId");wr(this,"_loadingTriggered");wr(this,"_lazyLoadPromise");wr(this,"_lazyLoadPromiseResolve");wr(this,"_lazyLoadPromiseReject");this._languageId=i,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(i){return qM[i]||(qM[i]=new KX(i)),qM[i]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,qX[this._languageId].loader().then(i=>this._lazyLoadPromiseResolve(i),i=>this._lazyLoadPromiseReject(i))),this._lazyLoadPromise}}});var KM=N(()=>{Ge();ie({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>import("./elixir-I7MUXEB2.js")})});var $M=N(()=>{Ge();ie({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>import("./markdown-GNMXFE7H.js")})});var GM=N(()=>{Ge();ie({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>import("./javascript-6A7FQGGU.js")})});var YM=N(()=>{Ge();ie({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>import("./sql-5LBGPTDB.js")})});var XM=N(()=>{Ge();ie({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>import("./css-MRJBVA6L.js")})});var QM=N(()=>{Ge();ie({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-CMHOMJOM.js")})});var ZM=N(()=>{Ge();ie({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>import("./xml-5NTT7CCO.js")})});var JM=N(()=>{Ge();ie({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>import("./dockerfile-QFITLKOJ.js")})});var rQ=Xi(()=>{});var l4=Xi((a4,nQ)=>{(function(i,e){typeof a4=="object"?nQ.exports=a4=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(a4,function(){var i=i||function(e,t){var r;if(typeof window!="undefined"&&window.crypto&&(r=window.crypto),typeof self!="undefined"&&self.crypto&&(r=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window!="undefined"&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global!="undefined"&&global.crypto&&(r=global.crypto),!r&&typeof su=="function")try{r=rQ()}catch(_){}var n=function(){if(r){if(typeof r.getRandomValues=="function")try{return r.getRandomValues(new Uint32Array(1))[0]}catch(_){}if(typeof r.randomBytes=="function")try{return r.randomBytes(4).readInt32LE()}catch(_){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function _(){}return function(E){var A;return _.prototype=E,A=new _,_.prototype=null,A}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(_){var E=o(this);return _&&E.mixIn(_),(!E.hasOwnProperty("init")||this.init===E.init)&&(E.init=function(){E.$super.init.apply(this,arguments)}),E.init.prototype=E,E.$super=this,E},create:function(){var _=this.extend();return _.init.apply(_,arguments),_},init:function(){},mixIn:function(_){for(var E in _)_.hasOwnProperty(E)&&(this[E]=_[E]);_.hasOwnProperty("toString")&&(this.toString=_.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(_,E){_=this.words=_||[],E!=t?this.sigBytes=E:this.sigBytes=_.length*4},toString:function(_){return(_||u).stringify(this)},concat:function(_){var E=this.words,A=_.words,L=this.sigBytes,O=_.sigBytes;if(this.clamp(),L%4)for(var U=0;U<O;U++){var Y=A[U>>>2]>>>24-U%4*8&255;E[L+U>>>2]|=Y<<24-(L+U)%4*8}else for(var oe=0;oe<O;oe+=4)E[L+oe>>>2]=A[oe>>>2];return this.sigBytes+=O,this},clamp:function(){var _=this.words,E=this.sigBytes;_[E>>>2]&=4294967295<<32-E%4*8,_.length=e.ceil(E/4)},clone:function(){var _=l.clone.call(this);return _.words=this.words.slice(0),_},random:function(_){for(var E=[],A=0;A<_;A+=4)E.push(n());return new c.init(E,_)}}),d=s.enc={},u=d.Hex={stringify:function(_){for(var E=_.words,A=_.sigBytes,L=[],O=0;O<A;O++){var U=E[O>>>2]>>>24-O%4*8&255;L.push((U>>>4).toString(16)),L.push((U&15).toString(16))}return L.join("")},parse:function(_){for(var E=_.length,A=[],L=0;L<E;L+=2)A[L>>>3]|=parseInt(_.substr(L,2),16)<<24-L%8*4;return new c.init(A,E/2)}},h=d.Latin1={stringify:function(_){for(var E=_.words,A=_.sigBytes,L=[],O=0;O<A;O++){var U=E[O>>>2]>>>24-O%4*8&255;L.push(String.fromCharCode(U))}return L.join("")},parse:function(_){for(var E=_.length,A=[],L=0;L<E;L++)A[L>>>2]|=(_.charCodeAt(L)&255)<<24-L%4*8;return new c.init(A,E)}},f=d.Utf8={stringify:function(_){try{return decodeURIComponent(escape(h.stringify(_)))}catch(E){throw new Error("Malformed UTF-8 data")}},parse:function(_){return h.parse(unescape(encodeURIComponent(_)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(_){typeof _=="string"&&(_=f.parse(_)),this._data.concat(_),this._nDataBytes+=_.sigBytes},_process:function(_){var E,A=this._data,L=A.words,O=A.sigBytes,U=this.blockSize,Y=U*4,oe=O/Y;_?oe=e.ceil(oe):oe=e.max((oe|0)-this._minBufferSize,0);var te=oe*U,Z=e.min(te*4,O);if(te){for(var ve=0;ve<te;ve+=U)this._doProcessBlock(L,ve);E=L.splice(0,te),A.sigBytes-=Z}return new c.init(E,Z)},clone:function(){var _=l.clone.call(this);return _._data=this._data.clone(),_},_minBufferSize:0}),g=a.Hasher=m.extend({cfg:l.extend(),init:function(_){this.cfg=this.cfg.extend(_),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(_){return this._append(_),this._process(),this},finalize:function(_){_&&this._append(_);var E=this._doFinalize();return E},blockSize:512/32,_createHelper:function(_){return function(E,A){return new _.init(A).finalize(E)}},_createHmacHelper:function(_){return function(E,A){return new w.HMAC.init(_,A).finalize(E)}}}),w=s.algo={};return s}(Math);return i})});var sQ=Xi((c4,oQ)=>{(function(i,e){typeof c4=="object"?oQ.exports=c4=e(l4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(c4,function(i){return function(e){var t=i,r=t.lib,n=r.WordArray,o=r.Hasher,s=t.algo,a=[];(function(){for(var f=0;f<64;f++)a[f]=e.abs(e.sin(f+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(f,m){for(var g=0;g<16;g++){var w=m+g,_=f[w];f[w]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var E=this._hash.words,A=f[m+0],L=f[m+1],O=f[m+2],U=f[m+3],Y=f[m+4],oe=f[m+5],te=f[m+6],Z=f[m+7],ve=f[m+8],Pe=f[m+9],Ee=f[m+10],Oe=f[m+11],Xe=f[m+12],dt=f[m+13],be=f[m+14],we=f[m+15],X=E[0],R=E[1],ne=E[2],me=E[3];X=c(X,R,ne,me,A,7,a[0]),me=c(me,X,R,ne,L,12,a[1]),ne=c(ne,me,X,R,O,17,a[2]),R=c(R,ne,me,X,U,22,a[3]),X=c(X,R,ne,me,Y,7,a[4]),me=c(me,X,R,ne,oe,12,a[5]),ne=c(ne,me,X,R,te,17,a[6]),R=c(R,ne,me,X,Z,22,a[7]),X=c(X,R,ne,me,ve,7,a[8]),me=c(me,X,R,ne,Pe,12,a[9]),ne=c(ne,me,X,R,Ee,17,a[10]),R=c(R,ne,me,X,Oe,22,a[11]),X=c(X,R,ne,me,Xe,7,a[12]),me=c(me,X,R,ne,dt,12,a[13]),ne=c(ne,me,X,R,be,17,a[14]),R=c(R,ne,me,X,we,22,a[15]),X=d(X,R,ne,me,L,5,a[16]),me=d(me,X,R,ne,te,9,a[17]),ne=d(ne,me,X,R,Oe,14,a[18]),R=d(R,ne,me,X,A,20,a[19]),X=d(X,R,ne,me,oe,5,a[20]),me=d(me,X,R,ne,Ee,9,a[21]),ne=d(ne,me,X,R,we,14,a[22]),R=d(R,ne,me,X,Y,20,a[23]),X=d(X,R,ne,me,Pe,5,a[24]),me=d(me,X,R,ne,be,9,a[25]),ne=d(ne,me,X,R,U,14,a[26]),R=d(R,ne,me,X,ve,20,a[27]),X=d(X,R,ne,me,dt,5,a[28]),me=d(me,X,R,ne,O,9,a[29]),ne=d(ne,me,X,R,Z,14,a[30]),R=d(R,ne,me,X,Xe,20,a[31]),X=u(X,R,ne,me,oe,4,a[32]),me=u(me,X,R,ne,ve,11,a[33]),ne=u(ne,me,X,R,Oe,16,a[34]),R=u(R,ne,me,X,be,23,a[35]),X=u(X,R,ne,me,L,4,a[36]),me=u(me,X,R,ne,Y,11,a[37]),ne=u(ne,me,X,R,Z,16,a[38]),R=u(R,ne,me,X,Ee,23,a[39]),X=u(X,R,ne,me,dt,4,a[40]),me=u(me,X,R,ne,A,11,a[41]),ne=u(ne,me,X,R,U,16,a[42]),R=u(R,ne,me,X,te,23,a[43]),X=u(X,R,ne,me,Pe,4,a[44]),me=u(me,X,R,ne,Xe,11,a[45]),ne=u(ne,me,X,R,we,16,a[46]),R=u(R,ne,me,X,O,23,a[47]),X=h(X,R,ne,me,A,6,a[48]),me=h(me,X,R,ne,Z,10,a[49]),ne=h(ne,me,X,R,be,15,a[50]),R=h(R,ne,me,X,oe,21,a[51]),X=h(X,R,ne,me,Xe,6,a[52]),me=h(me,X,R,ne,U,10,a[53]),ne=h(ne,me,X,R,Ee,15,a[54]),R=h(R,ne,me,X,L,21,a[55]),X=h(X,R,ne,me,ve,6,a[56]),me=h(me,X,R,ne,we,10,a[57]),ne=h(ne,me,X,R,te,15,a[58]),R=h(R,ne,me,X,dt,21,a[59]),X=h(X,R,ne,me,Y,6,a[60]),me=h(me,X,R,ne,Oe,10,a[61]),ne=h(ne,me,X,R,O,15,a[62]),R=h(R,ne,me,X,Pe,21,a[63]),E[0]=E[0]+X|0,E[1]=E[1]+R|0,E[2]=E[2]+ne|0,E[3]=E[3]+me|0},_doFinalize:function(){var f=this._data,m=f.words,g=this._nDataBytes*8,w=f.sigBytes*8;m[w>>>5]|=128<<24-w%32;var _=e.floor(g/4294967296),E=g;m[(w+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,m[(w+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,f.sigBytes=(m.length+1)*4,this._process();for(var A=this._hash,L=A.words,O=0;O<4;O++){var U=L[O];L[O]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}return A},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});function c(f,m,g,w,_,E,A){var L=f+(m&g|~m&w)+_+A;return(L<<E|L>>>32-E)+m}function d(f,m,g,w,_,E,A){var L=f+(m&w|g&~w)+_+A;return(L<<E|L>>>32-E)+m}function u(f,m,g,w,_,E,A){var L=f+(m^g^w)+_+A;return(L<<E|L>>>32-E)+m}function h(f,m,g,w,_,E,A){var L=f+(g^(m|~w))+_+A;return(L<<E|L>>>32-E)+m}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var lQ=Xi((d4,aQ)=>{(function(i,e){typeof d4=="object"?aQ.exports=d4=e(l4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(d4,function(i){return function(e){var t=i,r=t.lib,n=r.WordArray,o=r.Hasher,s=t.algo,a=[],l=[];(function(){function u(g){for(var w=e.sqrt(g),_=2;_<=w;_++)if(!(g%_))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var f=2,m=0;m<64;)u(f)&&(m<8&&(a[m]=h(e.pow(f,1/2))),l[m]=h(e.pow(f,1/3)),m++),f++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(u,h){for(var f=this._hash.words,m=f[0],g=f[1],w=f[2],_=f[3],E=f[4],A=f[5],L=f[6],O=f[7],U=0;U<64;U++){if(U<16)c[U]=u[h+U]|0;else{var Y=c[U-15],oe=(Y<<25|Y>>>7)^(Y<<14|Y>>>18)^Y>>>3,te=c[U-2],Z=(te<<15|te>>>17)^(te<<13|te>>>19)^te>>>10;c[U]=oe+c[U-7]+Z+c[U-16]}var ve=E&A^~E&L,Pe=m&g^m&w^g&w,Ee=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),Oe=(E<<26|E>>>6)^(E<<21|E>>>11)^(E<<7|E>>>25),Xe=O+Oe+ve+l[U]+c[U],dt=Ee+Pe;O=L,L=A,A=E,E=_+Xe|0,_=w,w=g,g=m,m=Xe+dt|0}f[0]=f[0]+m|0,f[1]=f[1]+g|0,f[2]=f[2]+w|0,f[3]=f[3]+_|0,f[4]=f[4]+E|0,f[5]=f[5]+A|0,f[6]=f[6]+L|0,f[7]=f[7]+O|0},_doFinalize:function(){var u=this._data,h=u.words,f=this._nDataBytes*8,m=u.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=e.floor(f/4294967296),h[(m+64>>>9<<4)+15]=f,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 dQ=Xi((u4,cQ)=>{(function(i,e){typeof u4=="object"?cQ.exports=u4=e(l4()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(u4,function(i){return function(){var e=i,t=e.lib,r=t.WordArray,n=e.enc,o=n.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var u=[],h=0;h<c;h+=3)for(var f=l[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,w=f<<16|m<<8|g,_=0;_<4&&h+_*.75<c;_++)u.push(d.charAt(w>>>6*(3-_)&63));var E=d.charAt(64);if(E)for(;u.length%4;)u.push(E);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<c.length;u++)d[c.charCodeAt(u)]=u}var h=c.charAt(64);if(h){var f=a.indexOf(h);f!==-1&&(l=f)}return s(a,l,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(a,l,c){for(var d=[],u=0,h=0;h<l;h++)if(h%4){var f=c[a.charCodeAt(h-1)]<<h%4*2,m=c[a.charCodeAt(h)]>>>6-h%4*2,g=f|m;d[u>>>2]|=g<<24-u%4*8,u++}return r.create(d,u)}}(),i.enc.Base64})});var WQ=Xi(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0});k4.default=void 0;var Pi=(Ds(),Yh(As)),r_e=(Q3(),Yh(pre));function n_e(i,e){return l_e(i)||a_e(i,e)||s_e(i,e)||o_e()}function o_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 s_e(i,e){if(i){if(typeof i=="string")return PQ(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 PQ(i,e)}}function PQ(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=i[t];return r}function a_e(i,e){var t=i==null?null:typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r=[],n=!0,o=!1,s,a;try{for(t=t.call(i);!(n=(s=t.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(l){o=!0,a=l}finally{try{!n&&t.return!=null&&t.return()}finally{if(o)throw a}}return r}}function l_e(i){if(Array.isArray(i))return i}function bN(i){"@babel/helpers - typeof";return bN=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},bN(i)}function BQ(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function OQ(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}function HQ(i,e,t){return e&&OQ(i.prototype,e),t&&OQ(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var c_e={Bottom:4},d_e={readOnly:65,cursorWidth:20,fontInfo:32},u_e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function h_e(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||u_e.test(i))}function S4(i,e){if(!(this instanceof S4))return new S4(i,e);this.line=i,this.ch=e}function f_e(i,e,t){i.dispatch(e,t)}function cv(i){return function(){}}var FQ,zQ;String.prototype.normalize?(FQ=function(e){return e.normalize("NFD").toLowerCase()},zQ=function(e){return e.normalize("NFD")}):(FQ=function(e){return e.toLowerCase()},zQ=function(e){return e});var UQ=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};UQ.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.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var r=t==e;else var r=t&&(e.test?e.test(t):e(t));if(r)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},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,r){if(typeof e=="string"){var n=function(l){return r?l.toLowerCase():l},o=this.string.substr(this.pos,e.length);if(n(o)==n(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 gs(i){return new S4(i.lineNumber-1,i.column-1)}function $r(i){return new Pi.Position(i.line+1,i.ch+1)}var p_e=function(){function i(e,t,r,n){BQ(this,i),this.cm=e,this.id=t,this.lineNumber=r+1,this.column=n+1,e.marks[this.id]=this}return HQ(i,[{key:"clear",value:function(){delete this.cm.marks[this.id]}},{key:"find",value:function(){return gs(this)}}]),i}();function jQ(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=!0,r=Pi.KeyCode[i.keyCode];i.key&&(r=i.key,t=!1);var n=r,o=e;switch(i.keyCode){case Pi.KeyCode.Shift:case Pi.KeyCode.Meta:case Pi.KeyCode.Alt:case Pi.KeyCode.Ctrl:return n;case Pi.KeyCode.Escape:o=!0,n="Esc";break;case Pi.KeyCode.Space:o=!0;break}return r.startsWith("Key")||r.startsWith("KEY_")?n=r[r.length-1].toLowerCase():r.startsWith("Digit")?n=r.slice(5,6):r.startsWith("Numpad")?n=r.slice(6,7):r.endsWith("Arrow")?(o=!0,n=r.substring(0,r.length-5)):(r.startsWith("US_")||r.startsWith("Bracket")||!n)&&(n=i.browserEvent.key),!o&&!i.altKey&&!i.ctrlKey&&!i.metaKey?n=i.key||i.browserEvent.key:(i.altKey&&(n="Alt-".concat(n)),i.ctrlKey&&(n="Ctrl-".concat(n)),i.metaKey&&(n="Meta-".concat(n)),i.shiftKey&&(n="Shift-".concat(n))),n.length===1&&t&&(n="'".concat(n,"'")),n}var or=function(){function i(e){BQ(this,i),m_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 HQ(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,r){var n=!1,o=t,s=this.editor.getPosition(),a=new Pi.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;n=!0,o=c,a=new Pi.Range(s.lineNumber,s.column,s.lineNumber,s.column-1)}else return;r.preventDefault(),r.stopPropagation(),this.replaceStack||(this.replaceStack=[]),n||this.replaceStack.push(this.editor.getModel().getValueInRange(a)),this.editor.executeEdits("vim",[{text:o,range:a,forceMoveMarkers:l}]),n&&this.editor.setPosition(a.getStartPosition())}},{key:"setOption",value:function(t,r){this.state[t]=r,t==="theme"&&Pi.editor.setTheme(r)}},{key:"getConfiguration",value:function(){var t=this.editor,r=d_e;return typeof t.getConfiguration=="function"?t.getConfiguration():("EditorOption"in Pi.editor&&(r=Pi.editor.EditorOption),{readOnly:t.getOption(r.readOnly),viewInfo:{cursorWidth:t.getOption(r.cursorWidth)},fontInfo:t.getOption(r.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 r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var s=this.listeners[t];s&&s.forEach(function(a){return a.apply(void 0,n)})}},{key:"on",value:function(t,r){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(r)}},{key:"off",value:function(t,r){var n=this.listeners[t];n&&(this.listeners[t]=n.filter(function(o){return o!==r}))}},{key:"firstLine",value:function(){return 0}},{key:"lastLine",value:function(){return this.lineCount()-1}},{key:"lineCount",value:function(){return this.editor.getModel().getLineCount()}},{key:"defaultTextHeight",value:function(){return 1}},{key:"getLine",value:function(t){if(t<0)return"";var r=this.editor.getModel(),n=r.getLineCount();return t+1>n&&(t=n-1),this.editor.getModel().getLineContent(t+1)}},{key:"getAnchorForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var r=t.getDirection();return r===Pi.SelectionDirection.LTR?t.getStartPosition():t.getEndPosition()}},{key:"getHeadForSelection",value:function(t){if(t.isEmpty())return t.getPosition();var r=t.getDirection();return r===Pi.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 gs(this.editor.getPosition());var r=this.editor.getSelection(),n;return r.isEmpty()?n=r.getPosition():t==="anchor"?n=this.getAnchorForSelection(r):n=this.getHeadForSelection(r),gs(n)}},{key:"getRange",value:function(t,r){var n=$r(t),o=$r(r);return this.editor.getModel().getValueInRange(Pi.Range.fromPositions(n,o))}},{key:"getSelection",value:function(){var t=[],r=this.editor;return r.getSelections().map(function(n){t.push(r.getModel().getValueInRange(n))}),t.join(` -`)}},{key:"replaceRange",value:function(t,r,n){var o=$r(r),s=n?$r(n):o;this.editor.executeEdits("vim",[{text:t,range:Pi.Range.fromPositions(o,s)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(t,r){var n=t;gN(t)!=="object"&&(n={},n.line=t,n.ch=r);var o=this.editor.getModel().validatePosition($r(n));this.editor.setPosition($r(n)),this.editor.revealPosition(o)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(t,r){return t()}},{key:"listSelections",value:function(){var t=this,r=this.editor.getSelections();return!r.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:r.map(function(n){var o=n.getPosition(),s=n.getStartPosition(),a=n.getEndPosition();return{anchor:t.clipPos(gs(t.getAnchorForSelection(n))),head:t.clipPos(gs(t.getHeadForSelection(n)))}})}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(t,r){var n=!!this.editor.getSelections().length,o=t.map(function(l,c){var d=l.anchor,u=l.head;return n?Pi.Selection.fromPositions($r(d),$r(u)):Pi.Selection.fromPositions($r(u),$r(d))});if(r&&o[r]&&o.push(o.splice(r,1)[0]),!!o.length){var s=o[0],a;s.getDirection()===Pi.SelectionDirection.LTR?a=s.getEndPosition():a=s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(a)}}},{key:"setSelection",value:function(t,r){var n=Pi.Range.fromPositions($r(t),$r(r));this.editor.setSelection(n)}},{key:"getSelections",value:function(){var t=this.editor;return t.getSelections().map(function(r){return t.getModel().getValueInRange(r)})}},{key:"replaceSelections",value:function(t){var r=this.editor;r.getSelections().forEach(function(n,o){r.executeEdits("vim",[{range:n,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,r){return{top:t.line,left:t.ch}}},{key:"coordsChar",value:function(t,r){}},{key:"clipPos",value:function(t){var r=this.editor.getModel().validatePosition($r(t));return gs(r)}},{key:"setBookmark",value:function(t,r){var n=new p_e(this,this.$uid++,t.line,t.ch);return(!r||!r.insertLeft)&&(n.$insertRight=!0),this.marks[n.id]=n,n}},{key:"getScrollInfo",value:function(){var t=this.editor,r=t.getVisibleRanges(),n=n_e(r,1),o=n[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 r=this.getConfiguration();this.initialCursorWidth=r.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:r.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 r={top:1/0,bottom:0};return t.reduce(function(n,o){return o.startLineNumber<n.top&&(n.top=o.startLineNumber),o.endLineNumber>n.bottom&&(n.bottom=o.endLineNumber),n},r),r.top-=1,r.bottom-=1,r}},{key:"findPosV",value:function(t,r,n){var o=this.editor,s=r,a=n,l=$r(t);if(n==="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),gs(l)}},{key:"findMatchingBracket",value:function(t){var r=$r(t),n=this.editor.getModel(),o;if(n.bracketPairs)o=n.bracketPairs.matchBracket(r);else{var s;o=(s=n.matchBracket)===null||s===void 0?void 0:s.call(n,r)}return!o||o.length!==2?{to:null}:{to:gs(o[1].getStartPosition())}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(t){return this.editor.getModel().getLineFirstNonWhitespaceColumn(t+1)-1}},{key:"scrollTo",value:function(t,r){!t&&!r||t||(r<0&&(r=this.editor.getPosition().lineNumber-r),this.editor.setScrollTop(this.editor.getTopForLineNumber(r+1)))}},{key:"moveCurrentLineTo",value:function(t){var r,n=this.editor,o=n.getPosition(),s=Pi.Range.fromPositions(o,o);switch(t){case"top":n.revealRangeAtTop(s);return;case"center":n.revealRangeInCenter(s);return;case"bottom":(r=n._revealRange)===null||r===void 0||r.call(n,s,c_e.Bottom);return}}},{key:"getSearchCursor",value:function(t,r){var n=!1,o=!1;t instanceof RegExp&&!t.global&&(n=!t.ignoreCase,t=t.source,o=!0),r.ch==null&&(r.ch=Number.MAX_VALUE);var s=$r(r),a=this,l=this.editor,c=null,d=l.getModel(),u=d.findMatches(t,!1,o,n)||[];return{getMatches:function(){return u},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(f){if(!u||!u.length)return!1;var m=u[f];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(f){if(!u||!u.length)return!1;var m;if(f){var g=c?c.getStartPosition():s;if(m=d.findPreviousMatch(t,g,o,n),!m||!m.range.getStartPosition().isBeforeOrEqual(g))return!1}else{var w=c?d.getPositionAt(d.getOffsetAt(c.getStartPosition())+1):s;if(m=d.findNextMatch(t,w,o,n),!m||!w.isBeforeOrEqual(m.range.getStartPosition()))return!1}return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(_){return _.range}).filter(function(_){return!_.equalsRange(c)})),c},from:function(){return c&&gs(c.getStartPosition())},to:function(){return c&&gs(c.getEndPosition())},replace:function(f){c&&(l.executeEdits("vim",[{range:c,text:f,forceMoveMarkers:!0}]),c.setEndPosition(l.getPosition()),l.setPosition(c.getStartPosition()))}}}},{key:"highlightRanges",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"findMatch",n="decoration".concat(r);return this[n]=this.editor.deltaDecorations(this[n]||[],t.map(function(o){return{range:o,options:{stickiness:Pi.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:r,showIfCollapsed:!0}}})),this[n]}},{key:"addOverlay",value:function(t,r,n){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(r){t.editor.deltaDecorations(t["decoration".concat(r)]||[],[])})}},{key:"scrollIntoView",value:function(t){t&&this.editor.revealPosition($r(t))}},{key:"moveH",value:function(t,r){if(r==="char"){var n=this.editor.getPosition();this.editor.setPosition(new Pi.Position(n.lineNumber,n.column+t))}}},{key:"scanForBracket",value:function(t,r,n,o){for(var s=o.bracketRegex,a=$r(t),l=this.editor.getModel(),c=(r===-1?l.findPreviousMatch:l.findNextMatch).bind(l),d=[],u=0;;){if(u>10)return;var h=c(s.source,a,!0,!0,null,!0),f=h.matches[0];if(h===void 0)return;var m=i.matchingBrackets[f];if(m&&m.charAt(1)===">"==r>0)d.push(f);else if(d.length===0){var g=h.range.getStartPosition();return{pos:gs(g)}}else d.pop();a=l.getPositionAt(l.getOffsetAt(h.range.getStartPosition())+r),u+=1}}},{key:"indexFromPos",value:function(t){return this.editor.getModel().getOffsetAt($r(t))}},{key:"posFromIndex",value:function(t){return gs(this.editor.getModel().getPositionAt(t))}},{key:"indentLine",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.editor,o;n._getViewModel?o=n._getViewModel().cursorConfig:o=n._getCursors().context.config;var s=new Pi.Position(t+1,1),a=Pi.Selection.fromPositions(s,s);n.executeCommand("vim",new r_e.ShiftCommand(a,{isUnshift:!r,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,r,n){if(this.statusBar)return this.statusBar.setSec(t,r,n)}},{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 r=this.editor.getPosition();t==="start"?r.column=1:t==="end"&&(r.column=this.editor.getModel().getLineMaxColumn(r.lineNumber)),this.editor.setPosition(r)}},{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}();or.Pos=S4;or.signal=f_e;or.on=cv("on");or.off=cv("off");or.addClass=cv("addClass");or.rmClass=cv("rmClass");or.defineOption=cv("defineOption");or.keyMap={default:function(e){return function(t){return!0}}};or.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};or.isWordChar=h_e;or.keyName=UQ;or.StringStream=HQ;or.e_stop=function(i){return i.stopPropagation?i.stopPropagation():i.cancelBubble=!0,or.e_preventDefault(i),!1};or.e_preventDefault=function(i){return i.preventDefault?(i.preventDefault(),i.browserEvent&&i.browserEvent.preventDefault()):i.returnValue=!1,!1};or.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}};or.lookupKey=function i(e,t,r){typeof t=="string"&&(t=or.keyMap[t]);var n=typeof t=="function"?t(e):t[e];if(n===!1)return"nothing";if(n==="...")return"multi";if(n!=null&&r(n))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return i(e,t.fallthrough,r);for(var o=0;o<t.fallthrough.length;o++){var s=i(e,t.fallthrough[o],r);if(s)return s}}};or.defineExtension=function(i,e){or.prototype[i]=e};var m_e=function(){var e=this;this.handleKeyDown=function(t){if(!(t.browserEvent.defaultPrevented&t.keyCode!==Pi.KeyCode.Escape)&&e.attached){var r=UQ(t);if(e.replaceMode&&e.handleReplaceMode(r,t),!!r){var n=e.state.keyMap;if(or.keyMap[n]&&or.keyMap[n].call){var o=or.keyMap[n].call(r,e);if(o){t.preventDefault(),t.stopPropagation();try{o()}catch(s){console.error(s)}}}}}},this.handleCursorChange=function(t){var r=t.position,n=t.source,o=e.editor,s=o.getSelection();if(!e.ctxInsert.get()&&t.source==="mouse"&&s.isEmpty()){var a=o.getModel().getLineMaxColumn(r.lineNumber);if(t.position.column===a){o.setPosition(new Pi.Position(t.position.lineNumber,a-1));return}}e.dispatch("cursorActivity",e,t)},this.handleChange=function(t){var r=t.changes,n={text:r.reduce(function(s,a){return s.push(a.text),s},[]),origin:"+input"},o=e.curOp=e.curOp||{};o.changeHandlers||(o.changeHandlers=e.listeners.change&&e.listeners.change.slice()),!e.virtualSelectionMode()&&(o.lastChange?o.lastChange.next=o.lastChange=n:o.lastChange=o.change=n,e.dispatch("change",e,n))}},g_e=or;k4.default=g_e});var KQ=Xi(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.default=um.Vim=void 0;var ut=b_e(jQ());function b_e(i){return i&&i.__esModule?i:{default:i}}function E4(i){"@babel/helpers - typeof";return E4=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},E4(i)}var Ve=ut.default.Pos;function v_e(i,e){var t=i.state.vim;if(!t||t.insertMode)return e.head;var r=t.sel.head;if(!r)return e.head;if(!(t.visualBlock&&e.head.line!=r.line))return e.from()==e.anchor&&!e.empty()&&e.head.line==r.line&&e.head.ch!=r.ch?new Ve(e.head.line,e.head.ch-1):e.head}var wn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",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:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",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:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",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<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",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:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",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:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",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:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",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<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",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:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',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<CR>",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:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",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"}],WQ=wn.length,VQ=[{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"}],qQ=function(){function e(S){S.setOption("disableInput",!0),S.setOption("showCursorWhenSelecting",!1),ut.default.signal(S,"vim-mode-change",{mode:"normal"}),S.on("cursorActivity",N9),we(S),S.enterVimMode()}function t(S){S.setOption("disableInput",!1),S.off("cursorActivity",N9),S.state.vim=null,Dv&&clearTimeout(Dv),S.leaveVimMode()}function r(S,p){S.attached=!1,this==ut.default.keyMap.vim&&(S.options.$customCursor=null),(!p||p.attach!=n)&&t(S)}function n(S,p){this==ut.default.keyMap.vim&&(S.attached=!0,S.curOp&&(S.curOp.selectionChanged=!0),S.options.$customCursor=v_e),(!p||p.attach!=n)&&e(S)}ut.default.defineOption("vimMode",!1,function(S,p,y){p&&S.getOption("keyMap")!="vim"?S.setOption("keyMap","vim"):!p&&y!=ut.default.Init&&/^vim/.test(S.getOption("keyMap"))&&S.setOption("keyMap","default")});function o(S,p){if(p){if(this[S])return this[S];var y=l(S);if(!y)return!1;var C=me.findKey(p,y);return typeof C=="function"&&ut.default.signal(p,"vim-keypress",y),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(S){if(S.charAt(0)=="'")return S.charAt(1);if(S==="AltGraph")return!1;var p=S.split(/-(?!$)/),y=p[p.length-1];if(p.length==1&&p[0].length==1)return!1;if(p.length==2&&p[0]=="Shift"&&y.length==1)return!1;for(var C=!1,k=0;k<p.length;k++){var I=p[k];I in s?p[k]=s[I]:C=!0,I in a&&(p[k]=a[I])}return C?(Y(y)&&(p[p.length-1]=y.toLowerCase()),"<"+p.join("-")+">"):!1}var c=/[\d]/,d=[ut.default.isWordChar,function(S){return S&&!ut.default.isWordChar(S)&&!/\s/.test(S)}],u=[function(S){return/\S/.test(S)}];function h(S,p){for(var y=[],C=S;C<S+p;C++)y.push(String.fromCharCode(C));return y}var f=h(65,26),m=h(97,26),g=h(48,10),w=[].concat(f,m,g,["<",">"]),_=[].concat(f,m,g,["-",'"',".",":","_","/"]),E;try{E=new RegExp("^[\\p{Lu}]$","u")}catch(S){E=/^[A-Z]$/}function A(S,p){return p>=S.firstLine()&&p<=S.lastLine()}function L(S){return/^[a-z]$/.test(S)}function O(S){return"()[]{}".indexOf(S)!=-1}function U(S){return c.test(S)}function Y(S){return E.test(S)}function oe(S){return/^\s*$/.test(S)}function te(S){return".?!".indexOf(S)!=-1}function Z(S,p){for(var y=0;y<p.length;y++)if(p[y]==S)return!0;return!1}var ve={};function Pe(S,p,y,C,k){if(p===void 0&&!k)throw Error("defaultValue is required unless callback is provided");if(y||(y="string"),ve[S]={type:y,defaultValue:p,callback:k},C)for(var I=0;I<C.length;I++)ve[C[I]]=ve[S];p&&Ee(S,p)}function Ee(S,p,y,C){var k=ve[S];C=C||{};var I=C.scope;if(!k)return new Error("Unknown option: "+S);if(k.type=="boolean"){if(p&&p!==!0)return new Error("Invalid argument: "+S+"="+p);p!==!1&&(p=!0)}k.callback?(I!=="local"&&k.callback(p,void 0),I!=="global"&&y&&k.callback(p,y)):(I!=="local"&&(k.value=k.type=="boolean"?!!p:p),I!=="global"&&y&&(y.state.vim.options[S]={value:p}))}function Oe(S,p,y){var C=ve[S];y=y||{};var k=y.scope;if(!C)return new Error("Unknown option: "+S);if(C.callback){var I=p&&C.callback(void 0,p);return k!=="global"&&I!==void 0?I:k!=="local"?C.callback():void 0}else{var I=k!=="global"&&p&&p.state.vim.options[S];return(I||k!=="local"&&C||{}).value}}Pe("filetype",void 0,"string",["ft"],function(S,p){if(p!==void 0)if(S===void 0){var y=p.getOption("mode");return y=="null"?"":y}else{var y=S==""?"null":S;p.setOption("mode",y)}});var Xe=function(){var p=100,y=-1,C=0,k=0,I=new Array(p);function M(V,Q,se){var Ce=y%p,xe=I[Ce];function ye(tt){var Ye=++y%p,Ft=I[Ye];Ft&&Ft.clear(),I[Ye]=V.setBookmark(tt)}if(xe){var Ze=xe.find();Ze&&!ge(Ze,Q)&&ye(Q)}else ye(Q);ye(se),C=y,k=y-p+1,k<0&&(k=0)}function H(V,Q){y+=Q,y>C?y=C:y<k&&(y=k);var se=I[(p+y)%p];if(se&&!se.find()){var Ce=Q>0?1:-1,xe,ye=V.getCursor();do if(y+=Ce,se=I[(p+y)%p],se&&(xe=se.find())&&!ge(ye,xe))break;while(y<C&&y>k)}return se}function W(V,Q){var se=y,Ce=H(V,Q);return y=se,Ce&&Ce.find()}return{cachedCursor:void 0,add:M,find:W,move:H}},dt=function(p){return p?{changes:p.changes,expectCursorActivityForChange:p.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function be(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=dt()}be.prototype={exitMacroRecordMode:function(){var p=X.macroModeState;p.onRecordingDone&&p.onRecordingDone(),p.onRecordingDone=void 0,p.isRecording=!1},enterMacroRecordMode:function(p,y){var C=X.registerController.getRegister(y);C&&(C.clear(),this.latestRegister=y,p.openDialog&&(this.onRecordingDone=p.openDialog(document.createTextNode("(recording)["+y+"]"),null,{bottom:!0})),this.isRecording=!0)}};function we(S){return S.state.vim||(S.state.vim={inputState:new G,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:{}}),S.state.vim}var X;function R(){X={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Xe(),macroModeState:new be,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Ti({}),searchHistoryController:new kt,exCommandHistoryController:new kt};for(var S in ve){var p=ve[S];p.value=p.defaultValue}}var ne,me={buildKeyMap:function(){},getRegisterController:function(){return X.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return X},maybeInitVimState_:we,suppressErrorLogging:!1,InsertModeKey:I3,map:function(p,y,C){ea.map(p,y,C)},unmap:function(p,y){return ea.unmap(p,y)},noremap:function(p,y,C){function k(xe){return xe?[xe]:["normal","insert","visual"]}for(var I=k(C),M=wn.length,H=WQ,W=M-H;W<M&&I.length;W++){var V=wn[W];if(V.keys==y&&(!C||!V.context||V.context===C)&&V.type.substr(0,2)!=="ex"&&V.type.substr(0,3)!=="key"){var Q={};for(var se in V)Q[se]=V[se];Q.keys=p,C&&!Q.context&&(Q.context=C),this._mapCommand(Q);var Ce=k(V.context);I=I.filter(function(xe){return Ce.indexOf(xe)===-1})}}},mapclear:function(p){var y=wn.length,C=WQ,k=wn.slice(0,y-C);if(wn=wn.slice(y-C),p)for(var I=k.length-1;I>=0;I--){var M=k[I];if(p!==M.context)if(M.context)this._mapCommand(M);else{var H=["normal","insert","visual"];for(var W in H)if(H[W]!==p){var V={};for(var Q in M)V[Q]=M[Q];V.context=H[W],this._mapCommand(V)}}}},setOption:Ee,getOption:Oe,defineOption:Pe,defineEx:function(p,y,C){if(!y)y=p;else if(p.indexOf(y)!==0)throw new Error('(Vim.defineEx) "'+y+'" is not a prefix of "'+p+'", command not registered');A9[p]=C,ea.commandMap_[y]={name:p,shortName:y,type:"api"}},handleKey:function(p,y,C){var k=this.findKey(p,y,C);if(typeof k=="function")return k()},findKey:function(p,y,C){var k=we(p);function I(){var se=X.macroModeState;if(se.isRecording){if(y=="q")return se.exitMacroRecordMode(),Et(p),!0;C!="mapping"&&ere(se,y)}}function M(){if(y=="<Esc>"){if(k.visualMode)Qs(p);else if(k.insertMode)xm(p);else return;return Et(p),!0}}function H(se){for(var Ce;se;)Ce=/<\w+-.+?>|<\w+>|./.exec(se),y=Ce[0],se=se.substring(Ce.index+y.length),me.handleKey(p,y,"mapping")}function W(){if(M())return!0;for(var se=k.inputState.keyBuffer=k.inputState.keyBuffer+y,Ce=y.length==1,xe=Ei.matchCommand(se,wn,k.inputState,"insert");se.length>1&&xe.type!="full";){var se=k.inputState.keyBuffer=se.slice(1),ye=Ei.matchCommand(se,wn,k.inputState,"insert");ye.type!="none"&&(xe=ye)}if(xe.type=="none")return Et(p),!1;if(xe.type=="partial")return ne&&window.clearTimeout(ne),ne=window.setTimeout(function(){k.insertMode&&k.inputState.keyBuffer&&Et(p)},Oe("insertModeEscKeysTimeout")),!Ce;if(ne&&window.clearTimeout(ne),Ce){for(var Ze=p.listSelections(),tt=0;tt<Ze.length;tt++){var Ye=Ze[tt].head;p.replaceRange("",hr(Ye,0,-(se.length-1)),Ye,"+input")}X.macroModeState.lastInsertModeChanges.changes.pop()}return Et(p),xe.command}function V(){if(I()||M())return!0;var se=k.inputState.keyBuffer=k.inputState.keyBuffer+y;if(/^[1-9]\d*$/.test(se))return!0;var Ze=/^(\d*)(.*)$/.exec(se);if(!Ze)return Et(p),!1;var Ce=k.visualMode?"visual":"normal",xe=Ze[2]||Ze[1];k.inputState.operatorShortcut&&k.inputState.operatorShortcut.slice(-1)==xe&&(xe=k.inputState.operatorShortcut);var ye=Ei.matchCommand(xe,wn,k.inputState,Ce);if(ye.type=="none")return Et(p),!1;if(ye.type=="partial")return!0;k.inputState.keyBuffer="";var Ze=/^(\d*)(.*)$/.exec(se);return Ze[1]&&Ze[1]!="0"&&k.inputState.pushRepeatDigit(Ze[1]),ye.command}var Q;return k.insertMode?Q=W():Q=V(),Q===!1?!k.insertMode&&y.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){return p.operation(function(){p.curOp.isVimOp=!0;try{Q.type=="keyToKey"?H(Q.toKeys):Ei.processCommand(p,k,Q)}catch(se){throw p.state.vim=void 0,we(p),me.suppressErrorLogging||console.log(se),se}return!0})}},handleEx:function(p,y){ea.processCommand(p,y)},defineMotion:xo,defineAction:ru,defineOperator:Ec,mapCommand:Zie,_mapCommand:D9,defineRegister:ai,exitVisualMode:Qs,exitInsertMode:xm};function G(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}G.prototype.pushRepeatDigit=function(S){this.operator?this.motionRepeat=this.motionRepeat.concat(S):this.prefixRepeat=this.prefixRepeat.concat(S)},G.prototype.getRepeat=function(){var S=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(S=1,this.prefixRepeat.length>0&&(S*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(S*=parseInt(this.motionRepeat.join(""),10))),S};function Et(S,p){S.state.vim.inputState=new G,ut.default.signal(S,"vim-command-done",p)}function Ot(S,p,y){this.clear(),this.keyBuffer=[S||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!p,this.blockwise=!!y}Ot.prototype={setText:function(p,y,C){this.keyBuffer=[p||""],this.linewise=!!y,this.blockwise=!!C},pushText:function(p,y){y&&(this.linewise||this.keyBuffer.push(` +`)}},{key:"replaceRange",value:function(t,r,n){var o=$r(r),s=n?$r(n):o;this.editor.executeEdits("vim",[{text:t,range:Pi.Range.fromPositions(o,s)}]),this.pushUndoStop()}},{key:"pushUndoStop",value:function(){this.editor.pushUndoStop()}},{key:"setCursor",value:function(t,r){var n=t;bN(t)!=="object"&&(n={},n.line=t,n.ch=r);var o=this.editor.getModel().validatePosition($r(n));this.editor.setPosition($r(n)),this.editor.revealPosition(o)}},{key:"somethingSelected",value:function(){return!this.editor.getSelection().isEmpty()}},{key:"operation",value:function(t,r){return t()}},{key:"listSelections",value:function(){var t=this,r=this.editor.getSelections();return!r.length||this.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:r.map(function(n){var o=n.getPosition(),s=n.getStartPosition(),a=n.getEndPosition();return{anchor:t.clipPos(gs(t.getAnchorForSelection(n))),head:t.clipPos(gs(t.getHeadForSelection(n)))}})}},{key:"focus",value:function(){this.editor.focus()}},{key:"setSelections",value:function(t,r){var n=!!this.editor.getSelections().length,o=t.map(function(l,c){var d=l.anchor,u=l.head;return n?Pi.Selection.fromPositions($r(d),$r(u)):Pi.Selection.fromPositions($r(u),$r(d))});if(r&&o[r]&&o.push(o.splice(r,1)[0]),!!o.length){var s=o[0],a;s.getDirection()===Pi.SelectionDirection.LTR?a=s.getEndPosition():a=s.getStartPosition(),this.editor.setSelections(o),this.editor.revealPosition(a)}}},{key:"setSelection",value:function(t,r){var n=Pi.Range.fromPositions($r(t),$r(r));this.editor.setSelection(n)}},{key:"getSelections",value:function(){var t=this.editor;return t.getSelections().map(function(r){return t.getModel().getValueInRange(r)})}},{key:"replaceSelections",value:function(t){var r=this.editor;r.getSelections().forEach(function(n,o){r.executeEdits("vim",[{range:n,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,r){return{top:t.line,left:t.ch}}},{key:"coordsChar",value:function(t,r){}},{key:"clipPos",value:function(t){var r=this.editor.getModel().validatePosition($r(t));return gs(r)}},{key:"setBookmark",value:function(t,r){var n=new p_e(this,this.$uid++,t.line,t.ch);return(!r||!r.insertLeft)&&(n.$insertRight=!0),this.marks[n.id]=n,n}},{key:"getScrollInfo",value:function(){var t=this.editor,r=t.getVisibleRanges(),n=n_e(r,1),o=n[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 r=this.getConfiguration();this.initialCursorWidth=r.viewInfo.cursorWidth||0,this.editor.updateOptions({cursorWidth:r.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 r={top:1/0,bottom:0};return t.reduce(function(n,o){return o.startLineNumber<n.top&&(n.top=o.startLineNumber),o.endLineNumber>n.bottom&&(n.bottom=o.endLineNumber),n},r),r.top-=1,r.bottom-=1,r}},{key:"findPosV",value:function(t,r,n){var o=this.editor,s=r,a=n,l=$r(t);if(n==="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),gs(l)}},{key:"findMatchingBracket",value:function(t){var r=$r(t),n=this.editor.getModel(),o;if(n.bracketPairs)o=n.bracketPairs.matchBracket(r);else{var s;o=(s=n.matchBracket)===null||s===void 0?void 0:s.call(n,r)}return!o||o.length!==2?{to:null}:{to:gs(o[1].getStartPosition())}}},{key:"findFirstNonWhiteSpaceCharacter",value:function(t){return this.editor.getModel().getLineFirstNonWhitespaceColumn(t+1)-1}},{key:"scrollTo",value:function(t,r){!t&&!r||t||(r<0&&(r=this.editor.getPosition().lineNumber-r),this.editor.setScrollTop(this.editor.getTopForLineNumber(r+1)))}},{key:"moveCurrentLineTo",value:function(t){var r,n=this.editor,o=n.getPosition(),s=Pi.Range.fromPositions(o,o);switch(t){case"top":n.revealRangeAtTop(s);return;case"center":n.revealRangeInCenter(s);return;case"bottom":(r=n._revealRange)===null||r===void 0||r.call(n,s,c_e.Bottom);return}}},{key:"getSearchCursor",value:function(t,r){var n=!1,o=!1;t instanceof RegExp&&!t.global&&(n=!t.ignoreCase,t=t.source,o=!0),r.ch==null&&(r.ch=Number.MAX_VALUE);var s=$r(r),a=this,l=this.editor,c=null,d=l.getModel(),u=d.findMatches(t,!1,o,n)||[];return{getMatches:function(){return u},findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},jumpTo:function(f){if(!u||!u.length)return!1;var m=u[f];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(f){if(!u||!u.length)return!1;var m;if(f){var g=c?c.getStartPosition():s;if(m=d.findPreviousMatch(t,g,o,n),!m||!m.range.getStartPosition().isBeforeOrEqual(g))return!1}else{var w=c?d.getPositionAt(d.getOffsetAt(c.getStartPosition())+1):s;if(m=d.findNextMatch(t,w,o,n),!m||!w.isBeforeOrEqual(m.range.getStartPosition()))return!1}return c=m.range,a.highlightRanges([c],"currentFindMatch"),a.highlightRanges(u.map(function(_){return _.range}).filter(function(_){return!_.equalsRange(c)})),c},from:function(){return c&&gs(c.getStartPosition())},to:function(){return c&&gs(c.getEndPosition())},replace:function(f){c&&(l.executeEdits("vim",[{range:c,text:f,forceMoveMarkers:!0}]),c.setEndPosition(l.getPosition()),l.setPosition(c.getStartPosition()))}}}},{key:"highlightRanges",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"findMatch",n="decoration".concat(r);return this[n]=this.editor.deltaDecorations(this[n]||[],t.map(function(o){return{range:o,options:{stickiness:Pi.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,zIndex:13,className:r,showIfCollapsed:!0}}})),this[n]}},{key:"addOverlay",value:function(t,r,n){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(r){t.editor.deltaDecorations(t["decoration".concat(r)]||[],[])})}},{key:"scrollIntoView",value:function(t){t&&this.editor.revealPosition($r(t))}},{key:"moveH",value:function(t,r){if(r==="char"){var n=this.editor.getPosition();this.editor.setPosition(new Pi.Position(n.lineNumber,n.column+t))}}},{key:"scanForBracket",value:function(t,r,n,o){for(var s=o.bracketRegex,a=$r(t),l=this.editor.getModel(),c=(r===-1?l.findPreviousMatch:l.findNextMatch).bind(l),d=[],u=0;;){if(u>10)return;var h=c(s.source,a,!0,!0,null,!0),f=h.matches[0];if(h===void 0)return;var m=i.matchingBrackets[f];if(m&&m.charAt(1)===">"==r>0)d.push(f);else if(d.length===0){var g=h.range.getStartPosition();return{pos:gs(g)}}else d.pop();a=l.getPositionAt(l.getOffsetAt(h.range.getStartPosition())+r),u+=1}}},{key:"indexFromPos",value:function(t){return this.editor.getModel().getOffsetAt($r(t))}},{key:"posFromIndex",value:function(t){return gs(this.editor.getModel().getPositionAt(t))}},{key:"indentLine",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.editor,o;n._getViewModel?o=n._getViewModel().cursorConfig:o=n._getCursors().context.config;var s=new Pi.Position(t+1,1),a=Pi.Selection.fromPositions(s,s);n.executeCommand("vim",new r_e.ShiftCommand(a,{isUnshift:!r,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,r,n){if(this.statusBar)return this.statusBar.setSec(t,r,n)}},{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 r=this.editor.getPosition();t==="start"?r.column=1:t==="end"&&(r.column=this.editor.getModel().getLineMaxColumn(r.lineNumber)),this.editor.setPosition(r)}},{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}();or.Pos=S4;or.signal=f_e;or.on=cv("on");or.off=cv("off");or.addClass=cv("addClass");or.rmClass=cv("rmClass");or.defineOption=cv("defineOption");or.keyMap={default:function(e){return function(t){return!0}}};or.matchingBrackets={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};or.isWordChar=h_e;or.keyName=jQ;or.StringStream=UQ;or.e_stop=function(i){return i.stopPropagation?i.stopPropagation():i.cancelBubble=!0,or.e_preventDefault(i),!1};or.e_preventDefault=function(i){return i.preventDefault?(i.preventDefault(),i.browserEvent&&i.browserEvent.preventDefault()):i.returnValue=!1,!1};or.commands={redo:function(e){e.editor.getModel().redo()},undo:function(e){e.editor.getModel().undo()},newlineAndIndent:function(e){e.triggerEditorAction("editor.action.insertLineAfter")}};or.lookupKey=function i(e,t,r){typeof t=="string"&&(t=or.keyMap[t]);var n=typeof t=="function"?t(e):t[e];if(n===!1)return"nothing";if(n==="...")return"multi";if(n!=null&&r(n))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return i(e,t.fallthrough,r);for(var o=0;o<t.fallthrough.length;o++){var s=i(e,t.fallthrough[o],r);if(s)return s}}};or.defineExtension=function(i,e){or.prototype[i]=e};var m_e=function(){var e=this;this.handleKeyDown=function(t){if(!(t.browserEvent.defaultPrevented&t.keyCode!==Pi.KeyCode.Escape)&&e.attached){var r=jQ(t);if(e.replaceMode&&e.handleReplaceMode(r,t),!!r){var n=e.state.keyMap;if(or.keyMap[n]&&or.keyMap[n].call){var o=or.keyMap[n].call(r,e);if(o){t.preventDefault(),t.stopPropagation();try{o()}catch(s){console.error(s)}}}}}},this.handleCursorChange=function(t){var r=t.position,n=t.source,o=e.editor,s=o.getSelection();if(!e.ctxInsert.get()&&t.source==="mouse"&&s.isEmpty()){var a=o.getModel().getLineMaxColumn(r.lineNumber);if(t.position.column===a){o.setPosition(new Pi.Position(t.position.lineNumber,a-1));return}}e.dispatch("cursorActivity",e,t)},this.handleChange=function(t){var r=t.changes,n={text:r.reduce(function(s,a){return s.push(a.text),s},[]),origin:"+input"},o=e.curOp=e.curOp||{};o.changeHandlers||(o.changeHandlers=e.listeners.change&&e.listeners.change.slice()),!e.virtualSelectionMode()&&(o.lastChange?o.lastChange.next=o.lastChange=n:o.lastChange=o.change=n,e.dispatch("change",e,n))}},g_e=or;k4.default=g_e});var $Q=Xi(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.default=um.Vim=void 0;var ut=b_e(WQ());function b_e(i){return i&&i.__esModule?i:{default:i}}function E4(i){"@babel/helpers - typeof";return E4=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},E4(i)}var Ve=ut.default.Pos;function v_e(i,e){var t=i.state.vim;if(!t||t.insertMode)return e.head;var r=t.sel.head;if(!r)return e.head;if(!(t.visualBlock&&e.head.line!=r.line))return e.from()==e.anchor&&!e.empty()&&e.head.line==r.line&&e.head.ch!=r.ch?new Ve(e.head.line,e.head.ch-1):e.head}var wn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",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:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",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:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",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<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",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:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",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:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",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:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",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<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",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:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',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<CR>",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:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",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"}],VQ=wn.length,qQ=[{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"}],KQ=function(){function e(S){S.setOption("disableInput",!0),S.setOption("showCursorWhenSelecting",!1),ut.default.signal(S,"vim-mode-change",{mode:"normal"}),S.on("cursorActivity",R9),we(S),S.enterVimMode()}function t(S){S.setOption("disableInput",!1),S.off("cursorActivity",R9),S.state.vim=null,Dv&&clearTimeout(Dv),S.leaveVimMode()}function r(S,p){S.attached=!1,this==ut.default.keyMap.vim&&(S.options.$customCursor=null),(!p||p.attach!=n)&&t(S)}function n(S,p){this==ut.default.keyMap.vim&&(S.attached=!0,S.curOp&&(S.curOp.selectionChanged=!0),S.options.$customCursor=v_e),(!p||p.attach!=n)&&e(S)}ut.default.defineOption("vimMode",!1,function(S,p,y){p&&S.getOption("keyMap")!="vim"?S.setOption("keyMap","vim"):!p&&y!=ut.default.Init&&/^vim/.test(S.getOption("keyMap"))&&S.setOption("keyMap","default")});function o(S,p){if(p){if(this[S])return this[S];var y=l(S);if(!y)return!1;var C=me.findKey(p,y);return typeof C=="function"&&ut.default.signal(p,"vim-keypress",y),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(S){if(S.charAt(0)=="'")return S.charAt(1);if(S==="AltGraph")return!1;var p=S.split(/-(?!$)/),y=p[p.length-1];if(p.length==1&&p[0].length==1)return!1;if(p.length==2&&p[0]=="Shift"&&y.length==1)return!1;for(var C=!1,k=0;k<p.length;k++){var I=p[k];I in s?p[k]=s[I]:C=!0,I in a&&(p[k]=a[I])}return C?(Y(y)&&(p[p.length-1]=y.toLowerCase()),"<"+p.join("-")+">"):!1}var c=/[\d]/,d=[ut.default.isWordChar,function(S){return S&&!ut.default.isWordChar(S)&&!/\s/.test(S)}],u=[function(S){return/\S/.test(S)}];function h(S,p){for(var y=[],C=S;C<S+p;C++)y.push(String.fromCharCode(C));return y}var f=h(65,26),m=h(97,26),g=h(48,10),w=[].concat(f,m,g,["<",">"]),_=[].concat(f,m,g,["-",'"',".",":","_","/"]),E;try{E=new RegExp("^[\\p{Lu}]$","u")}catch(S){E=/^[A-Z]$/}function A(S,p){return p>=S.firstLine()&&p<=S.lastLine()}function L(S){return/^[a-z]$/.test(S)}function O(S){return"()[]{}".indexOf(S)!=-1}function U(S){return c.test(S)}function Y(S){return E.test(S)}function oe(S){return/^\s*$/.test(S)}function te(S){return".?!".indexOf(S)!=-1}function Z(S,p){for(var y=0;y<p.length;y++)if(p[y]==S)return!0;return!1}var ve={};function Pe(S,p,y,C,k){if(p===void 0&&!k)throw Error("defaultValue is required unless callback is provided");if(y||(y="string"),ve[S]={type:y,defaultValue:p,callback:k},C)for(var I=0;I<C.length;I++)ve[C[I]]=ve[S];p&&Ee(S,p)}function Ee(S,p,y,C){var k=ve[S];C=C||{};var I=C.scope;if(!k)return new Error("Unknown option: "+S);if(k.type=="boolean"){if(p&&p!==!0)return new Error("Invalid argument: "+S+"="+p);p!==!1&&(p=!0)}k.callback?(I!=="local"&&k.callback(p,void 0),I!=="global"&&y&&k.callback(p,y)):(I!=="local"&&(k.value=k.type=="boolean"?!!p:p),I!=="global"&&y&&(y.state.vim.options[S]={value:p}))}function Oe(S,p,y){var C=ve[S];y=y||{};var k=y.scope;if(!C)return new Error("Unknown option: "+S);if(C.callback){var I=p&&C.callback(void 0,p);return k!=="global"&&I!==void 0?I:k!=="local"?C.callback():void 0}else{var I=k!=="global"&&p&&p.state.vim.options[S];return(I||k!=="local"&&C||{}).value}}Pe("filetype",void 0,"string",["ft"],function(S,p){if(p!==void 0)if(S===void 0){var y=p.getOption("mode");return y=="null"?"":y}else{var y=S==""?"null":S;p.setOption("mode",y)}});var Xe=function(){var p=100,y=-1,C=0,k=0,I=new Array(p);function M(V,Q,se){var Ce=y%p,xe=I[Ce];function ye(tt){var Ye=++y%p,Ft=I[Ye];Ft&&Ft.clear(),I[Ye]=V.setBookmark(tt)}if(xe){var Ze=xe.find();Ze&&!ge(Ze,Q)&&ye(Q)}else ye(Q);ye(se),C=y,k=y-p+1,k<0&&(k=0)}function H(V,Q){y+=Q,y>C?y=C:y<k&&(y=k);var se=I[(p+y)%p];if(se&&!se.find()){var Ce=Q>0?1:-1,xe,ye=V.getCursor();do if(y+=Ce,se=I[(p+y)%p],se&&(xe=se.find())&&!ge(ye,xe))break;while(y<C&&y>k)}return se}function W(V,Q){var se=y,Ce=H(V,Q);return y=se,Ce&&Ce.find()}return{cachedCursor:void 0,add:M,find:W,move:H}},dt=function(p){return p?{changes:p.changes,expectCursorActivityForChange:p.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function be(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=dt()}be.prototype={exitMacroRecordMode:function(){var p=X.macroModeState;p.onRecordingDone&&p.onRecordingDone(),p.onRecordingDone=void 0,p.isRecording=!1},enterMacroRecordMode:function(p,y){var C=X.registerController.getRegister(y);C&&(C.clear(),this.latestRegister=y,p.openDialog&&(this.onRecordingDone=p.openDialog(document.createTextNode("(recording)["+y+"]"),null,{bottom:!0})),this.isRecording=!0)}};function we(S){return S.state.vim||(S.state.vim={inputState:new G,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:{}}),S.state.vim}var X;function R(){X={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Xe(),macroModeState:new be,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Ti({}),searchHistoryController:new kt,exCommandHistoryController:new kt};for(var S in ve){var p=ve[S];p.value=p.defaultValue}}var ne,me={buildKeyMap:function(){},getRegisterController:function(){return X.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return X},maybeInitVimState_:we,suppressErrorLogging:!1,InsertModeKey:L3,map:function(p,y,C){ea.map(p,y,C)},unmap:function(p,y){return ea.unmap(p,y)},noremap:function(p,y,C){function k(xe){return xe?[xe]:["normal","insert","visual"]}for(var I=k(C),M=wn.length,H=VQ,W=M-H;W<M&&I.length;W++){var V=wn[W];if(V.keys==y&&(!C||!V.context||V.context===C)&&V.type.substr(0,2)!=="ex"&&V.type.substr(0,3)!=="key"){var Q={};for(var se in V)Q[se]=V[se];Q.keys=p,C&&!Q.context&&(Q.context=C),this._mapCommand(Q);var Ce=k(V.context);I=I.filter(function(xe){return Ce.indexOf(xe)===-1})}}},mapclear:function(p){var y=wn.length,C=VQ,k=wn.slice(0,y-C);if(wn=wn.slice(y-C),p)for(var I=k.length-1;I>=0;I--){var M=k[I];if(p!==M.context)if(M.context)this._mapCommand(M);else{var H=["normal","insert","visual"];for(var W in H)if(H[W]!==p){var V={};for(var Q in M)V[Q]=M[Q];V.context=H[W],this._mapCommand(V)}}}},setOption:Ee,getOption:Oe,defineOption:Pe,defineEx:function(p,y,C){if(!y)y=p;else if(p.indexOf(y)!==0)throw new Error('(Vim.defineEx) "'+y+'" is not a prefix of "'+p+'", command not registered');D9[p]=C,ea.commandMap_[y]={name:p,shortName:y,type:"api"}},handleKey:function(p,y,C){var k=this.findKey(p,y,C);if(typeof k=="function")return k()},findKey:function(p,y,C){var k=we(p);function I(){var se=X.macroModeState;if(se.isRecording){if(y=="q")return se.exitMacroRecordMode(),Et(p),!0;C!="mapping"&&ere(se,y)}}function M(){if(y=="<Esc>"){if(k.visualMode)Qs(p);else if(k.insertMode)xm(p);else return;return Et(p),!0}}function H(se){for(var Ce;se;)Ce=/<\w+-.+?>|<\w+>|./.exec(se),y=Ce[0],se=se.substring(Ce.index+y.length),me.handleKey(p,y,"mapping")}function W(){if(M())return!0;for(var se=k.inputState.keyBuffer=k.inputState.keyBuffer+y,Ce=y.length==1,xe=Ei.matchCommand(se,wn,k.inputState,"insert");se.length>1&&xe.type!="full";){var se=k.inputState.keyBuffer=se.slice(1),ye=Ei.matchCommand(se,wn,k.inputState,"insert");ye.type!="none"&&(xe=ye)}if(xe.type=="none")return Et(p),!1;if(xe.type=="partial")return ne&&window.clearTimeout(ne),ne=window.setTimeout(function(){k.insertMode&&k.inputState.keyBuffer&&Et(p)},Oe("insertModeEscKeysTimeout")),!Ce;if(ne&&window.clearTimeout(ne),Ce){for(var Ze=p.listSelections(),tt=0;tt<Ze.length;tt++){var Ye=Ze[tt].head;p.replaceRange("",hr(Ye,0,-(se.length-1)),Ye,"+input")}X.macroModeState.lastInsertModeChanges.changes.pop()}return Et(p),xe.command}function V(){if(I()||M())return!0;var se=k.inputState.keyBuffer=k.inputState.keyBuffer+y;if(/^[1-9]\d*$/.test(se))return!0;var Ze=/^(\d*)(.*)$/.exec(se);if(!Ze)return Et(p),!1;var Ce=k.visualMode?"visual":"normal",xe=Ze[2]||Ze[1];k.inputState.operatorShortcut&&k.inputState.operatorShortcut.slice(-1)==xe&&(xe=k.inputState.operatorShortcut);var ye=Ei.matchCommand(xe,wn,k.inputState,Ce);if(ye.type=="none")return Et(p),!1;if(ye.type=="partial")return!0;k.inputState.keyBuffer="";var Ze=/^(\d*)(.*)$/.exec(se);return Ze[1]&&Ze[1]!="0"&&k.inputState.pushRepeatDigit(Ze[1]),ye.command}var Q;return k.insertMode?Q=W():Q=V(),Q===!1?!k.insertMode&&y.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){return p.operation(function(){p.curOp.isVimOp=!0;try{Q.type=="keyToKey"?H(Q.toKeys):Ei.processCommand(p,k,Q)}catch(se){throw p.state.vim=void 0,we(p),me.suppressErrorLogging||console.log(se),se}return!0})}},handleEx:function(p,y){ea.processCommand(p,y)},defineMotion:xo,defineAction:ru,defineOperator:Ec,mapCommand:Zie,_mapCommand:M9,defineRegister:ai,exitVisualMode:Qs,exitInsertMode:xm};function G(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}G.prototype.pushRepeatDigit=function(S){this.operator?this.motionRepeat=this.motionRepeat.concat(S):this.prefixRepeat=this.prefixRepeat.concat(S)},G.prototype.getRepeat=function(){var S=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(S=1,this.prefixRepeat.length>0&&(S*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(S*=parseInt(this.motionRepeat.join(""),10))),S};function Et(S,p){S.state.vim.inputState=new G,ut.default.signal(S,"vim-command-done",p)}function Ot(S,p,y){this.clear(),this.keyBuffer=[S||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!p,this.blockwise=!!y}Ot.prototype={setText:function(p,y,C){this.keyBuffer=[p||""],this.linewise=!!y,this.blockwise=!!C},pushText:function(p,y){y&&(this.linewise||this.keyBuffer.push(` `),this.linewise=!0),this.keyBuffer.push(p)},pushInsertModeChanges:function(p){this.insertModeChanges.push(dt(p))},pushSearchQuery:function(p){this.searchQueries.push(p)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}};function ai(S,p){var y=X.registerController.registers;if(!S||S.length!=1)throw Error("Register name must be 1 character");if(y[S])throw Error("Register already defined "+S);y[S]=p,_.push(S)}function Ti(S){this.registers=S,this.unnamedRegister=S['"']=new Ot,S["."]=new Ot,S[":"]=new Ot,S["/"]=new Ot}Ti.prototype={pushText:function(p,y,C,k,I){if(p!=="_"){k&&C.charAt(C.length-1)!==` `&&(C+=` `);var M=this.isValidRegister(p)?this.getRegister(p):null;if(!M){switch(y){case"yank":this.registers[0]=new Ot(C,k,I);break;case"delete":case"change":C.indexOf(` -`)==-1?this.registers["-"]=new Ot(C,k):(this.shiftNumericRegisters_(),this.registers[1]=new Ot(C,k));break}this.unnamedRegister.setText(C,k,I);return}var H=Y(p);H?M.pushText(C,k):M.setText(C,k,I),this.unnamedRegister.setText(M.toString(),k)}},getRegister:function(p){return this.isValidRegister(p)?(p=p.toLowerCase(),this.registers[p]||(this.registers[p]=new Ot),this.registers[p]):this.unnamedRegister},isValidRegister:function(p){return p&&Z(p,_)},shiftNumericRegisters_:function(){for(var p=9;p>=2;p--)this.registers[p]=this.getRegister(""+(p-1))}};function kt(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}kt.prototype={nextMatch:function(p,y){var C=this.historyBuffer,k=y?-1:1;this.initialPrefix===null&&(this.initialPrefix=p);for(var I=this.iterator+k;y?I>=0:I<C.length;I+=k)for(var M=C[I],H=0;H<=M.length;H++)if(this.initialPrefix==M.substring(0,H))return this.iterator=I,M;if(I>=C.length)return this.iterator=C.length,this.initialPrefix;if(I<0)return p},pushInput:function(p){var y=this.historyBuffer.indexOf(p);y>-1&&this.historyBuffer.splice(y,1),p.length&&this.historyBuffer.push(p)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ei={matchCommand:function(p,y,C,k){var I=w3(p,y,k,C);if(!I.full&&!I.partial)return{type:"none"};if(!I.full&&I.partial)return{type:"partial"};for(var M,H=0;H<I.full.length;H++){var W=I.full[H];M||(M=W)}if(M.keys.slice(-11)=="<character>"){var V=C3(p);if(!V)return{type:"none"};C.selectedCharacter=V}return{type:"full",command:M}},processCommand:function(p,y,C){switch(y.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(p,y,C);break;case"operator":this.processOperator(p,y,C);break;case"operatorMotion":this.processOperatorMotion(p,y,C);break;case"action":this.processAction(p,y,C);break;case"search":this.processSearch(p,y,C);break;case"ex":case"keyToEx":this.processEx(p,y,C);break;default:break}},processMotion:function(p,y,C){y.inputState.motion=C.motion,y.inputState.motionArgs=Ko(C.motionArgs),this.evalInput(p,y)},processOperator:function(p,y,C){var k=y.inputState;if(k.operator)if(k.operator==C.operator){k.motion="expandToLine",k.motionArgs={linewise:!0},this.evalInput(p,y);return}else Et(p);k.operator=C.operator,k.operatorArgs=Ko(C.operatorArgs),C.keys.length>1&&(k.operatorShortcut=C.keys),C.exitVisualBlock&&(y.visualBlock=!1,$h(p)),y.visualMode&&this.evalInput(p,y)},processOperatorMotion:function(p,y,C){var k=y.visualMode,I=Ko(C.operatorMotionArgs);I&&k&&I.visualLine&&(y.visualLine=!0),this.processOperator(p,y,C),k||this.processMotion(p,y,C)},processAction:function(p,y,C){var k=y.inputState,I=k.getRepeat(),M=!!I,H=Ko(C.actionArgs)||{};k.selectedCharacter&&(H.selectedCharacter=k.selectedCharacter),C.operator&&this.processOperator(p,y,C),C.motion&&this.processMotion(p,y,C),(C.motion||C.operator)&&this.evalInput(p,y),H.repeat=I||1,H.repeatIsExplicit=M,H.registerName=k.registerName,Et(p),y.lastMotion=null,C.isEdit&&this.recordLastEdit(y,k,C),rl[C.action](p,H,y)},processSearch:function(p,y,C){if(!p.getSearchCursor)return;var k=C.searchArgs.forward,I=C.searchArgs.wholeWordOnly;Js(p).setReversed(!k);var M=k?"/":"?",H=Js(p).getQuery(),W=p.getScrollInfo();function V(Ye,Ft,Tt){X.searchHistoryController.pushInput(Ye),X.searchHistoryController.reset();try{wm(p,Ye,Ft,Tt)}catch(It){Bi(p,"Invalid regex: "+Ye),Et(p);return}Ei.processMotion(p,y,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function Q(Ye){p.scrollTo(W.left,W.top),V(Ye,!0,!0);var Ft=X.macroModeState;Ft.isRecording&&ire(Ft,Ye)}function se(Ye,Ft,Tt){var It=ut.default.keyName(Ye),Hi,no;It=="Up"||It=="Down"?(Hi=It=="Up",no=Ye.target?Ye.target.selectionEnd:0,Ft=X.searchHistoryController.nextMatch(Ft,Hi)||"",Tt(Ft),no&&Ye.target&&(Ye.target.selectionEnd=Ye.target.selectionStart=Math.min(no,Ye.target.value.length))):It!="Left"&&It!="Right"&&It!="Ctrl"&&It!="Alt"&&It!="Shift"&&X.searchHistoryController.reset();var fr;try{fr=wm(p,Ft,!0,!0)}catch(Un){}fr?p.scrollIntoView(E9(p,!k,fr),30):(E3(p),p.scrollTo(W.left,W.top))}function Ce(Ye,Ft,Tt){var It=ut.default.keyName(Ye);It=="Esc"||It=="Ctrl-C"||It=="Ctrl-["||It=="Backspace"&&Ft==""?(X.searchHistoryController.pushInput(Ft),X.searchHistoryController.reset(),wm(p,H),E3(p),p.scrollTo(W.left,W.top),ut.default.e_stop(Ye),Et(p),Tt(),p.focus()):It=="Up"||It=="Down"?ut.default.e_stop(Ye):It=="Ctrl-U"&&(ut.default.e_stop(Ye),Tt(""))}switch(C.searchArgs.querySrc){case"prompt":var xe=X.macroModeState;if(xe.isPlaying){var tt=xe.replaySearchQueries.shift();V(tt,!0,!1)}else Av(p,{onClose:Q,prefix:M,desc:"(JavaScript regexp)",onKeyUp:se,onKeyDown:Ce});break;case"wordUnderCursor":var ye=Lv(p,!1,!0,!1,!0),Ze=!0;if(ye||(ye=Lv(p,!1,!0,!1,!1),Ze=!1),!ye)return;var tt=p.getLine(ye.start.line).substring(ye.start.ch,ye.end.ch);Ze&&I?tt="\\b"+tt+"\\b":tt=vs(tt),X.jumpList.cachedCursor=p.getCursor(),p.setCursor(ye.start),V(tt,!0,!1);break}},processEx:function(p,y,C){function k(M){X.exCommandHistoryController.pushInput(M),X.exCommandHistoryController.reset(),ea.processCommand(p,M)}function I(M,H,W){var V=ut.default.keyName(M),Q,se;(V=="Esc"||V=="Ctrl-C"||V=="Ctrl-["||V=="Backspace"&&H=="")&&(X.exCommandHistoryController.pushInput(H),X.exCommandHistoryController.reset(),ut.default.e_stop(M),Et(p),W(),p.focus()),V=="Up"||V=="Down"?(ut.default.e_stop(M),Q=V=="Up",se=M.target?M.target.selectionEnd:0,H=X.exCommandHistoryController.nextMatch(H,Q)||"",W(H),se&&M.target&&(M.target.selectionEnd=M.target.selectionStart=Math.min(se,M.target.value.length))):V=="Ctrl-U"?(ut.default.e_stop(M),W("")):V!="Left"&&V!="Right"&&V!="Ctrl"&&V!="Alt"&&V!="Shift"&&X.exCommandHistoryController.reset()}C.type=="keyToEx"?ea.processCommand(p,C.exArgs.input):y.visualMode?Av(p,{onClose:k,prefix:":",value:"'<,'>",onKeyDown:I,selectValueOnOpen:!1}):Av(p,{onClose:k,prefix:":",onKeyDown:I})},evalInput:function(p,y){var C=y.inputState,k=C.motion,I=C.motionArgs||{},M=C.operator,H=C.operatorArgs||{},W=C.registerName,V=y.sel,Q=Yi(y.visualMode?Or(p,V.head):p.getCursor("head")),se=Yi(y.visualMode?Or(p,V.anchor):p.getCursor("anchor")),Ce=Yi(Q),xe=Yi(se),ye,Ze,tt;if(M&&this.recordLastEdit(y,C),C.repeatOverride!==void 0?tt=C.repeatOverride:tt=C.getRepeat(),tt>0&&I.explicitRepeat?I.repeatIsExplicit=!0:(I.noRepeat||!I.explicitRepeat&&tt===0)&&(tt=1,I.repeatIsExplicit=!1),C.selectedCharacter&&(I.selectedCharacter=H.selectedCharacter=C.selectedCharacter),I.repeat=tt,Et(p),k){var Ye=fi[k](p,Q,I,y,C);if(y.lastMotion=fi[k],!Ye)return;if(I.toJumplist){var Ft=X.jumpList,Tt=Ft.cachedCursor;Tt?(m9(p,Tt,Ye),delete Ft.cachedCursor):m9(p,Q,Ye)}Ye instanceof Array?(Ze=Ye[0],ye=Ye[1]):ye=Ye,ye||(ye=Yi(Q)),y.visualMode?(y.visualBlock&&ye.ch===1/0||(ye=Or(p,ye)),Ze&&(Ze=Or(p,Ze)),Ze=Ze||xe,V.anchor=Ze,V.head=ye,$h(p),nl(p,y,"<",De(Ze,ye)?Ze:ye),nl(p,y,">",De(Ze,ye)?ye:Ze)):M||(ye=Or(p,ye),p.setCursor(ye.line,ye.ch))}if(M){if(H.lastSel){Ze=xe;var It=H.lastSel,Hi=Math.abs(It.head.line-It.anchor.line),no=Math.abs(It.head.ch-It.anchor.ch);It.visualLine?ye=new Ve(xe.line+Hi,xe.ch):It.visualBlock?ye=new Ve(xe.line+Hi,xe.ch+no):It.head.line==It.anchor.line?ye=new Ve(xe.line,xe.ch+no):ye=new Ve(xe.line+Hi,xe.ch),y.visualMode=!0,y.visualLine=It.visualLine,y.visualBlock=It.visualBlock,V=y.sel={anchor:Ze,head:ye},$h(p)}else y.visualMode&&(H.lastSel={anchor:Yi(V.anchor),head:Yi(V.head),visualBlock:y.visualBlock,visualLine:y.visualLine});var fr,Un,Ii,oi,cn;if(y.visualMode){if(fr=bt(V.head,V.anchor),Un=Wt(V.head,V.anchor),Ii=y.visualLine||H.linewise,oi=y.visualBlock?"block":Ii?"line":"char",cn=S3(p,{anchor:fr,head:Un},oi),Ii){var oo=cn.ranges;if(oi=="block")for(var jn=0;jn<oo.length;jn++)oo[jn].head.ch=xi(p,oo[jn].head.line);else oi=="line"&&(oo[0].head=new Ve(oo[0].head.line+1,0))}}else{if(fr=Yi(Ze||xe),Un=Yi(ye||Ce),De(Un,fr)){var Lc=fr;fr=Un,Un=Lc}Ii=I.linewise||H.linewise,Ii?Lie(p,fr,Un):I.forward&&Iie(p,fr,Un),oi="char";var Cm=!I.inclusive||Ii;cn=S3(p,{anchor:fr,head:Un},oi,Cm)}p.setSelections(cn.ranges,cn.primary),y.lastMotion=null,H.repeat=tt,H.registerName=W,H.linewise=Ii;var Sm=kc[M](p,H,cn.ranges,xe,ye);y.visualMode&&Qs(p,Sm!=null),Sm&&p.setCursor(Sm)}},recordLastEdit:function(p,y,C){var k=X.macroModeState;k.isPlaying||(p.lastEditInputState=y,p.lastEditActionCommand=C,k.lastInsertModeChanges.changes=[],k.lastInsertModeChanges.expectCursorActivityForChange=!1,k.lastInsertModeChanges.visualBlock=p.visualBlock?p.sel.head.line-p.sel.anchor.line:0)}},fi={moveToTopLine:function(p,y,C){var k=T3(p).top+C.repeat-1;return new Ve(k,Zs(p.getLine(k)))},moveToMiddleLine:function(p){var y=T3(p),C=Math.floor((y.top+y.bottom)*.5);return new Ve(C,Zs(p.getLine(C)))},moveToBottomLine:function(p,y,C){var k=T3(p).bottom-C.repeat+1;return new Ve(k,Zs(p.getLine(k)))},expandToLine:function(p,y,C){var k=y;return new Ve(k.line+C.repeat-1,1/0)},findNext:function(p,y,C){var k=Js(p),I=k.getQuery();if(I){var M=!C.forward;return M=k.isReversed()?!M:M,k9(p,I),E9(p,M,I,C.repeat)}},findAndSelectNextInclusive:function(p,y,C,k,I){var M=Js(p),H=M.getQuery();if(H){var W=!C.forward;W=M.isReversed()?!W:W;var V=Yie(p,W,H,C.repeat,k);if(V){if(I.operator)return V;var Q=V[0],se=new Ve(V[1].line,V[1].ch-1);if(k.visualMode){(k.visualLine||k.visualBlock)&&(k.visualLine=!1,k.visualBlock=!1,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:""}));var Ce=k.sel.anchor;if(Ce)return M.isReversed()?C.forward?[Ce,Q]:[Ce,se]:C.forward?[Ce,se]:[Ce,Q]}else k.visualMode=!0,k.visualLine=!1,k.visualBlock=!1,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:""});return W?[se,Q]:[Q,se]}}},goToMark:function(p,y,C,k){var I=T9(p,k,C.selectedCharacter);return I?C.linewise?{line:I.line,ch:Zs(p.getLine(I.line))}:I:null},moveToOtherHighlightedEnd:function(p,y,C,k){if(k.visualBlock&&C.sameLine){var I=k.sel;return[Or(p,new Ve(I.anchor.line,I.head.ch)),Or(p,new Ve(I.head.line,I.anchor.ch))]}else return[k.sel.head,k.sel.anchor]},jumpToMark:function(p,y,C,k){for(var I=y,M=0;M<C.repeat;M++){var H=I;for(var W in k.marks)if(L(W)){var V=k.marks[W].find(),Q=C.forward?De(V,H):De(H,V);if(!Q&&!(C.linewise&&V.line==H.line)){var se=ge(H,I),Ce=C.forward?wi(H,V,I):wi(I,V,H);(se||Ce)&&(I=V)}}}return C.linewise&&(I=new Ve(I.line,Zs(p.getLine(I.line)))),I},moveByCharacters:function(p,y,C){var k=y,I=C.repeat,M=C.forward?k.ch+I:k.ch-I;return new Ve(k.line,M)},moveByLines:function(p,y,C,k){var I=y,M=I.ch;switch(k.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:M=k.lastHPos;break;default:k.lastHPos=M}var H=C.repeat+(C.repeatOffset||0),W=C.forward?I.line+H:I.line-H,V=p.firstLine(),Q=p.lastLine(),se=p.findPosV(I,C.forward?H:-H,"line",k.lastHSPos),Ce=C.forward?se.line>W:se.line<W;return Ce&&(W=se.line,M=se.ch),W<V&&I.line==V?this.moveToStartOfLine(p,y,C,k):W>Q&&I.line==Q?v9(p,y,C,k,!0):(C.toFirstChar&&(M=Zs(p.getLine(W)),k.lastHPos=M),k.lastHSPos=p.charCoords(new Ve(W,M),"div").left,new Ve(W,M))},moveByDisplayLines:function(p,y,C,k){var I=y;switch(k.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:k.lastHSPos=p.charCoords(I,"div").left}var M=C.repeat,H=p.findPosV(I,C.forward?M:-M,"line",k.lastHSPos);if(H.hitSide)if(C.forward)var W=p.charCoords(H,"div"),V={top:W.top+8,left:k.lastHSPos},H=p.coordsChar(V,"div");else{var Q=p.charCoords(new Ve(p.firstLine(),0),"div");Q.left=k.lastHSPos,H=p.coordsChar(Q,"div")}return k.lastHPos=H.ch,H},moveByPage:function(p,y,C){var k=y,I=C.repeat;return p.findPosV(k,C.forward?I:-I,"page")},moveByParagraph:function(p,y,C){var k=C.forward?1:-1;return _9(p,y,C.repeat,k)},moveBySentence:function(p,y,C){var k=C.forward?1:-1;return Fie(p,y,C.repeat,k)},moveByScroll:function(p,y,C,k){var I=p.getScrollInfo(),W=null,M=C.repeat;M||(M=I.clientHeight/(2*p.defaultTextHeight()));var H=p.charCoords(y,"local");C.repeat=M;var W=fi.moveByDisplayLines(p,y,C,k);if(!W)return null;var V=p.charCoords(W,"local");return p.scrollTo(null,I.top+V.top-H.top),W},moveByWords:function(p,y,C){return Rie(p,y,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(p,y,C){var k=C.repeat,I=k3(p,k,C.forward,C.selectedCharacter),M=C.forward?-1:1;return g9(M,C),I?(I.ch+=M,I):null},moveToCharacter:function(p,y,C){var k=C.repeat;return g9(0,C),k3(p,k,C.forward,C.selectedCharacter)||y},moveToSymbol:function(p,y,C){var k=C.repeat;return Mie(p,k,C.forward,C.selectedCharacter)||y},moveToColumn:function(p,y,C,k){var I=C.repeat;return k.lastHPos=I-1,k.lastHSPos=p.charCoords(y,"div").left,Pie(p,I)},moveToEol:function(p,y,C,k){return v9(p,y,C,k,!1)},moveToFirstNonWhiteSpaceCharacter:function(p,y){var C=y;return new Ve(C.line,Zs(p.getLine(C.line)))},moveToMatchedSymbol:function(p,y){var C=y,k=C.line,I=C.ch,M=p.getLine(k);if(I<M.length){var H=I==="<"||I===">"?/[(){}[\]<>]/:/[(){}[\]]/,W=p.findMatchingBracket(new Ve(k,I),{bracketRegex:H});return W.to}else return C},moveToStartOfLine:function(p,y){return new Ve(y.line,0)},moveToLineOrEdgeOfDocument:function(p,y,C){var k=C.forward?p.lastLine():p.firstLine();return C.repeatIsExplicit&&(k=C.repeat-p.getOption("firstLineNumber")),new Ve(k,Zs(p.getLine(k)))},moveToStartOfDisplayLine:function(p){return p.execCommand("goLineLeft"),p.getCursor()},moveToEndOfDisplayLine:function(p){p.execCommand("goLineRight");var y=p.getCursor();return y.sticky=="before"&&y.ch--,y},textObjectManipulation:function(p,y,C,k){var I={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},M={"'":!0,'"':!0,"`":!0},H=C.selectedCharacter;H=="b"?H="(":H=="B"&&(H="{");var W=!C.textObjectInner,V;if(I[H])V=zie(p,y,H,W);else if(M[H])V=Bie(p,y,H,W);else if(H==="W")V=Lv(p,W,!0,!0);else if(H==="w")V=Lv(p,W,!0,!1);else if(H==="p")if(V=_9(p,y,C.repeat,0,W),C.linewise=!0,k.visualMode)k.visualLine||(k.visualLine=!0);else{var Q=k.inputState.operatorArgs;Q&&(Q.linewise=!0),V.end.line--}else if(H==="t")V=Aie(p,y,W);else return null;return p.state.vim.visualMode?Eie(p,V.start,V.end):[V.start,V.end]},repeatLastCharacterSearch:function(p,y,C){var k=X.lastCharacterSearch,I=C.repeat,M=C.forward===k.forward,H=(k.increment?1:0)*(M?-1:1);p.moveH(-H,"char"),C.inclusive=!!M;var W=k3(p,I,M,k.selectedCharacter);return W?(W.ch+=H,W):(p.moveH(H,"char"),y)}};function xo(S,p){fi[S]=p}function ro(S,p){for(var y=[],C=0;C<p;C++)y.push(S);return y}var kc={change:function(p,y,C){var k,I,M=p.state.vim,H=C[0].anchor,W=C[0].head;if(M.visualMode)if(y.fullLine)W.ch=Number.MAX_VALUE,W.line--,p.setSelection(H,W),I=p.getSelection(),p.replaceSelections(""),k=H;else{I=p.getSelection();var xe=ro("",C.length);p.replaceSelections(xe),k=bt(C[0].head,C[0].anchor)}else{I=p.getRange(H,W);var V=M.lastEditInputState||{};if(V.motion=="moveByWords"&&!oe(I)){var Q=/\s+$/.exec(I);Q&&V.motionArgs&&V.motionArgs.forward&&(W=hr(W,0,-Q[0].length),I=I.slice(0,-Q[0].length))}var se=new Ve(H.line-1,Number.MAX_VALUE),Ce=p.firstLine()==p.lastLine();W.line>p.lastLine()&&y.linewise&&!Ce?p.replaceRange("",se,W):p.replaceRange("",H,W),y.linewise&&(Ce||(p.setCursor(se),ut.default.commands.newlineAndIndent(p)),H.ch=Number.MAX_VALUE),k=H}X.registerController.pushText(y.registerName,"change",I,y.linewise,C.length>1),rl.enterInsertMode(p,{head:k},p.state.vim)},delete:function(p,y,C){p.pushUndoStop();var k,I,M=p.state.vim;if(M.visualBlock){I=p.getSelection();var V=ro("",C.length);p.replaceSelections(V),k=bt(C[0].head,C[0].anchor)}else{var H=C[0].anchor,W=C[0].head;y.linewise&&W.line!=p.firstLine()&&H.line==p.lastLine()&&H.line==W.line-1&&(H.line==p.firstLine()?H.ch=0:H=new Ve(H.line-1,xi(p,H.line-1))),I=p.getRange(H,W),p.replaceRange("",H,W),k=H,y.linewise&&(k=fi.moveToFirstNonWhiteSpaceCharacter(p,H))}return X.registerController.pushText(y.registerName,"delete",I,y.linewise,M.visualBlock),Or(p,k)},indent:function(p,y,C){var k=p.state.vim,I=C[0].anchor.line,M=k.visualBlock?C[C.length-1].anchor.line:C[0].head.line,H=k.visualMode?y.repeat:1;y.linewise&&M--,p.pushUndoStop();for(var W=I;W<=M;W++)for(var V=0;V<H;V++)p.indentLine(W,y.indentRight);return p.pushUndoStop(),fi.moveToFirstNonWhiteSpaceCharacter(p,C[0].anchor)},indentAuto:function(p,y,C){return p.execCommand("indentAuto"),fi.moveToFirstNonWhiteSpaceCharacter(p,C[0].anchor)},changeCase:function(p,y,C,k,I){for(var M=p.getSelections(),H=[],W=y.toLower,V=0;V<M.length;V++){var Q=M[V],se="";if(W===!0)se=Q.toLowerCase();else if(W===!1)se=Q.toUpperCase();else for(var Ce=0;Ce<Q.length;Ce++){var xe=Q.charAt(Ce);se+=Y(xe)?xe.toLowerCase():xe.toUpperCase()}H.push(se)}return p.replaceSelections(H),y.shouldMoveCursor?I:!p.state.vim.visualMode&&y.linewise&&C[0].anchor.line+1==C[0].head.line?fi.moveToFirstNonWhiteSpaceCharacter(p,k):y.linewise?k:bt(C[0].anchor,C[0].head)},yank:function(p,y,C,k){var I=p.state.vim,M=p.getSelection(),H=I.visualMode?bt(I.sel.anchor,I.sel.head,C[0].head,C[0].anchor):k;return X.registerController.pushText(y.registerName,"yank",M,y.linewise,I.visualBlock),H}};function Ec(S,p){kc[S]=p}var rl={jumpListWalk:function(p,y,C){if(!C.visualMode){var k=y.repeat,I=y.forward,M=X.jumpList,H=M.move(p,I?k:-k),W=H?H.find():void 0;W=W||p.getCursor(),p.setCursor(W)}},scroll:function(p,y,C){if(!C.visualMode){var k=y.repeat||1,I=p.defaultTextHeight(),M=p.getScrollInfo().top,H=I*k,W=y.forward?M+H:M-H,V=Yi(p.getCursor()),Q=p.charCoords(V,"local");if(y.forward)W>Q.top?(V.line+=(W-Q.top)/I,V.line=Math.ceil(V.line),p.setCursor(V),Q=p.charCoords(V,"local"),p.scrollTo(null,Q.top)):p.scrollTo(null,W);else{var se=W+p.getScrollInfo().clientHeight;se<Q.bottom?(V.line-=(Q.bottom-se)/I,V.line=Math.floor(V.line),p.setCursor(V),Q=p.charCoords(V,"local"),p.scrollTo(null,Q.bottom-p.getScrollInfo().clientHeight)):p.scrollTo(null,W)}}},scrollToCursor:function(p,y){var C=p.getCursor().line,k=p.charCoords(new Ve(C,0),"local"),I=p.getScrollInfo().clientHeight,M=k.top,H=k.bottom-M;switch(y.position){case"center":M=M-I/2+H;break;case"bottom":M=M-I+H;break}p.moveCurrentLineTo(M)},replayMacro:function(p,y,C){var k=y.selectedCharacter,I=y.repeat,M=X.macroModeState;for(k=="@"?k=M.latestRegister:M.latestRegister=k;I--;)Jie(p,C,M,k)},enterMacroRecordMode:function(p,y){var C=X.macroModeState,k=y.selectedCharacter;X.registerController.isValidRegister(k)&&C.enterMacroRecordMode(p,k)},toggleOverwrite:function(p){p.state.overwrite?(p.toggleOverwrite(!1),p.setOption("keyMap","vim-insert"),ut.default.signal(p,"vim-mode-change",{mode:"insert"})):(p.toggleOverwrite(!0),p.setOption("keyMap","vim-replace"),ut.default.signal(p,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(p,y,C){if(!p.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=y&&y.repeat||1;var k=y?y.insertAt:null,I=C.sel,M=y.head||p.getCursor("head"),H=p.listSelections().length;if(k=="eol")M=new Ve(M.line,xi(p,M.line));else if(k=="bol")M=new Ve(M.line,0);else if(k=="charAfter")M=hr(M,0,1);else if(k=="firstNonBlank")M=fi.moveToFirstNonWhiteSpaceCharacter(p,M);else if(k=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(M=new Ve(Math.min(I.head.line,I.anchor.line),Math.min(I.head.ch,I.anchor.ch)),H=Math.abs(I.head.line-I.anchor.line)+1):I.head.line<I.anchor.line?M=I.head:M=new Ve(I.anchor.line,0)}else if(k=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(M=new Ve(Math.min(I.head.line,I.anchor.line),Math.max(I.head.ch,I.anchor.ch)+1),H=Math.abs(I.head.line-I.anchor.line)+1):I.head.line>=I.anchor.line?M=hr(I.head,0,1):M=new Ve(I.anchor.line,0)}else if(k=="inplace"){if(C.visualMode)return}else k=="lastEdit"&&(M=I9(p)||M);p.setOption("disableInput",!1),y&&y.replace?(p.toggleOverwrite(!0),p.setOption("keyMap","vim-replace"),ut.default.signal(p,"vim-mode-change",{mode:"replace"})):(p.toggleOverwrite(!1),p.setOption("keyMap","vim-insert"),ut.default.signal(p,"vim-mode-change",{mode:"insert"})),X.macroModeState.isPlaying||(p.on("change",M9),ut.default.on(p.getInputField(),"keydown",R9)),C.visualMode&&Qs(p),Cn(p,M,H)}},toggleVisualMode:function(p,y,C){var k=y.repeat,I=p.getCursor(),M;C.visualMode?C.visualLine^y.linewise||C.visualBlock^y.blockwise?(C.visualLine=!!y.linewise,C.visualBlock=!!y.blockwise,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),$h(p)):Qs(p):(C.visualMode=!0,C.visualLine=!!y.linewise,C.visualBlock=!!y.blockwise,M=Or(p,new Ve(I.line,I.ch+k-1)),C.sel={anchor:I,head:M},ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),$h(p),nl(p,C,"<",bt(I,M)),nl(p,C,">",Wt(I,M)))},reselectLastSelection:function(p,y,C){var k=C.lastSelection;if(C.visualMode&&p9(p,C),k){var I=k.anchorMark.find(),M=k.headMark.find();if(!I||!M)return;C.sel={anchor:I,head:M},C.visualMode=!0,C.visualLine=k.visualLine,C.visualBlock=k.visualBlock,$h(p),nl(p,C,"<",bt(I,M)),nl(p,C,">",Wt(I,M)),ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(p,y,C){var k,I;if(C.visualMode){if(k=p.getCursor("anchor"),I=p.getCursor("head"),De(I,k)){var M=I;I=k,k=M}I.ch=xi(p,I.line)-1}else{var H=Math.max(y.repeat,2);k=p.getCursor(),I=Or(p,new Ve(k.line+H-1,1/0))}for(var W=0,V=k.line;V<I.line;V++){W=xi(p,k.line);var M=new Ve(k.line+1,xi(p,k.line+1)),Q=p.getRange(k,M);Q=y.keepSpaces?Q.replace(/\n\r?/g,""):Q.replace(/\n\s*/g," "),p.replaceRange(Q,k,M)}var se=new Ve(k.line,W);C.visualMode&&Qs(p,!1),p.setCursor(se)},newLineAndEnterInsertMode:function(p,y,C){if(!p.getOption("readOnly")){C.insertMode=!0;var k=Yi(p.getCursor());if(k.line===p.firstLine()&&!y.after)p.replaceRange(` +`)==-1?this.registers["-"]=new Ot(C,k):(this.shiftNumericRegisters_(),this.registers[1]=new Ot(C,k));break}this.unnamedRegister.setText(C,k,I);return}var H=Y(p);H?M.pushText(C,k):M.setText(C,k,I),this.unnamedRegister.setText(M.toString(),k)}},getRegister:function(p){return this.isValidRegister(p)?(p=p.toLowerCase(),this.registers[p]||(this.registers[p]=new Ot),this.registers[p]):this.unnamedRegister},isValidRegister:function(p){return p&&Z(p,_)},shiftNumericRegisters_:function(){for(var p=9;p>=2;p--)this.registers[p]=this.getRegister(""+(p-1))}};function kt(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}kt.prototype={nextMatch:function(p,y){var C=this.historyBuffer,k=y?-1:1;this.initialPrefix===null&&(this.initialPrefix=p);for(var I=this.iterator+k;y?I>=0:I<C.length;I+=k)for(var M=C[I],H=0;H<=M.length;H++)if(this.initialPrefix==M.substring(0,H))return this.iterator=I,M;if(I>=C.length)return this.iterator=C.length,this.initialPrefix;if(I<0)return p},pushInput:function(p){var y=this.historyBuffer.indexOf(p);y>-1&&this.historyBuffer.splice(y,1),p.length&&this.historyBuffer.push(p)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ei={matchCommand:function(p,y,C,k){var I=x3(p,y,k,C);if(!I.full&&!I.partial)return{type:"none"};if(!I.full&&I.partial)return{type:"partial"};for(var M,H=0;H<I.full.length;H++){var W=I.full[H];M||(M=W)}if(M.keys.slice(-11)=="<character>"){var V=S3(p);if(!V)return{type:"none"};C.selectedCharacter=V}return{type:"full",command:M}},processCommand:function(p,y,C){switch(y.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(p,y,C);break;case"operator":this.processOperator(p,y,C);break;case"operatorMotion":this.processOperatorMotion(p,y,C);break;case"action":this.processAction(p,y,C);break;case"search":this.processSearch(p,y,C);break;case"ex":case"keyToEx":this.processEx(p,y,C);break;default:break}},processMotion:function(p,y,C){y.inputState.motion=C.motion,y.inputState.motionArgs=Ko(C.motionArgs),this.evalInput(p,y)},processOperator:function(p,y,C){var k=y.inputState;if(k.operator)if(k.operator==C.operator){k.motion="expandToLine",k.motionArgs={linewise:!0},this.evalInput(p,y);return}else Et(p);k.operator=C.operator,k.operatorArgs=Ko(C.operatorArgs),C.keys.length>1&&(k.operatorShortcut=C.keys),C.exitVisualBlock&&(y.visualBlock=!1,$h(p)),y.visualMode&&this.evalInput(p,y)},processOperatorMotion:function(p,y,C){var k=y.visualMode,I=Ko(C.operatorMotionArgs);I&&k&&I.visualLine&&(y.visualLine=!0),this.processOperator(p,y,C),k||this.processMotion(p,y,C)},processAction:function(p,y,C){var k=y.inputState,I=k.getRepeat(),M=!!I,H=Ko(C.actionArgs)||{};k.selectedCharacter&&(H.selectedCharacter=k.selectedCharacter),C.operator&&this.processOperator(p,y,C),C.motion&&this.processMotion(p,y,C),(C.motion||C.operator)&&this.evalInput(p,y),H.repeat=I||1,H.repeatIsExplicit=M,H.registerName=k.registerName,Et(p),y.lastMotion=null,C.isEdit&&this.recordLastEdit(y,k,C),rl[C.action](p,H,y)},processSearch:function(p,y,C){if(!p.getSearchCursor)return;var k=C.searchArgs.forward,I=C.searchArgs.wholeWordOnly;Js(p).setReversed(!k);var M=k?"/":"?",H=Js(p).getQuery(),W=p.getScrollInfo();function V(Ye,Ft,Tt){X.searchHistoryController.pushInput(Ye),X.searchHistoryController.reset();try{wm(p,Ye,Ft,Tt)}catch(It){Bi(p,"Invalid regex: "+Ye),Et(p);return}Ei.processMotion(p,y,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function Q(Ye){p.scrollTo(W.left,W.top),V(Ye,!0,!0);var Ft=X.macroModeState;Ft.isRecording&&ire(Ft,Ye)}function se(Ye,Ft,Tt){var It=ut.default.keyName(Ye),Hi,no;It=="Up"||It=="Down"?(Hi=It=="Up",no=Ye.target?Ye.target.selectionEnd:0,Ft=X.searchHistoryController.nextMatch(Ft,Hi)||"",Tt(Ft),no&&Ye.target&&(Ye.target.selectionEnd=Ye.target.selectionStart=Math.min(no,Ye.target.value.length))):It!="Left"&&It!="Right"&&It!="Ctrl"&&It!="Alt"&&It!="Shift"&&X.searchHistoryController.reset();var fr;try{fr=wm(p,Ft,!0,!0)}catch(Un){}fr?p.scrollIntoView(T9(p,!k,fr),30):(T3(p),p.scrollTo(W.left,W.top))}function Ce(Ye,Ft,Tt){var It=ut.default.keyName(Ye);It=="Esc"||It=="Ctrl-C"||It=="Ctrl-["||It=="Backspace"&&Ft==""?(X.searchHistoryController.pushInput(Ft),X.searchHistoryController.reset(),wm(p,H),T3(p),p.scrollTo(W.left,W.top),ut.default.e_stop(Ye),Et(p),Tt(),p.focus()):It=="Up"||It=="Down"?ut.default.e_stop(Ye):It=="Ctrl-U"&&(ut.default.e_stop(Ye),Tt(""))}switch(C.searchArgs.querySrc){case"prompt":var xe=X.macroModeState;if(xe.isPlaying){var tt=xe.replaySearchQueries.shift();V(tt,!0,!1)}else Av(p,{onClose:Q,prefix:M,desc:"(JavaScript regexp)",onKeyUp:se,onKeyDown:Ce});break;case"wordUnderCursor":var ye=Lv(p,!1,!0,!1,!0),Ze=!0;if(ye||(ye=Lv(p,!1,!0,!1,!1),Ze=!1),!ye)return;var tt=p.getLine(ye.start.line).substring(ye.start.ch,ye.end.ch);Ze&&I?tt="\\b"+tt+"\\b":tt=vs(tt),X.jumpList.cachedCursor=p.getCursor(),p.setCursor(ye.start),V(tt,!0,!1);break}},processEx:function(p,y,C){function k(M){X.exCommandHistoryController.pushInput(M),X.exCommandHistoryController.reset(),ea.processCommand(p,M)}function I(M,H,W){var V=ut.default.keyName(M),Q,se;(V=="Esc"||V=="Ctrl-C"||V=="Ctrl-["||V=="Backspace"&&H=="")&&(X.exCommandHistoryController.pushInput(H),X.exCommandHistoryController.reset(),ut.default.e_stop(M),Et(p),W(),p.focus()),V=="Up"||V=="Down"?(ut.default.e_stop(M),Q=V=="Up",se=M.target?M.target.selectionEnd:0,H=X.exCommandHistoryController.nextMatch(H,Q)||"",W(H),se&&M.target&&(M.target.selectionEnd=M.target.selectionStart=Math.min(se,M.target.value.length))):V=="Ctrl-U"?(ut.default.e_stop(M),W("")):V!="Left"&&V!="Right"&&V!="Ctrl"&&V!="Alt"&&V!="Shift"&&X.exCommandHistoryController.reset()}C.type=="keyToEx"?ea.processCommand(p,C.exArgs.input):y.visualMode?Av(p,{onClose:k,prefix:":",value:"'<,'>",onKeyDown:I,selectValueOnOpen:!1}):Av(p,{onClose:k,prefix:":",onKeyDown:I})},evalInput:function(p,y){var C=y.inputState,k=C.motion,I=C.motionArgs||{},M=C.operator,H=C.operatorArgs||{},W=C.registerName,V=y.sel,Q=Yi(y.visualMode?Or(p,V.head):p.getCursor("head")),se=Yi(y.visualMode?Or(p,V.anchor):p.getCursor("anchor")),Ce=Yi(Q),xe=Yi(se),ye,Ze,tt;if(M&&this.recordLastEdit(y,C),C.repeatOverride!==void 0?tt=C.repeatOverride:tt=C.getRepeat(),tt>0&&I.explicitRepeat?I.repeatIsExplicit=!0:(I.noRepeat||!I.explicitRepeat&&tt===0)&&(tt=1,I.repeatIsExplicit=!1),C.selectedCharacter&&(I.selectedCharacter=H.selectedCharacter=C.selectedCharacter),I.repeat=tt,Et(p),k){var Ye=fi[k](p,Q,I,y,C);if(y.lastMotion=fi[k],!Ye)return;if(I.toJumplist){var Ft=X.jumpList,Tt=Ft.cachedCursor;Tt?(g9(p,Tt,Ye),delete Ft.cachedCursor):g9(p,Q,Ye)}Ye instanceof Array?(Ze=Ye[0],ye=Ye[1]):ye=Ye,ye||(ye=Yi(Q)),y.visualMode?(y.visualBlock&&ye.ch===1/0||(ye=Or(p,ye)),Ze&&(Ze=Or(p,Ze)),Ze=Ze||xe,V.anchor=Ze,V.head=ye,$h(p),nl(p,y,"<",De(Ze,ye)?Ze:ye),nl(p,y,">",De(Ze,ye)?ye:Ze)):M||(ye=Or(p,ye),p.setCursor(ye.line,ye.ch))}if(M){if(H.lastSel){Ze=xe;var It=H.lastSel,Hi=Math.abs(It.head.line-It.anchor.line),no=Math.abs(It.head.ch-It.anchor.ch);It.visualLine?ye=new Ve(xe.line+Hi,xe.ch):It.visualBlock?ye=new Ve(xe.line+Hi,xe.ch+no):It.head.line==It.anchor.line?ye=new Ve(xe.line,xe.ch+no):ye=new Ve(xe.line+Hi,xe.ch),y.visualMode=!0,y.visualLine=It.visualLine,y.visualBlock=It.visualBlock,V=y.sel={anchor:Ze,head:ye},$h(p)}else y.visualMode&&(H.lastSel={anchor:Yi(V.anchor),head:Yi(V.head),visualBlock:y.visualBlock,visualLine:y.visualLine});var fr,Un,Ii,oi,cn;if(y.visualMode){if(fr=bt(V.head,V.anchor),Un=Wt(V.head,V.anchor),Ii=y.visualLine||H.linewise,oi=y.visualBlock?"block":Ii?"line":"char",cn=k3(p,{anchor:fr,head:Un},oi),Ii){var oo=cn.ranges;if(oi=="block")for(var jn=0;jn<oo.length;jn++)oo[jn].head.ch=xi(p,oo[jn].head.line);else oi=="line"&&(oo[0].head=new Ve(oo[0].head.line+1,0))}}else{if(fr=Yi(Ze||xe),Un=Yi(ye||Ce),De(Un,fr)){var Lc=fr;fr=Un,Un=Lc}Ii=I.linewise||H.linewise,Ii?Lie(p,fr,Un):I.forward&&Iie(p,fr,Un),oi="char";var Cm=!I.inclusive||Ii;cn=k3(p,{anchor:fr,head:Un},oi,Cm)}p.setSelections(cn.ranges,cn.primary),y.lastMotion=null,H.repeat=tt,H.registerName=W,H.linewise=Ii;var Sm=kc[M](p,H,cn.ranges,xe,ye);y.visualMode&&Qs(p,Sm!=null),Sm&&p.setCursor(Sm)}},recordLastEdit:function(p,y,C){var k=X.macroModeState;k.isPlaying||(p.lastEditInputState=y,p.lastEditActionCommand=C,k.lastInsertModeChanges.changes=[],k.lastInsertModeChanges.expectCursorActivityForChange=!1,k.lastInsertModeChanges.visualBlock=p.visualBlock?p.sel.head.line-p.sel.anchor.line:0)}},fi={moveToTopLine:function(p,y,C){var k=I3(p).top+C.repeat-1;return new Ve(k,Zs(p.getLine(k)))},moveToMiddleLine:function(p){var y=I3(p),C=Math.floor((y.top+y.bottom)*.5);return new Ve(C,Zs(p.getLine(C)))},moveToBottomLine:function(p,y,C){var k=I3(p).bottom-C.repeat+1;return new Ve(k,Zs(p.getLine(k)))},expandToLine:function(p,y,C){var k=y;return new Ve(k.line+C.repeat-1,1/0)},findNext:function(p,y,C){var k=Js(p),I=k.getQuery();if(I){var M=!C.forward;return M=k.isReversed()?!M:M,E9(p,I),T9(p,M,I,C.repeat)}},findAndSelectNextInclusive:function(p,y,C,k,I){var M=Js(p),H=M.getQuery();if(H){var W=!C.forward;W=M.isReversed()?!W:W;var V=Yie(p,W,H,C.repeat,k);if(V){if(I.operator)return V;var Q=V[0],se=new Ve(V[1].line,V[1].ch-1);if(k.visualMode){(k.visualLine||k.visualBlock)&&(k.visualLine=!1,k.visualBlock=!1,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:""}));var Ce=k.sel.anchor;if(Ce)return M.isReversed()?C.forward?[Ce,Q]:[Ce,se]:C.forward?[Ce,se]:[Ce,Q]}else k.visualMode=!0,k.visualLine=!1,k.visualBlock=!1,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:""});return W?[se,Q]:[Q,se]}}},goToMark:function(p,y,C,k){var I=I9(p,k,C.selectedCharacter);return I?C.linewise?{line:I.line,ch:Zs(p.getLine(I.line))}:I:null},moveToOtherHighlightedEnd:function(p,y,C,k){if(k.visualBlock&&C.sameLine){var I=k.sel;return[Or(p,new Ve(I.anchor.line,I.head.ch)),Or(p,new Ve(I.head.line,I.anchor.ch))]}else return[k.sel.head,k.sel.anchor]},jumpToMark:function(p,y,C,k){for(var I=y,M=0;M<C.repeat;M++){var H=I;for(var W in k.marks)if(L(W)){var V=k.marks[W].find(),Q=C.forward?De(V,H):De(H,V);if(!Q&&!(C.linewise&&V.line==H.line)){var se=ge(H,I),Ce=C.forward?wi(H,V,I):wi(I,V,H);(se||Ce)&&(I=V)}}}return C.linewise&&(I=new Ve(I.line,Zs(p.getLine(I.line)))),I},moveByCharacters:function(p,y,C){var k=y,I=C.repeat,M=C.forward?k.ch+I:k.ch-I;return new Ve(k.line,M)},moveByLines:function(p,y,C,k){var I=y,M=I.ch;switch(k.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:M=k.lastHPos;break;default:k.lastHPos=M}var H=C.repeat+(C.repeatOffset||0),W=C.forward?I.line+H:I.line-H,V=p.firstLine(),Q=p.lastLine(),se=p.findPosV(I,C.forward?H:-H,"line",k.lastHSPos),Ce=C.forward?se.line>W:se.line<W;return Ce&&(W=se.line,M=se.ch),W<V&&I.line==V?this.moveToStartOfLine(p,y,C,k):W>Q&&I.line==Q?_9(p,y,C,k,!0):(C.toFirstChar&&(M=Zs(p.getLine(W)),k.lastHPos=M),k.lastHSPos=p.charCoords(new Ve(W,M),"div").left,new Ve(W,M))},moveByDisplayLines:function(p,y,C,k){var I=y;switch(k.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:k.lastHSPos=p.charCoords(I,"div").left}var M=C.repeat,H=p.findPosV(I,C.forward?M:-M,"line",k.lastHSPos);if(H.hitSide)if(C.forward)var W=p.charCoords(H,"div"),V={top:W.top+8,left:k.lastHSPos},H=p.coordsChar(V,"div");else{var Q=p.charCoords(new Ve(p.firstLine(),0),"div");Q.left=k.lastHSPos,H=p.coordsChar(Q,"div")}return k.lastHPos=H.ch,H},moveByPage:function(p,y,C){var k=y,I=C.repeat;return p.findPosV(k,C.forward?I:-I,"page")},moveByParagraph:function(p,y,C){var k=C.forward?1:-1;return y9(p,y,C.repeat,k)},moveBySentence:function(p,y,C){var k=C.forward?1:-1;return Fie(p,y,C.repeat,k)},moveByScroll:function(p,y,C,k){var I=p.getScrollInfo(),W=null,M=C.repeat;M||(M=I.clientHeight/(2*p.defaultTextHeight()));var H=p.charCoords(y,"local");C.repeat=M;var W=fi.moveByDisplayLines(p,y,C,k);if(!W)return null;var V=p.charCoords(W,"local");return p.scrollTo(null,I.top+V.top-H.top),W},moveByWords:function(p,y,C){return Rie(p,y,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(p,y,C){var k=C.repeat,I=E3(p,k,C.forward,C.selectedCharacter),M=C.forward?-1:1;return b9(M,C),I?(I.ch+=M,I):null},moveToCharacter:function(p,y,C){var k=C.repeat;return b9(0,C),E3(p,k,C.forward,C.selectedCharacter)||y},moveToSymbol:function(p,y,C){var k=C.repeat;return Mie(p,k,C.forward,C.selectedCharacter)||y},moveToColumn:function(p,y,C,k){var I=C.repeat;return k.lastHPos=I-1,k.lastHSPos=p.charCoords(y,"div").left,Pie(p,I)},moveToEol:function(p,y,C,k){return _9(p,y,C,k,!1)},moveToFirstNonWhiteSpaceCharacter:function(p,y){var C=y;return new Ve(C.line,Zs(p.getLine(C.line)))},moveToMatchedSymbol:function(p,y){var C=y,k=C.line,I=C.ch,M=p.getLine(k);if(I<M.length){var H=I==="<"||I===">"?/[(){}[\]<>]/:/[(){}[\]]/,W=p.findMatchingBracket(new Ve(k,I),{bracketRegex:H});return W.to}else return C},moveToStartOfLine:function(p,y){return new Ve(y.line,0)},moveToLineOrEdgeOfDocument:function(p,y,C){var k=C.forward?p.lastLine():p.firstLine();return C.repeatIsExplicit&&(k=C.repeat-p.getOption("firstLineNumber")),new Ve(k,Zs(p.getLine(k)))},moveToStartOfDisplayLine:function(p){return p.execCommand("goLineLeft"),p.getCursor()},moveToEndOfDisplayLine:function(p){p.execCommand("goLineRight");var y=p.getCursor();return y.sticky=="before"&&y.ch--,y},textObjectManipulation:function(p,y,C,k){var I={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},M={"'":!0,'"':!0,"`":!0},H=C.selectedCharacter;H=="b"?H="(":H=="B"&&(H="{");var W=!C.textObjectInner,V;if(I[H])V=zie(p,y,H,W);else if(M[H])V=Bie(p,y,H,W);else if(H==="W")V=Lv(p,W,!0,!0);else if(H==="w")V=Lv(p,W,!0,!1);else if(H==="p")if(V=y9(p,y,C.repeat,0,W),C.linewise=!0,k.visualMode)k.visualLine||(k.visualLine=!0);else{var Q=k.inputState.operatorArgs;Q&&(Q.linewise=!0),V.end.line--}else if(H==="t")V=Aie(p,y,W);else return null;return p.state.vim.visualMode?Eie(p,V.start,V.end):[V.start,V.end]},repeatLastCharacterSearch:function(p,y,C){var k=X.lastCharacterSearch,I=C.repeat,M=C.forward===k.forward,H=(k.increment?1:0)*(M?-1:1);p.moveH(-H,"char"),C.inclusive=!!M;var W=E3(p,I,M,k.selectedCharacter);return W?(W.ch+=H,W):(p.moveH(H,"char"),y)}};function xo(S,p){fi[S]=p}function ro(S,p){for(var y=[],C=0;C<p;C++)y.push(S);return y}var kc={change:function(p,y,C){var k,I,M=p.state.vim,H=C[0].anchor,W=C[0].head;if(M.visualMode)if(y.fullLine)W.ch=Number.MAX_VALUE,W.line--,p.setSelection(H,W),I=p.getSelection(),p.replaceSelections(""),k=H;else{I=p.getSelection();var xe=ro("",C.length);p.replaceSelections(xe),k=bt(C[0].head,C[0].anchor)}else{I=p.getRange(H,W);var V=M.lastEditInputState||{};if(V.motion=="moveByWords"&&!oe(I)){var Q=/\s+$/.exec(I);Q&&V.motionArgs&&V.motionArgs.forward&&(W=hr(W,0,-Q[0].length),I=I.slice(0,-Q[0].length))}var se=new Ve(H.line-1,Number.MAX_VALUE),Ce=p.firstLine()==p.lastLine();W.line>p.lastLine()&&y.linewise&&!Ce?p.replaceRange("",se,W):p.replaceRange("",H,W),y.linewise&&(Ce||(p.setCursor(se),ut.default.commands.newlineAndIndent(p)),H.ch=Number.MAX_VALUE),k=H}X.registerController.pushText(y.registerName,"change",I,y.linewise,C.length>1),rl.enterInsertMode(p,{head:k},p.state.vim)},delete:function(p,y,C){p.pushUndoStop();var k,I,M=p.state.vim;if(M.visualBlock){I=p.getSelection();var V=ro("",C.length);p.replaceSelections(V),k=bt(C[0].head,C[0].anchor)}else{var H=C[0].anchor,W=C[0].head;y.linewise&&W.line!=p.firstLine()&&H.line==p.lastLine()&&H.line==W.line-1&&(H.line==p.firstLine()?H.ch=0:H=new Ve(H.line-1,xi(p,H.line-1))),I=p.getRange(H,W),p.replaceRange("",H,W),k=H,y.linewise&&(k=fi.moveToFirstNonWhiteSpaceCharacter(p,H))}return X.registerController.pushText(y.registerName,"delete",I,y.linewise,M.visualBlock),Or(p,k)},indent:function(p,y,C){var k=p.state.vim,I=C[0].anchor.line,M=k.visualBlock?C[C.length-1].anchor.line:C[0].head.line,H=k.visualMode?y.repeat:1;y.linewise&&M--,p.pushUndoStop();for(var W=I;W<=M;W++)for(var V=0;V<H;V++)p.indentLine(W,y.indentRight);return p.pushUndoStop(),fi.moveToFirstNonWhiteSpaceCharacter(p,C[0].anchor)},indentAuto:function(p,y,C){return p.execCommand("indentAuto"),fi.moveToFirstNonWhiteSpaceCharacter(p,C[0].anchor)},changeCase:function(p,y,C,k,I){for(var M=p.getSelections(),H=[],W=y.toLower,V=0;V<M.length;V++){var Q=M[V],se="";if(W===!0)se=Q.toLowerCase();else if(W===!1)se=Q.toUpperCase();else for(var Ce=0;Ce<Q.length;Ce++){var xe=Q.charAt(Ce);se+=Y(xe)?xe.toLowerCase():xe.toUpperCase()}H.push(se)}return p.replaceSelections(H),y.shouldMoveCursor?I:!p.state.vim.visualMode&&y.linewise&&C[0].anchor.line+1==C[0].head.line?fi.moveToFirstNonWhiteSpaceCharacter(p,k):y.linewise?k:bt(C[0].anchor,C[0].head)},yank:function(p,y,C,k){var I=p.state.vim,M=p.getSelection(),H=I.visualMode?bt(I.sel.anchor,I.sel.head,C[0].head,C[0].anchor):k;return X.registerController.pushText(y.registerName,"yank",M,y.linewise,I.visualBlock),H}};function Ec(S,p){kc[S]=p}var rl={jumpListWalk:function(p,y,C){if(!C.visualMode){var k=y.repeat,I=y.forward,M=X.jumpList,H=M.move(p,I?k:-k),W=H?H.find():void 0;W=W||p.getCursor(),p.setCursor(W)}},scroll:function(p,y,C){if(!C.visualMode){var k=y.repeat||1,I=p.defaultTextHeight(),M=p.getScrollInfo().top,H=I*k,W=y.forward?M+H:M-H,V=Yi(p.getCursor()),Q=p.charCoords(V,"local");if(y.forward)W>Q.top?(V.line+=(W-Q.top)/I,V.line=Math.ceil(V.line),p.setCursor(V),Q=p.charCoords(V,"local"),p.scrollTo(null,Q.top)):p.scrollTo(null,W);else{var se=W+p.getScrollInfo().clientHeight;se<Q.bottom?(V.line-=(Q.bottom-se)/I,V.line=Math.floor(V.line),p.setCursor(V),Q=p.charCoords(V,"local"),p.scrollTo(null,Q.bottom-p.getScrollInfo().clientHeight)):p.scrollTo(null,W)}}},scrollToCursor:function(p,y){var C=p.getCursor().line,k=p.charCoords(new Ve(C,0),"local"),I=p.getScrollInfo().clientHeight,M=k.top,H=k.bottom-M;switch(y.position){case"center":M=M-I/2+H;break;case"bottom":M=M-I+H;break}p.moveCurrentLineTo(M)},replayMacro:function(p,y,C){var k=y.selectedCharacter,I=y.repeat,M=X.macroModeState;for(k=="@"?k=M.latestRegister:M.latestRegister=k;I--;)Jie(p,C,M,k)},enterMacroRecordMode:function(p,y){var C=X.macroModeState,k=y.selectedCharacter;X.registerController.isValidRegister(k)&&C.enterMacroRecordMode(p,k)},toggleOverwrite:function(p){p.state.overwrite?(p.toggleOverwrite(!1),p.setOption("keyMap","vim-insert"),ut.default.signal(p,"vim-mode-change",{mode:"insert"})):(p.toggleOverwrite(!0),p.setOption("keyMap","vim-replace"),ut.default.signal(p,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(p,y,C){if(!p.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=y&&y.repeat||1;var k=y?y.insertAt:null,I=C.sel,M=y.head||p.getCursor("head"),H=p.listSelections().length;if(k=="eol")M=new Ve(M.line,xi(p,M.line));else if(k=="bol")M=new Ve(M.line,0);else if(k=="charAfter")M=hr(M,0,1);else if(k=="firstNonBlank")M=fi.moveToFirstNonWhiteSpaceCharacter(p,M);else if(k=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(M=new Ve(Math.min(I.head.line,I.anchor.line),Math.min(I.head.ch,I.anchor.ch)),H=Math.abs(I.head.line-I.anchor.line)+1):I.head.line<I.anchor.line?M=I.head:M=new Ve(I.anchor.line,0)}else if(k=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(M=new Ve(Math.min(I.head.line,I.anchor.line),Math.max(I.head.ch,I.anchor.ch)+1),H=Math.abs(I.head.line-I.anchor.line)+1):I.head.line>=I.anchor.line?M=hr(I.head,0,1):M=new Ve(I.anchor.line,0)}else if(k=="inplace"){if(C.visualMode)return}else k=="lastEdit"&&(M=L9(p)||M);p.setOption("disableInput",!1),y&&y.replace?(p.toggleOverwrite(!0),p.setOption("keyMap","vim-replace"),ut.default.signal(p,"vim-mode-change",{mode:"replace"})):(p.toggleOverwrite(!1),p.setOption("keyMap","vim-insert"),ut.default.signal(p,"vim-mode-change",{mode:"insert"})),X.macroModeState.isPlaying||(p.on("change",N9),ut.default.on(p.getInputField(),"keydown",P9)),C.visualMode&&Qs(p),Cn(p,M,H)}},toggleVisualMode:function(p,y,C){var k=y.repeat,I=p.getCursor(),M;C.visualMode?C.visualLine^y.linewise||C.visualBlock^y.blockwise?(C.visualLine=!!y.linewise,C.visualBlock=!!y.blockwise,ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),$h(p)):Qs(p):(C.visualMode=!0,C.visualLine=!!y.linewise,C.visualBlock=!!y.blockwise,M=Or(p,new Ve(I.line,I.ch+k-1)),C.sel={anchor:I,head:M},ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),$h(p),nl(p,C,"<",bt(I,M)),nl(p,C,">",Wt(I,M)))},reselectLastSelection:function(p,y,C){var k=C.lastSelection;if(C.visualMode&&m9(p,C),k){var I=k.anchorMark.find(),M=k.headMark.find();if(!I||!M)return;C.sel={anchor:I,head:M},C.visualMode=!0,C.visualLine=k.visualLine,C.visualBlock=k.visualBlock,$h(p),nl(p,C,"<",bt(I,M)),nl(p,C,">",Wt(I,M)),ut.default.signal(p,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(p,y,C){var k,I;if(C.visualMode){if(k=p.getCursor("anchor"),I=p.getCursor("head"),De(I,k)){var M=I;I=k,k=M}I.ch=xi(p,I.line)-1}else{var H=Math.max(y.repeat,2);k=p.getCursor(),I=Or(p,new Ve(k.line+H-1,1/0))}for(var W=0,V=k.line;V<I.line;V++){W=xi(p,k.line);var M=new Ve(k.line+1,xi(p,k.line+1)),Q=p.getRange(k,M);Q=y.keepSpaces?Q.replace(/\n\r?/g,""):Q.replace(/\n\s*/g," "),p.replaceRange(Q,k,M)}var se=new Ve(k.line,W);C.visualMode&&Qs(p,!1),p.setCursor(se)},newLineAndEnterInsertMode:function(p,y,C){if(!p.getOption("readOnly")){C.insertMode=!0;var k=Yi(p.getCursor());if(k.line===p.firstLine()&&!y.after)p.replaceRange(` `,new Ve(p.firstLine(),0)),p.setCursor(p.firstLine(),0);else{k.line=y.after?k.line:k.line-1,k.ch=xi(p,k.line),p.setCursor(k);var I=ut.default.commands.newlineAndIndentContinueComment||ut.default.commands.newlineAndIndent;I(p)}this.enterInsertMode(p,{repeat:y.repeat},C)}},paste:function(p,y,C){var k=Yi(p.getCursor()),I=X.registerController.getRegister(y.registerName),M=I.toString();if(M){if(y.matchIndent){var H=p.getOption("tabSize"),W=function(Lc){var Cm=Lc.split(" ").length-1,Sm=Lc.split(" ").length-1;return Cm*H+Sm*1},V=p.getLine(p.getCursor().line),Q=W(V.match(/^\s*/)[0]),se=M.replace(/\n$/,""),Ce=M!==se,xe=W(M.match(/^\s*/)[0]),M=se.replace(/^\s*/gm,function(jn){var Lc=Q+(W(jn)-xe);if(Lc<0)return"";if(p.getOption("indentWithTabs")){var Cm=Math.floor(Lc/H);return Array(Cm+1).join(" ")}else return Array(Lc+1).join(" ")});M+=Ce?` `:""}if(y.repeat>1)var M=Array(y.repeat+1).join(M);var ye=I.linewise,Ze=I.blockwise;if(Ze){M=M.split(` `),ye&&M.pop();for(var tt=0;tt<M.length;tt++)M[tt]=M[tt]==""?" ":M[tt];k.ch+=y.after?1:0,k.ch=Math.min(xi(p,k.line),k.ch)}else ye?C.visualMode?M=C.visualLine?M.slice(0,-1):` @@ -77,19 +77,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `+M.slice(0,M.length-1),k.ch=xi(p,k.line)):k.ch=0:k.ch+=y.after?1:0;var Ye,Ft;if(C.visualMode){C.lastPastedText=M;var Tt,It=_s(p,C),Hi=It[0],no=It[1],fr=p.getSelection(),Un=p.listSelections(),Ii=new Array(Un.length).join("1").split("1");C.lastSelection&&(Tt=C.lastSelection.headMark.find()),X.registerController.unnamedRegister.setText(fr),Ze?(p.replaceSelections(Ii),no=new Ve(Hi.line+M.length-1,Hi.ch),p.setCursor(Hi),Tc(p,no),p.replaceSelections(M),Ye=Hi):C.visualBlock?(p.replaceSelections(Ii),p.setCursor(Hi),p.replaceRange(M,Hi,Hi),Ye=Hi):(p.replaceRange(M,Hi,no),Ye=p.posFromIndex(p.indexFromPos(Hi)+M.length-1)),Tt&&(C.lastSelection.headMark=p.setBookmark(Tt)),ye&&(Ye.ch=0)}else if(Ze){p.setCursor(k);for(var tt=0;tt<M.length;tt++){var oi=k.line+tt;oi>p.lastLine()&&p.replaceRange(` `,new Ve(oi,0));var cn=xi(p,oi);cn<k.ch&&nu(p,oi,k.ch)}p.setCursor(k),Tc(p,new Ve(k.line+M.length-1,k.ch)),p.replaceSelections(M),Ye=k}else p.replaceRange(M,k),ye&&y.after?Ye=new Ve(k.line+1,Zs(p.getLine(k.line+1))):ye&&!y.after?Ye=new Ve(k.line,Zs(p.getLine(k.line))):!ye&&y.after?(Ft=p.indexFromPos(k),Ye=p.posFromIndex(Ft+M.length-1)):(Ft=p.indexFromPos(k),Ye=p.posFromIndex(Ft+M.length));C.visualMode&&Qs(p,!1),p.setCursor(Ye)}},undo:function(p,y){p.operation(function(){Iv(p,ut.default.commands.undo,y.repeat)(),p.setCursor(p.getCursor("anchor"))})},redo:function(p,y){Iv(p,ut.default.commands.redo,y.repeat)()},setRegister:function(p,y,C){C.inputState.registerName=y.selectedCharacter},setMark:function(p,y,C){var k=y.selectedCharacter;nl(p,C,k,p.getCursor())},replace:function(p,y,C){var k=y.selectedCharacter,I=p.getCursor(),M,H,W=p.listSelections();if(C.visualMode)I=p.getCursor("start"),H=p.getCursor("end");else{var V=p.getLine(I.line);M=I.ch+y.repeat,M>V.length&&(M=V.length),H=new Ve(I.line,M)}if(k==` `)C.visualMode||p.replaceRange("",I,H),(ut.default.commands.newlineAndIndentContinueComment||ut.default.commands.newlineAndIndent)(p);else{var Q=p.getRange(I,H);if(Q=Q.replace(/[^\n]/g,k),C.visualBlock){var se=new Array(p.getOption("tabSize")+1).join(" ");Q=p.getSelection(),Q=Q.replace(/\t/g,se).replace(/[^\n]/g,k).split(` -`),p.replaceSelections(Q)}else p.replaceRange(Q,I,H);C.visualMode?(I=De(W[0].anchor,W[0].head)?W[0].anchor:W[0].head,p.setCursor(I),Qs(p,!1)):p.setCursor(hr(H,0,-1))}},incrementNumberToken:function(p,y){for(var C=p.getCursor(),k=p.getLine(C.line),I=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,M,H,W,V;(M=I.exec(k))!==null&&(H=M.index,W=H+M[0].length,!(C.ch<W)););if(!(!y.backtrack&&W<=C.ch)){if(M){var Q=M[2]||M[4],se=M[3]||M[5],Ce=y.increase?1:-1,xe={"0b":2,0:8,"":10,"0x":16}[Q.toLowerCase()],ye=parseInt(M[1]+se,xe)+Ce*y.repeat;V=ye.toString(xe);var Ze=Q?new Array(se.length-V.length+1+M[1].length).join("0"):"";V.charAt(0)==="-"?V="-"+Q+Ze+V.substr(1):V=Q+Ze+V;var tt=new Ve(C.line,H),Ye=new Ve(C.line,W);p.replaceRange(V,tt,Ye)}else return;p.setCursor(new Ve(C.line,H+V.length-1))}},repeatLastEdit:function(p,y,C){var k=C.lastEditInputState;if(k){var I=y.repeat;I&&y.repeatIsExplicit?C.lastEditInputState.repeatOverride=I:I=C.lastEditInputState.repeatOverride||I,P9(p,C,I,!1)}},indent:function(p,y){p.indentLine(p.getCursor().line,y.indentRight)},exitInsertMode:xm};function ru(S,p){rl[S]=p}function Or(S,p){var y=S.state.vim,C=y.insertMode||y.visualMode,k=Math.min(Math.max(S.firstLine(),p.line),S.lastLine()),I=xi(S,k)-1+!!C,M=Math.min(Math.max(0,p.ch),I);return new Ve(k,M)}function Ko(S){var p={};for(var y in S)S.hasOwnProperty(y)&&(p[y]=S[y]);return p}function hr(S,p,y){return E4(p)==="object"&&(y=p.ch,p=p.line),new Ve(S.line+p,S.ch+y)}function w3(S,p,y,C){for(var k,I=[],M=[],H=0;H<p.length;H++){var W=p[H];y=="insert"&&W.context!="insert"||W.context&&W.context!=y||C.operator&&W.type=="action"||!(k=x3(S,W.keys))||(k=="partial"&&I.push(W),k=="full"&&M.push(W))}return{partial:I.length&&I,full:M.length&&M}}function x3(S,p){if(p.slice(-11)=="<character>"){var y=p.length-11,C=S.slice(0,y),k=p.slice(0,y);return C==k&&S.length>y?"full":k.indexOf(C)==0?"partial":!1}else return S==p?"full":p.indexOf(S)==0?"partial":!1}function C3(S){var p=/^.*(<[^>]+>)$/.exec(S),y=p?p[1]:S.slice(-1);if(y.length>1)switch(y){case"<CR>":y=` -`;break;case"<Space>":y=" ";break;default:y="";break}return y}function Iv(S,p,y){return function(){for(var C=0;C<y;C++)p(S)}}function Yi(S){return new Ve(S.line,S.ch)}function ge(S,p){return S.ch==p.ch&&S.line==p.line}function De(S,p){return S.line<p.line||S.line==p.line&&S.ch<p.ch}function bt(S,p){return arguments.length>2&&(p=bt.apply(void 0,Array.prototype.slice.call(arguments,1))),De(S,p)?S:p}function Wt(S,p){return arguments.length>2&&(p=Wt.apply(void 0,Array.prototype.slice.call(arguments,1))),De(S,p)?p:S}function wi(S,p,y){var C=De(S,p),k=De(p,y);return C&&k}function xi(S,p){return S.getLine(p).length}function bs(S){return S.trim?S.trim():S.replace(/^\s+|\s+$/g,"")}function vs(S){return S.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function nu(S,p,y){var C=xi(S,p),k=new Array(y-C+1).join(" ");S.setCursor(new Ve(p,C)),S.replaceRange(k,S.getCursor())}function Tc(S,p){var y=[],C=S.listSelections(),k=Yi(S.clipPos(p)),I=!ge(p,k),M=S.getCursor("head"),H=Ic(C,M),W=ge(C[H].head,C[H].anchor),V=C.length-1,Q=V-H>H?V:0,se=C[Q].anchor,Ce=Math.min(se.line,k.line),xe=Math.max(se.line,k.line),ye=se.ch,Ze=k.ch,tt=C[Q].head.ch-ye,Ye=Ze-ye;tt>0&&Ye<=0?(ye++,I||Ze--):tt<0&&Ye>=0?(ye--,W||Ze++):tt<0&&Ye==-1&&(ye--,Ze++);for(var Ft=Ce;Ft<=xe;Ft++){var Tt={anchor:new Ve(Ft,ye),head:new Ve(Ft,Ze)};y.push(Tt)}return S.setSelections(y),p.ch=Ze,se.ch=ye,se}function Cn(S,p,y){for(var C=[],k=0;k<y;k++){var I=hr(p,k,0);C.push({anchor:I,head:I})}S.setSelections(C,0)}function Ic(S,p,y){for(var C=0;C<S.length;C++){var k=y!="head"&&ge(S[C].anchor,p),I=y!="anchor"&&ge(S[C].head,p);if(k||I)return C}return-1}function _s(S,p){var y=p.lastSelection,C=function(){var M=S.listSelections(),H=M[0],W=M[M.length-1],V=De(H.anchor,H.head)?H.anchor:H.head,Q=De(W.anchor,W.head)?W.head:W.anchor;return[V,Q]},k=function(){var M=S.getCursor(),H=S.getCursor(),W=y.visualBlock;if(W){var V=W.width,Q=W.height;H=new Ve(M.line+Q,M.ch+V);for(var se=[],Ce=M.line;Ce<H.line;Ce++){var xe=new Ve(Ce,M.ch),ye=new Ve(Ce,H.ch),Ze={anchor:xe,head:ye};se.push(Ze)}S.setSelections(se)}else{var tt=y.anchorMark.find(),Ye=y.headMark.find(),Ft=Ye.line-tt.line,Tt=Ye.ch-tt.ch;H={line:H.line+Ft,ch:Ft?H.ch:Tt+H.ch},y.visualLine&&(M=new Ve(M.line,0),H=new Ve(H.line,xi(S,H.line))),S.setSelection(M,H)}return[M,H]};return p.visualMode?C():k()}function p9(S,p){var y=p.sel.anchor,C=p.sel.head;p.lastPastedText&&(C=S.posFromIndex(S.indexFromPos(y)+p.lastPastedText.length),p.lastPastedText=null),p.lastSelection={anchorMark:S.setBookmark(y),headMark:S.setBookmark(C),anchor:Yi(y),head:Yi(C),visualMode:p.visualMode,visualLine:p.visualLine,visualBlock:p.visualBlock}}function Eie(S,p,y){var C=S.state.vim.sel,k=C.head,I=C.anchor,M;return De(y,p)&&(M=y,y=p,p=M),De(k,I)?(k=bt(p,k),I=Wt(I,y)):(I=bt(p,I),k=Wt(k,y),k=hr(k,0,-1),k.ch==-1&&k.line!=S.firstLine()&&(k=new Ve(k.line-1,xi(S,k.line-1)))),[I,k]}function $h(S,p,k){var C=S.state.vim;p=p||C.sel;var k=k||C.visualLine?"line":C.visualBlock?"block":"char",I=S3(S,p,k);S.setSelections(I.ranges,I.primary)}function S3(S,p,y,C){var k=Yi(p.head),I=Yi(p.anchor);if(y=="char"){var M=!C&&!De(p.head,p.anchor)?1:0,H=De(p.head,p.anchor)?1:0;return k=hr(p.head,0,M),I=hr(p.anchor,0,H),{ranges:[{anchor:I,head:k}],primary:0}}else if(y=="line"){if(De(p.head,p.anchor))k.ch=0,I.ch=xi(S,I.line);else{I.ch=0;var W=S.lastLine();k.line>W&&(k.line=W),k.ch=xi(S,k.line)}return{ranges:[{anchor:I,head:k}],primary:0}}else if(y=="block"){var V=Math.min(I.line,k.line),Q=I.ch,se=Math.max(I.line,k.line),Ce=k.ch;Q<Ce?Ce+=1:Q+=1;for(var xe=se-V+1,ye=k.line==V?0:xe-1,Ze=[],tt=0;tt<xe;tt++)Ze.push({anchor:new Ve(V+tt,Q),head:new Ve(V+tt,Ce)});return{ranges:Ze,primary:ye}}}function Tie(S){var p=S.getCursor("head");return S.getSelection().length==1&&(p=bt(p,S.getCursor("anchor"))),p}function Qs(S,p){var y=S.state.vim;p!==!1&&S.setCursor(Or(S,y.sel.head)),p9(S,y),y.visualMode=!1,y.visualLine=!1,y.visualBlock=!1,y.insertMode||ut.default.signal(S,"vim-mode-change",{mode:"normal"})}function Iie(S,p,y){var C=S.getRange(p,y);if(/\n\s*$/.test(C)){var k=C.split(` -`);k.pop();for(var I,I=k.pop();k.length>0&&I&&oe(I);I=k.pop())y.line--,y.ch=0;I?(y.line--,y.ch=xi(S,y.line)):y.ch=0}}function Lie(S,p,y){p.ch=0,y.ch=0,y.line++}function Zs(S){if(!S)return 0;var p=S.search(/\S/);return p==-1?S.length:p}function Lv(S,p,y,C,k){for(var I=Tie(S),M=S.getLine(I.line),H=I.ch,W=k?d[0]:u[0];!W(M.charAt(H));)if(H++,H>=M.length)return null;C?W=u[0]:(W=d[0],W(M.charAt(H))||(W=d[1]));for(var V=H,Q=H;W(M.charAt(V))&&V<M.length;)V++;for(;W(M.charAt(Q))&&Q>=0;)Q--;if(Q++,p){for(var se=V;/\s/.test(M.charAt(V))&&V<M.length;)V++;if(se==V){for(var Ce=Q;/\s/.test(M.charAt(Q-1))&&Q>0;)Q--;Q||(Q=Ce)}}return{start:new Ve(I.line,Q),end:new Ve(I.line,V)}}function Aie(S,p,y){var C=p;if(!ut.default.findMatchingTag||!ut.default.findEnclosingTag)return{start:C,end:C};var k=ut.default.findMatchingTag(S,p)||ut.default.findEnclosingTag(S,p);return!k||!k.open||!k.close?{start:C,end:C}:y?{start:k.open.from,end:k.close.to}:{start:k.open.to,end:k.close.from}}function m9(S,p,y){ge(p,y)||X.jumpList.add(S,p,y)}function g9(S,p){X.lastCharacterSearch.increment=S,X.lastCharacterSearch.forward=p.forward,X.lastCharacterSearch.selectedCharacter=p.selectedCharacter}var Die={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},b9={bracket:{isComplete:function(p){if(p.nextCh===p.symb){if(p.depth++,p.depth>=1)return!0}else p.nextCh===p.reverseSymb&&p.depth--;return!1}},section:{init:function(p){p.curMoveThrough=!0,p.symb=(p.forward?"]":"[")===p.symb?"{":"}"},isComplete:function(p){return p.index===0&&p.nextCh===p.symb}},comment:{isComplete:function(p){var y=p.lastCh==="*"&&p.nextCh==="/";return p.lastCh=p.nextCh,y}},method:{init:function(p){p.symb=p.symb==="m"?"{":"}",p.reverseSymb=p.symb==="{"?"}":"{"},isComplete:function(p){return p.nextCh===p.symb}},preprocess:{init:function(p){p.index=0},isComplete:function(p){if(p.nextCh==="#"){var y=p.lineText.match(/^#(\w+)/)[1];if(y==="endif"){if(p.forward&&p.depth===0)return!0;p.depth++}else if(y==="if"){if(!p.forward&&p.depth===0)return!0;p.depth--}if(y==="else"&&p.depth===0)return!0}return!1}}};function Mie(S,p,y,C){var k=Yi(S.getCursor()),I=y?1:-1,M=y?S.lineCount():-1,H=k.ch,W=k.line,V=S.getLine(W),Q={lineText:V,nextCh:V.charAt(H),lastCh:null,index:H,symb:C,reverseSymb:(y?{")":"(","}":"{"}:{"(":")","{":"}"})[C],forward:y,depth:0,curMoveThrough:!1},se=Die[C];if(!se)return k;var Ce=b9[se].init,xe=b9[se].isComplete;for(Ce&&Ce(Q);W!==M&&p;){if(Q.index+=I,Q.nextCh=Q.lineText.charAt(Q.index),!Q.nextCh){if(W+=I,Q.lineText=S.getLine(W)||"",I>0)Q.index=0;else{var ye=Q.lineText.length;Q.index=ye>0?ye-1:0}Q.nextCh=Q.lineText.charAt(Q.index)}xe(Q)&&(k.line=W,k.ch=Q.index,p--)}return Q.nextCh||Q.curMoveThrough?new Ve(W,Q.index):k}function Nie(S,p,y,C,k){var I=p.line,M=p.ch,H=S.getLine(I),W=y?1:-1,V=C?u:d;if(k&&H==""){if(I+=W,H=S.getLine(I),!A(S,I))return null;M=y?0:H.length}for(;;){if(k&&H=="")return{from:0,to:0,line:I};for(var Q=W>0?H.length:-1,se=Q,Ce=Q;M!=Q;){for(var xe=!1,ye=0;ye<V.length&&!xe;++ye)if(V[ye](H.charAt(M))){for(se=M;M!=Q&&V[ye](H.charAt(M));)M+=W;if(Ce=M,xe=se!=Ce,se==p.ch&&I==p.line&&Ce==se+W)continue;return{from:Math.min(se,Ce+1),to:Math.max(se,Ce),line:I}}xe||(M+=W)}if(I+=W,!A(S,I))return null;H=S.getLine(I),M=W>0?0:H.length}}function Rie(S,p,y,C,k,I){var M=Yi(p),H=[];(C&&!k||!C&&k)&&y++;for(var W=!(C&&k),V=0;V<y;V++){var Q=Nie(S,p,C,I,W);if(!Q){var se=xi(S,S.lastLine());H.push(C?{line:S.lastLine(),from:se,to:se}:{line:0,from:0,to:0});break}H.push(Q),p=new Ve(Q.line,C?Q.to-1:Q.from)}var Ce=H.length!=y,xe=H[0],ye=H.pop();return C&&!k?(!Ce&&(xe.from!=M.ch||xe.line!=M.line)&&(ye=H.pop()),new Ve(ye.line,ye.from)):C&&k?new Ve(ye.line,ye.to-1):!C&&k?(!Ce&&(xe.to!=M.ch||xe.line!=M.line)&&(ye=H.pop()),new Ve(ye.line,ye.to)):new Ve(ye.line,ye.from)}function v9(S,p,y,C,k){var I=p,M=new Ve(I.line+y.repeat-1,1/0),H=S.clipPos(M);return H.ch--,k||(C.lastHPos=1/0,C.lastHSPos=S.charCoords(H,"div").left),M}function k3(S,p,y,C){for(var k=S.getCursor(),I=k.ch,M,H=0;H<p;H++){var W=S.getLine(k.line);if(M=Oie(I,W,C,y,!0),M==-1)return null;I=M}return new Ve(S.getCursor().line,M)}function Pie(S,p){var y=S.getCursor().line;return Or(S,new Ve(y,p-1))}function nl(S,p,y,C){Z(y,w)&&(p.marks[y]&&p.marks[y].clear(),p.marks[y]=S.setBookmark(C))}function Oie(S,p,y,C,k){var I;return C?(I=p.indexOf(y,S+1),I!=-1&&!k&&(I-=1)):(I=p.lastIndexOf(y,S-1),I!=-1&&!k&&(I+=1)),I}function _9(S,p,y,C,k){var I=p.line,M=S.firstLine(),H=S.lastLine(),W,V,Q=I;function se(tt){return!S.getLine(tt)}function Ce(tt,Ye,Ft){return Ft?se(tt)!=se(tt+Ye):!se(tt)&&se(tt+Ye)}if(C){for(;M<=Q&&Q<=H&&y>0;)Ce(Q,C)&&y--,Q+=C;return new Ve(Q,0)}var xe=S.state.vim;if(xe.visualLine&&Ce(I,1,!0)){var ye=xe.sel.anchor;Ce(ye.line,-1,!0)&&(!k||ye.line!=I)&&(I+=1)}var Ze=se(I);for(Q=I;Q<=H&&y;Q++)Ce(Q,1,!0)&&(!k||se(Q)!=Ze)&&y--;for(V=new Ve(Q,0),Q>H&&!Ze?Ze=!0:k=!1,Q=I;Q>M&&!((!k||se(Q)==Ze||Q==I)&&Ce(Q,-1,!0));Q--);return W=new Ve(Q,0),{start:W,end:V}}function Fie(S,p,y,C){function k(W,V){if(V.pos+V.dir<0||V.pos+V.dir>=V.line.length){if(V.ln+=V.dir,!A(W,V.ln)){V.line=null,V.ln=null,V.pos=null;return}V.line=W.getLine(V.ln),V.pos=V.dir>0?0:V.line.length-1}else V.pos+=V.dir}function I(W,V,Q,se){var tt=W.getLine(V),Ce=tt==="",xe={line:tt,ln:V,pos:Q,dir:se},ye={ln:xe.ln,pos:xe.pos},Ze=xe.line==="";for(k(W,xe);xe.line!==null;){if(ye.ln=xe.ln,ye.pos=xe.pos,xe.line===""&&!Ze)return{ln:xe.ln,pos:xe.pos};if(Ce&&xe.line!==""&&!oe(xe.line[xe.pos]))return{ln:xe.ln,pos:xe.pos};te(xe.line[xe.pos])&&!Ce&&(xe.pos===xe.line.length-1||oe(xe.line[xe.pos+1]))&&(Ce=!0),k(W,xe)}var tt=W.getLine(ye.ln);ye.pos=0;for(var Ye=tt.length-1;Ye>=0;--Ye)if(!oe(tt[Ye])){ye.pos=Ye;break}return ye}function M(W,V,Q,se){var Ze=W.getLine(V),Ce={line:Ze,ln:V,pos:Q,dir:se},xe={ln:Ce.ln,pos:null},ye=Ce.line==="";for(k(W,Ce);Ce.line!==null;){if(Ce.line===""&&!ye)return xe.pos!==null?xe:{ln:Ce.ln,pos:Ce.pos};if(te(Ce.line[Ce.pos])&&xe.pos!==null&&!(Ce.ln===xe.ln&&Ce.pos+1===xe.pos))return xe;Ce.line!==""&&!oe(Ce.line[Ce.pos])&&(ye=!1,xe={ln:Ce.ln,pos:Ce.pos}),k(W,Ce)}var Ze=W.getLine(xe.ln);xe.pos=0;for(var tt=0;tt<Ze.length;++tt)if(!oe(Ze[tt])){xe.pos=tt;break}return xe}for(var H={ln:p.line,pos:p.ch};y>0;)C<0?H=M(S,H.ln,H.pos,C):H=I(S,H.ln,H.pos,C),y--;return new Ve(H.ln,H.pos)}function zie(S,p,y,C){var k=p,I,M,H={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[y],W={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[y],V=S.getLine(k.line).charAt(k.ch),Q=V===W?1:0;if(I=S.scanForBracket(new Ve(k.line,k.ch+Q),-1,void 0,{bracketRegex:H}),M=S.scanForBracket(new Ve(k.line,k.ch+Q),1,void 0,{bracketRegex:H}),!I||!M)return{start:k,end:k};if(I=I.pos,M=M.pos,I.line==M.line&&I.ch>M.ch||I.line>M.line){var se=I;I=M,M=se}return C?M.ch+=1:I.ch+=1,{start:I,end:M}}function Bie(S,p,y,C){var k=Yi(p),I=S.getLine(k.line),M=I.split(""),H,W,V,Q,se=M.indexOf(y);if(k.ch<se?k.ch=se:se<k.ch&&M[k.ch]==y&&(W=k.ch,--k.ch),M[k.ch]==y&&!W)H=k.ch+1;else for(V=k.ch;V>-1&&!H;V--)M[V]==y&&(H=V+1);if(H&&!W)for(V=H,Q=M.length;V<Q&&!W;V++)M[V]==y&&(W=V);return!H||!W?{start:k,end:k}:(C&&(--H,++W),{start:new Ve(k.line,H),end:new Ve(k.line,W)})}Pe("pcre",!0,"boolean");function y9(){}y9.prototype={getQuery:function(){return X.query},setQuery:function(p){X.query=p},getOverlay:function(){return this.searchOverlay},setOverlay:function(p){this.searchOverlay=p},isReversed:function(){return X.isReversed},setReversed:function(p){X.isReversed=p},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(p){this.annotate=p}};function Js(S){var p=S.state.vim;return p.searchState_||(p.searchState_=new y9)}function Hie(S){return w9(S,"/")}function Uie(S){return x9(S,"/")}function w9(S,p){var y=x9(S,p)||[];if(!y.length)return[];var C=[];if(y[0]===0){for(var k=0;k<y.length;k++)typeof y[k]=="number"&&C.push(S.substring(y[k]+1,y[k+1]));return C}}function x9(S,p){p||(p="/");for(var y=!1,C=[],k=0;k<S.length;k++){var I=S.charAt(k);!y&&I==p&&C.push(k),y=!y&&I=="\\"}return C}function jie(S){for(var p="|(){",y="}",C=!1,k=[],I=-1;I<S.length;I++){var M=S.charAt(I)||"",H=S.charAt(I+1)||"",W=H&&p.indexOf(H)!=-1;C?((M!=="\\"||!W)&&k.push(M),C=!1):M==="\\"?(C=!0,H&&y.indexOf(H)!=-1&&(W=!0),(!W||H==="\\")&&k.push(M)):(k.push(M),W&&H!=="\\"&&k.push("\\"))}return k.join("")}var C9={"\\n":` -`,"\\r":"\r","\\t":" "};function Wie(S){for(var p=!1,y=[],C=-1;C<S.length;C++){var k=S.charAt(C)||"",I=S.charAt(C+1)||"";C9[k+I]?(y.push(C9[k+I]),C++):p?(y.push(k),p=!1):k==="\\"?(p=!0,U(I)||I==="$"?y.push("$"):I!=="/"&&I!=="\\"&&y.push("\\")):(k==="$"&&y.push("$"),y.push(k),I==="/"&&y.push("\\"))}return y.join("")}var S9={"\\/":"/","\\\\":"\\","\\n":` -`,"\\r":"\r","\\t":" ","\\&":"&"};function Vie(S){for(var p=new ut.default.StringStream(S),y=[];!p.eol();){for(;p.peek()&&p.peek()!="\\";)y.push(p.next());var C=!1;for(var k in S9)if(p.match(k,!0)){C=!0,y.push(S9[k]);break}C||y.push(p.next())}return y.join("")}function qie(S,p,y){var C=X.registerController.getRegister("/");if(C.setText(S),S instanceof RegExp)return S;var k=Uie(S),I,M;if(!k.length)I=S;else{I=S.substring(0,k[0]);var H=S.substring(k[0]);M=H.indexOf("i")!=-1}if(!I)return null;Oe("pcre")||(I=jie(I)),y&&(p=/^[^A-Z]*$/.test(I));var W=new RegExp(I,p||M?"im":"m");return W}function ou(S){typeof S=="string"&&(S=document.createElement(S));for(var p,y=1;y<arguments.length;y++)if(p=arguments[y])if(E4(p)!=="object"&&(p=document.createTextNode(p)),p.nodeType)S.appendChild(p);else for(var C in p)Object.prototype.hasOwnProperty.call(p,C)&&(C[0]==="$"?S.style[C.slice(1)]=p[C]:S.setAttribute(C,p[C]));return S}function Bi(S,p){var y=ou("pre",{$color:"red",class:"cm-vim-message"},p);S.openNotification?S.openNotification(y,{bottom:!0,duration:5e3}):alert(y.innerText)}function Kie(S,p){return ou(document.createDocumentFragment(),ou("span",{$fontFamily:"monospace",$whiteSpace:"pre"},S,ou("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),p&&ou("span",{$color:"#888"},p))}function Av(S,p){var y=Kie(p.prefix,p.desc);if(S.openDialog)S.openDialog(y,p.onClose,{onKeyDown:p.onKeyDown,onKeyUp:p.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:p.value});else{var C="";typeof p.prefix!="string"&&p.prefix&&(C+=p.prefix.textContent),p.desc&&(C+=" "+p.desc),p.onClose(prompt(C,""))}}function $ie(S,p){if(S instanceof RegExp&&p instanceof RegExp){for(var y=["global","multiline","ignoreCase","source"],C=0;C<y.length;C++){var k=y[C];if(S[k]!==p[k])return!1}return!0}return!1}function wm(S,p,y,C){if(p){var k=Js(S),I=qie(p,!!y,!!C);if(I)return k9(S,I),$ie(I,k.getQuery())||k.setQuery(I),I}}function Gie(S){if(S.source.charAt(0)=="^")var p=!0;return{token:function(C){if(p&&!C.sol()){C.skipToEnd();return}var k=C.match(S,!1);if(k)return k[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!S.exec(C.next()+k[0]))?(C.next(),null):(C.match(S),"searching");for(;!C.eol()&&(C.next(),!C.match(S,!1)););},query:S}}var Dv=0;function k9(S,p){clearTimeout(Dv),Dv=setTimeout(function(){if(S.state.vim){var y=Js(S),C=y.getOverlay();(!C||p!=C.query)&&(C&&S.removeOverlay(C),C=Gie(p),S.addOverlay(C),S.showMatchesOnScrollbar&&(y.getScrollbarAnnotate()&&y.getScrollbarAnnotate().clear(),y.setScrollbarAnnotate(S.showMatchesOnScrollbar(p))),y.setOverlay(C))}},50)}function E9(S,p,y,C){return C===void 0&&(C=1),S.operation(function(){for(var k=S.getCursor(),I=S.getSearchCursor(y,k),M=0;M<C;M++){var H=I.find(p);if(M==0&&H&&ge(I.from(),k)){var W=p?I.from():I.to();H=I.find(p),H&&!H[0]&&ge(I.from(),W)&&S.getLine(W.line).length==W.ch&&(H=I.find(p))}if(!H&&(I=S.getSearchCursor(y,p?new Ve(S.lastLine()):new Ve(S.firstLine(),0)),!I.find(p)))return}return I.from()})}function Yie(S,p,y,C,k){return C===void 0&&(C=1),S.operation(function(){var I=S.getCursor(),M=S.getSearchCursor(y,I),H=M.find(!p);!k.visualMode&&H&&ge(M.from(),I)&&M.find(!p);for(var W=0;W<C;W++)if(H=M.find(p),!H&&(M=S.getSearchCursor(y,p?new Ve(S.lastLine()):new Ve(S.firstLine(),0)),!M.find(p)))return;return[M.from(),M.to()]})}function E3(S){var p=Js(S);S.removeOverlay(Js(S).getOverlay()),p.setOverlay(null),p.getScrollbarAnnotate()&&(p.getScrollbarAnnotate().clear(),p.setScrollbarAnnotate(null))}function Xie(S,p,y){return typeof S!="number"&&(S=S.line),p instanceof Array?Z(S,p):typeof y=="number"?S>=p&&S<=y:S==p}function T3(S){var p=S.getScrollInfo(),y=6,C=10,k=S.coordsChar({left:0,top:y+p.top},"local"),I=p.clientHeight-C+p.top,M=S.coordsChar({left:0,top:I},"local");return{top:k.line,bottom:M.line}}function T9(S,p,y){if(y=="'"||y=="`")return X.jumpList.find(S,-1)||new Ve(0,0);if(y==".")return I9(S);var C=p.marks[y];return C&&C.find()}function I9(S){for(var p=S.doc.history.done,y=p.length;y--;)if(p[y].changes)return Yi(p[y].changes[0].to)}var L9=function(){this.buildCommandMap_()};L9.prototype={processCommand:function(p,y,C){var k=this;p.operation(function(){p.curOp.isVimOp=!0,k._processCommand(p,y,C)})},_processCommand:function(p,y,C){var k=p.state.vim,I=X.registerController.getRegister(":"),M=I.toString();k.visualMode&&Qs(p);var H=new ut.default.StringStream(y);I.setText(y);var W=C||{};W.input=y;try{this.parseInput_(p,H,W)}catch(Ce){throw Bi(p,Ce.toString()),Ce}var V,Q;if(!W.commandName)W.line!==void 0&&(Q="move");else if(V=this.matchCommand_(W.commandName),V){if(Q=V.name,V.excludeFromCommandHistory&&I.setText(M),this.parseCommandArgs_(H,W,V),V.type=="exToKey"){for(var se=0;se<V.toKeys.length;se++)me.handleKey(p,V.toKeys[se],"mapping");return}else if(V.type=="exToEx"){this.processCommand(p,V.toInput);return}}if(!Q){Bi(p,'Not an editor command ":'+y+'"');return}try{A9[Q](p,W),(!V||!V.possiblyAsync)&&W.callback&&W.callback()}catch(Ce){throw Bi(p,Ce.toString()),Ce}},parseInput_:function(p,y,C){y.eatWhile(":"),y.eat("%")?(C.line=p.firstLine(),C.lineEnd=p.lastLine()):(C.line=this.parseLineSpec_(p,y),C.line!==void 0&&y.eat(",")&&(C.lineEnd=this.parseLineSpec_(p,y)));var k=y.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return k?C.commandName=k[1]:C.commandName=y.match(/.*/)[0],C},parseLineSpec_:function(p,y){var C=y.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(y.next()){case".":return this.parseLineSpecOffset_(y,p.getCursor().line);case"$":return this.parseLineSpecOffset_(y,p.lastLine());case"'":var k=y.next(),I=T9(p,p.state.vim,k);if(!I)throw new Error("Mark not set");return this.parseLineSpecOffset_(y,I.line);case"-":case"+":return y.backUp(1),this.parseLineSpecOffset_(y,p.getCursor().line);default:y.backUp(1);return}},parseLineSpecOffset_:function(p,y){var C=p.match(/^([+-])?(\d+)/);if(C){var k=parseInt(C[2],10);C[1]=="-"?y-=k:y+=k}return y},parseCommandArgs_:function(p,y,C){if(!p.eol()){y.argString=p.match(/.*/)[0];var k=C.argDelimiter||/\s+/,I=bs(y.argString).split(k);I.length&&I[0]&&(y.args=I)}},matchCommand_:function(p){for(var y=p.length;y>0;y--){var C=p.substring(0,y);if(this.commandMap_[C]){var k=this.commandMap_[C];if(k.name.indexOf(p)===0)return k}}return null},buildCommandMap_:function(){this.commandMap_={};for(var p=0;p<VQ.length;p++){var y=VQ[p],C=y.shortName||y.name;this.commandMap_[C]=y}},map:function(p,y,C){if(p!=":"&&p.charAt(0)==":"){if(C)throw Error("Mode not supported for ex mappings");var k=p.substring(1);y!=":"&&y.charAt(0)==":"?this.commandMap_[k]={name:k,type:"exToEx",toInput:y.substring(1),user:!0}:this.commandMap_[k]={name:k,type:"exToKey",toKeys:y,user:!0}}else if(y!=":"&&y.charAt(0)==":"){var I={keys:p,type:"keyToEx",exArgs:{input:y.substring(1)}};C&&(I.context=C),wn.unshift(I)}else{var I={keys:p,type:"keyToKey",toKeys:y};C&&(I.context=C),wn.unshift(I)}},unmap:function(p,y){if(p!=":"&&p.charAt(0)==":"){if(y)throw Error("Mode not supported for ex mappings");var C=p.substring(1);if(this.commandMap_[C]&&this.commandMap_[C].user)return delete this.commandMap_[C],!0}else for(var k=p,I=0;I<wn.length;I++)if(k==wn[I].keys&&wn[I].context===y)return wn.splice(I,1),!0}};var A9={colorscheme:function(p,y){if(!y.args||y.args.length<1){Bi(p,p.getOption("theme"));return}p.setOption("theme",y.args[0])},map:function(p,y,C){var k=y.args;if(!k||k.length<2){p&&Bi(p,"Invalid mapping: "+y.input);return}ea.map(k[0],k[1],C)},imap:function(p,y){this.map(p,y,"insert")},nmap:function(p,y){this.map(p,y,"normal")},vmap:function(p,y){this.map(p,y,"visual")},unmap:function(p,y,C){var k=y.args;(!k||k.length<1||!ea.unmap(k[0],C))&&p&&Bi(p,"No such mapping: "+y.input)},move:function(p,y){Ei.processCommand(p,p.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:y.line+1})},set:function(p,y){var C=y.args,k=y.setCfg||{};if(!C||C.length<1){p&&Bi(p,"Invalid mapping: "+y.input);return}var I=C[0].split("="),M=I[0],H=I[1],W=!1;if(M.charAt(M.length-1)=="?"){if(H)throw Error("Trailing characters: "+y.argString);M=M.substring(0,M.length-1),W=!0}H===void 0&&M.substring(0,2)=="no"&&(M=M.substring(2),H=!1);var V=ve[M]&&ve[M].type=="boolean";if(V&&H==null&&(H=!0),!V&&H===void 0||W){var Q=Oe(M,p,k);Q instanceof Error?Bi(p,Q.message):Q===!0||Q===!1?Bi(p," "+(Q?"":"no")+M):Bi(p," "+M+"="+Q)}else{var se=Ee(M,H,p,k);se instanceof Error&&Bi(p,se.message)}},setlocal:function(p,y){y.setCfg={scope:"local"},this.set(p,y)},setglobal:function(p,y){y.setCfg={scope:"global"},this.set(p,y)},registers:function(p,y){var C=y.args,k=X.registerController.registers,I=`----------Registers---------- +`),p.replaceSelections(Q)}else p.replaceRange(Q,I,H);C.visualMode?(I=De(W[0].anchor,W[0].head)?W[0].anchor:W[0].head,p.setCursor(I),Qs(p,!1)):p.setCursor(hr(H,0,-1))}},incrementNumberToken:function(p,y){for(var C=p.getCursor(),k=p.getLine(C.line),I=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,M,H,W,V;(M=I.exec(k))!==null&&(H=M.index,W=H+M[0].length,!(C.ch<W)););if(!(!y.backtrack&&W<=C.ch)){if(M){var Q=M[2]||M[4],se=M[3]||M[5],Ce=y.increase?1:-1,xe={"0b":2,0:8,"":10,"0x":16}[Q.toLowerCase()],ye=parseInt(M[1]+se,xe)+Ce*y.repeat;V=ye.toString(xe);var Ze=Q?new Array(se.length-V.length+1+M[1].length).join("0"):"";V.charAt(0)==="-"?V="-"+Q+Ze+V.substr(1):V=Q+Ze+V;var tt=new Ve(C.line,H),Ye=new Ve(C.line,W);p.replaceRange(V,tt,Ye)}else return;p.setCursor(new Ve(C.line,H+V.length-1))}},repeatLastEdit:function(p,y,C){var k=C.lastEditInputState;if(k){var I=y.repeat;I&&y.repeatIsExplicit?C.lastEditInputState.repeatOverride=I:I=C.lastEditInputState.repeatOverride||I,O9(p,C,I,!1)}},indent:function(p,y){p.indentLine(p.getCursor().line,y.indentRight)},exitInsertMode:xm};function ru(S,p){rl[S]=p}function Or(S,p){var y=S.state.vim,C=y.insertMode||y.visualMode,k=Math.min(Math.max(S.firstLine(),p.line),S.lastLine()),I=xi(S,k)-1+!!C,M=Math.min(Math.max(0,p.ch),I);return new Ve(k,M)}function Ko(S){var p={};for(var y in S)S.hasOwnProperty(y)&&(p[y]=S[y]);return p}function hr(S,p,y){return E4(p)==="object"&&(y=p.ch,p=p.line),new Ve(S.line+p,S.ch+y)}function x3(S,p,y,C){for(var k,I=[],M=[],H=0;H<p.length;H++){var W=p[H];y=="insert"&&W.context!="insert"||W.context&&W.context!=y||C.operator&&W.type=="action"||!(k=C3(S,W.keys))||(k=="partial"&&I.push(W),k=="full"&&M.push(W))}return{partial:I.length&&I,full:M.length&&M}}function C3(S,p){if(p.slice(-11)=="<character>"){var y=p.length-11,C=S.slice(0,y),k=p.slice(0,y);return C==k&&S.length>y?"full":k.indexOf(C)==0?"partial":!1}else return S==p?"full":p.indexOf(S)==0?"partial":!1}function S3(S){var p=/^.*(<[^>]+>)$/.exec(S),y=p?p[1]:S.slice(-1);if(y.length>1)switch(y){case"<CR>":y=` +`;break;case"<Space>":y=" ";break;default:y="";break}return y}function Iv(S,p,y){return function(){for(var C=0;C<y;C++)p(S)}}function Yi(S){return new Ve(S.line,S.ch)}function ge(S,p){return S.ch==p.ch&&S.line==p.line}function De(S,p){return S.line<p.line||S.line==p.line&&S.ch<p.ch}function bt(S,p){return arguments.length>2&&(p=bt.apply(void 0,Array.prototype.slice.call(arguments,1))),De(S,p)?S:p}function Wt(S,p){return arguments.length>2&&(p=Wt.apply(void 0,Array.prototype.slice.call(arguments,1))),De(S,p)?p:S}function wi(S,p,y){var C=De(S,p),k=De(p,y);return C&&k}function xi(S,p){return S.getLine(p).length}function bs(S){return S.trim?S.trim():S.replace(/^\s+|\s+$/g,"")}function vs(S){return S.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function nu(S,p,y){var C=xi(S,p),k=new Array(y-C+1).join(" ");S.setCursor(new Ve(p,C)),S.replaceRange(k,S.getCursor())}function Tc(S,p){var y=[],C=S.listSelections(),k=Yi(S.clipPos(p)),I=!ge(p,k),M=S.getCursor("head"),H=Ic(C,M),W=ge(C[H].head,C[H].anchor),V=C.length-1,Q=V-H>H?V:0,se=C[Q].anchor,Ce=Math.min(se.line,k.line),xe=Math.max(se.line,k.line),ye=se.ch,Ze=k.ch,tt=C[Q].head.ch-ye,Ye=Ze-ye;tt>0&&Ye<=0?(ye++,I||Ze--):tt<0&&Ye>=0?(ye--,W||Ze++):tt<0&&Ye==-1&&(ye--,Ze++);for(var Ft=Ce;Ft<=xe;Ft++){var Tt={anchor:new Ve(Ft,ye),head:new Ve(Ft,Ze)};y.push(Tt)}return S.setSelections(y),p.ch=Ze,se.ch=ye,se}function Cn(S,p,y){for(var C=[],k=0;k<y;k++){var I=hr(p,k,0);C.push({anchor:I,head:I})}S.setSelections(C,0)}function Ic(S,p,y){for(var C=0;C<S.length;C++){var k=y!="head"&&ge(S[C].anchor,p),I=y!="anchor"&&ge(S[C].head,p);if(k||I)return C}return-1}function _s(S,p){var y=p.lastSelection,C=function(){var M=S.listSelections(),H=M[0],W=M[M.length-1],V=De(H.anchor,H.head)?H.anchor:H.head,Q=De(W.anchor,W.head)?W.head:W.anchor;return[V,Q]},k=function(){var M=S.getCursor(),H=S.getCursor(),W=y.visualBlock;if(W){var V=W.width,Q=W.height;H=new Ve(M.line+Q,M.ch+V);for(var se=[],Ce=M.line;Ce<H.line;Ce++){var xe=new Ve(Ce,M.ch),ye=new Ve(Ce,H.ch),Ze={anchor:xe,head:ye};se.push(Ze)}S.setSelections(se)}else{var tt=y.anchorMark.find(),Ye=y.headMark.find(),Ft=Ye.line-tt.line,Tt=Ye.ch-tt.ch;H={line:H.line+Ft,ch:Ft?H.ch:Tt+H.ch},y.visualLine&&(M=new Ve(M.line,0),H=new Ve(H.line,xi(S,H.line))),S.setSelection(M,H)}return[M,H]};return p.visualMode?C():k()}function m9(S,p){var y=p.sel.anchor,C=p.sel.head;p.lastPastedText&&(C=S.posFromIndex(S.indexFromPos(y)+p.lastPastedText.length),p.lastPastedText=null),p.lastSelection={anchorMark:S.setBookmark(y),headMark:S.setBookmark(C),anchor:Yi(y),head:Yi(C),visualMode:p.visualMode,visualLine:p.visualLine,visualBlock:p.visualBlock}}function Eie(S,p,y){var C=S.state.vim.sel,k=C.head,I=C.anchor,M;return De(y,p)&&(M=y,y=p,p=M),De(k,I)?(k=bt(p,k),I=Wt(I,y)):(I=bt(p,I),k=Wt(k,y),k=hr(k,0,-1),k.ch==-1&&k.line!=S.firstLine()&&(k=new Ve(k.line-1,xi(S,k.line-1)))),[I,k]}function $h(S,p,k){var C=S.state.vim;p=p||C.sel;var k=k||C.visualLine?"line":C.visualBlock?"block":"char",I=k3(S,p,k);S.setSelections(I.ranges,I.primary)}function k3(S,p,y,C){var k=Yi(p.head),I=Yi(p.anchor);if(y=="char"){var M=!C&&!De(p.head,p.anchor)?1:0,H=De(p.head,p.anchor)?1:0;return k=hr(p.head,0,M),I=hr(p.anchor,0,H),{ranges:[{anchor:I,head:k}],primary:0}}else if(y=="line"){if(De(p.head,p.anchor))k.ch=0,I.ch=xi(S,I.line);else{I.ch=0;var W=S.lastLine();k.line>W&&(k.line=W),k.ch=xi(S,k.line)}return{ranges:[{anchor:I,head:k}],primary:0}}else if(y=="block"){var V=Math.min(I.line,k.line),Q=I.ch,se=Math.max(I.line,k.line),Ce=k.ch;Q<Ce?Ce+=1:Q+=1;for(var xe=se-V+1,ye=k.line==V?0:xe-1,Ze=[],tt=0;tt<xe;tt++)Ze.push({anchor:new Ve(V+tt,Q),head:new Ve(V+tt,Ce)});return{ranges:Ze,primary:ye}}}function Tie(S){var p=S.getCursor("head");return S.getSelection().length==1&&(p=bt(p,S.getCursor("anchor"))),p}function Qs(S,p){var y=S.state.vim;p!==!1&&S.setCursor(Or(S,y.sel.head)),m9(S,y),y.visualMode=!1,y.visualLine=!1,y.visualBlock=!1,y.insertMode||ut.default.signal(S,"vim-mode-change",{mode:"normal"})}function Iie(S,p,y){var C=S.getRange(p,y);if(/\n\s*$/.test(C)){var k=C.split(` +`);k.pop();for(var I,I=k.pop();k.length>0&&I&&oe(I);I=k.pop())y.line--,y.ch=0;I?(y.line--,y.ch=xi(S,y.line)):y.ch=0}}function Lie(S,p,y){p.ch=0,y.ch=0,y.line++}function Zs(S){if(!S)return 0;var p=S.search(/\S/);return p==-1?S.length:p}function Lv(S,p,y,C,k){for(var I=Tie(S),M=S.getLine(I.line),H=I.ch,W=k?d[0]:u[0];!W(M.charAt(H));)if(H++,H>=M.length)return null;C?W=u[0]:(W=d[0],W(M.charAt(H))||(W=d[1]));for(var V=H,Q=H;W(M.charAt(V))&&V<M.length;)V++;for(;W(M.charAt(Q))&&Q>=0;)Q--;if(Q++,p){for(var se=V;/\s/.test(M.charAt(V))&&V<M.length;)V++;if(se==V){for(var Ce=Q;/\s/.test(M.charAt(Q-1))&&Q>0;)Q--;Q||(Q=Ce)}}return{start:new Ve(I.line,Q),end:new Ve(I.line,V)}}function Aie(S,p,y){var C=p;if(!ut.default.findMatchingTag||!ut.default.findEnclosingTag)return{start:C,end:C};var k=ut.default.findMatchingTag(S,p)||ut.default.findEnclosingTag(S,p);return!k||!k.open||!k.close?{start:C,end:C}:y?{start:k.open.from,end:k.close.to}:{start:k.open.to,end:k.close.from}}function g9(S,p,y){ge(p,y)||X.jumpList.add(S,p,y)}function b9(S,p){X.lastCharacterSearch.increment=S,X.lastCharacterSearch.forward=p.forward,X.lastCharacterSearch.selectedCharacter=p.selectedCharacter}var Die={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},v9={bracket:{isComplete:function(p){if(p.nextCh===p.symb){if(p.depth++,p.depth>=1)return!0}else p.nextCh===p.reverseSymb&&p.depth--;return!1}},section:{init:function(p){p.curMoveThrough=!0,p.symb=(p.forward?"]":"[")===p.symb?"{":"}"},isComplete:function(p){return p.index===0&&p.nextCh===p.symb}},comment:{isComplete:function(p){var y=p.lastCh==="*"&&p.nextCh==="/";return p.lastCh=p.nextCh,y}},method:{init:function(p){p.symb=p.symb==="m"?"{":"}",p.reverseSymb=p.symb==="{"?"}":"{"},isComplete:function(p){return p.nextCh===p.symb}},preprocess:{init:function(p){p.index=0},isComplete:function(p){if(p.nextCh==="#"){var y=p.lineText.match(/^#(\w+)/)[1];if(y==="endif"){if(p.forward&&p.depth===0)return!0;p.depth++}else if(y==="if"){if(!p.forward&&p.depth===0)return!0;p.depth--}if(y==="else"&&p.depth===0)return!0}return!1}}};function Mie(S,p,y,C){var k=Yi(S.getCursor()),I=y?1:-1,M=y?S.lineCount():-1,H=k.ch,W=k.line,V=S.getLine(W),Q={lineText:V,nextCh:V.charAt(H),lastCh:null,index:H,symb:C,reverseSymb:(y?{")":"(","}":"{"}:{"(":")","{":"}"})[C],forward:y,depth:0,curMoveThrough:!1},se=Die[C];if(!se)return k;var Ce=v9[se].init,xe=v9[se].isComplete;for(Ce&&Ce(Q);W!==M&&p;){if(Q.index+=I,Q.nextCh=Q.lineText.charAt(Q.index),!Q.nextCh){if(W+=I,Q.lineText=S.getLine(W)||"",I>0)Q.index=0;else{var ye=Q.lineText.length;Q.index=ye>0?ye-1:0}Q.nextCh=Q.lineText.charAt(Q.index)}xe(Q)&&(k.line=W,k.ch=Q.index,p--)}return Q.nextCh||Q.curMoveThrough?new Ve(W,Q.index):k}function Nie(S,p,y,C,k){var I=p.line,M=p.ch,H=S.getLine(I),W=y?1:-1,V=C?u:d;if(k&&H==""){if(I+=W,H=S.getLine(I),!A(S,I))return null;M=y?0:H.length}for(;;){if(k&&H=="")return{from:0,to:0,line:I};for(var Q=W>0?H.length:-1,se=Q,Ce=Q;M!=Q;){for(var xe=!1,ye=0;ye<V.length&&!xe;++ye)if(V[ye](H.charAt(M))){for(se=M;M!=Q&&V[ye](H.charAt(M));)M+=W;if(Ce=M,xe=se!=Ce,se==p.ch&&I==p.line&&Ce==se+W)continue;return{from:Math.min(se,Ce+1),to:Math.max(se,Ce),line:I}}xe||(M+=W)}if(I+=W,!A(S,I))return null;H=S.getLine(I),M=W>0?0:H.length}}function Rie(S,p,y,C,k,I){var M=Yi(p),H=[];(C&&!k||!C&&k)&&y++;for(var W=!(C&&k),V=0;V<y;V++){var Q=Nie(S,p,C,I,W);if(!Q){var se=xi(S,S.lastLine());H.push(C?{line:S.lastLine(),from:se,to:se}:{line:0,from:0,to:0});break}H.push(Q),p=new Ve(Q.line,C?Q.to-1:Q.from)}var Ce=H.length!=y,xe=H[0],ye=H.pop();return C&&!k?(!Ce&&(xe.from!=M.ch||xe.line!=M.line)&&(ye=H.pop()),new Ve(ye.line,ye.from)):C&&k?new Ve(ye.line,ye.to-1):!C&&k?(!Ce&&(xe.to!=M.ch||xe.line!=M.line)&&(ye=H.pop()),new Ve(ye.line,ye.to)):new Ve(ye.line,ye.from)}function _9(S,p,y,C,k){var I=p,M=new Ve(I.line+y.repeat-1,1/0),H=S.clipPos(M);return H.ch--,k||(C.lastHPos=1/0,C.lastHSPos=S.charCoords(H,"div").left),M}function E3(S,p,y,C){for(var k=S.getCursor(),I=k.ch,M,H=0;H<p;H++){var W=S.getLine(k.line);if(M=Oie(I,W,C,y,!0),M==-1)return null;I=M}return new Ve(S.getCursor().line,M)}function Pie(S,p){var y=S.getCursor().line;return Or(S,new Ve(y,p-1))}function nl(S,p,y,C){Z(y,w)&&(p.marks[y]&&p.marks[y].clear(),p.marks[y]=S.setBookmark(C))}function Oie(S,p,y,C,k){var I;return C?(I=p.indexOf(y,S+1),I!=-1&&!k&&(I-=1)):(I=p.lastIndexOf(y,S-1),I!=-1&&!k&&(I+=1)),I}function y9(S,p,y,C,k){var I=p.line,M=S.firstLine(),H=S.lastLine(),W,V,Q=I;function se(tt){return!S.getLine(tt)}function Ce(tt,Ye,Ft){return Ft?se(tt)!=se(tt+Ye):!se(tt)&&se(tt+Ye)}if(C){for(;M<=Q&&Q<=H&&y>0;)Ce(Q,C)&&y--,Q+=C;return new Ve(Q,0)}var xe=S.state.vim;if(xe.visualLine&&Ce(I,1,!0)){var ye=xe.sel.anchor;Ce(ye.line,-1,!0)&&(!k||ye.line!=I)&&(I+=1)}var Ze=se(I);for(Q=I;Q<=H&&y;Q++)Ce(Q,1,!0)&&(!k||se(Q)!=Ze)&&y--;for(V=new Ve(Q,0),Q>H&&!Ze?Ze=!0:k=!1,Q=I;Q>M&&!((!k||se(Q)==Ze||Q==I)&&Ce(Q,-1,!0));Q--);return W=new Ve(Q,0),{start:W,end:V}}function Fie(S,p,y,C){function k(W,V){if(V.pos+V.dir<0||V.pos+V.dir>=V.line.length){if(V.ln+=V.dir,!A(W,V.ln)){V.line=null,V.ln=null,V.pos=null;return}V.line=W.getLine(V.ln),V.pos=V.dir>0?0:V.line.length-1}else V.pos+=V.dir}function I(W,V,Q,se){var tt=W.getLine(V),Ce=tt==="",xe={line:tt,ln:V,pos:Q,dir:se},ye={ln:xe.ln,pos:xe.pos},Ze=xe.line==="";for(k(W,xe);xe.line!==null;){if(ye.ln=xe.ln,ye.pos=xe.pos,xe.line===""&&!Ze)return{ln:xe.ln,pos:xe.pos};if(Ce&&xe.line!==""&&!oe(xe.line[xe.pos]))return{ln:xe.ln,pos:xe.pos};te(xe.line[xe.pos])&&!Ce&&(xe.pos===xe.line.length-1||oe(xe.line[xe.pos+1]))&&(Ce=!0),k(W,xe)}var tt=W.getLine(ye.ln);ye.pos=0;for(var Ye=tt.length-1;Ye>=0;--Ye)if(!oe(tt[Ye])){ye.pos=Ye;break}return ye}function M(W,V,Q,se){var Ze=W.getLine(V),Ce={line:Ze,ln:V,pos:Q,dir:se},xe={ln:Ce.ln,pos:null},ye=Ce.line==="";for(k(W,Ce);Ce.line!==null;){if(Ce.line===""&&!ye)return xe.pos!==null?xe:{ln:Ce.ln,pos:Ce.pos};if(te(Ce.line[Ce.pos])&&xe.pos!==null&&!(Ce.ln===xe.ln&&Ce.pos+1===xe.pos))return xe;Ce.line!==""&&!oe(Ce.line[Ce.pos])&&(ye=!1,xe={ln:Ce.ln,pos:Ce.pos}),k(W,Ce)}var Ze=W.getLine(xe.ln);xe.pos=0;for(var tt=0;tt<Ze.length;++tt)if(!oe(Ze[tt])){xe.pos=tt;break}return xe}for(var H={ln:p.line,pos:p.ch};y>0;)C<0?H=M(S,H.ln,H.pos,C):H=I(S,H.ln,H.pos,C),y--;return new Ve(H.ln,H.pos)}function zie(S,p,y,C){var k=p,I,M,H={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[y],W={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[y],V=S.getLine(k.line).charAt(k.ch),Q=V===W?1:0;if(I=S.scanForBracket(new Ve(k.line,k.ch+Q),-1,void 0,{bracketRegex:H}),M=S.scanForBracket(new Ve(k.line,k.ch+Q),1,void 0,{bracketRegex:H}),!I||!M)return{start:k,end:k};if(I=I.pos,M=M.pos,I.line==M.line&&I.ch>M.ch||I.line>M.line){var se=I;I=M,M=se}return C?M.ch+=1:I.ch+=1,{start:I,end:M}}function Bie(S,p,y,C){var k=Yi(p),I=S.getLine(k.line),M=I.split(""),H,W,V,Q,se=M.indexOf(y);if(k.ch<se?k.ch=se:se<k.ch&&M[k.ch]==y&&(W=k.ch,--k.ch),M[k.ch]==y&&!W)H=k.ch+1;else for(V=k.ch;V>-1&&!H;V--)M[V]==y&&(H=V+1);if(H&&!W)for(V=H,Q=M.length;V<Q&&!W;V++)M[V]==y&&(W=V);return!H||!W?{start:k,end:k}:(C&&(--H,++W),{start:new Ve(k.line,H),end:new Ve(k.line,W)})}Pe("pcre",!0,"boolean");function w9(){}w9.prototype={getQuery:function(){return X.query},setQuery:function(p){X.query=p},getOverlay:function(){return this.searchOverlay},setOverlay:function(p){this.searchOverlay=p},isReversed:function(){return X.isReversed},setReversed:function(p){X.isReversed=p},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(p){this.annotate=p}};function Js(S){var p=S.state.vim;return p.searchState_||(p.searchState_=new w9)}function Hie(S){return x9(S,"/")}function Uie(S){return C9(S,"/")}function x9(S,p){var y=C9(S,p)||[];if(!y.length)return[];var C=[];if(y[0]===0){for(var k=0;k<y.length;k++)typeof y[k]=="number"&&C.push(S.substring(y[k]+1,y[k+1]));return C}}function C9(S,p){p||(p="/");for(var y=!1,C=[],k=0;k<S.length;k++){var I=S.charAt(k);!y&&I==p&&C.push(k),y=!y&&I=="\\"}return C}function jie(S){for(var p="|(){",y="}",C=!1,k=[],I=-1;I<S.length;I++){var M=S.charAt(I)||"",H=S.charAt(I+1)||"",W=H&&p.indexOf(H)!=-1;C?((M!=="\\"||!W)&&k.push(M),C=!1):M==="\\"?(C=!0,H&&y.indexOf(H)!=-1&&(W=!0),(!W||H==="\\")&&k.push(M)):(k.push(M),W&&H!=="\\"&&k.push("\\"))}return k.join("")}var S9={"\\n":` +`,"\\r":"\r","\\t":" "};function Wie(S){for(var p=!1,y=[],C=-1;C<S.length;C++){var k=S.charAt(C)||"",I=S.charAt(C+1)||"";S9[k+I]?(y.push(S9[k+I]),C++):p?(y.push(k),p=!1):k==="\\"?(p=!0,U(I)||I==="$"?y.push("$"):I!=="/"&&I!=="\\"&&y.push("\\")):(k==="$"&&y.push("$"),y.push(k),I==="/"&&y.push("\\"))}return y.join("")}var k9={"\\/":"/","\\\\":"\\","\\n":` +`,"\\r":"\r","\\t":" ","\\&":"&"};function Vie(S){for(var p=new ut.default.StringStream(S),y=[];!p.eol();){for(;p.peek()&&p.peek()!="\\";)y.push(p.next());var C=!1;for(var k in k9)if(p.match(k,!0)){C=!0,y.push(k9[k]);break}C||y.push(p.next())}return y.join("")}function qie(S,p,y){var C=X.registerController.getRegister("/");if(C.setText(S),S instanceof RegExp)return S;var k=Uie(S),I,M;if(!k.length)I=S;else{I=S.substring(0,k[0]);var H=S.substring(k[0]);M=H.indexOf("i")!=-1}if(!I)return null;Oe("pcre")||(I=jie(I)),y&&(p=/^[^A-Z]*$/.test(I));var W=new RegExp(I,p||M?"im":"m");return W}function ou(S){typeof S=="string"&&(S=document.createElement(S));for(var p,y=1;y<arguments.length;y++)if(p=arguments[y])if(E4(p)!=="object"&&(p=document.createTextNode(p)),p.nodeType)S.appendChild(p);else for(var C in p)Object.prototype.hasOwnProperty.call(p,C)&&(C[0]==="$"?S.style[C.slice(1)]=p[C]:S.setAttribute(C,p[C]));return S}function Bi(S,p){var y=ou("pre",{$color:"red",class:"cm-vim-message"},p);S.openNotification?S.openNotification(y,{bottom:!0,duration:5e3}):alert(y.innerText)}function Kie(S,p){return ou(document.createDocumentFragment(),ou("span",{$fontFamily:"monospace",$whiteSpace:"pre"},S,ou("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),p&&ou("span",{$color:"#888"},p))}function Av(S,p){var y=Kie(p.prefix,p.desc);if(S.openDialog)S.openDialog(y,p.onClose,{onKeyDown:p.onKeyDown,onKeyUp:p.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:p.value});else{var C="";typeof p.prefix!="string"&&p.prefix&&(C+=p.prefix.textContent),p.desc&&(C+=" "+p.desc),p.onClose(prompt(C,""))}}function $ie(S,p){if(S instanceof RegExp&&p instanceof RegExp){for(var y=["global","multiline","ignoreCase","source"],C=0;C<y.length;C++){var k=y[C];if(S[k]!==p[k])return!1}return!0}return!1}function wm(S,p,y,C){if(p){var k=Js(S),I=qie(p,!!y,!!C);if(I)return E9(S,I),$ie(I,k.getQuery())||k.setQuery(I),I}}function Gie(S){if(S.source.charAt(0)=="^")var p=!0;return{token:function(C){if(p&&!C.sol()){C.skipToEnd();return}var k=C.match(S,!1);if(k)return k[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!S.exec(C.next()+k[0]))?(C.next(),null):(C.match(S),"searching");for(;!C.eol()&&(C.next(),!C.match(S,!1)););},query:S}}var Dv=0;function E9(S,p){clearTimeout(Dv),Dv=setTimeout(function(){if(S.state.vim){var y=Js(S),C=y.getOverlay();(!C||p!=C.query)&&(C&&S.removeOverlay(C),C=Gie(p),S.addOverlay(C),S.showMatchesOnScrollbar&&(y.getScrollbarAnnotate()&&y.getScrollbarAnnotate().clear(),y.setScrollbarAnnotate(S.showMatchesOnScrollbar(p))),y.setOverlay(C))}},50)}function T9(S,p,y,C){return C===void 0&&(C=1),S.operation(function(){for(var k=S.getCursor(),I=S.getSearchCursor(y,k),M=0;M<C;M++){var H=I.find(p);if(M==0&&H&&ge(I.from(),k)){var W=p?I.from():I.to();H=I.find(p),H&&!H[0]&&ge(I.from(),W)&&S.getLine(W.line).length==W.ch&&(H=I.find(p))}if(!H&&(I=S.getSearchCursor(y,p?new Ve(S.lastLine()):new Ve(S.firstLine(),0)),!I.find(p)))return}return I.from()})}function Yie(S,p,y,C,k){return C===void 0&&(C=1),S.operation(function(){var I=S.getCursor(),M=S.getSearchCursor(y,I),H=M.find(!p);!k.visualMode&&H&&ge(M.from(),I)&&M.find(!p);for(var W=0;W<C;W++)if(H=M.find(p),!H&&(M=S.getSearchCursor(y,p?new Ve(S.lastLine()):new Ve(S.firstLine(),0)),!M.find(p)))return;return[M.from(),M.to()]})}function T3(S){var p=Js(S);S.removeOverlay(Js(S).getOverlay()),p.setOverlay(null),p.getScrollbarAnnotate()&&(p.getScrollbarAnnotate().clear(),p.setScrollbarAnnotate(null))}function Xie(S,p,y){return typeof S!="number"&&(S=S.line),p instanceof Array?Z(S,p):typeof y=="number"?S>=p&&S<=y:S==p}function I3(S){var p=S.getScrollInfo(),y=6,C=10,k=S.coordsChar({left:0,top:y+p.top},"local"),I=p.clientHeight-C+p.top,M=S.coordsChar({left:0,top:I},"local");return{top:k.line,bottom:M.line}}function I9(S,p,y){if(y=="'"||y=="`")return X.jumpList.find(S,-1)||new Ve(0,0);if(y==".")return L9(S);var C=p.marks[y];return C&&C.find()}function L9(S){for(var p=S.doc.history.done,y=p.length;y--;)if(p[y].changes)return Yi(p[y].changes[0].to)}var A9=function(){this.buildCommandMap_()};A9.prototype={processCommand:function(p,y,C){var k=this;p.operation(function(){p.curOp.isVimOp=!0,k._processCommand(p,y,C)})},_processCommand:function(p,y,C){var k=p.state.vim,I=X.registerController.getRegister(":"),M=I.toString();k.visualMode&&Qs(p);var H=new ut.default.StringStream(y);I.setText(y);var W=C||{};W.input=y;try{this.parseInput_(p,H,W)}catch(Ce){throw Bi(p,Ce.toString()),Ce}var V,Q;if(!W.commandName)W.line!==void 0&&(Q="move");else if(V=this.matchCommand_(W.commandName),V){if(Q=V.name,V.excludeFromCommandHistory&&I.setText(M),this.parseCommandArgs_(H,W,V),V.type=="exToKey"){for(var se=0;se<V.toKeys.length;se++)me.handleKey(p,V.toKeys[se],"mapping");return}else if(V.type=="exToEx"){this.processCommand(p,V.toInput);return}}if(!Q){Bi(p,'Not an editor command ":'+y+'"');return}try{D9[Q](p,W),(!V||!V.possiblyAsync)&&W.callback&&W.callback()}catch(Ce){throw Bi(p,Ce.toString()),Ce}},parseInput_:function(p,y,C){y.eatWhile(":"),y.eat("%")?(C.line=p.firstLine(),C.lineEnd=p.lastLine()):(C.line=this.parseLineSpec_(p,y),C.line!==void 0&&y.eat(",")&&(C.lineEnd=this.parseLineSpec_(p,y)));var k=y.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return k?C.commandName=k[1]:C.commandName=y.match(/.*/)[0],C},parseLineSpec_:function(p,y){var C=y.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(y.next()){case".":return this.parseLineSpecOffset_(y,p.getCursor().line);case"$":return this.parseLineSpecOffset_(y,p.lastLine());case"'":var k=y.next(),I=I9(p,p.state.vim,k);if(!I)throw new Error("Mark not set");return this.parseLineSpecOffset_(y,I.line);case"-":case"+":return y.backUp(1),this.parseLineSpecOffset_(y,p.getCursor().line);default:y.backUp(1);return}},parseLineSpecOffset_:function(p,y){var C=p.match(/^([+-])?(\d+)/);if(C){var k=parseInt(C[2],10);C[1]=="-"?y-=k:y+=k}return y},parseCommandArgs_:function(p,y,C){if(!p.eol()){y.argString=p.match(/.*/)[0];var k=C.argDelimiter||/\s+/,I=bs(y.argString).split(k);I.length&&I[0]&&(y.args=I)}},matchCommand_:function(p){for(var y=p.length;y>0;y--){var C=p.substring(0,y);if(this.commandMap_[C]){var k=this.commandMap_[C];if(k.name.indexOf(p)===0)return k}}return null},buildCommandMap_:function(){this.commandMap_={};for(var p=0;p<qQ.length;p++){var y=qQ[p],C=y.shortName||y.name;this.commandMap_[C]=y}},map:function(p,y,C){if(p!=":"&&p.charAt(0)==":"){if(C)throw Error("Mode not supported for ex mappings");var k=p.substring(1);y!=":"&&y.charAt(0)==":"?this.commandMap_[k]={name:k,type:"exToEx",toInput:y.substring(1),user:!0}:this.commandMap_[k]={name:k,type:"exToKey",toKeys:y,user:!0}}else if(y!=":"&&y.charAt(0)==":"){var I={keys:p,type:"keyToEx",exArgs:{input:y.substring(1)}};C&&(I.context=C),wn.unshift(I)}else{var I={keys:p,type:"keyToKey",toKeys:y};C&&(I.context=C),wn.unshift(I)}},unmap:function(p,y){if(p!=":"&&p.charAt(0)==":"){if(y)throw Error("Mode not supported for ex mappings");var C=p.substring(1);if(this.commandMap_[C]&&this.commandMap_[C].user)return delete this.commandMap_[C],!0}else for(var k=p,I=0;I<wn.length;I++)if(k==wn[I].keys&&wn[I].context===y)return wn.splice(I,1),!0}};var D9={colorscheme:function(p,y){if(!y.args||y.args.length<1){Bi(p,p.getOption("theme"));return}p.setOption("theme",y.args[0])},map:function(p,y,C){var k=y.args;if(!k||k.length<2){p&&Bi(p,"Invalid mapping: "+y.input);return}ea.map(k[0],k[1],C)},imap:function(p,y){this.map(p,y,"insert")},nmap:function(p,y){this.map(p,y,"normal")},vmap:function(p,y){this.map(p,y,"visual")},unmap:function(p,y,C){var k=y.args;(!k||k.length<1||!ea.unmap(k[0],C))&&p&&Bi(p,"No such mapping: "+y.input)},move:function(p,y){Ei.processCommand(p,p.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:y.line+1})},set:function(p,y){var C=y.args,k=y.setCfg||{};if(!C||C.length<1){p&&Bi(p,"Invalid mapping: "+y.input);return}var I=C[0].split("="),M=I[0],H=I[1],W=!1;if(M.charAt(M.length-1)=="?"){if(H)throw Error("Trailing characters: "+y.argString);M=M.substring(0,M.length-1),W=!0}H===void 0&&M.substring(0,2)=="no"&&(M=M.substring(2),H=!1);var V=ve[M]&&ve[M].type=="boolean";if(V&&H==null&&(H=!0),!V&&H===void 0||W){var Q=Oe(M,p,k);Q instanceof Error?Bi(p,Q.message):Q===!0||Q===!1?Bi(p," "+(Q?"":"no")+M):Bi(p," "+M+"="+Q)}else{var se=Ee(M,H,p,k);se instanceof Error&&Bi(p,se.message)}},setlocal:function(p,y){y.setCfg={scope:"local"},this.set(p,y)},setglobal:function(p,y){y.setCfg={scope:"global"},this.set(p,y)},registers:function(p,y){var C=y.args,k=X.registerController.registers,I=`----------Registers---------- `;if(C){var M;C=C.join("");for(var W=0;W<C.length;W++)if(M=C.charAt(W),!!X.registerController.isValidRegister(M)){var V=k[M]||new Ot;I+='"'+M+" "+V.toString()+` `}}else for(var M in k){var H=k[M].toString();H.length&&(I+='"'+M+" "+H+` `)}Bi(p,I)},sort:function(p,y){var C,k,I,M,H;function W(){if(y.argString){var Ii=new ut.default.StringStream(y.argString);if(Ii.eat("!")&&(C=!0),Ii.eol())return;if(!Ii.eatSpace())return"Invalid arguments";var oi=Ii.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!oi&&!Ii.eol())return"Invalid arguments";if(oi[1]){k=oi[1].indexOf("i")!=-1,I=oi[1].indexOf("u")!=-1;var cn=oi[1].indexOf("d")!=-1||oi[1].indexOf("n")!=-1&&1,oo=oi[1].indexOf("x")!=-1&&1,jn=oi[1].indexOf("o")!=-1&&1;if(cn+oo+jn>1)return"Invalid arguments";M=cn&&"decimal"||oo&&"hex"||jn&&"octal"}oi[2]&&(H=new RegExp(oi[2].substr(1,oi[2].length-2),k?"i":""))}}var V=W();if(V){Bi(p,V+": "+y.argString);return}var Q=y.line||p.firstLine(),se=y.lineEnd||y.line||p.lastLine();if(Q==se)return;var Ce=new Ve(Q,0),xe=new Ve(se,xi(p,se)),ye=p.getRange(Ce,xe).split(` `),Ze=H||(M=="decimal"?/(-?)([\d]+)/:M=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:M=="octal"?/([0-7]+)/:null),tt=M=="decimal"?10:M=="hex"?16:M=="octal"?8:null,Ye=[],Ft=[];if(M||H)for(var Tt=0;Tt<ye.length;Tt++){var It=H?ye[Tt].match(H):null;It&&It[0]!=""?Ye.push(It):!H&&Ze.exec(ye[Tt])?Ye.push(ye[Tt]):Ft.push(ye[Tt])}else Ft=ye;function Hi(Ii,oi){if(C){var cn;cn=Ii,Ii=oi,oi=cn}k&&(Ii=Ii.toLowerCase(),oi=oi.toLowerCase());var oo=M&&Ze.exec(Ii),jn=M&&Ze.exec(oi);return oo?(oo=parseInt((oo[1]+oo[2]).toLowerCase(),tt),jn=parseInt((jn[1]+jn[2]).toLowerCase(),tt),oo-jn):Ii<oi?-1:1}function no(Ii,oi){if(C){var cn;cn=Ii,Ii=oi,oi=cn}return k&&(Ii[0]=Ii[0].toLowerCase(),oi[0]=oi[0].toLowerCase()),Ii[0]<oi[0]?-1:1}if(Ye.sort(H?no:Hi),H)for(var Tt=0;Tt<Ye.length;Tt++)Ye[Tt]=Ye[Tt].input;else M||Ft.sort(Hi);if(ye=C?Ye.concat(Ft):Ft.concat(Ye),I){var fr=ye,Un;ye=[];for(var Tt=0;Tt<fr.length;Tt++)fr[Tt]!=Un&&ye.push(fr[Tt]),Un=fr[Tt]}p.replaceRange(ye.join(` `),Ce,xe)},vglobal:function(p,y){this.global(p,y)},global:function(p,y){var C=y.argString;if(!C){Bi(p,"Regular Expression missing from global");return}var k=y.commandName[0]==="v",I=y.line!==void 0?y.line:p.firstLine(),M=y.lineEnd||y.line||p.lastLine(),H=Hie(C),W=C,V;if(H.length&&(W=H[0],V=H.slice(1,H.length).join("/")),W)try{wm(p,W,!0,!0)}catch(Ye){Bi(p,"Invalid regex: "+W);return}for(var Q=Js(p).getQuery(),se=[],Ce=I;Ce<=M;Ce++){var xe=p.getLineHandle(Ce),ye=Q.test(xe.text);ye!==k&&se.push(V?xe:xe.text)}if(!V){Bi(p,se.join(` -`));return}var Ze=0,tt=function Ye(){if(Ze<se.length){var Ft=se[Ze++],Tt=p.getLineNumber(Ft);if(Tt==null){Ye();return}var It=Tt+1+V;ea.processCommand(p,It,{callback:Ye})}};tt()},substitute:function(p,y){if(!p.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=y.argString,k=C?w9(C,C[0]):[],I,M="",H,W,V,Q=!1,se=!1;if(k.length)I=k[0],Oe("pcre")&&I!==""&&(I=new RegExp(I).source),M=k[1],M!==void 0&&(Oe("pcre")?M=Vie(M.replace(/([^\\])&/g,"$1$$&")):M=Wie(M),X.lastSubstituteReplacePart=M),H=k[2]?k[2].split(" "):[];else if(C&&C.length){Bi(p,"Substitutions should be of the form :s/pattern/replace/");return}if(H&&(W=H[0],V=parseInt(H[1]),W&&(W.indexOf("c")!=-1&&(Q=!0),W.indexOf("g")!=-1&&(se=!0),Oe("pcre")?I=I+"/"+W:I=I.replace(/\//g,"\\/")+"/"+W)),I)try{wm(p,I,!0,!0)}catch(Ft){Bi(p,"Invalid regex: "+I);return}if(M=M||X.lastSubstituteReplacePart,M===void 0){Bi(p,"No previous substitute regular expression");return}var Ce=Js(p),xe=Ce.getQuery(),ye=y.line!==void 0?y.line:p.getCursor().line,Ze=y.lineEnd||ye;ye==p.firstLine()&&Ze==p.lastLine()&&(Ze=1/0),V&&(ye=Ze,Ze=ye+V-1);var tt=Or(p,new Ve(ye,0)),Ye=p.getSearchCursor(xe,tt);p.pushUndoStop(),Qie(p,Q,se,ye,Ze,Ye,xe,M,y.callback)},redo:ut.default.commands.redo,undo:ut.default.commands.undo,write:function(p){ut.default.commands.save?ut.default.commands.save(p):p.save&&p.save()},nohlsearch:function(p){E3(p)},yank:function(p){var y=Yi(p.getCursor()),C=y.line,k=p.getLine(C);X.registerController.pushText("0","yank",k,!0,!0)},delmarks:function(p,y){if(!y.argString||!bs(y.argString)){Bi(p,"Argument required");return}for(var C=p.state.vim,k=new ut.default.StringStream(bs(y.argString));!k.eol();){k.eatSpace();var I=k.pos;if(!k.match(/[a-zA-Z]/,!1)){Bi(p,"Invalid argument: "+y.argString.substring(I));return}var M=k.next();if(k.match("-",!0)){if(!k.match(/[a-zA-Z]/,!1)){Bi(p,"Invalid argument: "+y.argString.substring(I));return}var H=M,W=k.next();if(L(H)&&L(W)||Y(H)&&Y(W)){var V=H.charCodeAt(0),Q=W.charCodeAt(0);if(V>=Q){Bi(p,"Invalid argument: "+y.argString.substring(I));return}for(var se=0;se<=Q-V;se++){var Ce=String.fromCharCode(V+se);delete C.marks[Ce]}}else{Bi(p,"Invalid argument: "+H+"-");return}}else delete C.marks[M]}}},ea=new L9;function Qie(S,p,y,C,k,I,M,H,W){S.state.vim.exMode=!0;var V=!1,Q,se,Ce;function xe(){S.operation(function(){for(;!V;)ye(),tt();Ye()})}function ye(){var Tt=S.getRange(I.from(),I.to()),It=Tt.replace(M,H),Hi=I.to().line;I.replace(It),se=I.to().line,k+=se-Hi,Ce=se<Hi}function Ze(){var Tt=Q&&Yi(I.to()),It=I.findNext();return It&&!It[0]&&Tt&&ge(I.from(),Tt)&&(It=I.findNext()),It}function tt(){for(;Ze()&&Xie(I.from(),C,k);)if(!(!y&&I.from().line==se&&!Ce)){S.scrollIntoView(I.from(),30),S.setSelection(I.from(),I.to()),Q=I.from(),V=!1;return}V=!0}function Ye(Tt){if(Tt&&Tt(),S.focus(),Q){S.setCursor(Q);var It=S.state.vim;It.exMode=!1,It.lastHPos=It.lastHSPos=Q.ch}W&&W()}function Ft(Tt,It,Hi){ut.default.e_stop(Tt);var no=ut.default.keyName(Tt);switch(no){case"Y":ye(),tt();break;case"N":tt();break;case"A":var fr=W;W=void 0,S.operation(xe),W=fr;break;case"L":ye();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":Ye(Hi);break}return V&&Ye(Hi),!0}if(tt(),V){Bi(S,"No matches for "+M.source);return}if(!p){xe(),W&&W();return}Av(S,{prefix:ou("span","replace with ",ou("strong",H)," (y/n/a/q/l)"),onKeyDown:Ft})}ut.default.keyMap.vim={attach:n,detach:r,call:o};function xm(S){var p=S.state.vim,y=X.macroModeState,C=X.registerController.getRegister("."),k=y.isPlaying,I=y.lastInsertModeChanges;k||(S.off("change",M9),ut.default.off(S.getInputField(),"keydown",R9)),!k&&p.insertModeRepeat>1&&(P9(S,p,p.insertModeRepeat-1,!0),p.lastEditInputState.repeatOverride=p.insertModeRepeat),delete p.insertModeRepeat,p.insertMode=!1,S.setCursor(S.getCursor().line,S.getCursor().ch-1),S.setOption("keyMap","vim"),S.setOption("disableInput",!0),S.toggleOverwrite(!1),C.setText(I.changes.join("")),ut.default.signal(S,"vim-mode-change",{mode:"normal"}),y.isRecording&&tre(y),S.enterVimMode()}function D9(S){wn.unshift(S)}function Zie(S,p,y,C,k){var I={keys:S,type:p};I[p]=y,I[p+"Args"]=C;for(var M in k)I[M]=k[M];D9(I)}Pe("insertModeEscKeysTimeout",200,"number"),ut.default.keyMap["vim-insert"]={fallthrough:["default"],attach:n,detach:r,call:o},ut.default.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:n,detach:r,call:o};function Jie(S,p,y,C){var k=X.registerController.getRegister(C);if(C==":"){k.keyBuffer[0]&&ea.processCommand(S,k.keyBuffer[0]),y.isPlaying=!1;return}var I=k.keyBuffer,M=0;y.isPlaying=!0,y.replaySearchQueries=k.searchQueries.slice(0);for(var H=0;H<I.length;H++)for(var W=I[H],V,Q;W;)if(V=/<\w+-.+?>|<\w+>|./.exec(W),Q=V[0],W=W.substring(V.index+Q.length),me.handleKey(S,Q,"macro"),p.insertMode){var se=k.insertModeChanges[M++].changes;X.macroModeState.lastInsertModeChanges.changes=se,O9(S,se,1),xm(S)}y.isPlaying=!1}function ere(S,p){if(!S.isPlaying){var y=S.latestRegister,C=X.registerController.getRegister(y);C&&C.pushText(p)}}function tre(S){if(!S.isPlaying){var p=S.latestRegister,y=X.registerController.getRegister(p);y&&y.pushInsertModeChanges&&y.pushInsertModeChanges(S.lastInsertModeChanges)}}function ire(S,p){if(!S.isPlaying){var y=S.latestRegister,C=X.registerController.getRegister(y);C&&C.pushSearchQuery&&C.pushSearchQuery(p)}}function M9(S,p){var y=X.macroModeState,C=y.lastInsertModeChanges;if(!y.isPlaying)for(;p;){if(C.expectCursorActivityForChange=!0,C.ignoreCount>1)C.ignoreCount--;else if(p.origin=="+input"||p.origin=="paste"||p.origin===void 0){var k=S.listSelections().length;k>1&&(C.ignoreCount=k);var I=p.text.join(` -`);C.maybeReset&&(C.changes=[],C.maybeReset=!1),I&&(S.state.overwrite&&!/\n/.test(I)?C.changes.push([I]):C.changes.push(I))}p=p.next}}function N9(S){var p=S.state.vim;if(p.insertMode){var y=X.macroModeState;if(y.isPlaying)return;var C=y.lastInsertModeChanges;C.expectCursorActivityForChange?C.expectCursorActivityForChange=!1:C.maybeReset=!0}else S.curOp.isVimOp||rre(S,p)}function rre(S,p){var y=S.getCursor("anchor"),C=S.getCursor("head");if(p.visualMode&&!S.somethingSelected()?Qs(S,!1):!p.visualMode&&!p.insertMode&&S.somethingSelected()&&(p.visualMode=!0,p.visualLine=!1,ut.default.signal(S,"vim-mode-change",{mode:"visual"})),p.visualMode){var k=De(C,y)?0:-1,I=De(C,y)?-1:0;C=hr(C,0,k),y=hr(y,0,I),p.sel={anchor:y,head:C},nl(S,p,"<",bt(C,y)),nl(S,p,">",Wt(C,y))}else p.insertMode||(p.lastHPos=S.getCursor().ch)}function I3(S){this.keyName=S}function R9(S){var p=X.macroModeState,y=p.lastInsertModeChanges,C=ut.default.keyName(S);if(!C)return;function k(){return y.maybeReset&&(y.changes=[],y.maybeReset=!1),y.changes.push(new I3(C)),!0}(C.indexOf("Delete")!=-1||C.indexOf("Backspace")!=-1)&&ut.default.lookupKey(C,"vim-insert",k)}function P9(S,p,y,C){var k=X.macroModeState;k.isPlaying=!0;var I=!!p.lastEditActionCommand,M=p.inputState;function H(){I?Ei.processAction(S,p,p.lastEditActionCommand):Ei.evalInput(S,p)}function W(Q){if(k.lastInsertModeChanges.changes.length>0){Q=p.lastEditActionCommand?Q:1;var se=k.lastInsertModeChanges;O9(S,se.changes,Q)}}if(p.inputState=p.lastEditInputState,I&&p.lastEditActionCommand.interlaceInsertRepeat)for(var V=0;V<y;V++)H(),W(1);else C||H(),W(y);p.inputState=M,p.insertMode&&!C&&xm(S),k.isPlaying=!1}function O9(S,p,y){function C(se){return typeof se=="string"?ut.default.commands[se](S):se(S),!0}var k=S.getCursor("head"),I=X.macroModeState.lastInsertModeChanges.visualBlock;I&&(Cn(S,k,I+1),y=S.listSelections().length,S.setCursor(k));for(var M=0;M<y;M++){I&&S.setCursor(hr(k,M,0));for(var H=0;H<p.length;H++){var W=p[H];if(W instanceof I3)ut.default.lookupKey(W.keyName,"vim-insert",C);else if(typeof W=="string")window.cm=S,S.replaceSelections(W);else{var V=S.getCursor(),Q=hr(V,0,W[0].length);S.replaceRange(W[0],V,Q),S.setCursor(Q)}}}I&&S.setCursor(hr(k,0,1))}return R(),me};um.Vim=qQ;ut.default.Vim=qQ();var __e=ut.default;um.default=__e});var GQ=Xi(T4=>{"use strict";Object.defineProperty(T4,"__esModule",{value:!0});T4.default=void 0;function y_e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function $Q(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}function w_e(i,e,t){return e&&$Q(i.prototype,e),t&&$Q(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var x_e=function(){function i(e,t){var r=this,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;y_e(this,i),this.closeInput=function(){r.removeInputListeners(),r.input=null,r.setSec(""),r.editor&&r.editor.focus()},this.clear=function(){r.setInnerHtml_(r.node,"")},this.inputKeyUp=function(o){var s=r.input.options;s&&s.onKeyUp&&s.onKeyUp(o,o.target.value,r.closeInput)},this.inputKeyInput=function(o){var s=r.input.options;s&&s.onKeyInput&&s.onKeyUp(o,o.target.value,r.closeInput)},this.inputBlur=function(){var o=r.input.options;o.closeOnBlur&&r.closeInput()},this.inputKeyDown=function(o){var s=r.input,a=s.options,l=s.callback;a&&a.onKeyDown&&a.onKeyDown(o,o.target.value,r.closeInput)||((o.keyCode===27||a&&a.closeOnEnter!==!1&&o.keyCode==13)&&(r.input.node.blur(),o.stopPropagation(),r.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=n}return w_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,r,n){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:r,options:n,node:o},n&&(n.selectValueOnOpen&&o.select(),n.value&&(o.value=n.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 r=this,n=document.createElement("span");this.setInnerHtml_(n,t),this.notifNode.textContent=n.textContent,this.notifTimeout=setTimeout(function(){r.notifNode.textContent=""},5e3)}},{key:"setInnerHtml_",value:function(t,r){for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);r&&(this.sanitizer?t.appendChild(this.sanitizer(r)):t.appendChild(r))}}]),i}();T4.default=x_e});var ZQ=Xi(dv=>{"use strict";Object.defineProperty(dv,"__esModule",{value:!0});Object.defineProperty(dv,"StatusBar",{enumerable:!0,get:function(){return XQ.default}});Object.defineProperty(dv,"VimMode",{enumerable:!0,get:function(){return YQ.default}});dv.initVimMode=C_e;var YQ=QQ(KQ()),XQ=QQ(GQ());function QQ(i){return i&&i.__esModule?i:{default:i}}function C_e(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:XQ.default,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,n=new YQ.default(i);if(!e)return n.attach(),n;var o=new t(e,i,r),s="";return n.on("vim-mode-change",function(a){o.setMode(a)}),n.on("vim-keypress",function(a){a===":"?s="":s+=a,o.setKeyBuffer(s)}),n.on("vim-command-done",function(){s="",o.setKeyBuffer(s)}),n.on("dispose",function(){o.toggleVisibility(!1),o.closeInput(),o.clear()}),o.toggleVisibility(!0),n.setStatusBar(o),n.attach(),n}});var JQ=N(()=>{Ge();ie({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>import("./abap-VAQQMSMV.js")})});var eZ=N(()=>{Ge();ie({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>import("./apex-UGORXUMY.js")})});var tZ=N(()=>{Ge();ie({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>import("./azcli-5IGBGNJX.js")})});var iZ=N(()=>{Ge();ie({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>import("./bat-I2Q2VM2E.js")})});var rZ=N(()=>{Ge();ie({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>import("./bicep-6DU2S5EQ.js")})});var nZ=N(()=>{Ge();ie({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>import("./cameligo-FQU2BD2Q.js")})});var oZ=N(()=>{Ge();ie({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>import("./clojure-X5EURZF4.js")})});var sZ=N(()=>{Ge();ie({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>import("./coffee-V3VYUJVN.js")})});var aZ=N(()=>{Ge();ie({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>import("./cpp-EIUZ67SI.js")});ie({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>import("./cpp-EIUZ67SI.js")})});var lZ=N(()=>{Ge();ie({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>import("./csharp-6XMKEPGL.js")})});var cZ=N(()=>{Ge();ie({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>import("./csp-RUXEOTA7.js")})});var dZ=N(()=>{Ge();ie({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>import("./cypher-LB5ELPID.js")})});var uZ=N(()=>{Ge();ie({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>import("./dart-6KXBVQQ5.js")})});var hZ=N(()=>{Ge();ie({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>import("./ecl-M4POWDBD.js")})});var fZ=N(()=>{Ge();ie({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>import("./flow9-CCUIXH3M.js")})});var pZ=N(()=>{Ge();ie({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>import("./fsharp-VVLVFTJD.js")})});var mZ=N(()=>{Ge();ie({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationDollar)});ie({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAngleInterpolationDollar)});ie({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagBracketInterpolationDollar)});ie({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAngleInterpolationBracket)});ie({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagBracketInterpolationBracket)});ie({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationDollar)});ie({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationBracket)})});var gZ=N(()=>{Ge();ie({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>import("./go-BSHCOGOM.js")})});var bZ=N(()=>{Ge();ie({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>import("./graphql-QJYQP674.js")})});var vZ=N(()=>{Ge();ie({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>import("./handlebars-VNAHN657.js")})});var _Z=N(()=>{Ge();ie({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>import("./hcl-B2FOVQI3.js")})});var yZ=N(()=>{Ge();ie({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>import("./ini-K4OMSQGU.js")})});var wZ=N(()=>{Ge();ie({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>import("./java-M2SLT6P5.js")})});var xZ=N(()=>{Ge();ie({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>import("./julia-UMW37XS3.js")})});var CZ=N(()=>{Ge();ie({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>import("./kotlin-DTS7EPKW.js")})});var SZ=N(()=>{Ge();ie({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>import("./less-64EWHB2U.js")})});var kZ=N(()=>{Ge();ie({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>import("./lexon-VSTQQJS4.js")})});var EZ=N(()=>{Ge();ie({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>import("./lua-DEBQHPWC.js")})});var TZ=N(()=>{Ge();ie({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>import("./liquid-PZUYRUGD.js")})});var IZ=N(()=>{Ge();ie({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>import("./m3-BVWXEQNO.js")})});var LZ=N(()=>{Ge();ie({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>import("./mdx-VP3GSOCD.js")})});var AZ=N(()=>{Ge();ie({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>import("./mips-PLBQC4OD.js")})});var DZ=N(()=>{Ge();ie({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>import("./msdax-T7T2KNYQ.js")})});var MZ=N(()=>{Ge();ie({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>import("./mysql-6SINHLS3.js")})});var NZ=N(()=>{Ge();ie({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>import("./objective-c-HU5BK7KT.js")})});var RZ=N(()=>{Ge();ie({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>import("./pascal-35QHNCUU.js")})});var PZ=N(()=>{Ge();ie({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>import("./pascaligo-XJIGVHMA.js")})});var OZ=N(()=>{Ge();ie({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>import("./perl-EJ4CU5Y5.js")})});var FZ=N(()=>{Ge();ie({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>import("./pgsql-O5YVZFG3.js")})});var zZ=N(()=>{Ge();ie({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>import("./php-7OX4N2D2.js")})});var BZ=N(()=>{Ge();ie({id:"pla",extensions:[".pla"],loader:()=>import("./pla-XIRH422Y.js")})});var HZ=N(()=>{Ge();ie({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>import("./postiats-FSD57ZTG.js")})});var UZ=N(()=>{Ge();ie({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>import("./powerquery-WN3FBQ3N.js")})});var jZ=N(()=>{Ge();ie({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>import("./powershell-6POP5WYL.js")})});var WZ=N(()=>{Ge();ie({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>import("./protobuf-R3NYANEY.js")})});var VZ=N(()=>{Ge();ie({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>import("./pug-UMENAZU6.js")})});var qZ=N(()=>{Ge();ie({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>import("./python-CAXMRMZU.js")})});var KZ=N(()=>{Ge();ie({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>import("./qsharp-JPLZF5CJ.js")})});var $Z=N(()=>{Ge();ie({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>import("./r-V566F5LS.js")})});var GZ=N(()=>{Ge();ie({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>import("./razor-VXRRUWJU.js")})});var YZ=N(()=>{Ge();ie({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>import("./redis-C25WFMNL.js")})});var XZ=N(()=>{Ge();ie({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>import("./redshift-LE5NUCLH.js")})});var QZ=N(()=>{Ge();ie({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>import("./restructuredtext-XX5QEZJT.js")})});var ZZ=N(()=>{Ge();ie({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>import("./ruby-XQPDAWDE.js")})});var JZ=N(()=>{Ge();ie({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>import("./rust-TOYK7AZY.js")})});var eJ=N(()=>{Ge();ie({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>import("./sb-J2JR5LHW.js")})});var tJ=N(()=>{Ge();ie({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-YUYNXHOB.js")})});var iJ=N(()=>{Ge();ie({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>import("./scheme-3ZBC5PHA.js")})});var rJ=N(()=>{Ge();ie({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>import("./scss-TEOGYYZ6.js")})});var nJ=N(()=>{Ge();ie({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>import("./shell-BD6IL5P2.js")})});var oJ=N(()=>{Ge();ie({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>import("./solidity-7YGHHWAJ.js")})});var sJ=N(()=>{Ge();ie({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>import("./sophia-UUA6XVAK.js")})});var aJ=N(()=>{Ge();ie({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>import("./sparql-CQTB3JIZ.js")})});var lJ=N(()=>{Ge();ie({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>import("./st-EUKBJWA4.js")})});var cJ=N(()=>{Ge();ie({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>import("./swift-DJAXPCZZ.js")})});var dJ=N(()=>{Ge();ie({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>import("./systemverilog-VL3WHTSC.js")});ie({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>import("./systemverilog-VL3WHTSC.js")})});var uJ=N(()=>{Ge();ie({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>import("./tcl-HX43DWKO.js")})});var hJ=N(()=>{Ge();ie({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>import("./twig-33VJJYP3.js")})});var fJ=N(()=>{Ge();ie({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>import("./typescript-YY3TBR77.js")})});var pJ=N(()=>{Ge();ie({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>import("./vb-7EFP77QG.js")})});var mJ=N(()=>{Ge();ie({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>import("./wgsl-LFVBXOME.js")})});var gJ=N(()=>{Ge();ie({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>import("./yaml-THK2ACKN.js")})});var bJ=N(()=>{Ds();JQ();eZ();tZ();iZ();rZ();nZ();oZ();sZ();aZ();lZ();cZ();YM();dZ();uZ();ZM();hZ();qM();fZ();pZ();mZ();gZ();bZ();vZ();_Z();XM();yZ();wZ();$M();xZ();CZ();SZ();kZ();EZ();TZ();IZ();KM();LZ();AZ();DZ();MZ();NZ();RZ();PZ();OZ();FZ();zZ();BZ();HZ();UZ();jZ();WZ();VZ();qZ();KZ();$Z();GZ();YZ();XZ();QZ();ZZ();JZ();eJ();tJ();iJ();rJ();nJ();oJ();sJ();aJ();GM();lJ();cJ();dJ();uJ();hJ();fJ();pJ();mJ();QM();gJ();});function yN(){return import("./cssMode-3KIDE53D.js")}var S_e,k_e,E_e,T_e,vJ,I_e,hm,bN,vN,_N,_J,yJ,wJ,xJ=N(()=>{Ds();Ds();S_e=Object.defineProperty,k_e=Object.getOwnPropertyDescriptor,E_e=Object.getOwnPropertyNames,T_e=Object.prototype.hasOwnProperty,vJ=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of E_e(e))!T_e.call(i,n)&&n!==t&&S_e(i,n,{get:()=>e[n],enumerable:!(r=k_e(e,n))||r.enumerable});return i},I_e=(i,e,t)=>(vJ(i,e,"default"),t&&vJ(t,e,"default")),hm={};I_e(hm,As);bN=class{constructor(i,e,t){wr(this,"_onDidChange",new hm.Emitter);wr(this,"_options");wr(this,"_modeConfiguration");wr(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)}},vN={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}},_N={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},_J=new bN("css",vN,_N),yJ=new bN("scss",vN,_N),wJ=new bN("less",vN,_N);hm.languages.css={cssDefaults:_J,lessDefaults:wJ,scssDefaults:yJ};hm.languages.onLanguage("less",()=>{yN().then(i=>i.setupMode(wJ))});hm.languages.onLanguage("scss",()=>{yN().then(i=>i.setupMode(yJ))});hm.languages.onLanguage("css",()=>{yN().then(i=>i.setupMode(_J))})});function A4(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===uv,documentFormattingEdits:i===uv,documentRangeFormattingEdits:i===uv}}function B_e(){return import("./htmlMode-EEO2WQ3S.js")}function D4(i,e=L4,t=A4(i)){let r=new R_e(i,e,t),n,o=I4.languages.onLanguage(i,async()=>{n=(await B_e()).setupMode(r)});return{defaults:r,dispose(){o.dispose(),n==null||n.dispose(),n=void 0}}}var L_e,A_e,D_e,M_e,CJ,N_e,I4,R_e,P_e,L4,uv,SJ,kJ,EJ,O_e,TJ,F_e,IJ,z_e,LJ=N(()=>{Ds();Ds();L_e=Object.defineProperty,A_e=Object.getOwnPropertyDescriptor,D_e=Object.getOwnPropertyNames,M_e=Object.prototype.hasOwnProperty,CJ=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of D_e(e))!M_e.call(i,n)&&n!==t&&L_e(i,n,{get:()=>e[n],enumerable:!(r=A_e(e,n))||r.enumerable});return i},N_e=(i,e,t)=>(CJ(i,e,"default"),t&&CJ(t,e,"default")),I4={};N_e(I4,As);R_e=class{constructor(i,e,t){wr(this,"_onDidChange",new I4.Emitter);wr(this,"_options");wr(this,"_modeConfiguration");wr(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)}},P_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"},L4={format:P_e,suggest:{},data:{useDefaultDataProvider:!0}};uv="html",SJ="handlebars",kJ="razor",EJ=D4(uv,L4,A4(uv)),O_e=EJ.defaults,TJ=D4(SJ,L4,A4(SJ)),F_e=TJ.defaults,IJ=D4(kJ,L4,A4(kJ)),z_e=IJ.defaults;I4.languages.html={htmlDefaults:O_e,razorDefaults:z_e,handlebarDefaults:F_e,htmlLanguageService:EJ,handlebarLanguageService:TJ,razorLanguageService:IJ,registerHTMLLanguageService:D4}});var H_e,wN,U_e,Bh,xN,CN=N(()=>{aa();lne();Go();Br();ke();Rt();B_();H_e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},wN=function(i,e){return function(t,r){e(t,r,i)}},U_e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Bh=class{constructor(e,t){this._editorWorkerClient=new vz(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return U_e(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,r){let n=t.range,o=t.color,s=o.alpha,a=new vt(new ks(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?vt.Format.CSS.formatRGB(a):vt.Format.CSS.formatRGBA(a),c=s?vt.Format.CSS.formatHSL(a):vt.Format.CSS.formatHSLA(a),d=s?vt.Format.CSS.formatHex(a):vt.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:n,text:l}}),u.push({label:c,textEdit:{range:n,text:c}}),u.push({label:d,textEdit:{range:n,text:d}}),u}},xN=class extends ce{constructor(e,t,r){super(),this._register(r.colorProvider.register("*",new Bh(e,t)))}};xN=H_e([wN(0,Li),wN(1,Pt),wN(2,Se)],xN);Kc(xN)});function M4(i,e,t,r=!0){return hv(this,void 0,void 0,function*(){return IN(new SN,i,e,t,r)})}function TN(i,e,t,r){return Promise.resolve(t.provideColorPresentations(i,e,r))}function IN(i,e,t,r,n){return hv(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 Bh)s=d;else try{(yield i.compute(d,t,r,a))&&(o=!0)}catch(u){Yt(u)}}return o?a:s&&n?(yield i.compute(s,t,r,a),a):[]})}function AJ(i,e){let{colorProvider:t}=i.get(Se),r=i.get(Li).getModel(e);if(!r)throw Co();let n=i.get(Dt).getValue("editor.defaultColorDecorators",{resource:e});return{model:r,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:n}}var hv,SN,kN,EN,LN=N(()=>{Si();Vt();Tr();et();Go();Wi();Rt();CN();Cr();hv=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};SN=class{constructor(){}compute(e,t,r,n){return hv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,r);if(Array.isArray(o))for(let s of o)n.push({colorInfo:s,provider:e});return Array.isArray(o)})}},kN=class{constructor(){}compute(e,t,r,n){return hv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,r);if(Array.isArray(o))for(let s of o)n.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}},EN=class{constructor(e){this.colorInfo=e}compute(e,t,r,n){return hv(this,void 0,void 0,function*(){let o=yield e.provideColorPresentations(t,this.colorInfo,st.None);return Array.isArray(o)&&n.push(...o),Array.isArray(o)})}};At.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof yt))throw Co();let{model:r,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:o}=AJ(i,t);return IN(new kN,n,r,st.None,o)});At.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,r]=e,{uri:n,range:o}=r;if(!(n instanceof yt)||!Array.isArray(t)||t.length!==4||!B.isIRange(o))throw Co();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=AJ(i,n),[c,d,u,h]=t;return IN(new EN({range:o,color:{red:c,green:d,blue:u,alpha:h}}),a,s,st.None,l)})});var j_e,AN,DJ,DN,NN,gc,MN,RN=N(()=>{Ut();aa();Vt();Jt();ke();ol();Di();QF();lt();et();Hr();Ls();Rt();LN();Cr();j_e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},AN=function(i,e){return function(t,r){e(t,r,i)}},DJ=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},NN=Object.create({}),gc=DN=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=r,this._localToDispose=this._register(new le),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Z_(this._editor),this._decoratorLimitReporter=new MN,this._colorDecorationClassRefs=this._register(new le),this._debounceInformation=n.for(r.colorProvider,"Document Colors",{min:DN.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(r.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144);let a=s!==this._isColorDecoratorsEnabled||o.hasChanged(20),l=o.hasChanged(144);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),r=this._configurationService.getValue(t);if(r&&typeof r=="object"){let n=r.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(19)}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 oa,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return DJ(this,void 0,void 0,function*(){this._computePromise=Zt(e=>DJ(this,void 0,void 0,function*(){let t=this._editor.getModel();if(!t)return[];let r=new pr(!1),n=yield M4(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,r.elapsed()),n}));try{let e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){ft(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(r=>({range:{startLineNumber:r.colorInfo.range.startLineNumber,startColumn:r.colorInfo.range.startColumn,endLineNumber:r.colorInfo.range.endLineNumber,endColumn:r.colorInfo.range.endColumn},options:mt.EMPTY}));this._editor.changeDecorations(r=>{this._decorationsIds=r.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,o)=>this._colorDatas.set(n,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],r=this._editor.getOption(20);for(let o=0;o<e.length&&t.length<r;o++){let{red:s,green:a,blue:l,alpha:c}=e[o].colorInfo.color,d=new ks(Math.round(s*255),Math.round(a*255),Math.round(l*255),c),u=`rgba(${d.r}, ${d.g}, ${d.b}, ${d.a})`,h=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:u}));t.push({range:{startLineNumber:e[o].colorInfo.range.startLineNumber,startColumn:e[o].colorInfo.range.startColumn,endLineNumber:e[o].colorInfo.range.endLineNumber,endColumn:e[o].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:qv,inlineClassName:`${h.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:NN}}})}let n=r<e.length?r:!1;this._decoratorLimitReporter.update(e.length,n),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){let t=this._editor.getModel();if(!t)return null;let r=t.getDecorationsInRange(B.fromPositions(e,e)).filter(n=>this._colorDatas.has(n.id));return r.length===0?null:this._colorDatas.get(r[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};gc.ID="editor.contrib.colorDetector";gc.RECOMPUTE_TIME=1e3;gc=DN=j_e([AN(1,Dt),AN(2,Se),AN(3,ar)],gc);MN=class{constructor(){this._onDidChange=new Je,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};Ue(gc.ID,gc,1)});var N4,MJ=N(()=>{Jt();N4=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,r){this.presentationIndex=r,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Je,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Je,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 r=-1;for(let n=0;n<this.colorPresentations.length;n++)if(t.toLowerCase()===this.colorPresentations[n].label){r=n;break}if(r===-1){let n=t.split("(")[0].toLowerCase();for(let o=0;o<this.colorPresentations.length;o++)if(this.colorPresentations[o].label.toLowerCase().startsWith(n)){r=o;break}}r!==-1&&r!==this.presentationIndex&&(this.presentationIndex=r,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}});var NJ=N(()=>{});var R4=N(()=>{NJ()});var wo,PN,ON,FN,zN,P4,BN,HN,UN,O4,RJ=N(()=>{V9();Bt();Ore();L_();Qr();aa();Jt();ke();In();R4();He();en();xl();wo=Le,PN=class extends ce{constructor(e,t,r,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=wo(".colorpicker-header"),Te(e,this._domNode),this._pickedColorNode=Te(this._domNode,wo(".picked-color")),Te(this._pickedColorNode,wo("span.codicon.codicon-color-mode")),this._pickedColorPresentation=Te(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");let o=b("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=Te(this._domNode,wo(".original-color")),this._originalColorNode.style.backgroundColor=vt.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=r.getColorTheme().getColor(ek)||vt.white,this._register(r.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(ek)||vt.white})),this._register(Lt(this._pickedColorNode,gi.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Lt(this._originalColorNode,gi.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=vt.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 ON(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=vt.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}},ON=class extends ce{constructor(e){super(),this._onClicked=this._register(new Je),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Te(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),Te(this._button,t),Te(t,wo(".button"+_t.asCSSSelector(Ni("color-picker-close",pt.close,b("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}},FN=class extends ce{constructor(e,t,r,n=!1){super(),this.model=t,this.pixelRatio=r,this._insertButton=null,this._domNode=wo(".colorpicker-body"),Te(e,this._domNode),this._saturationBox=new zN(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 BN(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new HN(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new UN(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let r=this.model.color.hsva;this.model.color=new vt(new Fm(r.h,e,t,r.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new vt(new Fm(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,r=(1-e)*360;this.model.color=new vt(new Fm(r===360?0:r,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()}},zN=class extends ce{constructor(e,t,r){super(),this.model=t,this.pixelRatio=r,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,this._domNode=wo(".saturation-wrap"),Te(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Te(this._domNode,this._canvas),this.selection=wo(".saturation-selection"),Te(this._domNode,this.selection),this.layout(),this._register(Lt(this._domNode,gi.POINTER_DOWN,n=>this.onPointerDown(n))),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 lk);let t=Qi(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);let r=Lt(document,gi.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let r=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(r,n),this._onDidChange.fire({s:r,v:n})}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 vt(new Fm(e.h,1,1,1)),r=this._canvas.getContext("2d"),n=r.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");let o=r.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),r.rect(0,0,this._canvas.width,this._canvas.height),r.fillStyle=vt.Format.CSS.format(t),r.fill(),r.fillStyle=n,r.fill(),r.fillStyle=o,r.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();let t=e.hsva;this.paintSelection(t.s,t.v)}},P4=class extends ce{constructor(e,t,r=!1){super(),this.model=t,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,r?(this.domNode=Te(e,wo(".standalone-strip")),this.overlay=Te(this.domNode,wo(".standalone-overlay"))):(this.domNode=Te(e,wo(".strip")),this.overlay=Te(this.domNode,wo(".overlay"))),this.slider=Te(this.domNode,wo(".slider")),this.slider.style.top="0px",this._register(Lt(this.domNode,gi.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){let t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new lk),r=Qi(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-r.top),()=>null);let n=Lt(document,gi.POINTER_UP,()=>{this._onColorFlushed.fire(),n.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`}},BN=class extends P4{constructor(e,t,r=!1){super(e,t,r),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);let{r:t,g:r,b:n}=e.rgba,o=new vt(new ks(t,r,n,1)),s=new vt(new ks(t,r,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},HN=class extends P4{constructor(e,t,r=!1){super(e,t,r),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},UN=class extends ce{constructor(e){super(),this._onClicked=this._register(new Je),this.onClicked=this._onClicked.event,this._button=Te(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}},O4=class extends bl{constructor(e,t,r,n,o=!1){super(),this.model=t,this.pixelRatio=r,this._register(j9.onDidChange(()=>this.layout()));let s=wo(".colorpicker-widget");e.appendChild(s),this.header=this._register(new PN(s,this.model,n,o)),this.body=this._register(new FN(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}});function FJ(i,e,t,r){return fm(this,void 0,void 0,function*(){let n=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,c=new ks(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),d=new vt(c),u=yield TN(e,t,r,st.None),h=new N4(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,n),i instanceof fv?new jN(i,B.lift(t.range),h,r):new WN(i,B.lift(t.range),h,r)})}function zJ(i,e,t,r,n){if(r.length===0||!e.hasModel())return ce.None;if(n.setMinimumDimensions){let h=e.getOption(65)+8;n.setMinimumDimensions(new Xt(302,h))}let o=new le,s=r[0],a=e.getModel(),l=s.model,c=o.add(new O4(n.fragment,l,e.getOption(140),t,i instanceof pm));n.setColorPicker(c);let d=!1,u=new B(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof pm){let h=r[0].model.color;i.color=h,F4(a,l,h,u,s),o.add(l.onColorFlushed(f=>{i.color=f}))}else o.add(l.onColorFlushed(h=>fm(this,void 0,void 0,function*(){yield F4(a,l,h,u,s),d=!0,u=BJ(e,u,l,n)})));return o.add(l.onDidChangeColor(h=>{F4(a,l,h,u,s)})),o.add(e.onDidChangeModelContent(h=>{d?d=!1:(n.hide(),e.focus())})),o}function BJ(i,e,t,r){let n,o;if(t.presentation.textEdit){n=[t.presentation.textEdit],o=new B(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",n),o=i.getModel()._getTrackedRange(s)||o}else n=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),i.pushUndoStop(),i.executeEdits("colorpicker",n);return t.presentation.additionalTextEdits&&(n=[...t.presentation.additionalTextEdits],i.executeEdits("colorpicker",n),r&&r.hide()),i.pushUndoStop(),o}function F4(i,e,t,r,n){return fm(this,void 0,void 0,function*(){let o=yield TN(i,{range:r,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},n.provider,st.None);e.colorPresentations=o||[]})}var PJ,OJ,fm,jN,fv,WN,pm,VN=N(()=>{Ut();Si();aa();ke();et();LN();RN();MJ();RJ();tn();Bt();PJ=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},OJ=function(i,e){return function(t,r){e(t,r,i)}},fm=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},jN=class{constructor(e,t,r,n){this.owner=e,this.range=t,this.model=r,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},fv=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,r){return Dn.fromPromise(this._computeAsync(e,t,r))}_computeAsync(e,t,r){return fm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];let n=gc.get(this._editor);if(!n)return[];for(let o of t){if(!n.isColorDecoration(o))continue;let s=n.getColorData(o.range.getStartPosition());if(s)return[yield FJ(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return zJ(this,this._editor,this._themeService,t,e)}};fv=PJ([OJ(1,gr)],fv);WN=class{constructor(e,t,r,n){this.owner=e,this.range=t,this.model=r,this.provider=n}},pm=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,r){return fm(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!gc.get(this._editor))return null;let o=yield M4(r,this._editor.getModel(),st.None),s=null,a=null;for(let u of o){let h=u.colorInfo;B.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 FJ(this,this._editor.getModel(),l,c),foundInEditor:d}})}updateEditorModel(e){return fm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=e.model,r=new B(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield F4(this._editor.getModel(),t,this._color,r,e),r=BJ(this._editor,r,t))})}renderHoverParts(e,t){return zJ(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};pm=PJ([OJ(1,gr)],pm)});var pv,HJ=N(()=>{ke();lt();et();RN();VN();JC();ec();pv=class extends ce{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=this._editor.getOption(145);if(t!=="click"&&t!=="clickAndHover")return;let r=e.target;if(r.type!==6||!r.detail.injectedText||r.detail.injectedText.options.attachedData!==NN||!r.range)return;let n=this._editor.getContribution(_n.ID);if(n&&!n.isColorPickerVisible){let o=new B(r.range.startLineNumber,r.range.startColumn+1,r.range.endLineNumber,r.range.endColumn+1);n.showContentHover(o,1,0,!1,!0)}}};pv.ID="editor.contrib.colorContribution";Ue(pv.ID,pv,2);Bo.register(fv)});var WJ,Ys,UJ,qN,KN,bc,jJ,W_e,z4,$N,VJ=N(()=>{ke();VN();Ht();n8();Ur();Jt();Rt();lt();ei();wt();Go();Br();CN();Bt();R4();WJ=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ys=function(i,e){return function(t,r){e(t,r,i)}},UJ=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},bc=qN=class extends ce{constructor(e,t,r,n,o,s,a){super(),this._editor=e,this._modelService=r,this._keybindingService=n,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=F.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=F.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 z4(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(qN.ID)}};bc.ID="editor.contrib.standaloneColorPickerController";bc=qN=WJ([Ys(1,it),Ys(2,Li),Ys(3,qt),Ys(4,Ke),Ys(5,Se),Ys(6,Pt)],bc);Ue(bc.ID,bc,1);jJ=8,W_e=22,z4=KN=class extends ce{constructor(e,t,r,n,o,s,a,l){var c;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=r,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new Je),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(pm,this._editor),this._position=(c=this._editor._getViewModel())===null||c===void 0?void 0:c.getPrimaryCursorState().modelState.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(ys(this._body));this._register(h.onDidBlur(f=>{this.hide()})),this._register(h.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var m;let g=(m=f.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return KN.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(59).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 UJ(this,void 0,void 0,function*(){let t=yield this._computeAsync(e);t&&this._onResult.fire(new $N(t.result,t.foundInEditor))})}_computeAsync(e){return UJ(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}},r=yield this._standaloneColorPickerParticipant.createColorHover(t,new Bh(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return r?{result:r.colorHover,foundInEditor:r.foundInEditor}:null})}_render(e,t){let r=document.createDocumentFragment(),n=this._register(new n1(this._keybindingService)),o,s={fragment:r,statusBar:n,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(r),o.layout();let a=o.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-W_e-jJ,d=o.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});let u=o.header,h=u.pickedColorNode;h.style.width=l+jJ+"px";let f=u.originalColorNode;f.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)}};z4.ID="editor.contrib.standaloneColorPickerWidget";z4=KN=WJ([Ys(3,Ke),Ys(4,Li),Ys(5,qt),Ys(6,Se),Ys(7,Pt)],z4);$N=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var GN,YN,XN,qJ=N(()=>{lt();He();VJ();ei();Zi();R4();GN=class extends ra{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:b("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:b({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:Me.CommandPalette}]})}runEditorCommand(e,t){var r;(r=bc.get(t))===null||r===void 0||r.showOrFocus()}},YN=class extends de{constructor(){super({id:"editor.action.hideColorPicker",label:b({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:F.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var r;(r=bc.get(t))===null||r===void 0||r.hide()}},XN=class extends de{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:b({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:F.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var r;(r=bc.get(t))===null||r===void 0||r.insertColor()}};ee(YN);ee(XN);Ci(GN)});function KJ(i,e){var t;return!!(!((t=i.pasteMimeTypes)===null||t===void 0)&&t.some(r=>e.matches(r)))}var V_e,mm,vc,ZN,JN,eR,QN,Jd,$J=N(()=>{Bt();pi();Ut();B0();ke();$3();En();F0();QO();wI();Zm();et();Rt();SI();vu();W0();He();Ym();wt();Ht();Vc();_l();EI();V_e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},mm=function(i,e){return function(t,r){e(t,r,i)}},vc=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},JN="editor.changePasteType",eR=new ht("pasteWidgetVisible",!1,b("pasteWidgetVisible","Whether the paste widget is showing")),QN="application/vnd.code.copyMetadata",Jd=ZN=class extends ce{static get(e){return e.getContribution(ZN.ID)}constructor(e,t,r,n,o,s,a){super(),this._bulkEditService=r,this._clipboardService=n,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(Lt(l,"copy",c=>this.handleCopy(c))),this._register(Lt(l,"cut",c=>this.handleCopy(c))),this._register(Lt(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new cp("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(dp,"pasteIntoEditor",e,eR,{id:JN,label:b("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(83).enabled&&!this._editor.getOption(89)}handleCopy(e){var t,r;if(!this._editor.hasTextFocus()||(zv&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;let n=this._editor.getModel(),o=this._editor.getSelections();if(!n||!(o!=null&&o.length))return;let s=this._editor.getOption(36),a=o,l=o.length===1&&o[0].isEmpty();if(l){if(!s)return;a=[new B(a[0].startLineNumber,1,a[0].startLineNumber,1+n.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(n).filter(_=>!!_.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}let f=yI(e.clipboardData),m=h.flatMap(_=>{var E;return(E=_.copyMimeTypes)!==null&&E!==void 0?E:[]}),g=Sd();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:u});let w=Zt(_=>vc(this,void 0,void 0,function*(){let E=un(yield Promise.all(h.map(A=>vc(this,void 0,void 0,function*(){try{return yield A.prepareDocumentPaste(n,a,f,_)}catch(L){console.error(L);return}}))));E.reverse();for(let A of E)for(let[L,O]of A)f.replace(L,O);return f}));(r=this._currentCopyOperation)===null||r===void 0||r.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:w}}handlePaste(e){var t,r;return vc(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 n=this._editor.getModel(),o=this._editor.getSelections();if(!(o!=null&&o.length)||!n||!this.isPasteAsEnabled())return;let s=this.fetchCopyMetadata(e),a=Jx(e.clipboardData);a.delete(QN);let l=[...e.clipboardData.types,...(r=s==null?void 0:s.providerCopyMimeTypes)!==null&&r!==void 0?r:[],mr.uriList],c=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(d=>{var u;return(u=d.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>$x(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,r,n){let o=Zt(s=>vc(this,void 0,void 0,function*(){let a=this._editor;if(!a.hasModel())return;let l=a.getModel(),c=new pa(a,3,void 0,s);try{if(yield this.mergeInDataFromCopy(r,n,c.token),c.token.isCancellationRequested)return;let d=e.filter(h=>KJ(h,r));if(!d.length||d.length===1&&d[0].id==="text"){yield this.applyDefaultPasteHandler(r,n,c.token);return}let u=yield this.getPasteEdits(d,r,l,t,c.token);if(c.token.isCancellationRequested)return;if(u.length===1&&u[0].providerId==="text"){yield this.applyDefaultPasteHandler(r,n,c.token);return}if(u.length){let h=a.getOption(83).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,c.token)}yield this.applyDefaultPasteHandler(r,n,c.token)}finally{c.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),b("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,r,n,o){let s=Zt(a=>vc(this,void 0,void 0,function*(){let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),d=new pa(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(n,o,d.token),d.token.isCancellationRequested)return;let u=t.filter(g=>KJ(g,n));e&&(u=u.filter(g=>g.id===e));let h=yield this.getPasteEdits(u,n,c,r,d.token);if(d.token.isCancellationRequested||!h.length)return;let f;if(e)f=h.at(0);else{let g=yield this._quickInputService.pick(h.map(w=>({label:w.label,description:w.providerId,detail:w.detail,edit:w})),{placeHolder:b("pasteAsPickerPlaceholder","Select Paste Action")});f=g==null?void 0:g.edit}if(!f)return;let m=cK(c.uri,r,f);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:b("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(QN,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;let r=e.clipboardData.getData(QN);if(r)try{return JSON.parse(r)}catch(s){return}let[n,o]=XO.getTextData(e.clipboardData);if(o)return{defaultPastePayload:{mode:o.mode,multicursorText:(t=o.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!o.isFromEmptySelection}}}mergeInDataFromCopy(e,t,r){var n;return vc(this,void 0,void 0,function*(){if(t!=null&&t.id&&((n=this._currentCopyOperation)===null||n===void 0?void 0:n.handle)===t.id){let o=yield this._currentCopyOperation.dataTransferPromise;if(r.isCancellationRequested)return;for(let[s,a]of o)e.replace(s,a)}if(!e.has(mr.uriList)){let o=yield this._clipboardService.readResources();if(r.isCancellationRequested)return;o.length&&e.append(mr.uriList,z0(Zu.create(o)))}})}getPasteEdits(e,t,r,n,o){return vc(this,void 0,void 0,function*(){let s=yield Uc(Promise.all(e.map(l=>vc(this,void 0,void 0,function*(){var c;try{let d=yield(c=l.provideDocumentPasteEdits)===null||c===void 0?void 0:c.call(l,r,n,t,o);if(d)return Object.assign(Object.assign({},d),{providerId:l.id})}catch(d){console.error(d)}}))),o),a=un(s!=null?s:[]);return i2(a),a})}applyDefaultPasteHandler(e,t,r){var n,o,s;return vc(this,void 0,void 0,function*(){let a=(n=e.get(mr.text))!==null&&n!==void 0?n:e.get("text");if(!a)return;let l=yield a.asString();if(r.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)})}};Jd.ID="editor.contrib.copyPasteActionController";Jd=ZN=V_e([mm(1,Ke),mm(2,Wc),mm(3,Ts),mm(4,Se),mm(5,rn),mm(6,tF)],Jd)});var GJ=N(()=>{lt();B_();$J();gI();He();Ue(Jd.ID,Jd,0);Kc(Zx);We(new class extends Oi{constructor(){super({id:JN,precondition:eR,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var r;return(r=Jd.get(e))===null||r===void 0?void 0:r.changePasteType()}});ee(class extends de{constructor(){super({id:"editor.action.pasteAs",label:b("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:b("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 r;let n=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(r=Jd.get(e))===null||r===void 0?void 0:r.pasteAs(n)}})});var YJ=Xi(tR=>{Si();Fr();Tr();ta();D1();Wi();var q_e=tR&&tR.__awaiter||function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};At.registerCommand("_executeDocumentSymbolProvider",function(i,...e){return q_e(this,void 0,void 0,function*(){let[t]=e;zt(yt.isUri(t));let r=i.get(Ih),o=yield i.get(xr).createModelReference(t);try{return(yield r.getOrCreate(o.object.textEditorModel,st.None)).getTopLevelSymbols()}finally{o.dispose()}})})});var iR,XJ=N(()=>{ol();lt();He();iR=class extends de{constructor(){super({id:"editor.action.forceRetokenize",label:b("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let r=t.getModel();r.tokenization.resetTokenization();let n=new pr;r.tokenization.forceTokenization(r.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}};ee(iR)});var B4,QJ=N(()=>{Eo();Qre();He();Zi();wt();B4=class i extends Qo{constructor(){super({id:i.ID,title:{value:b({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(it).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",n=!xk.getTabFocusMode(t);xk.setTabFocusMode(n,t),n?sr(b("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):sr(b("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};B4.ID="editor.action.toggleTabFocusMode";Ci(B4)});var Rkt,Pkt,Vkt,ZJ=N(()=>{r_();ez();cne();ane();pT();_T();xT();ST();IT();GT();eI();HJ();qJ();sI();cI();hI();fI();GJ();DI();b2();cb();kL();Rkt=Wn(LL()),Pkt=Wn(YJ());wA();W0();Qb();OC();jC();JC();I8();O8();Vkt=Wn(B8());U8();a7();u7();g7();b7();R7();j7();$7();nD();oD();dD();Cp();xD();iC();TD();XJ();QJ();FD();zD();KD();JS();xM();CM();yu();I0()});var JJ=N(()=>{});var eee=N(()=>{JJ()});var mv,H4,tee=N(()=>{eee();Bt();ke();lt();En();mv=class extends ce{constructor(e){super(),this.editor=e,this.widget=null,Tm&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(89);!this.widget&&e?this.widget=new H4(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};mv.ID="editor.contrib.iPadShowKeyboard";H4=class i extends ce{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Lt(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Lt(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}}};H4.ID="editor.contrib.ShowKeyboardWidget";Ue(mv.ID,mv,3)});var rR,iee=N(()=>{lt();pz();yu();rk();dne();rR=class extends de{constructor(){super({id:"editor.action.toggleHighContrast",label:bz.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let r=e.get(iy),n=r.getColorTheme();bu(n.type)?(r.setTheme(this._originalThemeName||(ik(n.type)?yz:_z)),this._originalThemeName=null):(r.setTheme(ik(n.type)?wz:xz),this._originalThemeName=n.themeName)}};ee(rR)});var DEt,ree=N(()=>{ZJ();tee();DEt=Wn(EM());TM();LM();PM();HM();jM();iee();Ds()});var gv={};Gh(gv,{CancellationTokenSource:()=>une,Emitter:()=>hne,KeyCode:()=>fne,KeyMod:()=>pne,MarkerSeverity:()=>_ne,MarkerTag:()=>yne,Position:()=>mne,Range:()=>gne,Selection:()=>bne,SelectionDirection:()=>vne,Token:()=>xne,Uri:()=>wne,editor:()=>wu,languages:()=>wa});var bv=N(()=>{bJ();xJ();LJ();WM();Cne();ree()});var lee=Xi((KEt,aee)=>{var see="Expected a function",nee=NaN,K_e="[object Symbol]",$_e=/^\s+|\s+$/g,G_e=/^[-+]0x[0-9a-f]+$/i,Y_e=/^0b[01]+$/i,X_e=/^0o[0-7]+$/i,Q_e=parseInt,Z_e=typeof global=="object"&&global&&global.Object===Object&&global,J_e=typeof self=="object"&&self&&self.Object===Object&&self,eye=Z_e||J_e||Function("return this")(),tye=Object.prototype,iye=tye.toString,rye=Math.max,nye=Math.min,nR=function(){return eye.Date.now()};function oye(i,e,t){var r,n,o,s,a,l,c=0,d=!1,u=!1,h=!0;if(typeof i!="function")throw new TypeError(see);e=oee(e)||0,U4(t)&&(d=!!t.leading,u="maxWait"in t,o=u?rye(oee(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function f(U){var Y=r,oe=n;return r=n=void 0,c=U,s=i.apply(oe,Y),s}function m(U){return c=U,a=setTimeout(_,e),d?f(U):s}function g(U){var Y=U-l,oe=U-c,te=e-Y;return u?nye(te,o-oe):te}function w(U){var Y=U-l,oe=U-c;return l===void 0||Y>=e||Y<0||u&&oe>=o}function _(){var U=nR();if(w(U))return E(U);a=setTimeout(_,g(U))}function E(U){return a=void 0,h&&r?f(U):(r=n=void 0,s)}function A(){a!==void 0&&clearTimeout(a),c=0,r=l=n=a=void 0}function L(){return a===void 0?s:E(nR())}function O(){var U=nR(),Y=w(U);if(r=arguments,n=this,l=U,Y){if(a===void 0)return m(l);if(u)return a=setTimeout(_,e),f(l)}return a===void 0&&(a=setTimeout(_,e)),s}return O.cancel=A,O.flush=L,O}function sye(i,e,t){var r=!0,n=!0;if(typeof i!="function")throw new TypeError(see);return U4(t)&&(r="leading"in t?!!t.leading:r,n="trailing"in t?!!t.trailing:n),oye(i,e,{leading:r,maxWait:e,trailing:n})}function U4(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function aye(i){return!!i&&typeof i=="object"}function lye(i){return typeof i=="symbol"||aye(i)&&iye.call(i)==K_e}function oee(i){if(typeof i=="number")return i;if(lye(i))return nee;if(U4(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=U4(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace($_e,"");var t=Y_e.test(i);return t||X_e.test(i)?Q_e(i.slice(2),t?2:8):G_e.test(i)?nee:+i}aee.exports=sye});var Dee=Xi(($Et,Aee)=>{var cye=1/0,dye="[object Symbol]",uye=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gee="\\ud800-\\udfff",fye="\\u0300-\\u036f\\ufe20-\\ufe23",pye="\\u20d0-\\u20f0",bee="\\u2700-\\u27bf",vee="a-z\\xdf-\\xf6\\xf8-\\xff",mye="\\xac\\xb1\\xd7\\xf7",gye="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bye="\\u2000-\\u206f",vye=" \\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",_ee="A-Z\\xc0-\\xd6\\xd8-\\xde",_ye="\\ufe0e\\ufe0f",yee=mye+gye+bye+vye,oR="['\u2019]",cee="["+yee+"]",wee="["+fye+pye+"]",xee="\\d+",yye="["+bee+"]",Cee="["+vee+"]",See="[^"+gee+yee+xee+bee+vee+_ee+"]",wye="\\ud83c[\\udffb-\\udfff]",xye="(?:"+wee+"|"+wye+")",Cye="[^"+gee+"]",kee="(?:\\ud83c[\\udde6-\\uddff]){2}",Eee="[\\ud800-\\udbff][\\udc00-\\udfff]",gm="["+_ee+"]",Sye="\\u200d",dee="(?:"+Cee+"|"+See+")",kye="(?:"+gm+"|"+See+")",uee="(?:"+oR+"(?:d|ll|m|re|s|t|ve))?",hee="(?:"+oR+"(?:D|LL|M|RE|S|T|VE))?",Tee=xye+"?",Iee="["+_ye+"]?",Eye="(?:"+Sye+"(?:"+[Cye,kee,Eee].join("|")+")"+Iee+Tee+")*",Tye=Iee+Tee+Eye,Iye="(?:"+[yye,kee,Eee].join("|")+")"+Tye,Lye=RegExp(oR,"g"),Aye=RegExp(wee,"g"),Dye=RegExp([gm+"?"+Cee+"+"+uee+"(?="+[cee,gm,"$"].join("|")+")",kye+"+"+hee+"(?="+[cee,gm+dee,"$"].join("|")+")",gm+"?"+dee+"+"+uee,gm+"+"+hee,xee,Iye].join("|"),"g"),Mye=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nye={\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"},Rye=typeof global=="object"&&global&&global.Object===Object&&global,Pye=typeof self=="object"&&self&&self.Object===Object&&self,Oye=Rye||Pye||Function("return this")();function Fye(i,e,t,r){var n=-1,o=i?i.length:0;for(r&&o&&(t=i[++n]);++n<o;)t=e(t,i[n],n,i);return t}function zye(i){return i.match(uye)||[]}function Bye(i){return function(e){return i==null?void 0:i[e]}}var Hye=Bye(Nye);function Uye(i){return Mye.test(i)}function jye(i){return i.match(Dye)||[]}var Wye=Object.prototype,Vye=Wye.toString,fee=Oye.Symbol,pee=fee?fee.prototype:void 0,mee=pee?pee.toString:void 0;function qye(i){if(typeof i=="string")return i;if(Gye(i))return mee?mee.call(i):"";var e=i+"";return e=="0"&&1/i==-cye?"-0":e}function Kye(i){return function(e){return Fye(Qye(Yye(e).replace(Lye,"")),i,"")}}function $ye(i){return!!i&&typeof i=="object"}function Gye(i){return typeof i=="symbol"||$ye(i)&&Vye.call(i)==dye}function Lee(i){return i==null?"":qye(i)}function Yye(i){return i=Lee(i),i&&i.replace(hye,Hye).replace(Aye,"")}var Xye=Kye(function(i,e,t){return i+(t?"-":"")+e.toLowerCase()});function Qye(i,e,t){return i=Lee(i),e=t?void 0:e,e===void 0?Uye(i)?jye(i):zye(i):i.match(e)||[]}Aee.exports=Xye});var sR=Xi(qe=>{"use strict";var hi=qe&&qe.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[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 r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(qe,"__esModule",{value:!0});qe.DeleteLines=qe.SearchReplace=qe.Search=qe.InvertSelection=qe.GotoLine=qe.RotateCursorOnScreen=qe.InsertTabs=qe.RevealToBottomAction=qe.RevealToCenterAction=qe.RevealToTopAction=qe.RevealEditorAction=qe.YankRotate=qe.YankSelectionToRing=qe.Yank=qe.RedoAction=qe.UndoAction=qe.KeyBoardQuit=qe.MoveCursorTop=qe.MoveCursorBottom=qe.MoveCursorWordLeft=qe.MoveCursorWordRight=qe.MoveCursorToLineStart=qe.MoveCursorToLineEnd=qe.MoveCursorRight=qe.MoveCursorLeft=qe.MoveCursorDown=qe.MoveCursorUp=qe.SetMark=qe.InsertLineAfter=qe.InsertLineBelow=qe.KillLines=qe.KillSelection=qe.BaseAction=qe.SOURCE=void 0;var yr=(bv(),Yh(gv));qe.SOURCE="extension.emacs";function Zye(i,e,t,r,n){n===void 0&&(n=1);for(var o="cursor".concat(r==="word"?"Word":"").concat(t).concat(e?"Select":""),s=0;s<n;s++)i.trigger(qe.SOURCE,o,null)}var Gr=function(){function i(){this.description=""}return i}();qe.BaseAction=Gr;var Mee=function(i){hi(e,i);function e(t){var r=i.call(this)||this;return r.trigger=t,r}return e.prototype.run=function(t){t.trigger(qe.SOURCE,this.trigger,{})},e}(Gr),Jye=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelections();s.length&&s.forEach(function(a){var l=t.getModel().getValueInRange(a);r.state.addToRing(l),t.executeEdits(qe.SOURCE,[{range:a,text:""}])})},e}(Gr);qe.KillSelection=Jye;var ewe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.selectionMode=!1;var s=t.getModel(),a=r.getCursorAnchor(),l;if(n===1){var c=s.getLineLength(a.lineNumber),d=a.column===c+1;if(!c||d){o?r.state.growRingTop(s.getEOL()):r.state.addToRing(s.getEOL()),t.trigger(qe.SOURCE,"deleteAllRight",null);return}else l=new yr.Position(a.lineNumber,s.getLineLength(a.lineNumber)+1)}else{var u=s.getLineCount(),h=a.lineNumber+n>u?u:a.lineNumber+n;l=new yr.Position(h,s.getLineLength(h)+1)}var f=yr.Range.fromPositions(a,l);o?r.state.growRingTop(s.getValueInRange(f)):r.state.addToRing(s.getValueInRange(f)),t.executeEdits(qe.SOURCE,[{range:f,text:""}]),t.setSelection(yr.Selection.fromPositions(a,a))},e}(Gr);qe.KillLines=ewe;var twe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getPosition();t.trigger(qe.SOURCE,"editor.action.insertLineAfter",null),t.setPosition(s)},e}(Gr);qe.InsertLineBelow=twe;var iwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){for(var s="",a=0;a<n;a++)s+=t.getModel().getEOL();r.selectionMode=!1;var l=r.getCursorAnchor();t.executeEdits(qe.SOURCE,[{range:yr.Range.fromPositions(l),text:s,forceMoveMarkers:!0}])},e}(Gr);qe.InsertLineAfter=iwe;var rwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=r.selectionMode,a=t.getSelection(),l=a.isEmpty();if(!l){var c=a.getDirection();c===yr.SelectionDirection.LTR?t.setSelection(yr.Selection.fromPositions(a.getEndPosition(),a.getEndPosition())):t.setSelection(yr.Selection.fromPositions(a.getStartPosition(),a.getStartPosition()))}l&&r.selectionMode?r.selectionMode=!1:r.selectionMode=!0},e}(Gr);qe.SetMark=rwe;var eu=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="char",t}return e.prototype.run=function(t,r,n,o){Zye(t,r.selectionMode,this.direction,this.unit,n)},e}(Gr),nwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Up",t}return e}(eu);qe.MoveCursorUp=nwe;var owe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Down",t}return e}(eu);qe.MoveCursorDown=owe;var Nee=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Left",t}return e}(eu);qe.MoveCursorLeft=Nee;var Ree=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Right",t}return e}(eu);qe.MoveCursorRight=Ree;var swe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="End",t}return e}(eu);qe.MoveCursorToLineEnd=swe;var awe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Home",t}return e}(eu);qe.MoveCursorToLineStart=awe;var lwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(Ree);qe.MoveCursorWordRight=lwe;var cwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(Nee);qe.MoveCursorWordLeft=cwe;var dwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Bottom",t}return e}(eu);qe.MoveCursorBottom=dwe;var uwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Top",t}return e}(eu);qe.MoveCursorTop=uwe;var hwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.selectionMode=!1,r.clearState(),t.setPosition(t.getPosition())},e}(Gr);qe.KeyBoardQuit=hwe;var Pee=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){for(var s=0;s<n;s++)t.trigger(qe.SOURCE,this.action,null)},e}(Gr),fwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="undo",t}return e}(Pee);qe.UndoAction=fwe;var pwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="redo",t}return e}(Pee);qe.RedoAction=pwe;var mwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=r.state.getFromRing(n);if(s){var a=t.getPosition();t.executeEdits(qe.SOURCE,[{range:yr.Range.fromPositions(a,a),text:s,forceMoveMarkers:!0}])}},e}(Gr);qe.Yank=mwe;var gwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelection();if(!s.isEmpty()){r.state.addToRing(t.getModel().getValueInRange(s)),r.selectionMode=!1;var a=r.getCursorAnchor();t.setSelection(yr.Selection.fromPositions(a,a))}},e}(Gr);qe.YankSelectionToRing=gwe;var bwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=r.state.popFromRing();if(s){var a=r.getCursorAnchor();t.executeEdits(qe.SOURCE,[{range:yr.Range.fromPositions(a),text:s,forceMoveMarkers:!0}])}},e}(Gr);qe.YankRotate=bwe;var j4=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelection();this.revealFunction==="up"?t.trigger(qe.SOURCE,"scrollPageUp",null):t[this.revealFunction](s)},e}(Gr);qe.RevealEditorAction=j4;var vwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeAtTop",t}return e}(j4);qe.RevealToTopAction=vwe;var _we=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeInCenter",t}return e}(j4);qe.RevealToCenterAction=_we;var ywe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="up",t}return e}(j4);qe.RevealToBottomAction=ywe;var wwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){for(var s=t.getModel(),a=s.getOptions(),l=a.tabSize,c=a.insertSpaces,d="",u=0;u<n;u++){for(var h="",f=0;f<l;f++)h+=" ";d+=c?h:" "}t.executeEdits(qe.SOURCE,[{range:t.getSelection(),text:d,forceMoveMarkers:!0}])},e}(Gr);qe.InsertTabs=wwe;var xwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getVisibleRanges();if(s.length){for(var a=[],l=1,c=0;c<s.length;c++)for(var d=s[c],u=d.startLineNumber;u<=d.endLineNumber;u++)a.push(u);var h=t.getPosition(),f=Math.ceil(a.length/2),m;h.lineNumber===a[f]?m=new yr.Position(a[0],1):h.lineNumber===a[0]?m=new yr.Position(a[a.length-1],1):m=new yr.Position(a[f],1),t.setPosition(m)}},e}(Gr);qe.RotateCursorOnScreen=xwe;var Cwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.getBasicInput("Goto Line: ").then(function(s){var a=parseInt(s)||0,l=t.getModel(),c=l.getLineCount();t.focus(),a?a>c&&(a=c):a=1;var d=new yr.Position(a,1),u;if(!r.selectionMode)u=yr.Selection.fromPositions(d);else{var h=t.getSelection();h.getDirection()===yr.SelectionDirection.LTR?u=yr.Selection.fromPositions(h.getStartPosition(),d):u=yr.Selection.fromPositions(h.getEndPosition(),d)}t.setSelection(u),t.revealRangeInCenter(u)}).catch(function(){t.focus()})},e}(Gr);qe.GotoLine=Cwe;var Swe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelection();if(!s.isEmpty()){var a;s.getDirection()===yr.SelectionDirection.LTR?a=yr.Selection.fromPositions(s.getEndPosition(),s.getStartPosition()):a=yr.Selection.fromPositions(s.getStartPosition(),s.getEndPosition()),t.setSelection(a)}},e}(Gr);qe.InvertSelection=Swe;var kwe=function(i){hi(e,i);function e(){return i.call(this,"editor.actions.findWithArgs")||this}return e}(Mee);qe.Search=kwe;var Ewe=function(i){hi(e,i);function e(){return i.call(this,"editor.action.startFindReplaceAction")||this}return e}(Mee);qe.SearchReplace=Ewe;var Twe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.selectionMode=!1;for(var s=0;s<n;s++)t.trigger(qe.SOURCE,"editor.action.deleteLines",null)},e}(Gr);qe.DeleteLines=Twe});var V4=Xi(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.getAllMappings=Yr.unregisterKey=Yr.registerGlobalCommand=Yr.executeCommand=Yr.COMMANDS=Yr.prefixPreservingKeys=void 0;var yi=sR();Yr.prefixPreservingKeys={"M-g":!0,"C-x":!0,"C-q":!0,"C-u":!0};var Oee=new yi.SetMark,W4=new yi.UndoAction,Iwe=new yi.MoveCursorDown,Lwe=new yi.MoveCursorUp,Awe=new yi.MoveCursorRight,Dwe=new yi.MoveCursorLeft;Yr.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":Oee,"S-C-2":Oee,"C-/":W4,"S-C--":W4,"C-z":W4,"C-x u":W4,"C-n":Iwe,"C-p":Lwe,"C-f":Awe,"C-b":Dwe,"S-C-Backspace":new yi.DeleteLines,"M-f":new yi.MoveCursorWordRight,"M-b":new yi.MoveCursorWordLeft,"C-k":new yi.KillLines,"C-m":new yi.InsertLineAfter,"C-w":new yi.KillSelection,"C-o":new yi.InsertLineBelow,"C-g":new yi.KeyBoardQuit,"C-e":new yi.MoveCursorToLineEnd,"C-a":new yi.MoveCursorToLineStart,"C-y":new yi.Yank,"M-w":new yi.YankSelectionToRing,"M-y":new yi.YankRotate,"C-l":new yi.RevealToCenterAction,"C-q Tab":new yi.InsertTabs,"M-r":new yi.RotateCursorOnScreen,"M-g g":new yi.GotoLine,"M-g M-g":new yi.GotoLine,"C-x C-x":new yi.InvertSelection,"S-M-.":new yi.MoveCursorBottom,"S-M-,":new yi.MoveCursorTop,"C-s":new yi.Search,"C-r":new yi.Search,"S-M-5":new yi.SearchReplace};function Mwe(i,e,t,r){var n=i.getEditor(),o=parseInt(t)||1;if(e.run){e.run(n,i,o,r);return}if(typeof e.action=="string")for(var s=0;s<o;s++)n.trigger(yi.SOURCE,e.action,null);else if(Array.isArray(e.action))for(var s=0;s<o;s++)e.action.forEach(function(l){n.trigger(yi.SOURCE,l,null)})}Yr.executeCommand=Mwe;function Nwe(i,e){Yr.COMMANDS[i]=e}Yr.registerGlobalCommand=Nwe;function Rwe(i){Yr.COMMANDS[i]&&delete Yr.COMMANDS[i]}Yr.unregisterKey=Rwe;function Pwe(){var i={};return Object.keys(Yr.COMMANDS).forEach(function(e){i[e]=Yr.COMMANDS[e].description}),i}Yr.getAllMappings=Pwe});var Bee=Xi(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Emitter=Hn.Event=Hn.monacoToEmacsKey=Hn.modifierKeys=void 0;var Owe=(bv(),Yh(gv));Hn.modifierKeys={Alt:"M",Control:"C",Ctrl:"C",Meta:"CMD",Shift:"S"};var Fee={Enter:"Return",Space:"SPC",Backslash:"\\",Slash:"/",Backquote:"`",BracketRight:"]",BracketLeft:"[",Comma:",",Period:".",Equal:"=",Minus:"-",Quote:"'",Semicolon:";"},Fwe=["Key","Numpad"],zee="Arrow";function zwe(i){var e=Owe.KeyCode[i.keyCode];if(Hn.modifierKeys[e])return"";var t=Fwe.some(function(r){return e.startsWith(r)})?e[e.length-1]:e;return e.endsWith(zee)?t=e.substring(0,e.length-zee.length):Fee[e]&&(t=Fee[t]),t.length===1&&(t=t.toLowerCase()),i.altKey&&(t="".concat(Hn.modifierKeys.Alt,"-").concat(t)),i.ctrlKey&&(t="".concat(Hn.modifierKeys.Ctrl,"-").concat(t)),i.metaKey&&(t="".concat(Hn.modifierKeys.Meta,"-").concat(t)),i.shiftKey&&(t="".concat(Hn.modifierKeys.Shift,"-").concat(t)),t}Hn.monacoToEmacsKey=zwe;var Bwe;(function(i){var e={dispose:function(){}};i.None=function(){return e}})(Bwe=Hn.Event||(Hn.Event={}));var Hwe=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 r={dispose:function(){if(!e._disposed){var n=e._listeners.indexOf(t);n<0||e._listeners.splice(n,1)}}};return r}),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}();Hn.Emitter=Hwe});var Hee=Xi(q4=>{"use strict";Object.defineProperty(q4,"__esModule",{value:!0});q4.BasicInputWidget=void 0;var Uwe=(bv(),Yh(gv)),Vo="ext-emacs-basic-input";function jwe(){return` +`));return}var Ze=0,tt=function Ye(){if(Ze<se.length){var Ft=se[Ze++],Tt=p.getLineNumber(Ft);if(Tt==null){Ye();return}var It=Tt+1+V;ea.processCommand(p,It,{callback:Ye})}};tt()},substitute:function(p,y){if(!p.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=y.argString,k=C?x9(C,C[0]):[],I,M="",H,W,V,Q=!1,se=!1;if(k.length)I=k[0],Oe("pcre")&&I!==""&&(I=new RegExp(I).source),M=k[1],M!==void 0&&(Oe("pcre")?M=Vie(M.replace(/([^\\])&/g,"$1$$&")):M=Wie(M),X.lastSubstituteReplacePart=M),H=k[2]?k[2].split(" "):[];else if(C&&C.length){Bi(p,"Substitutions should be of the form :s/pattern/replace/");return}if(H&&(W=H[0],V=parseInt(H[1]),W&&(W.indexOf("c")!=-1&&(Q=!0),W.indexOf("g")!=-1&&(se=!0),Oe("pcre")?I=I+"/"+W:I=I.replace(/\//g,"\\/")+"/"+W)),I)try{wm(p,I,!0,!0)}catch(Ft){Bi(p,"Invalid regex: "+I);return}if(M=M||X.lastSubstituteReplacePart,M===void 0){Bi(p,"No previous substitute regular expression");return}var Ce=Js(p),xe=Ce.getQuery(),ye=y.line!==void 0?y.line:p.getCursor().line,Ze=y.lineEnd||ye;ye==p.firstLine()&&Ze==p.lastLine()&&(Ze=1/0),V&&(ye=Ze,Ze=ye+V-1);var tt=Or(p,new Ve(ye,0)),Ye=p.getSearchCursor(xe,tt);p.pushUndoStop(),Qie(p,Q,se,ye,Ze,Ye,xe,M,y.callback)},redo:ut.default.commands.redo,undo:ut.default.commands.undo,write:function(p){ut.default.commands.save?ut.default.commands.save(p):p.save&&p.save()},nohlsearch:function(p){T3(p)},yank:function(p){var y=Yi(p.getCursor()),C=y.line,k=p.getLine(C);X.registerController.pushText("0","yank",k,!0,!0)},delmarks:function(p,y){if(!y.argString||!bs(y.argString)){Bi(p,"Argument required");return}for(var C=p.state.vim,k=new ut.default.StringStream(bs(y.argString));!k.eol();){k.eatSpace();var I=k.pos;if(!k.match(/[a-zA-Z]/,!1)){Bi(p,"Invalid argument: "+y.argString.substring(I));return}var M=k.next();if(k.match("-",!0)){if(!k.match(/[a-zA-Z]/,!1)){Bi(p,"Invalid argument: "+y.argString.substring(I));return}var H=M,W=k.next();if(L(H)&&L(W)||Y(H)&&Y(W)){var V=H.charCodeAt(0),Q=W.charCodeAt(0);if(V>=Q){Bi(p,"Invalid argument: "+y.argString.substring(I));return}for(var se=0;se<=Q-V;se++){var Ce=String.fromCharCode(V+se);delete C.marks[Ce]}}else{Bi(p,"Invalid argument: "+H+"-");return}}else delete C.marks[M]}}},ea=new A9;function Qie(S,p,y,C,k,I,M,H,W){S.state.vim.exMode=!0;var V=!1,Q,se,Ce;function xe(){S.operation(function(){for(;!V;)ye(),tt();Ye()})}function ye(){var Tt=S.getRange(I.from(),I.to()),It=Tt.replace(M,H),Hi=I.to().line;I.replace(It),se=I.to().line,k+=se-Hi,Ce=se<Hi}function Ze(){var Tt=Q&&Yi(I.to()),It=I.findNext();return It&&!It[0]&&Tt&&ge(I.from(),Tt)&&(It=I.findNext()),It}function tt(){for(;Ze()&&Xie(I.from(),C,k);)if(!(!y&&I.from().line==se&&!Ce)){S.scrollIntoView(I.from(),30),S.setSelection(I.from(),I.to()),Q=I.from(),V=!1;return}V=!0}function Ye(Tt){if(Tt&&Tt(),S.focus(),Q){S.setCursor(Q);var It=S.state.vim;It.exMode=!1,It.lastHPos=It.lastHSPos=Q.ch}W&&W()}function Ft(Tt,It,Hi){ut.default.e_stop(Tt);var no=ut.default.keyName(Tt);switch(no){case"Y":ye(),tt();break;case"N":tt();break;case"A":var fr=W;W=void 0,S.operation(xe),W=fr;break;case"L":ye();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":Ye(Hi);break}return V&&Ye(Hi),!0}if(tt(),V){Bi(S,"No matches for "+M.source);return}if(!p){xe(),W&&W();return}Av(S,{prefix:ou("span","replace with ",ou("strong",H)," (y/n/a/q/l)"),onKeyDown:Ft})}ut.default.keyMap.vim={attach:n,detach:r,call:o};function xm(S){var p=S.state.vim,y=X.macroModeState,C=X.registerController.getRegister("."),k=y.isPlaying,I=y.lastInsertModeChanges;k||(S.off("change",N9),ut.default.off(S.getInputField(),"keydown",P9)),!k&&p.insertModeRepeat>1&&(O9(S,p,p.insertModeRepeat-1,!0),p.lastEditInputState.repeatOverride=p.insertModeRepeat),delete p.insertModeRepeat,p.insertMode=!1,S.setCursor(S.getCursor().line,S.getCursor().ch-1),S.setOption("keyMap","vim"),S.setOption("disableInput",!0),S.toggleOverwrite(!1),C.setText(I.changes.join("")),ut.default.signal(S,"vim-mode-change",{mode:"normal"}),y.isRecording&&tre(y),S.enterVimMode()}function M9(S){wn.unshift(S)}function Zie(S,p,y,C,k){var I={keys:S,type:p};I[p]=y,I[p+"Args"]=C;for(var M in k)I[M]=k[M];M9(I)}Pe("insertModeEscKeysTimeout",200,"number"),ut.default.keyMap["vim-insert"]={fallthrough:["default"],attach:n,detach:r,call:o},ut.default.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:n,detach:r,call:o};function Jie(S,p,y,C){var k=X.registerController.getRegister(C);if(C==":"){k.keyBuffer[0]&&ea.processCommand(S,k.keyBuffer[0]),y.isPlaying=!1;return}var I=k.keyBuffer,M=0;y.isPlaying=!0,y.replaySearchQueries=k.searchQueries.slice(0);for(var H=0;H<I.length;H++)for(var W=I[H],V,Q;W;)if(V=/<\w+-.+?>|<\w+>|./.exec(W),Q=V[0],W=W.substring(V.index+Q.length),me.handleKey(S,Q,"macro"),p.insertMode){var se=k.insertModeChanges[M++].changes;X.macroModeState.lastInsertModeChanges.changes=se,F9(S,se,1),xm(S)}y.isPlaying=!1}function ere(S,p){if(!S.isPlaying){var y=S.latestRegister,C=X.registerController.getRegister(y);C&&C.pushText(p)}}function tre(S){if(!S.isPlaying){var p=S.latestRegister,y=X.registerController.getRegister(p);y&&y.pushInsertModeChanges&&y.pushInsertModeChanges(S.lastInsertModeChanges)}}function ire(S,p){if(!S.isPlaying){var y=S.latestRegister,C=X.registerController.getRegister(y);C&&C.pushSearchQuery&&C.pushSearchQuery(p)}}function N9(S,p){var y=X.macroModeState,C=y.lastInsertModeChanges;if(!y.isPlaying)for(;p;){if(C.expectCursorActivityForChange=!0,C.ignoreCount>1)C.ignoreCount--;else if(p.origin=="+input"||p.origin=="paste"||p.origin===void 0){var k=S.listSelections().length;k>1&&(C.ignoreCount=k);var I=p.text.join(` +`);C.maybeReset&&(C.changes=[],C.maybeReset=!1),I&&(S.state.overwrite&&!/\n/.test(I)?C.changes.push([I]):C.changes.push(I))}p=p.next}}function R9(S){var p=S.state.vim;if(p.insertMode){var y=X.macroModeState;if(y.isPlaying)return;var C=y.lastInsertModeChanges;C.expectCursorActivityForChange?C.expectCursorActivityForChange=!1:C.maybeReset=!0}else S.curOp.isVimOp||rre(S,p)}function rre(S,p){var y=S.getCursor("anchor"),C=S.getCursor("head");if(p.visualMode&&!S.somethingSelected()?Qs(S,!1):!p.visualMode&&!p.insertMode&&S.somethingSelected()&&(p.visualMode=!0,p.visualLine=!1,ut.default.signal(S,"vim-mode-change",{mode:"visual"})),p.visualMode){var k=De(C,y)?0:-1,I=De(C,y)?-1:0;C=hr(C,0,k),y=hr(y,0,I),p.sel={anchor:y,head:C},nl(S,p,"<",bt(C,y)),nl(S,p,">",Wt(C,y))}else p.insertMode||(p.lastHPos=S.getCursor().ch)}function L3(S){this.keyName=S}function P9(S){var p=X.macroModeState,y=p.lastInsertModeChanges,C=ut.default.keyName(S);if(!C)return;function k(){return y.maybeReset&&(y.changes=[],y.maybeReset=!1),y.changes.push(new L3(C)),!0}(C.indexOf("Delete")!=-1||C.indexOf("Backspace")!=-1)&&ut.default.lookupKey(C,"vim-insert",k)}function O9(S,p,y,C){var k=X.macroModeState;k.isPlaying=!0;var I=!!p.lastEditActionCommand,M=p.inputState;function H(){I?Ei.processAction(S,p,p.lastEditActionCommand):Ei.evalInput(S,p)}function W(Q){if(k.lastInsertModeChanges.changes.length>0){Q=p.lastEditActionCommand?Q:1;var se=k.lastInsertModeChanges;F9(S,se.changes,Q)}}if(p.inputState=p.lastEditInputState,I&&p.lastEditActionCommand.interlaceInsertRepeat)for(var V=0;V<y;V++)H(),W(1);else C||H(),W(y);p.inputState=M,p.insertMode&&!C&&xm(S),k.isPlaying=!1}function F9(S,p,y){function C(se){return typeof se=="string"?ut.default.commands[se](S):se(S),!0}var k=S.getCursor("head"),I=X.macroModeState.lastInsertModeChanges.visualBlock;I&&(Cn(S,k,I+1),y=S.listSelections().length,S.setCursor(k));for(var M=0;M<y;M++){I&&S.setCursor(hr(k,M,0));for(var H=0;H<p.length;H++){var W=p[H];if(W instanceof L3)ut.default.lookupKey(W.keyName,"vim-insert",C);else if(typeof W=="string")window.cm=S,S.replaceSelections(W);else{var V=S.getCursor(),Q=hr(V,0,W[0].length);S.replaceRange(W[0],V,Q),S.setCursor(Q)}}}I&&S.setCursor(hr(k,0,1))}return R(),me};um.Vim=KQ;ut.default.Vim=KQ();var __e=ut.default;um.default=__e});var YQ=Xi(T4=>{"use strict";Object.defineProperty(T4,"__esModule",{value:!0});T4.default=void 0;function y_e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function GQ(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}function w_e(i,e,t){return e&&GQ(i.prototype,e),t&&GQ(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}var x_e=function(){function i(e,t){var r=this,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;y_e(this,i),this.closeInput=function(){r.removeInputListeners(),r.input=null,r.setSec(""),r.editor&&r.editor.focus()},this.clear=function(){r.setInnerHtml_(r.node,"")},this.inputKeyUp=function(o){var s=r.input.options;s&&s.onKeyUp&&s.onKeyUp(o,o.target.value,r.closeInput)},this.inputKeyInput=function(o){var s=r.input.options;s&&s.onKeyInput&&s.onKeyUp(o,o.target.value,r.closeInput)},this.inputBlur=function(){var o=r.input.options;o.closeOnBlur&&r.closeInput()},this.inputKeyDown=function(o){var s=r.input,a=s.options,l=s.callback;a&&a.onKeyDown&&a.onKeyDown(o,o.target.value,r.closeInput)||((o.keyCode===27||a&&a.closeOnEnter!==!1&&o.keyCode==13)&&(r.input.node.blur(),o.stopPropagation(),r.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=n}return w_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,r,n){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:r,options:n,node:o},n&&(n.selectValueOnOpen&&o.select(),n.value&&(o.value=n.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 r=this,n=document.createElement("span");this.setInnerHtml_(n,t),this.notifNode.textContent=n.textContent,this.notifTimeout=setTimeout(function(){r.notifNode.textContent=""},5e3)}},{key:"setInnerHtml_",value:function(t,r){for(;t.childNodes.length;)t.removeChild(t.childNodes[0]);r&&(this.sanitizer?t.appendChild(this.sanitizer(r)):t.appendChild(r))}}]),i}();T4.default=x_e});var JQ=Xi(dv=>{"use strict";Object.defineProperty(dv,"__esModule",{value:!0});Object.defineProperty(dv,"StatusBar",{enumerable:!0,get:function(){return QQ.default}});Object.defineProperty(dv,"VimMode",{enumerable:!0,get:function(){return XQ.default}});dv.initVimMode=C_e;var XQ=ZQ($Q()),QQ=ZQ(YQ());function ZQ(i){return i&&i.__esModule?i:{default:i}}function C_e(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:QQ.default,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,n=new XQ.default(i);if(!e)return n.attach(),n;var o=new t(e,i,r),s="";return n.on("vim-mode-change",function(a){o.setMode(a)}),n.on("vim-keypress",function(a){a===":"?s="":s+=a,o.setKeyBuffer(s)}),n.on("vim-command-done",function(){s="",o.setKeyBuffer(s)}),n.on("dispose",function(){o.toggleVisibility(!1),o.closeInput(),o.clear()}),o.toggleVisibility(!0),n.setStatusBar(o),n.attach(),n}});var eZ=N(()=>{Ge();ie({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>import("./abap-VAQQMSMV.js")})});var tZ=N(()=>{Ge();ie({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>import("./apex-UGORXUMY.js")})});var iZ=N(()=>{Ge();ie({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>import("./azcli-5IGBGNJX.js")})});var rZ=N(()=>{Ge();ie({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>import("./bat-I2Q2VM2E.js")})});var nZ=N(()=>{Ge();ie({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>import("./bicep-6DU2S5EQ.js")})});var oZ=N(()=>{Ge();ie({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>import("./cameligo-FQU2BD2Q.js")})});var sZ=N(()=>{Ge();ie({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>import("./clojure-X5EURZF4.js")})});var aZ=N(()=>{Ge();ie({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>import("./coffee-V3VYUJVN.js")})});var lZ=N(()=>{Ge();ie({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>import("./cpp-EIUZ67SI.js")});ie({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>import("./cpp-EIUZ67SI.js")})});var cZ=N(()=>{Ge();ie({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>import("./csharp-6XMKEPGL.js")})});var dZ=N(()=>{Ge();ie({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>import("./csp-RUXEOTA7.js")})});var uZ=N(()=>{Ge();ie({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>import("./cypher-LB5ELPID.js")})});var hZ=N(()=>{Ge();ie({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>import("./dart-6KXBVQQ5.js")})});var fZ=N(()=>{Ge();ie({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>import("./ecl-M4POWDBD.js")})});var pZ=N(()=>{Ge();ie({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>import("./flow9-CCUIXH3M.js")})});var mZ=N(()=>{Ge();ie({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>import("./fsharp-VVLVFTJD.js")})});var gZ=N(()=>{Ge();ie({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationDollar)});ie({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAngleInterpolationDollar)});ie({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagBracketInterpolationDollar)});ie({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAngleInterpolationBracket)});ie({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagBracketInterpolationBracket)});ie({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationDollar)});ie({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>import("./freemarker2-B2ESJTNL.js").then(i=>i.TagAutoInterpolationBracket)})});var bZ=N(()=>{Ge();ie({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>import("./go-BSHCOGOM.js")})});var vZ=N(()=>{Ge();ie({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>import("./graphql-QJYQP674.js")})});var _Z=N(()=>{Ge();ie({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>import("./handlebars-VNAHN657.js")})});var yZ=N(()=>{Ge();ie({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>import("./hcl-B2FOVQI3.js")})});var wZ=N(()=>{Ge();ie({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>import("./ini-K4OMSQGU.js")})});var xZ=N(()=>{Ge();ie({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>import("./java-M2SLT6P5.js")})});var CZ=N(()=>{Ge();ie({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>import("./julia-UMW37XS3.js")})});var SZ=N(()=>{Ge();ie({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>import("./kotlin-DTS7EPKW.js")})});var kZ=N(()=>{Ge();ie({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>import("./less-64EWHB2U.js")})});var EZ=N(()=>{Ge();ie({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>import("./lexon-VSTQQJS4.js")})});var TZ=N(()=>{Ge();ie({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>import("./lua-DEBQHPWC.js")})});var IZ=N(()=>{Ge();ie({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>import("./liquid-PZUYRUGD.js")})});var LZ=N(()=>{Ge();ie({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>import("./m3-BVWXEQNO.js")})});var AZ=N(()=>{Ge();ie({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>import("./mdx-VP3GSOCD.js")})});var DZ=N(()=>{Ge();ie({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>import("./mips-PLBQC4OD.js")})});var MZ=N(()=>{Ge();ie({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>import("./msdax-T7T2KNYQ.js")})});var NZ=N(()=>{Ge();ie({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>import("./mysql-6SINHLS3.js")})});var RZ=N(()=>{Ge();ie({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>import("./objective-c-HU5BK7KT.js")})});var PZ=N(()=>{Ge();ie({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>import("./pascal-35QHNCUU.js")})});var OZ=N(()=>{Ge();ie({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>import("./pascaligo-XJIGVHMA.js")})});var FZ=N(()=>{Ge();ie({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>import("./perl-EJ4CU5Y5.js")})});var zZ=N(()=>{Ge();ie({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>import("./pgsql-O5YVZFG3.js")})});var BZ=N(()=>{Ge();ie({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>import("./php-7OX4N2D2.js")})});var HZ=N(()=>{Ge();ie({id:"pla",extensions:[".pla"],loader:()=>import("./pla-XIRH422Y.js")})});var UZ=N(()=>{Ge();ie({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>import("./postiats-FSD57ZTG.js")})});var jZ=N(()=>{Ge();ie({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>import("./powerquery-WN3FBQ3N.js")})});var WZ=N(()=>{Ge();ie({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>import("./powershell-6POP5WYL.js")})});var VZ=N(()=>{Ge();ie({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>import("./protobuf-R3NYANEY.js")})});var qZ=N(()=>{Ge();ie({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>import("./pug-UMENAZU6.js")})});var KZ=N(()=>{Ge();ie({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>import("./python-CAXMRMZU.js")})});var $Z=N(()=>{Ge();ie({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>import("./qsharp-JPLZF5CJ.js")})});var GZ=N(()=>{Ge();ie({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>import("./r-V566F5LS.js")})});var YZ=N(()=>{Ge();ie({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>import("./razor-VXRRUWJU.js")})});var XZ=N(()=>{Ge();ie({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>import("./redis-C25WFMNL.js")})});var QZ=N(()=>{Ge();ie({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>import("./redshift-LE5NUCLH.js")})});var ZZ=N(()=>{Ge();ie({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>import("./restructuredtext-XX5QEZJT.js")})});var JZ=N(()=>{Ge();ie({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>import("./ruby-XQPDAWDE.js")})});var eJ=N(()=>{Ge();ie({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>import("./rust-TOYK7AZY.js")})});var tJ=N(()=>{Ge();ie({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>import("./sb-J2JR5LHW.js")})});var iJ=N(()=>{Ge();ie({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-YUYNXHOB.js")})});var rJ=N(()=>{Ge();ie({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>import("./scheme-3ZBC5PHA.js")})});var nJ=N(()=>{Ge();ie({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>import("./scss-TEOGYYZ6.js")})});var oJ=N(()=>{Ge();ie({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>import("./shell-BD6IL5P2.js")})});var sJ=N(()=>{Ge();ie({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>import("./solidity-7YGHHWAJ.js")})});var aJ=N(()=>{Ge();ie({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>import("./sophia-UUA6XVAK.js")})});var lJ=N(()=>{Ge();ie({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>import("./sparql-CQTB3JIZ.js")})});var cJ=N(()=>{Ge();ie({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>import("./st-EUKBJWA4.js")})});var dJ=N(()=>{Ge();ie({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>import("./swift-DJAXPCZZ.js")})});var uJ=N(()=>{Ge();ie({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>import("./systemverilog-VL3WHTSC.js")});ie({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>import("./systemverilog-VL3WHTSC.js")})});var hJ=N(()=>{Ge();ie({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>import("./tcl-HX43DWKO.js")})});var fJ=N(()=>{Ge();ie({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>import("./twig-33VJJYP3.js")})});var pJ=N(()=>{Ge();ie({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>import("./typescript-YY3TBR77.js")})});var mJ=N(()=>{Ge();ie({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>import("./vb-7EFP77QG.js")})});var gJ=N(()=>{Ge();ie({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>import("./wgsl-LFVBXOME.js")})});var bJ=N(()=>{Ge();ie({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>import("./yaml-THK2ACKN.js")})});var vJ=N(()=>{Ds();eZ();tZ();iZ();rZ();nZ();oZ();sZ();aZ();lZ();cZ();dZ();XM();uZ();hZ();JM();fZ();KM();pZ();mZ();gZ();bZ();vZ();_Z();yZ();QM();wZ();xZ();GM();CZ();SZ();kZ();EZ();TZ();IZ();LZ();$M();AZ();DZ();MZ();NZ();RZ();PZ();OZ();FZ();zZ();BZ();HZ();UZ();jZ();WZ();VZ();qZ();KZ();$Z();GZ();YZ();XZ();QZ();ZZ();JZ();eJ();tJ();iJ();rJ();nJ();oJ();sJ();aJ();lJ();YM();cJ();dJ();uJ();hJ();fJ();pJ();mJ();gJ();ZM();bJ();});function wN(){return import("./cssMode-3KIDE53D.js")}var S_e,k_e,E_e,T_e,_J,I_e,hm,vN,_N,yN,yJ,wJ,xJ,CJ=N(()=>{Ds();Ds();S_e=Object.defineProperty,k_e=Object.getOwnPropertyDescriptor,E_e=Object.getOwnPropertyNames,T_e=Object.prototype.hasOwnProperty,_J=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of E_e(e))!T_e.call(i,n)&&n!==t&&S_e(i,n,{get:()=>e[n],enumerable:!(r=k_e(e,n))||r.enumerable});return i},I_e=(i,e,t)=>(_J(i,e,"default"),t&&_J(t,e,"default")),hm={};I_e(hm,As);vN=class{constructor(i,e,t){wr(this,"_onDidChange",new hm.Emitter);wr(this,"_options");wr(this,"_modeConfiguration");wr(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)}},_N={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}},yN={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},yJ=new vN("css",_N,yN),wJ=new vN("scss",_N,yN),xJ=new vN("less",_N,yN);hm.languages.css={cssDefaults:yJ,lessDefaults:xJ,scssDefaults:wJ};hm.languages.onLanguage("less",()=>{wN().then(i=>i.setupMode(xJ))});hm.languages.onLanguage("scss",()=>{wN().then(i=>i.setupMode(wJ))});hm.languages.onLanguage("css",()=>{wN().then(i=>i.setupMode(yJ))})});function A4(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===uv,documentFormattingEdits:i===uv,documentRangeFormattingEdits:i===uv}}function B_e(){return import("./htmlMode-EEO2WQ3S.js")}function D4(i,e=L4,t=A4(i)){let r=new R_e(i,e,t),n,o=I4.languages.onLanguage(i,async()=>{n=(await B_e()).setupMode(r)});return{defaults:r,dispose(){o.dispose(),n==null||n.dispose(),n=void 0}}}var L_e,A_e,D_e,M_e,SJ,N_e,I4,R_e,P_e,L4,uv,kJ,EJ,TJ,O_e,IJ,F_e,LJ,z_e,AJ=N(()=>{Ds();Ds();L_e=Object.defineProperty,A_e=Object.getOwnPropertyDescriptor,D_e=Object.getOwnPropertyNames,M_e=Object.prototype.hasOwnProperty,SJ=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of D_e(e))!M_e.call(i,n)&&n!==t&&L_e(i,n,{get:()=>e[n],enumerable:!(r=A_e(e,n))||r.enumerable});return i},N_e=(i,e,t)=>(SJ(i,e,"default"),t&&SJ(t,e,"default")),I4={};N_e(I4,As);R_e=class{constructor(i,e,t){wr(this,"_onDidChange",new I4.Emitter);wr(this,"_options");wr(this,"_modeConfiguration");wr(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)}},P_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"},L4={format:P_e,suggest:{},data:{useDefaultDataProvider:!0}};uv="html",kJ="handlebars",EJ="razor",TJ=D4(uv,L4,A4(uv)),O_e=TJ.defaults,IJ=D4(kJ,L4,A4(kJ)),F_e=IJ.defaults,LJ=D4(EJ,L4,A4(EJ)),z_e=LJ.defaults;I4.languages.html={htmlDefaults:O_e,razorDefaults:z_e,handlebarDefaults:F_e,htmlLanguageService:TJ,handlebarLanguageService:IJ,razorLanguageService:LJ,registerHTMLLanguageService:D4}});var H_e,xN,U_e,Bh,CN,SN=N(()=>{aa();lne();Go();Br();ke();Rt();B_();H_e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},xN=function(i,e){return function(t,r){e(t,r,i)}},U_e=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},Bh=class{constructor(e,t){this._editorWorkerClient=new _z(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return U_e(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,r){let n=t.range,o=t.color,s=o.alpha,a=new vt(new ks(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?vt.Format.CSS.formatRGB(a):vt.Format.CSS.formatRGBA(a),c=s?vt.Format.CSS.formatHSL(a):vt.Format.CSS.formatHSLA(a),d=s?vt.Format.CSS.formatHex(a):vt.Format.CSS.formatHexA(a),u=[];return u.push({label:l,textEdit:{range:n,text:l}}),u.push({label:c,textEdit:{range:n,text:c}}),u.push({label:d,textEdit:{range:n,text:d}}),u}},CN=class extends ce{constructor(e,t,r){super(),this._register(r.colorProvider.register("*",new Bh(e,t)))}};CN=H_e([xN(0,Li),xN(1,Pt),xN(2,Se)],CN);Kc(CN)});function M4(i,e,t,r=!0){return hv(this,void 0,void 0,function*(){return LN(new kN,i,e,t,r)})}function IN(i,e,t,r){return Promise.resolve(t.provideColorPresentations(i,e,r))}function LN(i,e,t,r,n){return hv(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 Bh)s=d;else try{(yield i.compute(d,t,r,a))&&(o=!0)}catch(u){Yt(u)}}return o?a:s&&n?(yield i.compute(s,t,r,a),a):[]})}function DJ(i,e){let{colorProvider:t}=i.get(Se),r=i.get(Li).getModel(e);if(!r)throw Co();let n=i.get(Dt).getValue("editor.defaultColorDecorators",{resource:e});return{model:r,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:n}}var hv,kN,EN,TN,AN=N(()=>{Si();Vt();Tr();et();Go();Wi();Rt();SN();Cr();hv=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};kN=class{constructor(){}compute(e,t,r,n){return hv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,r);if(Array.isArray(o))for(let s of o)n.push({colorInfo:s,provider:e});return Array.isArray(o)})}},EN=class{constructor(){}compute(e,t,r,n){return hv(this,void 0,void 0,function*(){let o=yield e.provideDocumentColors(t,r);if(Array.isArray(o))for(let s of o)n.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}},TN=class{constructor(e){this.colorInfo=e}compute(e,t,r,n){return hv(this,void 0,void 0,function*(){let o=yield e.provideColorPresentations(t,this.colorInfo,st.None);return Array.isArray(o)&&n.push(...o),Array.isArray(o)})}};At.registerCommand("_executeDocumentColorProvider",function(i,...e){let[t]=e;if(!(t instanceof yt))throw Co();let{model:r,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:o}=DJ(i,t);return LN(new EN,n,r,st.None,o)});At.registerCommand("_executeColorPresentationProvider",function(i,...e){let[t,r]=e,{uri:n,range:o}=r;if(!(n instanceof yt)||!Array.isArray(t)||t.length!==4||!B.isIRange(o))throw Co();let{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=DJ(i,n),[c,d,u,h]=t;return LN(new TN({range:o,color:{red:c,green:d,blue:u,alpha:h}}),a,s,st.None,l)})});var j_e,DN,MJ,MN,RN,gc,NN,PN=N(()=>{Ut();aa();Vt();Jt();ke();ol();Di();ZF();lt();et();Hr();Ls();Rt();AN();Cr();j_e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},DN=function(i,e){return function(t,r){e(t,r,i)}},MJ=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},RN=Object.create({}),gc=MN=class extends ce{constructor(e,t,r,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=r,this._localToDispose=this._register(new le),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Z_(this._editor),this._decoratorLimitReporter=new NN,this._colorDecorationClassRefs=this._register(new le),this._debounceInformation=n.for(r.colorProvider,"Document Colors",{min:MN.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(r.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{let s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144);let a=s!==this._isColorDecoratorsEnabled||o.hasChanged(20),l=o.hasChanged(144);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(144),this.updateColors()}isEnabled(){let e=this._editor.getModel();if(!e)return!1;let t=e.getLanguageId(),r=this._configurationService.getValue(t);if(r&&typeof r=="object"){let n=r.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(19)}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 oa,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return MJ(this,void 0,void 0,function*(){this._computePromise=Zt(e=>MJ(this,void 0,void 0,function*(){let t=this._editor.getModel();if(!t)return[];let r=new pr(!1),n=yield M4(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,r.elapsed()),n}));try{let e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){ft(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(r=>({range:{startLineNumber:r.colorInfo.range.startLineNumber,startColumn:r.colorInfo.range.startColumn,endLineNumber:r.colorInfo.range.endLineNumber,endColumn:r.colorInfo.range.endColumn},options:mt.EMPTY}));this._editor.changeDecorations(r=>{this._decorationsIds=r.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,o)=>this._colorDatas.set(n,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[],r=this._editor.getOption(20);for(let o=0;o<e.length&&t.length<r;o++){let{red:s,green:a,blue:l,alpha:c}=e[o].colorInfo.color,d=new ks(Math.round(s*255),Math.round(a*255),Math.round(l*255),c),u=`rgba(${d.r}, ${d.g}, ${d.b}, ${d.a})`,h=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:u}));t.push({range:{startLineNumber:e[o].colorInfo.range.startLineNumber,startColumn:e[o].colorInfo.range.startColumn,endLineNumber:e[o].colorInfo.range.endLineNumber,endColumn:e[o].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:qv,inlineClassName:`${h.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:RN}}})}let n=r<e.length?r:!1;this._decoratorLimitReporter.update(e.length,n),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){let t=this._editor.getModel();if(!t)return null;let r=t.getDecorationsInRange(B.fromPositions(e,e)).filter(n=>this._colorDatas.has(n.id));return r.length===0?null:this._colorDatas.get(r[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};gc.ID="editor.contrib.colorDetector";gc.RECOMPUTE_TIME=1e3;gc=MN=j_e([DN(1,Dt),DN(2,Se),DN(3,ar)],gc);NN=class{constructor(){this._onDidChange=new Je,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}};Ue(gc.ID,gc,1)});var N4,NJ=N(()=>{Jt();N4=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,r){this.presentationIndex=r,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Je,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Je,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 r=-1;for(let n=0;n<this.colorPresentations.length;n++)if(t.toLowerCase()===this.colorPresentations[n].label){r=n;break}if(r===-1){let n=t.split("(")[0].toLowerCase();for(let o=0;o<this.colorPresentations.length;o++)if(this.colorPresentations[o].label.toLowerCase().startsWith(n)){r=o;break}}r!==-1&&r!==this.presentationIndex&&(this.presentationIndex=r,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}});var RJ=N(()=>{});var R4=N(()=>{RJ()});var wo,ON,FN,zN,BN,P4,HN,UN,jN,O4,PJ=N(()=>{q9();Bt();Ore();L_();Qr();aa();Jt();ke();In();R4();He();en();xl();wo=Le,ON=class extends ce{constructor(e,t,r,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=wo(".colorpicker-header"),Te(e,this._domNode),this._pickedColorNode=Te(this._domNode,wo(".picked-color")),Te(this._pickedColorNode,wo("span.codicon.codicon-color-mode")),this._pickedColorPresentation=Te(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");let o=b("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=Te(this._domNode,wo(".original-color")),this._originalColorNode.style.backgroundColor=vt.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=r.getColorTheme().getColor(tk)||vt.white,this._register(r.onDidColorThemeChange(s=>{this.backgroundColor=s.getColor(tk)||vt.white})),this._register(Lt(this._pickedColorNode,gi.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Lt(this._originalColorNode,gi.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=vt.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 FN(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=vt.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}},FN=class extends ce{constructor(e){super(),this._onClicked=this._register(new Je),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Te(e,this._button);let t=document.createElement("div");t.classList.add("close-button-inner-div"),Te(this._button,t),Te(t,wo(".button"+_t.asCSSSelector(Ni("color-picker-close",pt.close,b("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}},zN=class extends ce{constructor(e,t,r,n=!1){super(),this.model=t,this.pixelRatio=r,this._insertButton=null,this._domNode=wo(".colorpicker-body"),Te(e,this._domNode),this._saturationBox=new BN(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 HN(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new UN(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new jN(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){let r=this.model.color.hsva;this.model.color=new vt(new Fm(r.h,e,t,r.a))}onDidOpacityChange(e){let t=this.model.color.hsva;this.model.color=new vt(new Fm(t.h,t.s,t.v,e))}onDidHueChange(e){let t=this.model.color.hsva,r=(1-e)*360;this.model.color=new vt(new Fm(r===360?0:r,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()}},BN=class extends ce{constructor(e,t,r){super(),this.model=t,this.pixelRatio=r,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,this._domNode=wo(".saturation-wrap"),Te(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Te(this._domNode,this._canvas),this.selection=wo(".saturation-selection"),Te(this._domNode,this.selection),this.layout(),this._register(Lt(this._domNode,gi.POINTER_DOWN,n=>this.onPointerDown(n))),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 ck);let t=Qi(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);let r=Lt(document,gi.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){let r=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(r,n),this._onDidChange.fire({s:r,v:n})}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 vt(new Fm(e.h,1,1,1)),r=this._canvas.getContext("2d"),n=r.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");let o=r.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),r.rect(0,0,this._canvas.width,this._canvas.height),r.fillStyle=vt.Format.CSS.format(t),r.fill(),r.fillStyle=n,r.fill(),r.fillStyle=o,r.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();let t=e.hsva;this.paintSelection(t.s,t.v)}},P4=class extends ce{constructor(e,t,r=!1){super(),this.model=t,this._onDidChange=new Je,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Je,this.onColorFlushed=this._onColorFlushed.event,r?(this.domNode=Te(e,wo(".standalone-strip")),this.overlay=Te(this.domNode,wo(".standalone-overlay"))):(this.domNode=Te(e,wo(".strip")),this.overlay=Te(this.domNode,wo(".overlay"))),this.slider=Te(this.domNode,wo(".slider")),this.slider.style.top="0px",this._register(Lt(this.domNode,gi.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;let e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){let t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._register(new ck),r=Qi(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-r.top),()=>null);let n=Lt(document,gi.POINTER_UP,()=>{this._onColorFlushed.fire(),n.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`}},HN=class extends P4{constructor(e,t,r=!1){super(e,t,r),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);let{r:t,g:r,b:n}=e.rgba,o=new vt(new ks(t,r,n,1)),s=new vt(new ks(t,r,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}},UN=class extends P4{constructor(e,t,r=!1){super(e,t,r),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}},jN=class extends ce{constructor(e){super(),this._onClicked=this._register(new Je),this.onClicked=this._onClicked.event,this._button=Te(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}},O4=class extends bl{constructor(e,t,r,n,o=!1){super(),this.model=t,this.pixelRatio=r,this._register(W9.onDidChange(()=>this.layout()));let s=wo(".colorpicker-widget");e.appendChild(s),this.header=this._register(new ON(s,this.model,n,o)),this.body=this._register(new zN(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}});function zJ(i,e,t,r){return fm(this,void 0,void 0,function*(){let n=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,c=new ks(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),d=new vt(c),u=yield IN(e,t,r,st.None),h=new N4(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,n),i instanceof fv?new WN(i,B.lift(t.range),h,r):new VN(i,B.lift(t.range),h,r)})}function BJ(i,e,t,r,n){if(r.length===0||!e.hasModel())return ce.None;if(n.setMinimumDimensions){let h=e.getOption(65)+8;n.setMinimumDimensions(new Xt(302,h))}let o=new le,s=r[0],a=e.getModel(),l=s.model,c=o.add(new O4(n.fragment,l,e.getOption(140),t,i instanceof pm));n.setColorPicker(c);let d=!1,u=new B(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(i instanceof pm){let h=r[0].model.color;i.color=h,F4(a,l,h,u,s),o.add(l.onColorFlushed(f=>{i.color=f}))}else o.add(l.onColorFlushed(h=>fm(this,void 0,void 0,function*(){yield F4(a,l,h,u,s),d=!0,u=HJ(e,u,l,n)})));return o.add(l.onDidChangeColor(h=>{F4(a,l,h,u,s)})),o.add(e.onDidChangeModelContent(h=>{d?d=!1:(n.hide(),e.focus())})),o}function HJ(i,e,t,r){let n,o;if(t.presentation.textEdit){n=[t.presentation.textEdit],o=new B(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",n),o=i.getModel()._getTrackedRange(s)||o}else n=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),i.pushUndoStop(),i.executeEdits("colorpicker",n);return t.presentation.additionalTextEdits&&(n=[...t.presentation.additionalTextEdits],i.executeEdits("colorpicker",n),r&&r.hide()),i.pushUndoStop(),o}function F4(i,e,t,r,n){return fm(this,void 0,void 0,function*(){let o=yield IN(i,{range:r,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},n.provider,st.None);e.colorPresentations=o||[]})}var OJ,FJ,fm,WN,fv,VN,pm,qN=N(()=>{Ut();Si();aa();ke();et();AN();PN();NJ();PJ();tn();Bt();OJ=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},FJ=function(i,e){return function(t,r){e(t,r,i)}},fm=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},WN=class{constructor(e,t,r,n){this.owner=e,this.range=t,this.model=r,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}},fv=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,r){return Dn.fromPromise(this._computeAsync(e,t,r))}_computeAsync(e,t,r){return fm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];let n=gc.get(this._editor);if(!n)return[];for(let o of t){if(!n.isColorDecoration(o))continue;let s=n.getColorData(o.range.getStartPosition());if(s)return[yield zJ(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return BJ(this,this._editor,this._themeService,t,e)}};fv=OJ([FJ(1,gr)],fv);VN=class{constructor(e,t,r,n){this.owner=e,this.range=t,this.model=r,this.provider=n}},pm=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,r){return fm(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!gc.get(this._editor))return null;let o=yield M4(r,this._editor.getModel(),st.None),s=null,a=null;for(let u of o){let h=u.colorInfo;B.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 zJ(this,this._editor.getModel(),l,c),foundInEditor:d}})}updateEditorModel(e){return fm(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;let t=e.model,r=new B(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield F4(this._editor.getModel(),t,this._color,r,e),r=HJ(this._editor,r,t))})}renderHoverParts(e,t){return BJ(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};pm=OJ([FJ(1,gr)],pm)});var pv,UJ=N(()=>{ke();lt();et();PN();qN();JC();ec();pv=class extends ce{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){let t=this._editor.getOption(145);if(t!=="click"&&t!=="clickAndHover")return;let r=e.target;if(r.type!==6||!r.detail.injectedText||r.detail.injectedText.options.attachedData!==RN||!r.range)return;let n=this._editor.getContribution(_n.ID);if(n&&!n.isColorPickerVisible){let o=new B(r.range.startLineNumber,r.range.startColumn+1,r.range.endLineNumber,r.range.endColumn+1);n.showContentHover(o,1,0,!1,!0)}}};pv.ID="editor.contrib.colorContribution";Ue(pv.ID,pv,2);Bo.register(fv)});var VJ,Ys,jJ,KN,$N,bc,WJ,W_e,z4,GN,qJ=N(()=>{ke();qN();Ht();o8();Ur();Jt();Rt();lt();ei();wt();Go();Br();SN();Bt();R4();VJ=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ys=function(i,e){return function(t,r){e(t,r,i)}},jJ=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},bc=KN=class extends ce{constructor(e,t,r,n,o,s,a){super(),this._editor=e,this._modelService=r,this._keybindingService=n,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=F.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=F.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 z4(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(KN.ID)}};bc.ID="editor.contrib.standaloneColorPickerController";bc=KN=VJ([Ys(1,it),Ys(2,Li),Ys(3,qt),Ys(4,Ke),Ys(5,Se),Ys(6,Pt)],bc);Ue(bc.ID,bc,1);WJ=8,W_e=22,z4=$N=class extends ce{constructor(e,t,r,n,o,s,a,l){var c;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=r,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new Je),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(pm,this._editor),this._position=(c=this._editor._getViewModel())===null||c===void 0?void 0:c.getPrimaryCursorState().modelState.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(ys(this._body));this._register(h.onDidBlur(f=>{this.hide()})),this._register(h.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var m;let g=(m=f.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return $N.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;let e=this._editor.getOption(59).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 jJ(this,void 0,void 0,function*(){let t=yield this._computeAsync(e);t&&this._onResult.fire(new GN(t.result,t.foundInEditor))})}_computeAsync(e){return jJ(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}},r=yield this._standaloneColorPickerParticipant.createColorHover(t,new Bh(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return r?{result:r.colorHover,foundInEditor:r.foundInEditor}:null})}_render(e,t){let r=document.createDocumentFragment(),n=this._register(new n1(this._keybindingService)),o,s={fragment:r,statusBar:n,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(r),o.layout();let a=o.body,l=a.saturationBox.domNode.clientWidth,c=a.domNode.clientWidth-l-W_e-WJ,d=o.body.enterButton;d==null||d.onClicked(()=>{this.updateEditor(),this.hide()});let u=o.header,h=u.pickedColorNode;h.style.width=l+WJ+"px";let f=u.originalColorNode;f.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)}};z4.ID="editor.contrib.standaloneColorPickerWidget";z4=$N=VJ([Ys(3,Ke),Ys(4,Li),Ys(5,qt),Ys(6,Se),Ys(7,Pt)],z4);GN=class{constructor(e,t){this.value=e,this.foundInEditor=t}}});var YN,XN,QN,KJ=N(()=>{lt();He();qJ();ei();Zi();R4();YN=class extends ra{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:b("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:b({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:Me.CommandPalette}]})}runEditorCommand(e,t){var r;(r=bc.get(t))===null||r===void 0||r.showOrFocus()}},XN=class extends de{constructor(){super({id:"editor.action.hideColorPicker",label:b({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:F.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var r;(r=bc.get(t))===null||r===void 0||r.hide()}},QN=class extends de{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:b({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:F.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var r;(r=bc.get(t))===null||r===void 0||r.insertColor()}};ee(XN);ee(QN);Ci(YN)});function $J(i,e){var t;return!!(!((t=i.pasteMimeTypes)===null||t===void 0)&&t.some(r=>e.matches(r)))}var V_e,mm,vc,JN,eR,tR,ZN,Jd,GJ=N(()=>{Bt();pi();Ut();B0();ke();G3();En();F0();ZO();xI();Zm();et();Rt();kI();vu();W0();He();Ym();wt();Ht();Vc();_l();TI();V_e=function(i,e,t,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(n<3?s(o):n>3?s(e,t,o):s(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},mm=function(i,e){return function(t,r){e(t,r,i)}},vc=function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})},eR="editor.changePasteType",tR=new ht("pasteWidgetVisible",!1,b("pasteWidgetVisible","Whether the paste widget is showing")),ZN="application/vnd.code.copyMetadata",Jd=JN=class extends ce{static get(e){return e.getContribution(JN.ID)}constructor(e,t,r,n,o,s,a){super(),this._bulkEditService=r,this._clipboardService=n,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;let l=e.getContainerDomNode();this._register(Lt(l,"copy",c=>this.handleCopy(c))),this._register(Lt(l,"cut",c=>this.handleCopy(c))),this._register(Lt(l,"paste",c=>this.handlePaste(c),!0)),this._pasteProgressManager=this._register(new cp("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(dp,"pasteIntoEditor",e,tR,{id:eR,label:b("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(83).enabled&&!this._editor.getOption(89)}handleCopy(e){var t,r;if(!this._editor.hasTextFocus()||(zv&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;let n=this._editor.getModel(),o=this._editor.getSelections();if(!n||!(o!=null&&o.length))return;let s=this._editor.getOption(36),a=o,l=o.length===1&&o[0].isEmpty();if(l){if(!s)return;a=[new B(a[0].startLineNumber,1,a[0].startLineNumber,1+n.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(n).filter(_=>!!_.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}let f=wI(e.clipboardData),m=h.flatMap(_=>{var E;return(E=_.copyMimeTypes)!==null&&E!==void 0?E:[]}),g=Sd();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:u});let w=Zt(_=>vc(this,void 0,void 0,function*(){let E=un(yield Promise.all(h.map(A=>vc(this,void 0,void 0,function*(){try{return yield A.prepareDocumentPaste(n,a,f,_)}catch(L){console.error(L);return}}))));E.reverse();for(let A of E)for(let[L,O]of A)f.replace(L,O);return f}));(r=this._currentCopyOperation)===null||r===void 0||r.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:w}}handlePaste(e){var t,r;return vc(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 n=this._editor.getModel(),o=this._editor.getSelections();if(!(o!=null&&o.length)||!n||!this.isPasteAsEnabled())return;let s=this.fetchCopyMetadata(e),a=Jx(e.clipboardData);a.delete(ZN);let l=[...e.clipboardData.types,...(r=s==null?void 0:s.providerCopyMimeTypes)!==null&&r!==void 0?r:[],mr.uriList],c=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(d=>{var u;return(u=d.pasteMimeTypes)===null||u===void 0?void 0:u.some(h=>$x(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,r,n){let o=Zt(s=>vc(this,void 0,void 0,function*(){let a=this._editor;if(!a.hasModel())return;let l=a.getModel(),c=new pa(a,3,void 0,s);try{if(yield this.mergeInDataFromCopy(r,n,c.token),c.token.isCancellationRequested)return;let d=e.filter(h=>$J(h,r));if(!d.length||d.length===1&&d[0].id==="text"){yield this.applyDefaultPasteHandler(r,n,c.token);return}let u=yield this.getPasteEdits(d,r,l,t,c.token);if(c.token.isCancellationRequested)return;if(u.length===1&&u[0].providerId==="text"){yield this.applyDefaultPasteHandler(r,n,c.token);return}if(u.length){let h=a.getOption(83).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},h,c.token)}yield this.applyDefaultPasteHandler(r,n,c.token)}finally{c.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),b("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,r,n,o){let s=Zt(a=>vc(this,void 0,void 0,function*(){let l=this._editor;if(!l.hasModel())return;let c=l.getModel(),d=new pa(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(n,o,d.token),d.token.isCancellationRequested)return;let u=t.filter(g=>$J(g,n));e&&(u=u.filter(g=>g.id===e));let h=yield this.getPasteEdits(u,n,c,r,d.token);if(d.token.isCancellationRequested||!h.length)return;let f;if(e)f=h.at(0);else{let g=yield this._quickInputService.pick(h.map(w=>({label:w.label,description:w.providerId,detail:w.detail,edit:w})),{placeHolder:b("pasteAsPickerPlaceholder","Select Paste Action")});f=g==null?void 0:g.edit}if(!f)return;let m=dK(c.uri,r,f);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:b("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(ZN,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;let r=e.clipboardData.getData(ZN);if(r)try{return JSON.parse(r)}catch(s){return}let[n,o]=QO.getTextData(e.clipboardData);if(o)return{defaultPastePayload:{mode:o.mode,multicursorText:(t=o.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!o.isFromEmptySelection}}}mergeInDataFromCopy(e,t,r){var n;return vc(this,void 0,void 0,function*(){if(t!=null&&t.id&&((n=this._currentCopyOperation)===null||n===void 0?void 0:n.handle)===t.id){let o=yield this._currentCopyOperation.dataTransferPromise;if(r.isCancellationRequested)return;for(let[s,a]of o)e.replace(s,a)}if(!e.has(mr.uriList)){let o=yield this._clipboardService.readResources();if(r.isCancellationRequested)return;o.length&&e.append(mr.uriList,z0(Zu.create(o)))}})}getPasteEdits(e,t,r,n,o){return vc(this,void 0,void 0,function*(){let s=yield Uc(Promise.all(e.map(l=>vc(this,void 0,void 0,function*(){var c;try{let d=yield(c=l.provideDocumentPasteEdits)===null||c===void 0?void 0:c.call(l,r,n,t,o);if(d)return Object.assign(Object.assign({},d),{providerId:l.id})}catch(d){console.error(d)}}))),o),a=un(s!=null?s:[]);return i2(a),a})}applyDefaultPasteHandler(e,t,r){var n,o,s;return vc(this,void 0,void 0,function*(){let a=(n=e.get(mr.text))!==null&&n!==void 0?n:e.get("text");if(!a)return;let l=yield a.asString();if(r.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)})}};Jd.ID="editor.contrib.copyPasteActionController";Jd=JN=V_e([mm(1,Ke),mm(2,Wc),mm(3,Ts),mm(4,Se),mm(5,rn),mm(6,iF)],Jd)});var YJ=N(()=>{lt();B_();GJ();bI();He();Ue(Jd.ID,Jd,0);Kc(Zx);We(new class extends Oi{constructor(){super({id:eR,precondition:tR,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var r;return(r=Jd.get(e))===null||r===void 0?void 0:r.changePasteType()}});ee(class extends de{constructor(){super({id:"editor.action.pasteAs",label:b("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:b("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 r;let n=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(r=Jd.get(e))===null||r===void 0?void 0:r.pasteAs(n)}})});var XJ=Xi(iR=>{Si();Fr();Tr();ta();D1();Wi();var q_e=iR&&iR.__awaiter||function(i,e,t,r){function n(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(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};At.registerCommand("_executeDocumentSymbolProvider",function(i,...e){return q_e(this,void 0,void 0,function*(){let[t]=e;zt(yt.isUri(t));let r=i.get(Ih),o=yield i.get(xr).createModelReference(t);try{return(yield r.getOrCreate(o.object.textEditorModel,st.None)).getTopLevelSymbols()}finally{o.dispose()}})})});var rR,QJ=N(()=>{ol();lt();He();rR=class extends de{constructor(){super({id:"editor.action.forceRetokenize",label:b("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;let r=t.getModel();r.tokenization.resetTokenization();let n=new pr;r.tokenization.forceTokenization(r.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}};ee(rR)});var B4,ZJ=N(()=>{Eo();Qre();He();Zi();wt();B4=class i extends Qo{constructor(){super({id:i.ID,title:{value:b({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(it).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",n=!Ck.getTabFocusMode(t);Ck.setTabFocusMode(n,t),n?sr(b("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):sr(b("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};B4.ID="editor.action.toggleTabFocusMode";Ci(B4)});var Rkt,Pkt,Vkt,JJ=N(()=>{r_();tz();cne();ane();mT();yT();CT();kT();LT();YT();tI();UJ();KJ();aI();dI();fI();pI();YJ();MI();b2();cb();EL();Rkt=Wn(AL()),Pkt=Wn(XJ());xA();W0();Qb();OC();jC();JC();L8();F8();Vkt=Wn(H8());j8();l7();h7();b7();v7();P7();W7();G7();oD();sD();uD();Cp();CD();iC();ID();QJ();ZJ();zD();BD();$D();JS();CM();SM();yu();I0()});var eee=N(()=>{});var tee=N(()=>{eee()});var mv,H4,iee=N(()=>{tee();Bt();ke();lt();En();mv=class extends ce{constructor(e){super(),this.editor=e,this.widget=null,Tm&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){let e=!this.editor.getOption(89);!this.widget&&e?this.widget=new H4(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};mv.ID="editor.contrib.iPadShowKeyboard";H4=class i extends ce{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Lt(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Lt(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}}};H4.ID="editor.contrib.ShowKeyboardWidget";Ue(mv.ID,mv,3)});var nR,ree=N(()=>{lt();mz();yu();nk();dne();nR=class extends de{constructor(){super({id:"editor.action.toggleHighContrast",label:vz.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){let r=e.get(iy),n=r.getColorTheme();bu(n.type)?(r.setTheme(this._originalThemeName||(rk(n.type)?wz:yz)),this._originalThemeName=null):(r.setTheme(rk(n.type)?xz:Cz),this._originalThemeName=n.themeName)}};ee(nR)});var DEt,nee=N(()=>{JJ();iee();DEt=Wn(TM());IM();AM();OM();UM();WM();ree();Ds()});var gv={};Gh(gv,{CancellationTokenSource:()=>une,Emitter:()=>hne,KeyCode:()=>fne,KeyMod:()=>pne,MarkerSeverity:()=>_ne,MarkerTag:()=>yne,Position:()=>mne,Range:()=>gne,Selection:()=>bne,SelectionDirection:()=>vne,Token:()=>xne,Uri:()=>wne,editor:()=>wu,languages:()=>wa});var bv=N(()=>{vJ();CJ();AJ();VM();Cne();nee()});var cee=Xi((KEt,lee)=>{var aee="Expected a function",oee=NaN,K_e="[object Symbol]",$_e=/^\s+|\s+$/g,G_e=/^[-+]0x[0-9a-f]+$/i,Y_e=/^0b[01]+$/i,X_e=/^0o[0-7]+$/i,Q_e=parseInt,Z_e=typeof global=="object"&&global&&global.Object===Object&&global,J_e=typeof self=="object"&&self&&self.Object===Object&&self,eye=Z_e||J_e||Function("return this")(),tye=Object.prototype,iye=tye.toString,rye=Math.max,nye=Math.min,oR=function(){return eye.Date.now()};function oye(i,e,t){var r,n,o,s,a,l,c=0,d=!1,u=!1,h=!0;if(typeof i!="function")throw new TypeError(aee);e=see(e)||0,U4(t)&&(d=!!t.leading,u="maxWait"in t,o=u?rye(see(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function f(U){var Y=r,oe=n;return r=n=void 0,c=U,s=i.apply(oe,Y),s}function m(U){return c=U,a=setTimeout(_,e),d?f(U):s}function g(U){var Y=U-l,oe=U-c,te=e-Y;return u?nye(te,o-oe):te}function w(U){var Y=U-l,oe=U-c;return l===void 0||Y>=e||Y<0||u&&oe>=o}function _(){var U=oR();if(w(U))return E(U);a=setTimeout(_,g(U))}function E(U){return a=void 0,h&&r?f(U):(r=n=void 0,s)}function A(){a!==void 0&&clearTimeout(a),c=0,r=l=n=a=void 0}function L(){return a===void 0?s:E(oR())}function O(){var U=oR(),Y=w(U);if(r=arguments,n=this,l=U,Y){if(a===void 0)return m(l);if(u)return a=setTimeout(_,e),f(l)}return a===void 0&&(a=setTimeout(_,e)),s}return O.cancel=A,O.flush=L,O}function sye(i,e,t){var r=!0,n=!0;if(typeof i!="function")throw new TypeError(aee);return U4(t)&&(r="leading"in t?!!t.leading:r,n="trailing"in t?!!t.trailing:n),oye(i,e,{leading:r,maxWait:e,trailing:n})}function U4(i){var e=typeof i;return!!i&&(e=="object"||e=="function")}function aye(i){return!!i&&typeof i=="object"}function lye(i){return typeof i=="symbol"||aye(i)&&iye.call(i)==K_e}function see(i){if(typeof i=="number")return i;if(lye(i))return oee;if(U4(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=U4(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=i.replace($_e,"");var t=Y_e.test(i);return t||X_e.test(i)?Q_e(i.slice(2),t?2:8):G_e.test(i)?oee:+i}lee.exports=sye});var Mee=Xi(($Et,Dee)=>{var cye=1/0,dye="[object Symbol]",uye=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bee="\\ud800-\\udfff",fye="\\u0300-\\u036f\\ufe20-\\ufe23",pye="\\u20d0-\\u20f0",vee="\\u2700-\\u27bf",_ee="a-z\\xdf-\\xf6\\xf8-\\xff",mye="\\xac\\xb1\\xd7\\xf7",gye="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bye="\\u2000-\\u206f",vye=" \\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",yee="A-Z\\xc0-\\xd6\\xd8-\\xde",_ye="\\ufe0e\\ufe0f",wee=mye+gye+bye+vye,sR="['\u2019]",dee="["+wee+"]",xee="["+fye+pye+"]",Cee="\\d+",yye="["+vee+"]",See="["+_ee+"]",kee="[^"+bee+wee+Cee+vee+_ee+yee+"]",wye="\\ud83c[\\udffb-\\udfff]",xye="(?:"+xee+"|"+wye+")",Cye="[^"+bee+"]",Eee="(?:\\ud83c[\\udde6-\\uddff]){2}",Tee="[\\ud800-\\udbff][\\udc00-\\udfff]",gm="["+yee+"]",Sye="\\u200d",uee="(?:"+See+"|"+kee+")",kye="(?:"+gm+"|"+kee+")",hee="(?:"+sR+"(?:d|ll|m|re|s|t|ve))?",fee="(?:"+sR+"(?:D|LL|M|RE|S|T|VE))?",Iee=xye+"?",Lee="["+_ye+"]?",Eye="(?:"+Sye+"(?:"+[Cye,Eee,Tee].join("|")+")"+Lee+Iee+")*",Tye=Lee+Iee+Eye,Iye="(?:"+[yye,Eee,Tee].join("|")+")"+Tye,Lye=RegExp(sR,"g"),Aye=RegExp(xee,"g"),Dye=RegExp([gm+"?"+See+"+"+hee+"(?="+[dee,gm,"$"].join("|")+")",kye+"+"+fee+"(?="+[dee,gm+uee,"$"].join("|")+")",gm+"?"+uee+"+"+hee,gm+"+"+fee,Cee,Iye].join("|"),"g"),Mye=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nye={\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"},Rye=typeof global=="object"&&global&&global.Object===Object&&global,Pye=typeof self=="object"&&self&&self.Object===Object&&self,Oye=Rye||Pye||Function("return this")();function Fye(i,e,t,r){var n=-1,o=i?i.length:0;for(r&&o&&(t=i[++n]);++n<o;)t=e(t,i[n],n,i);return t}function zye(i){return i.match(uye)||[]}function Bye(i){return function(e){return i==null?void 0:i[e]}}var Hye=Bye(Nye);function Uye(i){return Mye.test(i)}function jye(i){return i.match(Dye)||[]}var Wye=Object.prototype,Vye=Wye.toString,pee=Oye.Symbol,mee=pee?pee.prototype:void 0,gee=mee?mee.toString:void 0;function qye(i){if(typeof i=="string")return i;if(Gye(i))return gee?gee.call(i):"";var e=i+"";return e=="0"&&1/i==-cye?"-0":e}function Kye(i){return function(e){return Fye(Qye(Yye(e).replace(Lye,"")),i,"")}}function $ye(i){return!!i&&typeof i=="object"}function Gye(i){return typeof i=="symbol"||$ye(i)&&Vye.call(i)==dye}function Aee(i){return i==null?"":qye(i)}function Yye(i){return i=Aee(i),i&&i.replace(hye,Hye).replace(Aye,"")}var Xye=Kye(function(i,e,t){return i+(t?"-":"")+e.toLowerCase()});function Qye(i,e,t){return i=Aee(i),e=t?void 0:e,e===void 0?Uye(i)?jye(i):zye(i):i.match(e)||[]}Dee.exports=Xye});var aR=Xi(qe=>{"use strict";var hi=qe&&qe.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[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 r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(qe,"__esModule",{value:!0});qe.DeleteLines=qe.SearchReplace=qe.Search=qe.InvertSelection=qe.GotoLine=qe.RotateCursorOnScreen=qe.InsertTabs=qe.RevealToBottomAction=qe.RevealToCenterAction=qe.RevealToTopAction=qe.RevealEditorAction=qe.YankRotate=qe.YankSelectionToRing=qe.Yank=qe.RedoAction=qe.UndoAction=qe.KeyBoardQuit=qe.MoveCursorTop=qe.MoveCursorBottom=qe.MoveCursorWordLeft=qe.MoveCursorWordRight=qe.MoveCursorToLineStart=qe.MoveCursorToLineEnd=qe.MoveCursorRight=qe.MoveCursorLeft=qe.MoveCursorDown=qe.MoveCursorUp=qe.SetMark=qe.InsertLineAfter=qe.InsertLineBelow=qe.KillLines=qe.KillSelection=qe.BaseAction=qe.SOURCE=void 0;var yr=(bv(),Yh(gv));qe.SOURCE="extension.emacs";function Zye(i,e,t,r,n){n===void 0&&(n=1);for(var o="cursor".concat(r==="word"?"Word":"").concat(t).concat(e?"Select":""),s=0;s<n;s++)i.trigger(qe.SOURCE,o,null)}var Gr=function(){function i(){this.description=""}return i}();qe.BaseAction=Gr;var Nee=function(i){hi(e,i);function e(t){var r=i.call(this)||this;return r.trigger=t,r}return e.prototype.run=function(t){t.trigger(qe.SOURCE,this.trigger,{})},e}(Gr),Jye=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelections();s.length&&s.forEach(function(a){var l=t.getModel().getValueInRange(a);r.state.addToRing(l),t.executeEdits(qe.SOURCE,[{range:a,text:""}])})},e}(Gr);qe.KillSelection=Jye;var ewe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.selectionMode=!1;var s=t.getModel(),a=r.getCursorAnchor(),l;if(n===1){var c=s.getLineLength(a.lineNumber),d=a.column===c+1;if(!c||d){o?r.state.growRingTop(s.getEOL()):r.state.addToRing(s.getEOL()),t.trigger(qe.SOURCE,"deleteAllRight",null);return}else l=new yr.Position(a.lineNumber,s.getLineLength(a.lineNumber)+1)}else{var u=s.getLineCount(),h=a.lineNumber+n>u?u:a.lineNumber+n;l=new yr.Position(h,s.getLineLength(h)+1)}var f=yr.Range.fromPositions(a,l);o?r.state.growRingTop(s.getValueInRange(f)):r.state.addToRing(s.getValueInRange(f)),t.executeEdits(qe.SOURCE,[{range:f,text:""}]),t.setSelection(yr.Selection.fromPositions(a,a))},e}(Gr);qe.KillLines=ewe;var twe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getPosition();t.trigger(qe.SOURCE,"editor.action.insertLineAfter",null),t.setPosition(s)},e}(Gr);qe.InsertLineBelow=twe;var iwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){for(var s="",a=0;a<n;a++)s+=t.getModel().getEOL();r.selectionMode=!1;var l=r.getCursorAnchor();t.executeEdits(qe.SOURCE,[{range:yr.Range.fromPositions(l),text:s,forceMoveMarkers:!0}])},e}(Gr);qe.InsertLineAfter=iwe;var rwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=r.selectionMode,a=t.getSelection(),l=a.isEmpty();if(!l){var c=a.getDirection();c===yr.SelectionDirection.LTR?t.setSelection(yr.Selection.fromPositions(a.getEndPosition(),a.getEndPosition())):t.setSelection(yr.Selection.fromPositions(a.getStartPosition(),a.getStartPosition()))}l&&r.selectionMode?r.selectionMode=!1:r.selectionMode=!0},e}(Gr);qe.SetMark=rwe;var eu=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="char",t}return e.prototype.run=function(t,r,n,o){Zye(t,r.selectionMode,this.direction,this.unit,n)},e}(Gr),nwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Up",t}return e}(eu);qe.MoveCursorUp=nwe;var owe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Down",t}return e}(eu);qe.MoveCursorDown=owe;var Ree=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Left",t}return e}(eu);qe.MoveCursorLeft=Ree;var Pee=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Right",t}return e}(eu);qe.MoveCursorRight=Pee;var swe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="End",t}return e}(eu);qe.MoveCursorToLineEnd=swe;var awe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Home",t}return e}(eu);qe.MoveCursorToLineStart=awe;var lwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(Pee);qe.MoveCursorWordRight=lwe;var cwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.unit="word",t}return e}(Ree);qe.MoveCursorWordLeft=cwe;var dwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Bottom",t}return e}(eu);qe.MoveCursorBottom=dwe;var uwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.direction="Top",t}return e}(eu);qe.MoveCursorTop=uwe;var hwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.selectionMode=!1,r.clearState(),t.setPosition(t.getPosition())},e}(Gr);qe.KeyBoardQuit=hwe;var Oee=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){for(var s=0;s<n;s++)t.trigger(qe.SOURCE,this.action,null)},e}(Gr),fwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="undo",t}return e}(Oee);qe.UndoAction=fwe;var pwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.action="redo",t}return e}(Oee);qe.RedoAction=pwe;var mwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=r.state.getFromRing(n);if(s){var a=t.getPosition();t.executeEdits(qe.SOURCE,[{range:yr.Range.fromPositions(a,a),text:s,forceMoveMarkers:!0}])}},e}(Gr);qe.Yank=mwe;var gwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelection();if(!s.isEmpty()){r.state.addToRing(t.getModel().getValueInRange(s)),r.selectionMode=!1;var a=r.getCursorAnchor();t.setSelection(yr.Selection.fromPositions(a,a))}},e}(Gr);qe.YankSelectionToRing=gwe;var bwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=r.state.popFromRing();if(s){var a=r.getCursorAnchor();t.executeEdits(qe.SOURCE,[{range:yr.Range.fromPositions(a),text:s,forceMoveMarkers:!0}])}},e}(Gr);qe.YankRotate=bwe;var j4=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelection();this.revealFunction==="up"?t.trigger(qe.SOURCE,"scrollPageUp",null):t[this.revealFunction](s)},e}(Gr);qe.RevealEditorAction=j4;var vwe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeAtTop",t}return e}(j4);qe.RevealToTopAction=vwe;var _we=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="revealRangeInCenter",t}return e}(j4);qe.RevealToCenterAction=_we;var ywe=function(i){hi(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.revealFunction="up",t}return e}(j4);qe.RevealToBottomAction=ywe;var wwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){for(var s=t.getModel(),a=s.getOptions(),l=a.tabSize,c=a.insertSpaces,d="",u=0;u<n;u++){for(var h="",f=0;f<l;f++)h+=" ";d+=c?h:" "}t.executeEdits(qe.SOURCE,[{range:t.getSelection(),text:d,forceMoveMarkers:!0}])},e}(Gr);qe.InsertTabs=wwe;var xwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getVisibleRanges();if(s.length){for(var a=[],l=1,c=0;c<s.length;c++)for(var d=s[c],u=d.startLineNumber;u<=d.endLineNumber;u++)a.push(u);var h=t.getPosition(),f=Math.ceil(a.length/2),m;h.lineNumber===a[f]?m=new yr.Position(a[0],1):h.lineNumber===a[0]?m=new yr.Position(a[a.length-1],1):m=new yr.Position(a[f],1),t.setPosition(m)}},e}(Gr);qe.RotateCursorOnScreen=xwe;var Cwe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.getBasicInput("Goto Line: ").then(function(s){var a=parseInt(s)||0,l=t.getModel(),c=l.getLineCount();t.focus(),a?a>c&&(a=c):a=1;var d=new yr.Position(a,1),u;if(!r.selectionMode)u=yr.Selection.fromPositions(d);else{var h=t.getSelection();h.getDirection()===yr.SelectionDirection.LTR?u=yr.Selection.fromPositions(h.getStartPosition(),d):u=yr.Selection.fromPositions(h.getEndPosition(),d)}t.setSelection(u),t.revealRangeInCenter(u)}).catch(function(){t.focus()})},e}(Gr);qe.GotoLine=Cwe;var Swe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){var s=t.getSelection();if(!s.isEmpty()){var a;s.getDirection()===yr.SelectionDirection.LTR?a=yr.Selection.fromPositions(s.getEndPosition(),s.getStartPosition()):a=yr.Selection.fromPositions(s.getStartPosition(),s.getEndPosition()),t.setSelection(a)}},e}(Gr);qe.InvertSelection=Swe;var kwe=function(i){hi(e,i);function e(){return i.call(this,"editor.actions.findWithArgs")||this}return e}(Nee);qe.Search=kwe;var Ewe=function(i){hi(e,i);function e(){return i.call(this,"editor.action.startFindReplaceAction")||this}return e}(Nee);qe.SearchReplace=Ewe;var Twe=function(i){hi(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.run=function(t,r,n,o){r.selectionMode=!1;for(var s=0;s<n;s++)t.trigger(qe.SOURCE,"editor.action.deleteLines",null)},e}(Gr);qe.DeleteLines=Twe});var V4=Xi(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.getAllMappings=Yr.unregisterKey=Yr.registerGlobalCommand=Yr.executeCommand=Yr.COMMANDS=Yr.prefixPreservingKeys=void 0;var yi=aR();Yr.prefixPreservingKeys={"M-g":!0,"C-x":!0,"C-q":!0,"C-u":!0};var Fee=new yi.SetMark,W4=new yi.UndoAction,Iwe=new yi.MoveCursorDown,Lwe=new yi.MoveCursorUp,Awe=new yi.MoveCursorRight,Dwe=new yi.MoveCursorLeft;Yr.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":Fee,"S-C-2":Fee,"C-/":W4,"S-C--":W4,"C-z":W4,"C-x u":W4,"C-n":Iwe,"C-p":Lwe,"C-f":Awe,"C-b":Dwe,"S-C-Backspace":new yi.DeleteLines,"M-f":new yi.MoveCursorWordRight,"M-b":new yi.MoveCursorWordLeft,"C-k":new yi.KillLines,"C-m":new yi.InsertLineAfter,"C-w":new yi.KillSelection,"C-o":new yi.InsertLineBelow,"C-g":new yi.KeyBoardQuit,"C-e":new yi.MoveCursorToLineEnd,"C-a":new yi.MoveCursorToLineStart,"C-y":new yi.Yank,"M-w":new yi.YankSelectionToRing,"M-y":new yi.YankRotate,"C-l":new yi.RevealToCenterAction,"C-q Tab":new yi.InsertTabs,"M-r":new yi.RotateCursorOnScreen,"M-g g":new yi.GotoLine,"M-g M-g":new yi.GotoLine,"C-x C-x":new yi.InvertSelection,"S-M-.":new yi.MoveCursorBottom,"S-M-,":new yi.MoveCursorTop,"C-s":new yi.Search,"C-r":new yi.Search,"S-M-5":new yi.SearchReplace};function Mwe(i,e,t,r){var n=i.getEditor(),o=parseInt(t)||1;if(e.run){e.run(n,i,o,r);return}if(typeof e.action=="string")for(var s=0;s<o;s++)n.trigger(yi.SOURCE,e.action,null);else if(Array.isArray(e.action))for(var s=0;s<o;s++)e.action.forEach(function(l){n.trigger(yi.SOURCE,l,null)})}Yr.executeCommand=Mwe;function Nwe(i,e){Yr.COMMANDS[i]=e}Yr.registerGlobalCommand=Nwe;function Rwe(i){Yr.COMMANDS[i]&&delete Yr.COMMANDS[i]}Yr.unregisterKey=Rwe;function Pwe(){var i={};return Object.keys(Yr.COMMANDS).forEach(function(e){i[e]=Yr.COMMANDS[e].description}),i}Yr.getAllMappings=Pwe});var Hee=Xi(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Emitter=Hn.Event=Hn.monacoToEmacsKey=Hn.modifierKeys=void 0;var Owe=(bv(),Yh(gv));Hn.modifierKeys={Alt:"M",Control:"C",Ctrl:"C",Meta:"CMD",Shift:"S"};var zee={Enter:"Return",Space:"SPC",Backslash:"\\",Slash:"/",Backquote:"`",BracketRight:"]",BracketLeft:"[",Comma:",",Period:".",Equal:"=",Minus:"-",Quote:"'",Semicolon:";"},Fwe=["Key","Numpad"],Bee="Arrow";function zwe(i){var e=Owe.KeyCode[i.keyCode];if(Hn.modifierKeys[e])return"";var t=Fwe.some(function(r){return e.startsWith(r)})?e[e.length-1]:e;return e.endsWith(Bee)?t=e.substring(0,e.length-Bee.length):zee[e]&&(t=zee[t]),t.length===1&&(t=t.toLowerCase()),i.altKey&&(t="".concat(Hn.modifierKeys.Alt,"-").concat(t)),i.ctrlKey&&(t="".concat(Hn.modifierKeys.Ctrl,"-").concat(t)),i.metaKey&&(t="".concat(Hn.modifierKeys.Meta,"-").concat(t)),i.shiftKey&&(t="".concat(Hn.modifierKeys.Shift,"-").concat(t)),t}Hn.monacoToEmacsKey=zwe;var Bwe;(function(i){var e={dispose:function(){}};i.None=function(){return e}})(Bwe=Hn.Event||(Hn.Event={}));var Hwe=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 r={dispose:function(){if(!e._disposed){var n=e._listeners.indexOf(t);n<0||e._listeners.splice(n,1)}}};return r}),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}();Hn.Emitter=Hwe});var Uee=Xi(q4=>{"use strict";Object.defineProperty(q4,"__esModule",{value:!0});q4.BasicInputWidget=void 0;var Uwe=(bv(),Yh(gv)),Vo="ext-emacs-basic-input";function jwe(){return` .`.concat(Vo,` { color: #d4d4d4; transition: top 200ms linear; @@ -149,41 +149,41 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .hc-black .`).concat(Vo,` input { color: #ffffff; } -`)}var Wwe=function(){function i(){var e=this;this._pendingPromise=null,this.onKeyDown=function(r){(r.altKey||r.ctrlKey||r.metaKey)&&(r.preventDefault(),r.stopPropagation()),r.which===13?e._pendingPromise&&(r.preventDefault(),e._pendingPromise.resolve(r.target.value),e._pendingPromise=null):r.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",Vo),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=jwe(),(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:Uwe.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(Vo,"-visible")),this._dom.setAttribute("aria-hidden","false"),this._messageDom.textContent=e,this._input.focus()},i.prototype.cleanup=function(){this._dom.classList.remove("".concat(Vo,"-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(r,n){t._pendingPromise={resolve:function(o){r(o),t.cleanup()},reject:function(){n(),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}();q4.BasicInputWidget=Wwe});var jee=Xi(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.State=_c.EAT_UP_KEY=void 0;var Uee=V4();_c.EAT_UP_KEY="==-==";var Vwe=function(){function i(){this._inargumentMode=!1,this._killRing=[]}return i.prototype.updateAndGetKey=function(e){return e==="C-g"&&(this._inargumentMode||this._prefixKey)?(this.resetState(),_c.EAT_UP_KEY):this.updateCuMode(e)?_c.EAT_UP_KEY:this._prefixKey?"".concat(this._prefixKey," ").concat(e):Uee.prefixPreservingKeys[e]?(this._prefixKey=e,_c.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(Uee.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}();_c.State=Vwe});var $ee=Xi(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.getConfiguration=bm.EmacsExtension=void 0;var Hh=(bv(),Yh(gv)),qwe=lee(),K4=Dee(),Wee=V4(),aR=Bee(),Kwe=Hee(),Vee=jee(),qee=Hh.editor,lR=qee.TextEditorCursorBlinkingStyle,cR=qee.TextEditorCursorStyle,$we=function(){function i(e){this._disposables=[],this._inSelectionMode=!1,this._changeDisposable=null,this._state=new Vee.State,this._onDidMarkChange=new aR.Emitter,this.onDidMarkChange=this._onDidMarkChange.event,this._onDidChangeKey=new aR.Emitter,this.onDidChangeKey=this._onDidChangeKey.event,this._editor=e;var t=Kee(e);this._intialCursorType=t.cursorStyle,this._intialCursorBlinking=t.cursorBlinking,this._basicInputWidget=new Kwe.BasicInputWidget}return i.prototype.start=function(){this._disposables.length||(this.addListeners(),this._editor.updateOptions({cursorStyle:K4(cR[cR.Block]),cursorBlinking:K4(lR[lR.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=qwe(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,aR.monacoToEmacsKey)(e);if(t){if(t=this._state.updateAndGetKey(t),this._onDidChangeKey.fire(this._state.getReadableState()),t===Vee.EAT_UP_KEY){this._onDidChangeKey.fire(this._state.getReadableState()),this.cancelKey(e);return}var r=Wee.COMMANDS[t];if(!r){this._onDidChangeKey.fire(this._state.getReadableState()),this._state.setLastCommandKey(t);return}this.cancelKey(e);var n=this._state.isLastCommandKey(t);(0,Wee.executeCommand)(this,r,this._state.getInputBuffer(),n),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 r=this._editor.getVisibleRanges();if(r.length){var n,o=this._editor.getSelection();t.top<0?n=new Hh.Position(r[0].getStartPosition().lineNumber,1):t.top>e&&(n=new Hh.Position(r[r.length-1].getEndPosition().lineNumber,1)),this._inSelectionMode?this._editor.setSelection(Hh.Selection.fromPositions(o.getStartPosition(),n)):this._editor.setPosition(n)}}},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===Hh.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}();bm.EmacsExtension=$we;function Kee(i){var e=i.getOption(Hh.editor.EditorOption.cursorStyle),t=i.getOption(Hh.editor.EditorOption.cursorBlinking);return{cursorStyle:K4(cR[e]),cursorBlinking:K4(lR[t])}}bm.getConfiguration=Kee});var Yee=Xi(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.Actions=qo.EmacsExtension=qo.unregisterKey=qo.getAllMappings=qo.registerGlobalCommand=void 0;var Gee=$ee();Object.defineProperty(qo,"EmacsExtension",{enumerable:!0,get:function(){return Gee.EmacsExtension}});var dR=V4();Object.defineProperty(qo,"registerGlobalCommand",{enumerable:!0,get:function(){return dR.registerGlobalCommand}});Object.defineProperty(qo,"getAllMappings",{enumerable:!0,get:function(){return dR.getAllMappings}});Object.defineProperty(qo,"unregisterKey",{enumerable:!0,get:function(){return dR.unregisterKey}});var Gwe=sR();qo.Actions=Gwe;qo.default=Gee.EmacsExtension});var fie=Xi((hie,h9)=>{(function(i){if(typeof hie=="object"&&typeof h9!="undefined")h9.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 r(n,o,s){function a(d,u){if(!o[d]){if(!n[d]){var h=typeof su=="function"&&su;if(!u&&h)return h(d,!0);if(l)return l(d,!0);var f=new Error("Cannot find module '"+d+"'");throw f.code="MODULE_NOT_FOUND",f}var m=o[d]={exports:{}};n[d][0].call(m.exports,function(g){var w=n[d][1][g];return a(w||g)},m,m.exports,r,n,o,s)}return o[d].exports}for(var l=typeof su=="function"&&su,c=0;c<s.length;c++)a(s[c]);return a}return r}()({1:[function(r,n,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var s=function(){function f(m,g){for(var w=0;w<g.length;w++){var _=g[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}return function(m,g,w){return g&&f(m.prototype,g),w&&f(m,w),m}}();function a(f,m,g){return m in f?Object.defineProperty(f,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):f[m]=g,f}function l(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}var c={width:"100%",height:"100%"},d=function(m){return Number(m)===Number(m)},u="classList"in document.documentElement?function(f,m){f.classList.add(m)}:function(f,m){var g=f.getAttribute("class")||"";f.setAttribute("class",g+" "+m)},h=function(){s(f,null,[{key:"create",value:function(g,w){return new f(g,w)}},{key:"mergeStyle",value:function(g,w){for(var _ in w)g.style[_]!==w[_]&&(g.style[_]=w[_])}},{key:"getMaxBrowserHeight",value:function(){var g=document.createElement("div"),w=document.createElement("div");f.mergeStyle(g,{position:"absolute",height:"1px",opacity:0}),f.mergeStyle(w,{height:"1e7px"}),g.appendChild(w),document.body.appendChild(g);var _=w.offsetHeight;return document.body.removeChild(g),_}}]);function f(m,g){var w=this;l(this,f),this._config={},this._lastRepaint=null,this._maxElementHeight=f.getMaxBrowserHeight(),this.refresh(m,g);var _=this._config,E=function A(){var L=w._getScrollPosition(),O=w._lastRepaint;if(w._renderAnimationFrame=window.requestAnimationFrame(A),L!==O){var U=O?L-O:0;if(!O||U<0||U>w._averageHeight){var Y=w._renderChunk();w._lastRepaint=L,Y!==!1&&typeof _.afterRender=="function"&&_.afterRender()}}};E()}return s(f,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(g,w){var _;if(Object.assign(this._config,c,w),!g||g.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=g;var E=this._config,A=this._scroller||E.scroller||document.createElement(E.scrollerTagName||"tr");if(typeof E.useFragment!="boolean"&&(this._config.useFragment=!0),!E.generate)throw new Error("Missing required `generate` function");if(!d(E.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(E.itemHeight)&&!d(E.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(E.itemHeight)?this._itemHeights=Array(E.total).fill(E.itemHeight):this._itemHeights=E.itemHeight,Object.keys(c).filter(function(dt){return dt in E}).forEach(function(dt){var be=E[dt],we=d(be);if(be&&typeof be!="string"&&typeof be!="number"){var X="Invalid optional `"+dt+"`, expected string or number";throw new Error(X)}else we&&(E[dt]=be+"px")});var L=!!E.horizontal,O=E[L?"width":"height"];if(O){var U=d(O),Y=U?!1:O.slice(-1)==="%",oe=U?O:parseInt(O.replace(/px|%/,""),10),te=window[L?"innerWidth":"innerHeight"];Y?this._containerSize=te*oe/100:this._containerSize=d(O)?O:oe}var Z=E.scrollContainer,ve=E.itemHeight*E.total,Pe=this._maxElementHeight;ve>Pe&&console.warn(["HyperList: The maximum element height",Pe+"px has","been exceeded; please reduce your item height."].join(" "));var Ee={width:""+E.width,height:Z?ve+"px":""+E.height,overflow:Z?"none":"auto",position:"relative"};f.mergeStyle(g,Ee),Z&&f.mergeStyle(E.scrollContainer,{overflow:"auto"});var Oe=(_={opacity:"0",position:"absolute"},a(_,L?"height":"width","1px"),a(_,L?"width":"height",ve+"px"),_);f.mergeStyle(A,Oe),this._scroller||g.appendChild(A);var Xe=this._computeScrollPadding();this._scrollPaddingBottom=Xe.bottom,this._scrollPaddingTop=Xe.top,this._scroller=A,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(E.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof E.afterRender=="function"&&E.afterRender()}},{key:"_getRow",value:function(g){var w=this._config,_=w.generate(g),E=_.height;if(E!==void 0&&d(E)?(_=_.element,E!==this._itemHeights[g]&&(this._itemHeights[g]=E,this._computePositions(g),this._scrollHeight=this._computeScrollHeight(g))):E=this._itemHeights[g],!_||_.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+g);u(_,w.rowClassName||"vrow");var A=this._itemPositions[g]+this._scrollPaddingTop;return f.mergeStyle(_,a({position:"absolute"},w.horizontal?"left":"top",A+"px")),_}},{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 w=this._config,_=this._element,E=this._getScrollPosition(),A=w.total,L=w.reverse?this._getReverseFrom(E):this._getFrom(E)-1;if((L<0||L-this._screenItemsLen<0)&&(L=0),!g&&this._lastFrom===L)return!1;this._lastFrom=L;var O=L+this._cachedItemsLen;(O>A||O+this._cachedItemsLen>A)&&(O=A);var U=w.useFragment?document.createDocumentFragment():[],Y=this._scroller;U[w.useFragment?"appendChild":"push"](Y);for(var oe=L;oe<O;oe++){var te=this._getRow(oe);U[w.useFragment?"appendChild":"push"](te)}if(w.applyPatch)return w.applyPatch(_,U);_.innerHTML="",_.appendChild(U)}},{key:"_computePositions",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,w=this._config,_=w.total,E=w.reverse;g<1&&!E&&(g=1);for(var A=g;A<_;A++)E?A===0?this._itemPositions[0]=this._scrollHeight-this._itemHeights[0]:this._itemPositions[A]=this._itemPositions[A-1]-this._itemHeights[A]:this._itemPositions[A]=this._itemHeights[A-1]+this._itemPositions[A-1]}},{key:"_computeScrollHeight",value:function(){var g,w=this,_=this._config,E=!!_.horizontal,A=_.total,L=this._itemHeights.reduce(function(ve,Pe){return ve+Pe},0)+this._scrollPaddingBottom+this._scrollPaddingTop;f.mergeStyle(this._scroller,(g={opacity:0,position:"absolute",top:"0px"},a(g,E?"height":"width","1px"),a(g,E?"width":"height",L+"px"),g));var O=this._itemHeights.slice(0).sort(function(ve,Pe){return ve-Pe}),U=Math.floor(A/2),Y=A%2===0?(O[U]+O[U-1])/2:O[U],oe=E?"clientWidth":"clientHeight",te=_.scrollContainer?_.scrollContainer:this._element,Z=te[oe]?te[oe]:this._containerSize;return this._screenItemsLen=Math.ceil(Z/Y),this._containerSize=Z,this._cachedItemsLen=Math.max(this._cachedItemsLen||0,this._screenItemsLen*3),this._averageHeight=Y,_.reverse&&window.requestAnimationFrame(function(){E?w._element.scrollLeft=L:w._element.scrollTop=L}),L}},{key:"_computeScrollPadding",value:function(){var g=this._config,w=!!g.horizontal,_=g.reverse,E=window.getComputedStyle(this._element),A=function(O){var U=E.getPropertyValue("padding-"+O);return parseInt(U,10)||0};return w&&_?{bottom:A("left"),top:A("right")}:w?{bottom:A("right"),top:A("left")}:_?{bottom:A("top"),top:A("bottom")}:{bottom:A("bottom"),top:A("top")}}},{key:"_getFrom",value:function(g){for(var w=0;this._itemPositions[w]<g;)w++;return w}},{key:"_getReverseFrom",value:function(g){for(var w=this._config.total-1;w>0&&this._itemPositions[w]<g+this._containerSize;)w--;return w}}]),f}();o.default=h,n.exports=o.default},{}]},{},[1])(1)})});var yie=Xi((_ie,_3)=>{(function(i,e){"use strict";function t(){r.width=i.innerWidth,r.height=5*c.barThickness;var u=r.getContext("2d");u.shadowBlur=c.shadowBlur,u.shadowColor=c.shadowColor;var h,f=u.createLinearGradient(0,0,r.width,0);for(h in c.barColors)f.addColorStop(h,c.barColors[h]);u.lineWidth=c.barThickness,u.beginPath(),u.moveTo(0,c.barThickness/2),u.lineTo(Math.ceil(n*r.width),c.barThickness/2),u.strokeStyle=f,u.stroke()}var r,n,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,f;o||(u?l=l||setTimeout(()=>d.show(),u):(o=!0,a!==null&&i.cancelAnimationFrame(a),r||((f=(r=e.createElement("canvas")).style).position="fixed",f.top=f.left=f.right=f.margin=f.padding=0,f.zIndex=100001,f.display="none",c.className&&r.classList.add(c.className),e.body.appendChild(r),h="resize",u=t,(f=i).addEventListener?f.addEventListener(h,u,!1):f.attachEvent?f.attachEvent("on"+h,u):f["on"+h]=u),r.style.opacity=1,r.style.display="block",d.progress(0),c.autoRun&&function m(){s=i.requestAnimationFrame(m),d.progress("+"+.05*Math.pow(1-Math.sqrt(n),2))}()))},progress:function(u){return u===void 0||(typeof u=="string"&&(u=(0<=u.indexOf("+")||0<=u.indexOf("-")?n:0)+parseFloat(u)),n=1<u?1:u,t()),n},hide:function(){clearTimeout(l),l=null,o&&(o=!1,s!=null&&(i.cancelAnimationFrame(s),s=null),function u(){return 1<=d.progress("+.1")&&(r.style.opacity-=.05,r.style.opacity<=.05)?(r.style.display="none",void(a=null)):void(a=i.requestAnimationFrame(u))}())}};typeof _3=="object"&&typeof _3.exports=="object"?_3.exports=d:typeof define=="function"&&define.amd?define(function(){return d}):this.topbar=d}).call(_ie,window,document)});(function(){var i=e();function e(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function n(o,s){s=s||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(o,s.bubbles,s.cancelable,s.detail),a}return n.prototype=window.Event.prototype,n}function t(n,o){var s=document.createElement("input");return s.type="hidden",s.name=n,s.value=o,s}function r(n,o){var s=n.getAttribute("data-to"),a=t("_method",n.getAttribute("data-method")),l=t("_csrf_token",n.getAttribute("data-csrf")),c=document.createElement("form"),d=document.createElement("input"),u=n.getAttribute("target");c.method=n.getAttribute("data-method")==="get"?"get":"post",c.action=s,c.style.display="none",u?c.target=u:o&&(c.target="_blank"),c.appendChild(l),c.appendChild(a),document.body.appendChild(c),d.type="submit",c.appendChild(d),d.click()}window.addEventListener("click",function(n){var o=n.target;if(!n.defaultPrevented)for(;o&&o.getAttribute;){var s=new i("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!o.dispatchEvent(s))return n.preventDefault(),n.stopImmediatePropagation(),!1;if(o.getAttribute("data-method"))return r(o,n.metaKey||n.shiftKey),n.preventDefault(),!1;o=o.parentNode}},!1),window.addEventListener("phoenix.link.click",function(n){var o=n.target.getAttribute("data-confirm");o&&!window.confirm(o)&&n.preventDefault()},!1)})();var dg=i=>typeof i=="function"?i:function(){return i},Sne=typeof self!="undefined"?self:null,cg=typeof window!="undefined"?window:null,ug=Sne||cg||ug,kne="2.0.0",xa={connecting:0,open:1,closing:2,closed:3},Ene=1e4,Tne=1e3,Mo={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},El={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Ok={longpoll:"longpoll",websocket:"websocket"},Ine={complete:4},ny=class{constructor(i,e,t,r){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=r,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(r=>r.status===i).forEach(r=>r.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})}},Cz=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))}},Lne=class{constructor(i,e,t){this.state=Mo.closed,this.topic=i,this.params=dg(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ny(this,El.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Cz(()=>{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=Mo.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Mo.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=Mo.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=Mo.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 ny(this,El.leave,dg({}),this.timeout).send(),this.state=Mo.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(El.reply,(r,n)=>{this.trigger(this.replyEventName(n),r)})}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(El.close,i)}onError(i){return this.on(El.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 r=new ny(this,i,function(){return e},t);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Mo.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(El.close,"leave")},t=new ny(this,El.leave,dg({}),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,r){return this.topic!==i?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Mo.joining,this.joinPush.resend(i))}trigger(i,e,t,r){let n=this.onMessage(i,e,t,r);if(e&&!n)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<o.length;s++)o[s].callback(n,t,r||this.joinRef())}replyEventName(i){return`chan_reply_${i}`}isClosed(){return this.state===Mo.closed}isErrored(){return this.state===Mo.errored}isJoined(){return this.state===Mo.joined}isJoining(){return this.state===Mo.joining}isLeaving(){return this.state===Mo.leaving}},sy=class{static request(i,e,t,r,n,o,s){if(ug.XDomainRequest){let a=new ug.XDomainRequest;return this.xdomainRequest(a,i,e,r,n,o,s)}else{let a=new ug.XMLHttpRequest;return this.xhrRequest(a,i,e,t,r,n,o,s)}}static xdomainRequest(i,e,t,r,n,o,s){return i.timeout=n,i.open(e,t),i.onload=()=>{let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(r),i}static xhrRequest(i,e,t,r,n,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",r),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===Ine.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(n),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 r in i){if(!Object.prototype.hasOwnProperty.call(i,r))continue;let n=e?`${e}[${r}]`:r,o=i[r];typeof o=="object"?t.push(this.serialize(o,n)):t.push(encodeURIComponent(n)+"="+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)}`}},Ane=i=>{let e="",t=new Uint8Array(i),r=t.byteLength;for(let n=0;n<r;n++)e+=String.fromCharCode(t[n]);return btoa(e)},Pk=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=xa.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Ok.websocket),"$1/"+Ok.longpoll)}endpointURL(){return sy.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=xa.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===xa.open||this.readyState===xa.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),i=>{if(i){var{status:e,token:t,messages:r}=i;this.token=t}else e=0;switch(e){case 200:r.forEach(n=>{setTimeout(()=>this.onmessage({data:n}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=xa.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=Ane(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 n of this.reqs)n.abort();this.readyState=xa.closed;let r=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",r)):this.onclose(r)}ajax(i,e,t,r,n){let o,s=()=>{this.reqs.delete(o),r()};o=sy.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&n(a)}),this.reqs.add(o)}};var oy={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,r,n,o,s]=JSON.parse(i);return e({join_ref:t,ref:r,topic:n,event:o,payload:s})}},binaryEncode(i){let{join_ref:e,ref:t,event:r,topic:n,payload:o}=i,s=this.META_LENGTH+e.length+t.length+n.length+r.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++,n.length),l.setUint8(c++,r.length),Array.from(e,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(t,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(n,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(r,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),r=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(i,e,r);case this.KINDS.reply:return this.decodeReply(i,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(i,e,r)}},decodePush(i,e,t){let r=e.getUint8(1),n=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=t.decode(i.slice(s,s+r));s=s+r;let l=t.decode(i.slice(s,s+n));s=s+n;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 r=e.getUint8(1),n=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+r));a=a+r;let c=t.decode(i.slice(a,a+n));a=a+n;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),f={status:u,response:h};return{join_ref:l,ref:c,topic:d,event:El.reply,payload:f}},decodeBroadcast(i,e,t){let r=e.getUint8(1),n=e.getUint8(2),o=this.HEADER_LENGTH+2,s=t.decode(i.slice(o,o+r));o=o+r;let a=t.decode(i.slice(o,o+n));o=o+n;let l=i.slice(o,i.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},ay=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||Ene,this.transport=e.transport||ug.WebSocket||Pk,this.establishedConnections=0,this.defaultEncoder=oy.encode.bind(oy),this.defaultDecoder=oy.decode.bind(oy),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==Pk?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;cg&&cg.addEventListener&&(cg.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),t=this.connectClock)}),cg.addEventListener("pageshow",r=>{t===this.connectClock&&(t=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=r=>e.rejoinAfterMs?e.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>e.reconnectAfterMs?e.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=dg(e.params||{}),this.endPoint=`${i}/${Ok.websocket}`,this.vsn=e.vsn||kne,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Cz(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return Pk}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=sy.appendParams(sy.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=dg(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 r=this.onMessage(n=>{n.ref===e&&(this.off([r]),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(),Tne,"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===xa.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(([,r])=>{r(i,e,t)}),(e===this.transport||t>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(i=>{i.isErrored()||i.isLeaving()||i.isClosed()||i.trigger(El.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case xa.connecting:return"connecting";case xa.open:return"open";case xa.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 Lne(i,e,this);return this.channels.push(t),t}push(i){if(this.hasLogger()){let{topic:e,event:t,payload:r,ref:n,join_ref:o}=i;this.log("push",`${e} ${t} (${o}, ${n})`,r)}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:r,payload:n,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",`${n.status||""} ${t} ${r} ${o&&"("+o+")"||""}`,n);for(let a=0;a<this.channels.length;a++){let l=this.channels[a];l.isMember(t,r,n,s)&&l.trigger(r,n,o,s)}for(let a=0;a<this.stateChangeCallbacks.message.length;a++){let[,l]=this.stateChangeCallbacks.message[a];l(e)}})}leaveOpenTopic(i){let e=this.channels.find(t=>t.topic===i&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),e.leave())}};var Gz="consecutive-reloads",Dne=10,Mne=5e3,Nne=1e4,Rne=3e4,Yz=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Il="data-phx-component",Fk="data-phx-link",Pne="track-static",One="data-phx-link-state",rs="data-phx-ref",xu="data-phx-ref-src",Xz="track-uploads",Yc="data-phx-upload-ref",Xk="data-phx-preflighted-refs",Fne="data-phx-done-refs",Sz="drop-target",$k="data-phx-active-refs",yy="phx:live-file:updated",Qz="data-phx-skip",Zz="data-phx-id",kz="data-phx-prune",Ez="page-loading",Tz="phx-connected",hg="phx-loading",zk="phx-no-feedback",ly="phx-error",Iz="phx-client-error",Bk="phx-server-error",kf="data-phx-parent-id",Qk="data-phx-main",wg="data-phx-root-id",Jz="viewport-top",eB="viewport-bottom",zne="trigger-action",xy="feedback-for",Gk="phx-has-focused",Bne=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],tB=["checkbox","radio"],Cy="phx-has-submitted",Xc="data-phx-session",Tf=`[${Xc}]`,Lz="data-phx-sticky",_g="data-phx-static",Hk="data-phx-readonly",cy="data-phx-disabled",Yk="disable-with",dy="data-phx-disable-with-restore",fg="hook",Hne="debounce",Une="throttle",Sy="update",uy="stream",pg="data-phx-stream",jne="key",Ca="phxPrivate",Az="auto-recover",hy="phx:live-socket:debug",Uk="phx:live-socket:profiling",jk="phx:live-socket:latency-sim",Wne="progress",Dz="mounted",Vne=1,qne=200,Kne="phx-",$ne=3e4,mg="debounce-trigger",fy="throttled",Mz="debounce-prev-key",Gne={debounce:300,throttle:300},py="d",Sa="s",Wk="r",No="c",Nz="e",Rz="r",Pz="t",Yne="p",Oz="stream",Xne=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.uploadChannel.leave(),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 Ro("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))}},Ro=(i,e)=>console.error&&console.error(i,e),Tl=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Qne(){let i=new Set,e=document.querySelectorAll("*[id]");for(let t=0,r=e.length;t<r;t++)i.has(e[t].id)?console.error(`Multiple IDs detected: ${e[t].id}. Ensure unique element ids.`):i.add(e[t].id)}var Zne=(i,e,t,r)=>{i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,r)},Vk=i=>typeof i=="function"?i:function(){return i},wy=i=>JSON.parse(JSON.stringify(i)),yg=(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(Tf)));return null},gg=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),Jne=(i,e)=>JSON.stringify(i)===JSON.stringify(e),Fz=i=>{for(let e in i)return!1;return!0},Gc=(i,e)=>i&&e(i),eoe=function(i,e,t,r){i.forEach(n=>{new Xne(n,t.config.chunk_size,r).upload()})},iB={canPushState(){return typeof history.pushState!="undefined"},dropLocal(i,e,t){return i.removeItem(this.localKey(e,t))},updateLocal(i,e,t,r,n){let o=this.getLocal(i,e,t),s=this.localKey(e,t),a=o===null?r:n(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 n=history.state||{};n.scroll=e.scroll,history.replaceState(n,"",window.location.href)}delete e.scroll,history[i+"State"](e,"",t||null);let r=this.getHashTargetEl(window.location.hash);r?r.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&&iB.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}"]`)}},ka=iB,is={byId(i){return document.getElementById(i)||Ro(`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 r=Array.from(i.querySelectorAll(e));return t?r.forEach(t):r},childNodeLength(i){let e=document.createElement("template");return e.innerHTML=i,e.content.childElementCount},isUploadInput(i){return i.type==="file"&&i.getAttribute(Yc)!==null},isAutoUpload(i){return i.hasAttribute("data-phx-auto-upload")},findUploadInputs(i){return this.all(i,`input[type="file"][${Yc}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Il}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&is.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"),r=i.target.hasAttribute("target")&&i.target.getAttribute("target").toLowerCase()==="_blank";return e||r||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,r;if(i.defaultPrevented||t===null||this.wantsNewTab(i)||t.startsWith("mailto:")||t.startsWith("tel:")||i.target.isContentEditable)return!1;try{r=new URL(t)}catch(n){try{r=new URL(t,e)}catch(o){return!0}}return r.host===e.host&&r.protocol===e.protocol&&r.pathname===e.pathname&&r.search===e.search?r.hash===""&&!r.href.endsWith("#"):r.protocol.startsWith("http")},markPhxChildDestroyed(i){this.isPhxChild(i)&&i.setAttribute(Xc,""),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,`[${Lz}]`)},findPhxChildren(i,e){return this.all(i,`${Tf}[${kf}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),r=e.reduce((n,o)=>{let s=`[${Il}="${o}"] [${Il}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Il))).forEach(a=>n.delete(a)),n},t);return r.size===0?new Set(e):r},filterWithinSameLiveView(i,e){return e.querySelector(Tf)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(Xc)!==null)return!1}},private(i,e){return i[Ca]&&i[Ca][e]},deletePrivate(i,e){i[Ca]&&delete i[Ca][e]},putPrivate(i,e,t){i[Ca]||(i[Ca]={}),i[Ca][e]=t},updatePrivate(i,e,t,r){let n=this.private(i,e);n===void 0?this.putPrivate(i,e,r(t)):this.putPrivate(i,e,r(n))},copyPrivates(i,e){e[Ca]&&(i[Ca]=e[Ca])},putTitle(i){let e=document.querySelector("title");if(e){let{prefix:t,suffix:r}=e.dataset;document.title=`${t||""}${i}${r||""}`}else document.title=i},debounce(i,e,t,r,n,o,s,a){let l=i.getAttribute(t),c=i.getAttribute(n);l===""&&(l=r),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,fy):a(),f=this.incCycle(i,mg,h);if(isNaN(u))return Ro(`invalid throttle/debounce value: ${d}`);if(c){let g=!1;if(e.type==="keydown"){let w=this.private(i,Mz);this.putPrivate(i,Mz,e.key),g=w!==e.key}if(!g&&this.private(i,fy))return!1;a(),this.putPrivate(i,fy,!0),setTimeout(()=>{s()&&this.triggerCycle(i,mg)},u)}else setTimeout(()=>{s()&&this.triggerCycle(i,mg,f)},u);let m=i.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([g])=>{let w=m.querySelector(`[name="${g}"]`);this.incCycle(w,mg),this.deletePrivate(w,fy)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,mg))}},triggerCycle(i,e,t){let[r,n]=this.private(i,e);t||(t=r),t===r&&(this.incCycle(i,e),n())},once(i,e){return this.private(i,e)===!0?!1:(this.putPrivate(i,e,!0),!0)},incCycle(i,e,t=function(){}){let[r]=this.private(i,e)||[0,t];return r++,this.putPrivate(i,e,[r,t]),r},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,Gk)||this.private(e,Cy))){let r=[e.name];e.name.endsWith("[]")&&r.push(e.name.slice(0,-2));let n=r.map(o=>`[${t}="${o}"]`).join(", ");is.all(i,n,o=>o.classList.add(zk))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let r=`[${e}="${t.id}"], +`)}var Wwe=function(){function i(){var e=this;this._pendingPromise=null,this.onKeyDown=function(r){(r.altKey||r.ctrlKey||r.metaKey)&&(r.preventDefault(),r.stopPropagation()),r.which===13?e._pendingPromise&&(r.preventDefault(),e._pendingPromise.resolve(r.target.value),e._pendingPromise=null):r.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",Vo),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=jwe(),(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:Uwe.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(Vo,"-visible")),this._dom.setAttribute("aria-hidden","false"),this._messageDom.textContent=e,this._input.focus()},i.prototype.cleanup=function(){this._dom.classList.remove("".concat(Vo,"-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(r,n){t._pendingPromise={resolve:function(o){r(o),t.cleanup()},reject:function(){n(),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}();q4.BasicInputWidget=Wwe});var Wee=Xi(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.State=_c.EAT_UP_KEY=void 0;var jee=V4();_c.EAT_UP_KEY="==-==";var Vwe=function(){function i(){this._inargumentMode=!1,this._killRing=[]}return i.prototype.updateAndGetKey=function(e){return e==="C-g"&&(this._inargumentMode||this._prefixKey)?(this.resetState(),_c.EAT_UP_KEY):this.updateCuMode(e)?_c.EAT_UP_KEY:this._prefixKey?"".concat(this._prefixKey," ").concat(e):jee.prefixPreservingKeys[e]?(this._prefixKey=e,_c.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(jee.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}();_c.State=Vwe});var Gee=Xi(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.getConfiguration=bm.EmacsExtension=void 0;var Hh=(bv(),Yh(gv)),qwe=cee(),K4=Mee(),Vee=V4(),lR=Hee(),Kwe=Uee(),qee=Wee(),Kee=Hh.editor,cR=Kee.TextEditorCursorBlinkingStyle,dR=Kee.TextEditorCursorStyle,$we=function(){function i(e){this._disposables=[],this._inSelectionMode=!1,this._changeDisposable=null,this._state=new qee.State,this._onDidMarkChange=new lR.Emitter,this.onDidMarkChange=this._onDidMarkChange.event,this._onDidChangeKey=new lR.Emitter,this.onDidChangeKey=this._onDidChangeKey.event,this._editor=e;var t=$ee(e);this._intialCursorType=t.cursorStyle,this._intialCursorBlinking=t.cursorBlinking,this._basicInputWidget=new Kwe.BasicInputWidget}return i.prototype.start=function(){this._disposables.length||(this.addListeners(),this._editor.updateOptions({cursorStyle:K4(dR[dR.Block]),cursorBlinking:K4(cR[cR.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=qwe(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,lR.monacoToEmacsKey)(e);if(t){if(t=this._state.updateAndGetKey(t),this._onDidChangeKey.fire(this._state.getReadableState()),t===qee.EAT_UP_KEY){this._onDidChangeKey.fire(this._state.getReadableState()),this.cancelKey(e);return}var r=Vee.COMMANDS[t];if(!r){this._onDidChangeKey.fire(this._state.getReadableState()),this._state.setLastCommandKey(t);return}this.cancelKey(e);var n=this._state.isLastCommandKey(t);(0,Vee.executeCommand)(this,r,this._state.getInputBuffer(),n),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 r=this._editor.getVisibleRanges();if(r.length){var n,o=this._editor.getSelection();t.top<0?n=new Hh.Position(r[0].getStartPosition().lineNumber,1):t.top>e&&(n=new Hh.Position(r[r.length-1].getEndPosition().lineNumber,1)),this._inSelectionMode?this._editor.setSelection(Hh.Selection.fromPositions(o.getStartPosition(),n)):this._editor.setPosition(n)}}},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===Hh.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}();bm.EmacsExtension=$we;function $ee(i){var e=i.getOption(Hh.editor.EditorOption.cursorStyle),t=i.getOption(Hh.editor.EditorOption.cursorBlinking);return{cursorStyle:K4(dR[e]),cursorBlinking:K4(cR[t])}}bm.getConfiguration=$ee});var Xee=Xi(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.Actions=qo.EmacsExtension=qo.unregisterKey=qo.getAllMappings=qo.registerGlobalCommand=void 0;var Yee=Gee();Object.defineProperty(qo,"EmacsExtension",{enumerable:!0,get:function(){return Yee.EmacsExtension}});var uR=V4();Object.defineProperty(qo,"registerGlobalCommand",{enumerable:!0,get:function(){return uR.registerGlobalCommand}});Object.defineProperty(qo,"getAllMappings",{enumerable:!0,get:function(){return uR.getAllMappings}});Object.defineProperty(qo,"unregisterKey",{enumerable:!0,get:function(){return uR.unregisterKey}});var Gwe=aR();qo.Actions=Gwe;qo.default=Yee.EmacsExtension});var fie=Xi((hie,f9)=>{(function(i){if(typeof hie=="object"&&typeof f9!="undefined")f9.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 r(n,o,s){function a(d,u){if(!o[d]){if(!n[d]){var h=typeof su=="function"&&su;if(!u&&h)return h(d,!0);if(l)return l(d,!0);var f=new Error("Cannot find module '"+d+"'");throw f.code="MODULE_NOT_FOUND",f}var m=o[d]={exports:{}};n[d][0].call(m.exports,function(g){var w=n[d][1][g];return a(w||g)},m,m.exports,r,n,o,s)}return o[d].exports}for(var l=typeof su=="function"&&su,c=0;c<s.length;c++)a(s[c]);return a}return r}()({1:[function(r,n,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var s=function(){function f(m,g){for(var w=0;w<g.length;w++){var _=g[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}return function(m,g,w){return g&&f(m.prototype,g),w&&f(m,w),m}}();function a(f,m,g){return m in f?Object.defineProperty(f,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):f[m]=g,f}function l(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}var c={width:"100%",height:"100%"},d=function(m){return Number(m)===Number(m)},u="classList"in document.documentElement?function(f,m){f.classList.add(m)}:function(f,m){var g=f.getAttribute("class")||"";f.setAttribute("class",g+" "+m)},h=function(){s(f,null,[{key:"create",value:function(g,w){return new f(g,w)}},{key:"mergeStyle",value:function(g,w){for(var _ in w)g.style[_]!==w[_]&&(g.style[_]=w[_])}},{key:"getMaxBrowserHeight",value:function(){var g=document.createElement("div"),w=document.createElement("div");f.mergeStyle(g,{position:"absolute",height:"1px",opacity:0}),f.mergeStyle(w,{height:"1e7px"}),g.appendChild(w),document.body.appendChild(g);var _=w.offsetHeight;return document.body.removeChild(g),_}}]);function f(m,g){var w=this;l(this,f),this._config={},this._lastRepaint=null,this._maxElementHeight=f.getMaxBrowserHeight(),this.refresh(m,g);var _=this._config,E=function A(){var L=w._getScrollPosition(),O=w._lastRepaint;if(w._renderAnimationFrame=window.requestAnimationFrame(A),L!==O){var U=O?L-O:0;if(!O||U<0||U>w._averageHeight){var Y=w._renderChunk();w._lastRepaint=L,Y!==!1&&typeof _.afterRender=="function"&&_.afterRender()}}};E()}return s(f,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(g,w){var _;if(Object.assign(this._config,c,w),!g||g.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=g;var E=this._config,A=this._scroller||E.scroller||document.createElement(E.scrollerTagName||"tr");if(typeof E.useFragment!="boolean"&&(this._config.useFragment=!0),!E.generate)throw new Error("Missing required `generate` function");if(!d(E.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(E.itemHeight)&&!d(E.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(E.itemHeight)?this._itemHeights=Array(E.total).fill(E.itemHeight):this._itemHeights=E.itemHeight,Object.keys(c).filter(function(dt){return dt in E}).forEach(function(dt){var be=E[dt],we=d(be);if(be&&typeof be!="string"&&typeof be!="number"){var X="Invalid optional `"+dt+"`, expected string or number";throw new Error(X)}else we&&(E[dt]=be+"px")});var L=!!E.horizontal,O=E[L?"width":"height"];if(O){var U=d(O),Y=U?!1:O.slice(-1)==="%",oe=U?O:parseInt(O.replace(/px|%/,""),10),te=window[L?"innerWidth":"innerHeight"];Y?this._containerSize=te*oe/100:this._containerSize=d(O)?O:oe}var Z=E.scrollContainer,ve=E.itemHeight*E.total,Pe=this._maxElementHeight;ve>Pe&&console.warn(["HyperList: The maximum element height",Pe+"px has","been exceeded; please reduce your item height."].join(" "));var Ee={width:""+E.width,height:Z?ve+"px":""+E.height,overflow:Z?"none":"auto",position:"relative"};f.mergeStyle(g,Ee),Z&&f.mergeStyle(E.scrollContainer,{overflow:"auto"});var Oe=(_={opacity:"0",position:"absolute"},a(_,L?"height":"width","1px"),a(_,L?"width":"height",ve+"px"),_);f.mergeStyle(A,Oe),this._scroller||g.appendChild(A);var Xe=this._computeScrollPadding();this._scrollPaddingBottom=Xe.bottom,this._scrollPaddingTop=Xe.top,this._scroller=A,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(E.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof E.afterRender=="function"&&E.afterRender()}},{key:"_getRow",value:function(g){var w=this._config,_=w.generate(g),E=_.height;if(E!==void 0&&d(E)?(_=_.element,E!==this._itemHeights[g]&&(this._itemHeights[g]=E,this._computePositions(g),this._scrollHeight=this._computeScrollHeight(g))):E=this._itemHeights[g],!_||_.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+g);u(_,w.rowClassName||"vrow");var A=this._itemPositions[g]+this._scrollPaddingTop;return f.mergeStyle(_,a({position:"absolute"},w.horizontal?"left":"top",A+"px")),_}},{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 w=this._config,_=this._element,E=this._getScrollPosition(),A=w.total,L=w.reverse?this._getReverseFrom(E):this._getFrom(E)-1;if((L<0||L-this._screenItemsLen<0)&&(L=0),!g&&this._lastFrom===L)return!1;this._lastFrom=L;var O=L+this._cachedItemsLen;(O>A||O+this._cachedItemsLen>A)&&(O=A);var U=w.useFragment?document.createDocumentFragment():[],Y=this._scroller;U[w.useFragment?"appendChild":"push"](Y);for(var oe=L;oe<O;oe++){var te=this._getRow(oe);U[w.useFragment?"appendChild":"push"](te)}if(w.applyPatch)return w.applyPatch(_,U);_.innerHTML="",_.appendChild(U)}},{key:"_computePositions",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,w=this._config,_=w.total,E=w.reverse;g<1&&!E&&(g=1);for(var A=g;A<_;A++)E?A===0?this._itemPositions[0]=this._scrollHeight-this._itemHeights[0]:this._itemPositions[A]=this._itemPositions[A-1]-this._itemHeights[A]:this._itemPositions[A]=this._itemHeights[A-1]+this._itemPositions[A-1]}},{key:"_computeScrollHeight",value:function(){var g,w=this,_=this._config,E=!!_.horizontal,A=_.total,L=this._itemHeights.reduce(function(ve,Pe){return ve+Pe},0)+this._scrollPaddingBottom+this._scrollPaddingTop;f.mergeStyle(this._scroller,(g={opacity:0,position:"absolute",top:"0px"},a(g,E?"height":"width","1px"),a(g,E?"width":"height",L+"px"),g));var O=this._itemHeights.slice(0).sort(function(ve,Pe){return ve-Pe}),U=Math.floor(A/2),Y=A%2===0?(O[U]+O[U-1])/2:O[U],oe=E?"clientWidth":"clientHeight",te=_.scrollContainer?_.scrollContainer:this._element,Z=te[oe]?te[oe]:this._containerSize;return this._screenItemsLen=Math.ceil(Z/Y),this._containerSize=Z,this._cachedItemsLen=Math.max(this._cachedItemsLen||0,this._screenItemsLen*3),this._averageHeight=Y,_.reverse&&window.requestAnimationFrame(function(){E?w._element.scrollLeft=L:w._element.scrollTop=L}),L}},{key:"_computeScrollPadding",value:function(){var g=this._config,w=!!g.horizontal,_=g.reverse,E=window.getComputedStyle(this._element),A=function(O){var U=E.getPropertyValue("padding-"+O);return parseInt(U,10)||0};return w&&_?{bottom:A("left"),top:A("right")}:w?{bottom:A("right"),top:A("left")}:_?{bottom:A("top"),top:A("bottom")}:{bottom:A("bottom"),top:A("top")}}},{key:"_getFrom",value:function(g){for(var w=0;this._itemPositions[w]<g;)w++;return w}},{key:"_getReverseFrom",value:function(g){for(var w=this._config.total-1;w>0&&this._itemPositions[w]<g+this._containerSize;)w--;return w}}]),f}();o.default=h,n.exports=o.default},{}]},{},[1])(1)})});var yie=Xi((_ie,y3)=>{(function(i,e){"use strict";function t(){r.width=i.innerWidth,r.height=5*c.barThickness;var u=r.getContext("2d");u.shadowBlur=c.shadowBlur,u.shadowColor=c.shadowColor;var h,f=u.createLinearGradient(0,0,r.width,0);for(h in c.barColors)f.addColorStop(h,c.barColors[h]);u.lineWidth=c.barThickness,u.beginPath(),u.moveTo(0,c.barThickness/2),u.lineTo(Math.ceil(n*r.width),c.barThickness/2),u.strokeStyle=f,u.stroke()}var r,n,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,f;o||(u?l=l||setTimeout(()=>d.show(),u):(o=!0,a!==null&&i.cancelAnimationFrame(a),r||((f=(r=e.createElement("canvas")).style).position="fixed",f.top=f.left=f.right=f.margin=f.padding=0,f.zIndex=100001,f.display="none",c.className&&r.classList.add(c.className),e.body.appendChild(r),h="resize",u=t,(f=i).addEventListener?f.addEventListener(h,u,!1):f.attachEvent?f.attachEvent("on"+h,u):f["on"+h]=u),r.style.opacity=1,r.style.display="block",d.progress(0),c.autoRun&&function m(){s=i.requestAnimationFrame(m),d.progress("+"+.05*Math.pow(1-Math.sqrt(n),2))}()))},progress:function(u){return u===void 0||(typeof u=="string"&&(u=(0<=u.indexOf("+")||0<=u.indexOf("-")?n:0)+parseFloat(u)),n=1<u?1:u,t()),n},hide:function(){clearTimeout(l),l=null,o&&(o=!1,s!=null&&(i.cancelAnimationFrame(s),s=null),function u(){return 1<=d.progress("+.1")&&(r.style.opacity-=.05,r.style.opacity<=.05)?(r.style.display="none",void(a=null)):void(a=i.requestAnimationFrame(u))}())}};typeof y3=="object"&&typeof y3.exports=="object"?y3.exports=d:typeof define=="function"&&define.amd?define(function(){return d}):this.topbar=d}).call(_ie,window,document)});(function(){var i=e();function e(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function n(o,s){s=s||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(o,s.bubbles,s.cancelable,s.detail),a}return n.prototype=window.Event.prototype,n}function t(n,o){var s=document.createElement("input");return s.type="hidden",s.name=n,s.value=o,s}function r(n,o){var s=n.getAttribute("data-to"),a=t("_method",n.getAttribute("data-method")),l=t("_csrf_token",n.getAttribute("data-csrf")),c=document.createElement("form"),d=document.createElement("input"),u=n.getAttribute("target");c.method=n.getAttribute("data-method")==="get"?"get":"post",c.action=s,c.style.display="none",u?c.target=u:o&&(c.target="_blank"),c.appendChild(l),c.appendChild(a),document.body.appendChild(c),d.type="submit",c.appendChild(d),d.click()}window.addEventListener("click",function(n){var o=n.target;if(!n.defaultPrevented)for(;o&&o.getAttribute;){var s=new i("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!o.dispatchEvent(s))return n.preventDefault(),n.stopImmediatePropagation(),!1;if(o.getAttribute("data-method"))return r(o,n.metaKey||n.shiftKey),n.preventDefault(),!1;o=o.parentNode}},!1),window.addEventListener("phoenix.link.click",function(n){var o=n.target.getAttribute("data-confirm");o&&!window.confirm(o)&&n.preventDefault()},!1)})();var dg=i=>typeof i=="function"?i:function(){return i},Sne=typeof self!="undefined"?self:null,cg=typeof window!="undefined"?window:null,ug=Sne||cg||ug,kne="2.0.0",xa={connecting:0,open:1,closing:2,closed:3},Ene=1e4,Tne=1e3,Mo={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},El={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Fk={longpoll:"longpoll",websocket:"websocket"},Ine={complete:4},ny=class{constructor(i,e,t,r){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=r,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(r=>r.status===i).forEach(r=>r.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})}},Sz=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))}},Lne=class{constructor(i,e,t){this.state=Mo.closed,this.topic=i,this.params=dg(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ny(this,El.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Sz(()=>{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=Mo.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Mo.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=Mo.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=Mo.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 ny(this,El.leave,dg({}),this.timeout).send(),this.state=Mo.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(El.reply,(r,n)=>{this.trigger(this.replyEventName(n),r)})}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(El.close,i)}onError(i){return this.on(El.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 r=new ny(this,i,function(){return e},t);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Mo.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(El.close,"leave")},t=new ny(this,El.leave,dg({}),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,r){return this.topic!==i?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Mo.joining,this.joinPush.resend(i))}trigger(i,e,t,r){let n=this.onMessage(i,e,t,r);if(e&&!n)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<o.length;s++)o[s].callback(n,t,r||this.joinRef())}replyEventName(i){return`chan_reply_${i}`}isClosed(){return this.state===Mo.closed}isErrored(){return this.state===Mo.errored}isJoined(){return this.state===Mo.joined}isJoining(){return this.state===Mo.joining}isLeaving(){return this.state===Mo.leaving}},sy=class{static request(i,e,t,r,n,o,s){if(ug.XDomainRequest){let a=new ug.XDomainRequest;return this.xdomainRequest(a,i,e,r,n,o,s)}else{let a=new ug.XMLHttpRequest;return this.xhrRequest(a,i,e,t,r,n,o,s)}}static xdomainRequest(i,e,t,r,n,o,s){return i.timeout=n,i.open(e,t),i.onload=()=>{let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(r),i}static xhrRequest(i,e,t,r,n,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",r),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===Ine.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(n),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 r in i){if(!Object.prototype.hasOwnProperty.call(i,r))continue;let n=e?`${e}[${r}]`:r,o=i[r];typeof o=="object"?t.push(this.serialize(o,n)):t.push(encodeURIComponent(n)+"="+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)}`}},Ane=i=>{let e="",t=new Uint8Array(i),r=t.byteLength;for(let n=0;n<r;n++)e+=String.fromCharCode(t[n]);return btoa(e)},Ok=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=xa.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Fk.websocket),"$1/"+Fk.longpoll)}endpointURL(){return sy.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=xa.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===xa.open||this.readyState===xa.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),i=>{if(i){var{status:e,token:t,messages:r}=i;this.token=t}else e=0;switch(e){case 200:r.forEach(n=>{setTimeout(()=>this.onmessage({data:n}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=xa.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=Ane(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 n of this.reqs)n.abort();this.readyState=xa.closed;let r=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",r)):this.onclose(r)}ajax(i,e,t,r,n){let o,s=()=>{this.reqs.delete(o),r()};o=sy.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&n(a)}),this.reqs.add(o)}};var oy={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,r,n,o,s]=JSON.parse(i);return e({join_ref:t,ref:r,topic:n,event:o,payload:s})}},binaryEncode(i){let{join_ref:e,ref:t,event:r,topic:n,payload:o}=i,s=this.META_LENGTH+e.length+t.length+n.length+r.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++,n.length),l.setUint8(c++,r.length),Array.from(e,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(t,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(n,u=>l.setUint8(c++,u.charCodeAt(0))),Array.from(r,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),r=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(i,e,r);case this.KINDS.reply:return this.decodeReply(i,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(i,e,r)}},decodePush(i,e,t){let r=e.getUint8(1),n=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=t.decode(i.slice(s,s+r));s=s+r;let l=t.decode(i.slice(s,s+n));s=s+n;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 r=e.getUint8(1),n=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+r));a=a+r;let c=t.decode(i.slice(a,a+n));a=a+n;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),f={status:u,response:h};return{join_ref:l,ref:c,topic:d,event:El.reply,payload:f}},decodeBroadcast(i,e,t){let r=e.getUint8(1),n=e.getUint8(2),o=this.HEADER_LENGTH+2,s=t.decode(i.slice(o,o+r));o=o+r;let a=t.decode(i.slice(o,o+n));o=o+n;let l=i.slice(o,i.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},ay=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||Ene,this.transport=e.transport||ug.WebSocket||Ok,this.establishedConnections=0,this.defaultEncoder=oy.encode.bind(oy),this.defaultDecoder=oy.decode.bind(oy),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==Ok?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;cg&&cg.addEventListener&&(cg.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),t=this.connectClock)}),cg.addEventListener("pageshow",r=>{t===this.connectClock&&(t=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=r=>e.rejoinAfterMs?e.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>e.reconnectAfterMs?e.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=dg(e.params||{}),this.endPoint=`${i}/${Fk.websocket}`,this.vsn=e.vsn||kne,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Sz(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return Ok}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=sy.appendParams(sy.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=dg(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 r=this.onMessage(n=>{n.ref===e&&(this.off([r]),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(),Tne,"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===xa.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(([,r])=>{r(i,e,t)}),(e===this.transport||t>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(i=>{i.isErrored()||i.isLeaving()||i.isClosed()||i.trigger(El.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case xa.connecting:return"connecting";case xa.open:return"open";case xa.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 Lne(i,e,this);return this.channels.push(t),t}push(i){if(this.hasLogger()){let{topic:e,event:t,payload:r,ref:n,join_ref:o}=i;this.log("push",`${e} ${t} (${o}, ${n})`,r)}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:r,payload:n,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",`${n.status||""} ${t} ${r} ${o&&"("+o+")"||""}`,n);for(let a=0;a<this.channels.length;a++){let l=this.channels[a];l.isMember(t,r,n,s)&&l.trigger(r,n,o,s)}for(let a=0;a<this.stateChangeCallbacks.message.length;a++){let[,l]=this.stateChangeCallbacks.message[a];l(e)}})}leaveOpenTopic(i){let e=this.channels.find(t=>t.topic===i&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),e.leave())}};var Yz="consecutive-reloads",Dne=10,Mne=5e3,Nne=1e4,Rne=3e4,Xz=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Il="data-phx-component",zk="data-phx-link",Pne="track-static",One="data-phx-link-state",rs="data-phx-ref",xu="data-phx-ref-src",Qz="track-uploads",Yc="data-phx-upload-ref",Qk="data-phx-preflighted-refs",Fne="data-phx-done-refs",kz="drop-target",Gk="data-phx-active-refs",yy="phx:live-file:updated",Zz="data-phx-skip",Jz="data-phx-id",Ez="data-phx-prune",Tz="page-loading",Iz="phx-connected",hg="phx-loading",Bk="phx-no-feedback",ly="phx-error",Lz="phx-client-error",Hk="phx-server-error",kf="data-phx-parent-id",Zk="data-phx-main",wg="data-phx-root-id",eB="viewport-top",tB="viewport-bottom",zne="trigger-action",xy="feedback-for",Yk="phx-has-focused",Bne=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],iB=["checkbox","radio"],Cy="phx-has-submitted",Xc="data-phx-session",Tf=`[${Xc}]`,Az="data-phx-sticky",_g="data-phx-static",Uk="data-phx-readonly",cy="data-phx-disabled",Xk="disable-with",dy="data-phx-disable-with-restore",fg="hook",Hne="debounce",Une="throttle",Sy="update",uy="stream",pg="data-phx-stream",jne="key",Ca="phxPrivate",Dz="auto-recover",hy="phx:live-socket:debug",jk="phx:live-socket:profiling",Wk="phx:live-socket:latency-sim",Wne="progress",Mz="mounted",Vne=1,qne=200,Kne="phx-",$ne=3e4,mg="debounce-trigger",fy="throttled",Nz="debounce-prev-key",Gne={debounce:300,throttle:300},py="d",Sa="s",Vk="r",No="c",Rz="e",Pz="r",Oz="t",Yne="p",Fz="stream",Xne=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.uploadChannel.leave(),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 Ro("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))}},Ro=(i,e)=>console.error&&console.error(i,e),Tl=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Qne(){let i=new Set,e=document.querySelectorAll("*[id]");for(let t=0,r=e.length;t<r;t++)i.has(e[t].id)?console.error(`Multiple IDs detected: ${e[t].id}. Ensure unique element ids.`):i.add(e[t].id)}var Zne=(i,e,t,r)=>{i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,r)},qk=i=>typeof i=="function"?i:function(){return i},wy=i=>JSON.parse(JSON.stringify(i)),yg=(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(Tf)));return null},gg=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),Jne=(i,e)=>JSON.stringify(i)===JSON.stringify(e),zz=i=>{for(let e in i)return!1;return!0},Gc=(i,e)=>i&&e(i),eoe=function(i,e,t,r){i.forEach(n=>{new Xne(n,t.config.chunk_size,r).upload()})},rB={canPushState(){return typeof history.pushState!="undefined"},dropLocal(i,e,t){return i.removeItem(this.localKey(e,t))},updateLocal(i,e,t,r,n){let o=this.getLocal(i,e,t),s=this.localKey(e,t),a=o===null?r:n(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 n=history.state||{};n.scroll=e.scroll,history.replaceState(n,"",window.location.href)}delete e.scroll,history[i+"State"](e,"",t||null);let r=this.getHashTargetEl(window.location.hash);r?r.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&&rB.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}"]`)}},ka=rB,is={byId(i){return document.getElementById(i)||Ro(`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 r=Array.from(i.querySelectorAll(e));return t?r.forEach(t):r},childNodeLength(i){let e=document.createElement("template");return e.innerHTML=i,e.content.childElementCount},isUploadInput(i){return i.type==="file"&&i.getAttribute(Yc)!==null},isAutoUpload(i){return i.hasAttribute("data-phx-auto-upload")},findUploadInputs(i){return this.all(i,`input[type="file"][${Yc}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Il}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&is.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"),r=i.target.hasAttribute("target")&&i.target.getAttribute("target").toLowerCase()==="_blank";return e||r||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,r;if(i.defaultPrevented||t===null||this.wantsNewTab(i)||t.startsWith("mailto:")||t.startsWith("tel:")||i.target.isContentEditable)return!1;try{r=new URL(t)}catch(n){try{r=new URL(t,e)}catch(o){return!0}}return r.host===e.host&&r.protocol===e.protocol&&r.pathname===e.pathname&&r.search===e.search?r.hash===""&&!r.href.endsWith("#"):r.protocol.startsWith("http")},markPhxChildDestroyed(i){this.isPhxChild(i)&&i.setAttribute(Xc,""),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,`[${Az}]`)},findPhxChildren(i,e){return this.all(i,`${Tf}[${kf}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),r=e.reduce((n,o)=>{let s=`[${Il}="${o}"] [${Il}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Il))).forEach(a=>n.delete(a)),n},t);return r.size===0?new Set(e):r},filterWithinSameLiveView(i,e){return e.querySelector(Tf)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(Xc)!==null)return!1}},private(i,e){return i[Ca]&&i[Ca][e]},deletePrivate(i,e){i[Ca]&&delete i[Ca][e]},putPrivate(i,e,t){i[Ca]||(i[Ca]={}),i[Ca][e]=t},updatePrivate(i,e,t,r){let n=this.private(i,e);n===void 0?this.putPrivate(i,e,r(t)):this.putPrivate(i,e,r(n))},copyPrivates(i,e){e[Ca]&&(i[Ca]=e[Ca])},putTitle(i){let e=document.querySelector("title");if(e){let{prefix:t,suffix:r}=e.dataset;document.title=`${t||""}${i}${r||""}`}else document.title=i},debounce(i,e,t,r,n,o,s,a){let l=i.getAttribute(t),c=i.getAttribute(n);l===""&&(l=r),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,fy):a(),f=this.incCycle(i,mg,h);if(isNaN(u))return Ro(`invalid throttle/debounce value: ${d}`);if(c){let g=!1;if(e.type==="keydown"){let w=this.private(i,Nz);this.putPrivate(i,Nz,e.key),g=w!==e.key}if(!g&&this.private(i,fy))return!1;a(),this.putPrivate(i,fy,!0),setTimeout(()=>{s()&&this.triggerCycle(i,mg)},u)}else setTimeout(()=>{s()&&this.triggerCycle(i,mg,f)},u);let m=i.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([g])=>{let w=m.querySelector(`[name="${g}"]`);this.incCycle(w,mg),this.deletePrivate(w,fy)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,mg))}},triggerCycle(i,e,t){let[r,n]=this.private(i,e);t||(t=r),t===r&&(this.incCycle(i,e),n())},once(i,e){return this.private(i,e)===!0?!1:(this.putPrivate(i,e,!0),!0)},incCycle(i,e,t=function(){}){let[r]=this.private(i,e)||[0,t];return r++,this.putPrivate(i,e,[r,t]),r},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,Yk)||this.private(e,Cy))){let r=[e.name];e.name.endsWith("[]")&&r.push(e.name.slice(0,-2));let n=r.map(o=>`[${t}="${o}"]`).join(", ");is.all(i,n,o=>o.classList.add(Bk))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let r=`[${e}="${t.id}"], [${e}="${t.name}"], - [${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,Gk),this.deletePrivate(t,Cy),this.all(document,r,n=>{n.classList.add(zk)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,zk)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(kf)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(Lz)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${kf}]`)[0]},dispatchEvent(i,e,t={}){let n={bubbles:t.bubbles===void 0?!0:!!t.bubbles,cancelable:!0,detail:t.detail||{}},o=e==="click"?new MouseEvent("click",n):new CustomEvent(e,n);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 r=t.exclude||[],n=t.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;r.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;n?l.startsWith("data-")&&!e.hasAttribute(l)&&i.removeAttribute(l):e.hasAttribute(l)||i.removeAttribute(l)}},mergeFocusedInput(i,e){i instanceof HTMLSelectElement||is.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(!is.isTextualInput(i))return;let r=i.matches(":focus");i.readOnly&&i.blur(),r||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&&tB.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return Bne.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let r=i.getAttribute(rs);if(r===null)return!0;let n=i.getAttribute(xu);return is.isFormInput(i)||i.getAttribute(t)!==null?(is.isUploadInput(i)&&is.mergeAttrs(i,e,{isIgnored:!0}),is.putPrivate(i,rs,e),!1):(Yz.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(rs,r),e.setAttribute(xu,n),!0)},cleanChildNodes(i,e){if(is.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(r=>{r.id||(r.nodeType===Node.TEXT_NODE&&r.nodeValue.trim()===""||Ro(`only HTML element tags with an id are allowed inside containers with phx-update. + [${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,Yk),this.deletePrivate(t,Cy),this.all(document,r,n=>{n.classList.add(Bk)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,Bk)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(kf)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(Az)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${kf}]`)[0]},dispatchEvent(i,e,t={}){let n={bubbles:t.bubbles===void 0?!0:!!t.bubbles,cancelable:!0,detail:t.detail||{}},o=e==="click"?new MouseEvent("click",n):new CustomEvent(e,n);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 r=t.exclude||[],n=t.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;r.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;n?l.startsWith("data-")&&!e.hasAttribute(l)&&i.removeAttribute(l):e.hasAttribute(l)||i.removeAttribute(l)}},mergeFocusedInput(i,e){i instanceof HTMLSelectElement||is.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(!is.isTextualInput(i))return;let r=i.matches(":focus");i.readOnly&&i.blur(),r||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&&iB.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return Bne.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let r=i.getAttribute(rs);if(r===null)return!0;let n=i.getAttribute(xu);return is.isFormInput(i)||i.getAttribute(t)!==null?(is.isUploadInput(i)&&is.mergeAttrs(i,e,{isIgnored:!0}),is.putPrivate(i,rs,e),!1):(Xz.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(rs,r),e.setAttribute(xu,n),!0)},cleanChildNodes(i,e){if(is.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(r=>{r.id||(r.nodeType===Node.TEXT_NODE&&r.nodeValue.trim()===""||Ro(`only HTML element tags with an id are allowed inside containers with phx-update. removing illegal node: "${(r.outerHTML||r.nodeValue).trim()}" -`),t.push(r))}),t.forEach(r=>r.remove())}},replaceRootContainer(i,e,t){let r=new Set(["id",Xc,_g,Qk,wg]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(n=>!r.has(n.name.toLowerCase())).forEach(n=>i.removeAttribute(n.name)),Object.keys(t).filter(n=>!r.has(n.toLowerCase())).forEach(n=>i.setAttribute(n,t[n])),i;{let n=document.createElement(e);return Object.keys(t).forEach(o=>n.setAttribute(o,t[o])),r.forEach(o=>n.setAttribute(o,i.getAttribute(o))),n.innerHTML=i.innerHTML,i.replaceWith(n),n}},getSticky(i,e,t){let r=(is.private(i,"sticky")||[]).find(([n])=>e===n);if(r){let[n,o,s]=r;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([r,n])=>r!==e))},putSticky(i,e,t){let r=t(i);this.updatePrivate(i,"sticky",[],n=>{let o=n.findIndex(([s])=>e===s);return o>=0?n[o]=[e,t,r]:n.push([e,t,r]),n})},applyStickyOperations(i){let e=is.private(i,"sticky");e&&e.forEach(([t,r,n])=>this.putSticky(i,t,r))}},pe=is,qk=class{static isActive(i,e){let t=e._phxRef===void 0,n=i.getAttribute($k).split(",").indexOf(pn.genFileRef(e))>=0;return e.size>0&&(t||n)}static isPreflighted(i,e){return i.getAttribute(Xk).split(",").indexOf(pn.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=pn.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(yy,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,()=>{pn.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(yy,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),pe.isAutoUpload(this.fileEl)||pn.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(yy,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute($k).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]||Ro(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:eoe}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Ro(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},toe=0,pn=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(toe++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let r=this.activeFiles(i).find(n=>this.genFileRef(n)===e);t(URL.createObjectURL(r))}static hasUploadsInProgress(i){let e=0;return pe.findUploadInputs(i).forEach(t=>{t.getAttribute(Xk)!==t.getAttribute(Fne)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(r=>{let n={path:i.name},o=i.getAttribute(Yc);t[o]=t[o]||[],n.ref=this.genFileRef(r),n.last_modified=r.lastModified,n.name=r.name||n.ref,n.relative_path=r.webkitRelativePath,n.type=r.type,n.size=r.size,typeof r.meta=="function"&&(n.meta=r.meta()),t[o].push(n)}),t}static clearFiles(i){i.value=null,i.removeAttribute(Yc),pe.putPrivate(i,"files",[])}static untrackFile(i,e){pe.putPrivate(i,"files",pe.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let r=e.filter(n=>!this.activeFiles(i).find(o=>Object.is(o,n)));pe.putPrivate(i,"files",this.activeFiles(i).concat(r)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),pe.putPrivate(i,"files",e)}static activeFileInputs(i){let e=pe.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return(pe.private(i,"files")||[]).filter(e=>qk.isActive(i,e))}static inputsAwaitingPreflight(i){let e=pe.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!qk.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(pn.filesAwaitingPreflight(i)||[]).map(r=>new qk(i,r,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(n=>(n.zipPostFlight(i),n.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),n));let r=this._entries.reduce((n,o)=>{if(!o.meta)return n;let{name:s,callback:a}=o.uploader(t.uploaders);return n[s]=n[s]||{callback:a,entries:[]},n[s].entries.push(o),n},{});for(let n in r){let{callback:o,entries:s}=r[n];o(s,e,i,t)}}},ioe={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}}},Ef=ioe,rB={LiveFileUpload:{activeRefs(){return this.el.getAttribute($k)},preflightedRefs(){return this.el.getAttribute(Xk)},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(yy))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Yc)),pn.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",()=>Ef.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Ef.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Ef.focusFirst(this.el)}}},zz=()=>document.documentElement.scrollTop||document.body.scrollTop,Zk=()=>window.innerHeight||document.documentElement.clientHeight,roe=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=Zk()},noe=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=Zk()},Bz=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=Zk()};rB.InfiniteScroll={mounted(){let i=zz(),e=!1,t=500,r=null,n=this.throttle(t,(a,l)=>{r=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{r=null})}),o=this.throttle(t,(a,l)=>{r=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,Bz(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{r=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,Bz(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=zz();if(r)return i=l,r();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,f=this.el.firstElementChild,m=l<i,g=l>i;m&&d&&!e&&c.top>=0?(e=!0,n(d,f)):g&&e&&c.top<=0&&(e=!1),d&&m&&roe(f)?o(d,f):u&&g&&noe(h)&&s(u,h),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,r;return(...n)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(r&&(clearTimeout(r),r=null),t=o,e(...n)):r||(r=setTimeout(()=>{t=Date.now(),r=null,e(...n)},s))}}};var ooe=rB,soe=class{constructor(i,e,t){let r=new Set,n=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(r.add(s.id),n.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=[...n].filter(s=>!r.has(s))}perform(){let i=pe.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?Gc(document.getElementById(e.previousElementId),t=>{Gc(document.getElementById(e.elementId),r=>{r.previousElementSibling&&r.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",r)})}):Gc(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{Gc(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},Hz=11;function aoe(i,e){var t=e.attributes,r,n,o,s,a;if(!(e.nodeType===Hz||i.nodeType===Hz)){for(var l=t.length-1;l>=0;l--)r=t[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=i.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),i.setAttributeNS(o,n,s))):(a=i.getAttribute(n),a!==s&&i.setAttribute(n,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)r=c[d],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||i.removeAttributeNS(o,n)):e.hasAttribute(n)||i.removeAttribute(n)}}var my,loe="http://www.w3.org/1999/xhtml",ao=typeof document=="undefined"?void 0:document,coe=!!ao&&"content"in ao.createElement("template"),doe=!!ao&&ao.createRange&&"createContextualFragment"in ao.createRange();function uoe(i){var e=ao.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function hoe(i){my||(my=ao.createRange(),my.selectNode(ao.body));var e=my.createContextualFragment(i);return e.childNodes[0]}function foe(i){var e=ao.createElement("body");return e.innerHTML=i,e.childNodes[0]}function poe(i){return i=i.trim(),coe?uoe(i):doe?hoe(i):foe(i)}function gy(i,e){var t=i.nodeName,r=e.nodeName,n,o;return t===r?!0:(n=t.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?t===r.toUpperCase():o<=90&&n>=97?r===t.toUpperCase():!1)}function moe(i,e){return!e||e===loe?ao.createElement(i):ao.createElementNS(e,i)}function goe(i,e){for(var t=i.firstChild;t;){var r=t.nextSibling;e.appendChild(t),t=r}return e}function Kk(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var Uz={OPTION:function(i,e){var t=i.parentNode;if(t){var r=t.nodeName.toUpperCase();r==="OPTGROUP"&&(t=t.parentNode,r=t&&t.nodeName.toUpperCase()),r==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}Kk(i,e,"selected")},INPUT:function(i,e){Kk(i,e,"checked"),Kk(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 r=i.firstChild;if(r){var n=r.nodeValue;if(n==t||!t&&n==i.placeholder)return;r.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,r=0,n=i.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){t=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}i.selectedIndex=t}}},bg=1,jz=11,Wz=3,Vz=8;function $c(){}function boe(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function voe(i){return function(t,r,n){if(n||(n={}),typeof r=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=r;r=ao.createElement("html"),r.innerHTML=o}else r=poe(r);else r.nodeType===jz&&(r=r.firstElementChild);var s=n.getNodeKey||boe,a=n.onBeforeNodeAdded||$c,l=n.onNodeAdded||$c,c=n.onBeforeElUpdated||$c,d=n.onElUpdated||$c,u=n.onBeforeNodeDiscarded||$c,h=n.onNodeDiscarded||$c,f=n.onBeforeElChildrenUpdated||$c,m=n.skipFromChildren||$c,g=n.addChild||function(be,we){return be.appendChild(we)},w=n.childrenOnly===!0,_=Object.create(null),E=[];function A(be){E.push(be)}function L(be,we){if(be.nodeType===bg)for(var X=be.firstChild;X;){var R=void 0;we&&(R=s(X))?A(R):(h(X),X.firstChild&&L(X,we)),X=X.nextSibling}}function O(be,we,X){u(be)!==!1&&(we&&we.removeChild(be),h(be),L(be,X))}function U(be){if(be.nodeType===bg||be.nodeType===jz)for(var we=be.firstChild;we;){var X=s(we);X&&(_[X]=we),U(we),we=we.nextSibling}}U(t);function Y(be){l(be);for(var we=be.firstChild;we;){var X=we.nextSibling,R=s(we);if(R){var ne=_[R];ne&&gy(we,ne)?(we.parentNode.replaceChild(ne,we),te(ne,we)):Y(we)}else Y(we);we=X}}function oe(be,we,X){for(;we;){var R=we.nextSibling;(X=s(we))?A(X):O(we,be,!0),we=R}}function te(be,we,X){var R=s(we);R&&delete _[R],!(!X&&(c(be,we)===!1||(i(be,we),d(be),f(be,we)===!1)))&&(be.nodeName!=="TEXTAREA"?Z(be,we):Uz.TEXTAREA(be,we))}function Z(be,we){var X=m(be),R=we.firstChild,ne=be.firstChild,me,G,Et,Ot,ai;e:for(;R;){for(Ot=R.nextSibling,me=s(R);!X&≠){if(Et=ne.nextSibling,R.isSameNode&&R.isSameNode(ne)){R=Ot,ne=Et;continue e}G=s(ne);var Ti=ne.nodeType,kt=void 0;if(Ti===R.nodeType&&(Ti===bg?(me?me!==G&&((ai=_[me])?Et===ai?kt=!1:(be.insertBefore(ai,ne),G?A(G):O(ne,be,!0),ne=ai):kt=!1):G&&(kt=!1),kt=kt!==!1&&gy(ne,R),kt&&te(ne,R)):(Ti===Wz||Ti==Vz)&&(kt=!0,ne.nodeValue!==R.nodeValue&&(ne.nodeValue=R.nodeValue))),kt){R=Ot,ne=Et;continue e}G?A(G):O(ne,be,!0),ne=Et}if(me&&(ai=_[me])&&gy(ai,R))X||g(be,ai),te(ai,R);else{var Ei=a(R);Ei!==!1&&(Ei&&(R=Ei),R.actualize&&(R=R.actualize(be.ownerDocument||ao)),g(be,R),Y(R))}R=Ot,ne=Et}oe(be,ne,G);var fi=Uz[be.nodeName];fi&&fi(be,we)}var ve=t,Pe=ve.nodeType,Ee=r.nodeType;if(!w){if(Pe===bg)Ee===bg?gy(t,r)||(h(t),ve=goe(t,moe(r.nodeName,r.namespaceURI))):ve=r;else if(Pe===Wz||Pe===Vz){if(Ee===Pe)return ve.nodeValue!==r.nodeValue&&(ve.nodeValue=r.nodeValue),ve;ve=r}}if(ve===r)h(t);else{if(r.isSameNode&&r.isSameNode(ve))return;if(te(ve,r,w),E)for(var Oe=0,Xe=E.length;Oe<Xe;Oe++){var dt=_[E[Oe]];dt&&O(dt,dt.parentNode,!1)}}return!w&&ve!==t&&t.parentNode&&(ve.actualize&&(ve=ve.actualize(t.ownerDocument||ao)),t.parentNode.replaceChild(ve,t)),ve}}var _oe=voe(aoe),qz=_oe,by=class{static patchEl(i,e,t){qz(i,e,{childrenOnly:!1,onBeforeElUpdated:(r,n)=>{if(t&&t.isSameNode(r)&&pe.isFormInput(r))return pe.mergeFocusedInput(r,n),!1}})}constructor(i,e,t,r,n,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=r,this.streams=n,this.streamInserts={},this.targetCID=o,this.cidPatch=Tl(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(Sy);pe.all(this.container,`[${i}=${uy}]`,e=>e.innerHTML=""),pe.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(kz,"")})}perform(i){let{view:e,liveSocket:t,container:r,html:n}=this,o=this.isCIDPatch()?this.targetCIDContainer(n):r;if(this.isCIDPatch()&&!o)return;let s=t.getActiveElement(),{selectionStart:a,selectionEnd:l}=s&&pe.hasSelectionRange(s)?s:{},c=t.binding(Sy),d=t.binding(xy),u=t.binding(Yk),h=t.binding(Jz),f=t.binding(eB),m=t.binding(zne),g=[],w=[],_=[],E=[],A=null;return this.trackBefore("added",r),this.trackBefore("updated",r,r),t.time("morphdom",()=>{this.streams.forEach(([L,O,U,Y])=>{Object.entries(O).forEach(([oe,[te,Z]])=>{this.streamInserts[oe]={ref:L,streamAt:te,limit:Z,resetKept:!1}}),Y!==void 0&&pe.all(r,`[${pg}="${L}"]`,oe=>{O[oe.id]?this.streamInserts[oe.id].resetKept=!0:this.removeStreamChildElement(oe)}),U.forEach(oe=>{let te=r.querySelector(`[id="${oe}"]`);te&&this.removeStreamChildElement(te)})}),qz(o,n,{childrenOnly:o.getAttribute(Il)===null,getNodeKey:L=>pe.isPhxDestroyed(L)?null:i?L.id:L.id||L.getAttribute&&L.getAttribute(Zz),skipFromChildren:L=>L.getAttribute(c)===uy,addChild:(L,O)=>{let{ref:U,streamAt:Y,limit:oe}=this.getStreamInsert(O);if(U===void 0)return L.appendChild(O);if(pe.putSticky(O,pg,ve=>ve.setAttribute(pg,U)),Y===0)L.insertAdjacentElement("afterbegin",O);else if(Y===-1)L.appendChild(O);else if(Y>0){let ve=Array.from(L.children)[Y];L.insertBefore(O,ve)}let te=oe!==null&&Array.from(L.children),Z=[];oe&&oe<0&&te.length>oe*-1?Z=te.slice(0,te.length+oe):oe&&oe>=0&&te.length>oe&&(Z=te.slice(oe)),Z.forEach(ve=>{this.streamInserts[ve.id]||this.removeStreamChildElement(ve)})},onBeforeNodeAdded:L=>(pe.maybeAddPrivateHooks(L,h,f),this.trackBefore("added",L),L),onNodeAdded:L=>{L.getAttribute&&this.maybeReOrderStream(L),L instanceof HTMLImageElement&&L.srcset?L.srcset=L.srcset:L instanceof HTMLVideoElement&&L.autoplay&&L.play(),pe.isNowTriggerFormExternal(L,m)&&(A=L),L.getAttribute&&L.getAttribute("name")&&pe.isFormInput(L)&&w.push(L),(pe.isPhxChild(L)&&e.ownsElement(L)||pe.isPhxSticky(L)&&e.ownsElement(L.parentNode))&&this.trackAfter("phxChildAdded",L),g.push(L)},onBeforeElChildrenUpdated:(L,O)=>{if(L.getAttribute(c)===uy){let U=Array.from(O.children).map(Y=>Y.id);Array.from(L.children).filter(Y=>{let{resetKept:oe}=this.getStreamInsert(Y);return oe}).sort((Y,oe)=>{let te=U.indexOf(Y.id),Z=U.indexOf(oe.id);return te===Z?0:te<Z?-1:1}).forEach(Y=>L.appendChild(Y))}},onNodeDiscarded:L=>this.onNodeDiscarded(L),onBeforeNodeDiscarded:L=>L.getAttribute&&L.getAttribute(kz)!==null?!0:!(L.parentElement!==null&&L.id&&pe.isPhxUpdate(L.parentElement,c,[uy,"append","prepend"])||this.maybePendingRemove(L)||this.skipCIDSibling(L)),onElUpdated:L=>{pe.isNowTriggerFormExternal(L,m)&&(A=L),_.push(L),this.maybeReOrderStream(L)},onBeforeElUpdated:(L,O)=>{if(pe.maybeAddPrivateHooks(O,h,f),pe.cleanChildNodes(O,c),this.skipCIDSibling(O)||pe.isPhxSticky(L))return!1;if(pe.isIgnored(L,c)||L.form&&L.form.isSameNode(A))return this.trackBefore("updated",L,O),pe.mergeAttrs(L,O,{isIgnored:!0}),_.push(L),pe.applyStickyOperations(L),!1;if(L.type==="number"&&L.validity&&L.validity.badInput)return!1;if(!pe.syncPendingRef(L,O,u))return pe.isUploadInput(L)&&(this.trackBefore("updated",L,O),_.push(L)),pe.applyStickyOperations(L),!1;if(pe.isPhxChild(O)){let Y=L.getAttribute(Xc);return pe.mergeAttrs(L,O,{exclude:[_g]}),Y!==""&&L.setAttribute(Xc,Y),L.setAttribute(wg,this.rootID),pe.applyStickyOperations(L),!1}return pe.copyPrivates(O,L),s&&L.isSameNode(s)&&pe.isFormInput(L)&&L.type!=="hidden"?(this.trackBefore("updated",L,O),pe.mergeFocusedInput(L,O),pe.syncAttrsToProps(L),_.push(L),pe.applyStickyOperations(L),w.push(L),!1):(pe.isPhxUpdate(O,c,["append","prepend"])&&E.push(new soe(L,O,O.getAttribute(c))),pe.syncAttrsToProps(O),pe.applyStickyOperations(O),O.getAttribute("name")&&pe.isFormInput(O)&&w.push(O),this.trackBefore("updated",L,O),!0)}})}),t.isDebugEnabled()&&Qne(),E.length>0&&t.time("post-morph append/prepend restoration",()=>{E.forEach(L=>L.perform())}),w.forEach(L=>{pe.maybeHideFeedback(o,L,d)}),t.silenceEvents(()=>pe.restoreFocus(s,a,l)),pe.dispatchEvent(document,"phx:update"),g.forEach(L=>this.trackAfter("added",L)),_.forEach(L=>this.trackAfter("updated",L)),this.transitionPendingRemoves(),A&&(t.unload(),Object.getPrototypeOf(A).submit.call(A)),!0}onNodeDiscarded(i){(pe.isPhxChild(i)||pe.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:r}=this.getStreamInsert(i);if(t!==void 0){if(pe.putSticky(i,pg,n=>n.setAttribute(pg,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let n=Array.from(i.parentElement.children),o=n.indexOf(i);if(t>=n.length-1)i.parentElement.appendChild(i);else{let s=n[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 r=pe.firstPhxChild(t);r&&e.destroyViewByEl(r),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.hasAttribute(Qz)}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=pe.findComponentNodeList(this.container,this.targetCID);return t.length===0&&pe.childNodeLength(i)===1?e:e&&e.parentNode}indexOf(i,e){return Array.from(i.children).indexOf(e)}},yoe=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),woe=new Set([">","/"," ",` -`," ","\r"]),xoe=new Set(["'",'"']),Kz=(i,e,t)=>{let r=0,n=!1,o,s,a,l,c,d;for(;r<i.length;){let f=i.charAt(r);if(n)f==="-"&&i.slice(r,r+3)==="-->"?(n=!1,r+=3):r++;else if(f==="<"&&i.slice(r,r+4)==="<!--")n=!0,r+=4;else if(f==="<"){o=i.slice(0,r);let m=r;for(r++,r;r<i.length&&!woe.has(i.charAt(r));r++);for(l=r,a=i.slice(m+1,l),r++,r;r<i.length&&i.charAt(r)!==">";r++)if(i.charAt(r)==="="){let g=i.slice(r-3,r)===" id";r++;let w=i.charAt(r);if(xoe.has(w)){let _=r;for(r++,r;r<i.length&&i.charAt(r)!==w;r++);if(g){c=i.slice(_+1,r);break}}}break}else r++}if(!a)throw new Error(`malformed html ${i}`);let u=i.length-1;for(n=!1;u>=o.length+a.length;){let f=i.charAt(u);if(n)f==="-"&&i.slice(u-3,u)==="<!-"?(n=!1,u-=4):u-=1;else if(f===">"&&i.slice(u-2,u)==="--")n=!0,u-=3;else{if(f===">")break;u-=1}}s=i.slice(u+1,i.length);let h=Object.keys(e).map(f=>e[f]===!0?f:`${f}="${e[f]}"`).join(" ");if(t){let f=c?` id="${c}"`:"";yoe.has(a)?d=`<${a}${f}${h===""?"":" "}${h}/>`:d=`<${a}${f}${h===""?"":" "}${h}></${a}>`}else{let f=i.slice(l,u+1);d=`<${a}${h===""?"":" "}${h}${f}`}return[d,o,s]},$z=class{static extract(i){let{[Rz]:e,[Nz]:t,[Pz]:r}=i;return delete i[Rz],delete i[Nz],delete i[Pz],{diff:i,title:r,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.magicId=0,this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[No],i,!0,{});return[e,t]}recursiveToString(i,e=i[No],t,r,n){t=t?new Set(t):null;let o={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,o,r,n),[o.buffer,o.streams]}componentCIDs(i){return Object.keys(i[No]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[No]?Object.keys(i).length===1:!1}getComponent(i,e){return i[No][e]}mergeDiff(i){let e=i[No],t={};if(delete i[No],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[No]=this.rendered[No]||{},e){let r=this.rendered[No];for(let n in e)e[n]=this.cachedFindComponent(n,e[n],r,e,t);for(let n in e)r[n]=e[n];i[No]=e}}cachedFindComponent(i,e,t,r,n){if(n[i])return n[i];{let o,s,a=e[Sa];if(Tl(a)){let l;a>0?l=this.cachedFindComponent(a,r[a],t,r,n):l=t[-a],s=l[Sa],o=this.cloneMerge(l,e,!0),o[Sa]=s}else o=e[Sa]!==void 0||t[i]===void 0?e:this.cloneMerge(t[i],e,!1);return n[i]=o,o}}mutableMerge(i,e){return e[Sa]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let r=e[t],n=i[t];gg(r)&&r[Sa]===void 0&&gg(n)?this.doMutableMerge(n,r):i[t]=r}i[Wk]&&(i.newRender=!0)}cloneMerge(i,e,t){let r=ue(ue({},i),e);for(let n in r){let o=e[n],s=i[n];gg(o)&&o[Sa]===void 0&&gg(s)&&(r[n]=this.cloneMerge(s,o,t))}return t?(delete r.magicId,delete r.newRender):i[Wk]&&(r.newRender=!0),r}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[No],i,null),[r,n,o]=Kz(e,{});return[r,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[No][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[Sa]}templateStatic(i,e){return typeof i=="number"?e[i]:i}nextMagicID(){return this.magicId++,`${this.parentViewId()}-${this.magicId}`}toOutputBuffer(i,e,t,r,n={}){if(i[py])return this.comprehensionToBuffer(i,e,t);let{[Sa]:o}=i;o=this.templateStatic(o,e);let s=i[Wk],a=t.buffer;s&&(t.buffer=""),r&&s&&!i.magicId&&(i.newRender=!0,i.magicId=this.nextMagicID()),t.buffer+=o[0];for(let l=1;l<o.length;l++)this.dynamicToBuffer(i[l-1],e,t,r),t.buffer+=o[l];if(s){let l=!1,c;r||Object.keys(n).length>0?(l=!i.newRender,c=ue({[Zz]:i.magicId},n)):c=n,l&&(c[Qz]=!0);let[d,u,h]=Kz(t.buffer,c,l);i.newRender=!1,t.buffer=a+u+d+h}}comprehensionToBuffer(i,e,t){let{[py]:r,[Sa]:n,[Oz]:o}=i,[s,a,l,c]=o||[null,{},[],null];n=this.templateStatic(n,e);let d=e||i[Yne];for(let u=0;u<r.length;u++){let h=r[u];t.buffer+=n[0];for(let f=1;f<n.length;f++){let m=!1;this.dynamicToBuffer(h[f-1],d,t,m),t.buffer+=n[f]}}o!==void 0&&(i[py].length>0||l.length>0||c)&&(delete i[Oz],i[py]=[],t.streams.add(o))}dynamicToBuffer(i,e,t,r){if(typeof i=="number"){let[n,o]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...o])}else gg(i)?this.toOutputBuffer(i,e,t,r,{}):t.buffer+=i}recursiveCIDToString(i,e,t){let r=i[e]||Ro(`no component for CID ${e}`,i),n={[Il]:e},o=t&&!t.has(e);r.newRender=!o,r.magicId=`${this.parentViewId()}-c-${e}`;let s=!0,[a,l]=this.recursiveToString(r,i,t,s,n);return[a,l]}},Coe=1,vg=class{static makeID(){return Coe++}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 r in this.__callbacks)this[r]=this.__callbacks[r]}__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={},r=function(){}){return this.__view.withinTargets(i,(n,o)=>n.pushHookEvent(this.el,o,e,t,r))}handleEvent(i,e){let t=(r,n)=>n?i:e(r.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,(r,n)=>{r.dispatchUploads(n,e,t)})}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},vy=null,Soe={exec(i,e,t,r,n){let[o,s]=n||[null,{callback:n&&n.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(r,c).forEach(d=>{this[`exec_${l}`](i,e,t,r,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,r,n,[o,s]){(s?pe.all(document,s):[r]).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,r,n,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=r,pe.dispatchEvent(n,s,{detail:a,bubbles:l})},exec_push(i,e,t,r,n,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:u,dispatcher:h,callback:f}=o,m={loading:d,value:u,target:l,page_loading:!!c},g=i==="change"&&h?h:r,w=l||g.getAttribute(t.binding("target"))||g;t.withinTargets(w,(_,E)=>{if(i==="change"){let{newCid:A,_target:L}=o;L=L||(pe.isFormInput(r)?r.name:void 0),L&&(m._target=L),_.pushInput(r,E,A,s||e,m,f)}else if(i==="submit"){let{submitter:A}=o;_.submitForm(r,E,s||e,A,m,f)}else _.pushEvent(i,r,E,s||e,a,m,f)})},exec_navigate(i,e,t,r,n,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,r,n,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",r)},exec_focus(i,e,t,r,n){window.requestAnimationFrame(()=>Ef.attemptFocus(n))},exec_focus_first(i,e,t,r,n){window.requestAnimationFrame(()=>Ef.focusFirstInteractive(n)||Ef.focusFirst(n))},exec_push_focus(i,e,t,r,n){window.requestAnimationFrame(()=>vy=n||r)},exec_pop_focus(i,e,t,r,n){window.requestAnimationFrame(()=>{vy&&vy.focus(),vy=null})},exec_add_class(i,e,t,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,o,[],s,a,t)},exec_remove_class(i,e,t,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,[],o,s,a,t)},exec_transition(i,e,t,r,n,{time:o,transition:s}){this.addOrRemoveClasses(n,[],[],s,o,t)},exec_toggle(i,e,t,r,n,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,n,o,s,a,l)},exec_show(i,e,t,r,n,{display:o,transition:s,time:a}){this.show(i,t,n,o,s,a)},exec_hide(i,e,t,r,n,{display:o,transition:s,time:a}){this.hide(i,t,n,o,s,a)},exec_set_attr(i,e,t,r,n,{attr:[o,s]}){this.setOrRemoveAttrs(n,[[o,s]],[])},exec_remove_attr(i,e,t,r,n,{attr:o}){this.setOrRemoveAttrs(n,[],[o])},show(i,e,t,r,n,o){this.isVisible(t)||this.toggle(i,e,t,r,n,null,o)},hide(i,e,t,r,n,o){this.isVisible(t)&&this.toggle(i,e,t,r,null,n,o)},toggle(i,e,t,r,n,o,s){let[a,l,c]=n||[[],[],[]],[d,u,h]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let f=()=>{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,f,()=>{this.addOrRemoveClasses(t,[],d.concat(h)),pe.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let f=()=>{this.addOrRemoveClasses(t,l,d.concat(u).concat(h));let m=r||this.defaultDisplay(t);pe.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,f,()=>{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")),pe.putSticky(t,"toggle",f=>f.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let f=r||this.defaultDisplay(t);pe.putSticky(t,"toggle",m=>m.style.display=f),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,r,n,o){let[s,a,l]=r||[[],[],[]];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(n,c,d)}window.requestAnimationFrame(()=>{let[c,d]=pe.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)),f=c.filter(g=>t.indexOf(g)<0).concat(u),m=d.filter(g=>e.indexOf(g)<0).concat(h);pe.putSticky(i,"classes",g=>(g.classList.remove(...m),g.classList.add(...f),[f,m]))})},setOrRemoveAttrs(i,e,t){let[r,n]=pe.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=r.filter(([l,c])=>!o.includes(l)).concat(e),a=n.filter(l=>!o.includes(l)).concat(t);pe.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?pe.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},Ms=Soe,_y=(i,e,t=[])=>{let l=e,{submitter:r}=l,n=so(l,["submitter"]),o=new FormData(i);r&&r.hasAttribute("name")&&r.form&&r.form===i&&o.append(r.name,r.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 n)a.append(c,n[c]);return a.toString()},nB=class{constructor(i,e,t,r,n){this.isDead=!1,this.liveSocket=e,this.flash=r,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(n),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(Qk)}connectParams(i){let e=this.liveSocket.params(this.el),t=pe.all(document,`[${this.binding(Pne)}]`).map(r=>r.src||r.href).filter(r=>typeof r=="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(Xc)}getStatic(){let i=this.el.getAttribute(_g);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])};pe.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(Tz,hg,ly,Iz,Bk),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(hg)}}execAll(i){pe.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(Tz),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(Tl(i))pe.findComponentNodeList(this.el,i).length===0?Ro(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Ro(`nothing found matching the phx-target selector "${i}"`),t.forEach(r=>this.liveSocket.owner(r,n=>e(n,r)))}}applyDiff(i,e,t){this.log(i,()=>["",wy(e)]);let{diff:r,reply:n,events:o,title:s}=$z.extract(e);t({diff:r,reply:n,events:o}),s&&window.requestAnimationFrame(()=>pe.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[r,n]=t;this.el=pe.replaceRootContainer(this.el,r,n)}this.childJoins=0,this.joinPending=!0,this.flash=null,ka.dropLocal(this.liveSocket.localStorage,window.location.pathname,Gz),this.applyDiff("mount",e,({diff:r,events:n})=>{this.rendered=new $z(this.id,r);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,n)})}):this.onJoinComplete(i,o,s,n)})}dropPendingRefs(){pe.all(document,`[${xu}="${this.id}"][${rs}]`,i=>{i.removeAttribute(rs),i.removeAttribute(xu)})}onJoinComplete({live_patch:i},e,t,r){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,r);pe.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(_g);return a&&o.setAttribute(_g,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,r)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,r)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,r)])}attachTrueDocEl(){this.el=pe.byId(this.id),this.el.setAttribute(wg,this.root.id)}execNewMounted(){let i=this.binding(Jz),e=this.binding(eB);pe.all(this.el,`[${i}], [${e}]`,t=>{pe.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),pe.all(this.el,`[${this.binding(fg)}], [data-phx-${fg}]`,t=>{this.maybeAddNewHook(t)}),pe.all(this.el,`[${this.binding(Dz)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,r){this.attachTrueDocEl();let n=new by(this,this.el,this.id,e,t,null);if(n.markPrunableContentForRemoval(),this.performPatch(n,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(r),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),r=t&&pe.isIgnored(i,this.binding(Sy));if(t&&!i.isEqualNode(e)&&!(r&&Jne(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(Dz)),t=e&&pe.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),pe.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e,t=!1){let r=[],n=!1,o=new Set;return i.after("added",s=>{this.liveSocket.triggerDOM("onNodeAdded",[s]),this.maybeAddNewHook(s),s.getAttribute&&this.maybeMounted(s)}),i.after("phxChildAdded",s=>{pe.isPhxSticky(s)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(s,a)=>{this.triggerBeforeUpdateHook(s,a)&&o.add(s.id)}),i.after("updated",s=>{o.has(s.id)&&this.getHook(s).__updated()}),i.after("discarded",s=>{s.nodeType===Node.ELEMENT_NODE&&r.push(s)}),i.after("transitionsDiscarded",s=>this.afterElementsRemoved(s,e)),i.perform(t),this.afterElementsRemoved(r,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(r=>{let n=pe.all(r,`[${Il}]`),o=pe.all(r,`[${this.binding(fg)}]`);n.concat(r).forEach(s=>{let a=this.componentID(s);Tl(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(r).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){pe.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(kf)][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 nB(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",()=>{pe.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(n=>{this.componentPatch(this.rendered.getComponent(i,n),n)&&(t=!0)})}):Fz(i)||this.liveSocket.time("full patch complete",()=>{let[r,n]=this.renderContainer(i,"update"),o=new by(this,this.el,this.id,r,n,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,r=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[n,o]=this.rendered.toString(r);return[`<${t}>${n}</${t}>`,o]})}componentPatch(i,e){if(Fz(i))return!1;let[t,r]=this.rendered.componentToString(e),n=new by(this,this.el,this.id,t,r,e);return this.performPatch(n,!0)}getHook(i){return this.viewHooks[vg.elementID(i)]}addHook(i){if(vg.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${fg}`)||i.getAttribute(this.binding(fg));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Ro(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let r=new vg(this,i,t);return this.viewHooks[vg.elementID(r.el)]=r,r}else e!==null&&Ro(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[vg.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:r}=i,n=this.expandURL(e);this.liveSocket.historyRedirect(n,t,r)}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([hg,ly,Bk]),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(qne)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([hg,ly,Bk]):this.displayError([hg,ly,Iz]))}displayError(i){this.isMain()&&pe.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,r=function(){}){if(!this.isConnected())return;let[n,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(Ez))!==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,$ne).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(),r(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:u,events:h})=>{n!==null&&this.undoRefs(n),this.update(d,h),c(u)})}):(n!==null&&this.undoRefs(n),c(null))}))}undoRefs(i){this.isConnected()&&pe.all(document,`[${xu}="${this.id}"][${rs}="${i}"]`,e=>{let t=e.getAttribute(cy);e.removeAttribute(rs),e.removeAttribute(xu),e.getAttribute(Hk)!==null&&(e.readOnly=!1,e.removeAttribute(Hk)),t!==null&&(e.disabled=t==="true",e.removeAttribute(cy)),Yz.forEach(o=>pe.removeClass(e,o));let r=e.getAttribute(dy);r!==null&&(e.innerText=r,e.removeAttribute(dy));let n=pe.private(e,rs);if(n){let o=this.triggerBeforeUpdateHook(e,n);by.patchEl(e,n,this.liveSocket.getActiveElement()),o&&o.__updated(),pe.deletePrivate(e,rs)}})}putRef(i,e,t={}){let r=this.ref++,n=this.binding(Yk);return t.loading&&(i=i.concat(pe.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(rs,r),o.setAttribute(xu,this.el.id);let s=o.getAttribute(n);s!==null&&(o.getAttribute(dy)||o.setAttribute(dy,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[r,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Il);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(Tl(e))return e;let r=t.target||i.getAttribute(this.binding("target"));return Tl(r)?parseInt(r):e&&(r!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return Tl(i)?i:i?Gc(i.closest(`[${Il}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,r,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,r]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:r,cid:this.closestComponentID(e)},(l,c)=>n(c,o)),o}extractMeta(i,e,t){let r=this.binding("value-");for(let n=0;n<i.attributes.length;n++){e||(e={});let o=i.attributes[n].name;o.startsWith(r)&&(e[o.replace(r,"")]=i.getAttribute(o))}if(i.value!==void 0&&!(i instanceof HTMLFormElement)&&(e||(e={}),e.value=i.value,i.tagName==="INPUT"&&tB.indexOf(i.type)>=0&&!i.checked&&delete e.value),t){e||(e={});for(let n in t)e[n]=t[n]}return e}pushEvent(i,e,t,r,n,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:r,value:this.extractMeta(e,n,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,r=function(){}){this.liveSocket.withinOwners(i.form,(n,o)=>{n.pushWithReply(null,"progress",{event:i.getAttribute(n.binding(Wne)),ref:i.getAttribute(Yc),entry_ref:e,progress:t,cid:n.targetComponentID(i.form,o)},r)})}pushInput(i,e,t,r,n,o){let s,a=Tl(t)?t:this.targetComponentID(i.form,e,n),l=()=>this.putRef([i,i.form],"change",n),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=_y(i.form,ue({_target:n._target},d),[i.name]):c=_y(i.form,ue({_target:n._target},d)),pe.isUploadInput(i)&&i.files&&i.files.length>0&&pn.trackFiles(i,Array.from(i.files)),s=pn.serializeUploads(i);let u={type:"form",event:r,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",u,h=>{if(pe.showError(i,this.liveSocket.binding(xy)),pe.isUploadInput(i)&&pe.isAutoUpload(i)){if(pn.filesAwaitingPreflight(i).length>0){let[f,m]=l();this.uploadFiles(i.form,e,f,a,g=>{o&&o(h),this.triggerAwaitingSubmit(i.form)})}}else o&&o(h)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,r,n,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,r,n])=>e.isSameNode(i))}scheduleSubmit(i,e,t,r){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,r])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,r])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(yg(d,`${this.binding(Sy)}=ignore`,d.form)||yg(d,"data-phx-update=ignore",d.form)),r=d=>d.hasAttribute(this.binding(Yk)),n=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(r),l=s.filter(n).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(cy,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(Hk,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(cy,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(Ez),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,r,n,o){let s=()=>this.disableForm(i,n),a=this.targetComponentID(i,e);if(pn.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,e,t,r,n,o);return this.scheduleSubmit(i,l,n,d)}else if(pn.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,n];this.uploadFiles(i,e,l,a,u=>{let h=this.extractMeta(i),f=_y(i,ue({submitter:r},h));this.pushWithReply(d,"event",{type:"form",event:t,value:f,cid:a},o)})}else if(!(i.hasAttribute(rs)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=_y(i,ue({submitter:r},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,r,n){let o=this.joinCount,s=pn.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new pn(l,this,()=>{a--,a===0&&n()});this.uploaders[l]=c;let d=c.entries().map(h=>h.toPreflightPayload()),u={ref:l.getAttribute(Yc),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[f,m]=h.error;this.log("upload",()=>[`error for entry ${f}`,m])}else{let f=m=>{this.channel.onError(()=>{this.joinCount===o&&m()})};c.initAdapterUpload(h,f,this.liveSocket)}})})}dispatchUploads(i,e,t){let r=this.targetCtxElement(i)||this.el,n=pe.findUploadInputs(r).filter(o=>o.name===e);n.length===0?Ro(`no live file inputs found matching the name "${e}"`):n.length>1?Ro(`duplicate live file inputs found matching the name "${e}"`):pe.dispatchEvent(n[0],Xz,{detail:{files:t}})}targetCtxElement(i){if(Tl(i)){let[e]=pe.findComponentNodeList(this.el,i);return e}else return i||null}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(r,n)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>pe.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;s.forEach(c=>c.hasAttribute(Yc)&&pn.clearFiles(c));let a=s.find(c=>c.type!=="hidden")||s[0],l=i.getAttribute(this.binding(Az))||i.getAttribute(this.binding("change"));Ms.exec("change",l,r,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let r=this.liveSocket.setPendingLink(i),n=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(n,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(i,null,t,r):(this.liveSocket.commitPendingLink(r)&&(this.href=i),this.applyPendingUpdates(),t&&t(r))})});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,pe.all(this.el,`form[${e}]`).filter(r=>r.id&&this.ownsElement(r)).filter(r=>r.elements.length>0).filter(r=>r.getAttribute(this.binding(Az))!=="ignore").map(r=>{let n=r.getAttribute(e).replaceAll(/([\[\]"])/g,"\\$1"),o=t.content.querySelector(`form[id="${r.id}"][${e}="${n}"]`);return o?[r,o,this.targetComponentID(o)]:[r,r,this.targetComponentID(r)]}).filter(([r,n,o])=>n)}maybePushComponentsDestroyed(i){let e=i.filter(t=>pe.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(r=>e.indexOf(r)!==-1);let t=e.filter(r=>pe.findComponentNodeList(this.el,r).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},r=>{this.rendered.pruneCIDs(r.cids)})}))}ownsElement(i){let e=i.closest(Tf);return i.getAttribute(kf)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,r,n={}){pe.putPrivate(i,Cy,!0);let o=this.liveSocket.binding(xy),s=Array.from(i.elements);s.forEach(a=>pe.putPrivate(a,Cy,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,r,n,()=>{s.forEach(a=>pe.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},oB=class{constructor(i,e,t={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` +`),t.push(r))}),t.forEach(r=>r.remove())}},replaceRootContainer(i,e,t){let r=new Set(["id",Xc,_g,Zk,wg]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(n=>!r.has(n.name.toLowerCase())).forEach(n=>i.removeAttribute(n.name)),Object.keys(t).filter(n=>!r.has(n.toLowerCase())).forEach(n=>i.setAttribute(n,t[n])),i;{let n=document.createElement(e);return Object.keys(t).forEach(o=>n.setAttribute(o,t[o])),r.forEach(o=>n.setAttribute(o,i.getAttribute(o))),n.innerHTML=i.innerHTML,i.replaceWith(n),n}},getSticky(i,e,t){let r=(is.private(i,"sticky")||[]).find(([n])=>e===n);if(r){let[n,o,s]=r;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([r,n])=>r!==e))},putSticky(i,e,t){let r=t(i);this.updatePrivate(i,"sticky",[],n=>{let o=n.findIndex(([s])=>e===s);return o>=0?n[o]=[e,t,r]:n.push([e,t,r]),n})},applyStickyOperations(i){let e=is.private(i,"sticky");e&&e.forEach(([t,r,n])=>this.putSticky(i,t,r))}},pe=is,Kk=class{static isActive(i,e){let t=e._phxRef===void 0,n=i.getAttribute(Gk).split(",").indexOf(pn.genFileRef(e))>=0;return e.size>0&&(t||n)}static isPreflighted(i,e){return i.getAttribute(Qk).split(",").indexOf(pn.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=pn.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(yy,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,()=>{pn.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(yy,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),pe.isAutoUpload(this.fileEl)||pn.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(yy,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(Gk).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]||Ro(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:eoe}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Ro(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},toe=0,pn=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(toe++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let r=this.activeFiles(i).find(n=>this.genFileRef(n)===e);t(URL.createObjectURL(r))}static hasUploadsInProgress(i){let e=0;return pe.findUploadInputs(i).forEach(t=>{t.getAttribute(Qk)!==t.getAttribute(Fne)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(r=>{let n={path:i.name},o=i.getAttribute(Yc);t[o]=t[o]||[],n.ref=this.genFileRef(r),n.last_modified=r.lastModified,n.name=r.name||n.ref,n.relative_path=r.webkitRelativePath,n.type=r.type,n.size=r.size,typeof r.meta=="function"&&(n.meta=r.meta()),t[o].push(n)}),t}static clearFiles(i){i.value=null,i.removeAttribute(Yc),pe.putPrivate(i,"files",[])}static untrackFile(i,e){pe.putPrivate(i,"files",pe.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let r=e.filter(n=>!this.activeFiles(i).find(o=>Object.is(o,n)));pe.putPrivate(i,"files",this.activeFiles(i).concat(r)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),pe.putPrivate(i,"files",e)}static activeFileInputs(i){let e=pe.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return(pe.private(i,"files")||[]).filter(e=>Kk.isActive(i,e))}static inputsAwaitingPreflight(i){let e=pe.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!Kk.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(pn.filesAwaitingPreflight(i)||[]).map(r=>new Kk(i,r,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(n=>(n.zipPostFlight(i),n.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),n));let r=this._entries.reduce((n,o)=>{if(!o.meta)return n;let{name:s,callback:a}=o.uploader(t.uploaders);return n[s]=n[s]||{callback:a,entries:[]},n[s].entries.push(o),n},{});for(let n in r){let{callback:o,entries:s}=r[n];o(s,e,i,t)}}},ioe={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}}},Ef=ioe,nB={LiveFileUpload:{activeRefs(){return this.el.getAttribute(Gk)},preflightedRefs(){return this.el.getAttribute(Qk)},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(yy))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Yc)),pn.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",()=>Ef.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Ef.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Ef.focusFirst(this.el)}}},Bz=()=>document.documentElement.scrollTop||document.body.scrollTop,Jk=()=>window.innerHeight||document.documentElement.clientHeight,roe=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=Jk()},noe=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=Jk()},Hz=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=Jk()};nB.InfiniteScroll={mounted(){let i=Bz(),e=!1,t=500,r=null,n=this.throttle(t,(a,l)=>{r=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{r=null})}),o=this.throttle(t,(a,l)=>{r=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,Hz(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{r=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{r=null,Hz(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=Bz();if(r)return i=l,r();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,f=this.el.firstElementChild,m=l<i,g=l>i;m&&d&&!e&&c.top>=0?(e=!0,n(d,f)):g&&e&&c.top<=0&&(e=!1),d&&m&&roe(f)?o(d,f):u&&g&&noe(h)&&s(u,h),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,r;return(...n)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(r&&(clearTimeout(r),r=null),t=o,e(...n)):r||(r=setTimeout(()=>{t=Date.now(),r=null,e(...n)},s))}}};var ooe=nB,soe=class{constructor(i,e,t){let r=new Set,n=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(r.add(s.id),n.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=[...n].filter(s=>!r.has(s))}perform(){let i=pe.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?Gc(document.getElementById(e.previousElementId),t=>{Gc(document.getElementById(e.elementId),r=>{r.previousElementSibling&&r.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",r)})}):Gc(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{Gc(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},Uz=11;function aoe(i,e){var t=e.attributes,r,n,o,s,a;if(!(e.nodeType===Uz||i.nodeType===Uz)){for(var l=t.length-1;l>=0;l--)r=t[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=i.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),i.setAttributeNS(o,n,s))):(a=i.getAttribute(n),a!==s&&i.setAttribute(n,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)r=c[d],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||i.removeAttributeNS(o,n)):e.hasAttribute(n)||i.removeAttribute(n)}}var my,loe="http://www.w3.org/1999/xhtml",ao=typeof document=="undefined"?void 0:document,coe=!!ao&&"content"in ao.createElement("template"),doe=!!ao&&ao.createRange&&"createContextualFragment"in ao.createRange();function uoe(i){var e=ao.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function hoe(i){my||(my=ao.createRange(),my.selectNode(ao.body));var e=my.createContextualFragment(i);return e.childNodes[0]}function foe(i){var e=ao.createElement("body");return e.innerHTML=i,e.childNodes[0]}function poe(i){return i=i.trim(),coe?uoe(i):doe?hoe(i):foe(i)}function gy(i,e){var t=i.nodeName,r=e.nodeName,n,o;return t===r?!0:(n=t.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?t===r.toUpperCase():o<=90&&n>=97?r===t.toUpperCase():!1)}function moe(i,e){return!e||e===loe?ao.createElement(i):ao.createElementNS(e,i)}function goe(i,e){for(var t=i.firstChild;t;){var r=t.nextSibling;e.appendChild(t),t=r}return e}function $k(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var jz={OPTION:function(i,e){var t=i.parentNode;if(t){var r=t.nodeName.toUpperCase();r==="OPTGROUP"&&(t=t.parentNode,r=t&&t.nodeName.toUpperCase()),r==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}$k(i,e,"selected")},INPUT:function(i,e){$k(i,e,"checked"),$k(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 r=i.firstChild;if(r){var n=r.nodeValue;if(n==t||!t&&n==i.placeholder)return;r.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,r=0,n=i.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){t=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}i.selectedIndex=t}}},bg=1,Wz=11,Vz=3,qz=8;function $c(){}function boe(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function voe(i){return function(t,r,n){if(n||(n={}),typeof r=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=r;r=ao.createElement("html"),r.innerHTML=o}else r=poe(r);else r.nodeType===Wz&&(r=r.firstElementChild);var s=n.getNodeKey||boe,a=n.onBeforeNodeAdded||$c,l=n.onNodeAdded||$c,c=n.onBeforeElUpdated||$c,d=n.onElUpdated||$c,u=n.onBeforeNodeDiscarded||$c,h=n.onNodeDiscarded||$c,f=n.onBeforeElChildrenUpdated||$c,m=n.skipFromChildren||$c,g=n.addChild||function(be,we){return be.appendChild(we)},w=n.childrenOnly===!0,_=Object.create(null),E=[];function A(be){E.push(be)}function L(be,we){if(be.nodeType===bg)for(var X=be.firstChild;X;){var R=void 0;we&&(R=s(X))?A(R):(h(X),X.firstChild&&L(X,we)),X=X.nextSibling}}function O(be,we,X){u(be)!==!1&&(we&&we.removeChild(be),h(be),L(be,X))}function U(be){if(be.nodeType===bg||be.nodeType===Wz)for(var we=be.firstChild;we;){var X=s(we);X&&(_[X]=we),U(we),we=we.nextSibling}}U(t);function Y(be){l(be);for(var we=be.firstChild;we;){var X=we.nextSibling,R=s(we);if(R){var ne=_[R];ne&&gy(we,ne)?(we.parentNode.replaceChild(ne,we),te(ne,we)):Y(we)}else Y(we);we=X}}function oe(be,we,X){for(;we;){var R=we.nextSibling;(X=s(we))?A(X):O(we,be,!0),we=R}}function te(be,we,X){var R=s(we);R&&delete _[R],!(!X&&(c(be,we)===!1||(i(be,we),d(be),f(be,we)===!1)))&&(be.nodeName!=="TEXTAREA"?Z(be,we):jz.TEXTAREA(be,we))}function Z(be,we){var X=m(be),R=we.firstChild,ne=be.firstChild,me,G,Et,Ot,ai;e:for(;R;){for(Ot=R.nextSibling,me=s(R);!X&≠){if(Et=ne.nextSibling,R.isSameNode&&R.isSameNode(ne)){R=Ot,ne=Et;continue e}G=s(ne);var Ti=ne.nodeType,kt=void 0;if(Ti===R.nodeType&&(Ti===bg?(me?me!==G&&((ai=_[me])?Et===ai?kt=!1:(be.insertBefore(ai,ne),G?A(G):O(ne,be,!0),ne=ai):kt=!1):G&&(kt=!1),kt=kt!==!1&&gy(ne,R),kt&&te(ne,R)):(Ti===Vz||Ti==qz)&&(kt=!0,ne.nodeValue!==R.nodeValue&&(ne.nodeValue=R.nodeValue))),kt){R=Ot,ne=Et;continue e}G?A(G):O(ne,be,!0),ne=Et}if(me&&(ai=_[me])&&gy(ai,R))X||g(be,ai),te(ai,R);else{var Ei=a(R);Ei!==!1&&(Ei&&(R=Ei),R.actualize&&(R=R.actualize(be.ownerDocument||ao)),g(be,R),Y(R))}R=Ot,ne=Et}oe(be,ne,G);var fi=jz[be.nodeName];fi&&fi(be,we)}var ve=t,Pe=ve.nodeType,Ee=r.nodeType;if(!w){if(Pe===bg)Ee===bg?gy(t,r)||(h(t),ve=goe(t,moe(r.nodeName,r.namespaceURI))):ve=r;else if(Pe===Vz||Pe===qz){if(Ee===Pe)return ve.nodeValue!==r.nodeValue&&(ve.nodeValue=r.nodeValue),ve;ve=r}}if(ve===r)h(t);else{if(r.isSameNode&&r.isSameNode(ve))return;if(te(ve,r,w),E)for(var Oe=0,Xe=E.length;Oe<Xe;Oe++){var dt=_[E[Oe]];dt&&O(dt,dt.parentNode,!1)}}return!w&&ve!==t&&t.parentNode&&(ve.actualize&&(ve=ve.actualize(t.ownerDocument||ao)),t.parentNode.replaceChild(ve,t)),ve}}var _oe=voe(aoe),Kz=_oe,by=class{static patchEl(i,e,t){Kz(i,e,{childrenOnly:!1,onBeforeElUpdated:(r,n)=>{if(t&&t.isSameNode(r)&&pe.isFormInput(r))return pe.mergeFocusedInput(r,n),!1}})}constructor(i,e,t,r,n,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=r,this.streams=n,this.streamInserts={},this.targetCID=o,this.cidPatch=Tl(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(Sy);pe.all(this.container,`[${i}=${uy}]`,e=>e.innerHTML=""),pe.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(Ez,"")})}perform(i){let{view:e,liveSocket:t,container:r,html:n}=this,o=this.isCIDPatch()?this.targetCIDContainer(n):r;if(this.isCIDPatch()&&!o)return;let s=t.getActiveElement(),{selectionStart:a,selectionEnd:l}=s&&pe.hasSelectionRange(s)?s:{},c=t.binding(Sy),d=t.binding(xy),u=t.binding(Xk),h=t.binding(eB),f=t.binding(tB),m=t.binding(zne),g=[],w=[],_=[],E=[],A=null;return this.trackBefore("added",r),this.trackBefore("updated",r,r),t.time("morphdom",()=>{this.streams.forEach(([L,O,U,Y])=>{Object.entries(O).forEach(([oe,[te,Z]])=>{this.streamInserts[oe]={ref:L,streamAt:te,limit:Z,resetKept:!1}}),Y!==void 0&&pe.all(r,`[${pg}="${L}"]`,oe=>{O[oe.id]?this.streamInserts[oe.id].resetKept=!0:this.removeStreamChildElement(oe)}),U.forEach(oe=>{let te=r.querySelector(`[id="${oe}"]`);te&&this.removeStreamChildElement(te)})}),Kz(o,n,{childrenOnly:o.getAttribute(Il)===null,getNodeKey:L=>pe.isPhxDestroyed(L)?null:i?L.id:L.id||L.getAttribute&&L.getAttribute(Jz),skipFromChildren:L=>L.getAttribute(c)===uy,addChild:(L,O)=>{let{ref:U,streamAt:Y,limit:oe}=this.getStreamInsert(O);if(U===void 0)return L.appendChild(O);if(pe.putSticky(O,pg,ve=>ve.setAttribute(pg,U)),Y===0)L.insertAdjacentElement("afterbegin",O);else if(Y===-1)L.appendChild(O);else if(Y>0){let ve=Array.from(L.children)[Y];L.insertBefore(O,ve)}let te=oe!==null&&Array.from(L.children),Z=[];oe&&oe<0&&te.length>oe*-1?Z=te.slice(0,te.length+oe):oe&&oe>=0&&te.length>oe&&(Z=te.slice(oe)),Z.forEach(ve=>{this.streamInserts[ve.id]||this.removeStreamChildElement(ve)})},onBeforeNodeAdded:L=>(pe.maybeAddPrivateHooks(L,h,f),this.trackBefore("added",L),L),onNodeAdded:L=>{L.getAttribute&&this.maybeReOrderStream(L),L instanceof HTMLImageElement&&L.srcset?L.srcset=L.srcset:L instanceof HTMLVideoElement&&L.autoplay&&L.play(),pe.isNowTriggerFormExternal(L,m)&&(A=L),L.getAttribute&&L.getAttribute("name")&&pe.isFormInput(L)&&w.push(L),(pe.isPhxChild(L)&&e.ownsElement(L)||pe.isPhxSticky(L)&&e.ownsElement(L.parentNode))&&this.trackAfter("phxChildAdded",L),g.push(L)},onBeforeElChildrenUpdated:(L,O)=>{if(L.getAttribute(c)===uy){let U=Array.from(O.children).map(Y=>Y.id);Array.from(L.children).filter(Y=>{let{resetKept:oe}=this.getStreamInsert(Y);return oe}).sort((Y,oe)=>{let te=U.indexOf(Y.id),Z=U.indexOf(oe.id);return te===Z?0:te<Z?-1:1}).forEach(Y=>L.appendChild(Y))}},onNodeDiscarded:L=>this.onNodeDiscarded(L),onBeforeNodeDiscarded:L=>L.getAttribute&&L.getAttribute(Ez)!==null?!0:!(L.parentElement!==null&&L.id&&pe.isPhxUpdate(L.parentElement,c,[uy,"append","prepend"])||this.maybePendingRemove(L)||this.skipCIDSibling(L)),onElUpdated:L=>{pe.isNowTriggerFormExternal(L,m)&&(A=L),_.push(L),this.maybeReOrderStream(L)},onBeforeElUpdated:(L,O)=>{if(pe.maybeAddPrivateHooks(O,h,f),pe.cleanChildNodes(O,c),this.skipCIDSibling(O)||pe.isPhxSticky(L))return!1;if(pe.isIgnored(L,c)||L.form&&L.form.isSameNode(A))return this.trackBefore("updated",L,O),pe.mergeAttrs(L,O,{isIgnored:!0}),_.push(L),pe.applyStickyOperations(L),!1;if(L.type==="number"&&L.validity&&L.validity.badInput)return!1;if(!pe.syncPendingRef(L,O,u))return pe.isUploadInput(L)&&(this.trackBefore("updated",L,O),_.push(L)),pe.applyStickyOperations(L),!1;if(pe.isPhxChild(O)){let Y=L.getAttribute(Xc);return pe.mergeAttrs(L,O,{exclude:[_g]}),Y!==""&&L.setAttribute(Xc,Y),L.setAttribute(wg,this.rootID),pe.applyStickyOperations(L),!1}return pe.copyPrivates(O,L),s&&L.isSameNode(s)&&pe.isFormInput(L)&&L.type!=="hidden"?(this.trackBefore("updated",L,O),pe.mergeFocusedInput(L,O),pe.syncAttrsToProps(L),_.push(L),pe.applyStickyOperations(L),w.push(L),!1):(pe.isPhxUpdate(O,c,["append","prepend"])&&E.push(new soe(L,O,O.getAttribute(c))),pe.syncAttrsToProps(O),pe.applyStickyOperations(O),O.getAttribute("name")&&pe.isFormInput(O)&&w.push(O),this.trackBefore("updated",L,O),!0)}})}),t.isDebugEnabled()&&Qne(),E.length>0&&t.time("post-morph append/prepend restoration",()=>{E.forEach(L=>L.perform())}),w.forEach(L=>{pe.maybeHideFeedback(o,L,d)}),t.silenceEvents(()=>pe.restoreFocus(s,a,l)),pe.dispatchEvent(document,"phx:update"),g.forEach(L=>this.trackAfter("added",L)),_.forEach(L=>this.trackAfter("updated",L)),this.transitionPendingRemoves(),A&&(t.unload(),Object.getPrototypeOf(A).submit.call(A)),!0}onNodeDiscarded(i){(pe.isPhxChild(i)||pe.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:r}=this.getStreamInsert(i);if(t!==void 0){if(pe.putSticky(i,pg,n=>n.setAttribute(pg,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let n=Array.from(i.parentElement.children),o=n.indexOf(i);if(t>=n.length-1)i.parentElement.appendChild(i);else{let s=n[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 r=pe.firstPhxChild(t);r&&e.destroyViewByEl(r),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.hasAttribute(Zz)}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=pe.findComponentNodeList(this.container,this.targetCID);return t.length===0&&pe.childNodeLength(i)===1?e:e&&e.parentNode}indexOf(i,e){return Array.from(i.children).indexOf(e)}},yoe=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),woe=new Set([">","/"," ",` +`," ","\r"]),xoe=new Set(["'",'"']),$z=(i,e,t)=>{let r=0,n=!1,o,s,a,l,c,d;for(;r<i.length;){let f=i.charAt(r);if(n)f==="-"&&i.slice(r,r+3)==="-->"?(n=!1,r+=3):r++;else if(f==="<"&&i.slice(r,r+4)==="<!--")n=!0,r+=4;else if(f==="<"){o=i.slice(0,r);let m=r;for(r++,r;r<i.length&&!woe.has(i.charAt(r));r++);for(l=r,a=i.slice(m+1,l),r++,r;r<i.length&&i.charAt(r)!==">";r++)if(i.charAt(r)==="="){let g=i.slice(r-3,r)===" id";r++;let w=i.charAt(r);if(xoe.has(w)){let _=r;for(r++,r;r<i.length&&i.charAt(r)!==w;r++);if(g){c=i.slice(_+1,r);break}}}break}else r++}if(!a)throw new Error(`malformed html ${i}`);let u=i.length-1;for(n=!1;u>=o.length+a.length;){let f=i.charAt(u);if(n)f==="-"&&i.slice(u-3,u)==="<!-"?(n=!1,u-=4):u-=1;else if(f===">"&&i.slice(u-2,u)==="--")n=!0,u-=3;else{if(f===">")break;u-=1}}s=i.slice(u+1,i.length);let h=Object.keys(e).map(f=>e[f]===!0?f:`${f}="${e[f]}"`).join(" ");if(t){let f=c?` id="${c}"`:"";yoe.has(a)?d=`<${a}${f}${h===""?"":" "}${h}/>`:d=`<${a}${f}${h===""?"":" "}${h}></${a}>`}else{let f=i.slice(l,u+1);d=`<${a}${h===""?"":" "}${h}${f}`}return[d,o,s]},Gz=class{static extract(i){let{[Pz]:e,[Rz]:t,[Oz]:r}=i;return delete i[Pz],delete i[Rz],delete i[Oz],{diff:i,title:r,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.magicId=0,this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[No],i,!0,{});return[e,t]}recursiveToString(i,e=i[No],t,r,n){t=t?new Set(t):null;let o={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,o,r,n),[o.buffer,o.streams]}componentCIDs(i){return Object.keys(i[No]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[No]?Object.keys(i).length===1:!1}getComponent(i,e){return i[No][e]}mergeDiff(i){let e=i[No],t={};if(delete i[No],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[No]=this.rendered[No]||{},e){let r=this.rendered[No];for(let n in e)e[n]=this.cachedFindComponent(n,e[n],r,e,t);for(let n in e)r[n]=e[n];i[No]=e}}cachedFindComponent(i,e,t,r,n){if(n[i])return n[i];{let o,s,a=e[Sa];if(Tl(a)){let l;a>0?l=this.cachedFindComponent(a,r[a],t,r,n):l=t[-a],s=l[Sa],o=this.cloneMerge(l,e,!0),o[Sa]=s}else o=e[Sa]!==void 0||t[i]===void 0?e:this.cloneMerge(t[i],e,!1);return n[i]=o,o}}mutableMerge(i,e){return e[Sa]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let r=e[t],n=i[t];gg(r)&&r[Sa]===void 0&&gg(n)?this.doMutableMerge(n,r):i[t]=r}i[Vk]&&(i.newRender=!0)}cloneMerge(i,e,t){let r=ue(ue({},i),e);for(let n in r){let o=e[n],s=i[n];gg(o)&&o[Sa]===void 0&&gg(s)&&(r[n]=this.cloneMerge(s,o,t))}return t?(delete r.magicId,delete r.newRender):i[Vk]&&(r.newRender=!0),r}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[No],i,null),[r,n,o]=$z(e,{});return[r,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[No][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[Sa]}templateStatic(i,e){return typeof i=="number"?e[i]:i}nextMagicID(){return this.magicId++,`${this.parentViewId()}-${this.magicId}`}toOutputBuffer(i,e,t,r,n={}){if(i[py])return this.comprehensionToBuffer(i,e,t);let{[Sa]:o}=i;o=this.templateStatic(o,e);let s=i[Vk],a=t.buffer;s&&(t.buffer=""),r&&s&&!i.magicId&&(i.newRender=!0,i.magicId=this.nextMagicID()),t.buffer+=o[0];for(let l=1;l<o.length;l++)this.dynamicToBuffer(i[l-1],e,t,r),t.buffer+=o[l];if(s){let l=!1,c;r||Object.keys(n).length>0?(l=!i.newRender,c=ue({[Jz]:i.magicId},n)):c=n,l&&(c[Zz]=!0);let[d,u,h]=$z(t.buffer,c,l);i.newRender=!1,t.buffer=a+u+d+h}}comprehensionToBuffer(i,e,t){let{[py]:r,[Sa]:n,[Fz]:o}=i,[s,a,l,c]=o||[null,{},[],null];n=this.templateStatic(n,e);let d=e||i[Yne];for(let u=0;u<r.length;u++){let h=r[u];t.buffer+=n[0];for(let f=1;f<n.length;f++){let m=!1;this.dynamicToBuffer(h[f-1],d,t,m),t.buffer+=n[f]}}o!==void 0&&(i[py].length>0||l.length>0||c)&&(delete i[Fz],i[py]=[],t.streams.add(o))}dynamicToBuffer(i,e,t,r){if(typeof i=="number"){let[n,o]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...o])}else gg(i)?this.toOutputBuffer(i,e,t,r,{}):t.buffer+=i}recursiveCIDToString(i,e,t){let r=i[e]||Ro(`no component for CID ${e}`,i),n={[Il]:e},o=t&&!t.has(e);r.newRender=!o,r.magicId=`${this.parentViewId()}-c-${e}`;let s=!0,[a,l]=this.recursiveToString(r,i,t,s,n);return[a,l]}},Coe=1,vg=class{static makeID(){return Coe++}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 r in this.__callbacks)this[r]=this.__callbacks[r]}__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={},r=function(){}){return this.__view.withinTargets(i,(n,o)=>n.pushHookEvent(this.el,o,e,t,r))}handleEvent(i,e){let t=(r,n)=>n?i:e(r.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,(r,n)=>{r.dispatchUploads(n,e,t)})}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},vy=null,Soe={exec(i,e,t,r,n){let[o,s]=n||[null,{callback:n&&n.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(r,c).forEach(d=>{this[`exec_${l}`](i,e,t,r,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,r,n,[o,s]){(s?pe.all(document,s):[r]).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,r,n,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=r,pe.dispatchEvent(n,s,{detail:a,bubbles:l})},exec_push(i,e,t,r,n,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:u,dispatcher:h,callback:f}=o,m={loading:d,value:u,target:l,page_loading:!!c},g=i==="change"&&h?h:r,w=l||g.getAttribute(t.binding("target"))||g;t.withinTargets(w,(_,E)=>{if(i==="change"){let{newCid:A,_target:L}=o;L=L||(pe.isFormInput(r)?r.name:void 0),L&&(m._target=L),_.pushInput(r,E,A,s||e,m,f)}else if(i==="submit"){let{submitter:A}=o;_.submitForm(r,E,s||e,A,m,f)}else _.pushEvent(i,r,E,s||e,a,m,f)})},exec_navigate(i,e,t,r,n,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,r,n,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",r)},exec_focus(i,e,t,r,n){window.requestAnimationFrame(()=>Ef.attemptFocus(n))},exec_focus_first(i,e,t,r,n){window.requestAnimationFrame(()=>Ef.focusFirstInteractive(n)||Ef.focusFirst(n))},exec_push_focus(i,e,t,r,n){window.requestAnimationFrame(()=>vy=n||r)},exec_pop_focus(i,e,t,r,n){window.requestAnimationFrame(()=>{vy&&vy.focus(),vy=null})},exec_add_class(i,e,t,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,o,[],s,a,t)},exec_remove_class(i,e,t,r,n,{names:o,transition:s,time:a}){this.addOrRemoveClasses(n,[],o,s,a,t)},exec_transition(i,e,t,r,n,{time:o,transition:s}){this.addOrRemoveClasses(n,[],[],s,o,t)},exec_toggle(i,e,t,r,n,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,n,o,s,a,l)},exec_show(i,e,t,r,n,{display:o,transition:s,time:a}){this.show(i,t,n,o,s,a)},exec_hide(i,e,t,r,n,{display:o,transition:s,time:a}){this.hide(i,t,n,o,s,a)},exec_set_attr(i,e,t,r,n,{attr:[o,s]}){this.setOrRemoveAttrs(n,[[o,s]],[])},exec_remove_attr(i,e,t,r,n,{attr:o}){this.setOrRemoveAttrs(n,[],[o])},show(i,e,t,r,n,o){this.isVisible(t)||this.toggle(i,e,t,r,n,null,o)},hide(i,e,t,r,n,o){this.isVisible(t)&&this.toggle(i,e,t,r,null,n,o)},toggle(i,e,t,r,n,o,s){let[a,l,c]=n||[[],[],[]],[d,u,h]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let f=()=>{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,f,()=>{this.addOrRemoveClasses(t,[],d.concat(h)),pe.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let f=()=>{this.addOrRemoveClasses(t,l,d.concat(u).concat(h));let m=r||this.defaultDisplay(t);pe.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,f,()=>{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")),pe.putSticky(t,"toggle",f=>f.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let f=r||this.defaultDisplay(t);pe.putSticky(t,"toggle",m=>m.style.display=f),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,r,n,o){let[s,a,l]=r||[[],[],[]];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(n,c,d)}window.requestAnimationFrame(()=>{let[c,d]=pe.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)),f=c.filter(g=>t.indexOf(g)<0).concat(u),m=d.filter(g=>e.indexOf(g)<0).concat(h);pe.putSticky(i,"classes",g=>(g.classList.remove(...m),g.classList.add(...f),[f,m]))})},setOrRemoveAttrs(i,e,t){let[r,n]=pe.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=r.filter(([l,c])=>!o.includes(l)).concat(e),a=n.filter(l=>!o.includes(l)).concat(t);pe.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?pe.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},Ms=Soe,_y=(i,e,t=[])=>{let l=e,{submitter:r}=l,n=so(l,["submitter"]),o=new FormData(i);r&&r.hasAttribute("name")&&r.form&&r.form===i&&o.append(r.name,r.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 n)a.append(c,n[c]);return a.toString()},oB=class{constructor(i,e,t,r,n){this.isDead=!1,this.liveSocket=e,this.flash=r,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(n),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(Zk)}connectParams(i){let e=this.liveSocket.params(this.el),t=pe.all(document,`[${this.binding(Pne)}]`).map(r=>r.src||r.href).filter(r=>typeof r=="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(Xc)}getStatic(){let i=this.el.getAttribute(_g);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])};pe.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(Iz,hg,ly,Lz,Hk),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(hg)}}execAll(i){pe.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(Iz),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(Tl(i))pe.findComponentNodeList(this.el,i).length===0?Ro(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Ro(`nothing found matching the phx-target selector "${i}"`),t.forEach(r=>this.liveSocket.owner(r,n=>e(n,r)))}}applyDiff(i,e,t){this.log(i,()=>["",wy(e)]);let{diff:r,reply:n,events:o,title:s}=Gz.extract(e);t({diff:r,reply:n,events:o}),s&&window.requestAnimationFrame(()=>pe.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[r,n]=t;this.el=pe.replaceRootContainer(this.el,r,n)}this.childJoins=0,this.joinPending=!0,this.flash=null,ka.dropLocal(this.liveSocket.localStorage,window.location.pathname,Yz),this.applyDiff("mount",e,({diff:r,events:n})=>{this.rendered=new Gz(this.id,r);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,n)})}):this.onJoinComplete(i,o,s,n)})}dropPendingRefs(){pe.all(document,`[${xu}="${this.id}"][${rs}]`,i=>{i.removeAttribute(rs),i.removeAttribute(xu)})}onJoinComplete({live_patch:i},e,t,r){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,r);pe.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(_g);return a&&o.setAttribute(_g,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,r)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,r)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,r)])}attachTrueDocEl(){this.el=pe.byId(this.id),this.el.setAttribute(wg,this.root.id)}execNewMounted(){let i=this.binding(eB),e=this.binding(tB);pe.all(this.el,`[${i}], [${e}]`,t=>{pe.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),pe.all(this.el,`[${this.binding(fg)}], [data-phx-${fg}]`,t=>{this.maybeAddNewHook(t)}),pe.all(this.el,`[${this.binding(Mz)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,r){this.attachTrueDocEl();let n=new by(this,this.el,this.id,e,t,null);if(n.markPrunableContentForRemoval(),this.performPatch(n,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(r),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),r=t&&pe.isIgnored(i,this.binding(Sy));if(t&&!i.isEqualNode(e)&&!(r&&Jne(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(Mz)),t=e&&pe.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),pe.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e,t=!1){let r=[],n=!1,o=new Set;return i.after("added",s=>{this.liveSocket.triggerDOM("onNodeAdded",[s]),this.maybeAddNewHook(s),s.getAttribute&&this.maybeMounted(s)}),i.after("phxChildAdded",s=>{pe.isPhxSticky(s)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(s,a)=>{this.triggerBeforeUpdateHook(s,a)&&o.add(s.id)}),i.after("updated",s=>{o.has(s.id)&&this.getHook(s).__updated()}),i.after("discarded",s=>{s.nodeType===Node.ELEMENT_NODE&&r.push(s)}),i.after("transitionsDiscarded",s=>this.afterElementsRemoved(s,e)),i.perform(t),this.afterElementsRemoved(r,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(r=>{let n=pe.all(r,`[${Il}]`),o=pe.all(r,`[${this.binding(fg)}]`);n.concat(r).forEach(s=>{let a=this.componentID(s);Tl(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(r).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){pe.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(kf)][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 oB(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",()=>{pe.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(n=>{this.componentPatch(this.rendered.getComponent(i,n),n)&&(t=!0)})}):zz(i)||this.liveSocket.time("full patch complete",()=>{let[r,n]=this.renderContainer(i,"update"),o=new by(this,this.el,this.id,r,n,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,r=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[n,o]=this.rendered.toString(r);return[`<${t}>${n}</${t}>`,o]})}componentPatch(i,e){if(zz(i))return!1;let[t,r]=this.rendered.componentToString(e),n=new by(this,this.el,this.id,t,r,e);return this.performPatch(n,!0)}getHook(i){return this.viewHooks[vg.elementID(i)]}addHook(i){if(vg.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${fg}`)||i.getAttribute(this.binding(fg));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Ro(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let r=new vg(this,i,t);return this.viewHooks[vg.elementID(r.el)]=r,r}else e!==null&&Ro(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[vg.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:r}=i,n=this.expandURL(e);this.liveSocket.historyRedirect(n,t,r)}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([hg,ly,Hk]),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(qne)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([hg,ly,Hk]):this.displayError([hg,ly,Lz]))}displayError(i){this.isMain()&&pe.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,r=function(){}){if(!this.isConnected())return;let[n,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(Tz))!==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,$ne).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(),r(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:u,events:h})=>{n!==null&&this.undoRefs(n),this.update(d,h),c(u)})}):(n!==null&&this.undoRefs(n),c(null))}))}undoRefs(i){this.isConnected()&&pe.all(document,`[${xu}="${this.id}"][${rs}="${i}"]`,e=>{let t=e.getAttribute(cy);e.removeAttribute(rs),e.removeAttribute(xu),e.getAttribute(Uk)!==null&&(e.readOnly=!1,e.removeAttribute(Uk)),t!==null&&(e.disabled=t==="true",e.removeAttribute(cy)),Xz.forEach(o=>pe.removeClass(e,o));let r=e.getAttribute(dy);r!==null&&(e.innerText=r,e.removeAttribute(dy));let n=pe.private(e,rs);if(n){let o=this.triggerBeforeUpdateHook(e,n);by.patchEl(e,n,this.liveSocket.getActiveElement()),o&&o.__updated(),pe.deletePrivate(e,rs)}})}putRef(i,e,t={}){let r=this.ref++,n=this.binding(Xk);return t.loading&&(i=i.concat(pe.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(rs,r),o.setAttribute(xu,this.el.id);let s=o.getAttribute(n);s!==null&&(o.getAttribute(dy)||o.setAttribute(dy,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[r,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Il);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(Tl(e))return e;let r=t.target||i.getAttribute(this.binding("target"));return Tl(r)?parseInt(r):e&&(r!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return Tl(i)?i:i?Gc(i.closest(`[${Il}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,r,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,r]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:r,cid:this.closestComponentID(e)},(l,c)=>n(c,o)),o}extractMeta(i,e,t){let r=this.binding("value-");for(let n=0;n<i.attributes.length;n++){e||(e={});let o=i.attributes[n].name;o.startsWith(r)&&(e[o.replace(r,"")]=i.getAttribute(o))}if(i.value!==void 0&&!(i instanceof HTMLFormElement)&&(e||(e={}),e.value=i.value,i.tagName==="INPUT"&&iB.indexOf(i.type)>=0&&!i.checked&&delete e.value),t){e||(e={});for(let n in t)e[n]=t[n]}return e}pushEvent(i,e,t,r,n,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:r,value:this.extractMeta(e,n,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,r=function(){}){this.liveSocket.withinOwners(i.form,(n,o)=>{n.pushWithReply(null,"progress",{event:i.getAttribute(n.binding(Wne)),ref:i.getAttribute(Yc),entry_ref:e,progress:t,cid:n.targetComponentID(i.form,o)},r)})}pushInput(i,e,t,r,n,o){let s,a=Tl(t)?t:this.targetComponentID(i.form,e,n),l=()=>this.putRef([i,i.form],"change",n),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=_y(i.form,ue({_target:n._target},d),[i.name]):c=_y(i.form,ue({_target:n._target},d)),pe.isUploadInput(i)&&i.files&&i.files.length>0&&pn.trackFiles(i,Array.from(i.files)),s=pn.serializeUploads(i);let u={type:"form",event:r,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",u,h=>{if(pe.showError(i,this.liveSocket.binding(xy)),pe.isUploadInput(i)&&pe.isAutoUpload(i)){if(pn.filesAwaitingPreflight(i).length>0){let[f,m]=l();this.uploadFiles(i.form,e,f,a,g=>{o&&o(h),this.triggerAwaitingSubmit(i.form)})}}else o&&o(h)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,r,n,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,r,n])=>e.isSameNode(i))}scheduleSubmit(i,e,t,r){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,r])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,r])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(yg(d,`${this.binding(Sy)}=ignore`,d.form)||yg(d,"data-phx-update=ignore",d.form)),r=d=>d.hasAttribute(this.binding(Xk)),n=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(r),l=s.filter(n).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(cy,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(Uk,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(cy,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(Tz),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,r,n,o){let s=()=>this.disableForm(i,n),a=this.targetComponentID(i,e);if(pn.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,e,t,r,n,o);return this.scheduleSubmit(i,l,n,d)}else if(pn.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,n];this.uploadFiles(i,e,l,a,u=>{let h=this.extractMeta(i),f=_y(i,ue({submitter:r},h));this.pushWithReply(d,"event",{type:"form",event:t,value:f,cid:a},o)})}else if(!(i.hasAttribute(rs)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=_y(i,ue({submitter:r},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,r,n){let o=this.joinCount,s=pn.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new pn(l,this,()=>{a--,a===0&&n()});this.uploaders[l]=c;let d=c.entries().map(h=>h.toPreflightPayload()),u={ref:l.getAttribute(Yc),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[f,m]=h.error;this.log("upload",()=>[`error for entry ${f}`,m])}else{let f=m=>{this.channel.onError(()=>{this.joinCount===o&&m()})};c.initAdapterUpload(h,f,this.liveSocket)}})})}dispatchUploads(i,e,t){let r=this.targetCtxElement(i)||this.el,n=pe.findUploadInputs(r).filter(o=>o.name===e);n.length===0?Ro(`no live file inputs found matching the name "${e}"`):n.length>1?Ro(`duplicate live file inputs found matching the name "${e}"`):pe.dispatchEvent(n[0],Qz,{detail:{files:t}})}targetCtxElement(i){if(Tl(i)){let[e]=pe.findComponentNodeList(this.el,i);return e}else return i||null}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(r,n)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>pe.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;s.forEach(c=>c.hasAttribute(Yc)&&pn.clearFiles(c));let a=s.find(c=>c.type!=="hidden")||s[0],l=i.getAttribute(this.binding(Dz))||i.getAttribute(this.binding("change"));Ms.exec("change",l,r,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let r=this.liveSocket.setPendingLink(i),n=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(n,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(i,null,t,r):(this.liveSocket.commitPendingLink(r)&&(this.href=i),this.applyPendingUpdates(),t&&t(r))})});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,pe.all(this.el,`form[${e}]`).filter(r=>r.id&&this.ownsElement(r)).filter(r=>r.elements.length>0).filter(r=>r.getAttribute(this.binding(Dz))!=="ignore").map(r=>{let n=r.getAttribute(e).replaceAll(/([\[\]"])/g,"\\$1"),o=t.content.querySelector(`form[id="${r.id}"][${e}="${n}"]`);return o?[r,o,this.targetComponentID(o)]:[r,r,this.targetComponentID(r)]}).filter(([r,n,o])=>n)}maybePushComponentsDestroyed(i){let e=i.filter(t=>pe.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(r=>e.indexOf(r)!==-1);let t=e.filter(r=>pe.findComponentNodeList(this.el,r).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},r=>{this.rendered.pruneCIDs(r.cids)})}))}ownsElement(i){let e=i.closest(Tf);return i.getAttribute(kf)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,r,n={}){pe.putPrivate(i,Cy,!0);let o=this.liveSocket.binding(xy),s=Array.from(i.elements);s.forEach(a=>pe.putPrivate(a,Cy,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,r,n,()=>{s.forEach(a=>pe.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},sB=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||Kne,this.opts=t,this.params=Vk(t.params||{}),this.viewLogger=t.viewLogger,this.metadataCallbacks=t.metadata||{},this.defaults=Object.assign(wy(Gne),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=wy(window.location),this.hooks=t.hooks||{},this.uploaders=t.uploaders||{},this.loaderTimeout=t.loaderTimeout||Vne,this.reloadWithJitterTimer=null,this.maxReloads=t.maxReloads||Dne,this.reloadJitterMin=t.reloadJitterMin||Mne,this.reloadJitterMax=t.reloadJitterMax||Nne,this.failsafeJitter=t.failsafeJitter||Rne,this.localStorage=t.localStorage||window.localStorage,this.sessionStorage=t.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:Vk(),onBeforeElUpdated:Vk()},t.dom||{}),this.transitions=new koe,window.addEventListener("pagehide",r=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(Uk)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(hy)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(hy)==="false"}enableDebug(){this.sessionStorage.setItem(hy,"true")}enableProfiling(){this.sessionStorage.setItem(Uk,"true")}disableDebug(){this.sessionStorage.setItem(hy,"false")}disableProfiling(){this.sessionStorage.removeItem(Uk)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(jk,i)}disableLatencySim(){this.sessionStorage.removeItem(jk)}getLatencySim(){let i=this.sessionStorage.getItem(jk);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,r=>Ms.exec(t,e,r,i))}execJSHookPush(i,e,t,r){this.withinOwners(i,n=>{Ms.exec("hook",e,n,i,["push",{data:t,callback:r}])})}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[r,n]=t();this.viewLogger(i,e,r,n)}else if(this.isDebugEnabled()){let[r,n]=t();Zne(i,e,r,n)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,r=>{let n=this.getLatencySim();n?setTimeout(()=>t(r),n):t(r)})}wrapPush(i,e,t){let r=this.getLatencySim(),n=i.joinCount;if(!r)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===n&&!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())},r),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,r=this.reloadJitterMax,n=Math.floor(Math.random()*(r-t+1))+t,o=ka.updateLocal(this.localStorage,window.location.pathname,Gz,0,s=>s+1);o>this.maxReloads&&(n=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())},n)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?ooe[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 pe.all(document,`${Tf}:not([${kf}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(Qk)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),ka.redirect(i,e)}replaceMain(i,e,t=null,r=this.setPendingLink(i)){let n=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=pe.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,n),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(r)&&this.requestDOMUpdate(()=>{pe.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(()=>t(r)),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||pe.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(Xc)!==null}newRootView(i,e,t){let r=new nB(i,this,null,e,t);return this.roots[r.id]=r,r}owner(i,e){let t=Gc(i.closest(Tf),r=>this.getViewByEl(r))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(wg);return Gc(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(wg));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,r,n,o,s)=>{let a=n.getAttribute(this.binding(jne)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=ue({key:e.key},this.eventMeta(t,e,n));Ms.exec(t,o,r,n,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,r,n,o,s)=>{if(!s){let a=ue({key:e.key},this.eventMeta(t,e,n));Ms.exec(t,o,r,n,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,r,n,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,n);Ms.exec(t,s,r,n,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=Gc(yg(e.target,this.binding(Sz)),o=>o.getAttribute(this.binding(Sz))),r=t&&document.getElementById(t),n=Array.from(e.dataTransfer.files||[]);!r||r.disabled||n.length===0||!(r.files instanceof FileList)||(pn.trackFiles(r,n,e.dataTransfer),r.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(Xz,e=>{let t=e.target;if(!pe.isUploadInput(t))return;let r=Array.from(e.detail.files||[]).filter(n=>n instanceof File||n instanceof Blob);pn.trackFiles(t,r),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let r=this.metadataCallbacks[i];return r?r(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 r=i[t];this.on(r,n=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=n.target.getAttribute&&n.target.getAttribute(o);a?this.debounce(n.target,n,r,()=>{this.withinOwners(n.target,l=>{e(n,t,l,n.target,a,null)})}):pe.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,n,r,()=>{this.withinOwners(l,d=>{e(n,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 r=this.binding(e);window.addEventListener(i,n=>{let o=null;if(t)o=n.target.matches(`[${r}]`)?n.target:n.target.querySelector(`[${r}]`);else{let a=this.clickStartedAtTarget||n.target;o=yg(a,r),this.dispatchClickAway(n,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(r);if(!s){!t&&pe.isNewPageClick(n,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&n.preventDefault(),!o.hasAttribute(rs)&&this.debounce(o,n,"click",()=>{this.withinOwners(o,a=>{Ms.exec("click",s,a,o,["push",{data:this.eventMeta("click",n,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");pe.all(document,`[${t}]`,r=>{r.isSameNode(e)||r.contains(e)||this.withinOwners(i.target,n=>{let o=r.getAttribute(t);Ms.isVisible(r)&&Ms.exec("click",o,n,r,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!ka.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{ka.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:r,root:n,scroll:o}=e.state||{},s=window.location.href;pe.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:t==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&r===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{n&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=yg(e.target,Fk),r=t&&t.getAttribute(Fk);if(!r||!this.isConnected()||!this.main||pe.wantsNewTab(e))return;let n=t.href,o=t.getAttribute(One);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==n&&this.requestDOMUpdate(()=>{if(r==="patch")this.pushHistoryPatch(n,o,t);else if(r==="redirect")this.historyRedirect(n,o);else throw new Error(`expected ${Fk} to be "patch" or "redirect", got: ${r}`);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={}){pe.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){pe.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>pe.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return ka.redirect(i);this.withPageLoading({to:i,kind:"patch"},r=>{this.main.pushLinkPatch(i,t,n=>{this.historyPatch(i,e,n),r()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(ka.pushState(e,{type:"patch",id:this.main.id},i),pe.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:i,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return ka.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:n,host:o}=window.location;i=`${n}//${o}${i}`}let r=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},n=>{this.replaceMain(i,t,o=>{o===this.linkRef&&(ka.pushState(e,{type:"redirect",id:this.main.id,scroll:r},i),pe.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),n()})})}replaceRootHistory(){ka.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=wy(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let r=t.target.getAttribute(this.binding("submit")),n=t.target.getAttribute(this.binding("change"));!e&&n&&!r&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{pe.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let r=t.target.getAttribute(this.binding("submit"));if(!r){pe.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,n=>{Ms.exec("submit",r,n,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,r=>{let n=this.binding("change"),o=r.target,s=o.getAttribute(n),a=o.form&&o.form.getAttribute(n),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}=pe.private(o,"prev-iteration")||{};u===d-1&&t==="change"&&h==="input"||(pe.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,r,t,()=>{this.withinOwners(c,f=>{pe.putPrivate(o,Gk,!0),pe.isTextualInput(o)||this.setActiveElement(o),Ms.exec("change",l,f,o,["push",{_target:r.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let r=t.target;pe.resetForm(r,this.binding(xy));let n=Array.from(r.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{n.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,r){if(t==="blur"||t==="focusout")return r();let n=this.binding(Hne),o=this.binding(Une),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);pe.debounce(i,e,n,s,o,a,c,()=>{r()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},koe=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 r=setTimeout(()=>{this.transitions.delete(r),t(),this.flushPendingOps()},i);this.transitions.add(r)}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 sB="livebook:";function Cu(i){try{let e=localStorage.getItem(sB+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function If(i,e){try{let t=JSON.stringify(e);localStorage.setItem(sB+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var aB="app_auth_token:";function lB(i,e){If(aB+i,e)}function cB(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=Cu(aB+e);if(t)return t}return null}var Eoe={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{lB(i,e),this.pushEvent("app_auth_persisted")})}},dB=Eoe;function Ri(i,e){let t={};for(let r of e){let n=`data-p-${r}`;if(!i.hasAttribute(n))throw new Error(`Missing attribute "${n}" on element <${i.tagName}:${i.id}>`);let o=i.getAttribute(n);t[Toe(r)]=JSON.parse(o)}return t}function Toe(i){let[e,...t]=i.split("-");return[e,...t.map(r=>r.charAt(0).toUpperCase()+r.slice(1))].join("")}function uB(i,e,t){let n=new ArrayBuffer(44+i.byteLength),o=new DataView(n),s=i.byteLength/4,a=4,l=e*a,c=t*l,d=s*l,u=0;function h(_){o.setUint32(u,_,!1),u+=4}function f(_){o.setUint32(u,_,!0),u+=4}function m(_){o.setUint16(u,_,!0),u+=2}function g(_){o.setFloat32(u,_,!0),u+=4}h(1380533830),f(36+d),h(1463899717),h(1718449184),f(16),m(3),m(e),f(t),f(c),m(l),m(a*8),h(1684108385),f(d);let w=new Float32Array(i);for(let _=0;_<w.length;_++)g(w[_]);return n}var xg=4;function hB(i,e){let r=new TextEncoder().encode(JSON.stringify(i)),n=new ArrayBuffer(xg+r.byteLength+e.byteLength);return new DataView(n).setUint32(0,r.byteLength),new Uint8Array(n,xg,r.byteLength).set(r),new Uint8Array(n,xg+r.byteLength).set(new Uint8Array(e)),n}function fB(i){let t=new DataView(i).getUint32(0),r=new Uint8Array(i,xg,t),n=i.slice(xg+t),o=new TextDecoder;return[JSON.parse(o.decode(r)),n]}var Jk=["bg-yellow-100","border-yellow-300"],Ioe={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.audioEl=this.el.querySelector("[data-preview]"),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.recordButton=this.el.querySelector("[data-btn-record]"),this.stopButton=this.el.querySelector("[data-btn-stop]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.mediaRecorder=null,this.audioEl.src=this.props.audioUrl,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(...Jk)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...Jk)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...Jk)}),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 Ri(this.el,["id","phx-target","sampling-rate","endianness","format","audio-url"])},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(r=>{this.loadEncodedAudio(r)})}),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 r=Loe(t);this.pushAudio(r)})},pushAudio(i){let e={num_channels:i.numChannels,sampling_rate:i.samplingRate},t=this.encodeAudio(i),r=new Blob([t]);r.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[r])},encodeAudio(i){if(this.props.format==="pcm_f32")return Aoe(i.data,this.props.endianness);if(this.props.format==="wav")return uB(i.data,i.numChannels,i.samplingRate)}};function Loe(i){let e=i.numberOfChannels,t=i.sampleRate,r=i.length,n=4*e*r,o=new ArrayBuffer(n),s=new Float32Array(o);for(let a=0;a<e;a++){let l=i.getChannelData(a);for(let c=0;c<l.length;c++)s[e*c+a]=l[c]}return{data:s.buffer,numChannels:e,samplingRate:t}}function Aoe(i,e){if(Doe()===e)return i;for(let t=0;t<i.byteLength/4;t++){let r=i[t],n=i[t+1],o=i[t+2],s=i[t+3];i[t]=s,i[t+1]=o,i[t+2]=n,i[t+3]=r}return i}function Doe(){let i=new ArrayBuffer(2),e=new Uint16Array(i),t=new Uint8Array(i);return e[0]=1,t[0]===1?"little":"big"}var pB=Ioe;var mB=11;function Moe(i,e){var t=e.attributes,r,n,o,s,a;if(!(e.nodeType===mB||i.nodeType===mB)){for(var l=t.length-1;l>=0;l--)r=t[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=i.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),i.setAttributeNS(o,n,s))):(a=i.getAttribute(n),a!==s&&i.setAttribute(n,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)r=c[d],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||i.removeAttributeNS(o,n)):e.hasAttribute(n)||i.removeAttribute(n)}}var ky,Noe="http://www.w3.org/1999/xhtml",lo=typeof document=="undefined"?void 0:document,Roe=!!lo&&"content"in lo.createElement("template"),Poe=!!lo&&lo.createRange&&"createContextualFragment"in lo.createRange();function Ooe(i){var e=lo.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Foe(i){ky||(ky=lo.createRange(),ky.selectNode(lo.body));var e=ky.createContextualFragment(i);return e.childNodes[0]}function zoe(i){var e=lo.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Boe(i){return i=i.trim(),Roe?Ooe(i):Poe?Foe(i):zoe(i)}function Ey(i,e){var t=i.nodeName,r=e.nodeName,n,o;return t===r?!0:(n=t.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?t===r.toUpperCase():o<=90&&n>=97?r===t.toUpperCase():!1)}function Hoe(i,e){return!e||e===Noe?lo.createElement(i):lo.createElementNS(e,i)}function Uoe(i,e){for(var t=i.firstChild;t;){var r=t.nextSibling;e.appendChild(t),t=r}return e}function eE(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var gB={OPTION:function(i,e){var t=i.parentNode;if(t){var r=t.nodeName.toUpperCase();r==="OPTGROUP"&&(t=t.parentNode,r=t&&t.nodeName.toUpperCase()),r==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}eE(i,e,"selected")},INPUT:function(i,e){eE(i,e,"checked"),eE(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 r=i.firstChild;if(r){var n=r.nodeValue;if(n==t||!t&&n==i.placeholder)return;r.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,r=0,n=i.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){t=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}i.selectedIndex=t}}},Cg=1,bB=11,vB=3,_B=8;function Qc(){}function joe(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function Woe(i){return function(t,r,n){if(n||(n={}),typeof r=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=r;r=lo.createElement("html"),r.innerHTML=o}else r=Boe(r);else r.nodeType===bB&&(r=r.firstElementChild);var s=n.getNodeKey||joe,a=n.onBeforeNodeAdded||Qc,l=n.onNodeAdded||Qc,c=n.onBeforeElUpdated||Qc,d=n.onElUpdated||Qc,u=n.onBeforeNodeDiscarded||Qc,h=n.onNodeDiscarded||Qc,f=n.onBeforeElChildrenUpdated||Qc,m=n.skipFromChildren||Qc,g=n.addChild||function(be,we){return be.appendChild(we)},w=n.childrenOnly===!0,_=Object.create(null),E=[];function A(be){E.push(be)}function L(be,we){if(be.nodeType===Cg)for(var X=be.firstChild;X;){var R=void 0;we&&(R=s(X))?A(R):(h(X),X.firstChild&&L(X,we)),X=X.nextSibling}}function O(be,we,X){u(be)!==!1&&(we&&we.removeChild(be),h(be),L(be,X))}function U(be){if(be.nodeType===Cg||be.nodeType===bB)for(var we=be.firstChild;we;){var X=s(we);X&&(_[X]=we),U(we),we=we.nextSibling}}U(t);function Y(be){l(be);for(var we=be.firstChild;we;){var X=we.nextSibling,R=s(we);if(R){var ne=_[R];ne&&Ey(we,ne)?(we.parentNode.replaceChild(ne,we),te(ne,we)):Y(we)}else Y(we);we=X}}function oe(be,we,X){for(;we;){var R=we.nextSibling;(X=s(we))?A(X):O(we,be,!0),we=R}}function te(be,we,X){var R=s(we);R&&delete _[R],!(!X&&(c(be,we)===!1||(i(be,we),d(be),f(be,we)===!1)))&&(be.nodeName!=="TEXTAREA"?Z(be,we):gB.TEXTAREA(be,we))}function Z(be,we){var X=m(be,we),R=we.firstChild,ne=be.firstChild,me,G,Et,Ot,ai;e:for(;R;){for(Ot=R.nextSibling,me=s(R);!X&≠){if(Et=ne.nextSibling,R.isSameNode&&R.isSameNode(ne)){R=Ot,ne=Et;continue e}G=s(ne);var Ti=ne.nodeType,kt=void 0;if(Ti===R.nodeType&&(Ti===Cg?(me?me!==G&&((ai=_[me])?Et===ai?kt=!1:(be.insertBefore(ai,ne),G?A(G):O(ne,be,!0),ne=ai):kt=!1):G&&(kt=!1),kt=kt!==!1&&Ey(ne,R),kt&&te(ne,R)):(Ti===vB||Ti==_B)&&(kt=!0,ne.nodeValue!==R.nodeValue&&(ne.nodeValue=R.nodeValue))),kt){R=Ot,ne=Et;continue e}G?A(G):O(ne,be,!0),ne=Et}if(me&&(ai=_[me])&&Ey(ai,R))X||g(be,ai),te(ai,R);else{var Ei=a(R);Ei!==!1&&(Ei&&(R=Ei),R.actualize&&(R=R.actualize(be.ownerDocument||lo)),g(be,R),Y(R))}R=Ot,ne=Et}oe(be,ne,G);var fi=gB[be.nodeName];fi&&fi(be,we)}var ve=t,Pe=ve.nodeType,Ee=r.nodeType;if(!w){if(Pe===Cg)Ee===Cg?Ey(t,r)||(h(t),ve=Uoe(t,Hoe(r.nodeName,r.namespaceURI))):ve=r;else if(Pe===vB||Pe===_B){if(Ee===Pe)return ve.nodeValue!==r.nodeValue&&(ve.nodeValue=r.nodeValue),ve;ve=r}}if(ve===r)h(t);else{if(r.isSameNode&&r.isSameNode(ve))return;if(te(ve,r,w),E)for(var Oe=0,Xe=E.length;Oe<Xe;Oe++){var dt=_[E[Oe]];dt&&O(dt,dt.parentNode,!1)}}return!w&&ve!==t&&t.parentNode&&(ve.actualize&&(ve=ve.actualize(t.ownerDocument||lo)),t.parentNode.replaceChild(ve,t)),ve}}var Voe=Woe(Moe),yB=Voe;function tE(i){if(i)throw i}var Ly=Wn(LB(),1);function Sg(i){if(typeof i!="object"||i===null)return!1;let e=Object.getPrototypeOf(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function AB(){let i=[],e={run:t,use:r};return e;function t(...n){let o=-1,s=n.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...n);function a(l,...c){let d=i[++o],u=-1;if(l){s(l);return}for(;++u<n.length;)(c[u]===null||c[u]===void 0)&&(c[u]=n[u]);n=c,d?qoe(d,a)(...c):s(null,...c)}}function r(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return i.push(n),e}}function qoe(i,e){let t;return r;function r(...s){let a=i.length>s.length,l;a&&s.push(n);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return n(d)}a||(l instanceof Promise?l.then(o,n):l instanceof Error?n(l):o(l))}function n(s,...a){t||(t=!0,e(s,...a))}function o(s){n(null,s)}}function rE(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?DB(i.position):"start"in i||"end"in i?DB(i):"line"in i||"column"in i?iE(i):""}function iE(i){return MB(i&&i.line)+":"+MB(i&&i.column)}function DB(i){return iE(i&&i.start)+"-"+iE(i&&i.end)}function MB(i){return i&&typeof i=="number"?i:1}var Ar=class extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let n="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o=ue({},t)),typeof e=="string"?n=e:!o.cause&&e&&(s=!0,n=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=a?a.line:void 0,this.name=rE(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Ar.prototype.file="";Ar.prototype.name="";Ar.prototype.reason="";Ar.prototype.message="";Ar.prototype.stack="";Ar.prototype.column=void 0;Ar.prototype.line=void 0;Ar.prototype.ancestors=void 0;Ar.prototype.cause=void 0;Ar.prototype.fatal=void 0;Ar.prototype.place=void 0;Ar.prototype.ruleId=void 0;Ar.prototype.source=void 0;var Ns={basename:Koe,dirname:$oe,extname:Goe,join:Yoe,sep:"/"};function Koe(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');kg(i);let t=0,r=-1,n=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;n--;)if(i.codePointAt(n)===47){if(o){t=n+1;break}}else r<0&&(o=!0,r=n+1);return r<0?"":i.slice(t,r)}if(e===i)return"";let s=-1,a=e.length-1;for(;n--;)if(i.codePointAt(n)===47){if(o){t=n+1;break}}else s<0&&(o=!0,s=n+1),a>-1&&(i.codePointAt(n)===e.codePointAt(a--)?a<0&&(r=n):(a=-1,r=s));return t===r?r=s:r<0&&(r=i.length),i.slice(t,r)}function $oe(i){if(kg(i),i.length===0)return".";let e=-1,t=i.length,r;for(;--t;)if(i.codePointAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?i.codePointAt(0)===47?"/":".":e===1&&i.codePointAt(0)===47?"//":i.slice(0,e)}function Goe(i){kg(i);let e=i.length,t=-1,r=0,n=-1,o=0,s;for(;e--;){let a=i.codePointAt(e);if(a===47){if(s){r=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?n<0?n=e:o!==1&&(o=1):n>-1&&(o=-1)}return n<0||t<0||o===0||o===1&&n===t-1&&n===r+1?"":i.slice(n,t)}function Yoe(...i){let e=-1,t;for(;++e<i.length;)kg(i[e]),i[e]&&(t=t===void 0?i[e]:t+"/"+i[e]);return t===void 0?".":Xoe(t)}function Xoe(i){kg(i);let e=i.codePointAt(0)===47,t=Qoe(i,!e);return t.length===0&&!e&&(t="."),t.length>0&&i.codePointAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function Qoe(i,e){let t="",r=0,n=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s<i.length)a=i.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(n===s-1||o===1))if(n!==s-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),n=s,o=0;continue}}else if(t.length>0){t="",r=0,n=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+i.slice(n+1,s):t=i.slice(n+1,s),r=s-n-1;n=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function kg(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var NB={cwd:Zoe};function Zoe(){return"/"}function Lf(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}function RB(i){if(typeof i=="string")i=new URL(i);else if(!Lf(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 Joe(i)}function Joe(i){if(i.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let e=i.pathname,t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){let r=e.codePointAt(t+2);if(r===70||r===102){let n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(e)}var nE=["history","path","basename","stem","extname","dirname"],Zc=class{constructor(e){let t;e?Lf(e)?t={path:e}:typeof e=="string"||ese(e)?t={value:e}:t=e:t={},this.cwd=NB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<nE.length;){let o=nE[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let n;for(n in t)nE.includes(n)||(this[n]=t[n])}get basename(){return typeof this.path=="string"?Ns.basename(this.path):void 0}set basename(e){sE(e,"basename"),oE(e,"basename"),this.path=Ns.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ns.dirname(this.path):void 0}set dirname(e){PB(this.basename,"dirname"),this.path=Ns.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ns.extname(this.path):void 0}set extname(e){if(oE(e,"extname"),PB(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ns.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Lf(e)&&(e=RB(e)),sE(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ns.basename(this.path,this.extname):void 0}set stem(e){sE(e,"stem"),oE(e,"stem"),this.path=Ns.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){let n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){let n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){let n=new Ar(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function oE(i,e){if(i&&i.includes(Ns.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Ns.sep+"`")}function sE(i,e){if(!i)throw new Error("`"+e+"` cannot be empty")}function PB(i,e){if(!i)throw new Error("Setting `"+e+"` requires `path` to be set too")}function ese(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}var OB=function(i){let r=this.constructor.prototype,n=r[i],o=function(){return n.apply(o,arguments)};Object.setPrototypeOf(o,r);let s=Object.getOwnPropertyNames(n);for(let a of s){let l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(o,a,l)}return o};var tse={}.hasOwnProperty,dE=class i extends OB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=AB()}copy(){let e=new i,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];e.use(...r)}return e.data((0,Ly.default)(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(cE("data",this.frozen),this.namespace[e]=t,this):tse.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cE("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let n=t.call(e,...r);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=Iy(e),r=this.parser||this.Parser;return aE("parse",r),r(String(t),t)}process(e,t){let r=this;return this.freeze(),aE("process",this.parser||this.Parser),lE("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(o,s){let a=Iy(e),l=r.parse(a);r.run(l,a,function(d,u,h){if(d||!u||!h)return c(d);let f=u,m=r.stringify(f,h);rse(m)?h.value=m:h.result=m,c(d,h)});function c(d,u){d||!u?s(d):o?o(u):t(void 0,u)}}}processSync(e){let t=!1,r;return this.freeze(),aE("processSync",this.parser||this.Parser),lE("processSync",this.compiler||this.Compiler),this.process(e,n),zB("processSync","process",t),r;function n(o,s){t=!0,tE(o),r=s}}run(e,t,r){FB(e),this.freeze();let n=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(s,a){let l=Iy(t);n.run(e,l,c);function c(d,u,h){let f=u||e;d?a(d):s?s(f):r(void 0,f,h)}}}runSync(e,t){let r=!1,n;return this.run(e,t,o),zB("runSync","run",r),n;function o(s,a){tE(s),n=a,r=!0}}stringify(e,t){this.freeze();let r=Iy(t),n=this.compiler||this.Compiler;return lE("stringify",n),FB(e),n(e,r)}use(e,...t){let r=this.attachers,n=this.namespace;if(cE("use",this.frozen),e!=null)if(typeof e=="function")l(e,t);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[d,...u]=c;l(d,u)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(n.settings=(0,Ly.default)(!0,n.settings,c.settings))}function a(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){let u=c[d];o(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let u=-1,h=-1;for(;++u<r.length;)if(r[u][0]===c){h=u;break}if(h===-1)r.push([c,...d]);else if(d.length>0){let[f,...m]=d,g=r[h][1];Sg(g)&&Sg(f)&&(f=(0,Ly.default)(!0,g,f)),r[h]=[c,f,...m]}}}},Ay=new dE().freeze();function aE(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `parser`")}function lE(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `compiler`")}function cE(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 FB(i){if(!Sg(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function zB(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function Iy(i){return ise(i)?i:new Zc(i)}function ise(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function rse(i){return typeof i=="string"||nse(i)}function nse(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}var ose={};function uE(i,e){let t=e||ose,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,n=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return HB(i,r,n)}function HB(i,e,t){if(sse(i)){if("value"in i)return i.type==="html"&&!t?"":i.value;if(e&&"alt"in i&&i.alt)return i.alt;if("children"in i)return BB(i.children,e,t)}return Array.isArray(i)?BB(i,e,t):""}function BB(i,e,t){let r=[],n=-1;for(;++n<i.length;)r[n]=HB(i[n],e,t);return r.join("")}function sse(i){return!!(i&&typeof i=="object")}function mn(i,e,t,r){let n=i.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}function Yn(i,e){return i.length>0?(mn(i,i.length,0,e),i):e}var UB={}.hasOwnProperty;function jB(i){let e={},t=-1;for(;++t<i.length;)ase(e,i[t]);return e}function ase(i,e){let t;for(t in e){let n=(UB.call(i,t)?i[t]:void 0)||(i[t]={}),o=e[t],s;if(o)for(s in o){UB.call(n,s)||(n[s]=[]);let a=o[s];lse(n[s],Array.isArray(a)?a:a?[a]:[])}}}function lse(i,e){let t=-1,r=[];for(;++t<e.length;)(e[t].add==="after"?i:r).push(e[t]);mn(i,0,0,r)}function Dy(i,e){let t=Number.parseInt(i,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCharCode(t)}function Ll(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var cse=Jc(new RegExp("\\p{P}","u")),Po=Jc(/[A-Za-z]/),Xn=Jc(/[\dA-Za-z]/),WB=Jc(/[#-'*+\--9=?A-Z^-~]/);function Eg(i){return i!==null&&(i<32||i===127)}var Tg=Jc(/\d/),VB=Jc(/[\dA-Fa-f]/),hE=Jc(/[!-/:-@[-`{-~]/);function at(i){return i!==null&&i<-2}function Sr(i){return i!==null&&(i<0||i===32)}function jt(i){return i===-2||i===-1||i===32}function qB(i){return hE(i)||cse(i)}var KB=Jc(/\s/);function Jc(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Kt(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return jt(l)?(i.enter(t),a(l)):e(l)}function a(l){return jt(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var $B={tokenize:dse};function dse(i){let e=i.attempt(this.parser.constructs.contentInitial,r,n),t;return e;function r(a){if(a===null){i.consume(a);return}return i.enter("lineEnding"),i.consume(a),i.exit("lineEnding"),Kt(i,e,"linePrefix")}function n(a){return i.enter("paragraph"),o(a)}function o(a){let l=i.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,s(a)}function s(a){if(a===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(a);return}return at(a)?(i.consume(a),i.exit("chunkText"),o):(i.consume(a),s)}}var YB={tokenize:use},GB={tokenize:hse};function use(i){let e=this,t=[],r=0,n,o,s;return a;function a(A){if(r<t.length){let L=t[r];return e.containerState=L[1],i.attempt(L[0].continuation,l,c)(A)}return c(A)}function l(A){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,n&&E();let L=e.events.length,O=L,U;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){U=e.events[O][1].end;break}_(r);let Y=L;for(;Y<e.events.length;)e.events[Y][1].end=Object.assign({},U),Y++;return mn(e.events,O+1,0,e.events.slice(L)),e.events.length=Y,c(A)}return a(A)}function c(A){if(r===t.length){if(!n)return h(A);if(n.currentConstruct&&n.currentConstruct.concrete)return m(A);e.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return e.containerState={},i.check(GB,d,u)(A)}function d(A){return n&&E(),_(r),h(A)}function u(A){return e.parser.lazy[e.now().line]=r!==t.length,s=e.now().offset,m(A)}function h(A){return e.containerState={},i.attempt(GB,f,m)(A)}function f(A){return r++,t.push([e.currentConstruct,e.containerState]),h(A)}function m(A){if(A===null){n&&E(),_(0),i.consume(A);return}return n=n||e.parser.flow(e.now()),i.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:n}),g(A)}function g(A){if(A===null){w(i.exit("chunkFlow"),!0),_(0),i.consume(A);return}return at(A)?(i.consume(A),w(i.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(i.consume(A),g)}function w(A,L){let O=e.sliceStream(A);if(L&&O.push(null),A.previous=o,o&&(o.next=A),o=A,n.defineSkip(A.start),n.write(O),e.parser.lazy[A.start.line]){let U=n.events.length;for(;U--;)if(n.events[U][1].start.offset<s&&(!n.events[U][1].end||n.events[U][1].end.offset>s))return;let Y=e.events.length,oe=Y,te,Z;for(;oe--;)if(e.events[oe][0]==="exit"&&e.events[oe][1].type==="chunkFlow"){if(te){Z=e.events[oe][1].end;break}te=!0}for(_(r),U=Y;U<e.events.length;)e.events[U][1].end=Object.assign({},Z),U++;mn(e.events,oe+1,0,e.events.slice(Y)),e.events.length=U}}function _(A){let L=t.length;for(;L-- >A;){let O=t[L];e.containerState=O[1],O[0].exit.call(e,i)}t.length=A}function E(){n.write([null]),o=void 0,n=void 0,e.containerState._closeFlow=void 0}}function hse(i,e,t){return Kt(i,i.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fE(i){if(i===null||Sr(i)||KB(i))return 1;if(qB(i))return 2}function Af(i,e,t){let r=[],n=-1;for(;++n<i.length;){let o=i[n].resolveAll;o&&!r.includes(o)&&(e=o(e,t),r.push(o))}return e}var Ig={name:"attention",tokenize:pse,resolveAll:fse};function fse(i,e){let t=-1,r,n,o,s,a,l,c,d;for(;++t<i.length;)if(i[t][0]==="enter"&&i[t][1].type==="attentionSequence"&&i[t][1]._close){for(r=t;r--;)if(i[r][0]==="exit"&&i[r][1].type==="attentionSequence"&&i[r][1]._open&&e.sliceSerialize(i[r][1]).charCodeAt(0)===e.sliceSerialize(i[t][1]).charCodeAt(0)){if((i[r][1]._close||i[t][1]._open)&&(i[t][1].end.offset-i[t][1].start.offset)%3&&!((i[r][1].end.offset-i[r][1].start.offset+i[t][1].end.offset-i[t][1].start.offset)%3))continue;l=i[r][1].end.offset-i[r][1].start.offset>1&&i[t][1].end.offset-i[t][1].start.offset>1?2:1;let u=Object.assign({},i[r][1].end),h=Object.assign({},i[t][1].start);XB(u,-l),XB(h,l),s={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},i[r][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},i[t][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},i[r][1].end),end:Object.assign({},i[t][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},i[r][1].end=Object.assign({},s.start),i[t][1].start=Object.assign({},a.end),c=[],i[r][1].end.offset-i[r][1].start.offset&&(c=Yn(c,[["enter",i[r][1],e],["exit",i[r][1],e]])),c=Yn(c,[["enter",n,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Yn(c,Af(e.parser.constructs.insideSpan.null,i.slice(r+1,t),e)),c=Yn(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",n,e]]),i[t][1].end.offset-i[t][1].start.offset?(d=2,c=Yn(c,[["enter",i[t][1],e],["exit",i[t][1],e]])):d=0,mn(i,r-1,t-r+3,c),t=r+c.length-d-2;break}}for(t=-1;++t<i.length;)i[t][1].type==="attentionSequence"&&(i[t][1].type="data");return i}function pse(i,e){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,n=fE(r),o;return s;function s(l){return o=l,i.enter("attentionSequence"),a(l)}function a(l){if(l===o)return i.consume(l),a;let c=i.exit("attentionSequence"),d=fE(l),u=!d||d===2&&n||t.includes(l),h=!n||n===2&&d||t.includes(r);return c._open=!!(o===42?u:u&&(n||!h)),c._close=!!(o===42?h:h&&(d||!u)),e(l)}}function XB(i,e){i.column+=e,i.offset+=e,i._bufferIndex+=e}var pE={name:"autolink",tokenize:mse};function mse(i,e,t){let r=0;return n;function n(f){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),o}function o(f){return Po(f)?(i.consume(f),s):c(f)}function s(f){return f===43||f===45||f===46||Xn(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(i.consume(f),r=0,l):(f===43||f===45||f===46||Xn(f))&&r++<32?(i.consume(f),a):(r=0,c(f))}function l(f){return f===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.exit("autolink"),e):f===null||f===32||f===60||Eg(f)?t(f):(i.consume(f),l)}function c(f){return f===64?(i.consume(f),d):WB(f)?(i.consume(f),c):t(f)}function d(f){return Xn(f)?u(f):t(f)}function u(f){return f===46?(i.consume(f),r=0,d):f===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.exit("autolink"),e):h(f)}function h(f){if((f===45||Xn(f))&&r++<63){let m=f===45?h:u;return i.consume(f),m}return t(f)}}var ed={tokenize:gse,partial:!0};function gse(i,e,t){return r;function r(o){return jt(o)?Kt(i,n,"linePrefix")(o):n(o)}function n(o){return o===null||at(o)?e(o):t(o)}}var My={name:"blockQuote",tokenize:bse,continuation:{tokenize:vse},exit:_se};function bse(i,e,t){let r=this;return n;function n(s){if(s===62){let a=r.containerState;return a.open||(i.enter("blockQuote",{_container:!0}),a.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(s),i.exit("blockQuoteMarker"),o}return t(s)}function o(s){return jt(s)?(i.enter("blockQuotePrefixWhitespace"),i.consume(s),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),e):(i.exit("blockQuotePrefix"),e(s))}}function vse(i,e,t){let r=this;return n;function n(s){return jt(s)?Kt(i,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return i.attempt(My,e,t)(s)}}function _se(i){i.exit("blockQuote")}var Ny={name:"characterEscape",tokenize:yse};function yse(i,e,t){return r;function r(o){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(o),i.exit("escapeMarker"),n}function n(o){return hE(o)?(i.enter("characterEscapeValue"),i.consume(o),i.exit("characterEscapeValue"),i.exit("characterEscape"),e):t(o)}}var Ry={name:"characterReference",tokenize:wse};function wse(i,e,t){let r=this,n=0,o,s;return a;function a(u){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(u),i.exit("characterReferenceMarker"),l}function l(u){return u===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(u),i.exit("characterReferenceMarkerNumeric"),c):(i.enter("characterReferenceValue"),o=31,s=Xn,d(u))}function c(u){return u===88||u===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(u),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),o=6,s=VB,d):(i.enter("characterReferenceValue"),o=7,s=Tg,d(u))}function d(u){if(u===59&&n){let h=i.exit("characterReferenceValue");return s===Xn&&!Xh(r.sliceSerialize(h))?t(u):(i.enter("characterReferenceMarker"),i.consume(u),i.exit("characterReferenceMarker"),i.exit("characterReference"),e)}return s(u)&&n++<o?(i.consume(u),d):t(u)}}var QB={tokenize:Cse,partial:!0},Py={name:"codeFenced",tokenize:xse,concrete:!0};function xse(i,e,t){let r=this,n={tokenize:O,partial:!0},o=0,s=0,a;return l;function l(U){return c(U)}function c(U){let Y=r.events[r.events.length-1];return o=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,a=U,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),d(U)}function d(U){return U===a?(s++,i.consume(U),d):s<3?t(U):(i.exit("codeFencedFenceSequence"),jt(U)?Kt(i,u,"whitespace")(U):u(U))}function u(U){return U===null||at(U)?(i.exit("codeFencedFence"),r.interrupt?e(U):i.check(QB,g,L)(U)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),h(U))}function h(U){return U===null||at(U)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),u(U)):jt(U)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),Kt(i,f,"whitespace")(U)):U===96&&U===a?t(U):(i.consume(U),h)}function f(U){return U===null||at(U)?u(U):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),m(U))}function m(U){return U===null||at(U)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),u(U)):U===96&&U===a?t(U):(i.consume(U),m)}function g(U){return i.attempt(n,L,w)(U)}function w(U){return i.enter("lineEnding"),i.consume(U),i.exit("lineEnding"),_}function _(U){return o>0&&jt(U)?Kt(i,E,"linePrefix",o+1)(U):E(U)}function E(U){return U===null||at(U)?i.check(QB,g,L)(U):(i.enter("codeFlowValue"),A(U))}function A(U){return U===null||at(U)?(i.exit("codeFlowValue"),E(U)):(i.consume(U),A)}function L(U){return i.exit("codeFenced"),e(U)}function O(U,Y,oe){let te=0;return Z;function Z(Xe){return U.enter("lineEnding"),U.consume(Xe),U.exit("lineEnding"),ve}function ve(Xe){return U.enter("codeFencedFence"),jt(Xe)?Kt(U,Pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Xe):Pe(Xe)}function Pe(Xe){return Xe===a?(U.enter("codeFencedFenceSequence"),Ee(Xe)):oe(Xe)}function Ee(Xe){return Xe===a?(te++,U.consume(Xe),Ee):te>=s?(U.exit("codeFencedFenceSequence"),jt(Xe)?Kt(U,Oe,"whitespace")(Xe):Oe(Xe)):oe(Xe)}function Oe(Xe){return Xe===null||at(Xe)?(U.exit("codeFencedFence"),Y(Xe)):oe(Xe)}}}function Cse(i,e,t){let r=this;return n;function n(s){return s===null?t(s):(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}var Lg={name:"codeIndented",tokenize:kse},Sse={tokenize:Ese,partial:!0};function kse(i,e,t){let r=this;return n;function n(c){return i.enter("codeIndented"),Kt(i,o,"linePrefix",4+1)(c)}function o(c){let d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):t(c)}function s(c){return c===null?l(c):at(c)?i.attempt(Sse,s,l)(c):(i.enter("codeFlowValue"),a(c))}function a(c){return c===null||at(c)?(i.exit("codeFlowValue"),s(c)):(i.consume(c),a)}function l(c){return i.exit("codeIndented"),e(c)}}function Ese(i,e,t){let r=this;return n;function n(s){return r.parser.lazy[r.now().line]?t(s):at(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),n):Kt(i,o,"linePrefix",4+1)(s)}function o(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):at(s)?n(s):t(s)}}var mE={name:"codeText",tokenize:Lse,resolve:Tse,previous:Ise};function Tse(i){let e=i.length-4,t=3,r,n;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(r=t;++r<e;)if(i[r][1].type==="codeTextData"){i[t][1].type="codeTextPadding",i[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)n===void 0?r!==e&&i[r][1].type!=="lineEnding"&&(n=r):(r===e||i[r][1].type==="lineEnding")&&(i[n][1].type="codeTextData",r!==n+2&&(i[n][1].end=i[r-1][1].end,i.splice(n+2,r-n-2),e-=r-n-2,r=n+2),n=void 0);return i}function Ise(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Lse(i,e,t){let r=this,n=0,o,s;return a;function a(h){return i.enter("codeText"),i.enter("codeTextSequence"),l(h)}function l(h){return h===96?(i.consume(h),n++,l):(i.exit("codeTextSequence"),c(h))}function c(h){return h===null?t(h):h===32?(i.enter("space"),i.consume(h),i.exit("space"),c):h===96?(s=i.enter("codeTextSequence"),o=0,u(h)):at(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),c):(i.enter("codeTextData"),d(h))}function d(h){return h===null||h===32||h===96||at(h)?(i.exit("codeTextData"),c(h)):(i.consume(h),d)}function u(h){return h===96?(i.consume(h),o++,u):o===n?(i.exit("codeTextSequence"),i.exit("codeText"),e(h)):(s.type="codeTextData",d(h))}}function Oy(i){let e={},t=-1,r,n,o,s,a,l,c;for(;++t<i.length;){for(;t in e;)t=e[t];if(r=i[t],t&&r[1].type==="chunkFlow"&&i[t-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,Ase(i,t)),t=e[t],c=!0);else if(r[1]._container){for(o=t,n=void 0;o--&&(s=i[o],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(n&&(i[n][1].type="lineEndingBlank"),s[1].type="lineEnding",n=o);n&&(r[1].end=Object.assign({},i[n][1].start),a=i.slice(n,t),a.unshift(r),mn(i,n,t-n+1,a))}}return!c}function Ase(i,e){let t=i[e][1],r=i[e][2],n=e-1,o=[],s=t._tokenizer||r.parser[t.contentType](t.start),a=s.events,l=[],c={},d,u,h=-1,f=t,m=0,g=0,w=[g];for(;f;){for(;i[++n][1]!==f;);o.push(n),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),u&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(g=h+1,w.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):w.pop(),h=w.length;h--;){let _=a.slice(w[h],w[h+1]),E=o.pop();l.unshift([E,E+_.length-1]),mn(i,E,2,_)}for(h=-1;++h<l.length;)c[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return c}var gE={tokenize:Nse,resolve:Mse},Dse={tokenize:Rse,partial:!0};function Mse(i){return Oy(i),i}function Nse(i,e){let t;return r;function r(a){return i.enter("content"),t=i.enter("chunkContent",{contentType:"content"}),n(a)}function n(a){return a===null?o(a):at(a)?i.check(Dse,s,o)(a):(i.consume(a),n)}function o(a){return i.exit("chunkContent"),i.exit("content"),e(a)}function s(a){return i.consume(a),i.exit("chunkContent"),t.next=i.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,n}}function Rse(i,e,t){let r=this;return n;function n(s){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),Kt(i,o,"linePrefix")}function o(s){if(s===null||at(s))return t(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):i.interrupt(r.parser.constructs.flow,t,e)(s)}}function Fy(i,e,t,r,n,o,s,a,l){let c=l||Number.POSITIVE_INFINITY,d=0;return u;function u(_){return _===60?(i.enter(r),i.enter(n),i.enter(o),i.consume(_),i.exit(o),h):_===null||_===32||_===41||Eg(_)?t(_):(i.enter(r),i.enter(s),i.enter(a),i.enter("chunkString",{contentType:"string"}),g(_))}function h(_){return _===62?(i.enter(o),i.consume(_),i.exit(o),i.exit(n),i.exit(r),e):(i.enter(a),i.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(i.exit("chunkString"),i.exit(a),h(_)):_===null||_===60||at(_)?t(_):(i.consume(_),_===92?m:f)}function m(_){return _===60||_===62||_===92?(i.consume(_),f):f(_)}function g(_){return!d&&(_===null||_===41||Sr(_))?(i.exit("chunkString"),i.exit(a),i.exit(s),i.exit(r),e(_)):d<c&&_===40?(i.consume(_),d++,g):_===41?(i.consume(_),d--,g):_===null||_===32||_===40||Eg(_)?t(_):(i.consume(_),_===92?w:g)}function w(_){return _===40||_===41||_===92?(i.consume(_),g):g(_)}}function zy(i,e,t,r,n,o){let s=this,a=0,l;return c;function c(f){return i.enter(r),i.enter(n),i.consume(f),i.exit(n),i.enter(o),d}function d(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?t(f):f===93?(i.exit(o),i.enter(n),i.consume(f),i.exit(n),i.exit(r),e):at(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),d):(i.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===null||f===91||f===93||at(f)||a++>999?(i.exit("chunkString"),d(f)):(i.consume(f),l||(l=!jt(f)),f===92?h:u)}function h(f){return f===91||f===92||f===93?(i.consume(f),a++,u):u(f)}}function By(i,e,t,r,n,o){let s;return a;function a(h){return h===34||h===39||h===40?(i.enter(r),i.enter(n),i.consume(h),i.exit(n),s=h===40?41:h,l):t(h)}function l(h){return h===s?(i.enter(n),i.consume(h),i.exit(n),i.exit(r),e):(i.enter(o),c(h))}function c(h){return h===s?(i.exit(o),l(s)):h===null?t(h):at(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),Kt(i,c,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===s||h===null||at(h)?(i.exit("chunkString"),c(h)):(i.consume(h),h===92?u:d)}function u(h){return h===s||h===92?(i.consume(h),d):d(h)}}function Su(i,e){let t;return r;function r(n){return at(n)?(i.enter("lineEnding"),i.consume(n),i.exit("lineEnding"),t=!0,r):jt(n)?Kt(i,r,t?"linePrefix":"lineSuffix")(n):e(n)}}var bE={name:"definition",tokenize:Ose},Pse={tokenize:Fse,partial:!0};function Ose(i,e,t){let r=this,n;return o;function o(f){return i.enter("definition"),s(f)}function s(f){return zy.call(r,i,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return n=Ll(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),l):t(f)}function l(f){return Sr(f)?Su(i,c)(f):c(f)}function c(f){return Fy(i,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return i.attempt(Pse,u,u)(f)}function u(f){return jt(f)?Kt(i,h,"whitespace")(f):h(f)}function h(f){return f===null||at(f)?(i.exit("definition"),r.parser.defined.push(n),e(f)):t(f)}}function Fse(i,e,t){return r;function r(a){return Sr(a)?Su(i,n)(a):t(a)}function n(a){return By(i,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return jt(a)?Kt(i,s,"whitespace")(a):s(a)}function s(a){return a===null||at(a)?e(a):t(a)}}var vE={name:"hardBreakEscape",tokenize:zse};function zse(i,e,t){return r;function r(o){return i.enter("hardBreakEscape"),i.consume(o),n}function n(o){return at(o)?(i.exit("hardBreakEscape"),e(o)):t(o)}}var _E={name:"headingAtx",tokenize:Hse,resolve:Bse};function Bse(i,e){let t=i.length-2,r=3,n,o;return i[r][1].type==="whitespace"&&(r+=2),t-2>r&&i[t][1].type==="whitespace"&&(t-=2),i[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&i[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(n={type:"atxHeadingText",start:i[r][1].start,end:i[t][1].end},o={type:"chunkText",start:i[r][1].start,end:i[t][1].end,contentType:"text"},mn(i,r,t-r+1,[["enter",n,e],["enter",o,e],["exit",o,e],["exit",n,e]])),i}function Hse(i,e,t){let r=0;return n;function n(d){return i.enter("atxHeading"),o(d)}function o(d){return i.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(i.consume(d),s):d===null||Sr(d)?(i.exit("atxHeadingSequence"),a(d)):t(d)}function a(d){return d===35?(i.enter("atxHeadingSequence"),l(d)):d===null||at(d)?(i.exit("atxHeading"),e(d)):jt(d)?Kt(i,a,"whitespace")(d):(i.enter("atxHeadingText"),c(d))}function l(d){return d===35?(i.consume(d),l):(i.exit("atxHeadingSequence"),a(d))}function c(d){return d===null||d===35||Sr(d)?(i.exit("atxHeadingText"),a(d)):(i.consume(d),c)}}var ZB=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yE=["pre","script","style","textarea"];var wE={name:"htmlFlow",tokenize:Vse,resolveTo:Wse,concrete:!0},Use={tokenize:Kse,partial:!0},jse={tokenize:qse,partial:!0};function Wse(i){let e=i.length;for(;e--&&!(i[e][0]==="enter"&&i[e][1].type==="htmlFlow"););return e>1&&i[e-2][1].type==="linePrefix"&&(i[e][1].start=i[e-2][1].start,i[e+1][1].start=i[e-2][1].start,i.splice(e-2,2)),i}function Vse(i,e,t){let r=this,n,o,s,a,l;return c;function c(G){return d(G)}function d(G){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(G),u}function u(G){return G===33?(i.consume(G),h):G===47?(i.consume(G),o=!0,g):G===63?(i.consume(G),n=3,r.interrupt?e:R):Po(G)?(i.consume(G),s=String.fromCharCode(G),w):t(G)}function h(G){return G===45?(i.consume(G),n=2,f):G===91?(i.consume(G),n=5,a=0,m):Po(G)?(i.consume(G),n=4,r.interrupt?e:R):t(G)}function f(G){return G===45?(i.consume(G),r.interrupt?e:R):t(G)}function m(G){let Et="CDATA[";return G===Et.charCodeAt(a++)?(i.consume(G),a===Et.length?r.interrupt?e:Pe:m):t(G)}function g(G){return Po(G)?(i.consume(G),s=String.fromCharCode(G),w):t(G)}function w(G){if(G===null||G===47||G===62||Sr(G)){let Et=G===47,Ot=s.toLowerCase();return!Et&&!o&&yE.includes(Ot)?(n=1,r.interrupt?e(G):Pe(G)):ZB.includes(s.toLowerCase())?(n=6,Et?(i.consume(G),_):r.interrupt?e(G):Pe(G)):(n=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):o?E(G):A(G))}return G===45||Xn(G)?(i.consume(G),s+=String.fromCharCode(G),w):t(G)}function _(G){return G===62?(i.consume(G),r.interrupt?e:Pe):t(G)}function E(G){return jt(G)?(i.consume(G),E):Z(G)}function A(G){return G===47?(i.consume(G),Z):G===58||G===95||Po(G)?(i.consume(G),L):jt(G)?(i.consume(G),A):Z(G)}function L(G){return G===45||G===46||G===58||G===95||Xn(G)?(i.consume(G),L):O(G)}function O(G){return G===61?(i.consume(G),U):jt(G)?(i.consume(G),O):A(G)}function U(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(i.consume(G),l=G,Y):jt(G)?(i.consume(G),U):oe(G)}function Y(G){return G===l?(i.consume(G),l=null,te):G===null||at(G)?t(G):(i.consume(G),Y)}function oe(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||Sr(G)?O(G):(i.consume(G),oe)}function te(G){return G===47||G===62||jt(G)?A(G):t(G)}function Z(G){return G===62?(i.consume(G),ve):t(G)}function ve(G){return G===null||at(G)?Pe(G):jt(G)?(i.consume(G),ve):t(G)}function Pe(G){return G===45&&n===2?(i.consume(G),dt):G===60&&n===1?(i.consume(G),be):G===62&&n===4?(i.consume(G),ne):G===63&&n===3?(i.consume(G),R):G===93&&n===5?(i.consume(G),X):at(G)&&(n===6||n===7)?(i.exit("htmlFlowData"),i.check(Use,me,Ee)(G)):G===null||at(G)?(i.exit("htmlFlowData"),Ee(G)):(i.consume(G),Pe)}function Ee(G){return i.check(jse,Oe,me)(G)}function Oe(G){return i.enter("lineEnding"),i.consume(G),i.exit("lineEnding"),Xe}function Xe(G){return G===null||at(G)?Ee(G):(i.enter("htmlFlowData"),Pe(G))}function dt(G){return G===45?(i.consume(G),R):Pe(G)}function be(G){return G===47?(i.consume(G),s="",we):Pe(G)}function we(G){if(G===62){let Et=s.toLowerCase();return yE.includes(Et)?(i.consume(G),ne):Pe(G)}return Po(G)&&s.length<8?(i.consume(G),s+=String.fromCharCode(G),we):Pe(G)}function X(G){return G===93?(i.consume(G),R):Pe(G)}function R(G){return G===62?(i.consume(G),ne):G===45&&n===2?(i.consume(G),R):Pe(G)}function ne(G){return G===null||at(G)?(i.exit("htmlFlowData"),me(G)):(i.consume(G),ne)}function me(G){return i.exit("htmlFlow"),e(G)}}function qse(i,e,t){let r=this;return n;function n(s){return at(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o):t(s)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}function Kse(i,e,t){return r;function r(n){return i.enter("lineEnding"),i.consume(n),i.exit("lineEnding"),i.attempt(ed,e,t)}}var xE={name:"htmlText",tokenize:$se};function $se(i,e,t){let r=this,n,o,s;return a;function a(R){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(R),l}function l(R){return R===33?(i.consume(R),c):R===47?(i.consume(R),O):R===63?(i.consume(R),A):Po(R)?(i.consume(R),oe):t(R)}function c(R){return R===45?(i.consume(R),d):R===91?(i.consume(R),o=0,m):Po(R)?(i.consume(R),E):t(R)}function d(R){return R===45?(i.consume(R),f):t(R)}function u(R){return R===null?t(R):R===45?(i.consume(R),h):at(R)?(s=u,be(R)):(i.consume(R),u)}function h(R){return R===45?(i.consume(R),f):u(R)}function f(R){return R===62?dt(R):R===45?h(R):u(R)}function m(R){let ne="CDATA[";return R===ne.charCodeAt(o++)?(i.consume(R),o===ne.length?g:m):t(R)}function g(R){return R===null?t(R):R===93?(i.consume(R),w):at(R)?(s=g,be(R)):(i.consume(R),g)}function w(R){return R===93?(i.consume(R),_):g(R)}function _(R){return R===62?dt(R):R===93?(i.consume(R),_):g(R)}function E(R){return R===null||R===62?dt(R):at(R)?(s=E,be(R)):(i.consume(R),E)}function A(R){return R===null?t(R):R===63?(i.consume(R),L):at(R)?(s=A,be(R)):(i.consume(R),A)}function L(R){return R===62?dt(R):A(R)}function O(R){return Po(R)?(i.consume(R),U):t(R)}function U(R){return R===45||Xn(R)?(i.consume(R),U):Y(R)}function Y(R){return at(R)?(s=Y,be(R)):jt(R)?(i.consume(R),Y):dt(R)}function oe(R){return R===45||Xn(R)?(i.consume(R),oe):R===47||R===62||Sr(R)?te(R):t(R)}function te(R){return R===47?(i.consume(R),dt):R===58||R===95||Po(R)?(i.consume(R),Z):at(R)?(s=te,be(R)):jt(R)?(i.consume(R),te):dt(R)}function Z(R){return R===45||R===46||R===58||R===95||Xn(R)?(i.consume(R),Z):ve(R)}function ve(R){return R===61?(i.consume(R),Pe):at(R)?(s=ve,be(R)):jt(R)?(i.consume(R),ve):te(R)}function Pe(R){return R===null||R===60||R===61||R===62||R===96?t(R):R===34||R===39?(i.consume(R),n=R,Ee):at(R)?(s=Pe,be(R)):jt(R)?(i.consume(R),Pe):(i.consume(R),Oe)}function Ee(R){return R===n?(i.consume(R),n=void 0,Xe):R===null?t(R):at(R)?(s=Ee,be(R)):(i.consume(R),Ee)}function Oe(R){return R===null||R===34||R===39||R===60||R===61||R===96?t(R):R===47||R===62||Sr(R)?te(R):(i.consume(R),Oe)}function Xe(R){return R===47||R===62||Sr(R)?te(R):t(R)}function dt(R){return R===62?(i.consume(R),i.exit("htmlTextData"),i.exit("htmlText"),e):t(R)}function be(R){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(R),i.exit("lineEnding"),we}function we(R){return jt(R)?Kt(i,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):X(R)}function X(R){return i.enter("htmlTextData"),s(R)}}var ku={name:"labelEnd",tokenize:Jse,resolveTo:Zse,resolveAll:Qse},Gse={tokenize:eae},Yse={tokenize:tae},Xse={tokenize:iae};function Qse(i){let e=-1;for(;++e<i.length;){let t=i[e][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(i.splice(e+1,t.type==="labelImage"?4:2),t.type="data",e++)}return i}function Zse(i,e){let t=i.length,r=0,n,o,s,a;for(;t--;)if(n=i[t][1],o){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;i[t][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(s){if(i[t][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(o=t,n.type!=="labelLink")){r=2;break}}else n.type==="labelEnd"&&(s=t);let l={type:i[o][1].type==="labelLink"?"link":"image",start:Object.assign({},i[o][1].start),end:Object.assign({},i[i.length-1][1].end)},c={type:"label",start:Object.assign({},i[o][1].start),end:Object.assign({},i[s][1].end)},d={type:"labelText",start:Object.assign({},i[o+r+2][1].end),end:Object.assign({},i[s-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=Yn(a,i.slice(o+1,o+r+3)),a=Yn(a,[["enter",d,e]]),a=Yn(a,Af(e.parser.constructs.insideSpan.null,i.slice(o+r+4,s-3),e)),a=Yn(a,[["exit",d,e],i[s-2],i[s-1],["exit",c,e]]),a=Yn(a,i.slice(s+1)),a=Yn(a,[["exit",l,e]]),mn(i,o,i.length,a),i}function Jse(i,e,t){let r=this,n=r.events.length,o,s;for(;n--;)if((r.events[n][1].type==="labelImage"||r.events[n][1].type==="labelLink")&&!r.events[n][1]._balanced){o=r.events[n][1];break}return a;function a(h){return o?o._inactive?u(h):(s=r.parser.defined.includes(Ll(r.sliceSerialize({start:o.end,end:r.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(h),i.exit("labelMarker"),i.exit("labelEnd"),l):t(h)}function l(h){return h===40?i.attempt(Gse,d,s?d:u)(h):h===91?i.attempt(Yse,d,s?c:u)(h):s?d(h):u(h)}function c(h){return i.attempt(Xse,d,u)(h)}function d(h){return e(h)}function u(h){return o._balanced=!0,t(h)}}function eae(i,e,t){return r;function r(u){return i.enter("resource"),i.enter("resourceMarker"),i.consume(u),i.exit("resourceMarker"),n}function n(u){return Sr(u)?Su(i,o)(u):o(u)}function o(u){return u===41?d(u):Fy(i,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function s(u){return Sr(u)?Su(i,l)(u):d(u)}function a(u){return t(u)}function l(u){return u===34||u===39||u===40?By(i,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function c(u){return Sr(u)?Su(i,d)(u):d(u)}function d(u){return u===41?(i.enter("resourceMarker"),i.consume(u),i.exit("resourceMarker"),i.exit("resource"),e):t(u)}}function tae(i,e,t){let r=this;return n;function n(a){return zy.call(r,i,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Ll(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):t(a)}function s(a){return t(a)}}function iae(i,e,t){return r;function r(o){return i.enter("reference"),i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),n}function n(o){return o===93?(i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),i.exit("reference"),e):t(o)}}var CE={name:"labelStartImage",tokenize:rae,resolveAll:ku.resolveAll};function rae(i,e,t){let r=this;return n;function n(a){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(a),i.exit("labelImageMarker"),o}function o(a){return a===91?(i.enter("labelMarker"),i.consume(a),i.exit("labelMarker"),i.exit("labelImage"),s):t(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):e(a)}}var SE={name:"labelStartLink",tokenize:nae,resolveAll:ku.resolveAll};function nae(i,e,t){let r=this;return n;function n(s){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(s),i.exit("labelMarker"),i.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):e(s)}}var Ag={name:"lineEnding",tokenize:oae};function oae(i,e){return t;function t(r){return i.enter("lineEnding"),i.consume(r),i.exit("lineEnding"),Kt(i,e,"linePrefix")}}var Eu={name:"thematicBreak",tokenize:sae};function sae(i,e,t){let r=0,n;return o;function o(c){return i.enter("thematicBreak"),s(c)}function s(c){return n=c,a(c)}function a(c){return c===n?(i.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||at(c))?(i.exit("thematicBreak"),e(c)):t(c)}function l(c){return c===n?(i.consume(c),r++,l):(i.exit("thematicBreakSequence"),jt(c)?Kt(i,a,"whitespace")(c):a(c))}}var Nn={name:"list",tokenize:cae,continuation:{tokenize:dae},exit:hae},aae={tokenize:fae,partial:!0},lae={tokenize:uae,partial:!0};function cae(i,e,t){let r=this,n=r.events[r.events.length-1],o=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,s=0;return a;function a(f){let m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Tg(f)){if(r.containerState.type||(r.containerState.type=m,i.enter(m,{_container:!0})),m==="listUnordered")return i.enter("listItemPrefix"),f===42||f===45?i.check(Eu,t,c)(f):c(f);if(!r.interrupt||f===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),l(f)}return t(f)}function l(f){return Tg(f)&&++s<10?(i.consume(f),l):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(i.exit("listItemValue"),c(f)):t(f)}function c(f){return i.enter("listItemMarker"),i.consume(f),i.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,i.check(ed,r.interrupt?t:d,i.attempt(aae,h,u))}function d(f){return r.containerState.initialBlankLine=!0,o++,h(f)}function u(f){return jt(f)?(i.enter("listItemPrefixWhitespace"),i.consume(f),i.exit("listItemPrefixWhitespace"),h):t(f)}function h(f){return r.containerState.size=o+r.sliceSerialize(i.exit("listItemPrefix"),!0).length,e(f)}}function dae(i,e,t){let r=this;return r.containerState._closeFlow=void 0,i.check(ed,n,o);function n(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Kt(i,e,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!jt(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i.attempt(lae,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Kt(i,i.attempt(Nn,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function uae(i,e,t){let r=this;return Kt(i,n,"listItemIndent",r.containerState.size+1);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):t(o)}}function hae(i){i.exit(this.containerState.type)}function fae(i,e,t){let r=this;return Kt(i,n,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function n(o){let s=r.events[r.events.length-1];return!jt(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):t(o)}}var Hy={name:"setextUnderline",tokenize:mae,resolveTo:pae};function pae(i,e){let t=i.length,r,n,o;for(;t--;)if(i[t][0]==="enter"){if(i[t][1].type==="content"){r=t;break}i[t][1].type==="paragraph"&&(n=t)}else i[t][1].type==="content"&&i.splice(t,1),!o&&i[t][1].type==="definition"&&(o=t);let s={type:"setextHeading",start:Object.assign({},i[n][1].start),end:Object.assign({},i[i.length-1][1].end)};return i[n][1].type="setextHeadingText",o?(i.splice(n,0,["enter",s,e]),i.splice(o+1,0,["exit",i[r][1],e]),i[r][1].end=Object.assign({},i[o][1].end)):i[r][1]=s,i.push(["exit",s,e]),i}function mae(i,e,t){let r=this,n;return o;function o(c){let d=r.events.length,u;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){u=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(i.enter("setextHeadingLine"),n=c,s(c)):t(c)}function s(c){return i.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===n?(i.consume(c),a):(i.exit("setextHeadingLineSequence"),jt(c)?Kt(i,l,"lineSuffix")(c):l(c))}function l(c){return c===null||at(c)?(i.exit("setextHeadingLine"),e(c)):t(c)}}var JB={tokenize:gae};function gae(i){let e=this,t=i.attempt(ed,r,i.attempt(this.parser.constructs.flowInitial,n,Kt(i,i.attempt(this.parser.constructs.flow,n,i.attempt(gE,n)),"linePrefix")));return t;function r(o){if(o===null){i.consume(o);return}return i.enter("lineEndingBlank"),i.consume(o),i.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function n(o){if(o===null){i.consume(o);return}return i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),e.currentConstruct=void 0,t}}var eH={resolveAll:nH()},tH=rH("string"),iH=rH("text");function rH(i){return{tokenize:e,resolveAll:nH(i==="text"?bae:void 0)};function e(t){let r=this,n=this.parser.constructs[i],o=t.attempt(n,s,a);return s;function s(d){return c(d)?o(d):a(d)}function a(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),l}function l(d){return c(d)?(t.exit("data"),o(d)):(t.consume(d),l)}function c(d){if(d===null)return!0;let u=n[d],h=-1;if(u)for(;++h<u.length;){let f=u[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function nH(i){return e;function e(t,r){let n=-1,o;for(;++n<=t.length;)o===void 0?t[n]&&t[n][1].type==="data"&&(o=n,n++):(!t[n]||t[n][1].type!=="data")&&(n!==o+2&&(t[o][1].end=t[n-1][1].end,t.splice(o+2,n-o-2),n=o+2),o=void 0);return i?i(t,r):t}}function bae(i,e){let t=0;for(;++t<=i.length;)if((t===i.length||i[t][1].type==="lineEnding")&&i[t-1][1].type==="data"){let r=i[t-1][1],n=e.sliceStream(r),o=n.length,s=-1,a=0,l;for(;o--;){let c=n[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){o++;break}}if(a){let c={type:t===i.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+o,_bufferIndex:o?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(i.splice(t,0,["enter",c,e],["exit",c,e]),t+=2)}t++}return i}function oH(i,e,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},o=[],s=[],a=[],l=!0,c={consume:L,enter:O,exit:U,attempt:te(Y),check:te(oe),interrupt:te(oe,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:i,sliceStream:g,sliceSerialize:m,now:w,defineSkip:_,write:f},u=e.tokenize.call(d,c),h;return e.resolveAll&&o.push(e),d;function f(Ee){return s=Yn(s,Ee),E(),s[s.length-1]!==null?[]:(Z(e,0),d.events=Af(o,d.events,d),d.events)}function m(Ee,Oe){return _ae(g(Ee),Oe)}function g(Ee){return vae(s,Ee)}function w(){let{line:Ee,column:Oe,offset:Xe,_index:dt,_bufferIndex:be}=r;return{line:Ee,column:Oe,offset:Xe,_index:dt,_bufferIndex:be}}function _(Ee){n[Ee.line]=Ee.column,Pe()}function E(){let Ee;for(;r._index<s.length;){let Oe=s[r._index];if(typeof Oe=="string")for(Ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Ee&&r._bufferIndex<Oe.length;)A(Oe.charCodeAt(r._bufferIndex));else A(Oe)}}function A(Ee){l=void 0,h=Ee,u=u(Ee)}function L(Ee){at(Ee)?(r.line++,r.column=1,r.offset+=Ee===-3?2:1,Pe()):Ee!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=Ee,l=!0}function O(Ee,Oe){let Xe=Oe||{};return Xe.type=Ee,Xe.start=w(),d.events.push(["enter",Xe,d]),a.push(Xe),Xe}function U(Ee){let Oe=a.pop();return Oe.end=w(),d.events.push(["exit",Oe,d]),Oe}function Y(Ee,Oe){Z(Ee,Oe.from)}function oe(Ee,Oe){Oe.restore()}function te(Ee,Oe){return Xe;function Xe(dt,be,we){let X,R,ne,me;return Array.isArray(dt)?Et(dt):"tokenize"in dt?Et([dt]):G(dt);function G(kt){return Ei;function Ei(fi){let xo=fi!==null&&kt[fi],ro=fi!==null&&kt.null,kc=[...Array.isArray(xo)?xo:xo?[xo]:[],...Array.isArray(ro)?ro:ro?[ro]:[]];return Et(kc)(fi)}}function Et(kt){return X=kt,R=0,kt.length===0?we:Ot(kt[R])}function Ot(kt){return Ei;function Ei(fi){return me=ve(),ne=kt,kt.partial||(d.currentConstruct=kt),kt.name&&d.parser.constructs.disable.null.includes(kt.name)?Ti(fi):kt.tokenize.call(Oe?Object.assign(Object.create(d),Oe):d,c,ai,Ti)(fi)}}function ai(kt){return l=!0,Ee(ne,me),be}function Ti(kt){return l=!0,me.restore(),++R<X.length?Ot(X[R]):we}}}function Z(Ee,Oe){Ee.resolveAll&&!o.includes(Ee)&&o.push(Ee),Ee.resolve&&mn(d.events,Oe,d.events.length-Oe,Ee.resolve(d.events.slice(Oe),d)),Ee.resolveTo&&(d.events=Ee.resolveTo(d.events,d))}function ve(){let Ee=w(),Oe=d.previous,Xe=d.currentConstruct,dt=d.events.length,be=Array.from(a);return{restore:we,from:dt};function we(){r=Ee,d.previous=Oe,d.currentConstruct=Xe,d.events.length=dt,a=be,Pe()}}function Pe(){r.line in n&&r.column<2&&(r.column=n[r.line],r.offset+=n[r.line]-1)}}function vae(i,e){let t=e.start._index,r=e.start._bufferIndex,n=e.end._index,o=e.end._bufferIndex,s;if(t===n)s=[i[t].slice(r,o)];else{if(s=i.slice(t,n),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(i[n].slice(0,o))}return s}function _ae(i,e){let t=-1,r=[],n;for(;++t<i.length;){let o=i[t],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=` + `);this.socket=new e(i,t),this.bindingPrefix=t.bindingPrefix||Kne,this.opts=t,this.params=qk(t.params||{}),this.viewLogger=t.viewLogger,this.metadataCallbacks=t.metadata||{},this.defaults=Object.assign(wy(Gne),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=wy(window.location),this.hooks=t.hooks||{},this.uploaders=t.uploaders||{},this.loaderTimeout=t.loaderTimeout||Vne,this.reloadWithJitterTimer=null,this.maxReloads=t.maxReloads||Dne,this.reloadJitterMin=t.reloadJitterMin||Mne,this.reloadJitterMax=t.reloadJitterMax||Nne,this.failsafeJitter=t.failsafeJitter||Rne,this.localStorage=t.localStorage||window.localStorage,this.sessionStorage=t.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:qk(),onBeforeElUpdated:qk()},t.dom||{}),this.transitions=new koe,window.addEventListener("pagehide",r=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(jk)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(hy)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(hy)==="false"}enableDebug(){this.sessionStorage.setItem(hy,"true")}enableProfiling(){this.sessionStorage.setItem(jk,"true")}disableDebug(){this.sessionStorage.setItem(hy,"false")}disableProfiling(){this.sessionStorage.removeItem(jk)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(Wk,i)}disableLatencySim(){this.sessionStorage.removeItem(Wk)}getLatencySim(){let i=this.sessionStorage.getItem(Wk);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,r=>Ms.exec(t,e,r,i))}execJSHookPush(i,e,t,r){this.withinOwners(i,n=>{Ms.exec("hook",e,n,i,["push",{data:t,callback:r}])})}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[r,n]=t();this.viewLogger(i,e,r,n)}else if(this.isDebugEnabled()){let[r,n]=t();Zne(i,e,r,n)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,r=>{let n=this.getLatencySim();n?setTimeout(()=>t(r),n):t(r)})}wrapPush(i,e,t){let r=this.getLatencySim(),n=i.joinCount;if(!r)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===n&&!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())},r),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,r=this.reloadJitterMax,n=Math.floor(Math.random()*(r-t+1))+t,o=ka.updateLocal(this.localStorage,window.location.pathname,Yz,0,s=>s+1);o>this.maxReloads&&(n=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())},n)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?ooe[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 pe.all(document,`${Tf}:not([${kf}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(Zk)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),ka.redirect(i,e)}replaceMain(i,e,t=null,r=this.setPendingLink(i)){let n=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=pe.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,n),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(r)&&this.requestDOMUpdate(()=>{pe.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(()=>t(r)),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||pe.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(Xc)!==null}newRootView(i,e,t){let r=new oB(i,this,null,e,t);return this.roots[r.id]=r,r}owner(i,e){let t=Gc(i.closest(Tf),r=>this.getViewByEl(r))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(wg);return Gc(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(wg));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,r,n,o,s)=>{let a=n.getAttribute(this.binding(jne)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=ue({key:e.key},this.eventMeta(t,e,n));Ms.exec(t,o,r,n,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,r,n,o,s)=>{if(!s){let a=ue({key:e.key},this.eventMeta(t,e,n));Ms.exec(t,o,r,n,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,r,n,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,n);Ms.exec(t,s,r,n,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=Gc(yg(e.target,this.binding(kz)),o=>o.getAttribute(this.binding(kz))),r=t&&document.getElementById(t),n=Array.from(e.dataTransfer.files||[]);!r||r.disabled||n.length===0||!(r.files instanceof FileList)||(pn.trackFiles(r,n,e.dataTransfer),r.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(Qz,e=>{let t=e.target;if(!pe.isUploadInput(t))return;let r=Array.from(e.detail.files||[]).filter(n=>n instanceof File||n instanceof Blob);pn.trackFiles(t,r),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let r=this.metadataCallbacks[i];return r?r(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 r=i[t];this.on(r,n=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=n.target.getAttribute&&n.target.getAttribute(o);a?this.debounce(n.target,n,r,()=>{this.withinOwners(n.target,l=>{e(n,t,l,n.target,a,null)})}):pe.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,n,r,()=>{this.withinOwners(l,d=>{e(n,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 r=this.binding(e);window.addEventListener(i,n=>{let o=null;if(t)o=n.target.matches(`[${r}]`)?n.target:n.target.querySelector(`[${r}]`);else{let a=this.clickStartedAtTarget||n.target;o=yg(a,r),this.dispatchClickAway(n,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(r);if(!s){!t&&pe.isNewPageClick(n,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&n.preventDefault(),!o.hasAttribute(rs)&&this.debounce(o,n,"click",()=>{this.withinOwners(o,a=>{Ms.exec("click",s,a,o,["push",{data:this.eventMeta("click",n,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");pe.all(document,`[${t}]`,r=>{r.isSameNode(e)||r.contains(e)||this.withinOwners(i.target,n=>{let o=r.getAttribute(t);Ms.isVisible(r)&&Ms.exec("click",o,n,r,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!ka.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{ka.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:r,root:n,scroll:o}=e.state||{},s=window.location.href;pe.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:t==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&r===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{n&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=yg(e.target,zk),r=t&&t.getAttribute(zk);if(!r||!this.isConnected()||!this.main||pe.wantsNewTab(e))return;let n=t.href,o=t.getAttribute(One);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==n&&this.requestDOMUpdate(()=>{if(r==="patch")this.pushHistoryPatch(n,o,t);else if(r==="redirect")this.historyRedirect(n,o);else throw new Error(`expected ${zk} to be "patch" or "redirect", got: ${r}`);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={}){pe.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){pe.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>pe.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return ka.redirect(i);this.withPageLoading({to:i,kind:"patch"},r=>{this.main.pushLinkPatch(i,t,n=>{this.historyPatch(i,e,n),r()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(ka.pushState(e,{type:"patch",id:this.main.id},i),pe.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:i,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return ka.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:n,host:o}=window.location;i=`${n}//${o}${i}`}let r=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},n=>{this.replaceMain(i,t,o=>{o===this.linkRef&&(ka.pushState(e,{type:"redirect",id:this.main.id,scroll:r},i),pe.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),n()})})}replaceRootHistory(){ka.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=wy(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let r=t.target.getAttribute(this.binding("submit")),n=t.target.getAttribute(this.binding("change"));!e&&n&&!r&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{pe.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let r=t.target.getAttribute(this.binding("submit"));if(!r){pe.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,n=>{Ms.exec("submit",r,n,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,r=>{let n=this.binding("change"),o=r.target,s=o.getAttribute(n),a=o.form&&o.form.getAttribute(n),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}=pe.private(o,"prev-iteration")||{};u===d-1&&t==="change"&&h==="input"||(pe.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,r,t,()=>{this.withinOwners(c,f=>{pe.putPrivate(o,Yk,!0),pe.isTextualInput(o)||this.setActiveElement(o),Ms.exec("change",l,f,o,["push",{_target:r.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let r=t.target;pe.resetForm(r,this.binding(xy));let n=Array.from(r.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{n.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,r){if(t==="blur"||t==="focusout")return r();let n=this.binding(Hne),o=this.binding(Une),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);pe.debounce(i,e,n,s,o,a,c,()=>{r()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},koe=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 r=setTimeout(()=>{this.transitions.delete(r),t(),this.flushPendingOps()},i);this.transitions.add(r)}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 aB="livebook:";function Cu(i){try{let e=localStorage.getItem(aB+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function If(i,e){try{let t=JSON.stringify(e);localStorage.setItem(aB+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var lB="app_auth_token:";function cB(i,e){If(lB+i,e)}function dB(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=Cu(lB+e);if(t)return t}return null}var Eoe={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{cB(i,e),this.pushEvent("app_auth_persisted")})}},uB=Eoe;function Ri(i,e){let t={};for(let r of e){let n=`data-p-${r}`;if(!i.hasAttribute(n))throw new Error(`Missing attribute "${n}" on element <${i.tagName}:${i.id}>`);let o=i.getAttribute(n);t[Toe(r)]=JSON.parse(o)}return t}function Toe(i){let[e,...t]=i.split("-");return[e,...t.map(r=>r.charAt(0).toUpperCase()+r.slice(1))].join("")}function hB(i,e,t){let n=new ArrayBuffer(44+i.byteLength),o=new DataView(n),s=i.byteLength/4,a=4,l=e*a,c=t*l,d=s*l,u=0;function h(_){o.setUint32(u,_,!1),u+=4}function f(_){o.setUint32(u,_,!0),u+=4}function m(_){o.setUint16(u,_,!0),u+=2}function g(_){o.setFloat32(u,_,!0),u+=4}h(1380533830),f(36+d),h(1463899717),h(1718449184),f(16),m(3),m(e),f(t),f(c),m(l),m(a*8),h(1684108385),f(d);let w=new Float32Array(i);for(let _=0;_<w.length;_++)g(w[_]);return n}var xg=4;function fB(i,e){let r=new TextEncoder().encode(JSON.stringify(i)),n=new ArrayBuffer(xg+r.byteLength+e.byteLength);return new DataView(n).setUint32(0,r.byteLength),new Uint8Array(n,xg,r.byteLength).set(r),new Uint8Array(n,xg+r.byteLength).set(new Uint8Array(e)),n}function pB(i){let t=new DataView(i).getUint32(0),r=new Uint8Array(i,xg,t),n=i.slice(xg+t),o=new TextDecoder;return[JSON.parse(o.decode(r)),n]}var eE=["bg-yellow-100","border-yellow-300"],Ioe={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.audioEl=this.el.querySelector("[data-preview]"),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.recordButton=this.el.querySelector("[data-btn-record]"),this.stopButton=this.el.querySelector("[data-btn-stop]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.mediaRecorder=null,this.audioEl.src=this.props.audioUrl,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(...eE)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...eE)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...eE)}),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 Ri(this.el,["id","phx-target","sampling-rate","endianness","format","audio-url"])},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(r=>{this.loadEncodedAudio(r)})}),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 r=Loe(t);this.pushAudio(r)})},pushAudio(i){let e={num_channels:i.numChannels,sampling_rate:i.samplingRate},t=this.encodeAudio(i),r=new Blob([t]);r.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[r])},encodeAudio(i){if(this.props.format==="pcm_f32")return Aoe(i.data,this.props.endianness);if(this.props.format==="wav")return hB(i.data,i.numChannels,i.samplingRate)}};function Loe(i){let e=i.numberOfChannels,t=i.sampleRate,r=i.length,n=4*e*r,o=new ArrayBuffer(n),s=new Float32Array(o);for(let a=0;a<e;a++){let l=i.getChannelData(a);for(let c=0;c<l.length;c++)s[e*c+a]=l[c]}return{data:s.buffer,numChannels:e,samplingRate:t}}function Aoe(i,e){if(Doe()===e)return i;for(let t=0;t<i.byteLength/4;t++){let r=i[t],n=i[t+1],o=i[t+2],s=i[t+3];i[t]=s,i[t+1]=o,i[t+2]=n,i[t+3]=r}return i}function Doe(){let i=new ArrayBuffer(2),e=new Uint16Array(i),t=new Uint8Array(i);return e[0]=1,t[0]===1?"little":"big"}var mB=Ioe;var gB=11;function Moe(i,e){var t=e.attributes,r,n,o,s,a;if(!(e.nodeType===gB||i.nodeType===gB)){for(var l=t.length-1;l>=0;l--)r=t[l],n=r.name,o=r.namespaceURI,s=r.value,o?(n=r.localName||n,a=i.getAttributeNS(o,n),a!==s&&(r.prefix==="xmlns"&&(n=r.name),i.setAttributeNS(o,n,s))):(a=i.getAttribute(n),a!==s&&i.setAttribute(n,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)r=c[d],n=r.name,o=r.namespaceURI,o?(n=r.localName||n,e.hasAttributeNS(o,n)||i.removeAttributeNS(o,n)):e.hasAttribute(n)||i.removeAttribute(n)}}var ky,Noe="http://www.w3.org/1999/xhtml",lo=typeof document=="undefined"?void 0:document,Roe=!!lo&&"content"in lo.createElement("template"),Poe=!!lo&&lo.createRange&&"createContextualFragment"in lo.createRange();function Ooe(i){var e=lo.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Foe(i){ky||(ky=lo.createRange(),ky.selectNode(lo.body));var e=ky.createContextualFragment(i);return e.childNodes[0]}function zoe(i){var e=lo.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Boe(i){return i=i.trim(),Roe?Ooe(i):Poe?Foe(i):zoe(i)}function Ey(i,e){var t=i.nodeName,r=e.nodeName,n,o;return t===r?!0:(n=t.charCodeAt(0),o=r.charCodeAt(0),n<=90&&o>=97?t===r.toUpperCase():o<=90&&n>=97?r===t.toUpperCase():!1)}function Hoe(i,e){return!e||e===Noe?lo.createElement(i):lo.createElementNS(e,i)}function Uoe(i,e){for(var t=i.firstChild;t;){var r=t.nextSibling;e.appendChild(t),t=r}return e}function tE(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var bB={OPTION:function(i,e){var t=i.parentNode;if(t){var r=t.nodeName.toUpperCase();r==="OPTGROUP"&&(t=t.parentNode,r=t&&t.nodeName.toUpperCase()),r==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}tE(i,e,"selected")},INPUT:function(i,e){tE(i,e,"checked"),tE(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 r=i.firstChild;if(r){var n=r.nodeValue;if(n==t||!t&&n==i.placeholder)return;r.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,r=0,n=i.firstChild,o,s;n;)if(s=n.nodeName&&n.nodeName.toUpperCase(),s==="OPTGROUP")o=n,n=o.firstChild;else{if(s==="OPTION"){if(n.hasAttribute("selected")){t=r;break}r++}n=n.nextSibling,!n&&o&&(n=o.nextSibling,o=null)}i.selectedIndex=t}}},Cg=1,vB=11,_B=3,yB=8;function Qc(){}function joe(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function Woe(i){return function(t,r,n){if(n||(n={}),typeof r=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=r;r=lo.createElement("html"),r.innerHTML=o}else r=Boe(r);else r.nodeType===vB&&(r=r.firstElementChild);var s=n.getNodeKey||joe,a=n.onBeforeNodeAdded||Qc,l=n.onNodeAdded||Qc,c=n.onBeforeElUpdated||Qc,d=n.onElUpdated||Qc,u=n.onBeforeNodeDiscarded||Qc,h=n.onNodeDiscarded||Qc,f=n.onBeforeElChildrenUpdated||Qc,m=n.skipFromChildren||Qc,g=n.addChild||function(be,we){return be.appendChild(we)},w=n.childrenOnly===!0,_=Object.create(null),E=[];function A(be){E.push(be)}function L(be,we){if(be.nodeType===Cg)for(var X=be.firstChild;X;){var R=void 0;we&&(R=s(X))?A(R):(h(X),X.firstChild&&L(X,we)),X=X.nextSibling}}function O(be,we,X){u(be)!==!1&&(we&&we.removeChild(be),h(be),L(be,X))}function U(be){if(be.nodeType===Cg||be.nodeType===vB)for(var we=be.firstChild;we;){var X=s(we);X&&(_[X]=we),U(we),we=we.nextSibling}}U(t);function Y(be){l(be);for(var we=be.firstChild;we;){var X=we.nextSibling,R=s(we);if(R){var ne=_[R];ne&&Ey(we,ne)?(we.parentNode.replaceChild(ne,we),te(ne,we)):Y(we)}else Y(we);we=X}}function oe(be,we,X){for(;we;){var R=we.nextSibling;(X=s(we))?A(X):O(we,be,!0),we=R}}function te(be,we,X){var R=s(we);R&&delete _[R],!(!X&&(c(be,we)===!1||(i(be,we),d(be),f(be,we)===!1)))&&(be.nodeName!=="TEXTAREA"?Z(be,we):bB.TEXTAREA(be,we))}function Z(be,we){var X=m(be,we),R=we.firstChild,ne=be.firstChild,me,G,Et,Ot,ai;e:for(;R;){for(Ot=R.nextSibling,me=s(R);!X&≠){if(Et=ne.nextSibling,R.isSameNode&&R.isSameNode(ne)){R=Ot,ne=Et;continue e}G=s(ne);var Ti=ne.nodeType,kt=void 0;if(Ti===R.nodeType&&(Ti===Cg?(me?me!==G&&((ai=_[me])?Et===ai?kt=!1:(be.insertBefore(ai,ne),G?A(G):O(ne,be,!0),ne=ai):kt=!1):G&&(kt=!1),kt=kt!==!1&&Ey(ne,R),kt&&te(ne,R)):(Ti===_B||Ti==yB)&&(kt=!0,ne.nodeValue!==R.nodeValue&&(ne.nodeValue=R.nodeValue))),kt){R=Ot,ne=Et;continue e}G?A(G):O(ne,be,!0),ne=Et}if(me&&(ai=_[me])&&Ey(ai,R))X||g(be,ai),te(ai,R);else{var Ei=a(R);Ei!==!1&&(Ei&&(R=Ei),R.actualize&&(R=R.actualize(be.ownerDocument||lo)),g(be,R),Y(R))}R=Ot,ne=Et}oe(be,ne,G);var fi=bB[be.nodeName];fi&&fi(be,we)}var ve=t,Pe=ve.nodeType,Ee=r.nodeType;if(!w){if(Pe===Cg)Ee===Cg?Ey(t,r)||(h(t),ve=Uoe(t,Hoe(r.nodeName,r.namespaceURI))):ve=r;else if(Pe===_B||Pe===yB){if(Ee===Pe)return ve.nodeValue!==r.nodeValue&&(ve.nodeValue=r.nodeValue),ve;ve=r}}if(ve===r)h(t);else{if(r.isSameNode&&r.isSameNode(ve))return;if(te(ve,r,w),E)for(var Oe=0,Xe=E.length;Oe<Xe;Oe++){var dt=_[E[Oe]];dt&&O(dt,dt.parentNode,!1)}}return!w&&ve!==t&&t.parentNode&&(ve.actualize&&(ve=ve.actualize(t.ownerDocument||lo)),t.parentNode.replaceChild(ve,t)),ve}}var Voe=Woe(Moe),wB=Voe;function iE(i){if(i)throw i}var Ly=Wn(AB(),1);function Sg(i){if(typeof i!="object"||i===null)return!1;let e=Object.getPrototypeOf(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function DB(){let i=[],e={run:t,use:r};return e;function t(...n){let o=-1,s=n.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...n);function a(l,...c){let d=i[++o],u=-1;if(l){s(l);return}for(;++u<n.length;)(c[u]===null||c[u]===void 0)&&(c[u]=n[u]);n=c,d?qoe(d,a)(...c):s(null,...c)}}function r(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return i.push(n),e}}function qoe(i,e){let t;return r;function r(...s){let a=i.length>s.length,l;a&&s.push(n);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return n(d)}a||(l instanceof Promise?l.then(o,n):l instanceof Error?n(l):o(l))}function n(s,...a){t||(t=!0,e(s,...a))}function o(s){n(null,s)}}function nE(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?MB(i.position):"start"in i||"end"in i?MB(i):"line"in i||"column"in i?rE(i):""}function rE(i){return NB(i&&i.line)+":"+NB(i&&i.column)}function MB(i){return rE(i&&i.start)+"-"+rE(i&&i.end)}function NB(i){return i&&typeof i=="number"?i:1}var Ar=class extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let n="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o=ue({},t)),typeof e=="string"?n=e:!o.cause&&e&&(s=!0,n=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=a?a.line:void 0,this.name=nE(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Ar.prototype.file="";Ar.prototype.name="";Ar.prototype.reason="";Ar.prototype.message="";Ar.prototype.stack="";Ar.prototype.column=void 0;Ar.prototype.line=void 0;Ar.prototype.ancestors=void 0;Ar.prototype.cause=void 0;Ar.prototype.fatal=void 0;Ar.prototype.place=void 0;Ar.prototype.ruleId=void 0;Ar.prototype.source=void 0;var Ns={basename:Koe,dirname:$oe,extname:Goe,join:Yoe,sep:"/"};function Koe(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');kg(i);let t=0,r=-1,n=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;n--;)if(i.codePointAt(n)===47){if(o){t=n+1;break}}else r<0&&(o=!0,r=n+1);return r<0?"":i.slice(t,r)}if(e===i)return"";let s=-1,a=e.length-1;for(;n--;)if(i.codePointAt(n)===47){if(o){t=n+1;break}}else s<0&&(o=!0,s=n+1),a>-1&&(i.codePointAt(n)===e.codePointAt(a--)?a<0&&(r=n):(a=-1,r=s));return t===r?r=s:r<0&&(r=i.length),i.slice(t,r)}function $oe(i){if(kg(i),i.length===0)return".";let e=-1,t=i.length,r;for(;--t;)if(i.codePointAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?i.codePointAt(0)===47?"/":".":e===1&&i.codePointAt(0)===47?"//":i.slice(0,e)}function Goe(i){kg(i);let e=i.length,t=-1,r=0,n=-1,o=0,s;for(;e--;){let a=i.codePointAt(e);if(a===47){if(s){r=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?n<0?n=e:o!==1&&(o=1):n>-1&&(o=-1)}return n<0||t<0||o===0||o===1&&n===t-1&&n===r+1?"":i.slice(n,t)}function Yoe(...i){let e=-1,t;for(;++e<i.length;)kg(i[e]),i[e]&&(t=t===void 0?i[e]:t+"/"+i[e]);return t===void 0?".":Xoe(t)}function Xoe(i){kg(i);let e=i.codePointAt(0)===47,t=Qoe(i,!e);return t.length===0&&!e&&(t="."),t.length>0&&i.codePointAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function Qoe(i,e){let t="",r=0,n=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s<i.length)a=i.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(n===s-1||o===1))if(n!==s-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),n=s,o=0;continue}}else if(t.length>0){t="",r=0,n=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+i.slice(n+1,s):t=i.slice(n+1,s),r=s-n-1;n=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function kg(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var RB={cwd:Zoe};function Zoe(){return"/"}function Lf(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}function PB(i){if(typeof i=="string")i=new URL(i);else if(!Lf(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 Joe(i)}function Joe(i){if(i.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let e=i.pathname,t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){let r=e.codePointAt(t+2);if(r===70||r===102){let n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(e)}var oE=["history","path","basename","stem","extname","dirname"],Zc=class{constructor(e){let t;e?Lf(e)?t={path:e}:typeof e=="string"||ese(e)?t={value:e}:t=e:t={},this.cwd=RB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<oE.length;){let o=oE[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let n;for(n in t)oE.includes(n)||(this[n]=t[n])}get basename(){return typeof this.path=="string"?Ns.basename(this.path):void 0}set basename(e){aE(e,"basename"),sE(e,"basename"),this.path=Ns.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ns.dirname(this.path):void 0}set dirname(e){OB(this.basename,"dirname"),this.path=Ns.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ns.extname(this.path):void 0}set extname(e){if(sE(e,"extname"),OB(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ns.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Lf(e)&&(e=PB(e)),aE(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ns.basename(this.path,this.extname):void 0}set stem(e){aE(e,"stem"),sE(e,"stem"),this.path=Ns.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){let n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){let n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){let n=new Ar(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function sE(i,e){if(i&&i.includes(Ns.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Ns.sep+"`")}function aE(i,e){if(!i)throw new Error("`"+e+"` cannot be empty")}function OB(i,e){if(!i)throw new Error("Setting `"+e+"` requires `path` to be set too")}function ese(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}var FB=function(i){let r=this.constructor.prototype,n=r[i],o=function(){return n.apply(o,arguments)};Object.setPrototypeOf(o,r);let s=Object.getOwnPropertyNames(n);for(let a of s){let l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(o,a,l)}return o};var tse={}.hasOwnProperty,uE=class i extends FB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=DB()}copy(){let e=new i,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];e.use(...r)}return e.data((0,Ly.default)(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(dE("data",this.frozen),this.namespace[e]=t,this):tse.call(this.namespace,e)&&this.namespace[e]||void 0:e?(dE("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let n=t.call(e,...r);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=Iy(e),r=this.parser||this.Parser;return lE("parse",r),r(String(t),t)}process(e,t){let r=this;return this.freeze(),lE("process",this.parser||this.Parser),cE("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(o,s){let a=Iy(e),l=r.parse(a);r.run(l,a,function(d,u,h){if(d||!u||!h)return c(d);let f=u,m=r.stringify(f,h);rse(m)?h.value=m:h.result=m,c(d,h)});function c(d,u){d||!u?s(d):o?o(u):t(void 0,u)}}}processSync(e){let t=!1,r;return this.freeze(),lE("processSync",this.parser||this.Parser),cE("processSync",this.compiler||this.Compiler),this.process(e,n),BB("processSync","process",t),r;function n(o,s){t=!0,iE(o),r=s}}run(e,t,r){zB(e),this.freeze();let n=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(s,a){let l=Iy(t);n.run(e,l,c);function c(d,u,h){let f=u||e;d?a(d):s?s(f):r(void 0,f,h)}}}runSync(e,t){let r=!1,n;return this.run(e,t,o),BB("runSync","run",r),n;function o(s,a){iE(s),n=a,r=!0}}stringify(e,t){this.freeze();let r=Iy(t),n=this.compiler||this.Compiler;return cE("stringify",n),zB(e),n(e,r)}use(e,...t){let r=this.attachers,n=this.namespace;if(dE("use",this.frozen),e!=null)if(typeof e=="function")l(e,t);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[d,...u]=c;l(d,u)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(n.settings=(0,Ly.default)(!0,n.settings,c.settings))}function a(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){let u=c[d];o(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let u=-1,h=-1;for(;++u<r.length;)if(r[u][0]===c){h=u;break}if(h===-1)r.push([c,...d]);else if(d.length>0){let[f,...m]=d,g=r[h][1];Sg(g)&&Sg(f)&&(f=(0,Ly.default)(!0,g,f)),r[h]=[c,f,...m]}}}},Ay=new uE().freeze();function lE(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `parser`")}function cE(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `compiler`")}function dE(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 zB(i){if(!Sg(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function BB(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function Iy(i){return ise(i)?i:new Zc(i)}function ise(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function rse(i){return typeof i=="string"||nse(i)}function nse(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}var ose={};function hE(i,e){let t=e||ose,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,n=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return UB(i,r,n)}function UB(i,e,t){if(sse(i)){if("value"in i)return i.type==="html"&&!t?"":i.value;if(e&&"alt"in i&&i.alt)return i.alt;if("children"in i)return HB(i.children,e,t)}return Array.isArray(i)?HB(i,e,t):""}function HB(i,e,t){let r=[],n=-1;for(;++n<i.length;)r[n]=UB(i[n],e,t);return r.join("")}function sse(i){return!!(i&&typeof i=="object")}function mn(i,e,t,r){let n=i.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}function Yn(i,e){return i.length>0?(mn(i,i.length,0,e),i):e}var jB={}.hasOwnProperty;function WB(i){let e={},t=-1;for(;++t<i.length;)ase(e,i[t]);return e}function ase(i,e){let t;for(t in e){let n=(jB.call(i,t)?i[t]:void 0)||(i[t]={}),o=e[t],s;if(o)for(s in o){jB.call(n,s)||(n[s]=[]);let a=o[s];lse(n[s],Array.isArray(a)?a:a?[a]:[])}}}function lse(i,e){let t=-1,r=[];for(;++t<e.length;)(e[t].add==="after"?i:r).push(e[t]);mn(i,0,0,r)}function Dy(i,e){let t=Number.parseInt(i,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCharCode(t)}function Ll(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var cse=Jc(new RegExp("\\p{P}","u")),Po=Jc(/[A-Za-z]/),Xn=Jc(/[\dA-Za-z]/),VB=Jc(/[#-'*+\--9=?A-Z^-~]/);function Eg(i){return i!==null&&(i<32||i===127)}var Tg=Jc(/\d/),qB=Jc(/[\dA-Fa-f]/),fE=Jc(/[!-/:-@[-`{-~]/);function at(i){return i!==null&&i<-2}function Sr(i){return i!==null&&(i<0||i===32)}function jt(i){return i===-2||i===-1||i===32}function KB(i){return fE(i)||cse(i)}var $B=Jc(/\s/);function Jc(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Kt(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return jt(l)?(i.enter(t),a(l)):e(l)}function a(l){return jt(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var GB={tokenize:dse};function dse(i){let e=i.attempt(this.parser.constructs.contentInitial,r,n),t;return e;function r(a){if(a===null){i.consume(a);return}return i.enter("lineEnding"),i.consume(a),i.exit("lineEnding"),Kt(i,e,"linePrefix")}function n(a){return i.enter("paragraph"),o(a)}function o(a){let l=i.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,s(a)}function s(a){if(a===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(a);return}return at(a)?(i.consume(a),i.exit("chunkText"),o):(i.consume(a),s)}}var XB={tokenize:use},YB={tokenize:hse};function use(i){let e=this,t=[],r=0,n,o,s;return a;function a(A){if(r<t.length){let L=t[r];return e.containerState=L[1],i.attempt(L[0].continuation,l,c)(A)}return c(A)}function l(A){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,n&&E();let L=e.events.length,O=L,U;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){U=e.events[O][1].end;break}_(r);let Y=L;for(;Y<e.events.length;)e.events[Y][1].end=Object.assign({},U),Y++;return mn(e.events,O+1,0,e.events.slice(L)),e.events.length=Y,c(A)}return a(A)}function c(A){if(r===t.length){if(!n)return h(A);if(n.currentConstruct&&n.currentConstruct.concrete)return m(A);e.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return e.containerState={},i.check(YB,d,u)(A)}function d(A){return n&&E(),_(r),h(A)}function u(A){return e.parser.lazy[e.now().line]=r!==t.length,s=e.now().offset,m(A)}function h(A){return e.containerState={},i.attempt(YB,f,m)(A)}function f(A){return r++,t.push([e.currentConstruct,e.containerState]),h(A)}function m(A){if(A===null){n&&E(),_(0),i.consume(A);return}return n=n||e.parser.flow(e.now()),i.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:n}),g(A)}function g(A){if(A===null){w(i.exit("chunkFlow"),!0),_(0),i.consume(A);return}return at(A)?(i.consume(A),w(i.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(i.consume(A),g)}function w(A,L){let O=e.sliceStream(A);if(L&&O.push(null),A.previous=o,o&&(o.next=A),o=A,n.defineSkip(A.start),n.write(O),e.parser.lazy[A.start.line]){let U=n.events.length;for(;U--;)if(n.events[U][1].start.offset<s&&(!n.events[U][1].end||n.events[U][1].end.offset>s))return;let Y=e.events.length,oe=Y,te,Z;for(;oe--;)if(e.events[oe][0]==="exit"&&e.events[oe][1].type==="chunkFlow"){if(te){Z=e.events[oe][1].end;break}te=!0}for(_(r),U=Y;U<e.events.length;)e.events[U][1].end=Object.assign({},Z),U++;mn(e.events,oe+1,0,e.events.slice(Y)),e.events.length=U}}function _(A){let L=t.length;for(;L-- >A;){let O=t[L];e.containerState=O[1],O[0].exit.call(e,i)}t.length=A}function E(){n.write([null]),o=void 0,n=void 0,e.containerState._closeFlow=void 0}}function hse(i,e,t){return Kt(i,i.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function pE(i){if(i===null||Sr(i)||$B(i))return 1;if(KB(i))return 2}function Af(i,e,t){let r=[],n=-1;for(;++n<i.length;){let o=i[n].resolveAll;o&&!r.includes(o)&&(e=o(e,t),r.push(o))}return e}var Ig={name:"attention",tokenize:pse,resolveAll:fse};function fse(i,e){let t=-1,r,n,o,s,a,l,c,d;for(;++t<i.length;)if(i[t][0]==="enter"&&i[t][1].type==="attentionSequence"&&i[t][1]._close){for(r=t;r--;)if(i[r][0]==="exit"&&i[r][1].type==="attentionSequence"&&i[r][1]._open&&e.sliceSerialize(i[r][1]).charCodeAt(0)===e.sliceSerialize(i[t][1]).charCodeAt(0)){if((i[r][1]._close||i[t][1]._open)&&(i[t][1].end.offset-i[t][1].start.offset)%3&&!((i[r][1].end.offset-i[r][1].start.offset+i[t][1].end.offset-i[t][1].start.offset)%3))continue;l=i[r][1].end.offset-i[r][1].start.offset>1&&i[t][1].end.offset-i[t][1].start.offset>1?2:1;let u=Object.assign({},i[r][1].end),h=Object.assign({},i[t][1].start);QB(u,-l),QB(h,l),s={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},i[r][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},i[t][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},i[r][1].end),end:Object.assign({},i[t][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},i[r][1].end=Object.assign({},s.start),i[t][1].start=Object.assign({},a.end),c=[],i[r][1].end.offset-i[r][1].start.offset&&(c=Yn(c,[["enter",i[r][1],e],["exit",i[r][1],e]])),c=Yn(c,[["enter",n,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Yn(c,Af(e.parser.constructs.insideSpan.null,i.slice(r+1,t),e)),c=Yn(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",n,e]]),i[t][1].end.offset-i[t][1].start.offset?(d=2,c=Yn(c,[["enter",i[t][1],e],["exit",i[t][1],e]])):d=0,mn(i,r-1,t-r+3,c),t=r+c.length-d-2;break}}for(t=-1;++t<i.length;)i[t][1].type==="attentionSequence"&&(i[t][1].type="data");return i}function pse(i,e){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,n=pE(r),o;return s;function s(l){return o=l,i.enter("attentionSequence"),a(l)}function a(l){if(l===o)return i.consume(l),a;let c=i.exit("attentionSequence"),d=pE(l),u=!d||d===2&&n||t.includes(l),h=!n||n===2&&d||t.includes(r);return c._open=!!(o===42?u:u&&(n||!h)),c._close=!!(o===42?h:h&&(d||!u)),e(l)}}function QB(i,e){i.column+=e,i.offset+=e,i._bufferIndex+=e}var mE={name:"autolink",tokenize:mse};function mse(i,e,t){let r=0;return n;function n(f){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),o}function o(f){return Po(f)?(i.consume(f),s):c(f)}function s(f){return f===43||f===45||f===46||Xn(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(i.consume(f),r=0,l):(f===43||f===45||f===46||Xn(f))&&r++<32?(i.consume(f),a):(r=0,c(f))}function l(f){return f===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.exit("autolink"),e):f===null||f===32||f===60||Eg(f)?t(f):(i.consume(f),l)}function c(f){return f===64?(i.consume(f),d):VB(f)?(i.consume(f),c):t(f)}function d(f){return Xn(f)?u(f):t(f)}function u(f){return f===46?(i.consume(f),r=0,d):f===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(f),i.exit("autolinkMarker"),i.exit("autolink"),e):h(f)}function h(f){if((f===45||Xn(f))&&r++<63){let m=f===45?h:u;return i.consume(f),m}return t(f)}}var ed={tokenize:gse,partial:!0};function gse(i,e,t){return r;function r(o){return jt(o)?Kt(i,n,"linePrefix")(o):n(o)}function n(o){return o===null||at(o)?e(o):t(o)}}var My={name:"blockQuote",tokenize:bse,continuation:{tokenize:vse},exit:_se};function bse(i,e,t){let r=this;return n;function n(s){if(s===62){let a=r.containerState;return a.open||(i.enter("blockQuote",{_container:!0}),a.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(s),i.exit("blockQuoteMarker"),o}return t(s)}function o(s){return jt(s)?(i.enter("blockQuotePrefixWhitespace"),i.consume(s),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),e):(i.exit("blockQuotePrefix"),e(s))}}function vse(i,e,t){let r=this;return n;function n(s){return jt(s)?Kt(i,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return i.attempt(My,e,t)(s)}}function _se(i){i.exit("blockQuote")}var Ny={name:"characterEscape",tokenize:yse};function yse(i,e,t){return r;function r(o){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(o),i.exit("escapeMarker"),n}function n(o){return fE(o)?(i.enter("characterEscapeValue"),i.consume(o),i.exit("characterEscapeValue"),i.exit("characterEscape"),e):t(o)}}var Ry={name:"characterReference",tokenize:wse};function wse(i,e,t){let r=this,n=0,o,s;return a;function a(u){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(u),i.exit("characterReferenceMarker"),l}function l(u){return u===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(u),i.exit("characterReferenceMarkerNumeric"),c):(i.enter("characterReferenceValue"),o=31,s=Xn,d(u))}function c(u){return u===88||u===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(u),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),o=6,s=qB,d):(i.enter("characterReferenceValue"),o=7,s=Tg,d(u))}function d(u){if(u===59&&n){let h=i.exit("characterReferenceValue");return s===Xn&&!Xh(r.sliceSerialize(h))?t(u):(i.enter("characterReferenceMarker"),i.consume(u),i.exit("characterReferenceMarker"),i.exit("characterReference"),e)}return s(u)&&n++<o?(i.consume(u),d):t(u)}}var ZB={tokenize:Cse,partial:!0},Py={name:"codeFenced",tokenize:xse,concrete:!0};function xse(i,e,t){let r=this,n={tokenize:O,partial:!0},o=0,s=0,a;return l;function l(U){return c(U)}function c(U){let Y=r.events[r.events.length-1];return o=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,a=U,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),d(U)}function d(U){return U===a?(s++,i.consume(U),d):s<3?t(U):(i.exit("codeFencedFenceSequence"),jt(U)?Kt(i,u,"whitespace")(U):u(U))}function u(U){return U===null||at(U)?(i.exit("codeFencedFence"),r.interrupt?e(U):i.check(ZB,g,L)(U)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),h(U))}function h(U){return U===null||at(U)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),u(U)):jt(U)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),Kt(i,f,"whitespace")(U)):U===96&&U===a?t(U):(i.consume(U),h)}function f(U){return U===null||at(U)?u(U):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),m(U))}function m(U){return U===null||at(U)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),u(U)):U===96&&U===a?t(U):(i.consume(U),m)}function g(U){return i.attempt(n,L,w)(U)}function w(U){return i.enter("lineEnding"),i.consume(U),i.exit("lineEnding"),_}function _(U){return o>0&&jt(U)?Kt(i,E,"linePrefix",o+1)(U):E(U)}function E(U){return U===null||at(U)?i.check(ZB,g,L)(U):(i.enter("codeFlowValue"),A(U))}function A(U){return U===null||at(U)?(i.exit("codeFlowValue"),E(U)):(i.consume(U),A)}function L(U){return i.exit("codeFenced"),e(U)}function O(U,Y,oe){let te=0;return Z;function Z(Xe){return U.enter("lineEnding"),U.consume(Xe),U.exit("lineEnding"),ve}function ve(Xe){return U.enter("codeFencedFence"),jt(Xe)?Kt(U,Pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Xe):Pe(Xe)}function Pe(Xe){return Xe===a?(U.enter("codeFencedFenceSequence"),Ee(Xe)):oe(Xe)}function Ee(Xe){return Xe===a?(te++,U.consume(Xe),Ee):te>=s?(U.exit("codeFencedFenceSequence"),jt(Xe)?Kt(U,Oe,"whitespace")(Xe):Oe(Xe)):oe(Xe)}function Oe(Xe){return Xe===null||at(Xe)?(U.exit("codeFencedFence"),Y(Xe)):oe(Xe)}}}function Cse(i,e,t){let r=this;return n;function n(s){return s===null?t(s):(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}var Lg={name:"codeIndented",tokenize:kse},Sse={tokenize:Ese,partial:!0};function kse(i,e,t){let r=this;return n;function n(c){return i.enter("codeIndented"),Kt(i,o,"linePrefix",4+1)(c)}function o(c){let d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):t(c)}function s(c){return c===null?l(c):at(c)?i.attempt(Sse,s,l)(c):(i.enter("codeFlowValue"),a(c))}function a(c){return c===null||at(c)?(i.exit("codeFlowValue"),s(c)):(i.consume(c),a)}function l(c){return i.exit("codeIndented"),e(c)}}function Ese(i,e,t){let r=this;return n;function n(s){return r.parser.lazy[r.now().line]?t(s):at(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),n):Kt(i,o,"linePrefix",4+1)(s)}function o(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):at(s)?n(s):t(s)}}var gE={name:"codeText",tokenize:Lse,resolve:Tse,previous:Ise};function Tse(i){let e=i.length-4,t=3,r,n;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(r=t;++r<e;)if(i[r][1].type==="codeTextData"){i[t][1].type="codeTextPadding",i[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)n===void 0?r!==e&&i[r][1].type!=="lineEnding"&&(n=r):(r===e||i[r][1].type==="lineEnding")&&(i[n][1].type="codeTextData",r!==n+2&&(i[n][1].end=i[r-1][1].end,i.splice(n+2,r-n-2),e-=r-n-2,r=n+2),n=void 0);return i}function Ise(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Lse(i,e,t){let r=this,n=0,o,s;return a;function a(h){return i.enter("codeText"),i.enter("codeTextSequence"),l(h)}function l(h){return h===96?(i.consume(h),n++,l):(i.exit("codeTextSequence"),c(h))}function c(h){return h===null?t(h):h===32?(i.enter("space"),i.consume(h),i.exit("space"),c):h===96?(s=i.enter("codeTextSequence"),o=0,u(h)):at(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),c):(i.enter("codeTextData"),d(h))}function d(h){return h===null||h===32||h===96||at(h)?(i.exit("codeTextData"),c(h)):(i.consume(h),d)}function u(h){return h===96?(i.consume(h),o++,u):o===n?(i.exit("codeTextSequence"),i.exit("codeText"),e(h)):(s.type="codeTextData",d(h))}}function Oy(i){let e={},t=-1,r,n,o,s,a,l,c;for(;++t<i.length;){for(;t in e;)t=e[t];if(r=i[t],t&&r[1].type==="chunkFlow"&&i[t-1][1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,Ase(i,t)),t=e[t],c=!0);else if(r[1]._container){for(o=t,n=void 0;o--&&(s=i[o],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(n&&(i[n][1].type="lineEndingBlank"),s[1].type="lineEnding",n=o);n&&(r[1].end=Object.assign({},i[n][1].start),a=i.slice(n,t),a.unshift(r),mn(i,n,t-n+1,a))}}return!c}function Ase(i,e){let t=i[e][1],r=i[e][2],n=e-1,o=[],s=t._tokenizer||r.parser[t.contentType](t.start),a=s.events,l=[],c={},d,u,h=-1,f=t,m=0,g=0,w=[g];for(;f;){for(;i[++n][1]!==f;);o.push(n),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),u&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(g=h+1,w.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):w.pop(),h=w.length;h--;){let _=a.slice(w[h],w[h+1]),E=o.pop();l.unshift([E,E+_.length-1]),mn(i,E,2,_)}for(h=-1;++h<l.length;)c[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return c}var bE={tokenize:Nse,resolve:Mse},Dse={tokenize:Rse,partial:!0};function Mse(i){return Oy(i),i}function Nse(i,e){let t;return r;function r(a){return i.enter("content"),t=i.enter("chunkContent",{contentType:"content"}),n(a)}function n(a){return a===null?o(a):at(a)?i.check(Dse,s,o)(a):(i.consume(a),n)}function o(a){return i.exit("chunkContent"),i.exit("content"),e(a)}function s(a){return i.consume(a),i.exit("chunkContent"),t.next=i.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,n}}function Rse(i,e,t){let r=this;return n;function n(s){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),Kt(i,o,"linePrefix")}function o(s){if(s===null||at(s))return t(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):i.interrupt(r.parser.constructs.flow,t,e)(s)}}function Fy(i,e,t,r,n,o,s,a,l){let c=l||Number.POSITIVE_INFINITY,d=0;return u;function u(_){return _===60?(i.enter(r),i.enter(n),i.enter(o),i.consume(_),i.exit(o),h):_===null||_===32||_===41||Eg(_)?t(_):(i.enter(r),i.enter(s),i.enter(a),i.enter("chunkString",{contentType:"string"}),g(_))}function h(_){return _===62?(i.enter(o),i.consume(_),i.exit(o),i.exit(n),i.exit(r),e):(i.enter(a),i.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(i.exit("chunkString"),i.exit(a),h(_)):_===null||_===60||at(_)?t(_):(i.consume(_),_===92?m:f)}function m(_){return _===60||_===62||_===92?(i.consume(_),f):f(_)}function g(_){return!d&&(_===null||_===41||Sr(_))?(i.exit("chunkString"),i.exit(a),i.exit(s),i.exit(r),e(_)):d<c&&_===40?(i.consume(_),d++,g):_===41?(i.consume(_),d--,g):_===null||_===32||_===40||Eg(_)?t(_):(i.consume(_),_===92?w:g)}function w(_){return _===40||_===41||_===92?(i.consume(_),g):g(_)}}function zy(i,e,t,r,n,o){let s=this,a=0,l;return c;function c(f){return i.enter(r),i.enter(n),i.consume(f),i.exit(n),i.enter(o),d}function d(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?t(f):f===93?(i.exit(o),i.enter(n),i.consume(f),i.exit(n),i.exit(r),e):at(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),d):(i.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===null||f===91||f===93||at(f)||a++>999?(i.exit("chunkString"),d(f)):(i.consume(f),l||(l=!jt(f)),f===92?h:u)}function h(f){return f===91||f===92||f===93?(i.consume(f),a++,u):u(f)}}function By(i,e,t,r,n,o){let s;return a;function a(h){return h===34||h===39||h===40?(i.enter(r),i.enter(n),i.consume(h),i.exit(n),s=h===40?41:h,l):t(h)}function l(h){return h===s?(i.enter(n),i.consume(h),i.exit(n),i.exit(r),e):(i.enter(o),c(h))}function c(h){return h===s?(i.exit(o),l(s)):h===null?t(h):at(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),Kt(i,c,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===s||h===null||at(h)?(i.exit("chunkString"),c(h)):(i.consume(h),h===92?u:d)}function u(h){return h===s||h===92?(i.consume(h),d):d(h)}}function Su(i,e){let t;return r;function r(n){return at(n)?(i.enter("lineEnding"),i.consume(n),i.exit("lineEnding"),t=!0,r):jt(n)?Kt(i,r,t?"linePrefix":"lineSuffix")(n):e(n)}}var vE={name:"definition",tokenize:Ose},Pse={tokenize:Fse,partial:!0};function Ose(i,e,t){let r=this,n;return o;function o(f){return i.enter("definition"),s(f)}function s(f){return zy.call(r,i,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return n=Ll(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),l):t(f)}function l(f){return Sr(f)?Su(i,c)(f):c(f)}function c(f){return Fy(i,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return i.attempt(Pse,u,u)(f)}function u(f){return jt(f)?Kt(i,h,"whitespace")(f):h(f)}function h(f){return f===null||at(f)?(i.exit("definition"),r.parser.defined.push(n),e(f)):t(f)}}function Fse(i,e,t){return r;function r(a){return Sr(a)?Su(i,n)(a):t(a)}function n(a){return By(i,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return jt(a)?Kt(i,s,"whitespace")(a):s(a)}function s(a){return a===null||at(a)?e(a):t(a)}}var _E={name:"hardBreakEscape",tokenize:zse};function zse(i,e,t){return r;function r(o){return i.enter("hardBreakEscape"),i.consume(o),n}function n(o){return at(o)?(i.exit("hardBreakEscape"),e(o)):t(o)}}var yE={name:"headingAtx",tokenize:Hse,resolve:Bse};function Bse(i,e){let t=i.length-2,r=3,n,o;return i[r][1].type==="whitespace"&&(r+=2),t-2>r&&i[t][1].type==="whitespace"&&(t-=2),i[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&i[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(n={type:"atxHeadingText",start:i[r][1].start,end:i[t][1].end},o={type:"chunkText",start:i[r][1].start,end:i[t][1].end,contentType:"text"},mn(i,r,t-r+1,[["enter",n,e],["enter",o,e],["exit",o,e],["exit",n,e]])),i}function Hse(i,e,t){let r=0;return n;function n(d){return i.enter("atxHeading"),o(d)}function o(d){return i.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(i.consume(d),s):d===null||Sr(d)?(i.exit("atxHeadingSequence"),a(d)):t(d)}function a(d){return d===35?(i.enter("atxHeadingSequence"),l(d)):d===null||at(d)?(i.exit("atxHeading"),e(d)):jt(d)?Kt(i,a,"whitespace")(d):(i.enter("atxHeadingText"),c(d))}function l(d){return d===35?(i.consume(d),l):(i.exit("atxHeadingSequence"),a(d))}function c(d){return d===null||d===35||Sr(d)?(i.exit("atxHeadingText"),a(d)):(i.consume(d),c)}}var JB=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wE=["pre","script","style","textarea"];var xE={name:"htmlFlow",tokenize:Vse,resolveTo:Wse,concrete:!0},Use={tokenize:Kse,partial:!0},jse={tokenize:qse,partial:!0};function Wse(i){let e=i.length;for(;e--&&!(i[e][0]==="enter"&&i[e][1].type==="htmlFlow"););return e>1&&i[e-2][1].type==="linePrefix"&&(i[e][1].start=i[e-2][1].start,i[e+1][1].start=i[e-2][1].start,i.splice(e-2,2)),i}function Vse(i,e,t){let r=this,n,o,s,a,l;return c;function c(G){return d(G)}function d(G){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(G),u}function u(G){return G===33?(i.consume(G),h):G===47?(i.consume(G),o=!0,g):G===63?(i.consume(G),n=3,r.interrupt?e:R):Po(G)?(i.consume(G),s=String.fromCharCode(G),w):t(G)}function h(G){return G===45?(i.consume(G),n=2,f):G===91?(i.consume(G),n=5,a=0,m):Po(G)?(i.consume(G),n=4,r.interrupt?e:R):t(G)}function f(G){return G===45?(i.consume(G),r.interrupt?e:R):t(G)}function m(G){let Et="CDATA[";return G===Et.charCodeAt(a++)?(i.consume(G),a===Et.length?r.interrupt?e:Pe:m):t(G)}function g(G){return Po(G)?(i.consume(G),s=String.fromCharCode(G),w):t(G)}function w(G){if(G===null||G===47||G===62||Sr(G)){let Et=G===47,Ot=s.toLowerCase();return!Et&&!o&&wE.includes(Ot)?(n=1,r.interrupt?e(G):Pe(G)):JB.includes(s.toLowerCase())?(n=6,Et?(i.consume(G),_):r.interrupt?e(G):Pe(G)):(n=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):o?E(G):A(G))}return G===45||Xn(G)?(i.consume(G),s+=String.fromCharCode(G),w):t(G)}function _(G){return G===62?(i.consume(G),r.interrupt?e:Pe):t(G)}function E(G){return jt(G)?(i.consume(G),E):Z(G)}function A(G){return G===47?(i.consume(G),Z):G===58||G===95||Po(G)?(i.consume(G),L):jt(G)?(i.consume(G),A):Z(G)}function L(G){return G===45||G===46||G===58||G===95||Xn(G)?(i.consume(G),L):O(G)}function O(G){return G===61?(i.consume(G),U):jt(G)?(i.consume(G),O):A(G)}function U(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(i.consume(G),l=G,Y):jt(G)?(i.consume(G),U):oe(G)}function Y(G){return G===l?(i.consume(G),l=null,te):G===null||at(G)?t(G):(i.consume(G),Y)}function oe(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||Sr(G)?O(G):(i.consume(G),oe)}function te(G){return G===47||G===62||jt(G)?A(G):t(G)}function Z(G){return G===62?(i.consume(G),ve):t(G)}function ve(G){return G===null||at(G)?Pe(G):jt(G)?(i.consume(G),ve):t(G)}function Pe(G){return G===45&&n===2?(i.consume(G),dt):G===60&&n===1?(i.consume(G),be):G===62&&n===4?(i.consume(G),ne):G===63&&n===3?(i.consume(G),R):G===93&&n===5?(i.consume(G),X):at(G)&&(n===6||n===7)?(i.exit("htmlFlowData"),i.check(Use,me,Ee)(G)):G===null||at(G)?(i.exit("htmlFlowData"),Ee(G)):(i.consume(G),Pe)}function Ee(G){return i.check(jse,Oe,me)(G)}function Oe(G){return i.enter("lineEnding"),i.consume(G),i.exit("lineEnding"),Xe}function Xe(G){return G===null||at(G)?Ee(G):(i.enter("htmlFlowData"),Pe(G))}function dt(G){return G===45?(i.consume(G),R):Pe(G)}function be(G){return G===47?(i.consume(G),s="",we):Pe(G)}function we(G){if(G===62){let Et=s.toLowerCase();return wE.includes(Et)?(i.consume(G),ne):Pe(G)}return Po(G)&&s.length<8?(i.consume(G),s+=String.fromCharCode(G),we):Pe(G)}function X(G){return G===93?(i.consume(G),R):Pe(G)}function R(G){return G===62?(i.consume(G),ne):G===45&&n===2?(i.consume(G),R):Pe(G)}function ne(G){return G===null||at(G)?(i.exit("htmlFlowData"),me(G)):(i.consume(G),ne)}function me(G){return i.exit("htmlFlow"),e(G)}}function qse(i,e,t){let r=this;return n;function n(s){return at(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o):t(s)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}function Kse(i,e,t){return r;function r(n){return i.enter("lineEnding"),i.consume(n),i.exit("lineEnding"),i.attempt(ed,e,t)}}var CE={name:"htmlText",tokenize:$se};function $se(i,e,t){let r=this,n,o,s;return a;function a(R){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(R),l}function l(R){return R===33?(i.consume(R),c):R===47?(i.consume(R),O):R===63?(i.consume(R),A):Po(R)?(i.consume(R),oe):t(R)}function c(R){return R===45?(i.consume(R),d):R===91?(i.consume(R),o=0,m):Po(R)?(i.consume(R),E):t(R)}function d(R){return R===45?(i.consume(R),f):t(R)}function u(R){return R===null?t(R):R===45?(i.consume(R),h):at(R)?(s=u,be(R)):(i.consume(R),u)}function h(R){return R===45?(i.consume(R),f):u(R)}function f(R){return R===62?dt(R):R===45?h(R):u(R)}function m(R){let ne="CDATA[";return R===ne.charCodeAt(o++)?(i.consume(R),o===ne.length?g:m):t(R)}function g(R){return R===null?t(R):R===93?(i.consume(R),w):at(R)?(s=g,be(R)):(i.consume(R),g)}function w(R){return R===93?(i.consume(R),_):g(R)}function _(R){return R===62?dt(R):R===93?(i.consume(R),_):g(R)}function E(R){return R===null||R===62?dt(R):at(R)?(s=E,be(R)):(i.consume(R),E)}function A(R){return R===null?t(R):R===63?(i.consume(R),L):at(R)?(s=A,be(R)):(i.consume(R),A)}function L(R){return R===62?dt(R):A(R)}function O(R){return Po(R)?(i.consume(R),U):t(R)}function U(R){return R===45||Xn(R)?(i.consume(R),U):Y(R)}function Y(R){return at(R)?(s=Y,be(R)):jt(R)?(i.consume(R),Y):dt(R)}function oe(R){return R===45||Xn(R)?(i.consume(R),oe):R===47||R===62||Sr(R)?te(R):t(R)}function te(R){return R===47?(i.consume(R),dt):R===58||R===95||Po(R)?(i.consume(R),Z):at(R)?(s=te,be(R)):jt(R)?(i.consume(R),te):dt(R)}function Z(R){return R===45||R===46||R===58||R===95||Xn(R)?(i.consume(R),Z):ve(R)}function ve(R){return R===61?(i.consume(R),Pe):at(R)?(s=ve,be(R)):jt(R)?(i.consume(R),ve):te(R)}function Pe(R){return R===null||R===60||R===61||R===62||R===96?t(R):R===34||R===39?(i.consume(R),n=R,Ee):at(R)?(s=Pe,be(R)):jt(R)?(i.consume(R),Pe):(i.consume(R),Oe)}function Ee(R){return R===n?(i.consume(R),n=void 0,Xe):R===null?t(R):at(R)?(s=Ee,be(R)):(i.consume(R),Ee)}function Oe(R){return R===null||R===34||R===39||R===60||R===61||R===96?t(R):R===47||R===62||Sr(R)?te(R):(i.consume(R),Oe)}function Xe(R){return R===47||R===62||Sr(R)?te(R):t(R)}function dt(R){return R===62?(i.consume(R),i.exit("htmlTextData"),i.exit("htmlText"),e):t(R)}function be(R){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(R),i.exit("lineEnding"),we}function we(R){return jt(R)?Kt(i,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):X(R)}function X(R){return i.enter("htmlTextData"),s(R)}}var ku={name:"labelEnd",tokenize:Jse,resolveTo:Zse,resolveAll:Qse},Gse={tokenize:eae},Yse={tokenize:tae},Xse={tokenize:iae};function Qse(i){let e=-1;for(;++e<i.length;){let t=i[e][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(i.splice(e+1,t.type==="labelImage"?4:2),t.type="data",e++)}return i}function Zse(i,e){let t=i.length,r=0,n,o,s,a;for(;t--;)if(n=i[t][1],o){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;i[t][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(s){if(i[t][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(o=t,n.type!=="labelLink")){r=2;break}}else n.type==="labelEnd"&&(s=t);let l={type:i[o][1].type==="labelLink"?"link":"image",start:Object.assign({},i[o][1].start),end:Object.assign({},i[i.length-1][1].end)},c={type:"label",start:Object.assign({},i[o][1].start),end:Object.assign({},i[s][1].end)},d={type:"labelText",start:Object.assign({},i[o+r+2][1].end),end:Object.assign({},i[s-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=Yn(a,i.slice(o+1,o+r+3)),a=Yn(a,[["enter",d,e]]),a=Yn(a,Af(e.parser.constructs.insideSpan.null,i.slice(o+r+4,s-3),e)),a=Yn(a,[["exit",d,e],i[s-2],i[s-1],["exit",c,e]]),a=Yn(a,i.slice(s+1)),a=Yn(a,[["exit",l,e]]),mn(i,o,i.length,a),i}function Jse(i,e,t){let r=this,n=r.events.length,o,s;for(;n--;)if((r.events[n][1].type==="labelImage"||r.events[n][1].type==="labelLink")&&!r.events[n][1]._balanced){o=r.events[n][1];break}return a;function a(h){return o?o._inactive?u(h):(s=r.parser.defined.includes(Ll(r.sliceSerialize({start:o.end,end:r.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(h),i.exit("labelMarker"),i.exit("labelEnd"),l):t(h)}function l(h){return h===40?i.attempt(Gse,d,s?d:u)(h):h===91?i.attempt(Yse,d,s?c:u)(h):s?d(h):u(h)}function c(h){return i.attempt(Xse,d,u)(h)}function d(h){return e(h)}function u(h){return o._balanced=!0,t(h)}}function eae(i,e,t){return r;function r(u){return i.enter("resource"),i.enter("resourceMarker"),i.consume(u),i.exit("resourceMarker"),n}function n(u){return Sr(u)?Su(i,o)(u):o(u)}function o(u){return u===41?d(u):Fy(i,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function s(u){return Sr(u)?Su(i,l)(u):d(u)}function a(u){return t(u)}function l(u){return u===34||u===39||u===40?By(i,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function c(u){return Sr(u)?Su(i,d)(u):d(u)}function d(u){return u===41?(i.enter("resourceMarker"),i.consume(u),i.exit("resourceMarker"),i.exit("resource"),e):t(u)}}function tae(i,e,t){let r=this;return n;function n(a){return zy.call(r,i,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Ll(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):t(a)}function s(a){return t(a)}}function iae(i,e,t){return r;function r(o){return i.enter("reference"),i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),n}function n(o){return o===93?(i.enter("referenceMarker"),i.consume(o),i.exit("referenceMarker"),i.exit("reference"),e):t(o)}}var SE={name:"labelStartImage",tokenize:rae,resolveAll:ku.resolveAll};function rae(i,e,t){let r=this;return n;function n(a){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(a),i.exit("labelImageMarker"),o}function o(a){return a===91?(i.enter("labelMarker"),i.consume(a),i.exit("labelMarker"),i.exit("labelImage"),s):t(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):e(a)}}var kE={name:"labelStartLink",tokenize:nae,resolveAll:ku.resolveAll};function nae(i,e,t){let r=this;return n;function n(s){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(s),i.exit("labelMarker"),i.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):e(s)}}var Ag={name:"lineEnding",tokenize:oae};function oae(i,e){return t;function t(r){return i.enter("lineEnding"),i.consume(r),i.exit("lineEnding"),Kt(i,e,"linePrefix")}}var Eu={name:"thematicBreak",tokenize:sae};function sae(i,e,t){let r=0,n;return o;function o(c){return i.enter("thematicBreak"),s(c)}function s(c){return n=c,a(c)}function a(c){return c===n?(i.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||at(c))?(i.exit("thematicBreak"),e(c)):t(c)}function l(c){return c===n?(i.consume(c),r++,l):(i.exit("thematicBreakSequence"),jt(c)?Kt(i,a,"whitespace")(c):a(c))}}var Nn={name:"list",tokenize:cae,continuation:{tokenize:dae},exit:hae},aae={tokenize:fae,partial:!0},lae={tokenize:uae,partial:!0};function cae(i,e,t){let r=this,n=r.events[r.events.length-1],o=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,s=0;return a;function a(f){let m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Tg(f)){if(r.containerState.type||(r.containerState.type=m,i.enter(m,{_container:!0})),m==="listUnordered")return i.enter("listItemPrefix"),f===42||f===45?i.check(Eu,t,c)(f):c(f);if(!r.interrupt||f===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),l(f)}return t(f)}function l(f){return Tg(f)&&++s<10?(i.consume(f),l):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(i.exit("listItemValue"),c(f)):t(f)}function c(f){return i.enter("listItemMarker"),i.consume(f),i.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,i.check(ed,r.interrupt?t:d,i.attempt(aae,h,u))}function d(f){return r.containerState.initialBlankLine=!0,o++,h(f)}function u(f){return jt(f)?(i.enter("listItemPrefixWhitespace"),i.consume(f),i.exit("listItemPrefixWhitespace"),h):t(f)}function h(f){return r.containerState.size=o+r.sliceSerialize(i.exit("listItemPrefix"),!0).length,e(f)}}function dae(i,e,t){let r=this;return r.containerState._closeFlow=void 0,i.check(ed,n,o);function n(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Kt(i,e,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!jt(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i.attempt(lae,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Kt(i,i.attempt(Nn,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function uae(i,e,t){let r=this;return Kt(i,n,"listItemIndent",r.containerState.size+1);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):t(o)}}function hae(i){i.exit(this.containerState.type)}function fae(i,e,t){let r=this;return Kt(i,n,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function n(o){let s=r.events[r.events.length-1];return!jt(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):t(o)}}var Hy={name:"setextUnderline",tokenize:mae,resolveTo:pae};function pae(i,e){let t=i.length,r,n,o;for(;t--;)if(i[t][0]==="enter"){if(i[t][1].type==="content"){r=t;break}i[t][1].type==="paragraph"&&(n=t)}else i[t][1].type==="content"&&i.splice(t,1),!o&&i[t][1].type==="definition"&&(o=t);let s={type:"setextHeading",start:Object.assign({},i[n][1].start),end:Object.assign({},i[i.length-1][1].end)};return i[n][1].type="setextHeadingText",o?(i.splice(n,0,["enter",s,e]),i.splice(o+1,0,["exit",i[r][1],e]),i[r][1].end=Object.assign({},i[o][1].end)):i[r][1]=s,i.push(["exit",s,e]),i}function mae(i,e,t){let r=this,n;return o;function o(c){let d=r.events.length,u;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){u=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(i.enter("setextHeadingLine"),n=c,s(c)):t(c)}function s(c){return i.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===n?(i.consume(c),a):(i.exit("setextHeadingLineSequence"),jt(c)?Kt(i,l,"lineSuffix")(c):l(c))}function l(c){return c===null||at(c)?(i.exit("setextHeadingLine"),e(c)):t(c)}}var eH={tokenize:gae};function gae(i){let e=this,t=i.attempt(ed,r,i.attempt(this.parser.constructs.flowInitial,n,Kt(i,i.attempt(this.parser.constructs.flow,n,i.attempt(bE,n)),"linePrefix")));return t;function r(o){if(o===null){i.consume(o);return}return i.enter("lineEndingBlank"),i.consume(o),i.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function n(o){if(o===null){i.consume(o);return}return i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),e.currentConstruct=void 0,t}}var tH={resolveAll:oH()},iH=nH("string"),rH=nH("text");function nH(i){return{tokenize:e,resolveAll:oH(i==="text"?bae:void 0)};function e(t){let r=this,n=this.parser.constructs[i],o=t.attempt(n,s,a);return s;function s(d){return c(d)?o(d):a(d)}function a(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),l}function l(d){return c(d)?(t.exit("data"),o(d)):(t.consume(d),l)}function c(d){if(d===null)return!0;let u=n[d],h=-1;if(u)for(;++h<u.length;){let f=u[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function oH(i){return e;function e(t,r){let n=-1,o;for(;++n<=t.length;)o===void 0?t[n]&&t[n][1].type==="data"&&(o=n,n++):(!t[n]||t[n][1].type!=="data")&&(n!==o+2&&(t[o][1].end=t[n-1][1].end,t.splice(o+2,n-o-2),n=o+2),o=void 0);return i?i(t,r):t}}function bae(i,e){let t=0;for(;++t<=i.length;)if((t===i.length||i[t][1].type==="lineEnding")&&i[t-1][1].type==="data"){let r=i[t-1][1],n=e.sliceStream(r),o=n.length,s=-1,a=0,l;for(;o--;){let c=n[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){o++;break}}if(a){let c={type:t===i.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+o,_bufferIndex:o?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(i.splice(t,0,["enter",c,e],["exit",c,e]),t+=2)}t++}return i}function sH(i,e,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},o=[],s=[],a=[],l=!0,c={consume:L,enter:O,exit:U,attempt:te(Y),check:te(oe),interrupt:te(oe,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:i,sliceStream:g,sliceSerialize:m,now:w,defineSkip:_,write:f},u=e.tokenize.call(d,c),h;return e.resolveAll&&o.push(e),d;function f(Ee){return s=Yn(s,Ee),E(),s[s.length-1]!==null?[]:(Z(e,0),d.events=Af(o,d.events,d),d.events)}function m(Ee,Oe){return _ae(g(Ee),Oe)}function g(Ee){return vae(s,Ee)}function w(){let{line:Ee,column:Oe,offset:Xe,_index:dt,_bufferIndex:be}=r;return{line:Ee,column:Oe,offset:Xe,_index:dt,_bufferIndex:be}}function _(Ee){n[Ee.line]=Ee.column,Pe()}function E(){let Ee;for(;r._index<s.length;){let Oe=s[r._index];if(typeof Oe=="string")for(Ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Ee&&r._bufferIndex<Oe.length;)A(Oe.charCodeAt(r._bufferIndex));else A(Oe)}}function A(Ee){l=void 0,h=Ee,u=u(Ee)}function L(Ee){at(Ee)?(r.line++,r.column=1,r.offset+=Ee===-3?2:1,Pe()):Ee!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=Ee,l=!0}function O(Ee,Oe){let Xe=Oe||{};return Xe.type=Ee,Xe.start=w(),d.events.push(["enter",Xe,d]),a.push(Xe),Xe}function U(Ee){let Oe=a.pop();return Oe.end=w(),d.events.push(["exit",Oe,d]),Oe}function Y(Ee,Oe){Z(Ee,Oe.from)}function oe(Ee,Oe){Oe.restore()}function te(Ee,Oe){return Xe;function Xe(dt,be,we){let X,R,ne,me;return Array.isArray(dt)?Et(dt):"tokenize"in dt?Et([dt]):G(dt);function G(kt){return Ei;function Ei(fi){let xo=fi!==null&&kt[fi],ro=fi!==null&&kt.null,kc=[...Array.isArray(xo)?xo:xo?[xo]:[],...Array.isArray(ro)?ro:ro?[ro]:[]];return Et(kc)(fi)}}function Et(kt){return X=kt,R=0,kt.length===0?we:Ot(kt[R])}function Ot(kt){return Ei;function Ei(fi){return me=ve(),ne=kt,kt.partial||(d.currentConstruct=kt),kt.name&&d.parser.constructs.disable.null.includes(kt.name)?Ti(fi):kt.tokenize.call(Oe?Object.assign(Object.create(d),Oe):d,c,ai,Ti)(fi)}}function ai(kt){return l=!0,Ee(ne,me),be}function Ti(kt){return l=!0,me.restore(),++R<X.length?Ot(X[R]):we}}}function Z(Ee,Oe){Ee.resolveAll&&!o.includes(Ee)&&o.push(Ee),Ee.resolve&&mn(d.events,Oe,d.events.length-Oe,Ee.resolve(d.events.slice(Oe),d)),Ee.resolveTo&&(d.events=Ee.resolveTo(d.events,d))}function ve(){let Ee=w(),Oe=d.previous,Xe=d.currentConstruct,dt=d.events.length,be=Array.from(a);return{restore:we,from:dt};function we(){r=Ee,d.previous=Oe,d.currentConstruct=Xe,d.events.length=dt,a=be,Pe()}}function Pe(){r.line in n&&r.column<2&&(r.column=n[r.line],r.offset+=n[r.line]-1)}}function vae(i,e){let t=e.start._index,r=e.start._bufferIndex,n=e.end._index,o=e.end._bufferIndex,s;if(t===n)s=[i[t].slice(r,o)];else{if(s=i.slice(t,n),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(i[n].slice(0,o))}return s}function _ae(i,e){let t=-1,r=[],n;for(;++t<i.length;){let o=i[t],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=` `;break}case-3:{s=`\r -`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&n)continue;s=" ";break}default:s=String.fromCharCode(o)}n=o===-2,r.push(s)}return r.join("")}var kE={};Gh(kE,{attentionMarkers:()=>Tae,contentInitial:()=>wae,disable:()=>Iae,document:()=>yae,flow:()=>Cae,flowInitial:()=>xae,insideSpan:()=>Eae,string:()=>Sae,text:()=>kae});var yae={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:My},wae={91:bE},xae={[-2]:Lg,[-1]:Lg,32:Lg},Cae={35:_E,42:Eu,45:[Hy,Eu],60:wE,61:Hy,95:Eu,96:Py,126:Py},Sae={38:Ry,92:Ny},kae={[-5]:Ag,[-4]:Ag,[-3]:Ag,33:CE,38:Ry,42:Ig,60:[pE,xE],91:SE,92:[vE,Ny],93:ku,95:Ig,96:mE},Eae={null:[Ig,eH]},Tae={null:[42,95]},Iae={null:[]};function EE(i){let t=jB([kE,...(i||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:n($B),document:n(YB),flow:n(JB),string:n(tH),text:n(iH)};return r;function n(o){return s;function s(a){return oH(r,o,a)}}}function TE(i){for(;!Oy(i););return i}var sH=/[\0\t\n\r]/g;function IE(){let i=1,e="",t=!0,r;return n;function n(o,s,a){let l=[],c,d,u,h,f;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),u=0,e="",t&&(o.charCodeAt(0)===65279&&u++,t=void 0);u<o.length;){if(sH.lastIndex=u,c=sH.exec(o),h=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(h),!c){e=o.slice(u);break}if(f===10&&u===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<h&&(l.push(o.slice(u,h)),i+=h-u),f){case 0:{l.push(65533),i++;break}case 9:{for(d=Math.ceil(i/4)*4,l.push(-2);i++<d;)l.push(-1);break}case 10:{l.push(-4),i=1;break}default:r=!0,i=1}u=h+1}return a&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}var Lae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aH(i){return i.replace(Lae,Aae)}function Aae(i,e,t){if(e)return e;if(t.charCodeAt(0)===35){let n=t.charCodeAt(1),o=n===120||n===88;return Dy(t.slice(o?2:1),o?16:10)}return Xh(t)||i}function Df(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?lH(i.position):"start"in i||"end"in i?lH(i):"line"in i||"column"in i?LE(i):""}function LE(i){return cH(i&&i.line)+":"+cH(i&&i.column)}function lH(i){return LE(i&&i.start)+"-"+LE(i&&i.end)}function cH(i){return i&&typeof i=="number"?i:1}var uH={}.hasOwnProperty;function AE(i,e,t){return typeof e!="string"&&(t=e,e=void 0),Dae(t)(TE(EE(t).document().write(IE()(i,e,!0))))}function Dae(i){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ko),autolinkProtocol:te,autolinkEmail:te,atxHeading:o(Ec),blockQuote:o(Ei),characterEscape:te,characterReference:te,codeFenced:o(fi),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(fi,s),codeText:o(xo,s),codeTextData:te,data:te,codeFlowValue:te,definition:o(ro),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(kc),hardBreakEscape:o(rl),hardBreakTrailing:o(rl),htmlFlow:o(ru,s),htmlFlowData:te,htmlText:o(ru,s),htmlTextData:te,image:o(Or),label:s,link:o(Ko),listItem:o(w3),listItemValue:h,listOrdered:o(hr,u),listUnordered:o(hr),paragraph:o(x3),reference:G,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Ec),strong:o(C3),thematicBreak:o(Yi)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:kt,autolinkProtocol:Ti,blockQuote:l(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:Ot,characterReferenceMarkerNumeric:Ot,characterReferenceValue:ai,codeFenced:l(w),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:Z,codeIndented:l(_),codeText:l(Xe),codeTextData:Z,data:Z,definition:l(),definitionDestinationString:L,definitionLabelString:E,definitionTitleString:A,emphasis:l(),hardBreakEscape:l(Pe),hardBreakTrailing:l(Pe),htmlFlow:l(Ee),htmlFlowData:Z,htmlText:l(Oe),htmlTextData:Z,image:l(be),label:X,labelText:we,lineEnding:ve,link:l(dt),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Et,resourceDestinationString:R,resourceTitleString:ne,resource:me,setextHeading:l(oe),setextHeadingLineSequence:Y,setextHeadingText:U,strong:l(),thematicBreak:l()}};hH(e,(i||{}).mdastExtensions||[]);let t={};return r;function r(ge){let De={type:"root",children:[]},bt={stack:[De],tokenStack:[],config:e,enter:a,exit:c,buffer:s,resume:d,data:t},Wt=[],wi=-1;for(;++wi<ge.length;)if(ge[wi][1].type==="listOrdered"||ge[wi][1].type==="listUnordered")if(ge[wi][0]==="enter")Wt.push(wi);else{let xi=Wt.pop();wi=n(ge,xi,wi)}for(wi=-1;++wi<ge.length;){let xi=e[ge[wi][0]];uH.call(xi,ge[wi][1].type)&&xi[ge[wi][1].type].call(Object.assign({sliceSerialize:ge[wi][2].sliceSerialize},bt),ge[wi][1])}if(bt.tokenStack.length>0){let xi=bt.tokenStack[bt.tokenStack.length-1];(xi[1]||dH).call(bt,void 0,xi[0])}for(De.position={start:td(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:td(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},wi=-1;++wi<e.transforms.length;)De=e.transforms[wi](De)||De;return De}function n(ge,De,bt){let Wt=De-1,wi=-1,xi=!1,bs,vs,nu,Tc;for(;++Wt<=bt;){let Cn=ge[Wt];switch(Cn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Cn[0]==="enter"?wi++:wi--,Tc=void 0;break}case"lineEndingBlank":{Cn[0]==="enter"&&(bs&&!Tc&&!wi&&!nu&&(nu=Wt),Tc=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tc=void 0}if(!wi&&Cn[0]==="enter"&&Cn[1].type==="listItemPrefix"||wi===-1&&Cn[0]==="exit"&&(Cn[1].type==="listUnordered"||Cn[1].type==="listOrdered")){if(bs){let Ic=Wt;for(vs=void 0;Ic--;){let _s=ge[Ic];if(_s[1].type==="lineEnding"||_s[1].type==="lineEndingBlank"){if(_s[0]==="exit")continue;vs&&(ge[vs][1].type="lineEndingBlank",xi=!0),_s[1].type="lineEnding",vs=Ic}else if(!(_s[1].type==="linePrefix"||_s[1].type==="blockQuotePrefix"||_s[1].type==="blockQuotePrefixWhitespace"||_s[1].type==="blockQuoteMarker"||_s[1].type==="listItemIndent"))break}nu&&(!vs||nu<vs)&&(bs._spread=!0),bs.end=Object.assign({},vs?ge[vs][1].start:Cn[1].end),ge.splice(vs||Wt,0,["exit",bs,Cn[2]]),Wt++,bt++}if(Cn[1].type==="listItemPrefix"){let Ic={type:"listItem",_spread:!1,start:Object.assign({},Cn[1].start),end:void 0};bs=Ic,ge.splice(Wt,0,["enter",Ic,Cn[2]]),Wt++,bt++,nu=void 0,Tc=!0}}}return ge[De][1]._spread=xi,bt}function o(ge,De){return bt;function bt(Wt){a.call(this,ge(Wt),Wt),De&&De.call(this,Wt)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(ge,De,bt){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([De,bt]),ge.position={start:td(De.start),end:void 0}}function l(ge){return De;function De(bt){ge&&ge.call(this,bt),c.call(this,bt)}}function c(ge,De){let bt=this.stack.pop(),Wt=this.tokenStack.pop();if(Wt)Wt[0].type!==ge.type&&(De?De.call(this,ge,Wt[0]):(Wt[1]||dH).call(this,ge,Wt[0]));else throw new Error("Cannot close `"+ge.type+"` ("+Df({start:ge.start,end:ge.end})+"): it\u2019s not open");bt.position.end=td(ge.end)}function d(){return uE(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function h(ge){if(this.data.expectingFirstListItemValue){let De=this.stack[this.stack.length-2];De.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function f(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.lang=ge}function m(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.meta=ge}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge.replace(/(\r?\n|\r)$/g,"")}function E(ge){let De=this.resume(),bt=this.stack[this.stack.length-1];bt.label=De,bt.identifier=Ll(this.sliceSerialize(ge)).toLowerCase()}function A(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.title=ge}function L(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.url=ge}function O(ge){let De=this.stack[this.stack.length-1];if(!De.depth){let bt=this.sliceSerialize(ge).length;De.depth=bt}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function Y(ge){let De=this.stack[this.stack.length-1];De.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function te(ge){let bt=this.stack[this.stack.length-1].children,Wt=bt[bt.length-1];(!Wt||Wt.type!=="text")&&(Wt=Iv(),Wt.position={start:td(ge.start),end:void 0},bt.push(Wt)),this.stack.push(Wt)}function Z(ge){let De=this.stack.pop();De.value+=this.sliceSerialize(ge),De.position.end=td(ge.end)}function ve(ge){let De=this.stack[this.stack.length-1];if(this.data.atHardBreak){let bt=De.children[De.children.length-1];bt.position.end=td(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(De.type)&&(te.call(this,ge),Z.call(this,ge))}function Pe(){this.data.atHardBreak=!0}function Ee(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function Oe(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function Xe(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function dt(){let ge=this.stack[this.stack.length-1];if(this.data.inReference){let De=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=De,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function be(){let ge=this.stack[this.stack.length-1];if(this.data.inReference){let De=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=De,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function we(ge){let De=this.sliceSerialize(ge),bt=this.stack[this.stack.length-2];bt.label=aH(De),bt.identifier=Ll(De).toLowerCase()}function X(){let ge=this.stack[this.stack.length-1],De=this.resume(),bt=this.stack[this.stack.length-1];if(this.data.inReference=!0,bt.type==="link"){let Wt=ge.children;bt.children=Wt}else bt.alt=De}function R(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.url=ge}function ne(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.title=ge}function me(){this.data.inReference=void 0}function G(){this.data.referenceType="collapsed"}function Et(ge){let De=this.resume(),bt=this.stack[this.stack.length-1];bt.label=De,bt.identifier=Ll(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function Ot(ge){this.data.characterReferenceType=ge.type}function ai(ge){let De=this.sliceSerialize(ge),bt=this.data.characterReferenceType,Wt;bt?(Wt=Dy(De,bt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Wt=Xh(De);let wi=this.stack.pop();wi.value+=Wt,wi.position.end=td(ge.end)}function Ti(ge){Z.call(this,ge);let De=this.stack[this.stack.length-1];De.url=this.sliceSerialize(ge)}function kt(ge){Z.call(this,ge);let De=this.stack[this.stack.length-1];De.url="mailto:"+this.sliceSerialize(ge)}function Ei(){return{type:"blockquote",children:[]}}function fi(){return{type:"code",lang:null,meta:null,value:""}}function xo(){return{type:"inlineCode",value:""}}function ro(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function kc(){return{type:"emphasis",children:[]}}function Ec(){return{type:"heading",depth:0,children:[]}}function rl(){return{type:"break"}}function ru(){return{type:"html",value:""}}function Or(){return{type:"image",title:null,url:"",alt:null}}function Ko(){return{type:"link",title:null,url:"",children:[]}}function hr(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function w3(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function x3(){return{type:"paragraph",children:[]}}function C3(){return{type:"strong",children:[]}}function Iv(){return{type:"text",value:""}}function Yi(){return{type:"thematicBreak"}}}function td(i){return{line:i.line,column:i.column,offset:i.offset}}function hH(i,e){let t=-1;for(;++t<e.length;){let r=e[t];Array.isArray(r)?hH(i,r):Mae(i,r)}}function Mae(i,e){let t;for(t in e)if(uH.call(e,t))switch(t){case"canContainEols":{let r=e[t];r&&i[t].push(...r);break}case"transforms":{let r=e[t];r&&i[t].push(...r);break}case"enter":case"exit":{let r=e[t];r&&Object.assign(i[t],r);break}}}function dH(i,e){throw i?new Error("Cannot close `"+i.type+"` ("+Df({start:i.start,end:i.end})+"): a different token (`"+e.type+"`, "+Df({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Df({start:e.start,end:e.end})+") is still open")}function Uy(i){let e=this;e.parser=t;function t(r){return AE(r,xt(ue(ue({},e.data("settings")),i),{extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]}))}}function Mf(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let r=0,n=t.indexOf(e);for(;n!==-1;)r++,n=t.indexOf(e,n+e.length);return r}var Nae=id(new RegExp("\\p{P}","u")),UEe=id(/[A-Za-z]/),jEe=id(/[\dA-Za-z]/),WEe=id(/[#-'*+\--9=?A-Z^-~]/);var VEe=id(/\d/),qEe=id(/[\dA-Fa-f]/),Rae=id(/[!-/:-@[-`{-~]/);function fH(i){return Rae(i)||Nae(i)}var pH=id(/\s/);function id(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function DE(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ea=function(i){if(i==null)return zae;if(typeof i=="function")return jy(i);if(typeof i=="object")return Array.isArray(i)?Pae(i):Oae(i);if(typeof i=="string")return Fae(i);throw new Error("Expected function, string, or object as test")};function Pae(i){let e=[],t=-1;for(;++t<i.length;)e[t]=Ea(i[t]);return jy(r);function r(...n){let o=-1;for(;++o<e.length;)if(e[o].apply(this,n))return!0;return!1}}function Oae(i){let e=i;return jy(t);function t(r){let n=r,o;for(o in i)if(n[o]!==e[o])return!1;return!0}}function Fae(i){return jy(e);function e(t){return t&&t.type===i}}function jy(i){return e;function e(t,r,n){return!!(Bae(t)&&i.call(this,t,typeof r=="number"?r:void 0,n||void 0))}}function zae(){return!0}function Bae(i){return i!==null&&typeof i=="object"&&"type"in i}var mH=[],Wy=!0,Tu=!1,Nf="skip";function Iu(i,e,t,r){let n;typeof e=="function"&&typeof t!="function"?(r=t,t=e):n=e;let o=Ea(n),s=r?-1:1;a(i,void 0,[])();function a(l,c,d){let u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){let f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=mH,m,g,w;if((!e||o(l,c,d[d.length-1]||void 0))&&(f=Hae(t(l,d)),f[0]===Tu))return f;if("children"in l&&l.children){let _=l;if(_.children&&f[0]!==Nf)for(g=(r?_.children.length:-1)+s,w=d.concat(_);g>-1&&g<_.children.length;){let E=_.children[g];if(m=a(E,g,w)(),m[0]===Tu)return m;g=typeof m[1]=="number"?m[1]:g+s}}return f}}}function Hae(i){return Array.isArray(i)?i:typeof i=="number"?[Wy,i]:i==null?mH:[i]}function ME(i,e,t){let n=Ea((t||{}).ignore||[]),o=Uae(e),s=-1;for(;++s<o.length;)Iu(i,"text",a);function a(c,d){let u=-1,h;for(;++u<d.length;){let f=d[u],m=h?h.children:void 0;if(n(f,m?m.indexOf(f):void 0,h))return;h=f}if(h)return l(c,d)}function l(c,d){let u=d[d.length-1],h=o[s][0],f=o[s][1],m=0,w=u.children.indexOf(c),_=!1,E=[];h.lastIndex=0;let A=h.exec(c.value);for(;A;){let L=A.index,O={index:A.index,input:A.input,stack:[...d,c]},U=f(...A,O);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?h.lastIndex=L+1:(m!==L&&E.push({type:"text",value:c.value.slice(m,L)}),Array.isArray(U)?E.push(...U):U&&E.push(U),m=L+A[0].length,_=!0),!h.global)break;A=h.exec(c.value)}return _?(m<c.value.length&&E.push({type:"text",value:c.value.slice(m)}),u.children.splice(w,1,...E)):E=[c],w+E.length}}function Uae(i){let e=[];if(!Array.isArray(i))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!i[0]||Array.isArray(i[0])?i:[i],r=-1;for(;++r<t.length;){let n=t[r];e.push([jae(n[0]),Wae(n[1])])}return e}function jae(i){return typeof i=="string"?new RegExp(DE(i),"g"):i}function Wae(i){return typeof i=="function"?i:function(){return i}}var NE="phrasing",RE=["autolink","link","image","label"];function OE(){return{transforms:[Yae],enter:{literalAutolink:Vae,literalAutolinkEmail:PE,literalAutolinkHttp:PE,literalAutolinkWww:PE},exit:{literalAutolink:Gae,literalAutolinkEmail:$ae,literalAutolinkHttp:qae,literalAutolinkWww:Kae}}}function FE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:NE,notInConstruct:RE},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:NE,notInConstruct:RE},{character:":",before:"[ps]",after:"\\/",inConstruct:NE,notInConstruct:RE}]}}function Vae(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function PE(i){this.config.enter.autolinkProtocol.call(this,i)}function qae(i){this.config.exit.autolinkProtocol.call(this,i)}function Kae(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(i)}function $ae(i){this.config.exit.autolinkEmail.call(this,i)}function Gae(i){this.exit(i)}function Yae(i){ME(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Xae],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Qae]],{ignore:["link","linkReference"]})}function Xae(i,e,t,r,n){let o="";if(!gH(n)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!Zae(t)))return!1;let s=Jae(t+r);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 Qae(i,e,t,r){return!gH(r,!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 Jae(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i);if(!e)return[i,void 0];i=i.slice(0,e.index);let t=e[0],r=t.indexOf(")"),n=Mf(i,"("),o=Mf(i,")");for(;r!==-1&&n>o;)i+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[i,t]}function gH(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||pH(t)||fH(t))&&(!e||t!==47)}function zE(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}bH.peek=lle;function BE(){return{enter:{gfmFootnoteDefinition:ele,gfmFootnoteDefinitionLabelString:tle,gfmFootnoteCall:nle,gfmFootnoteCallString:ole},exit:{gfmFootnoteDefinition:rle,gfmFootnoteDefinitionLabelString:ile,gfmFootnoteCall:ale,gfmFootnoteCallString:sle}}}function HE(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:cle,footnoteReference:bH}}}function ele(i){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},i)}function tle(){this.buffer()}function ile(i){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=zE(this.sliceSerialize(i)).toLowerCase()}function rle(i){this.exit(i)}function nle(i){this.enter({type:"footnoteReference",identifier:"",label:""},i)}function ole(){this.buffer()}function sle(i){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=zE(this.sliceSerialize(i)).toLowerCase()}function ale(i){this.exit(i)}function bH(i,e,t,r){let n=t.createTracker(r),o=n.move("[^"),s=t.enter("footnoteReference"),a=t.enter("reference");return o+=n.move(t.safe(t.associationId(i),xt(ue({},n.current()),{before:o,after:"]"}))),a(),s(),o+=n.move("]"),o}function lle(){return"["}function cle(i,e,t,r){let n=t.createTracker(r),o=n.move("[^"),s=t.enter("footnoteDefinition"),a=t.enter("label");return o+=n.move(t.safe(t.associationId(i),xt(ue({},n.current()),{before:o,after:"]"}))),a(),o+=n.move("]:"+(i.children&&i.children.length>0?" ":"")),n.shift(4),o+=n.move(t.indentLines(t.containerFlow(i,n.current()),dle)),s(),o}function dle(i,e,t){return e===0?i:(t?"":" ")+i}var ule=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];vH.peek=ple;function UE(){return{canContainEols:["delete"],enter:{strikethrough:hle},exit:{strikethrough:fle}}}function jE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ule}],handlers:{delete:vH}}}function hle(i){this.enter({type:"delete",children:[]},i)}function fle(i){this.exit(i)}function vH(i,e,t,r){let n=t.createTracker(r),o=t.enter("strikethrough"),s=n.move("~~");return s+=t.containerPhrasing(i,xt(ue({},n.current()),{before:s,after:"~"})),s+=n.move("~~"),o(),s}function ple(){return"~"}function yH(i,e={}){let t=(e.align||[]).concat(),r=e.stringLength||gle,n=[],o=[],s=[],a=[],l=0,c=-1;for(;++c<i.length;){let m=[],g=[],w=-1;for(i[c].length>l&&(l=i[c].length);++w<i[c].length;){let _=mle(i[c][w]);if(e.alignDelimiters!==!1){let E=r(_);g[w]=E,(a[w]===void 0||E>a[w])&&(a[w]=E)}m.push(_)}o[c]=m,s[c]=g}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<l;)n[d]=_H(t[d]);else{let m=_H(t);for(;++d<l;)n[d]=m}d=-1;let u=[],h=[];for(;++d<l;){let m=n[d],g="",w="";m===99?(g=":",w=":"):m===108?g=":":m===114&&(w=":");let _=e.alignDelimiters===!1?1:Math.max(1,a[d]-g.length-w.length),E=g+"-".repeat(_)+w;e.alignDelimiters!==!1&&(_=g.length+_+w.length,_>a[d]&&(a[d]=_),h[d]=_),u[d]=E}o.splice(1,0,u),s.splice(1,0,h),c=-1;let f=[];for(;++c<o.length;){let m=o[c],g=s[c];d=-1;let w=[];for(;++d<l;){let _=m[d]||"",E="",A="";if(e.alignDelimiters!==!1){let L=a[d]-(g[d]||0),O=n[d];O===114?E=" ".repeat(L):O===99?L%2?(E=" ".repeat(L/2+.5),A=" ".repeat(L/2-.5)):(E=" ".repeat(L/2),A=E):A=" ".repeat(L)}e.delimiterStart!==!1&&!d&&w.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&_==="")&&(e.delimiterStart!==!1||d)&&w.push(" "),e.alignDelimiters!==!1&&w.push(E),w.push(_),e.alignDelimiters!==!1&&w.push(A),e.padding!==!1&&w.push(" "),(e.delimiterEnd!==!1||d!==l-1)&&w.push("|")}f.push(e.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return f.join(` -`)}function mle(i){return i==null?"":String(i)}function gle(i){return i.length}function _H(i){let e=typeof i=="string"?i.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}var wH={}.hasOwnProperty;function Rf(i,e){let t=e||{};function r(n,...o){let s=r.invalid,a=r.handlers;if(n&&wH.call(n,i)){let l=String(n[i]);s=wH.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,n,...o)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}function xH(i,e,t,r){let n=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);let s=t.indentLines(t.containerFlow(i,o.current()),ble);return n(),s}function ble(i,e,t){return">"+(t?"":" ")+i}function SH(i,e){return CH(i,e.inConstruct,!0)&&!CH(i,e.notInConstruct,!1)}function CH(i,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let r=-1;for(;++r<e.length;)if(i.includes(e[r]))return!0;return!1}function WE(i,e,t,r){let n=-1;for(;++n<t.unsafe.length;)if(t.unsafe[n].character===` -`&&SH(t.stack,t.unsafe[n]))return/[ \t]/.test(r.before)?"":" ";return`\\ -`}function Vy(i,e){let t=String(i),r=t.indexOf(e),n=r,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===n?++o>s&&(s=o):o=1,n=r+e.length,r=t.indexOf(e,n);return s}function kH(i,e){return!!(e.options.fences===!1&&i.value&&!i.lang&&/[^ \r\n]/.test(i.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(i.value))}function EH(i){let e=i.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function TH(i,e,t,r){let n=EH(t),o=i.value||"",s=n==="`"?"GraveAccent":"Tilde";if(kH(i,t)){let u=t.enter("codeIndented"),h=t.indentLines(o,vle);return u(),h}let a=t.createTracker(r),l=n.repeat(Math.max(Vy(o,n)+1,3)),c=t.enter("codeFenced"),d=a.move(l);if(i.lang){let u=t.enter(`codeFencedLang${s}`);d+=a.move(t.safe(i.lang,ue({before:d,after:" ",encode:["`"]},a.current()))),u()}if(i.lang&&i.meta){let u=t.enter(`codeFencedMeta${s}`);d+=a.move(" "),d+=a.move(t.safe(i.meta,ue({before:d,after:` +`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&n)continue;s=" ";break}default:s=String.fromCharCode(o)}n=o===-2,r.push(s)}return r.join("")}var EE={};Gh(EE,{attentionMarkers:()=>Tae,contentInitial:()=>wae,disable:()=>Iae,document:()=>yae,flow:()=>Cae,flowInitial:()=>xae,insideSpan:()=>Eae,string:()=>Sae,text:()=>kae});var yae={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:My},wae={91:vE},xae={[-2]:Lg,[-1]:Lg,32:Lg},Cae={35:yE,42:Eu,45:[Hy,Eu],60:xE,61:Hy,95:Eu,96:Py,126:Py},Sae={38:Ry,92:Ny},kae={[-5]:Ag,[-4]:Ag,[-3]:Ag,33:SE,38:Ry,42:Ig,60:[mE,CE],91:kE,92:[_E,Ny],93:ku,95:Ig,96:gE},Eae={null:[Ig,tH]},Tae={null:[42,95]},Iae={null:[]};function TE(i){let t=WB([EE,...(i||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:n(GB),document:n(XB),flow:n(eH),string:n(iH),text:n(rH)};return r;function n(o){return s;function s(a){return sH(r,o,a)}}}function IE(i){for(;!Oy(i););return i}var aH=/[\0\t\n\r]/g;function LE(){let i=1,e="",t=!0,r;return n;function n(o,s,a){let l=[],c,d,u,h,f;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),u=0,e="",t&&(o.charCodeAt(0)===65279&&u++,t=void 0);u<o.length;){if(aH.lastIndex=u,c=aH.exec(o),h=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(h),!c){e=o.slice(u);break}if(f===10&&u===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<h&&(l.push(o.slice(u,h)),i+=h-u),f){case 0:{l.push(65533),i++;break}case 9:{for(d=Math.ceil(i/4)*4,l.push(-2);i++<d;)l.push(-1);break}case 10:{l.push(-4),i=1;break}default:r=!0,i=1}u=h+1}return a&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}var Lae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lH(i){return i.replace(Lae,Aae)}function Aae(i,e,t){if(e)return e;if(t.charCodeAt(0)===35){let n=t.charCodeAt(1),o=n===120||n===88;return Dy(t.slice(o?2:1),o?16:10)}return Xh(t)||i}function Df(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?cH(i.position):"start"in i||"end"in i?cH(i):"line"in i||"column"in i?AE(i):""}function AE(i){return dH(i&&i.line)+":"+dH(i&&i.column)}function cH(i){return AE(i&&i.start)+"-"+AE(i&&i.end)}function dH(i){return i&&typeof i=="number"?i:1}var hH={}.hasOwnProperty;function DE(i,e,t){return typeof e!="string"&&(t=e,e=void 0),Dae(t)(IE(TE(t).document().write(LE()(i,e,!0))))}function Dae(i){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ko),autolinkProtocol:te,autolinkEmail:te,atxHeading:o(Ec),blockQuote:o(Ei),characterEscape:te,characterReference:te,codeFenced:o(fi),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(fi,s),codeText:o(xo,s),codeTextData:te,data:te,codeFlowValue:te,definition:o(ro),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(kc),hardBreakEscape:o(rl),hardBreakTrailing:o(rl),htmlFlow:o(ru,s),htmlFlowData:te,htmlText:o(ru,s),htmlTextData:te,image:o(Or),label:s,link:o(Ko),listItem:o(x3),listItemValue:h,listOrdered:o(hr,u),listUnordered:o(hr),paragraph:o(C3),reference:G,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Ec),strong:o(S3),thematicBreak:o(Yi)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:kt,autolinkProtocol:Ti,blockQuote:l(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:Ot,characterReferenceMarkerNumeric:Ot,characterReferenceValue:ai,codeFenced:l(w),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:Z,codeIndented:l(_),codeText:l(Xe),codeTextData:Z,data:Z,definition:l(),definitionDestinationString:L,definitionLabelString:E,definitionTitleString:A,emphasis:l(),hardBreakEscape:l(Pe),hardBreakTrailing:l(Pe),htmlFlow:l(Ee),htmlFlowData:Z,htmlText:l(Oe),htmlTextData:Z,image:l(be),label:X,labelText:we,lineEnding:ve,link:l(dt),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Et,resourceDestinationString:R,resourceTitleString:ne,resource:me,setextHeading:l(oe),setextHeadingLineSequence:Y,setextHeadingText:U,strong:l(),thematicBreak:l()}};fH(e,(i||{}).mdastExtensions||[]);let t={};return r;function r(ge){let De={type:"root",children:[]},bt={stack:[De],tokenStack:[],config:e,enter:a,exit:c,buffer:s,resume:d,data:t},Wt=[],wi=-1;for(;++wi<ge.length;)if(ge[wi][1].type==="listOrdered"||ge[wi][1].type==="listUnordered")if(ge[wi][0]==="enter")Wt.push(wi);else{let xi=Wt.pop();wi=n(ge,xi,wi)}for(wi=-1;++wi<ge.length;){let xi=e[ge[wi][0]];hH.call(xi,ge[wi][1].type)&&xi[ge[wi][1].type].call(Object.assign({sliceSerialize:ge[wi][2].sliceSerialize},bt),ge[wi][1])}if(bt.tokenStack.length>0){let xi=bt.tokenStack[bt.tokenStack.length-1];(xi[1]||uH).call(bt,void 0,xi[0])}for(De.position={start:td(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:td(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},wi=-1;++wi<e.transforms.length;)De=e.transforms[wi](De)||De;return De}function n(ge,De,bt){let Wt=De-1,wi=-1,xi=!1,bs,vs,nu,Tc;for(;++Wt<=bt;){let Cn=ge[Wt];switch(Cn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Cn[0]==="enter"?wi++:wi--,Tc=void 0;break}case"lineEndingBlank":{Cn[0]==="enter"&&(bs&&!Tc&&!wi&&!nu&&(nu=Wt),Tc=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tc=void 0}if(!wi&&Cn[0]==="enter"&&Cn[1].type==="listItemPrefix"||wi===-1&&Cn[0]==="exit"&&(Cn[1].type==="listUnordered"||Cn[1].type==="listOrdered")){if(bs){let Ic=Wt;for(vs=void 0;Ic--;){let _s=ge[Ic];if(_s[1].type==="lineEnding"||_s[1].type==="lineEndingBlank"){if(_s[0]==="exit")continue;vs&&(ge[vs][1].type="lineEndingBlank",xi=!0),_s[1].type="lineEnding",vs=Ic}else if(!(_s[1].type==="linePrefix"||_s[1].type==="blockQuotePrefix"||_s[1].type==="blockQuotePrefixWhitespace"||_s[1].type==="blockQuoteMarker"||_s[1].type==="listItemIndent"))break}nu&&(!vs||nu<vs)&&(bs._spread=!0),bs.end=Object.assign({},vs?ge[vs][1].start:Cn[1].end),ge.splice(vs||Wt,0,["exit",bs,Cn[2]]),Wt++,bt++}if(Cn[1].type==="listItemPrefix"){let Ic={type:"listItem",_spread:!1,start:Object.assign({},Cn[1].start),end:void 0};bs=Ic,ge.splice(Wt,0,["enter",Ic,Cn[2]]),Wt++,bt++,nu=void 0,Tc=!0}}}return ge[De][1]._spread=xi,bt}function o(ge,De){return bt;function bt(Wt){a.call(this,ge(Wt),Wt),De&&De.call(this,Wt)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(ge,De,bt){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([De,bt]),ge.position={start:td(De.start),end:void 0}}function l(ge){return De;function De(bt){ge&&ge.call(this,bt),c.call(this,bt)}}function c(ge,De){let bt=this.stack.pop(),Wt=this.tokenStack.pop();if(Wt)Wt[0].type!==ge.type&&(De?De.call(this,ge,Wt[0]):(Wt[1]||uH).call(this,ge,Wt[0]));else throw new Error("Cannot close `"+ge.type+"` ("+Df({start:ge.start,end:ge.end})+"): it\u2019s not open");bt.position.end=td(ge.end)}function d(){return hE(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function h(ge){if(this.data.expectingFirstListItemValue){let De=this.stack[this.stack.length-2];De.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function f(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.lang=ge}function m(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.meta=ge}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge.replace(/(\r?\n|\r)$/g,"")}function E(ge){let De=this.resume(),bt=this.stack[this.stack.length-1];bt.label=De,bt.identifier=Ll(this.sliceSerialize(ge)).toLowerCase()}function A(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.title=ge}function L(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.url=ge}function O(ge){let De=this.stack[this.stack.length-1];if(!De.depth){let bt=this.sliceSerialize(ge).length;De.depth=bt}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function Y(ge){let De=this.stack[this.stack.length-1];De.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function te(ge){let bt=this.stack[this.stack.length-1].children,Wt=bt[bt.length-1];(!Wt||Wt.type!=="text")&&(Wt=Iv(),Wt.position={start:td(ge.start),end:void 0},bt.push(Wt)),this.stack.push(Wt)}function Z(ge){let De=this.stack.pop();De.value+=this.sliceSerialize(ge),De.position.end=td(ge.end)}function ve(ge){let De=this.stack[this.stack.length-1];if(this.data.atHardBreak){let bt=De.children[De.children.length-1];bt.position.end=td(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(De.type)&&(te.call(this,ge),Z.call(this,ge))}function Pe(){this.data.atHardBreak=!0}function Ee(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function Oe(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function Xe(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.value=ge}function dt(){let ge=this.stack[this.stack.length-1];if(this.data.inReference){let De=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=De,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function be(){let ge=this.stack[this.stack.length-1];if(this.data.inReference){let De=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=De,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function we(ge){let De=this.sliceSerialize(ge),bt=this.stack[this.stack.length-2];bt.label=lH(De),bt.identifier=Ll(De).toLowerCase()}function X(){let ge=this.stack[this.stack.length-1],De=this.resume(),bt=this.stack[this.stack.length-1];if(this.data.inReference=!0,bt.type==="link"){let Wt=ge.children;bt.children=Wt}else bt.alt=De}function R(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.url=ge}function ne(){let ge=this.resume(),De=this.stack[this.stack.length-1];De.title=ge}function me(){this.data.inReference=void 0}function G(){this.data.referenceType="collapsed"}function Et(ge){let De=this.resume(),bt=this.stack[this.stack.length-1];bt.label=De,bt.identifier=Ll(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function Ot(ge){this.data.characterReferenceType=ge.type}function ai(ge){let De=this.sliceSerialize(ge),bt=this.data.characterReferenceType,Wt;bt?(Wt=Dy(De,bt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Wt=Xh(De);let wi=this.stack.pop();wi.value+=Wt,wi.position.end=td(ge.end)}function Ti(ge){Z.call(this,ge);let De=this.stack[this.stack.length-1];De.url=this.sliceSerialize(ge)}function kt(ge){Z.call(this,ge);let De=this.stack[this.stack.length-1];De.url="mailto:"+this.sliceSerialize(ge)}function Ei(){return{type:"blockquote",children:[]}}function fi(){return{type:"code",lang:null,meta:null,value:""}}function xo(){return{type:"inlineCode",value:""}}function ro(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function kc(){return{type:"emphasis",children:[]}}function Ec(){return{type:"heading",depth:0,children:[]}}function rl(){return{type:"break"}}function ru(){return{type:"html",value:""}}function Or(){return{type:"image",title:null,url:"",alt:null}}function Ko(){return{type:"link",title:null,url:"",children:[]}}function hr(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function x3(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function C3(){return{type:"paragraph",children:[]}}function S3(){return{type:"strong",children:[]}}function Iv(){return{type:"text",value:""}}function Yi(){return{type:"thematicBreak"}}}function td(i){return{line:i.line,column:i.column,offset:i.offset}}function fH(i,e){let t=-1;for(;++t<e.length;){let r=e[t];Array.isArray(r)?fH(i,r):Mae(i,r)}}function Mae(i,e){let t;for(t in e)if(hH.call(e,t))switch(t){case"canContainEols":{let r=e[t];r&&i[t].push(...r);break}case"transforms":{let r=e[t];r&&i[t].push(...r);break}case"enter":case"exit":{let r=e[t];r&&Object.assign(i[t],r);break}}}function uH(i,e){throw i?new Error("Cannot close `"+i.type+"` ("+Df({start:i.start,end:i.end})+"): a different token (`"+e.type+"`, "+Df({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Df({start:e.start,end:e.end})+") is still open")}function Uy(i){let e=this;e.parser=t;function t(r){return DE(r,xt(ue(ue({},e.data("settings")),i),{extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]}))}}function Mf(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let r=0,n=t.indexOf(e);for(;n!==-1;)r++,n=t.indexOf(e,n+e.length);return r}var Nae=id(new RegExp("\\p{P}","u")),UEe=id(/[A-Za-z]/),jEe=id(/[\dA-Za-z]/),WEe=id(/[#-'*+\--9=?A-Z^-~]/);var VEe=id(/\d/),qEe=id(/[\dA-Fa-f]/),Rae=id(/[!-/:-@[-`{-~]/);function pH(i){return Rae(i)||Nae(i)}var mH=id(/\s/);function id(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function ME(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ea=function(i){if(i==null)return zae;if(typeof i=="function")return jy(i);if(typeof i=="object")return Array.isArray(i)?Pae(i):Oae(i);if(typeof i=="string")return Fae(i);throw new Error("Expected function, string, or object as test")};function Pae(i){let e=[],t=-1;for(;++t<i.length;)e[t]=Ea(i[t]);return jy(r);function r(...n){let o=-1;for(;++o<e.length;)if(e[o].apply(this,n))return!0;return!1}}function Oae(i){let e=i;return jy(t);function t(r){let n=r,o;for(o in i)if(n[o]!==e[o])return!1;return!0}}function Fae(i){return jy(e);function e(t){return t&&t.type===i}}function jy(i){return e;function e(t,r,n){return!!(Bae(t)&&i.call(this,t,typeof r=="number"?r:void 0,n||void 0))}}function zae(){return!0}function Bae(i){return i!==null&&typeof i=="object"&&"type"in i}var gH=[],Wy=!0,Tu=!1,Nf="skip";function Iu(i,e,t,r){let n;typeof e=="function"&&typeof t!="function"?(r=t,t=e):n=e;let o=Ea(n),s=r?-1:1;a(i,void 0,[])();function a(l,c,d){let u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){let f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=gH,m,g,w;if((!e||o(l,c,d[d.length-1]||void 0))&&(f=Hae(t(l,d)),f[0]===Tu))return f;if("children"in l&&l.children){let _=l;if(_.children&&f[0]!==Nf)for(g=(r?_.children.length:-1)+s,w=d.concat(_);g>-1&&g<_.children.length;){let E=_.children[g];if(m=a(E,g,w)(),m[0]===Tu)return m;g=typeof m[1]=="number"?m[1]:g+s}}return f}}}function Hae(i){return Array.isArray(i)?i:typeof i=="number"?[Wy,i]:i==null?gH:[i]}function NE(i,e,t){let n=Ea((t||{}).ignore||[]),o=Uae(e),s=-1;for(;++s<o.length;)Iu(i,"text",a);function a(c,d){let u=-1,h;for(;++u<d.length;){let f=d[u],m=h?h.children:void 0;if(n(f,m?m.indexOf(f):void 0,h))return;h=f}if(h)return l(c,d)}function l(c,d){let u=d[d.length-1],h=o[s][0],f=o[s][1],m=0,w=u.children.indexOf(c),_=!1,E=[];h.lastIndex=0;let A=h.exec(c.value);for(;A;){let L=A.index,O={index:A.index,input:A.input,stack:[...d,c]},U=f(...A,O);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?h.lastIndex=L+1:(m!==L&&E.push({type:"text",value:c.value.slice(m,L)}),Array.isArray(U)?E.push(...U):U&&E.push(U),m=L+A[0].length,_=!0),!h.global)break;A=h.exec(c.value)}return _?(m<c.value.length&&E.push({type:"text",value:c.value.slice(m)}),u.children.splice(w,1,...E)):E=[c],w+E.length}}function Uae(i){let e=[];if(!Array.isArray(i))throw new TypeError("Expected find and replace tuple or list of tuples");let t=!i[0]||Array.isArray(i[0])?i:[i],r=-1;for(;++r<t.length;){let n=t[r];e.push([jae(n[0]),Wae(n[1])])}return e}function jae(i){return typeof i=="string"?new RegExp(ME(i),"g"):i}function Wae(i){return typeof i=="function"?i:function(){return i}}var RE="phrasing",PE=["autolink","link","image","label"];function FE(){return{transforms:[Yae],enter:{literalAutolink:Vae,literalAutolinkEmail:OE,literalAutolinkHttp:OE,literalAutolinkWww:OE},exit:{literalAutolink:Gae,literalAutolinkEmail:$ae,literalAutolinkHttp:qae,literalAutolinkWww:Kae}}}function zE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:RE,notInConstruct:PE},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:RE,notInConstruct:PE},{character:":",before:"[ps]",after:"\\/",inConstruct:RE,notInConstruct:PE}]}}function Vae(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function OE(i){this.config.enter.autolinkProtocol.call(this,i)}function qae(i){this.config.exit.autolinkProtocol.call(this,i)}function Kae(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(i)}function $ae(i){this.config.exit.autolinkEmail.call(this,i)}function Gae(i){this.exit(i)}function Yae(i){NE(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Xae],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Qae]],{ignore:["link","linkReference"]})}function Xae(i,e,t,r,n){let o="";if(!bH(n)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!Zae(t)))return!1;let s=Jae(t+r);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 Qae(i,e,t,r){return!bH(r,!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 Jae(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i);if(!e)return[i,void 0];i=i.slice(0,e.index);let t=e[0],r=t.indexOf(")"),n=Mf(i,"("),o=Mf(i,")");for(;r!==-1&&n>o;)i+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[i,t]}function bH(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||mH(t)||pH(t))&&(!e||t!==47)}function BE(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}vH.peek=lle;function HE(){return{enter:{gfmFootnoteDefinition:ele,gfmFootnoteDefinitionLabelString:tle,gfmFootnoteCall:nle,gfmFootnoteCallString:ole},exit:{gfmFootnoteDefinition:rle,gfmFootnoteDefinitionLabelString:ile,gfmFootnoteCall:ale,gfmFootnoteCallString:sle}}}function UE(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:cle,footnoteReference:vH}}}function ele(i){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},i)}function tle(){this.buffer()}function ile(i){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=BE(this.sliceSerialize(i)).toLowerCase()}function rle(i){this.exit(i)}function nle(i){this.enter({type:"footnoteReference",identifier:"",label:""},i)}function ole(){this.buffer()}function sle(i){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=BE(this.sliceSerialize(i)).toLowerCase()}function ale(i){this.exit(i)}function vH(i,e,t,r){let n=t.createTracker(r),o=n.move("[^"),s=t.enter("footnoteReference"),a=t.enter("reference");return o+=n.move(t.safe(t.associationId(i),xt(ue({},n.current()),{before:o,after:"]"}))),a(),s(),o+=n.move("]"),o}function lle(){return"["}function cle(i,e,t,r){let n=t.createTracker(r),o=n.move("[^"),s=t.enter("footnoteDefinition"),a=t.enter("label");return o+=n.move(t.safe(t.associationId(i),xt(ue({},n.current()),{before:o,after:"]"}))),a(),o+=n.move("]:"+(i.children&&i.children.length>0?" ":"")),n.shift(4),o+=n.move(t.indentLines(t.containerFlow(i,n.current()),dle)),s(),o}function dle(i,e,t){return e===0?i:(t?"":" ")+i}var ule=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_H.peek=ple;function jE(){return{canContainEols:["delete"],enter:{strikethrough:hle},exit:{strikethrough:fle}}}function WE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ule}],handlers:{delete:_H}}}function hle(i){this.enter({type:"delete",children:[]},i)}function fle(i){this.exit(i)}function _H(i,e,t,r){let n=t.createTracker(r),o=t.enter("strikethrough"),s=n.move("~~");return s+=t.containerPhrasing(i,xt(ue({},n.current()),{before:s,after:"~"})),s+=n.move("~~"),o(),s}function ple(){return"~"}function wH(i,e={}){let t=(e.align||[]).concat(),r=e.stringLength||gle,n=[],o=[],s=[],a=[],l=0,c=-1;for(;++c<i.length;){let m=[],g=[],w=-1;for(i[c].length>l&&(l=i[c].length);++w<i[c].length;){let _=mle(i[c][w]);if(e.alignDelimiters!==!1){let E=r(_);g[w]=E,(a[w]===void 0||E>a[w])&&(a[w]=E)}m.push(_)}o[c]=m,s[c]=g}let d=-1;if(typeof t=="object"&&"length"in t)for(;++d<l;)n[d]=yH(t[d]);else{let m=yH(t);for(;++d<l;)n[d]=m}d=-1;let u=[],h=[];for(;++d<l;){let m=n[d],g="",w="";m===99?(g=":",w=":"):m===108?g=":":m===114&&(w=":");let _=e.alignDelimiters===!1?1:Math.max(1,a[d]-g.length-w.length),E=g+"-".repeat(_)+w;e.alignDelimiters!==!1&&(_=g.length+_+w.length,_>a[d]&&(a[d]=_),h[d]=_),u[d]=E}o.splice(1,0,u),s.splice(1,0,h),c=-1;let f=[];for(;++c<o.length;){let m=o[c],g=s[c];d=-1;let w=[];for(;++d<l;){let _=m[d]||"",E="",A="";if(e.alignDelimiters!==!1){let L=a[d]-(g[d]||0),O=n[d];O===114?E=" ".repeat(L):O===99?L%2?(E=" ".repeat(L/2+.5),A=" ".repeat(L/2-.5)):(E=" ".repeat(L/2),A=E):A=" ".repeat(L)}e.delimiterStart!==!1&&!d&&w.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&_==="")&&(e.delimiterStart!==!1||d)&&w.push(" "),e.alignDelimiters!==!1&&w.push(E),w.push(_),e.alignDelimiters!==!1&&w.push(A),e.padding!==!1&&w.push(" "),(e.delimiterEnd!==!1||d!==l-1)&&w.push("|")}f.push(e.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return f.join(` +`)}function mle(i){return i==null?"":String(i)}function gle(i){return i.length}function yH(i){let e=typeof i=="string"?i.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}var xH={}.hasOwnProperty;function Rf(i,e){let t=e||{};function r(n,...o){let s=r.invalid,a=r.handlers;if(n&&xH.call(n,i)){let l=String(n[i]);s=xH.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,n,...o)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}function CH(i,e,t,r){let n=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);let s=t.indentLines(t.containerFlow(i,o.current()),ble);return n(),s}function ble(i,e,t){return">"+(t?"":" ")+i}function kH(i,e){return SH(i,e.inConstruct,!0)&&!SH(i,e.notInConstruct,!1)}function SH(i,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let r=-1;for(;++r<e.length;)if(i.includes(e[r]))return!0;return!1}function VE(i,e,t,r){let n=-1;for(;++n<t.unsafe.length;)if(t.unsafe[n].character===` +`&&kH(t.stack,t.unsafe[n]))return/[ \t]/.test(r.before)?"":" ";return`\\ +`}function Vy(i,e){let t=String(i),r=t.indexOf(e),n=r,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===n?++o>s&&(s=o):o=1,n=r+e.length,r=t.indexOf(e,n);return s}function EH(i,e){return!!(e.options.fences===!1&&i.value&&!i.lang&&/[^ \r\n]/.test(i.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(i.value))}function TH(i){let e=i.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function IH(i,e,t,r){let n=TH(t),o=i.value||"",s=n==="`"?"GraveAccent":"Tilde";if(EH(i,t)){let u=t.enter("codeIndented"),h=t.indentLines(o,vle);return u(),h}let a=t.createTracker(r),l=n.repeat(Math.max(Vy(o,n)+1,3)),c=t.enter("codeFenced"),d=a.move(l);if(i.lang){let u=t.enter(`codeFencedLang${s}`);d+=a.move(t.safe(i.lang,ue({before:d,after:" ",encode:["`"]},a.current()))),u()}if(i.lang&&i.meta){let u=t.enter(`codeFencedMeta${s}`);d+=a.move(" "),d+=a.move(t.safe(i.meta,ue({before:d,after:` `,encode:["`"]},a.current()))),u()}return d+=a.move(` `),o&&(d+=a.move(o+` -`)),d+=a.move(l),c(),d}function vle(i,e,t){return(t?"":" ")+i}function Pf(i){let e=i.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function IH(i,e,t,r){let n=Pf(t),o=n==='"'?"Quote":"Apostrophe",s=t.enter("definition"),a=t.enter("label"),l=t.createTracker(r),c=l.move("[");return c+=l.move(t.safe(t.associationId(i),ue({before:c,after:"]"},l.current()))),c+=l.move("]: "),a(),!i.url||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,ue({before:c,after:">"},l.current()))),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,ue({before:c,after:i.title?" ":` -`},l.current())))),a(),i.title&&(a=t.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(t.safe(i.title,ue({before:c,after:n},l.current()))),c+=l.move(n),a()),s(),c}function LH(i){let e=i.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}VE.peek=_le;function VE(i,e,t,r){let n=LH(t),o=t.enter("emphasis"),s=t.createTracker(r),a=s.move(n);return a+=s.move(t.containerPhrasing(i,ue({before:a,after:n},s.current()))),a+=s.move(n),o(),a}function _le(i,e,t){return t.options.emphasis||"*"}function Rn(i,e,t,r){let n,o,s;typeof e=="function"&&typeof t!="function"?(o=void 0,s=e,n=t):(o=e,s=t,n=r),Iu(i,o,a,n);function a(l,c){let d=c[c.length-1],u=d?d.children.indexOf(l):void 0;return s(l,u,d)}}var yle={};function Dg(i,e){let t=e||yle,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,n=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return DH(i,r,n)}function DH(i,e,t){if(wle(i)){if("value"in i)return i.type==="html"&&!t?"":i.value;if(e&&"alt"in i&&i.alt)return i.alt;if("children"in i)return AH(i.children,e,t)}return Array.isArray(i)?AH(i,e,t):""}function AH(i,e,t){let r=[],n=-1;for(;++n<i.length;)r[n]=DH(i[n],e,t);return r.join("")}function wle(i){return!!(i&&typeof i=="object")}function MH(i,e){let t=!1;return Rn(i,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Tu}),!!((!i.depth||i.depth<3)&&Dg(i)&&(e.options.setext||t))}function NH(i,e,t,r){let n=Math.max(Math.min(6,i.depth||1),1),o=t.createTracker(r);if(MH(i,t)){let d=t.enter("headingSetext"),u=t.enter("phrasing"),h=t.containerPhrasing(i,xt(ue({},o.current()),{before:` +`)),d+=a.move(l),c(),d}function vle(i,e,t){return(t?"":" ")+i}function Pf(i){let e=i.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function LH(i,e,t,r){let n=Pf(t),o=n==='"'?"Quote":"Apostrophe",s=t.enter("definition"),a=t.enter("label"),l=t.createTracker(r),c=l.move("[");return c+=l.move(t.safe(t.associationId(i),ue({before:c,after:"]"},l.current()))),c+=l.move("]: "),a(),!i.url||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,ue({before:c,after:">"},l.current()))),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,ue({before:c,after:i.title?" ":` +`},l.current())))),a(),i.title&&(a=t.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(t.safe(i.title,ue({before:c,after:n},l.current()))),c+=l.move(n),a()),s(),c}function AH(i){let e=i.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}qE.peek=_le;function qE(i,e,t,r){let n=AH(t),o=t.enter("emphasis"),s=t.createTracker(r),a=s.move(n);return a+=s.move(t.containerPhrasing(i,ue({before:a,after:n},s.current()))),a+=s.move(n),o(),a}function _le(i,e,t){return t.options.emphasis||"*"}function Rn(i,e,t,r){let n,o,s;typeof e=="function"&&typeof t!="function"?(o=void 0,s=e,n=t):(o=e,s=t,n=r),Iu(i,o,a,n);function a(l,c){let d=c[c.length-1],u=d?d.children.indexOf(l):void 0;return s(l,u,d)}}var yle={};function Dg(i,e){let t=e||yle,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,n=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return MH(i,r,n)}function MH(i,e,t){if(wle(i)){if("value"in i)return i.type==="html"&&!t?"":i.value;if(e&&"alt"in i&&i.alt)return i.alt;if("children"in i)return DH(i.children,e,t)}return Array.isArray(i)?DH(i,e,t):""}function DH(i,e,t){let r=[],n=-1;for(;++n<i.length;)r[n]=MH(i[n],e,t);return r.join("")}function wle(i){return!!(i&&typeof i=="object")}function NH(i,e){let t=!1;return Rn(i,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Tu}),!!((!i.depth||i.depth<3)&&Dg(i)&&(e.options.setext||t))}function RH(i,e,t,r){let n=Math.max(Math.min(6,i.depth||1),1),o=t.createTracker(r);if(NH(i,t)){let d=t.enter("headingSetext"),u=t.enter("phrasing"),h=t.containerPhrasing(i,xt(ue({},o.current()),{before:` `,after:` `}));return u(),d(),h+` `+(n===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` `))+1))}let s="#".repeat(n),a=t.enter("headingAtx"),l=t.enter("phrasing");o.move(s+" ");let c=t.containerPhrasing(i,ue({before:"# ",after:` -`},o.current()));return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,t.options.closeAtx&&(c+=" "+s),l(),a(),c}qE.peek=xle;function qE(i){return i.value||""}function xle(){return"<"}KE.peek=Cle;function KE(i,e,t,r){let n=Pf(t),o=n==='"'?"Quote":"Apostrophe",s=t.enter("image"),a=t.enter("label"),l=t.createTracker(r),c=l.move("![");return c+=l.move(t.safe(i.alt,ue({before:c,after:"]"},l.current()))),c+=l.move("]("),a(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,ue({before:c,after:">"},l.current()))),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,ue({before:c,after:i.title?" ":")"},l.current())))),a(),i.title&&(a=t.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(t.safe(i.title,ue({before:c,after:n},l.current()))),c+=l.move(n),a()),c+=l.move(")"),s(),c}function Cle(){return"!"}$E.peek=Sle;function $E(i,e,t,r){let n=i.referenceType,o=t.enter("imageReference"),s=t.enter("label"),a=t.createTracker(r),l=a.move("!["),c=t.safe(i.alt,ue({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let d=t.stack;t.stack=[],s=t.enter("reference");let u=t.safe(t.associationId(i),ue({before:l,after:"]"},a.current()));return s(),t.stack=d,o(),n==="full"||!c||c!==u?l+=a.move(u+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Sle(){return"!"}GE.peek=kle;function GE(i,e,t){let r=i.value||"",n="`",o=-1;for(;new RegExp("(^|[^`])"+n+"([^`]|$)").test(r);)n+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){let s=t.unsafe[o],a=t.compilePattern(s),l;if(s.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return n+r+n}function kle(){return"`"}function YE(i,e){let t=Dg(i);return!!(!e.options.resourceLink&&i.url&&!i.title&&i.children&&i.children.length===1&&i.children[0].type==="text"&&(t===i.url||"mailto:"+t===i.url)&&/^[a-z][a-z+.-]+:/i.test(i.url)&&!/[\0- <>\u007F]/.test(i.url))}XE.peek=Ele;function XE(i,e,t,r){let n=Pf(t),o=n==='"'?"Quote":"Apostrophe",s=t.createTracker(r),a,l;if(YE(i,t)){let d=t.stack;t.stack=[],a=t.enter("autolink");let u=s.move("<");return u+=s.move(t.containerPhrasing(i,ue({before:u,after:">"},s.current()))),u+=s.move(">"),a(),t.stack=d,u}a=t.enter("link"),l=t.enter("label");let c=s.move("[");return c+=s.move(t.containerPhrasing(i,ue({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(l=t.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(t.safe(i.url,ue({before:c,after:">"},s.current()))),c+=s.move(">")):(l=t.enter("destinationRaw"),c+=s.move(t.safe(i.url,ue({before:c,after:i.title?" ":")"},s.current())))),l(),i.title&&(l=t.enter(`title${o}`),c+=s.move(" "+n),c+=s.move(t.safe(i.title,ue({before:c,after:n},s.current()))),c+=s.move(n),l()),c+=s.move(")"),a(),c}function Ele(i,e,t){return YE(i,t)?"<":"["}QE.peek=Tle;function QE(i,e,t,r){let n=i.referenceType,o=t.enter("linkReference"),s=t.enter("label"),a=t.createTracker(r),l=a.move("["),c=t.containerPhrasing(i,ue({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let d=t.stack;t.stack=[],s=t.enter("reference");let u=t.safe(t.associationId(i),ue({before:l,after:"]"},a.current()));return s(),t.stack=d,o(),n==="full"||!c||c!==u?l+=a.move(u+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Tle(){return"["}function Of(i){let e=i.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function RH(i){let e=Of(i),t=i.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function PH(i){let e=i.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function qy(i){let e=i.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function OH(i,e,t,r){let n=t.enter("list"),o=t.bulletCurrent,s=i.ordered?PH(t):Of(t),a=i.ordered?s==="."?")":".":RH(t),l=e&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!i.ordered){let d=i.children?i.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),qy(t)===s&&d){let u=-1;for(;++u<i.children.length;){let h=i.children[u];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),t.bulletCurrent=s;let c=t.containerFlow(i,r);return t.bulletLastUsed=s,t.bulletCurrent=o,n(),c}function FH(i){let e=i.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function zH(i,e,t,r){let n=FH(t),o=t.bulletCurrent||Of(t);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+o);let s=o.length+1;(n==="tab"||n==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(s=Math.ceil(s/4)*4);let a=t.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),c=t.indentLines(t.containerFlow(i,a.current()),d);return l(),c;function d(u,h,f){return h?(f?"":" ".repeat(s))+u:(f?o:o+" ".repeat(s-o.length))+u}}function BH(i,e,t,r){let n=t.enter("paragraph"),o=t.enter("phrasing"),s=t.containerPhrasing(i,r);return o(),n(),s}var ZE=Ea(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function HH(i,e,t,r){return(i.children.some(function(s){return ZE(s)})?t.containerPhrasing:t.containerFlow).call(t,i,r)}function UH(i){let e=i.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}JE.peek=Ile;function JE(i,e,t,r){let n=UH(t),o=t.enter("strong"),s=t.createTracker(r),a=s.move(n+n);return a+=s.move(t.containerPhrasing(i,ue({before:a,after:n},s.current()))),a+=s.move(n+n),o(),a}function Ile(i,e,t){return t.options.strong||"*"}function jH(i,e,t,r){return t.safe(i.value,r)}function WH(i){let e=i.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function VH(i,e,t){let r=(qy(t)+(t.options.ruleSpaces?" ":"")).repeat(WH(t));return t.options.ruleSpaces?r.slice(0,-1):r}var Mg={blockquote:xH,break:WE,code:TH,definition:IH,emphasis:VE,hardBreak:WE,heading:NH,html:qE,image:KE,imageReference:$E,inlineCode:GE,link:XE,linkReference:QE,list:OH,listItem:zH,paragraph:BH,root:HH,strong:JE,text:jH,thematicBreak:VH};function t5(){return{enter:{table:Lle,tableData:qH,tableHeader:qH,tableRow:Dle},exit:{codeText:Mle,table:Ale,tableData:e5,tableHeader:e5,tableRow:e5}}}function Lle(i){let e=i._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},i),this.data.inTable=!0}function Ale(i){this.exit(i),this.data.inTable=void 0}function Dle(i){this.enter({type:"tableRow",children:[]},i)}function e5(i){this.exit(i)}function qH(i){this.enter({type:"tableCell",children:[]},i)}function Mle(i){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Nle));let t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(i)}function Nle(i,e){return e==="|"?e:i}function i5(i){let e=i||{},t=e.tableCellPadding,r=e.tablePipeAlign,n=e.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`},o.current()));return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,t.options.closeAtx&&(c+=" "+s),l(),a(),c}KE.peek=xle;function KE(i){return i.value||""}function xle(){return"<"}$E.peek=Cle;function $E(i,e,t,r){let n=Pf(t),o=n==='"'?"Quote":"Apostrophe",s=t.enter("image"),a=t.enter("label"),l=t.createTracker(r),c=l.move("![");return c+=l.move(t.safe(i.alt,ue({before:c,after:"]"},l.current()))),c+=l.move("]("),a(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,ue({before:c,after:">"},l.current()))),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,ue({before:c,after:i.title?" ":")"},l.current())))),a(),i.title&&(a=t.enter(`title${o}`),c+=l.move(" "+n),c+=l.move(t.safe(i.title,ue({before:c,after:n},l.current()))),c+=l.move(n),a()),c+=l.move(")"),s(),c}function Cle(){return"!"}GE.peek=Sle;function GE(i,e,t,r){let n=i.referenceType,o=t.enter("imageReference"),s=t.enter("label"),a=t.createTracker(r),l=a.move("!["),c=t.safe(i.alt,ue({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let d=t.stack;t.stack=[],s=t.enter("reference");let u=t.safe(t.associationId(i),ue({before:l,after:"]"},a.current()));return s(),t.stack=d,o(),n==="full"||!c||c!==u?l+=a.move(u+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Sle(){return"!"}YE.peek=kle;function YE(i,e,t){let r=i.value||"",n="`",o=-1;for(;new RegExp("(^|[^`])"+n+"([^`]|$)").test(r);)n+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){let s=t.unsafe[o],a=t.compilePattern(s),l;if(s.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return n+r+n}function kle(){return"`"}function XE(i,e){let t=Dg(i);return!!(!e.options.resourceLink&&i.url&&!i.title&&i.children&&i.children.length===1&&i.children[0].type==="text"&&(t===i.url||"mailto:"+t===i.url)&&/^[a-z][a-z+.-]+:/i.test(i.url)&&!/[\0- <>\u007F]/.test(i.url))}QE.peek=Ele;function QE(i,e,t,r){let n=Pf(t),o=n==='"'?"Quote":"Apostrophe",s=t.createTracker(r),a,l;if(XE(i,t)){let d=t.stack;t.stack=[],a=t.enter("autolink");let u=s.move("<");return u+=s.move(t.containerPhrasing(i,ue({before:u,after:">"},s.current()))),u+=s.move(">"),a(),t.stack=d,u}a=t.enter("link"),l=t.enter("label");let c=s.move("[");return c+=s.move(t.containerPhrasing(i,ue({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(l=t.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(t.safe(i.url,ue({before:c,after:">"},s.current()))),c+=s.move(">")):(l=t.enter("destinationRaw"),c+=s.move(t.safe(i.url,ue({before:c,after:i.title?" ":")"},s.current())))),l(),i.title&&(l=t.enter(`title${o}`),c+=s.move(" "+n),c+=s.move(t.safe(i.title,ue({before:c,after:n},s.current()))),c+=s.move(n),l()),c+=s.move(")"),a(),c}function Ele(i,e,t){return XE(i,t)?"<":"["}ZE.peek=Tle;function ZE(i,e,t,r){let n=i.referenceType,o=t.enter("linkReference"),s=t.enter("label"),a=t.createTracker(r),l=a.move("["),c=t.containerPhrasing(i,ue({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let d=t.stack;t.stack=[],s=t.enter("reference");let u=t.safe(t.associationId(i),ue({before:l,after:"]"},a.current()));return s(),t.stack=d,o(),n==="full"||!c||c!==u?l+=a.move(u+"]"):n==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Tle(){return"["}function Of(i){let e=i.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function PH(i){let e=Of(i),t=i.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function OH(i){let e=i.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function qy(i){let e=i.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function FH(i,e,t,r){let n=t.enter("list"),o=t.bulletCurrent,s=i.ordered?OH(t):Of(t),a=i.ordered?s==="."?")":".":PH(t),l=e&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!i.ordered){let d=i.children?i.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),qy(t)===s&&d){let u=-1;for(;++u<i.children.length;){let h=i.children[u];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),t.bulletCurrent=s;let c=t.containerFlow(i,r);return t.bulletLastUsed=s,t.bulletCurrent=o,n(),c}function zH(i){let e=i.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function BH(i,e,t,r){let n=zH(t),o=t.bulletCurrent||Of(t);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+o);let s=o.length+1;(n==="tab"||n==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(s=Math.ceil(s/4)*4);let a=t.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),c=t.indentLines(t.containerFlow(i,a.current()),d);return l(),c;function d(u,h,f){return h?(f?"":" ".repeat(s))+u:(f?o:o+" ".repeat(s-o.length))+u}}function HH(i,e,t,r){let n=t.enter("paragraph"),o=t.enter("phrasing"),s=t.containerPhrasing(i,r);return o(),n(),s}var JE=Ea(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function UH(i,e,t,r){return(i.children.some(function(s){return JE(s)})?t.containerPhrasing:t.containerFlow).call(t,i,r)}function jH(i){let e=i.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}e5.peek=Ile;function e5(i,e,t,r){let n=jH(t),o=t.enter("strong"),s=t.createTracker(r),a=s.move(n+n);return a+=s.move(t.containerPhrasing(i,ue({before:a,after:n},s.current()))),a+=s.move(n+n),o(),a}function Ile(i,e,t){return t.options.strong||"*"}function WH(i,e,t,r){return t.safe(i.value,r)}function VH(i){let e=i.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function qH(i,e,t){let r=(qy(t)+(t.options.ruleSpaces?" ":"")).repeat(VH(t));return t.options.ruleSpaces?r.slice(0,-1):r}var Mg={blockquote:CH,break:VE,code:IH,definition:LH,emphasis:qE,hardBreak:VE,heading:RH,html:KE,image:$E,imageReference:GE,inlineCode:YE,link:QE,linkReference:ZE,list:FH,listItem:BH,paragraph:HH,root:UH,strong:e5,text:WH,thematicBreak:qH};function i5(){return{enter:{table:Lle,tableData:KH,tableHeader:KH,tableRow:Dle},exit:{codeText:Mle,table:Ale,tableData:t5,tableHeader:t5,tableRow:t5}}}function Lle(i){let e=i._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},i),this.data.inTable=!0}function Ale(i){this.exit(i),this.data.inTable=void 0}function Dle(i){this.enter({type:"tableRow",children:[]},i)}function t5(i){this.exit(i)}function KH(i){this.enter({type:"tableCell",children:[]},i)}function Mle(i){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Nle));let t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(i)}function Nle(i,e){return e==="|"?e:i}function r5(i){let e=i||{},t=e.tableCellPadding,r=e.tablePipeAlign,n=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:{inlineCode:h,table:s,tableCell:l,tableRow:a}};function s(f,m,g,w){return c(d(f,g,w),f.align)}function a(f,m,g,w){let _=u(f,g,w),E=c([_]);return E.slice(0,E.indexOf(` -`))}function l(f,m,g,w){let _=g.enter("tableCell"),E=g.enter("phrasing"),A=g.containerPhrasing(f,xt(ue({},w),{before:o,after:o}));return E(),_(),A}function c(f,m){return yH(f,{align:m,alignDelimiters:r,padding:t,stringLength:n})}function d(f,m,g){let w=f.children,_=-1,E=[],A=m.enter("table");for(;++_<w.length;)E[_]=u(w[_],m,g);return A(),E}function u(f,m,g){let w=f.children,_=-1,E=[],A=m.enter("tableRow");for(;++_<w.length;)E[_]=l(w[_],f,m,g);return A(),E}function h(f,m,g){let w=Mg.inlineCode(f,m,g);return g.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function r5(){return{exit:{taskListCheckValueChecked:KH,taskListCheckValueUnchecked:KH,paragraph:Rle}}}function n5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ple}}}function KH(i){let e=this.stack[this.stack.length-2];e.type,e.checked=i.type==="taskListCheckValueChecked"}function Rle(i){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let n=e.children,o=-1,s;for(;++o<n.length;){let a=n[o];if(a.type==="paragraph"){s=a;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(i)}function Ple(i,e,t,r){let n=i.children[0],o=typeof i.checked=="boolean"&&n&&n.type==="paragraph",s="["+(i.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(s);let l=Mg.listItem(i,e,t,ue(ue({},r),a.current()));return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+s}}function o5(){return[OE(),BE(),UE(),t5(),r5()]}function s5(i){return{extensions:[FE(),HE(),jE(),i5(i),n5()]}}function $H(i,e,t,r){let n=i.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}var GH={}.hasOwnProperty;function YH(i){let e={},t=-1;for(;++t<i.length;)Ole(e,i[t]);return e}function Ole(i,e){let t;for(t in e){let n=(GH.call(i,t)?i[t]:void 0)||(i[t]={}),o=e[t],s;if(o)for(s in o){GH.call(n,s)||(n[s]=[]);let a=o[s];Fle(n[s],Array.isArray(a)?a:a?[a]:[])}}}function Fle(i,e){let t=-1,r=[];for(;++t<e.length;)(e[t].add==="after"?i:r).push(e[t]);$H(i,0,0,r)}var zle=rd(new RegExp("\\p{P}","u")),Ff=rd(/[A-Za-z]/),Ky=rd(/[\dA-Za-z]/),UTe=rd(/[#-'*+\--9=?A-Z^-~]/);function XH(i){return i!==null&&(i<32||i===127)}var jTe=rd(/\d/),WTe=rd(/[\dA-Fa-f]/),Ble=rd(/[!-/:-@[-`{-~]/);function Lu(i){return i!==null&&(i<0||i===32)}function a5(i){return Ble(i)||zle(i)}var zf=rd(/\s/);function rd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}var Hle={tokenize:qle,partial:!0},QH={tokenize:Kle,partial:!0},ZH={tokenize:$le,partial:!0},JH={tokenize:Gle,partial:!0},Ule={tokenize:Yle,partial:!0},eU={tokenize:Wle,previous:iU},tU={tokenize:Vle,previous:rU},Al={tokenize:jle,previous:nU},Ta={};function c5(){return{text:Ta}}var Au=48;for(;Au<123;)Ta[Au]=Al,Au++,Au===58?Au=65:Au===91&&(Au=97);Ta[43]=Al;Ta[45]=Al;Ta[46]=Al;Ta[95]=Al;Ta[72]=[Al,tU];Ta[104]=[Al,tU];Ta[87]=[Al,eU];Ta[119]=[Al,eU];function jle(i,e,t){let r=this,n,o;return s;function s(u){return!l5(u)||!nU.call(r,r.previous)||d5(r.events)?t(u):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(u))}function a(u){return l5(u)?(i.consume(u),a):u===64?(i.consume(u),l):t(u)}function l(u){return u===46?i.check(Ule,d,c)(u):u===45||u===95||Ky(u)?(o=!0,i.consume(u),l):d(u)}function c(u){return i.consume(u),n=!0,l}function d(u){return o&&n&&Ff(r.previous)?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(u)):t(u)}}function Wle(i,e,t){let r=this;return n;function n(s){return s!==87&&s!==119||!iU.call(r,r.previous)||d5(r.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(Hle,i.attempt(QH,i.attempt(ZH,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function Vle(i,e,t){let r=this,n="",o=!1;return s;function s(u){return(u===72||u===104)&&rU.call(r,r.previous)&&!d5(r.events)?(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),n+=String.fromCodePoint(u),i.consume(u),a):t(u)}function a(u){if(Ff(u)&&n.length<5)return n+=String.fromCodePoint(u),i.consume(u),a;if(u===58){let h=n.toLowerCase();if(h==="http"||h==="https")return i.consume(u),l}return t(u)}function l(u){return u===47?(i.consume(u),o?c:(o=!0,l)):t(u)}function c(u){return u===null||XH(u)||Lu(u)||zf(u)||a5(u)?t(u):i.attempt(QH,i.attempt(ZH,d),t)(u)}function d(u){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(u)}}function qle(i,e,t){let r=0;return n;function n(s){return(s===87||s===119)&&r<3?(r++,i.consume(s),n):s===46&&r===3?(i.consume(s),o):t(s)}function o(s){return s===null?t(s):e(s)}}function Kle(i,e,t){let r,n,o;return s;function s(c){return c===46||c===95?i.check(JH,l,a)(c):c===null||Lu(c)||zf(c)||c!==45&&a5(c)?l(c):(o=!0,i.consume(c),s)}function a(c){return c===95?r=!0:(n=r,r=void 0),i.consume(c),s}function l(c){return n||r||!o?t(c):e(c)}}function $le(i,e){let t=0,r=0;return n;function n(s){return s===40?(t++,i.consume(s),n):s===41&&r<t?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?i.check(JH,e,o)(s):s===null||Lu(s)||zf(s)?e(s):(i.consume(s),n)}function o(s){return s===41&&r++,i.consume(s),n}}function Gle(i,e,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(i.consume(a),r):a===38?(i.consume(a),o):a===93?(i.consume(a),n):a===60||a===null||Lu(a)||zf(a)?e(a):t(a)}function n(a){return a===null||a===40||a===91||Lu(a)||zf(a)?e(a):r(a)}function o(a){return Ff(a)?s(a):t(a)}function s(a){return a===59?(i.consume(a),r):Ff(a)?(i.consume(a),s):t(a)}}function Yle(i,e,t){return r;function r(o){return i.consume(o),n}function n(o){return Ky(o)?t(o):e(o)}}function iU(i){return i===null||i===40||i===42||i===95||i===91||i===93||i===126||Lu(i)}function rU(i){return!Ff(i)}function nU(i){return!(i===47||l5(i))}function l5(i){return i===43||i===45||i===46||i===95||Ky(i)}function d5(i){let e=i.length,t=!1;for(;e--;){let r=i[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var YTe=nd(new RegExp("\\p{P}","u")),XTe=nd(/[A-Za-z]/),QTe=nd(/[\dA-Za-z]/),ZTe=nd(/[#-'*+\--9=?A-Z^-~]/);var JTe=nd(/\d/),eIe=nd(/[\dA-Fa-f]/),tIe=nd(/[!-/:-@[-`{-~]/);function oU(i){return i!==null&&i<-2}function Ng(i){return i!==null&&(i<0||i===32)}function Rg(i){return i===-2||i===-1||i===32}var iIe=nd(/\s/);function nd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Pg(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Rg(l)?(i.enter(t),a(l)):e(l)}function a(l){return Rg(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var u5={tokenize:Xle,partial:!0};function Xle(i,e,t){return r;function r(o){return Rg(o)?Pg(i,n,"linePrefix")(o):n(o)}function n(o){return o===null||oU(o)?e(o):t(o)}}function $y(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Qle={tokenize:nce,partial:!0};function h5(){return{document:{91:{tokenize:tce,continuation:{tokenize:ice},exit:rce}},text:{91:{tokenize:ece},93:{add:"after",tokenize:Zle,resolveTo:Jle}}}}function Zle(i,e,t){let r=this,n=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s;for(;n--;){let l=r.events[n][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=$y(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function Jle(i,e){let t=i.length,r;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){r=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let n={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",n,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",n,e]];return i.splice(t,i.length-t+1,...l),i}function ece(i,e,t){let r=this,n=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,s;return a;function a(u){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(i.enter("gfmFootnoteCallMarker"),i.consume(u),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(u){if(o>999||u===93&&!s||u===null||u===91||Ng(u))return t(u);if(u===93){i.exit("chunkString");let h=i.exit("gfmFootnoteCallString");return n.includes($y(r.sliceSerialize(h)))?(i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e):t(u)}return Ng(u)||(s=!0),o++,i.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(i.consume(u),o++,c):c(u)}}function tce(i,e,t){let r=this,n=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(m){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),i.enter("chunkString").contentType="string",d):t(m)}function d(m){if(s>999||m===93&&!a||m===null||m===91||Ng(m))return t(m);if(m===93){i.exit("chunkString");let g=i.exit("gfmFootnoteDefinitionLabelString");return o=$y(r.sliceSerialize(g)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),h}return Ng(m)||(a=!0),s++,i.consume(m),m===92?u:d}function u(m){return m===91||m===92||m===93?(i.consume(m),s++,d):d(m)}function h(m){return m===58?(i.enter("definitionMarker"),i.consume(m),i.exit("definitionMarker"),n.includes(o)||n.push(o),Pg(i,f,"gfmFootnoteDefinitionWhitespace")):t(m)}function f(m){return e(m)}}function ice(i,e,t){return i.check(u5,e,i.attempt(Qle,e,t))}function rce(i){i.exit("gfmFootnoteDefinition")}function nce(i,e,t){let r=this;return Pg(i,n,"gfmFootnoteDefinitionIndent",4+1);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function Gy(i,e,t,r){let n=i.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}var oce=od(new RegExp("\\p{P}","u")),yIe=od(/[A-Za-z]/),wIe=od(/[\dA-Za-z]/),xIe=od(/[#-'*+\--9=?A-Z^-~]/);var CIe=od(/\d/),SIe=od(/[\dA-Fa-f]/),sce=od(/[!-/:-@[-`{-~]/);function sU(i){return i!==null&&(i<0||i===32)}function aU(i){return sce(i)||oce(i)}var lU=od(/\s/);function od(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function f5(i){if(i===null||sU(i)||lU(i))return 1;if(aU(i))return 2}function cU(i,e,t){let r=[],n=-1;for(;++n<i.length;){let o=i[n].resolveAll;o&&!r.includes(o)&&(e=o(e,t),r.push(o))}return e}function p5(i){let t=(i||{}).singleTilde,r={tokenize:o,resolveAll:n};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function n(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},u={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},h=[["enter",d,a],["enter",s[c][1],a],["exit",s[c][1],a],["enter",u,a]],f=a.parser.constructs.insideSpan.null;f&&Gy(h,h.length,0,cU(f,s.slice(c+1,l),a)),Gy(h,h.length,0,[["exit",u,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",d,a]]),Gy(s,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){let c=this.previous,d=this.events,u=0;return h;function h(m){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),f(m))}function f(m){let g=f5(c);if(m===126)return u>1?l(m):(s.consume(m),u++,f);if(u<2&&!t)return l(m);let w=s.exit("strikethroughSequenceTemporary"),_=f5(m);return w._open=!_||_===2&&!!g,w._close=!g||g===2&&!!_,a(m)}}}var PIe=sd(new RegExp("\\p{P}","u")),OIe=sd(/[A-Za-z]/),FIe=sd(/[\dA-Za-z]/),zIe=sd(/[#-'*+\--9=?A-Z^-~]/);var BIe=sd(/\d/),HIe=sd(/[\dA-Fa-f]/),UIe=sd(/[!-/:-@[-`{-~]/);function Og(i){return i!==null&&i<-2}function m5(i){return i!==null&&(i<0||i===32)}function Dl(i){return i===-2||i===-1||i===32}var jIe=sd(/\s/);function sd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Bf(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Dl(l)?(i.enter(t),a(l)):e(l)}function a(l){return Dl(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var Yy=class{constructor(){this.map=[]}add(e,t,r){ace(this,e,t,r)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}};function ace(i,e,t,r){let n=0;if(!(t===0&&r.length===0)){for(;n<i.map.length;){if(i.map[n][0]===e){i.map[n][1]+=t,i.map[n][2].push(...r);return}n+=1}i.map.push([e,t,r])}}function dU(i,e){let t=!1,r=[];for(;e<i.length;){let n=i[e];if(t){if(n[0]==="enter")n[1].type==="tableContent"&&r.push(i[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(n[1].type==="tableContent"){if(i[e-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(n[1].type==="tableDelimiterRow")break}else n[0]==="enter"&&n[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return r}function g5(){return{flow:{null:{tokenize:lce,resolveAll:cce}}}}function lce(i,e,t){let r=this,n=0,o=0,s;return a;function a(Z){let ve=r.events.length-1;for(;ve>-1;){let Oe=r.events[ve][1].type;if(Oe==="lineEnding"||Oe==="linePrefix")ve--;else break}let Pe=ve>-1?r.events[ve][1].type:null,Ee=Pe==="tableHead"||Pe==="tableRow"?U:l;return Ee===U&&r.parser.lazy[r.now().line]?t(Z):Ee(Z)}function l(Z){return i.enter("tableHead"),i.enter("tableRow"),c(Z)}function c(Z){return Z===124||(s=!0,o+=1),d(Z)}function d(Z){return Z===null?t(Z):Og(Z)?o>1?(o=0,r.interrupt=!0,i.exit("tableRow"),i.enter("lineEnding"),i.consume(Z),i.exit("lineEnding"),f):t(Z):Dl(Z)?Bf(i,d,"whitespace")(Z):(o+=1,s&&(s=!1,n+=1),Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),s=!0,d):(i.enter("data"),u(Z)))}function u(Z){return Z===null||Z===124||m5(Z)?(i.exit("data"),d(Z)):(i.consume(Z),Z===92?h:u)}function h(Z){return Z===92||Z===124?(i.consume(Z),u):u(Z)}function f(Z){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(Z):(i.enter("tableDelimiterRow"),s=!1,Dl(Z)?Bf(i,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):m(Z))}function m(Z){return Z===45||Z===58?w(Z):Z===124?(s=!0,i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),g):O(Z)}function g(Z){return Dl(Z)?Bf(i,w,"whitespace")(Z):w(Z)}function w(Z){return Z===58?(o+=1,s=!0,i.enter("tableDelimiterMarker"),i.consume(Z),i.exit("tableDelimiterMarker"),_):Z===45?(o+=1,_(Z)):Z===null||Og(Z)?L(Z):O(Z)}function _(Z){return Z===45?(i.enter("tableDelimiterFiller"),E(Z)):O(Z)}function E(Z){return Z===45?(i.consume(Z),E):Z===58?(s=!0,i.exit("tableDelimiterFiller"),i.enter("tableDelimiterMarker"),i.consume(Z),i.exit("tableDelimiterMarker"),A):(i.exit("tableDelimiterFiller"),A(Z))}function A(Z){return Dl(Z)?Bf(i,L,"whitespace")(Z):L(Z)}function L(Z){return Z===124?m(Z):Z===null||Og(Z)?!s||n!==o?O(Z):(i.exit("tableDelimiterRow"),i.exit("tableHead"),e(Z)):O(Z)}function O(Z){return t(Z)}function U(Z){return i.enter("tableRow"),Y(Z)}function Y(Z){return Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),Y):Z===null||Og(Z)?(i.exit("tableRow"),e(Z)):Dl(Z)?Bf(i,Y,"whitespace")(Z):(i.enter("data"),oe(Z))}function oe(Z){return Z===null||Z===124||m5(Z)?(i.exit("data"),Y(Z)):(i.consume(Z),Z===92?te:oe)}function te(Z){return Z===92||Z===124?(i.consume(Z),oe):oe(Z)}}function cce(i,e){let t=-1,r=!0,n=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,d,u,h=new Yy;for(;++t<i.length;){let f=i[t],m=f[1];f[0]==="enter"?m.type==="tableHead"?(a=!1,l!==0&&(uU(h,e,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",c,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,u=void 0,o=[0,0,0,0],s=[0,t+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",d,e]])),n=m.type==="tableDelimiterRow"?2:d?3:1):n&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],u=Xy(h,e,o,n,void 0,u),o=[0,0,0,0]),s[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],u=Xy(h,e,o,n,void 0,u)),o=s,s=[o[1],t,0,0])):m.type==="tableHead"?(a=!0,l=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=t,o[1]!==0?(s[0]=s[1],u=Xy(h,e,o,n,t,u)):s[1]!==0&&(u=Xy(h,e,s,n,t,u)),n=0):n&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=t)}for(l!==0&&uU(h,e,l,c,d),h.consume(e.events),t=-1;++t<e.events.length;){let f=e.events[t];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=dU(e.events,t))}return i}function Xy(i,e,t,r,n,o){let s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Hf(e.events,t[0])),i.add(t[0],0,[["exit",o,e]]));let l=Hf(e.events,t[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},i.add(t[1],0,[["enter",o,e]]),t[2]!==0){let c=Hf(e.events,t[2]),d=Hf(e.events,t[3]),u={type:a,start:Object.assign({},c),end:Object.assign({},d)};if(i.add(t[2],0,[["enter",u,e]]),r!==2){let h=e.events[t[2]],f=e.events[t[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){let m=t[2]+1,g=t[3]-t[2]-1;i.add(m,g,[])}}i.add(t[3]+1,0,[["exit",u,e]])}return n!==void 0&&(o.end=Object.assign({},Hf(e.events,n)),i.add(n,0,[["exit",o,e]]),o=void 0),o}function uU(i,e,t,r,n){let o=[],s=Hf(e.events,t);n&&(n.end=Object.assign({},s),o.push(["exit",n,e])),r.end=Object.assign({},s),o.push(["exit",r,e]),i.add(t+1,0,o)}function Hf(i,e){let t=i[e],r=t[0]==="enter"?"start":"end";return t[1][r]}var tLe=ad(new RegExp("\\p{P}","u")),iLe=ad(/[A-Za-z]/),rLe=ad(/[\dA-Za-z]/),nLe=ad(/[#-'*+\--9=?A-Z^-~]/);var oLe=ad(/\d/),sLe=ad(/[\dA-Fa-f]/),aLe=ad(/[!-/:-@[-`{-~]/);function hU(i){return i!==null&&i<-2}function fU(i){return i!==null&&(i<0||i===32)}function Fg(i){return i===-2||i===-1||i===32}var lLe=ad(/\s/);function ad(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function pU(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Fg(l)?(i.enter(t),a(l)):e(l)}function a(l){return Fg(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var dce={tokenize:uce};function b5(){return{text:{91:dce}}}function uce(i,e,t){let r=this;return n;function n(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),o)}function o(l){return fU(l)?(i.enter("taskListCheckValueUnchecked"),i.consume(l),i.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(i.enter("taskListCheckValueChecked"),i.consume(l),i.exit("taskListCheckValueChecked"),s):t(l)}function s(l){return l===93?(i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),a):t(l)}function a(l){return hU(l)?e(l):Fg(l)?i.check({tokenize:hce},e,t)(l):t(l)}}function hce(i,e,t){return pU(i,r,"whitespace");function r(n){return n===null?t(n):e(n)}}function mU(i){return YH([c5(),h5(),p5(i),g5(),b5()])}var fce={};function Qy(i){let e=this,t=i||fce,r=e.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(mU(t)),o.push(o5()),s.push(s5(t))}function v5(){return{enter:{mathFlow:i,mathFlowFenceMeta:e,mathText:o},exit:{mathFlow:n,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:a,mathText:s,mathTextData:a}};function i(l){let c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function e(){this.buffer()}function t(){let l=this.resume(),c=this.stack[this.stack.length-1];c.type,c.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function n(l){let c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(l),d.value=c;let u=d.data.hChildren[0];u.type,u.tagName,u.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function s(l){let c=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(l),d.value=c,d.data.hChildren.push({type:"text",value:c})}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function _5(i){let e=(i||{}).singleDollarTextMath;return e==null&&(e=!0),r.peek=n,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`))}function l(f,m,g,w){let _=g.enter("tableCell"),E=g.enter("phrasing"),A=g.containerPhrasing(f,xt(ue({},w),{before:o,after:o}));return E(),_(),A}function c(f,m){return wH(f,{align:m,alignDelimiters:r,padding:t,stringLength:n})}function d(f,m,g){let w=f.children,_=-1,E=[],A=m.enter("table");for(;++_<w.length;)E[_]=u(w[_],m,g);return A(),E}function u(f,m,g){let w=f.children,_=-1,E=[],A=m.enter("tableRow");for(;++_<w.length;)E[_]=l(w[_],f,m,g);return A(),E}function h(f,m,g){let w=Mg.inlineCode(f,m,g);return g.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function n5(){return{exit:{taskListCheckValueChecked:$H,taskListCheckValueUnchecked:$H,paragraph:Rle}}}function o5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ple}}}function $H(i){let e=this.stack[this.stack.length-2];e.type,e.checked=i.type==="taskListCheckValueChecked"}function Rle(i){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let n=e.children,o=-1,s;for(;++o<n.length;){let a=n[o];if(a.type==="paragraph"){s=a;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(i)}function Ple(i,e,t,r){let n=i.children[0],o=typeof i.checked=="boolean"&&n&&n.type==="paragraph",s="["+(i.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(s);let l=Mg.listItem(i,e,t,ue(ue({},r),a.current()));return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+s}}function s5(){return[FE(),HE(),jE(),i5(),n5()]}function a5(i){return{extensions:[zE(),UE(),WE(),r5(i),o5()]}}function GH(i,e,t,r){let n=i.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}var YH={}.hasOwnProperty;function XH(i){let e={},t=-1;for(;++t<i.length;)Ole(e,i[t]);return e}function Ole(i,e){let t;for(t in e){let n=(YH.call(i,t)?i[t]:void 0)||(i[t]={}),o=e[t],s;if(o)for(s in o){YH.call(n,s)||(n[s]=[]);let a=o[s];Fle(n[s],Array.isArray(a)?a:a?[a]:[])}}}function Fle(i,e){let t=-1,r=[];for(;++t<e.length;)(e[t].add==="after"?i:r).push(e[t]);GH(i,0,0,r)}var zle=rd(new RegExp("\\p{P}","u")),Ff=rd(/[A-Za-z]/),Ky=rd(/[\dA-Za-z]/),UTe=rd(/[#-'*+\--9=?A-Z^-~]/);function QH(i){return i!==null&&(i<32||i===127)}var jTe=rd(/\d/),WTe=rd(/[\dA-Fa-f]/),Ble=rd(/[!-/:-@[-`{-~]/);function Lu(i){return i!==null&&(i<0||i===32)}function l5(i){return Ble(i)||zle(i)}var zf=rd(/\s/);function rd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}var Hle={tokenize:qle,partial:!0},ZH={tokenize:Kle,partial:!0},JH={tokenize:$le,partial:!0},eU={tokenize:Gle,partial:!0},Ule={tokenize:Yle,partial:!0},tU={tokenize:Wle,previous:rU},iU={tokenize:Vle,previous:nU},Al={tokenize:jle,previous:oU},Ta={};function d5(){return{text:Ta}}var Au=48;for(;Au<123;)Ta[Au]=Al,Au++,Au===58?Au=65:Au===91&&(Au=97);Ta[43]=Al;Ta[45]=Al;Ta[46]=Al;Ta[95]=Al;Ta[72]=[Al,iU];Ta[104]=[Al,iU];Ta[87]=[Al,tU];Ta[119]=[Al,tU];function jle(i,e,t){let r=this,n,o;return s;function s(u){return!c5(u)||!oU.call(r,r.previous)||u5(r.events)?t(u):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(u))}function a(u){return c5(u)?(i.consume(u),a):u===64?(i.consume(u),l):t(u)}function l(u){return u===46?i.check(Ule,d,c)(u):u===45||u===95||Ky(u)?(o=!0,i.consume(u),l):d(u)}function c(u){return i.consume(u),n=!0,l}function d(u){return o&&n&&Ff(r.previous)?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(u)):t(u)}}function Wle(i,e,t){let r=this;return n;function n(s){return s!==87&&s!==119||!rU.call(r,r.previous)||u5(r.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(Hle,i.attempt(ZH,i.attempt(JH,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function Vle(i,e,t){let r=this,n="",o=!1;return s;function s(u){return(u===72||u===104)&&nU.call(r,r.previous)&&!u5(r.events)?(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),n+=String.fromCodePoint(u),i.consume(u),a):t(u)}function a(u){if(Ff(u)&&n.length<5)return n+=String.fromCodePoint(u),i.consume(u),a;if(u===58){let h=n.toLowerCase();if(h==="http"||h==="https")return i.consume(u),l}return t(u)}function l(u){return u===47?(i.consume(u),o?c:(o=!0,l)):t(u)}function c(u){return u===null||QH(u)||Lu(u)||zf(u)||l5(u)?t(u):i.attempt(ZH,i.attempt(JH,d),t)(u)}function d(u){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(u)}}function qle(i,e,t){let r=0;return n;function n(s){return(s===87||s===119)&&r<3?(r++,i.consume(s),n):s===46&&r===3?(i.consume(s),o):t(s)}function o(s){return s===null?t(s):e(s)}}function Kle(i,e,t){let r,n,o;return s;function s(c){return c===46||c===95?i.check(eU,l,a)(c):c===null||Lu(c)||zf(c)||c!==45&&l5(c)?l(c):(o=!0,i.consume(c),s)}function a(c){return c===95?r=!0:(n=r,r=void 0),i.consume(c),s}function l(c){return n||r||!o?t(c):e(c)}}function $le(i,e){let t=0,r=0;return n;function n(s){return s===40?(t++,i.consume(s),n):s===41&&r<t?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?i.check(eU,e,o)(s):s===null||Lu(s)||zf(s)?e(s):(i.consume(s),n)}function o(s){return s===41&&r++,i.consume(s),n}}function Gle(i,e,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(i.consume(a),r):a===38?(i.consume(a),o):a===93?(i.consume(a),n):a===60||a===null||Lu(a)||zf(a)?e(a):t(a)}function n(a){return a===null||a===40||a===91||Lu(a)||zf(a)?e(a):r(a)}function o(a){return Ff(a)?s(a):t(a)}function s(a){return a===59?(i.consume(a),r):Ff(a)?(i.consume(a),s):t(a)}}function Yle(i,e,t){return r;function r(o){return i.consume(o),n}function n(o){return Ky(o)?t(o):e(o)}}function rU(i){return i===null||i===40||i===42||i===95||i===91||i===93||i===126||Lu(i)}function nU(i){return!Ff(i)}function oU(i){return!(i===47||c5(i))}function c5(i){return i===43||i===45||i===46||i===95||Ky(i)}function u5(i){let e=i.length,t=!1;for(;e--;){let r=i[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var YTe=nd(new RegExp("\\p{P}","u")),XTe=nd(/[A-Za-z]/),QTe=nd(/[\dA-Za-z]/),ZTe=nd(/[#-'*+\--9=?A-Z^-~]/);var JTe=nd(/\d/),eIe=nd(/[\dA-Fa-f]/),tIe=nd(/[!-/:-@[-`{-~]/);function sU(i){return i!==null&&i<-2}function Ng(i){return i!==null&&(i<0||i===32)}function Rg(i){return i===-2||i===-1||i===32}var iIe=nd(/\s/);function nd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Pg(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Rg(l)?(i.enter(t),a(l)):e(l)}function a(l){return Rg(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var h5={tokenize:Xle,partial:!0};function Xle(i,e,t){return r;function r(o){return Rg(o)?Pg(i,n,"linePrefix")(o):n(o)}function n(o){return o===null||sU(o)?e(o):t(o)}}function $y(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Qle={tokenize:nce,partial:!0};function f5(){return{document:{91:{tokenize:tce,continuation:{tokenize:ice},exit:rce}},text:{91:{tokenize:ece},93:{add:"after",tokenize:Zle,resolveTo:Jle}}}}function Zle(i,e,t){let r=this,n=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s;for(;n--;){let l=r.events[n][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=$y(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function Jle(i,e){let t=i.length,r;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){r=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let n={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",n,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",n,e]];return i.splice(t,i.length-t+1,...l),i}function ece(i,e,t){let r=this,n=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,s;return a;function a(u){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(i.enter("gfmFootnoteCallMarker"),i.consume(u),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(u){if(o>999||u===93&&!s||u===null||u===91||Ng(u))return t(u);if(u===93){i.exit("chunkString");let h=i.exit("gfmFootnoteCallString");return n.includes($y(r.sliceSerialize(h)))?(i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e):t(u)}return Ng(u)||(s=!0),o++,i.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(i.consume(u),o++,c):c(u)}}function tce(i,e,t){let r=this,n=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(m){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),i.enter("chunkString").contentType="string",d):t(m)}function d(m){if(s>999||m===93&&!a||m===null||m===91||Ng(m))return t(m);if(m===93){i.exit("chunkString");let g=i.exit("gfmFootnoteDefinitionLabelString");return o=$y(r.sliceSerialize(g)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),h}return Ng(m)||(a=!0),s++,i.consume(m),m===92?u:d}function u(m){return m===91||m===92||m===93?(i.consume(m),s++,d):d(m)}function h(m){return m===58?(i.enter("definitionMarker"),i.consume(m),i.exit("definitionMarker"),n.includes(o)||n.push(o),Pg(i,f,"gfmFootnoteDefinitionWhitespace")):t(m)}function f(m){return e(m)}}function ice(i,e,t){return i.check(h5,e,i.attempt(Qle,e,t))}function rce(i){i.exit("gfmFootnoteDefinition")}function nce(i,e,t){let r=this;return Pg(i,n,"gfmFootnoteDefinitionIndent",4+1);function n(o){let s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function Gy(i,e,t,r){let n=i.length,o=0,s;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),i.splice(...s);else for(t&&i.splice(e,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),i.splice(...s),o+=1e4,e+=1e4}var oce=od(new RegExp("\\p{P}","u")),yIe=od(/[A-Za-z]/),wIe=od(/[\dA-Za-z]/),xIe=od(/[#-'*+\--9=?A-Z^-~]/);var CIe=od(/\d/),SIe=od(/[\dA-Fa-f]/),sce=od(/[!-/:-@[-`{-~]/);function aU(i){return i!==null&&(i<0||i===32)}function lU(i){return sce(i)||oce(i)}var cU=od(/\s/);function od(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function p5(i){if(i===null||aU(i)||cU(i))return 1;if(lU(i))return 2}function dU(i,e,t){let r=[],n=-1;for(;++n<i.length;){let o=i[n].resolveAll;o&&!r.includes(o)&&(e=o(e,t),r.push(o))}return e}function m5(i){let t=(i||{}).singleTilde,r={tokenize:o,resolveAll:n};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function n(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},u={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},h=[["enter",d,a],["enter",s[c][1],a],["exit",s[c][1],a],["enter",u,a]],f=a.parser.constructs.insideSpan.null;f&&Gy(h,h.length,0,dU(f,s.slice(c+1,l),a)),Gy(h,h.length,0,[["exit",u,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",d,a]]),Gy(s,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){let c=this.previous,d=this.events,u=0;return h;function h(m){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),f(m))}function f(m){let g=p5(c);if(m===126)return u>1?l(m):(s.consume(m),u++,f);if(u<2&&!t)return l(m);let w=s.exit("strikethroughSequenceTemporary"),_=p5(m);return w._open=!_||_===2&&!!g,w._close=!g||g===2&&!!_,a(m)}}}var PIe=sd(new RegExp("\\p{P}","u")),OIe=sd(/[A-Za-z]/),FIe=sd(/[\dA-Za-z]/),zIe=sd(/[#-'*+\--9=?A-Z^-~]/);var BIe=sd(/\d/),HIe=sd(/[\dA-Fa-f]/),UIe=sd(/[!-/:-@[-`{-~]/);function Og(i){return i!==null&&i<-2}function g5(i){return i!==null&&(i<0||i===32)}function Dl(i){return i===-2||i===-1||i===32}var jIe=sd(/\s/);function sd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function Bf(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Dl(l)?(i.enter(t),a(l)):e(l)}function a(l){return Dl(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var Yy=class{constructor(){this.map=[]}add(e,t,r){ace(this,e,t,r)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}};function ace(i,e,t,r){let n=0;if(!(t===0&&r.length===0)){for(;n<i.map.length;){if(i.map[n][0]===e){i.map[n][1]+=t,i.map[n][2].push(...r);return}n+=1}i.map.push([e,t,r])}}function uU(i,e){let t=!1,r=[];for(;e<i.length;){let n=i[e];if(t){if(n[0]==="enter")n[1].type==="tableContent"&&r.push(i[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(n[1].type==="tableContent"){if(i[e-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(n[1].type==="tableDelimiterRow")break}else n[0]==="enter"&&n[1].type==="tableDelimiterRow"&&(t=!0);e+=1}return r}function b5(){return{flow:{null:{tokenize:lce,resolveAll:cce}}}}function lce(i,e,t){let r=this,n=0,o=0,s;return a;function a(Z){let ve=r.events.length-1;for(;ve>-1;){let Oe=r.events[ve][1].type;if(Oe==="lineEnding"||Oe==="linePrefix")ve--;else break}let Pe=ve>-1?r.events[ve][1].type:null,Ee=Pe==="tableHead"||Pe==="tableRow"?U:l;return Ee===U&&r.parser.lazy[r.now().line]?t(Z):Ee(Z)}function l(Z){return i.enter("tableHead"),i.enter("tableRow"),c(Z)}function c(Z){return Z===124||(s=!0,o+=1),d(Z)}function d(Z){return Z===null?t(Z):Og(Z)?o>1?(o=0,r.interrupt=!0,i.exit("tableRow"),i.enter("lineEnding"),i.consume(Z),i.exit("lineEnding"),f):t(Z):Dl(Z)?Bf(i,d,"whitespace")(Z):(o+=1,s&&(s=!1,n+=1),Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),s=!0,d):(i.enter("data"),u(Z)))}function u(Z){return Z===null||Z===124||g5(Z)?(i.exit("data"),d(Z)):(i.consume(Z),Z===92?h:u)}function h(Z){return Z===92||Z===124?(i.consume(Z),u):u(Z)}function f(Z){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(Z):(i.enter("tableDelimiterRow"),s=!1,Dl(Z)?Bf(i,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):m(Z))}function m(Z){return Z===45||Z===58?w(Z):Z===124?(s=!0,i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),g):O(Z)}function g(Z){return Dl(Z)?Bf(i,w,"whitespace")(Z):w(Z)}function w(Z){return Z===58?(o+=1,s=!0,i.enter("tableDelimiterMarker"),i.consume(Z),i.exit("tableDelimiterMarker"),_):Z===45?(o+=1,_(Z)):Z===null||Og(Z)?L(Z):O(Z)}function _(Z){return Z===45?(i.enter("tableDelimiterFiller"),E(Z)):O(Z)}function E(Z){return Z===45?(i.consume(Z),E):Z===58?(s=!0,i.exit("tableDelimiterFiller"),i.enter("tableDelimiterMarker"),i.consume(Z),i.exit("tableDelimiterMarker"),A):(i.exit("tableDelimiterFiller"),A(Z))}function A(Z){return Dl(Z)?Bf(i,L,"whitespace")(Z):L(Z)}function L(Z){return Z===124?m(Z):Z===null||Og(Z)?!s||n!==o?O(Z):(i.exit("tableDelimiterRow"),i.exit("tableHead"),e(Z)):O(Z)}function O(Z){return t(Z)}function U(Z){return i.enter("tableRow"),Y(Z)}function Y(Z){return Z===124?(i.enter("tableCellDivider"),i.consume(Z),i.exit("tableCellDivider"),Y):Z===null||Og(Z)?(i.exit("tableRow"),e(Z)):Dl(Z)?Bf(i,Y,"whitespace")(Z):(i.enter("data"),oe(Z))}function oe(Z){return Z===null||Z===124||g5(Z)?(i.exit("data"),Y(Z)):(i.consume(Z),Z===92?te:oe)}function te(Z){return Z===92||Z===124?(i.consume(Z),oe):oe(Z)}}function cce(i,e){let t=-1,r=!0,n=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,d,u,h=new Yy;for(;++t<i.length;){let f=i[t],m=f[1];f[0]==="enter"?m.type==="tableHead"?(a=!1,l!==0&&(hU(h,e,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",c,e]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,u=void 0,o=[0,0,0,0],s=[0,t+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(t,0,[["enter",d,e]])),n=m.type==="tableDelimiterRow"?2:d?3:1):n&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],u=Xy(h,e,o,n,void 0,u),o=[0,0,0,0]),s[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],u=Xy(h,e,o,n,void 0,u)),o=s,s=[o[1],t,0,0])):m.type==="tableHead"?(a=!0,l=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=t,o[1]!==0?(s[0]=s[1],u=Xy(h,e,o,n,t,u)):s[1]!==0&&(u=Xy(h,e,s,n,t,u)),n=0):n&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=t)}for(l!==0&&hU(h,e,l,c,d),h.consume(e.events),t=-1;++t<e.events.length;){let f=e.events[t];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=uU(e.events,t))}return i}function Xy(i,e,t,r,n,o){let s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Hf(e.events,t[0])),i.add(t[0],0,[["exit",o,e]]));let l=Hf(e.events,t[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},i.add(t[1],0,[["enter",o,e]]),t[2]!==0){let c=Hf(e.events,t[2]),d=Hf(e.events,t[3]),u={type:a,start:Object.assign({},c),end:Object.assign({},d)};if(i.add(t[2],0,[["enter",u,e]]),r!==2){let h=e.events[t[2]],f=e.events[t[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",t[3]>t[2]+1){let m=t[2]+1,g=t[3]-t[2]-1;i.add(m,g,[])}}i.add(t[3]+1,0,[["exit",u,e]])}return n!==void 0&&(o.end=Object.assign({},Hf(e.events,n)),i.add(n,0,[["exit",o,e]]),o=void 0),o}function hU(i,e,t,r,n){let o=[],s=Hf(e.events,t);n&&(n.end=Object.assign({},s),o.push(["exit",n,e])),r.end=Object.assign({},s),o.push(["exit",r,e]),i.add(t+1,0,o)}function Hf(i,e){let t=i[e],r=t[0]==="enter"?"start":"end";return t[1][r]}var tLe=ad(new RegExp("\\p{P}","u")),iLe=ad(/[A-Za-z]/),rLe=ad(/[\dA-Za-z]/),nLe=ad(/[#-'*+\--9=?A-Z^-~]/);var oLe=ad(/\d/),sLe=ad(/[\dA-Fa-f]/),aLe=ad(/[!-/:-@[-`{-~]/);function fU(i){return i!==null&&i<-2}function pU(i){return i!==null&&(i<0||i===32)}function Fg(i){return i===-2||i===-1||i===32}var lLe=ad(/\s/);function ad(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function mU(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Fg(l)?(i.enter(t),a(l)):e(l)}function a(l){return Fg(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var dce={tokenize:uce};function v5(){return{text:{91:dce}}}function uce(i,e,t){let r=this;return n;function n(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),o)}function o(l){return pU(l)?(i.enter("taskListCheckValueUnchecked"),i.consume(l),i.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(i.enter("taskListCheckValueChecked"),i.consume(l),i.exit("taskListCheckValueChecked"),s):t(l)}function s(l){return l===93?(i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),a):t(l)}function a(l){return fU(l)?e(l):Fg(l)?i.check({tokenize:hce},e,t)(l):t(l)}}function hce(i,e,t){return mU(i,r,"whitespace");function r(n){return n===null?t(n):e(n)}}function gU(i){return XH([d5(),f5(),m5(i),b5(),v5()])}var fce={};function Qy(i){let e=this,t=i||fce,r=e.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(gU(t)),o.push(s5()),s.push(a5(t))}function _5(){return{enter:{mathFlow:i,mathFlowFenceMeta:e,mathText:o},exit:{mathFlow:n,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:a,mathText:s,mathTextData:a}};function i(l){let c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function e(){this.buffer()}function t(){let l=this.resume(),c=this.stack[this.stack.length-1];c.type,c.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function n(l){let c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(l),d.value=c;let u=d.data.hChildren[0];u.type,u.tagName,u.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function s(l){let c=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(l),d.value=c,d.data.hChildren.push({type:"text",value:c})}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function y5(i){let e=(i||{}).singleDollarTextMath;return e==null&&(e=!0),r.peek=n,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,inConstruct:"mathFlowMeta"},{character:"$",after:e?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(o,s,a,l){let c=o.value||"",d=a.createTracker(l),u="$".repeat(Math.max(Vy(c,"$")+1,2)),h=a.enter("mathFlow"),f=d.move(u);if(o.meta){let m=a.enter("mathFlowMeta");f+=d.move(a.safe(o.meta,ue({after:` `,before:f,encode:["$"]},d.current()))),m()}return f+=d.move(` `),c&&(f+=d.move(c+` -`)),f+=d.move(u),h(),f}function r(o,s,a){let l=o.value||"",c=1;for(e||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;let d="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let u=-1;for(;++u<a.unsafe.length;){let h=a.unsafe[u];if(!h.atBreak)continue;let f=a.compilePattern(h),m;for(;m=f.exec(l);){let g=m.index;l.codePointAt(g)===10&&l.codePointAt(g-1)===13&&g--,l=l.slice(0,g)+" "+l.slice(m.index+1)}}return d+l+d}function n(){return"$"}}var HLe=ld(new RegExp("\\p{P}","u")),ULe=ld(/[A-Za-z]/),jLe=ld(/[\dA-Za-z]/),WLe=ld(/[#-'*+\--9=?A-Z^-~]/);var VLe=ld(/\d/),qLe=ld(/[\dA-Fa-f]/),KLe=ld(/[!-/:-@[-`{-~]/);function Ml(i){return i!==null&&i<-2}function y5(i){return i===-2||i===-1||i===32}var $Le=ld(/\s/);function ld(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function zg(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return y5(l)?(i.enter(t),a(l)):e(l)}function a(l){return y5(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var bU={tokenize:pce,concrete:!0},gU={tokenize:mce,partial:!0};function pce(i,e,t){let r=this,n=r.events[r.events.length-1],o=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,s=0;return a;function a(E){return i.enter("mathFlow"),i.enter("mathFlowFence"),i.enter("mathFlowFenceSequence"),l(E)}function l(E){return E===36?(i.consume(E),s++,l):s<2?t(E):(i.exit("mathFlowFenceSequence"),zg(i,c,"whitespace")(E))}function c(E){return E===null||Ml(E)?u(E):(i.enter("mathFlowFenceMeta"),i.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||Ml(E)?(i.exit("chunkString"),i.exit("mathFlowFenceMeta"),u(E)):E===36?t(E):(i.consume(E),d)}function u(E){return i.exit("mathFlowFence"),r.interrupt?e(E):i.attempt(gU,h,w)(E)}function h(E){return i.attempt({tokenize:_,partial:!0},w,f)(E)}function f(E){return(o?zg(i,m,"linePrefix",o+1):m)(E)}function m(E){return E===null?w(E):Ml(E)?i.attempt(gU,h,w)(E):(i.enter("mathFlowValue"),g(E))}function g(E){return E===null||Ml(E)?(i.exit("mathFlowValue"),m(E)):(i.consume(E),g)}function w(E){return i.exit("mathFlow"),e(E)}function _(E,A,L){let O=0;return zg(E,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function U(te){return E.enter("mathFlowFence"),E.enter("mathFlowFenceSequence"),Y(te)}function Y(te){return te===36?(O++,E.consume(te),Y):O<s?L(te):(E.exit("mathFlowFenceSequence"),zg(E,oe,"whitespace")(te))}function oe(te){return te===null||Ml(te)?(E.exit("mathFlowFence"),A(te)):L(te)}}}function mce(i,e,t){let r=this;return n;function n(s){return s===null?e(s):(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}function vU(i){let t=(i||{}).singleDollarTextMath;return t==null&&(t=!0),{tokenize:r,resolve:gce,previous:bce};function r(n,o,s){let a=this,l=0,c,d;return u;function u(w){return n.enter("mathText"),n.enter("mathTextSequence"),h(w)}function h(w){return w===36?(n.consume(w),l++,h):l<2&&!t?s(w):(n.exit("mathTextSequence"),f(w))}function f(w){return w===null?s(w):w===36?(d=n.enter("mathTextSequence"),c=0,g(w)):w===32?(n.enter("space"),n.consume(w),n.exit("space"),f):Ml(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),f):(n.enter("mathTextData"),m(w))}function m(w){return w===null||w===32||w===36||Ml(w)?(n.exit("mathTextData"),f(w)):(n.consume(w),m)}function g(w){return w===36?(n.consume(w),c++,g):c===l?(n.exit("mathTextSequence"),n.exit("mathText"),o(w)):(d.type="mathTextData",m(w))}}}function gce(i){let e=i.length-4,t=3,r,n;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(r=t;++r<e;)if(i[r][1].type==="mathTextData"){i[e][1].type="mathTextPadding",i[t][1].type="mathTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)n===void 0?r!==e&&i[r][1].type!=="lineEnding"&&(n=r):(r===e||i[r][1].type==="lineEnding")&&(i[n][1].type="mathTextData",r!==n+2&&(i[n][1].end=i[r-1][1].end,i.splice(n+2,r-n-2),e-=r-n-2,r=n+2),n=void 0);return i}function bce(i){return i!==36||this.events[this.events.length-1][1].type==="characterEscape"}function w5(i){return{flow:{36:bU},text:{36:vU(i)}}}var Oo=class i{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}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}},Da=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,Oo.range(this,e))}},Be=class i{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,n,o,s=t&&t.loc;if(s&&s.start<=s.end){var a=s.lexer.input;n=s.start,o=s.end,n===a.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ";var l=a.slice(n,o).replace(/[^]/g,"$&\u0332"),c;n>15?c="\u2026"+a.slice(n-15,n):c=a.slice(0,n);var d;o+15<a.length?d=a.slice(o,o+15)+"\u2026":d=a.slice(o),r+=c+l+d}var u=new Error(r);return u.name="ParseError",u.__proto__=i.prototype,u.position=n,n!=null&&o!=null&&(u.length=o-n),u.rawMessage=e,u}};Be.prototype.__proto__=Error.prototype;var vce=function(e,t){return e.indexOf(t)!==-1},_ce=function(e,t){return e===void 0?t:e},yce=/([A-Z])/g,wce=function(e){return e.replace(yce,"-$1").toLowerCase()},xce={"&":"&",">":">","<":"<",'"':""","'":"'"},Cce=/[&><"']/g;function Sce(i){return String(i).replace(Cce,e=>xce[e])}var XU=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},kce=function(e){var t=XU(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Ece=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Tce=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},Nt={contains:vce,deflt:_ce,escape:Sce,hyphenate:wce,getBaseElem:XU,isCharacterBox:kce,protocolFromUrl:Tce},cw={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 <type>"},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 <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 <def>",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 <size>",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 <n>",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 <n>",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function Ice(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 Wg=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 cw)if(cw.hasOwnProperty(t)){var r=cw[t];this[t]=e[t]!==void 0?r.processor?r.processor(e[t]):e[t]:Ice(r)}}reportNonstrict(e,t,r){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,r)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new Be("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),r);n==="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 '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,r){var n=this.strict;if(typeof n=="function")try{n=n(e,t,r)}catch(o){n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="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 '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){e.url&&!e.protocol&&(e.protocol=Nt.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}},Ia=class{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return La[Lce[this.id]]}sub(){return La[Ace[this.id]]}fracNum(){return La[Dce[this.id]]}fracDen(){return La[Mce[this.id]]}cramp(){return La[Nce[this.id]]}text(){return La[Rce[this.id]]}isTight(){return this.size>=2}},K5=0,uw=1,jf=2,Pl=3,Vg=4,ns=5,Wf=6,Qn=7,La=[new Ia(K5,0,!1),new Ia(uw,0,!0),new Ia(jf,1,!1),new Ia(Pl,1,!0),new Ia(Vg,2,!1),new Ia(ns,2,!0),new Ia(Wf,3,!1),new Ia(Qn,3,!0)],Lce=[Vg,ns,Vg,ns,Wf,Qn,Wf,Qn],Ace=[ns,ns,ns,ns,Qn,Qn,Qn,Qn],Dce=[jf,Pl,Vg,ns,Wf,Qn,Wf,Qn],Mce=[Pl,Pl,ns,ns,Qn,Qn,Qn,Qn],Nce=[uw,uw,Pl,Pl,ns,ns,Qn,Qn],Rce=[K5,uw,jf,Pl,jf,Pl,jf,Pl],St={DISPLAY:La[K5],TEXT:La[jf],SCRIPT:La[Vg],SCRIPTSCRIPT:La[Wf]},R5=[{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 Pce(i){for(var e=0;e<R5.length;e++)for(var t=R5[e],r=0;r<t.blocks.length;r++){var n=t.blocks[r];if(i>=n[0]&&i<=n[1])return t.name}return null}var dw=[];R5.forEach(i=>i.blocks.forEach(e=>dw.push(...e)));function QU(i){for(var e=0;e<dw.length;e+=2)if(i>=dw[e]&&i<=dw[e+1])return!0;return!1}var Uf=80,Oce=function(e,t){return"M95,"+(622+e+t)+` +`)),f+=d.move(u),h(),f}function r(o,s,a){let l=o.value||"",c=1;for(e||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;let d="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let u=-1;for(;++u<a.unsafe.length;){let h=a.unsafe[u];if(!h.atBreak)continue;let f=a.compilePattern(h),m;for(;m=f.exec(l);){let g=m.index;l.codePointAt(g)===10&&l.codePointAt(g-1)===13&&g--,l=l.slice(0,g)+" "+l.slice(m.index+1)}}return d+l+d}function n(){return"$"}}var HLe=ld(new RegExp("\\p{P}","u")),ULe=ld(/[A-Za-z]/),jLe=ld(/[\dA-Za-z]/),WLe=ld(/[#-'*+\--9=?A-Z^-~]/);var VLe=ld(/\d/),qLe=ld(/[\dA-Fa-f]/),KLe=ld(/[!-/:-@[-`{-~]/);function Ml(i){return i!==null&&i<-2}function w5(i){return i===-2||i===-1||i===32}var $Le=ld(/\s/);function ld(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function zg(i,e,t,r){let n=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return w5(l)?(i.enter(t),a(l)):e(l)}function a(l){return w5(l)&&o++<n?(i.consume(l),a):(i.exit(t),e(l))}}var vU={tokenize:pce,concrete:!0},bU={tokenize:mce,partial:!0};function pce(i,e,t){let r=this,n=r.events[r.events.length-1],o=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,s=0;return a;function a(E){return i.enter("mathFlow"),i.enter("mathFlowFence"),i.enter("mathFlowFenceSequence"),l(E)}function l(E){return E===36?(i.consume(E),s++,l):s<2?t(E):(i.exit("mathFlowFenceSequence"),zg(i,c,"whitespace")(E))}function c(E){return E===null||Ml(E)?u(E):(i.enter("mathFlowFenceMeta"),i.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||Ml(E)?(i.exit("chunkString"),i.exit("mathFlowFenceMeta"),u(E)):E===36?t(E):(i.consume(E),d)}function u(E){return i.exit("mathFlowFence"),r.interrupt?e(E):i.attempt(bU,h,w)(E)}function h(E){return i.attempt({tokenize:_,partial:!0},w,f)(E)}function f(E){return(o?zg(i,m,"linePrefix",o+1):m)(E)}function m(E){return E===null?w(E):Ml(E)?i.attempt(bU,h,w)(E):(i.enter("mathFlowValue"),g(E))}function g(E){return E===null||Ml(E)?(i.exit("mathFlowValue"),m(E)):(i.consume(E),g)}function w(E){return i.exit("mathFlow"),e(E)}function _(E,A,L){let O=0;return zg(E,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function U(te){return E.enter("mathFlowFence"),E.enter("mathFlowFenceSequence"),Y(te)}function Y(te){return te===36?(O++,E.consume(te),Y):O<s?L(te):(E.exit("mathFlowFenceSequence"),zg(E,oe,"whitespace")(te))}function oe(te){return te===null||Ml(te)?(E.exit("mathFlowFence"),A(te)):L(te)}}}function mce(i,e,t){let r=this;return n;function n(s){return s===null?e(s):(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}function _U(i){let t=(i||{}).singleDollarTextMath;return t==null&&(t=!0),{tokenize:r,resolve:gce,previous:bce};function r(n,o,s){let a=this,l=0,c,d;return u;function u(w){return n.enter("mathText"),n.enter("mathTextSequence"),h(w)}function h(w){return w===36?(n.consume(w),l++,h):l<2&&!t?s(w):(n.exit("mathTextSequence"),f(w))}function f(w){return w===null?s(w):w===36?(d=n.enter("mathTextSequence"),c=0,g(w)):w===32?(n.enter("space"),n.consume(w),n.exit("space"),f):Ml(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),f):(n.enter("mathTextData"),m(w))}function m(w){return w===null||w===32||w===36||Ml(w)?(n.exit("mathTextData"),f(w)):(n.consume(w),m)}function g(w){return w===36?(n.consume(w),c++,g):c===l?(n.exit("mathTextSequence"),n.exit("mathText"),o(w)):(d.type="mathTextData",m(w))}}}function gce(i){let e=i.length-4,t=3,r,n;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(r=t;++r<e;)if(i[r][1].type==="mathTextData"){i[e][1].type="mathTextPadding",i[t][1].type="mathTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)n===void 0?r!==e&&i[r][1].type!=="lineEnding"&&(n=r):(r===e||i[r][1].type==="lineEnding")&&(i[n][1].type="mathTextData",r!==n+2&&(i[n][1].end=i[r-1][1].end,i.splice(n+2,r-n-2),e-=r-n-2,r=n+2),n=void 0);return i}function bce(i){return i!==36||this.events[this.events.length-1][1].type==="characterEscape"}function x5(i){return{flow:{36:vU},text:{36:_U(i)}}}var Oo=class i{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}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}},Da=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,Oo.range(this,e))}},Be=class i{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,n,o,s=t&&t.loc;if(s&&s.start<=s.end){var a=s.lexer.input;n=s.start,o=s.end,n===a.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ";var l=a.slice(n,o).replace(/[^]/g,"$&\u0332"),c;n>15?c="\u2026"+a.slice(n-15,n):c=a.slice(0,n);var d;o+15<a.length?d=a.slice(o,o+15)+"\u2026":d=a.slice(o),r+=c+l+d}var u=new Error(r);return u.name="ParseError",u.__proto__=i.prototype,u.position=n,n!=null&&o!=null&&(u.length=o-n),u.rawMessage=e,u}};Be.prototype.__proto__=Error.prototype;var vce=function(e,t){return e.indexOf(t)!==-1},_ce=function(e,t){return e===void 0?t:e},yce=/([A-Z])/g,wce=function(e){return e.replace(yce,"-$1").toLowerCase()},xce={"&":"&",">":">","<":"<",'"':""","'":"'"},Cce=/[&><"']/g;function Sce(i){return String(i).replace(Cce,e=>xce[e])}var QU=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},kce=function(e){var t=QU(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},Ece=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Tce=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return t!=null?t[1]:"_relative"},Nt={contains:vce,deflt:_ce,escape:Sce,hyphenate:wce,getBaseElem:QU,isCharacterBox:kce,protocolFromUrl:Tce},cw={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 <type>"},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 <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 <def>",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 <size>",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 <n>",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 <n>",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function Ice(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 Wg=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 cw)if(cw.hasOwnProperty(t)){var r=cw[t];this[t]=e[t]!==void 0?r.processor?r.processor(e[t]):e[t]:Ice(r)}}reportNonstrict(e,t,r){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,r)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new Be("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),r);n==="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 '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,r){var n=this.strict;if(typeof n=="function")try{n=n(e,t,r)}catch(o){n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="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 '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){e.url&&!e.protocol&&(e.protocol=Nt.protocolFromUrl(e.url));var t=typeof this.trust=="function"?this.trust(e):this.trust;return!!t}},Ia=class{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return La[Lce[this.id]]}sub(){return La[Ace[this.id]]}fracNum(){return La[Dce[this.id]]}fracDen(){return La[Mce[this.id]]}cramp(){return La[Nce[this.id]]}text(){return La[Rce[this.id]]}isTight(){return this.size>=2}},$5=0,uw=1,jf=2,Pl=3,Vg=4,ns=5,Wf=6,Qn=7,La=[new Ia($5,0,!1),new Ia(uw,0,!0),new Ia(jf,1,!1),new Ia(Pl,1,!0),new Ia(Vg,2,!1),new Ia(ns,2,!0),new Ia(Wf,3,!1),new Ia(Qn,3,!0)],Lce=[Vg,ns,Vg,ns,Wf,Qn,Wf,Qn],Ace=[ns,ns,ns,ns,Qn,Qn,Qn,Qn],Dce=[jf,Pl,Vg,ns,Wf,Qn,Wf,Qn],Mce=[Pl,Pl,ns,ns,Qn,Qn,Qn,Qn],Nce=[uw,uw,Pl,Pl,ns,ns,Qn,Qn],Rce=[$5,uw,jf,Pl,jf,Pl,jf,Pl],St={DISPLAY:La[$5],TEXT:La[jf],SCRIPT:La[Vg],SCRIPTSCRIPT:La[Wf]},P5=[{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 Pce(i){for(var e=0;e<P5.length;e++)for(var t=P5[e],r=0;r<t.blocks.length;r++){var n=t.blocks[r];if(i>=n[0]&&i<=n[1])return t.name}return null}var dw=[];P5.forEach(i=>i.blocks.forEach(e=>dw.push(...e)));function ZU(i){for(var e=0;e<dw.length;e+=2)if(i>=dw[e]&&i<=dw[e+1])return!0;return!1}var Uf=80,Oce=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 @@ -234,7 +234,7 @@ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,1 H742v`+n+`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"},Wce=function(e,t,r){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Oce(t,Uf);break;case"sqrtSize1":n=Fce(t,Uf);break;case"sqrtSize2":n=zce(t,Uf);break;case"sqrtSize3":n=Bce(t,Uf);break;case"sqrtSize4":n=Hce(t,Uf);break;case"sqrtTall":n=jce(t,Uf,r)}return n},Vce=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""}},_U={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},Wce=function(e,t,r){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Oce(t,Uf);break;case"sqrtSize1":n=Fce(t,Uf);break;case"sqrtSize2":n=zce(t,Uf);break;case"sqrtSize3":n=Bce(t,Uf);break;case"sqrtSize4":n=Hce(t,Uf);break;case"sqrtTall":n=jce(t,Uf,r)}return n},Vce=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""}},yU={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 @@ -437,25 +437,25 @@ 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.")}},Nu=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 Nt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=t=>t.toText();return this.children.map(e).join("")}},Aa={"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]}},Zy={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]},yU={\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 Kce(i,e){Aa[i]=e}function $5(i,e,t){if(!Aa[e])throw new Error("Font metrics not found for font: "+e+".");var r=i.charCodeAt(0),n=Aa[e][r];if(!n&&i[0]in yU&&(r=yU[i[0]].charCodeAt(0),n=Aa[e][r]),!n&&t==="text"&&QU(r)&&(n=Aa[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var x5={};function $ce(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!x5[e]){var t=x5[e]={cssEmPerMu:Zy.quad[e]/18};for(var r in Zy)Zy.hasOwnProperty(r)&&(t[r]=Zy[r][e])}return x5[e]}var Gce=[[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]],wU=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],xU=function(e,t){return t.size<2?e:Gce[e-1][t.size-1]},hw=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=wU[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 r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new i(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:xU(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:wU[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=xU(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=$ce(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};hw.BASESIZE=6;var P5={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},Yce={ex:!0,em:!0,mu:!0},ZU=function(e){return typeof e!="string"&&(e=e.unit),e in P5||e in Yce||e==="ex"},dr=function(e,t){var r;if(e.unit in P5)r=P5[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")r=n.fontMetrics().xHeight;else if(e.unit==="em")r=n.fontMetrics().quad;else throw new Be("Invalid unit: '"+e.unit+"'");n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},$e=function(e){return+e.toFixed(4)+"em"},ud=function(e){return e.filter(t=>t).join(" ")},JU=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},ej=function(e){var t=document.createElement(e);t.className=ud(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},tj=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Nt.escape(ud(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Nt.hyphenate(n)+":"+this.style[n]+";");r&&(t+=' style="'+Nt.escape(r)+'"');for(var o in this.attributes)this.attributes.hasOwnProperty(o)&&(t+=" "+o+'="'+Nt.escape(this.attributes[o])+'"');t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t},Ru=class{constructor(e,t,r,n){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,JU.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Nt.contains(this.classes,e)}toNode(){return ej.call(this,"span")}toMarkup(){return tj.call(this,"span")}},qg=class{constructor(e,t,r,n){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,JU.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Nt.contains(this.classes,e)}toNode(){return ej.call(this,"a")}toMarkup(){return tj.call(this,"a")}},O5=class{constructor(e,t,r){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=r}hasClass(e){return Nt.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="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=Nt.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+Nt.escape(t)+'"'),e+="'/>",e}},Xce={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},ho=class{constructor(e,t,r,n,o,s,a,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=o||0,this.width=s||0,this.classes=a||[],this.style=l||{},this.maxFontSize=0;var c=Pce(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Xce[this.text])}hasClass(e){return Nt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=$e(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=ud(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(t=t||document.createElement("span"),t.style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Nt.escape(ud(this.classes)),t+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Nt.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+Nt.escape(r)+'"');var o=Nt.escape(this.text);return e?(t+=">",t+=o,t+="</span>",t):o}},Ps=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 r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}},Ma=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",_U[this.pathName]),t}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+_U[this.pathName]+"'/>"}},Kg=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 r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>",e}};function CU(i){if(i instanceof ho)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function Qce(i){if(i instanceof Ru)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var Zce={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Jce={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},$i={math:{},text:{}};function x(i,e,t,r,n,o){$i[i][n]={font:e,group:t,replace:r},o&&r&&($i[i][r]=$i[i][n])}var T="math",Ae="text",D="main",q="ams",tr="accent-token",ot="bin",Zn="close",Vf="inner",Ct="mathord",Dr="op-token",Fo="open",_w="punct",K="rel",Bl="spacing",J="textord";x(T,D,K,"\u2261","\\equiv",!0);x(T,D,K,"\u227A","\\prec",!0);x(T,D,K,"\u227B","\\succ",!0);x(T,D,K,"\u223C","\\sim",!0);x(T,D,K,"\u22A5","\\perp");x(T,D,K,"\u2AAF","\\preceq",!0);x(T,D,K,"\u2AB0","\\succeq",!0);x(T,D,K,"\u2243","\\simeq",!0);x(T,D,K,"\u2223","\\mid",!0);x(T,D,K,"\u226A","\\ll",!0);x(T,D,K,"\u226B","\\gg",!0);x(T,D,K,"\u224D","\\asymp",!0);x(T,D,K,"\u2225","\\parallel");x(T,D,K,"\u22C8","\\bowtie",!0);x(T,D,K,"\u2323","\\smile",!0);x(T,D,K,"\u2291","\\sqsubseteq",!0);x(T,D,K,"\u2292","\\sqsupseteq",!0);x(T,D,K,"\u2250","\\doteq",!0);x(T,D,K,"\u2322","\\frown",!0);x(T,D,K,"\u220B","\\ni",!0);x(T,D,K,"\u221D","\\propto",!0);x(T,D,K,"\u22A2","\\vdash",!0);x(T,D,K,"\u22A3","\\dashv",!0);x(T,D,K,"\u220B","\\owns");x(T,D,_w,".","\\ldotp");x(T,D,_w,"\u22C5","\\cdotp");x(T,D,J,"#","\\#");x(Ae,D,J,"#","\\#");x(T,D,J,"&","\\&");x(Ae,D,J,"&","\\&");x(T,D,J,"\u2135","\\aleph",!0);x(T,D,J,"\u2200","\\forall",!0);x(T,D,J,"\u210F","\\hbar",!0);x(T,D,J,"\u2203","\\exists",!0);x(T,D,J,"\u2207","\\nabla",!0);x(T,D,J,"\u266D","\\flat",!0);x(T,D,J,"\u2113","\\ell",!0);x(T,D,J,"\u266E","\\natural",!0);x(T,D,J,"\u2663","\\clubsuit",!0);x(T,D,J,"\u2118","\\wp",!0);x(T,D,J,"\u266F","\\sharp",!0);x(T,D,J,"\u2662","\\diamondsuit",!0);x(T,D,J,"\u211C","\\Re",!0);x(T,D,J,"\u2661","\\heartsuit",!0);x(T,D,J,"\u2111","\\Im",!0);x(T,D,J,"\u2660","\\spadesuit",!0);x(T,D,J,"\xA7","\\S",!0);x(Ae,D,J,"\xA7","\\S");x(T,D,J,"\xB6","\\P",!0);x(Ae,D,J,"\xB6","\\P");x(T,D,J,"\u2020","\\dag");x(Ae,D,J,"\u2020","\\dag");x(Ae,D,J,"\u2020","\\textdagger");x(T,D,J,"\u2021","\\ddag");x(Ae,D,J,"\u2021","\\ddag");x(Ae,D,J,"\u2021","\\textdaggerdbl");x(T,D,Zn,"\u23B1","\\rmoustache",!0);x(T,D,Fo,"\u23B0","\\lmoustache",!0);x(T,D,Zn,"\u27EF","\\rgroup",!0);x(T,D,Fo,"\u27EE","\\lgroup",!0);x(T,D,ot,"\u2213","\\mp",!0);x(T,D,ot,"\u2296","\\ominus",!0);x(T,D,ot,"\u228E","\\uplus",!0);x(T,D,ot,"\u2293","\\sqcap",!0);x(T,D,ot,"\u2217","\\ast");x(T,D,ot,"\u2294","\\sqcup",!0);x(T,D,ot,"\u25EF","\\bigcirc",!0);x(T,D,ot,"\u2219","\\bullet",!0);x(T,D,ot,"\u2021","\\ddagger");x(T,D,ot,"\u2240","\\wr",!0);x(T,D,ot,"\u2A3F","\\amalg");x(T,D,ot,"&","\\And");x(T,D,K,"\u27F5","\\longleftarrow",!0);x(T,D,K,"\u21D0","\\Leftarrow",!0);x(T,D,K,"\u27F8","\\Longleftarrow",!0);x(T,D,K,"\u27F6","\\longrightarrow",!0);x(T,D,K,"\u21D2","\\Rightarrow",!0);x(T,D,K,"\u27F9","\\Longrightarrow",!0);x(T,D,K,"\u2194","\\leftrightarrow",!0);x(T,D,K,"\u27F7","\\longleftrightarrow",!0);x(T,D,K,"\u21D4","\\Leftrightarrow",!0);x(T,D,K,"\u27FA","\\Longleftrightarrow",!0);x(T,D,K,"\u21A6","\\mapsto",!0);x(T,D,K,"\u27FC","\\longmapsto",!0);x(T,D,K,"\u2197","\\nearrow",!0);x(T,D,K,"\u21A9","\\hookleftarrow",!0);x(T,D,K,"\u21AA","\\hookrightarrow",!0);x(T,D,K,"\u2198","\\searrow",!0);x(T,D,K,"\u21BC","\\leftharpoonup",!0);x(T,D,K,"\u21C0","\\rightharpoonup",!0);x(T,D,K,"\u2199","\\swarrow",!0);x(T,D,K,"\u21BD","\\leftharpoondown",!0);x(T,D,K,"\u21C1","\\rightharpoondown",!0);x(T,D,K,"\u2196","\\nwarrow",!0);x(T,D,K,"\u21CC","\\rightleftharpoons",!0);x(T,q,K,"\u226E","\\nless",!0);x(T,q,K,"\uE010","\\@nleqslant");x(T,q,K,"\uE011","\\@nleqq");x(T,q,K,"\u2A87","\\lneq",!0);x(T,q,K,"\u2268","\\lneqq",!0);x(T,q,K,"\uE00C","\\@lvertneqq");x(T,q,K,"\u22E6","\\lnsim",!0);x(T,q,K,"\u2A89","\\lnapprox",!0);x(T,q,K,"\u2280","\\nprec",!0);x(T,q,K,"\u22E0","\\npreceq",!0);x(T,q,K,"\u22E8","\\precnsim",!0);x(T,q,K,"\u2AB9","\\precnapprox",!0);x(T,q,K,"\u2241","\\nsim",!0);x(T,q,K,"\uE006","\\@nshortmid");x(T,q,K,"\u2224","\\nmid",!0);x(T,q,K,"\u22AC","\\nvdash",!0);x(T,q,K,"\u22AD","\\nvDash",!0);x(T,q,K,"\u22EA","\\ntriangleleft");x(T,q,K,"\u22EC","\\ntrianglelefteq",!0);x(T,q,K,"\u228A","\\subsetneq",!0);x(T,q,K,"\uE01A","\\@varsubsetneq");x(T,q,K,"\u2ACB","\\subsetneqq",!0);x(T,q,K,"\uE017","\\@varsubsetneqq");x(T,q,K,"\u226F","\\ngtr",!0);x(T,q,K,"\uE00F","\\@ngeqslant");x(T,q,K,"\uE00E","\\@ngeqq");x(T,q,K,"\u2A88","\\gneq",!0);x(T,q,K,"\u2269","\\gneqq",!0);x(T,q,K,"\uE00D","\\@gvertneqq");x(T,q,K,"\u22E7","\\gnsim",!0);x(T,q,K,"\u2A8A","\\gnapprox",!0);x(T,q,K,"\u2281","\\nsucc",!0);x(T,q,K,"\u22E1","\\nsucceq",!0);x(T,q,K,"\u22E9","\\succnsim",!0);x(T,q,K,"\u2ABA","\\succnapprox",!0);x(T,q,K,"\u2246","\\ncong",!0);x(T,q,K,"\uE007","\\@nshortparallel");x(T,q,K,"\u2226","\\nparallel",!0);x(T,q,K,"\u22AF","\\nVDash",!0);x(T,q,K,"\u22EB","\\ntriangleright");x(T,q,K,"\u22ED","\\ntrianglerighteq",!0);x(T,q,K,"\uE018","\\@nsupseteqq");x(T,q,K,"\u228B","\\supsetneq",!0);x(T,q,K,"\uE01B","\\@varsupsetneq");x(T,q,K,"\u2ACC","\\supsetneqq",!0);x(T,q,K,"\uE019","\\@varsupsetneqq");x(T,q,K,"\u22AE","\\nVdash",!0);x(T,q,K,"\u2AB5","\\precneqq",!0);x(T,q,K,"\u2AB6","\\succneqq",!0);x(T,q,K,"\uE016","\\@nsubseteqq");x(T,q,ot,"\u22B4","\\unlhd");x(T,q,ot,"\u22B5","\\unrhd");x(T,q,K,"\u219A","\\nleftarrow",!0);x(T,q,K,"\u219B","\\nrightarrow",!0);x(T,q,K,"\u21CD","\\nLeftarrow",!0);x(T,q,K,"\u21CF","\\nRightarrow",!0);x(T,q,K,"\u21AE","\\nleftrightarrow",!0);x(T,q,K,"\u21CE","\\nLeftrightarrow",!0);x(T,q,K,"\u25B3","\\vartriangle");x(T,q,J,"\u210F","\\hslash");x(T,q,J,"\u25BD","\\triangledown");x(T,q,J,"\u25CA","\\lozenge");x(T,q,J,"\u24C8","\\circledS");x(T,q,J,"\xAE","\\circledR");x(Ae,q,J,"\xAE","\\circledR");x(T,q,J,"\u2221","\\measuredangle",!0);x(T,q,J,"\u2204","\\nexists");x(T,q,J,"\u2127","\\mho");x(T,q,J,"\u2132","\\Finv",!0);x(T,q,J,"\u2141","\\Game",!0);x(T,q,J,"\u2035","\\backprime");x(T,q,J,"\u25B2","\\blacktriangle");x(T,q,J,"\u25BC","\\blacktriangledown");x(T,q,J,"\u25A0","\\blacksquare");x(T,q,J,"\u29EB","\\blacklozenge");x(T,q,J,"\u2605","\\bigstar");x(T,q,J,"\u2222","\\sphericalangle",!0);x(T,q,J,"\u2201","\\complement",!0);x(T,q,J,"\xF0","\\eth",!0);x(Ae,D,J,"\xF0","\xF0");x(T,q,J,"\u2571","\\diagup");x(T,q,J,"\u2572","\\diagdown");x(T,q,J,"\u25A1","\\square");x(T,q,J,"\u25A1","\\Box");x(T,q,J,"\u25CA","\\Diamond");x(T,q,J,"\xA5","\\yen",!0);x(Ae,q,J,"\xA5","\\yen",!0);x(T,q,J,"\u2713","\\checkmark",!0);x(Ae,q,J,"\u2713","\\checkmark");x(T,q,J,"\u2136","\\beth",!0);x(T,q,J,"\u2138","\\daleth",!0);x(T,q,J,"\u2137","\\gimel",!0);x(T,q,J,"\u03DD","\\digamma",!0);x(T,q,J,"\u03F0","\\varkappa");x(T,q,Fo,"\u250C","\\@ulcorner",!0);x(T,q,Zn,"\u2510","\\@urcorner",!0);x(T,q,Fo,"\u2514","\\@llcorner",!0);x(T,q,Zn,"\u2518","\\@lrcorner",!0);x(T,q,K,"\u2266","\\leqq",!0);x(T,q,K,"\u2A7D","\\leqslant",!0);x(T,q,K,"\u2A95","\\eqslantless",!0);x(T,q,K,"\u2272","\\lesssim",!0);x(T,q,K,"\u2A85","\\lessapprox",!0);x(T,q,K,"\u224A","\\approxeq",!0);x(T,q,ot,"\u22D6","\\lessdot");x(T,q,K,"\u22D8","\\lll",!0);x(T,q,K,"\u2276","\\lessgtr",!0);x(T,q,K,"\u22DA","\\lesseqgtr",!0);x(T,q,K,"\u2A8B","\\lesseqqgtr",!0);x(T,q,K,"\u2251","\\doteqdot");x(T,q,K,"\u2253","\\risingdotseq",!0);x(T,q,K,"\u2252","\\fallingdotseq",!0);x(T,q,K,"\u223D","\\backsim",!0);x(T,q,K,"\u22CD","\\backsimeq",!0);x(T,q,K,"\u2AC5","\\subseteqq",!0);x(T,q,K,"\u22D0","\\Subset",!0);x(T,q,K,"\u228F","\\sqsubset",!0);x(T,q,K,"\u227C","\\preccurlyeq",!0);x(T,q,K,"\u22DE","\\curlyeqprec",!0);x(T,q,K,"\u227E","\\precsim",!0);x(T,q,K,"\u2AB7","\\precapprox",!0);x(T,q,K,"\u22B2","\\vartriangleleft");x(T,q,K,"\u22B4","\\trianglelefteq");x(T,q,K,"\u22A8","\\vDash",!0);x(T,q,K,"\u22AA","\\Vvdash",!0);x(T,q,K,"\u2323","\\smallsmile");x(T,q,K,"\u2322","\\smallfrown");x(T,q,K,"\u224F","\\bumpeq",!0);x(T,q,K,"\u224E","\\Bumpeq",!0);x(T,q,K,"\u2267","\\geqq",!0);x(T,q,K,"\u2A7E","\\geqslant",!0);x(T,q,K,"\u2A96","\\eqslantgtr",!0);x(T,q,K,"\u2273","\\gtrsim",!0);x(T,q,K,"\u2A86","\\gtrapprox",!0);x(T,q,ot,"\u22D7","\\gtrdot");x(T,q,K,"\u22D9","\\ggg",!0);x(T,q,K,"\u2277","\\gtrless",!0);x(T,q,K,"\u22DB","\\gtreqless",!0);x(T,q,K,"\u2A8C","\\gtreqqless",!0);x(T,q,K,"\u2256","\\eqcirc",!0);x(T,q,K,"\u2257","\\circeq",!0);x(T,q,K,"\u225C","\\triangleq",!0);x(T,q,K,"\u223C","\\thicksim");x(T,q,K,"\u2248","\\thickapprox");x(T,q,K,"\u2AC6","\\supseteqq",!0);x(T,q,K,"\u22D1","\\Supset",!0);x(T,q,K,"\u2290","\\sqsupset",!0);x(T,q,K,"\u227D","\\succcurlyeq",!0);x(T,q,K,"\u22DF","\\curlyeqsucc",!0);x(T,q,K,"\u227F","\\succsim",!0);x(T,q,K,"\u2AB8","\\succapprox",!0);x(T,q,K,"\u22B3","\\vartriangleright");x(T,q,K,"\u22B5","\\trianglerighteq");x(T,q,K,"\u22A9","\\Vdash",!0);x(T,q,K,"\u2223","\\shortmid");x(T,q,K,"\u2225","\\shortparallel");x(T,q,K,"\u226C","\\between",!0);x(T,q,K,"\u22D4","\\pitchfork",!0);x(T,q,K,"\u221D","\\varpropto");x(T,q,K,"\u25C0","\\blacktriangleleft");x(T,q,K,"\u2234","\\therefore",!0);x(T,q,K,"\u220D","\\backepsilon");x(T,q,K,"\u25B6","\\blacktriangleright");x(T,q,K,"\u2235","\\because",!0);x(T,q,K,"\u22D8","\\llless");x(T,q,K,"\u22D9","\\gggtr");x(T,q,ot,"\u22B2","\\lhd");x(T,q,ot,"\u22B3","\\rhd");x(T,q,K,"\u2242","\\eqsim",!0);x(T,D,K,"\u22C8","\\Join");x(T,q,K,"\u2251","\\Doteq",!0);x(T,q,ot,"\u2214","\\dotplus",!0);x(T,q,ot,"\u2216","\\smallsetminus");x(T,q,ot,"\u22D2","\\Cap",!0);x(T,q,ot,"\u22D3","\\Cup",!0);x(T,q,ot,"\u2A5E","\\doublebarwedge",!0);x(T,q,ot,"\u229F","\\boxminus",!0);x(T,q,ot,"\u229E","\\boxplus",!0);x(T,q,ot,"\u22C7","\\divideontimes",!0);x(T,q,ot,"\u22C9","\\ltimes",!0);x(T,q,ot,"\u22CA","\\rtimes",!0);x(T,q,ot,"\u22CB","\\leftthreetimes",!0);x(T,q,ot,"\u22CC","\\rightthreetimes",!0);x(T,q,ot,"\u22CF","\\curlywedge",!0);x(T,q,ot,"\u22CE","\\curlyvee",!0);x(T,q,ot,"\u229D","\\circleddash",!0);x(T,q,ot,"\u229B","\\circledast",!0);x(T,q,ot,"\u22C5","\\centerdot");x(T,q,ot,"\u22BA","\\intercal",!0);x(T,q,ot,"\u22D2","\\doublecap");x(T,q,ot,"\u22D3","\\doublecup");x(T,q,ot,"\u22A0","\\boxtimes",!0);x(T,q,K,"\u21E2","\\dashrightarrow",!0);x(T,q,K,"\u21E0","\\dashleftarrow",!0);x(T,q,K,"\u21C7","\\leftleftarrows",!0);x(T,q,K,"\u21C6","\\leftrightarrows",!0);x(T,q,K,"\u21DA","\\Lleftarrow",!0);x(T,q,K,"\u219E","\\twoheadleftarrow",!0);x(T,q,K,"\u21A2","\\leftarrowtail",!0);x(T,q,K,"\u21AB","\\looparrowleft",!0);x(T,q,K,"\u21CB","\\leftrightharpoons",!0);x(T,q,K,"\u21B6","\\curvearrowleft",!0);x(T,q,K,"\u21BA","\\circlearrowleft",!0);x(T,q,K,"\u21B0","\\Lsh",!0);x(T,q,K,"\u21C8","\\upuparrows",!0);x(T,q,K,"\u21BF","\\upharpoonleft",!0);x(T,q,K,"\u21C3","\\downharpoonleft",!0);x(T,D,K,"\u22B6","\\origof",!0);x(T,D,K,"\u22B7","\\imageof",!0);x(T,q,K,"\u22B8","\\multimap",!0);x(T,q,K,"\u21AD","\\leftrightsquigarrow",!0);x(T,q,K,"\u21C9","\\rightrightarrows",!0);x(T,q,K,"\u21C4","\\rightleftarrows",!0);x(T,q,K,"\u21A0","\\twoheadrightarrow",!0);x(T,q,K,"\u21A3","\\rightarrowtail",!0);x(T,q,K,"\u21AC","\\looparrowright",!0);x(T,q,K,"\u21B7","\\curvearrowright",!0);x(T,q,K,"\u21BB","\\circlearrowright",!0);x(T,q,K,"\u21B1","\\Rsh",!0);x(T,q,K,"\u21CA","\\downdownarrows",!0);x(T,q,K,"\u21BE","\\upharpoonright",!0);x(T,q,K,"\u21C2","\\downharpoonright",!0);x(T,q,K,"\u21DD","\\rightsquigarrow",!0);x(T,q,K,"\u21DD","\\leadsto");x(T,q,K,"\u21DB","\\Rrightarrow",!0);x(T,q,K,"\u21BE","\\restriction");x(T,D,J,"\u2018","`");x(T,D,J,"$","\\$");x(Ae,D,J,"$","\\$");x(Ae,D,J,"$","\\textdollar");x(T,D,J,"%","\\%");x(Ae,D,J,"%","\\%");x(T,D,J,"_","\\_");x(Ae,D,J,"_","\\_");x(Ae,D,J,"_","\\textunderscore");x(T,D,J,"\u2220","\\angle",!0);x(T,D,J,"\u221E","\\infty",!0);x(T,D,J,"\u2032","\\prime");x(T,D,J,"\u25B3","\\triangle");x(T,D,J,"\u0393","\\Gamma",!0);x(T,D,J,"\u0394","\\Delta",!0);x(T,D,J,"\u0398","\\Theta",!0);x(T,D,J,"\u039B","\\Lambda",!0);x(T,D,J,"\u039E","\\Xi",!0);x(T,D,J,"\u03A0","\\Pi",!0);x(T,D,J,"\u03A3","\\Sigma",!0);x(T,D,J,"\u03A5","\\Upsilon",!0);x(T,D,J,"\u03A6","\\Phi",!0);x(T,D,J,"\u03A8","\\Psi",!0);x(T,D,J,"\u03A9","\\Omega",!0);x(T,D,J,"A","\u0391");x(T,D,J,"B","\u0392");x(T,D,J,"E","\u0395");x(T,D,J,"Z","\u0396");x(T,D,J,"H","\u0397");x(T,D,J,"I","\u0399");x(T,D,J,"K","\u039A");x(T,D,J,"M","\u039C");x(T,D,J,"N","\u039D");x(T,D,J,"O","\u039F");x(T,D,J,"P","\u03A1");x(T,D,J,"T","\u03A4");x(T,D,J,"X","\u03A7");x(T,D,J,"\xAC","\\neg",!0);x(T,D,J,"\xAC","\\lnot");x(T,D,J,"\u22A4","\\top");x(T,D,J,"\u22A5","\\bot");x(T,D,J,"\u2205","\\emptyset");x(T,q,J,"\u2205","\\varnothing");x(T,D,Ct,"\u03B1","\\alpha",!0);x(T,D,Ct,"\u03B2","\\beta",!0);x(T,D,Ct,"\u03B3","\\gamma",!0);x(T,D,Ct,"\u03B4","\\delta",!0);x(T,D,Ct,"\u03F5","\\epsilon",!0);x(T,D,Ct,"\u03B6","\\zeta",!0);x(T,D,Ct,"\u03B7","\\eta",!0);x(T,D,Ct,"\u03B8","\\theta",!0);x(T,D,Ct,"\u03B9","\\iota",!0);x(T,D,Ct,"\u03BA","\\kappa",!0);x(T,D,Ct,"\u03BB","\\lambda",!0);x(T,D,Ct,"\u03BC","\\mu",!0);x(T,D,Ct,"\u03BD","\\nu",!0);x(T,D,Ct,"\u03BE","\\xi",!0);x(T,D,Ct,"\u03BF","\\omicron",!0);x(T,D,Ct,"\u03C0","\\pi",!0);x(T,D,Ct,"\u03C1","\\rho",!0);x(T,D,Ct,"\u03C3","\\sigma",!0);x(T,D,Ct,"\u03C4","\\tau",!0);x(T,D,Ct,"\u03C5","\\upsilon",!0);x(T,D,Ct,"\u03D5","\\phi",!0);x(T,D,Ct,"\u03C7","\\chi",!0);x(T,D,Ct,"\u03C8","\\psi",!0);x(T,D,Ct,"\u03C9","\\omega",!0);x(T,D,Ct,"\u03B5","\\varepsilon",!0);x(T,D,Ct,"\u03D1","\\vartheta",!0);x(T,D,Ct,"\u03D6","\\varpi",!0);x(T,D,Ct,"\u03F1","\\varrho",!0);x(T,D,Ct,"\u03C2","\\varsigma",!0);x(T,D,Ct,"\u03C6","\\varphi",!0);x(T,D,ot,"\u2217","*",!0);x(T,D,ot,"+","+");x(T,D,ot,"\u2212","-",!0);x(T,D,ot,"\u22C5","\\cdot",!0);x(T,D,ot,"\u2218","\\circ",!0);x(T,D,ot,"\xF7","\\div",!0);x(T,D,ot,"\xB1","\\pm",!0);x(T,D,ot,"\xD7","\\times",!0);x(T,D,ot,"\u2229","\\cap",!0);x(T,D,ot,"\u222A","\\cup",!0);x(T,D,ot,"\u2216","\\setminus",!0);x(T,D,ot,"\u2227","\\land");x(T,D,ot,"\u2228","\\lor");x(T,D,ot,"\u2227","\\wedge",!0);x(T,D,ot,"\u2228","\\vee",!0);x(T,D,J,"\u221A","\\surd");x(T,D,Fo,"\u27E8","\\langle",!0);x(T,D,Fo,"\u2223","\\lvert");x(T,D,Fo,"\u2225","\\lVert");x(T,D,Zn,"?","?");x(T,D,Zn,"!","!");x(T,D,Zn,"\u27E9","\\rangle",!0);x(T,D,Zn,"\u2223","\\rvert");x(T,D,Zn,"\u2225","\\rVert");x(T,D,K,"=","=");x(T,D,K,":",":");x(T,D,K,"\u2248","\\approx",!0);x(T,D,K,"\u2245","\\cong",!0);x(T,D,K,"\u2265","\\ge");x(T,D,K,"\u2265","\\geq",!0);x(T,D,K,"\u2190","\\gets");x(T,D,K,">","\\gt",!0);x(T,D,K,"\u2208","\\in",!0);x(T,D,K,"\uE020","\\@not");x(T,D,K,"\u2282","\\subset",!0);x(T,D,K,"\u2283","\\supset",!0);x(T,D,K,"\u2286","\\subseteq",!0);x(T,D,K,"\u2287","\\supseteq",!0);x(T,q,K,"\u2288","\\nsubseteq",!0);x(T,q,K,"\u2289","\\nsupseteq",!0);x(T,D,K,"\u22A8","\\models");x(T,D,K,"\u2190","\\leftarrow",!0);x(T,D,K,"\u2264","\\le");x(T,D,K,"\u2264","\\leq",!0);x(T,D,K,"<","\\lt",!0);x(T,D,K,"\u2192","\\rightarrow",!0);x(T,D,K,"\u2192","\\to");x(T,q,K,"\u2271","\\ngeq",!0);x(T,q,K,"\u2270","\\nleq",!0);x(T,D,Bl,"\xA0","\\ ");x(T,D,Bl,"\xA0","\\space");x(T,D,Bl,"\xA0","\\nobreakspace");x(Ae,D,Bl,"\xA0","\\ ");x(Ae,D,Bl,"\xA0"," ");x(Ae,D,Bl,"\xA0","\\space");x(Ae,D,Bl,"\xA0","\\nobreakspace");x(T,D,Bl,null,"\\nobreak");x(T,D,Bl,null,"\\allowbreak");x(T,D,_w,",",",");x(T,D,_w,";",";");x(T,q,ot,"\u22BC","\\barwedge",!0);x(T,q,ot,"\u22BB","\\veebar",!0);x(T,D,ot,"\u2299","\\odot",!0);x(T,D,ot,"\u2295","\\oplus",!0);x(T,D,ot,"\u2297","\\otimes",!0);x(T,D,J,"\u2202","\\partial",!0);x(T,D,ot,"\u2298","\\oslash",!0);x(T,q,ot,"\u229A","\\circledcirc",!0);x(T,q,ot,"\u22A1","\\boxdot",!0);x(T,D,ot,"\u25B3","\\bigtriangleup");x(T,D,ot,"\u25BD","\\bigtriangledown");x(T,D,ot,"\u2020","\\dagger");x(T,D,ot,"\u22C4","\\diamond");x(T,D,ot,"\u22C6","\\star");x(T,D,ot,"\u25C3","\\triangleleft");x(T,D,ot,"\u25B9","\\triangleright");x(T,D,Fo,"{","\\{");x(Ae,D,J,"{","\\{");x(Ae,D,J,"{","\\textbraceleft");x(T,D,Zn,"}","\\}");x(Ae,D,J,"}","\\}");x(Ae,D,J,"}","\\textbraceright");x(T,D,Fo,"{","\\lbrace");x(T,D,Zn,"}","\\rbrace");x(T,D,Fo,"[","\\lbrack",!0);x(Ae,D,J,"[","\\lbrack",!0);x(T,D,Zn,"]","\\rbrack",!0);x(Ae,D,J,"]","\\rbrack",!0);x(T,D,Fo,"(","\\lparen",!0);x(T,D,Zn,")","\\rparen",!0);x(Ae,D,J,"<","\\textless",!0);x(Ae,D,J,">","\\textgreater",!0);x(T,D,Fo,"\u230A","\\lfloor",!0);x(T,D,Zn,"\u230B","\\rfloor",!0);x(T,D,Fo,"\u2308","\\lceil",!0);x(T,D,Zn,"\u2309","\\rceil",!0);x(T,D,J,"\\","\\backslash");x(T,D,J,"\u2223","|");x(T,D,J,"\u2223","\\vert");x(Ae,D,J,"|","\\textbar",!0);x(T,D,J,"\u2225","\\|");x(T,D,J,"\u2225","\\Vert");x(Ae,D,J,"\u2225","\\textbardbl");x(Ae,D,J,"~","\\textasciitilde");x(Ae,D,J,"\\","\\textbackslash");x(Ae,D,J,"^","\\textasciicircum");x(T,D,K,"\u2191","\\uparrow",!0);x(T,D,K,"\u21D1","\\Uparrow",!0);x(T,D,K,"\u2193","\\downarrow",!0);x(T,D,K,"\u21D3","\\Downarrow",!0);x(T,D,K,"\u2195","\\updownarrow",!0);x(T,D,K,"\u21D5","\\Updownarrow",!0);x(T,D,Dr,"\u2210","\\coprod");x(T,D,Dr,"\u22C1","\\bigvee");x(T,D,Dr,"\u22C0","\\bigwedge");x(T,D,Dr,"\u2A04","\\biguplus");x(T,D,Dr,"\u22C2","\\bigcap");x(T,D,Dr,"\u22C3","\\bigcup");x(T,D,Dr,"\u222B","\\int");x(T,D,Dr,"\u222B","\\intop");x(T,D,Dr,"\u222C","\\iint");x(T,D,Dr,"\u222D","\\iiint");x(T,D,Dr,"\u220F","\\prod");x(T,D,Dr,"\u2211","\\sum");x(T,D,Dr,"\u2A02","\\bigotimes");x(T,D,Dr,"\u2A01","\\bigoplus");x(T,D,Dr,"\u2A00","\\bigodot");x(T,D,Dr,"\u222E","\\oint");x(T,D,Dr,"\u222F","\\oiint");x(T,D,Dr,"\u2230","\\oiiint");x(T,D,Dr,"\u2A06","\\bigsqcup");x(T,D,Dr,"\u222B","\\smallint");x(Ae,D,Vf,"\u2026","\\textellipsis");x(T,D,Vf,"\u2026","\\mathellipsis");x(Ae,D,Vf,"\u2026","\\ldots",!0);x(T,D,Vf,"\u2026","\\ldots",!0);x(T,D,Vf,"\u22EF","\\@cdots",!0);x(T,D,Vf,"\u22F1","\\ddots",!0);x(T,D,J,"\u22EE","\\varvdots");x(T,D,tr,"\u02CA","\\acute");x(T,D,tr,"\u02CB","\\grave");x(T,D,tr,"\xA8","\\ddot");x(T,D,tr,"~","\\tilde");x(T,D,tr,"\u02C9","\\bar");x(T,D,tr,"\u02D8","\\breve");x(T,D,tr,"\u02C7","\\check");x(T,D,tr,"^","\\hat");x(T,D,tr,"\u20D7","\\vec");x(T,D,tr,"\u02D9","\\dot");x(T,D,tr,"\u02DA","\\mathring");x(T,D,Ct,"\uE131","\\@imath");x(T,D,Ct,"\uE237","\\@jmath");x(T,D,J,"\u0131","\u0131");x(T,D,J,"\u0237","\u0237");x(Ae,D,J,"\u0131","\\i",!0);x(Ae,D,J,"\u0237","\\j",!0);x(Ae,D,J,"\xDF","\\ss",!0);x(Ae,D,J,"\xE6","\\ae",!0);x(Ae,D,J,"\u0153","\\oe",!0);x(Ae,D,J,"\xF8","\\o",!0);x(Ae,D,J,"\xC6","\\AE",!0);x(Ae,D,J,"\u0152","\\OE",!0);x(Ae,D,J,"\xD8","\\O",!0);x(Ae,D,tr,"\u02CA","\\'");x(Ae,D,tr,"\u02CB","\\`");x(Ae,D,tr,"\u02C6","\\^");x(Ae,D,tr,"\u02DC","\\~");x(Ae,D,tr,"\u02C9","\\=");x(Ae,D,tr,"\u02D8","\\u");x(Ae,D,tr,"\u02D9","\\.");x(Ae,D,tr,"\xB8","\\c");x(Ae,D,tr,"\u02DA","\\r");x(Ae,D,tr,"\u02C7","\\v");x(Ae,D,tr,"\xA8",'\\"');x(Ae,D,tr,"\u02DD","\\H");x(Ae,D,tr,"\u25EF","\\textcircled");var ij={"--":!0,"---":!0,"``":!0,"''":!0};x(Ae,D,J,"\u2013","--",!0);x(Ae,D,J,"\u2013","\\textendash");x(Ae,D,J,"\u2014","---",!0);x(Ae,D,J,"\u2014","\\textemdash");x(Ae,D,J,"\u2018","`",!0);x(Ae,D,J,"\u2018","\\textquoteleft");x(Ae,D,J,"\u2019","'",!0);x(Ae,D,J,"\u2019","\\textquoteright");x(Ae,D,J,"\u201C","``",!0);x(Ae,D,J,"\u201C","\\textquotedblleft");x(Ae,D,J,"\u201D","''",!0);x(Ae,D,J,"\u201D","\\textquotedblright");x(T,D,J,"\xB0","\\degree",!0);x(Ae,D,J,"\xB0","\\degree");x(Ae,D,J,"\xB0","\\textdegree",!0);x(T,D,J,"\xA3","\\pounds");x(T,D,J,"\xA3","\\mathsterling",!0);x(Ae,D,J,"\xA3","\\pounds");x(Ae,D,J,"\xA3","\\textsterling",!0);x(T,q,J,"\u2720","\\maltese");x(Ae,q,J,"\u2720","\\maltese");var SU='0123456789/@."';for(Jy=0;Jy<SU.length;Jy++)C5=SU.charAt(Jy),x(T,D,J,C5,C5);var C5,Jy,kU='0123456789!@*()-=+";:?/.,';for(ew=0;ew<kU.length;ew++)S5=kU.charAt(ew),x(Ae,D,J,S5,S5);var S5,ew,fw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(tw=0;tw<fw.length;tw++)Bg=fw.charAt(tw),x(T,D,Ct,Bg,Bg),x(Ae,D,J,Bg,Bg);var Bg,tw;x(T,q,J,"C","\u2102");x(Ae,q,J,"C","\u2102");x(T,q,J,"H","\u210D");x(Ae,q,J,"H","\u210D");x(T,q,J,"N","\u2115");x(Ae,q,J,"N","\u2115");x(T,q,J,"P","\u2119");x(Ae,q,J,"P","\u2119");x(T,q,J,"Q","\u211A");x(Ae,q,J,"Q","\u211A");x(T,q,J,"R","\u211D");x(Ae,q,J,"R","\u211D");x(T,q,J,"Z","\u2124");x(Ae,q,J,"Z","\u2124");x(T,D,Ct,"h","\u210E");x(Ae,D,Ct,"h","\u210E");var Mt="";for(Pn=0;Pn<fw.length;Pn++)lr=fw.charAt(Pn),Mt=String.fromCharCode(55349,56320+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56372+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56424+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56580+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56684+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56736+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56788+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56840+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56944+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Pn<26&&(Mt=String.fromCharCode(55349,56632+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56476+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt));var lr,Pn;Mt=String.fromCharCode(55349,56668);x(T,D,Ct,"k",Mt);x(Ae,D,J,"k",Mt);for(cd=0;cd<10;cd++)Nl=cd.toString(),Mt=String.fromCharCode(55349,57294+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt),Mt=String.fromCharCode(55349,57314+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt),Mt=String.fromCharCode(55349,57324+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt),Mt=String.fromCharCode(55349,57334+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt);var Nl,cd,F5="\xD0\xDE\xFE";for(iw=0;iw<F5.length;iw++)Hg=F5.charAt(iw),x(T,D,Ct,Hg,Hg),x(Ae,D,J,Hg,Hg);var Hg,iw,rw=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],EU=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ede=function(e,t){var r=e.charCodeAt(0),n=e.charCodeAt(1),o=(r-55296)*1024+(n-56320)+65536,s=t==="math"?0:1;if(119808<=o&&o<120484){var a=Math.floor((o-119808)/26);return[rw[a][2],rw[a][s]]}else if(120782<=o&&o<=120831){var l=Math.floor((o-120782)/10);return[EU[l][2],EU[l][s]]}else{if(o===120485||o===120486)return[rw[0][2],rw[0][s]];if(120486<o&&o<120782)return["",""];throw new Be("Unsupported character: "+e)}},yw=function(e,t,r){return $i[r][e]&&$i[r][e].replace&&(e=$i[r][e].replace),{value:e,metrics:$5(e,t,r)}},Rs=function(e,t,r,n,o){var s=yw(e,t,r),a=s.metrics;e=s.value;var l;if(a){var c=a.italic;(r==="text"||n&&n.font==="mathit")&&(c=0),l=new ho(e,a.height,a.depth,c,a.skew,a.width,o)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '"+r+"'")),l=new ho(e,0,0,0,0,0,o);if(n){l.maxFontSize=n.sizeMultiplier,n.style.isTight()&&l.classes.push("mtight");var d=n.getColor();d&&(l.style.color=d)}return l},tde=function(e,t,r,n){return n===void 0&&(n=[]),r.font==="boldsymbol"&&yw(e,"Main-Bold",t).metrics?Rs(e,"Main-Bold",t,r,n.concat(["mathbf"])):e==="\\"||$i[t][e].font==="main"?Rs(e,"Main-Regular",t,r,n):Rs(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},ide=function(e,t,r,n,o){return o!=="textord"&&yw(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},rde=function(e,t,r){var n=e.mode,o=e.text,s=["mord"],a=n==="math"||n==="text"&&t.font,l=a?t.font:t.fontFamily,c="",d="";if(o.charCodeAt(0)===55349&&([c,d]=ede(o,n)),c.length>0)return Rs(o,c,n,t,s.concat(d));if(l){var u,h;if(l==="boldsymbol"){var f=ide(o,n,t,s,r);u=f.fontName,h=[f.fontClass]}else a?(u=oj[l].fontName,h=[l]):(u=nw(l,t.fontWeight,t.fontShape),h=[l,t.fontWeight,t.fontShape]);if(yw(o,u,n).metrics)return Rs(o,u,n,t,s.concat(h));if(ij.hasOwnProperty(o)&&u.slice(0,10)==="Typewriter"){for(var m=[],g=0;g<o.length;g++)m.push(Rs(o[g],u,n,t,s.concat(h)));return nj(m)}}if(r==="mathord")return Rs(o,"Math-Italic",n,t,s.concat(["mathnormal"]));if(r==="textord"){var w=$i[n][o]&&$i[n][o].font;if(w==="ams"){var _=nw("amsrm",t.fontWeight,t.fontShape);return Rs(o,_,n,t,s.concat("amsrm",t.fontWeight,t.fontShape))}else if(w==="main"||!w){var E=nw("textrm",t.fontWeight,t.fontShape);return Rs(o,E,n,t,s.concat(t.fontWeight,t.fontShape))}else{var A=nw(w,t.fontWeight,t.fontShape);return Rs(o,A,n,t,s.concat(A,t.fontWeight,t.fontShape))}}else throw new Error("unexpected type: "+r+" in makeOrd")},nde=(i,e)=>{if(ud(i.classes)!==ud(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 r in i.style)if(i.style.hasOwnProperty(r)&&i.style[r]!==e.style[r])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&i.style[n]!==e.style[n])return!1;return!0},ode=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],r=i[e+1];t instanceof ho&&r instanceof ho&&nde(t,r)&&(t.text+=r.text,t.height=Math.max(t.height,r.height),t.depth=Math.max(t.depth,r.depth),t.italic=r.italic,i.splice(e+1,1),e--)}return i},G5=function(e){for(var t=0,r=0,n=0,o=0;o<e.children.length;o++){var s=e.children[o];s.height>t&&(t=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},co=function(e,t,r,n){var o=new Ru(e,t,r,n);return G5(o),o},rj=(i,e,t,r)=>new Ru(i,e,t,r),sde=function(e,t,r){var n=co([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=$e(n.height),n.maxFontSize=1,n},ade=function(e,t,r,n){var o=new qg(e,t,r,n);return G5(o),o},nj=function(e){var t=new Nu(e);return G5(t),t},lde=function(e,t){return e instanceof Nu?co([],[e],t):e},cde=function(e){if(e.positionType==="individualShift"){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,o=n,s=1;s<t.length;s++){var a=-t[s].shift-o-t[s].elem.depth,l=a-(t[s-1].elem.height+t[s-1].elem.depth);o=o+a,r.push({type:"kern",size:l}),r.push(t[s])}return{children:r,depth:n}}var c;if(e.positionType==="top"){for(var d=e.positionData,u=0;u<e.children.length;u++){var h=e.children[u];d-=h.type==="kern"?h.size:h.elem.height+h.elem.depth}c=d}else if(e.positionType==="bottom")c=-e.positionData;else{var f=e.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")c=-f.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")c=-f.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:c}},dde=function(e,t){for(var{children:r,depth:n}=cde(e),o=0,s=0;s<r.length;s++){var a=r[s];if(a.type==="elem"){var l=a.elem;o=Math.max(o,l.maxFontSize,l.height)}}o+=2;var c=co(["pstrut"],[]);c.style.height=$e(o);for(var d=[],u=n,h=n,f=n,m=0;m<r.length;m++){var g=r[m];if(g.type==="kern")f+=g.size;else{var w=g.elem,_=g.wrapperClasses||[],E=g.wrapperStyle||{},A=co(_,[c,w],void 0,E);A.style.top=$e(-o-f-w.depth),g.marginLeft&&(A.style.marginLeft=g.marginLeft),g.marginRight&&(A.style.marginRight=g.marginRight),d.push(A),f+=w.height+w.depth}u=Math.min(u,f),h=Math.max(h,f)}var L=co(["vlist"],d);L.style.height=$e(h);var O;if(u<0){var U=co([],[]),Y=co(["vlist"],[U]);Y.style.height=$e(-u);var oe=co(["vlist-s"],[new ho("\u200B")]);O=[co(["vlist-r"],[L,oe]),co(["vlist-r"],[Y])]}else O=[co(["vlist-r"],[L])];var te=co(["vlist-t"],O);return O.length===2&&te.classes.push("vlist-t2"),te.height=h,te.depth=-u,te},ude=(i,e)=>{var t=co(["mspace"],[],e),r=dr(i,e);return t.style.marginRight=$e(r),t},nw=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var o;return t==="textbf"&&r==="textit"?o="BoldItalic":t==="textbf"?o="Bold":t==="textit"?o="Italic":o="Regular",n+"-"+o},oj={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"}},sj={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},hde=function(e,t){var[r,n,o]=sj[e],s=new Ma(r),a=new Ps([s],{width:$e(n),height:$e(o),style:"width:"+$e(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=rj(["overlay"],[a],t);return l.height=o,l.style.height=$e(o),l.style.width=$e(n),l},ae={fontMap:oj,makeSymbol:Rs,mathsym:tde,makeSpan:co,makeSvgSpan:rj,makeLineSpan:sde,makeAnchor:ade,makeFragment:nj,wrapFragment:lde,makeVList:dde,makeOrd:rde,makeGlue:ude,staticSvg:hde,svgData:sj,tryCombineChars:ode},cr={number:3,unit:"mu"},Du={number:4,unit:"mu"},Rl={number:5,unit:"mu"},fde={mord:{mop:cr,mbin:Du,mrel:Rl,minner:cr},mop:{mord:cr,mop:cr,mrel:Rl,minner:cr},mbin:{mord:Du,mop:Du,mopen:Du,minner:Du},mrel:{mord:Rl,mop:Rl,mopen:Rl,minner:Rl},mopen:{},mclose:{mop:cr,mbin:Du,mrel:Rl,minner:cr},mpunct:{mord:cr,mop:cr,mrel:Rl,mopen:cr,mclose:cr,mpunct:cr,minner:cr},minner:{mord:cr,mop:cr,mbin:Du,mrel:Rl,mopen:cr,mpunct:cr,minner:cr}},pde={mord:{mop:cr},mop:{mord:cr,mop:cr},mbin:{},mrel:{},mopen:{},mclose:{mop:cr},mpunct:{},minner:{mop:cr}},aj={},pw={},mw={};function rt(i){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},l=0;l<t.length;++l)aj[t[l]]=a;e&&(o&&(pw[e]=o),s&&(mw[e]=s))}function Pu(i){var{type:e,htmlBuilder:t,mathmlBuilder:r}=i;rt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}var gw=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},kr=function(e){return e.type==="ordgroup"?e.body:[e]},Fl=ae.makeSpan,mde=["leftmost","mbin","mopen","mrel","mop","mpunct"],gde=["rightmost","mrel","mclose","mpunct"],bde={display:St.DISPLAY,text:St.TEXT,script:St.SCRIPT,scriptscript:St.SCRIPTSCRIPT},vde={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},jr=function(e,t,r,n){n===void 0&&(n=[null,null]);for(var o=[],s=0;s<e.length;s++){var a=bi(e[s],t);if(a instanceof Nu){var l=a.children;o.push(...l)}else o.push(a)}if(ae.tryCombineChars(o),!r)return o;var c=t;if(e.length===1){var d=e[0];d.type==="sizing"?c=t.havingSize(d.size):d.type==="styling"&&(c=t.havingStyle(bde[d.style]))}var u=Fl([n[0]||"leftmost"],[],t),h=Fl([n[1]||"rightmost"],[],t),f=r==="root";return TU(o,(m,g)=>{var w=g.classes[0],_=m.classes[0];w==="mbin"&&Nt.contains(gde,_)?g.classes[0]="mord":_==="mbin"&&Nt.contains(mde,w)&&(m.classes[0]="mord")},{node:u},h,f),TU(o,(m,g)=>{var w=z5(g),_=z5(m),E=w&&_?m.hasClass("mtight")?pde[w][_]:fde[w][_]:null;if(E)return ae.makeGlue(E,c)},{node:u},h,f),o},TU=function i(e,t,r,n,o){n&&e.push(n);for(var s=0;s<e.length;s++){var a=e[s],l=lj(a);if(l){i(l.children,t,r,null,o);continue}var c=!a.hasClass("mspace");if(c){var d=t(a,r.node);d&&(r.insertAfter?r.insertAfter(d):(e.unshift(d),s++))}c?r.node=a:o&&a.hasClass("newline")&&(r.node=Fl(["leftmost"])),r.insertAfter=(u=>h=>{e.splice(u+1,0,h),s++})(s)}n&&e.pop()},lj=function(e){return e instanceof Nu||e instanceof qg||e instanceof Ru&&e.hasClass("enclosing")?e:null},_de=function i(e,t){var r=lj(e);if(r){var n=r.children;if(n.length){if(t==="right")return i(n[n.length-1],"right");if(t==="left")return i(n[0],"left")}}return e},z5=function(e,t){return e?(t&&(e=_de(e,t)),vde[e.classes[0]]||null):null},$g=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Fl(t.concat(r))},bi=function(e,t,r){if(!e)return Fl();if(pw[e.type]){var n=pw[e.type](e,t);if(r&&t.size!==r.size){n=Fl(t.sizingClasses(r),[n],t);var o=t.sizeMultiplier/r.sizeMultiplier;n.height*=o,n.depth*=o}return n}else throw new Be("Got group of unknown type: '"+e.type+"'")};function ow(i,e){var t=Fl(["base"],i,e),r=Fl(["strut"]);return r.style.height=$e(t.height+t.depth),t.depth&&(r.style.verticalAlign=$e(-t.depth)),t.children.unshift(r),t}function B5(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var r=jr(i,e,"root"),n;r.length===2&&r[1].hasClass("tag")&&(n=r.pop());for(var o=[],s=[],a=0;a<r.length;a++)if(s.push(r[a]),r[a].hasClass("mbin")||r[a].hasClass("mrel")||r[a].hasClass("allowbreak")){for(var l=!1;a<r.length-1&&r[a+1].hasClass("mspace")&&!r[a+1].hasClass("newline");)a++,s.push(r[a]),r[a].hasClass("nobreak")&&(l=!0);l||(o.push(ow(s,e)),s=[])}else r[a].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(ow(s,e)),s=[]),o.push(r[a]));s.length>0&&o.push(ow(s,e));var c;t?(c=ow(jr(t,e,!0)),c.classes=["tag"],o.push(c)):n&&o.push(n);var d=Fl(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),c){var u=c.children[0];u.style.height=$e(d.height+d.depth),d.depth&&(u.style.verticalAlign=$e(-d.depth))}return d}function cj(i){return new Nu(i)}var uo=class{constructor(e,t,r){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=r||[]}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=ud(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Nt.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Nt.escape(ud(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},Mu=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Nt.escape(this.toText())}toText(){return this.text}},H5=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",$e(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+$e(this.width)+'"/>'}toText(){return this.character?this.character:" "}},Ne={MathNode:uo,TextNode:Mu,SpaceNode:H5,newDocumentFragment:cj},os=function(e,t,r){return $i[t][e]&&$i[t][e].replace&&e.charCodeAt(0)!==55349&&!(ij.hasOwnProperty(e)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(e=$i[t][e].replace),new Ne.TextNode(e)},Y5=function(e){return e.length===1?e[0]:new Ne.MathNode("mrow",e)},X5=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 r=t.font;if(!r||r==="mathnormal")return null;var n=e.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var o=e.text;if(Nt.contains(["\\imath","\\jmath"],o))return null;$i[n][o]&&$i[n][o].replace&&(o=$i[n][o].replace);var s=ae.fontMap[r].fontName;return $5(o,s,n)?ae.fontMap[r].variant:null},fo=function(e,t,r){if(e.length===1){var n=zi(e[0],t);return r&&n instanceof uo&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var o=[],s,a=0;a<e.length;a++){var l=zi(e[a],t);if(l instanceof uo&&s instanceof uo){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mi"&&l.children.length===1&&s.type==="mn"){var c=l.children[0];if(c instanceof Mu&&c.text==="."){s.children.push(...l.children);continue}}else if(s.type==="mi"&&s.children.length===1){var d=s.children[0];if(d instanceof Mu&&d.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var u=l.children[0];u instanceof Mu&&u.text.length>0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),o.pop())}}}o.push(l),s=l}return o},hd=function(e,t,r){return Y5(fo(e,t,r))},zi=function(e,t){if(!e)return new Ne.MathNode("mrow");if(mw[e.type]){var r=mw[e.type](e,t);return r}else throw new Be("Got group of unknown type: '"+e.type+"'")};function IU(i,e,t,r,n){var o=fo(i,t),s;o.length===1&&o[0]instanceof uo&&Nt.contains(["mrow","mtable"],o[0].type)?s=o[0]:s=new Ne.MathNode("mrow",o);var a=new Ne.MathNode("annotation",[new Ne.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new Ne.MathNode("semantics",[s,a]),c=new Ne.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var d=n?"katex":"katex-mathml";return ae.makeSpan([d],[c])}var dj=function(e){return new hw({style:e.displayMode?St.DISPLAY:St.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},uj=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=ae.makeSpan(r,[e])}return e},yde=function(e,t,r){var n=dj(r),o;if(r.output==="mathml")return IU(e,t,n,r.displayMode,!0);if(r.output==="html"){var s=B5(e,n);o=ae.makeSpan(["katex"],[s])}else{var a=IU(e,t,n,r.displayMode,!1),l=B5(e,n);o=ae.makeSpan(["katex"],[a,l])}return uj(o,r)},wde=function(e,t,r){var n=dj(r),o=B5(e,n),s=ae.makeSpan(["katex"],[o]);return uj(s,r)},xde={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":"="},Cde=function(e){var t=new Ne.MathNode("mo",[new Ne.TextNode(xde[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Sde={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]},kde=function(e){return e.type==="ordgroup"?e.body.length:1},Ede=function(e,t){function r(){var a=4e5,l=e.label.slice(1);if(Nt.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=kde(c.base),u,h,f;if(d>5)l==="widehat"||l==="widecheck"?(u=420,a=2364,f=.42,h=l+"4"):(u=312,a=2340,f=.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],f=[0,.24,.3,.3,.36,.42][m],h=l+m):(a=[0,600,1033,2339,2340][m],u=[0,260,286,306,312][m],f=[0,.26,.286,.3,.306,.34][m],h="tilde"+m)}var g=new Ma(h),w=new Ps([g],{width:"100%",height:$e(f),viewBox:"0 0 "+a+" "+u,preserveAspectRatio:"none"});return{span:ae.makeSvgSpan([],[w],t),minWidth:0,height:f}}else{var _=[],E=Sde[l],[A,L,O]=E,U=O/1e3,Y=A.length,oe,te;if(Y===1){var Z=E[3];oe=["hide-tail"],te=[Z]}else if(Y===2)oe=["halfarrow-left","halfarrow-right"],te=["xMinYMin","xMaxYMin"];else if(Y===3)oe=["brace-left","brace-center","brace-right"],te=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+Y+" children.");for(var ve=0;ve<Y;ve++){var Pe=new Ma(A[ve]),Ee=new Ps([Pe],{width:"400em",height:$e(U),viewBox:"0 0 "+a+" "+O,preserveAspectRatio:te[ve]+" slice"}),Oe=ae.makeSvgSpan([oe[ve]],[Ee],t);if(Y===1)return{span:Oe,minWidth:L,height:U};Oe.style.height=$e(U),_.push(Oe)}return{span:ae.makeSpan(["stretchy"],_,t),minWidth:L,height:U}}}var{span:n,minWidth:o,height:s}=r();return n.height=s,n.style.height=$e(s),o>0&&(n.style.minWidth=$e(o)),n},Tde=function(e,t,r,n,o){var s,a=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(s=ae.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 Kg({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&c.push(new Kg({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Ps(c,{width:"100%",height:$e(a)});s=ae.makeSvgSpan([],[d],o)}return s.height=a,s.style.height=$e(a),s},zl={encloseSpan:Tde,mathMLnode:Cde,svgSpan:Ede};function Qt(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 Q5(i){var e=ww(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 ww(i){return i&&(i.type==="atom"||Jce.hasOwnProperty(i.type))?i:null}var Z5=(i,e)=>{var t,r,n;i&&i.type==="supsub"?(r=Qt(i.base,"accent"),t=r.base,i.base=t,n=Qce(bi(i,e)),i.base=r):(r=Qt(i,"accent"),t=r.base);var o=bi(t,e.havingCrampedStyle()),s=r.isShifty&&Nt.isCharacterBox(t),a=0;if(s){var l=Nt.getBaseElem(t),c=bi(l,e.havingCrampedStyle());a=CU(c).skew}var d=r.label==="\\c",u=d?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight),h;if(r.isStretchy)h=zl.svgSpan(r,e),h=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+$e(2*a)+")",marginLeft:$e(2*a)}:void 0}]},e);else{var f,m;r.label==="\\vec"?(f=ae.staticSvg("vec",e),m=ae.svgData.vec[1]):(f=ae.makeOrd({mode:r.mode,text:r.label},e,"textord"),f=CU(f),f.italic=0,m=f.width,d&&(u+=f.depth)),h=ae.makeSpan(["accent-body"],[f]);var g=r.label==="\\textcircled";g&&(h.classes.push("accent-full"),u=o.height);var w=a;g||(w-=m/2),h.style.left=$e(w),r.label==="\\textcircled"&&(h.style.top=".2em"),h=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:h}]},e)}var _=ae.makeSpan(["mord","accent"],[h],e);return n?(n.children[0]=_,n.height=Math.max(_.height,n.height),n.classes[0]="mord",n):_},hj=(i,e)=>{var t=i.isStretchy?zl.mathMLnode(i.label):new Ne.MathNode("mo",[os(i.label,i.mode)]),r=new Ne.MathNode("mover",[zi(i.base,e),t]);return r.setAttribute("accent","true"),r},Ide=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));rt({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=gw(e[0]),r=!Ide.test(i.funcName),n=!r||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:r,isShifty:n,base:t}},htmlBuilder:Z5,mathmlBuilder:hj});rt({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],r=i.parser.mode;return r==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Z5,mathmlBuilder:hj});rt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:n}},htmlBuilder:(i,e)=>{var t=bi(i.base,e),r=zl.svgSpan(i,e),n=i.label==="\\utilde"?.12:0,o=ae.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return ae.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(i,e)=>{var t=zl.mathMLnode(i.label),r=new Ne.MathNode("munder",[zi(i.base,e),t]);return r.setAttribute("accentunder","true"),r}});var sw=i=>{var e=new Ne.MathNode("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};rt({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:r,funcName:n}=i;return{type:"xArrow",mode:r.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,r=e.havingStyle(t.sup()),n=ae.wrapFragment(bi(i.body,r,e),e),o=i.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(o+"-arrow-pad");var s;i.below&&(r=e.havingStyle(t.sub()),s=ae.wrapFragment(bi(i.below,r,e),e),s.classes.push(o+"-arrow-pad"));var a=zl.svgSpan(i,e),l=-e.fontMetrics().axisHeight+.5*a.height,c=-e.fontMetrics().axisHeight-.5*a.height-.111;(n.depth>.25||i.label==="\\xleftequilibrium")&&(c-=n.depth);var d;if(s){var u=-e.fontMetrics().axisHeight+s.height+.5*a.height+.111;d=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:u}]},e)}else d=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:a,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),ae.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(i,e){var t=zl.mathMLnode(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(i.body){var n=sw(zi(i.body,e));if(i.below){var o=sw(zi(i.below,e));r=new Ne.MathNode("munderover",[t,o,n])}else r=new Ne.MathNode("mover",[t,n])}else if(i.below){var s=sw(zi(i.below,e));r=new Ne.MathNode("munder",[t,s])}else r=sw(),r=new Ne.MathNode("mover",[t,r]);return r}});var Lde=ae.makeSpan;function fj(i,e){var t=jr(i.body,e,!0);return Lde([i.mclass],t,e)}function pj(i,e){var t,r=fo(i.body,e);return i.mclass==="minner"?t=new Ne.MathNode("mpadded",r):i.mclass==="mord"?i.isCharacterBox?(t=r[0],t.type="mi"):t=new Ne.MathNode("mi",r):(i.isCharacterBox?(t=r[0],t.type="mo"):t=new Ne.MathNode("mo",r),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}rt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:r}=i,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:kr(n),isCharacterBox:Nt.isCharacterBox(n)}},htmlBuilder:fj,mathmlBuilder:pj});var xw=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"};rt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:xw(e[0]),body:kr(e[1]),isCharacterBox:Nt.isCharacterBox(e[1])}}});rt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:r}=i,n=e[1],o=e[0],s;r!=="\\stackrel"?s=xw(n):s="mrel";var a={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:kr(n)},l={type:"supsub",mode:o.mode,base:a,sup:r==="\\underset"?null:o,sub:r==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:s,body:[l],isCharacterBox:Nt.isCharacterBox(l)}},htmlBuilder:fj,mathmlBuilder:pj});rt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:xw(e[0]),body:kr(e[0])}},htmlBuilder(i,e){var t=jr(i.body,e,!0),r=ae.makeSpan([i.mclass],t,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(i,e){var t=fo(i.body,e),r=new Ne.MathNode("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Ade={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},LU=()=>({type:"styling",body:[],mode:"math",style:"display"}),AU=i=>i.type==="textord"&&i.text==="@",Dde=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function Mde(i,e,t){var r=Ade[i];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),o={type:"atom",text:r,mode:"math",family:"rel"},s=t.callFunction("\\Big",[o],[]),a=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[n,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 Nde(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 Be("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var r=[],n=[r],o=0;o<e.length;o++){for(var s=e[o],a=LU(),l=0;l<s.length;l++)if(!AU(s[l]))a.body.push(s[l]);else{r.push(a),l+=1;var c=Q5(s[l]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(c)>-1))if("<>AV".indexOf(c)>-1)for(var u=0;u<2;u++){for(var h=!0,f=l+1;f<s.length;f++){if(Dde(s[f],c)){h=!1,l=f;break}if(AU(s[f]))throw new Be("Missing a "+c+" character to complete a CD arrow.",s[f]);d[u].body.push(s[f])}if(h)throw new Be("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new Be('Expected one of "<>AV=|." after @',s[l]);var m=Mde(c,d,i),g={type:"styling",body:[m],mode:"math",style:"display"};r.push(g),a=LU()}o%2===0?r.push(a):r.shift(),r=[],n.push(r)}i.gullet.endGroup(),i.gullet.endGroup();var w=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}rt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:r}=i;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),r=ae.wrapFragment(bi(i.label,t,e),e);return r.classes.push("cd-label-"+i.side),r.style.bottom=$e(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(i,e){var t=new Ne.MathNode("mrow",[zi(i.label,e)]);return t=new Ne.MathNode("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ne.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});rt({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=ae.wrapFragment(bi(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Ne.MathNode("mrow",[zi(i.fragment,e)])}});rt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,r=Qt(e[0],"ordgroup"),n=r.body,o="",s=0;s<n.length;s++){var a=Qt(n[s],"textord");o+=a.text}var l=parseInt(o),c;if(isNaN(l))throw new Be("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new Be("\\@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 mj=(i,e)=>{var t=jr(i.body,e.withColor(i.color),!1);return ae.makeFragment(t)},gj=(i,e)=>{var t=fo(i.body,e.withColor(i.color)),r=new Ne.MathNode("mstyle",t);return r.setAttribute("mathcolor",i.color),r};rt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,r=Qt(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:r,body:kr(n)}},htmlBuilder:mj,mathmlBuilder:gj});rt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:r}=i,n=Qt(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var o=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:n,body:o}},htmlBuilder:mj,mathmlBuilder:gj});rt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:r}=i,n=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:n&&Qt(n,"size").value}},htmlBuilder(i,e){var t=ae.makeSpan(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=$e(dr(i.size,e)))),t},mathmlBuilder(i,e){var t=new Ne.MathNode("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",$e(dr(i.size,e)))),t}});var U5={"\\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 Be("Expected a control sequence",i);return e},Rde=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},vj=(i,e,t,r)=>{var n=i.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,n,r)};rt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var r=e.fetch();if(U5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=U5[r.text]),Qt(e.parseFunction(),"internal");throw new Be("Invalid token after macro prefix",r)}});rt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,r=e.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Be("Expected a control sequence",r);for(var o=0,s,a=[[]];e.gullet.future().text!=="{";)if(r=e.gullet.popToken(),r.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),a[o].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Be('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==o+1)throw new Be('Argument number "'+r.text+'" out of order');o++,a.push([])}else{if(r.text==="EOF")throw new Be("Expected a macro definition");a[o].push(r.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(n,{tokens:l,numArgs:o,delimiters:a},t===U5[t]),{type:"internal",mode:e.mode}}});rt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,r=bj(e.gullet.popToken());e.gullet.consumeSpaces();var n=Rde(e);return vj(e,r,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});rt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,r=bj(e.gullet.popToken()),n=e.gullet.popToken(),o=e.gullet.popToken();return vj(e,r,o,t==="\\\\globalfuture"),e.gullet.pushToken(o),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var Ug=function(e,t,r){var n=$i.math[e]&&$i.math[e].replace,o=$5(n||e,t,r);if(!o)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return o},J5=function(e,t,r,n){var o=r.havingBaseStyle(t),s=ae.makeSpan(n.concat(o.sizingClasses(r)),[e],r),a=o.sizeMultiplier/r.sizeMultiplier;return s.height*=a,s.depth*=a,s.maxFontSize=o.sizeMultiplier,s},_j=function(e,t,r){var n=t.havingBaseStyle(r),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=$e(o),e.height-=o,e.depth+=o},Pde=function(e,t,r,n,o,s){var a=ae.makeSymbol(e,"Main-Regular",o,n),l=J5(a,t,n,s);return r&&_j(l,n,t),l},Ode=function(e,t,r,n){return ae.makeSymbol(e,"Size"+t+"-Regular",r,n)},yj=function(e,t,r,n,o,s){var a=Ode(e,t,o,n),l=J5(ae.makeSpan(["delimsizing","size"+t],[a],n),St.TEXT,n,s);return r&&_j(l,n,St.TEXT),l},k5=function(e,t,r){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var o=ae.makeSpan(["delimsizinginner",n],[ae.makeSpan([],[ae.makeSymbol(e,t,r)])]);return{type:"elem",elem:o}},E5=function(e,t,r){var n=Aa["Size4-Regular"][e.charCodeAt(0)]?Aa["Size4-Regular"][e.charCodeAt(0)][4]:Aa["Size1-Regular"][e.charCodeAt(0)][4],o=new Ma("inner",Vce(e,Math.round(1e3*t))),s=new Ps([o],{width:$e(n),height:$e(t),style:"width:"+$e(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=ae.makeSvgSpan([],[s],r);return a.height=t,a.style.height=$e(t),a.style.width=$e(n),{type:"elem",elem:a}},j5=.008,aw={type:"kern",size:-1*j5},Fde=["|","\\lvert","\\rvert","\\vert"],zde=["\\|","\\lVert","\\rVert","\\Vert"],wj=function(e,t,r,n,o,s){var a,l,c,d,u="",h=0;a=c=d=e,l=null;var f="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"):Nt.contains(Fde,e)?(c="\u2223",u="vert",h=333):Nt.contains(zde,e)?(c="\u2225",u="doublevert",h=556):e==="["||e==="\\lbrack"?(a="\u23A1",c="\u23A2",d="\u23A3",f="Size4-Regular",u="lbrack",h=667):e==="]"||e==="\\rbrack"?(a="\u23A4",c="\u23A5",d="\u23A6",f="Size4-Regular",u="rbrack",h=667):e==="\\lfloor"||e==="\u230A"?(c=a="\u23A2",d="\u23A3",f="Size4-Regular",u="lfloor",h=667):e==="\\lceil"||e==="\u2308"?(a="\u23A1",c=d="\u23A2",f="Size4-Regular",u="lceil",h=667):e==="\\rfloor"||e==="\u230B"?(c=a="\u23A5",d="\u23A6",f="Size4-Regular",u="rfloor",h=667):e==="\\rceil"||e==="\u2309"?(a="\u23A4",c=d="\u23A5",f="Size4-Regular",u="rceil",h=667):e==="("||e==="\\lparen"?(a="\u239B",c="\u239C",d="\u239D",f="Size4-Regular",u="lparen",h=875):e===")"||e==="\\rparen"?(a="\u239E",c="\u239F",d="\u23A0",f="Size4-Regular",u="rparen",h=875):e==="\\{"||e==="\\lbrace"?(a="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(a="\u23A7",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(a="\u23AB",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(a="\u23A7",d="\u23AD",c="\u23AA",f="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(a="\u23AB",d="\u23A9",c="\u23AA",f="Size4-Regular");var m=Ug(a,f,o),g=m.height+m.depth,w=Ug(c,f,o),_=w.height+w.depth,E=Ug(d,f,o),A=E.height+E.depth,L=0,O=1;if(l!==null){var U=Ug(l,f,o);L=U.height+U.depth,O=2}var Y=g+A+L,oe=Math.max(0,Math.ceil((t-Y)/(O*_))),te=Y+oe*O*_,Z=n.fontMetrics().axisHeight;r&&(Z*=n.sizeMultiplier);var ve=te/2-Z,Pe=[];if(u.length>0){var Ee=te-g-A,Oe=Math.round(te*1e3),Xe=qce(u,Math.round(Ee*1e3)),dt=new Ma(u,Xe),be=(h/1e3).toFixed(3)+"em",we=(Oe/1e3).toFixed(3)+"em",X=new Ps([dt],{width:be,height:we,viewBox:"0 0 "+h+" "+Oe}),R=ae.makeSvgSpan([],[X],n);R.height=Oe/1e3,R.style.width=be,R.style.height=we,Pe.push({type:"elem",elem:R})}else{if(Pe.push(k5(d,f,o)),Pe.push(aw),l===null){var ne=te-g-A+2*j5;Pe.push(E5(c,ne,n))}else{var me=(te-g-A-L)/2+2*j5;Pe.push(E5(c,me,n)),Pe.push(aw),Pe.push(k5(l,f,o)),Pe.push(aw),Pe.push(E5(c,me,n))}Pe.push(aw),Pe.push(k5(a,f,o))}var G=n.havingBaseStyle(St.TEXT),Et=ae.makeVList({positionType:"bottom",positionData:ve,children:Pe},G);return J5(ae.makeSpan(["delimsizing","mult"],[Et],G),St.TEXT,n,s)},T5=80,I5=.08,L5=function(e,t,r,n,o){var s=Wce(e,n,r),a=new Ma(e,s),l=new Ps([a],{width:"400em",height:$e(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return ae.makeSvgSpan(["hide-tail"],[l],o)},Bde=function(e,t){var r=t.havingBaseSizing(),n=kj("\\surd",e*r.sizeMultiplier,Sj,r),o=r.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l=0,c=0,d=0,u;return n.type==="small"?(d=1e3+1e3*s+T5,e<1?o=1:e<1.4&&(o=.7),l=(1+s+I5)/o,c=(1+s)/o,a=L5("sqrtMain",l,d,s,t),a.style.minWidth="0.853em",u=.833/o):n.type==="large"?(d=(1e3+T5)*jg[n.size],c=(jg[n.size]+s)/o,l=(jg[n.size]+s+I5)/o,a=L5("sqrtSize"+n.size,l,d,s,t),a.style.minWidth="1.02em",u=1/o):(l=e+s+I5,c=e+s,d=Math.floor(1e3*e+s)+T5,a=L5("sqrtTall",l,d,s,t),a.style.minWidth="0.742em",u=1.056),a.height=c,a.style.height=$e(l),{span:a,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},xj=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Hde=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Cj=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],jg=[0,1.2,1.8,2.4,3],Ude=function(e,t,r,n,o){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Nt.contains(xj,e)||Nt.contains(Cj,e))return yj(e,t,!1,r,n,o);if(Nt.contains(Hde,e))return wj(e,jg[t],!1,r,n,o);throw new Be("Illegal delimiter: '"+e+"'")},jde=[{type:"small",style:St.SCRIPTSCRIPT},{type:"small",style:St.SCRIPT},{type:"small",style:St.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Wde=[{type:"small",style:St.SCRIPTSCRIPT},{type:"small",style:St.SCRIPT},{type:"small",style:St.TEXT},{type:"stack"}],Sj=[{type:"small",style:St.SCRIPTSCRIPT},{type:"small",style:St.SCRIPT},{type:"small",style:St.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Vde=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.")},kj=function(e,t,r,n){for(var o=Math.min(2,3-n.style.size),s=o;s<r.length&&r[s].type!=="stack";s++){var a=Ug(e,Vde(r[s]),"math"),l=a.height+a.depth;if(r[s].type==="small"){var c=n.havingBaseStyle(r[s].style);l*=c.sizeMultiplier}if(l>t)return r[s]}return r[r.length-1]},Ej=function(e,t,r,n,o,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var a;Nt.contains(Cj,e)?a=jde:Nt.contains(xj,e)?a=Sj:a=Wde;var l=kj(e,t,a,n);return l.type==="small"?Pde(e,l.style,r,n,o,s):l.type==="large"?yj(e,l.size,r,n,o,s):wj(e,t,r,n,o,s)},qde=function(e,t,r,n,o,s){var a=n.fontMetrics().axisHeight*n.sizeMultiplier,l=901,c=5/n.fontMetrics().ptPerEm,d=Math.max(t-a,r+a),u=Math.max(d/500*l,2*d-c);return Ej(e,u,!0,n,o,s)},Ol={sqrtImage:Bde,sizedDelim:Ude,sizeToMaxHeight:jg,customSizedDelim:Ej,leftRightDelim:qde},DU={"\\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}},Kde=["(","\\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 Cw(i,e){var t=ww(i);if(t&&Nt.contains(Kde,t.text))return t;throw t?new Be("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new Be("Invalid delimiter type '"+i.type+"'",i)}rt({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=Cw(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:DU[i.funcName].size,mclass:DU[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?ae.makeSpan([i.mclass]):Ol.sizedDelim(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(os(i.delim,i.mode));var t=new Ne.MathNode("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=$e(Ol.sizeToMaxHeight[i.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function MU(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}rt({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 Be("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:Cw(e[0],i).text,color:t}}});rt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Cw(e[0],i),r=i.parser;++r.leftrightDepth;var n=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Qt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:n,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(i,e)=>{MU(i);for(var t=jr(i.body,e,!0,["mopen","mclose"]),r=0,n=0,o=!1,s=0;s<t.length;s++)t[s].isMiddle?o=!0:(r=Math.max(t[s].height,r),n=Math.max(t[s].depth,n));r*=e.sizeMultiplier,n*=e.sizeMultiplier;var a;if(i.left==="."?a=$g(e,["mopen"]):a=Ol.leftRightDelim(i.left,r,n,e,i.mode,["mopen"]),t.unshift(a),o)for(var l=1;l<t.length;l++){var c=t[l],d=c.isMiddle;d&&(t[l]=Ol.leftRightDelim(d.delim,r,n,d.options,i.mode,[]))}var u;if(i.right===".")u=$g(e,["mclose"]);else{var h=i.rightColor?e.withColor(i.rightColor):e;u=Ol.leftRightDelim(i.right,r,n,h,i.mode,["mclose"])}return t.push(u),ae.makeSpan(["minner"],t,e)},mathmlBuilder:(i,e)=>{MU(i);var t=fo(i.body,e);if(i.left!=="."){var r=new Ne.MathNode("mo",[os(i.left,i.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(i.right!=="."){var n=new Ne.MathNode("mo",[os(i.right,i.mode)]);n.setAttribute("fence","true"),i.rightColor&&n.setAttribute("mathcolor",i.rightColor),t.push(n)}return Y5(t)}});rt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Cw(e[0],i);if(!i.parser.leftrightDepth)throw new Be("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;if(i.delim===".")t=$g(e,[]);else{t=Ol.sizedDelim(i.delim,1,e,i.mode,[]);var r={delim:i.delim,options:e};t.isMiddle=r}return t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?os("|","text"):os(i.delim,i.mode),r=new Ne.MathNode("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var e6=(i,e)=>{var t=ae.wrapFragment(bi(i.body,e),e),r=i.label.slice(1),n=e.sizeMultiplier,o,s=0,a=Nt.isCharacterBox(i.body);if(r==="sout")o=ae.makeSpan(["stretchy","sout"]),o.height=e.fontMetrics().defaultRuleThickness/n,s=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var l=dr({number:.6,unit:"pt"},e),c=dr({number:.35,unit:"ex"},e),d=e.havingBaseSizing();n=n/d.sizeMultiplier;var u=t.height+t.depth+l+c;t.style.paddingLeft=$e(u/2+l);var h=Math.floor(1e3*u*n),f=Uce(h),m=new Ps([new Ma("phase",f)],{width:"400em",height:$e(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});o=ae.makeSvgSpan(["hide-tail"],[m],e),o.style.height=$e(u),s=t.depth+l+c}else{/cancel/.test(r)?a||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var g=0,w=0,_=0;/box/.test(r)?(_=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(r==="colorbox"?0:_),w=g):r==="angl"?(_=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*_,w=Math.max(0,.25-t.depth)):(g=a?.2:0,w=g),o=zl.encloseSpan(t,r,g,w,e),/fbox|boxed|fcolorbox/.test(r)?(o.style.borderStyle="solid",o.style.borderWidth=$e(_)):r==="angl"&&_!==.049&&(o.style.borderTopWidth=$e(_),o.style.borderRightWidth=$e(_)),s=t.depth+w,i.backgroundColor&&(o.style.backgroundColor=i.backgroundColor,i.borderColor&&(o.style.borderColor=i.borderColor))}var E;if(i.backgroundColor)E=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:t,shift:0}]},e);else{var A=/cancel|phase/.test(r)?["svg-align"]:[];E=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:A}]},e)}return/cancel/.test(r)&&(E.height=t.height,E.depth=t.depth),/cancel/.test(r)&&!a?ae.makeSpan(["mord","cancel-lap"],[E],e):ae.makeSpan(["mord"],[E],e)},t6=(i,e)=>{var t=0,r=new Ne.MathNode(i.label.indexOf("colorbox")>-1?"mpadded":"menclose",[zi(i.body,e)]);switch(i.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+n+"em solid "+String(i.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&r.setAttribute("mathbackground",i.backgroundColor),r};rt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(i,e,t){var{parser:r,funcName:n}=i,o=Qt(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:r.mode,label:n,backgroundColor:o,body:s}},htmlBuilder:e6,mathmlBuilder:t6});rt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(i,e,t){var{parser:r,funcName:n}=i,o=Qt(e[0],"color-token").color,s=Qt(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:r.mode,label:n,backgroundColor:s,borderColor:o,body:a}},htmlBuilder:e6,mathmlBuilder:t6});rt({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]}}});rt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:r}=i,n=e[0];return{type:"enclose",mode:t.mode,label:r,body:n}},htmlBuilder:e6,mathmlBuilder:t6});rt({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 Tj={};function Na(i){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l<t.length;++l)Tj[t[l]]=a;o&&(pw[e]=o),s&&(mw[e]=s)}var Ij={};function P(i,e){Ij[i]=e}function NU(i){var e=[];i.consumeSpaces();var t=i.fetch().text;for(t==="\\relax"&&(i.consume(),i.consumeSpaces(),t=i.fetch().text);t==="\\hline"||t==="\\hdashline";)i.consume(),e.push(t==="\\hdashline"),i.consumeSpaces(),t=i.fetch().text;return e}var Sw=i=>{var e=i.parser.settings;if(!e.displayMode)throw new Be("{"+i.envName+"} can be used only in display mode.")};function i6(i){if(i.indexOf("ed")===-1)return i.indexOf("*")===-1}function fd(i,e,t){var{hskipBeforeAndAfter:r,addJot:n,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 f=i.gullet.expandMacroAsText("\\arraystretch");if(f==null)s=1;else if(s=parseFloat(f),!s||s<0)throw new Be("Invalid \\arraystretch: "+f)}i.gullet.beginGroup();var m=[],g=[m],w=[],_=[],E=l!=null?[]:void 0;function A(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function L(){E&&(i.gullet.macros.get("\\df@tag")?(E.push(i.subparse([new Da("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):E.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),_.push(NU(i));;){var O=i.parseExpression(!1,c?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup(),O={type:"ordgroup",mode:i.mode,body:O},t&&(O={type:"styling",mode:i.mode,style:t,body:[O]}),m.push(O);var U=i.fetch().text;if(U==="&"){if(u&&m.length===u){if(c||a)throw new Be("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(U==="\\end"){L(),m.length===1&&O.type==="styling"&&O.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),_.length<g.length+1&&_.push([]);break}else if(U==="\\\\"){i.consume();var Y=void 0;i.gullet.future().text!==" "&&(Y=i.parseSizeGroup(!0)),w.push(Y?Y.value:null),L(),_.push(NU(i)),m=[],g.push(m),A()}else throw new Be("Expected & or \\\\ or \\cr or \\end",i.nextToken)}return i.gullet.endGroup(),i.gullet.endGroup(),{type:"array",mode:i.mode,addJot:n,arraystretch:s,body:g,cols:o,rowGaps:w,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:a,tags:E,leqno:h}}function r6(i){return i.slice(0,1)==="d"?"display":"text"}var Ra=function(e,t){var r,n,o=e.body.length,s=e.hLinesBeforeRow,a=0,l=new Array(o),c=[],d=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,h=5*u;if(e.colSeparationType&&e.colSeparationType==="small"){var f=t.havingStyle(St.SCRIPT).sizeMultiplier;h=.2778*(f/t.sizeMultiplier)}var m=e.colSeparationType==="CD"?dr({number:3,unit:"ex"},t):12*u,g=3*u,w=e.arraystretch*m,_=.7*w,E=.3*w,A=0;function L(Ko){for(var hr=0;hr<Ko.length;++hr)hr>0&&(A+=.25),c.push({pos:A,isDashed:Ko[hr]})}for(L(s[0]),r=0;r<e.body.length;++r){var O=e.body[r],U=_,Y=E;a<O.length&&(a=O.length);var oe=new Array(O.length);for(n=0;n<O.length;++n){var te=bi(O[n],t);Y<te.depth&&(Y=te.depth),U<te.height&&(U=te.height),oe[n]=te}var Z=e.rowGaps[r],ve=0;Z&&(ve=dr(Z,t),ve>0&&(ve+=E,Y<ve&&(Y=ve),ve=0)),e.addJot&&(Y+=g),oe.height=U,oe.depth=Y,A+=U,oe.pos=A,A+=Y+ve,l[r]=oe,L(s[r+1])}var Pe=A/2+t.fontMetrics().axisHeight,Ee=e.cols||[],Oe=[],Xe,dt,be=[];if(e.tags&&e.tags.some(Ko=>Ko))for(r=0;r<o;++r){var we=l[r],X=we.pos-Pe,R=e.tags[r],ne=void 0;R===!0?ne=ae.makeSpan(["eqn-num"],[],t):R===!1?ne=ae.makeSpan([],[],t):ne=ae.makeSpan([],jr(R,t,!0),t),ne.depth=we.depth,ne.height=we.height,be.push({type:"elem",elem:ne,shift:X})}for(n=0,dt=0;n<a||dt<Ee.length;++n,++dt){for(var me=Ee[dt]||{},G=!0;me.type==="separator";){if(G||(Xe=ae.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(t.fontMetrics().doubleRuleSep),Oe.push(Xe)),me.separator==="|"||me.separator===":"){var Et=me.separator==="|"?"solid":"dashed",Ot=ae.makeSpan(["vertical-separator"],[],t);Ot.style.height=$e(A),Ot.style.borderRightWidth=$e(d),Ot.style.borderRightStyle=Et,Ot.style.margin="0 "+$e(-d/2);var ai=A-Pe;ai&&(Ot.style.verticalAlign=$e(-ai)),Oe.push(Ot)}else throw new Be("Invalid separator type: "+me.separator);dt++,me=Ee[dt]||{},G=!1}if(!(n>=a)){var Ti=void 0;(n>0||e.hskipBeforeAndAfter)&&(Ti=Nt.deflt(me.pregap,h),Ti!==0&&(Xe=ae.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(Ti),Oe.push(Xe)));var kt=[];for(r=0;r<o;++r){var Ei=l[r],fi=Ei[n];if(fi){var xo=Ei.pos-Pe;fi.depth=Ei.depth,fi.height=Ei.height,kt.push({type:"elem",elem:fi,shift:xo})}}kt=ae.makeVList({positionType:"individualShift",children:kt},t),kt=ae.makeSpan(["col-align-"+(me.align||"c")],[kt]),Oe.push(kt),(n<a-1||e.hskipBeforeAndAfter)&&(Ti=Nt.deflt(me.postgap,h),Ti!==0&&(Xe=ae.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(Ti),Oe.push(Xe)))}}if(l=ae.makeSpan(["mtable"],Oe),c.length>0){for(var ro=ae.makeLineSpan("hline",t,d),kc=ae.makeLineSpan("hdashline",t,d),Ec=[{type:"elem",elem:l,shift:0}];c.length>0;){var rl=c.pop(),ru=rl.pos-Pe;rl.isDashed?Ec.push({type:"elem",elem:kc,shift:ru}):Ec.push({type:"elem",elem:ro,shift:ru})}l=ae.makeVList({positionType:"individualShift",children:Ec},t)}if(be.length===0)return ae.makeSpan(["mord"],[l],t);var Or=ae.makeVList({positionType:"individualShift",children:be},t);return Or=ae.makeSpan(["tag"],[Or],t),ae.makeFragment([l,Or])},$de={c:"center ",l:"left ",r:"right "},Pa=function(e,t){for(var r=[],n=new Ne.MathNode("mtd",[],["mtr-glue"]),o=new Ne.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var a=e.body[s],l=[],c=0;c<a.length;c++)l.push(new Ne.MathNode("mtd",[zi(a[c],t)]));e.tags&&e.tags[s]&&(l.unshift(n),l.push(n),e.leqno?l.unshift(o):l.push(o)),r.push(new Ne.MathNode("mtr",l))}var d=new Ne.MathNode("mtable",r),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",$e(u));var h="",f="";if(e.cols&&e.cols.length>0){var m=e.cols,g="",w=!1,_=0,E=m.length;m[0].type==="separator"&&(h+="top ",_=1),m[m.length-1].type==="separator"&&(h+="bottom ",E-=1);for(var A=_;A<E;A++)m[A].type==="align"?(f+=$de[m[A].align],w&&(g+="none "),w=!0):m[A].type==="separator"&&w&&(g+=m[A].separator==="|"?"solid ":"dashed ",w=!1);d.setAttribute("columnalign",f.trim()),/[sd]/.test(g)&&d.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var L=e.cols||[],O="",U=1;U<L.length;U++)O+=U%2?"0em ":"1em ";d.setAttribute("columnspacing",O.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var Y="",oe=e.hLinesBeforeRow;h+=oe[0].length>0?"left ":"",h+=oe[oe.length-1].length>0?"right ":"";for(var te=1;te<oe.length-1;te++)Y+=oe[te].length===0?"none ":oe[te][0]?"dashed ":"solid ";return/[sd]/.test(Y)&&d.setAttribute("rowlines",Y.trim()),h!==""&&(d=new Ne.MathNode("menclose",[d]),d.setAttribute("notation",h.trim())),e.arraystretch&&e.arraystretch<1&&(d=new Ne.MathNode("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},Lj=function(e,t){e.envName.indexOf("ed")===-1&&Sw(e);var r=[],n=e.envName.indexOf("at")>-1?"alignat":"align",o=e.envName==="split",s=fd(e.parser,{cols:r,addJot:!0,autoTag:o?void 0:i6(e.envName),emptySingleRow:!0,colSeparationType:n,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;u<t[0].body.length;u++){var h=Qt(t[0].body[u],"textord");d+=h.text}a=Number(d),l=a*2}var f=!l;s.body.forEach(function(_){for(var E=1;E<_.length;E+=2){var A=Qt(_[E],"styling"),L=Qt(A.body[0],"ordgroup");L.body.unshift(c)}if(f)l<_.length&&(l=_.length);else{var O=_.length/2;if(a<O)throw new Be("Too many math in a row: "+("expected "+a+", but got "+O),_[0])}});for(var m=0;m<l;++m){var g="r",w=0;m%2===1?g="l":m>0&&f&&(w=1),r[m]={type:"align",align:g,pregap:w,postgap:0}}return s.colSeparationType=f?"align":"alignat",s};Na({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=ww(e[0]),r=t?[e[0]]:Qt(e[0],"ordgroup").body,n=r.map(function(s){var a=Q5(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 Be("Unknown column alignment: "+l,s)}),o={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return fd(i.parser,o,r6(i.envName))},htmlBuilder:Ra,mathmlBuilder:Pa});Na({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",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var n=i.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new Be("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),r.cols=[{type:"align",align:t}]}}var o=fd(i.parser,r,r6(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:Ra,mathmlBuilder:Pa});Na({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=fd(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=ww(e[0]),r=t?[e[0]]:Qt(e[0],"ordgroup").body,n=r.map(function(s){var a=Q5(s),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Be("Unknown column alignment: "+l,s)});if(n.length>1)throw new Be("{subarray} can contain only one column");var o={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=fd(i.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new Be("{subarray} can contain only one column");return o},htmlBuilder:Ra,mathmlBuilder:Pa});Na({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=fd(i.parser,e,r6(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:Ra,mathmlBuilder:Pa});Na({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Lj,htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){Nt.contains(["gather","gather*"],i.envName)&&Sw(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:i6(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return fd(i.parser,e,"display")},htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Lj,htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){Sw(i);var e={autoTag:i6(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return fd(i.parser,e,"display")},htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["CD"],props:{numArgs:0},handler(i){return Sw(i),Nde(i.parser)},htmlBuilder:Ra,mathmlBuilder:Pa});P("\\nonumber","\\gdef\\@eqnsw{0}");P("\\notag","\\nonumber");rt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new Be(i.funcName+" valid only within array environment")}});var RU=Tj;rt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:r}=i,n=e[0];if(n.type!=="ordgroup")throw new Be("Invalid environment name",n);for(var o="",s=0;s<n.body.length;++s)o+=Qt(n.body[s],"textord").text;if(r==="\\begin"){if(!RU.hasOwnProperty(o))throw new Be("No such environment: "+o,n);var a=RU[o],{args:l,optArgs:c}=t.parseArguments("\\begin{"+o+"}",a),d={mode:t.mode,envName:o,parser:t},u=a.handler(d,l,c);t.expect("\\end",!1);var h=t.nextToken,f=Qt(t.parseFunction(),"environment");if(f.name!==o)throw new Be("Mismatch: \\begin{"+o+"} matched by \\end{"+f.name+"}",h);return u}return{type:"environment",mode:t.mode,name:o,nameGroup:n}}});var Aj=(i,e)=>{var t=i.font,r=e.withFont(t);return bi(i.body,r)},Dj=(i,e)=>{var t=i.font,r=e.withFont(t);return zi(i.body,r)},PU={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};rt({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:r}=i,n=gw(e[0]),o=r;return o in PU&&(o=PU[o]),{type:"font",mode:t.mode,font:o.slice(1),body:n}},htmlBuilder:Aj,mathmlBuilder:Dj});rt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,r=e[0],n=Nt.isCharacterBox(r);return{type:"mclass",mode:t.mode,mclass:xw(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:n}}});rt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:r,breakOnTokenText:n}=i,{mode:o}=t,s=t.parseExpression(!0,n),a="math"+r.slice(1);return{type:"font",mode:o,font:a,body:{type:"ordgroup",mode:t.mode,body:s}}},htmlBuilder:Aj,mathmlBuilder:Dj});var Mj=(i,e)=>{var t=e;return i==="display"?t=t.id>=St.SCRIPT.id?t.text():St.DISPLAY:i==="text"&&t.size===St.DISPLAY.size?t=St.TEXT:i==="script"?t=St.SCRIPT:i==="scriptscript"&&(t=St.SCRIPTSCRIPT),t},n6=(i,e)=>{var t=Mj(i.size,e.style),r=t.fracNum(),n=t.fracDen(),o;o=e.havingStyle(r);var s=bi(i.numer,o,e);if(i.continued){var a=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}o=e.havingStyle(n);var c=bi(i.denom,o,e),d,u,h;i.hasBarLine?(i.barSize?(u=dr(i.barSize,e),d=ae.makeLineSpan("frac-line",e,u)):d=ae.makeLineSpan("frac-line",e),u=d.height,h=d.height):(d=null,u=0,h=e.fontMetrics().defaultRuleThickness);var f,m,g;t.size===St.DISPLAY.size||i.size==="display"?(f=e.fontMetrics().num1,u>0?m=3*h:m=7*h,g=e.fontMetrics().denom1):(u>0?(f=e.fontMetrics().num2,m=h):(f=e.fontMetrics().num3,m=3*h),g=e.fontMetrics().denom2);var w;if(d){var E=e.fontMetrics().axisHeight;f-s.depth-(E+.5*u)<m&&(f+=m-(f-s.depth-(E+.5*u))),E-.5*u-(c.height-g)<m&&(g+=m-(E-.5*u-(c.height-g)));var A=-(E-.5*u);w=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:d,shift:A},{type:"elem",elem:s,shift:-f}]},e)}else{var _=f-s.depth-(c.height-g);_<m&&(f+=.5*(m-_),g+=.5*(m-_)),w=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:s,shift:-f}]},e)}o=e.havingStyle(t),w.height*=o.sizeMultiplier/e.sizeMultiplier,w.depth*=o.sizeMultiplier/e.sizeMultiplier;var L;t.size===St.DISPLAY.size?L=e.fontMetrics().delim1:t.size===St.SCRIPTSCRIPT.size?L=e.havingStyle(St.SCRIPT).fontMetrics().delim2:L=e.fontMetrics().delim2;var O,U;return i.leftDelim==null?O=$g(e,["mopen"]):O=Ol.customSizedDelim(i.leftDelim,L,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?U=ae.makeSpan([]):i.rightDelim==null?U=$g(e,["mclose"]):U=Ol.customSizedDelim(i.rightDelim,L,!0,e.havingStyle(t),i.mode,["mclose"]),ae.makeSpan(["mord"].concat(o.sizingClasses(e)),[O,ae.makeSpan(["mfrac"],[w]),U],e)},o6=(i,e)=>{var t=new Ne.MathNode("mfrac",[zi(i.numer,e),zi(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var r=dr(i.barSize,e);t.setAttribute("linethickness",$e(r))}var n=Mj(i.size,e.style);if(n.size!==e.style.size){t=new Ne.MathNode("mstyle",[t]);var o=n.size===St.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 Ne.MathNode("mo",[new Ne.TextNode(i.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),i.rightDelim!=null){var l=new Ne.MathNode("mo",[new Ne.TextNode(i.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return Y5(s)}return t};rt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0],o=e[1],s,a=null,l=null,c="auto";switch(r){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(r){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:o,hasBarLine:s,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:n6,mathmlBuilder:o6});rt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0],o=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});rt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:r}=i,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:r}}});var OU=["display","text","script","scriptscript"],FU=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};rt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,r=e[4],n=e[5],o=gw(e[0]),s=o.type==="atom"&&o.family==="open"?FU(o.text):null,a=gw(e[1]),l=a.type==="atom"&&a.family==="close"?FU(a.text):null,c=Qt(e[2],"size"),d,u=null;c.isBlank?d=!0:(u=c.value,d=u.number>0);var h="auto",f=e[3];if(f.type==="ordgroup"){if(f.body.length>0){var m=Qt(f.body[0],"textord");h=OU[Number(m.text)]}}else f=Qt(f,"textord"),h=OU[Number(f.text)];return{type:"genfrac",mode:t.mode,numer:r,denom:n,continued:!1,hasBarLine:d,barSize:u,leftDelim:s,rightDelim:l,size:h}},htmlBuilder:n6,mathmlBuilder:o6});rt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:r,token:n}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Qt(e[0],"size").value,token:n}}});rt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0],o=Ece(Qt(e[1],"infix").size),s=e[2],a=o.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:s,continued:!1,hasBarLine:a,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:n6,mathmlBuilder:o6});var Nj=(i,e)=>{var t=e.style,r,n;i.type==="supsub"?(r=i.sup?bi(i.sup,e.havingStyle(t.sup()),e):bi(i.sub,e.havingStyle(t.sub()),e),n=Qt(i.base,"horizBrace")):n=Qt(i,"horizBrace");var o=bi(n.base,e.havingBaseStyle(St.DISPLAY)),s=zl.svgSpan(n,e),a;if(n.isOver?(a=ae.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=ae.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")),r){var l=ae.makeSpan(["mord",n.isOver?"mover":"munder"],[a],e);n.isOver?a=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},e):a=ae.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return ae.makeSpan(["mord",n.isOver?"mover":"munder"],[a],e)},Gde=(i,e)=>{var t=zl.mathMLnode(i.label);return new Ne.MathNode(i.isOver?"mover":"munder",[zi(i.base,e),t])};rt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:r}=i;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:Nj,mathmlBuilder:Gde});rt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[1],n=Qt(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:kr(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=jr(i.body,e,!1);return ae.makeAnchor(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=hd(i.body,e);return t instanceof uo||(t=new uo("mrow",[t])),t.setAttribute("href",i.href),t}});rt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=Qt(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],o=0;o<r.length;o++){var s=r[o];s==="~"&&(s="\\textasciitilde"),n.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:t.mode,font:"\\texttt",body:n};return{type:"href",mode:t.mode,href:r,body:kr(a)}}});rt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(i,e){var{parser:t}=i;return{type:"hbox",mode:t.mode,body:kr(e[0])}},htmlBuilder(i,e){var t=jr(i.body,e,!1);return ae.makeFragment(t)},mathmlBuilder(i,e){return new Ne.MathNode("mrow",fo(i.body,e))}});rt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:r,token:n}=i,o=Qt(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(r){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<c.length;d++){var u=c[d].split("=");if(u.length!==2)throw new Be("Error parsing key-value for \\htmlData");l["data-"+u[0].trim()]=u[1].trim()}a={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(a)?{type:"html",mode:t.mode,attributes:l,body:kr(s)}:t.formatUnsupportedCmd(r)},htmlBuilder:(i,e)=>{var t=jr(i.body,e,!1),r=["enclosing"];i.attributes.class&&r.push(...i.attributes.class.trim().split(/\s+/));var n=ae.makeSpan(r,t,e);for(var o in i.attributes)o!=="class"&&i.attributes.hasOwnProperty(o)&&n.setAttribute(o,i.attributes[o]);return n},mathmlBuilder:(i,e)=>hd(i.body,e)});rt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:kr(e[0]),mathml:kr(e[1])}},htmlBuilder:(i,e)=>{var t=jr(i.html,e,!1);return ae.makeFragment(t)},mathmlBuilder:(i,e)=>hd(i.mathml,e)});var A5=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 Be("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!ZU(r))throw new Be("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};rt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:r}=i,n={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(t[0])for(var l=Qt(t[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(u.length===2){var h=u[1].trim();switch(u[0].trim()){case"alt":a=h;break;case"width":n=A5(h);break;case"height":o=A5(h);break;case"totalheight":s=A5(h);break;default:throw new Be("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var f=Qt(e[0],"url").url;return a===""&&(a=f,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:r.mode,alt:a,width:n,height:o,totalheight:s,src:f}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(i,e)=>{var t=dr(i.height,e),r=0;i.totalheight.number>0&&(r=dr(i.totalheight,e)-t);var n=0;i.width.number>0&&(n=dr(i.width,e));var o={height:$e(t+r)};n>0&&(o.width=$e(n)),r>0&&(o.verticalAlign=$e(-r));var s=new O5(i.src,i.alt,o);return s.height=t,s.depth=r,s},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mglyph",[]);t.setAttribute("alt",i.alt);var r=dr(i.height,e),n=0;if(i.totalheight.number>0&&(n=dr(i.totalheight,e)-r,t.setAttribute("valign",$e(-n))),t.setAttribute("height",$e(r+n)),i.width.number>0){var o=dr(i.width,e);t.setAttribute("width",$e(o))}return t.setAttribute("src",i.src),t}});rt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:r}=i,n=Qt(e[0],"size");if(t.settings.strict){var o=r[1]==="m",s=n.value.unit==="mu";o?(s||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(i,e){return ae.makeGlue(i.dimension,e)},mathmlBuilder(i,e){var t=dr(i.dimension,e);return new Ne.SpaceNode(t)}});rt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:n}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=ae.makeSpan([],[bi(i.body,e)]),t=ae.makeSpan(["inner"],[t],e)):t=ae.makeSpan(["inner"],[bi(i.body,e)]);var r=ae.makeSpan(["fix"],[]),n=ae.makeSpan([i.alignment],[t,r],e),o=ae.makeSpan(["strut"]);return o.style.height=$e(n.height+n.depth),n.depth&&(o.style.verticalAlign=$e(-n.depth)),n.children.unshift(o),n=ae.makeSpan(["thinbox"],[n],e),ae.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mpadded",[zi(i.body,e)]);if(i.alignment!=="rlap"){var r=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});rt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:r}=i,n=r.mode;r.switchMode("math");var o=t==="\\("?"\\)":"$",s=r.parseExpression(!1,o);return r.expect(o),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:s}}});rt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new Be("Mismatched "+i.funcName)}});var zU=(i,e)=>{switch(e.style.size){case St.DISPLAY.size:return i.display;case St.TEXT.size:return i.text;case St.SCRIPT.size:return i.script;case St.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};rt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:kr(e[0]),text:kr(e[1]),script:kr(e[2]),scriptscript:kr(e[3])}},htmlBuilder:(i,e)=>{var t=zU(i,e),r=jr(t,e,!1);return ae.makeFragment(r)},mathmlBuilder:(i,e)=>{var t=zU(i,e);return hd(t,e)}});var Rj=(i,e,t,r,n,o,s)=>{i=ae.makeSpan([],[i]);var a=t&&Nt.isCharacterBox(t),l,c;if(e){var d=bi(e,r.havingStyle(n.sup()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var u=bi(t,r.havingStyle(n.sub()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-u.height)}}var h;if(c&&l){var f=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+s;h=ae.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$e(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var m=i.height-s;h=ae.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i}]},r)}else if(c){var g=i.depth+s;h=ae.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$e(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return i;var w=[h];if(l&&o!==0&&!a){var _=ae.makeSpan(["mspace"],[],r);_.style.marginRight=$e(o),w.unshift(_)}return ae.makeSpan(["mop","op-limits"],w,r)},Pj=["\\smallint"],qf=(i,e)=>{var t,r,n=!1,o;i.type==="supsub"?(t=i.sup,r=i.sub,o=Qt(i.base,"op"),n=!0):o=Qt(i,"op");var s=e.style,a=!1;s.size===St.DISPLAY.size&&o.symbol&&!Nt.contains(Pj,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=ae.makeSymbol(o.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),d.length>0){var u=l.italic,h=ae.staticSvg(d+"Size"+(a?"2":"1"),e);l=ae.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 f=jr(o.body,e,!0);f.length===1&&f[0]instanceof ho?(l=f[0],l.classes[0]="mop"):l=ae.makeSpan(["mop"],f,e)}else{for(var m=[],g=1;g<o.name.length;g++)m.push(ae.mathsym(o.name[g],o.mode,e));l=ae.makeSpan(["mop"],m,e)}var w=0,_=0;return(l instanceof ho||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift&&(w=(l.height-l.depth)/2-e.fontMetrics().axisHeight,_=l.italic),n?Rj(l,t,r,e,s,_,w):(w&&(l.style.position="relative",l.style.top=$e(w)),l)},Gg=(i,e)=>{var t;if(i.symbol)t=new uo("mo",[os(i.name,i.mode)]),Nt.contains(Pj,i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new uo("mo",fo(i.body,e));else{t=new uo("mi",[new Mu(i.name.slice(1))]);var r=new uo("mo",[os("\u2061","text")]);i.parentIsSupSub?t=new uo("mrow",[t,r]):t=cj([t,r])}return t},Yde={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};rt({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:r}=i,n=r;return n.length===1&&(n=Yde[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:qf,mathmlBuilder:Gg});rt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:kr(r)}},htmlBuilder:qf,mathmlBuilder:Gg});var Xde={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};rt({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:qf,mathmlBuilder:Gg});rt({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:qf,mathmlBuilder:Gg});rt({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,r=t;return r.length===1&&(r=Xde[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:qf,mathmlBuilder:Gg});var Oj=(i,e)=>{var t,r,n=!1,o;i.type==="supsub"?(t=i.sup,r=i.sub,o=Qt(i.base,"operatorname"),n=!0):o=Qt(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=jr(a,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof ho&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=ae.makeSpan(["mop"],l,e)}else s=ae.makeSpan(["mop"],[],e);return n?Rj(s,t,r,e,e.style,0,0):s},Qde=(i,e)=>{for(var t=fo(i.body,e.withFont("mathrm")),r=!0,n=0;n<t.length;n++){var o=t[n];if(!(o instanceof Ne.SpaceNode))if(o instanceof Ne.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=o.children[0];o.children.length===1&&s instanceof Ne.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var a=t.map(d=>d.toText()).join("");t=[new Ne.TextNode(a)]}var l=new Ne.MathNode("mi",t);l.setAttribute("mathvariant","normal");var c=new Ne.MathNode("mo",[os("\u2061","text")]);return i.parentIsSupSub?new Ne.MathNode("mrow",[l,c]):Ne.newDocumentFragment([l,c])};rt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0];return{type:"operatorname",mode:t.mode,body:kr(n),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Oj,mathmlBuilder:Qde});P("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Pu({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?ae.makeFragment(jr(i.body,e,!1)):ae.makeSpan(["mord"],jr(i.body,e,!0),e)},mathmlBuilder(i,e){return hd(i.body,e,!0)}});rt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,r=e[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(i,e){var t=bi(i.body,e.havingCrampedStyle()),r=ae.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,o=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},e);return ae.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[new Ne.TextNode("\u203E")]);t.setAttribute("stretchy","true");var r=new Ne.MathNode("mover",[zi(i.body,e),t]);return r.setAttribute("accent","true"),r}});rt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"phantom",mode:t.mode,body:kr(r)}},htmlBuilder:(i,e)=>{var t=jr(i.body,e.withPhantom(),!1);return ae.makeFragment(t)},mathmlBuilder:(i,e)=>{var t=fo(i.body,e);return new Ne.MathNode("mphantom",t)}});rt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"hphantom",mode:t.mode,body:r}},htmlBuilder:(i,e)=>{var t=ae.makeSpan([],[bi(i.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var r=0;r<t.children.length;r++)t.children[r].height=0,t.children[r].depth=0;return t=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e),ae.makeSpan(["mord"],[t],e)},mathmlBuilder:(i,e)=>{var t=fo(kr(i.body),e),r=new Ne.MathNode("mphantom",t),n=new Ne.MathNode("mpadded",[r]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});rt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(i,e)=>{var t=ae.makeSpan(["inner"],[bi(i.body,e.withPhantom())]),r=ae.makeSpan(["fix"],[]);return ae.makeSpan(["mord","rlap"],[t,r],e)},mathmlBuilder:(i,e)=>{var t=fo(kr(i.body),e),r=new Ne.MathNode("mphantom",t),n=new Ne.MathNode("mpadded",[r]);return n.setAttribute("width","0px"),n}});rt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,r=Qt(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:r,body:n}},htmlBuilder(i,e){var t=bi(i.body,e),r=dr(i.dy,e);return ae.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mpadded",[zi(i.body,e)]),r=i.dy.number+i.dy.unit;return t.setAttribute("voffset",r),t}});rt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});rt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(i,e,t){var{parser:r}=i,n=t[0],o=Qt(e[0],"size"),s=Qt(e[1],"size");return{type:"rule",mode:r.mode,shift:n&&Qt(n,"size").value,width:o.value,height:s.value}},htmlBuilder(i,e){var t=ae.makeSpan(["mord","rule"],[],e),r=dr(i.width,e),n=dr(i.height,e),o=i.shift?dr(i.shift,e):0;return t.style.borderRightWidth=$e(r),t.style.borderTopWidth=$e(n),t.style.bottom=$e(o),t.width=r,t.height=n+o,t.depth=-o,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=dr(i.width,e),r=dr(i.height,e),n=i.shift?dr(i.shift,e):0,o=e.color&&e.getColor()||"black",s=new Ne.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",$e(t)),s.setAttribute("height",$e(r));var a=new Ne.MathNode("mpadded",[s]);return n>=0?a.setAttribute("height",$e(n)):(a.setAttribute("height",$e(n)),a.setAttribute("depth",$e(-n))),a.setAttribute("voffset",$e(n)),a}});function Fj(i,e,t){for(var r=jr(i,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,o=0;o<r.length;o++){var s=r[o].classes.indexOf("sizing");s<0?Array.prototype.push.apply(r[o].classes,e.sizingClasses(t)):r[o].classes[s+1]==="reset-size"+e.size&&(r[o].classes[s+1]="reset-size"+t.size),r[o].height*=n,r[o].depth*=n}return ae.makeFragment(r)}var BU=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Zde=(i,e)=>{var t=e.havingSize(i.size);return Fj(i.body,t,e)};rt({type:"sizing",names:BU,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:r,parser:n}=i,o=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:BU.indexOf(r)+1,body:o}},htmlBuilder:Zde,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),r=fo(i.body,t),n=new Ne.MathNode("mstyle",r);return n.setAttribute("mathsize",$e(t.sizeMultiplier)),n}});rt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:r}=i,n=!1,o=!1,s=t[0]&&Qt(t[0],"ordgroup");if(s)for(var a="",l=0;l<s.body.length;++l){var c=s.body[l];if(a=c.text,a==="t")n=!0;else if(a==="b")o=!0;else{n=!1,o=!1;break}}else n=!0,o=!0;var d=e[0];return{type:"smash",mode:r.mode,body:d,smashHeight:n,smashDepth:o}},htmlBuilder:(i,e)=>{var t=ae.makeSpan([],[bi(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0,t.children))for(var r=0;r<t.children.length;r++)t.children[r].height=0;if(i.smashDepth&&(t.depth=0,t.children))for(var n=0;n<t.children.length;n++)t.children[n].depth=0;var o=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e);return ae.makeSpan(["mord"],[o],e)},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mpadded",[zi(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});rt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:r}=i,n=t[0],o=e[0];return{type:"sqrt",mode:r.mode,body:o,index:n}},htmlBuilder(i,e){var t=bi(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=ae.wrapFragment(t,e);var r=e.fontMetrics(),n=r.defaultRuleThickness,o=n;e.style.id<St.TEXT.id&&(o=e.fontMetrics().xHeight);var s=n+o/4,a=t.height+t.depth+s+n,{span:l,ruleWidth:c,advanceWidth:d}=Ol.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=$e(d);var f=ae.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(St.SCRIPTSCRIPT),g=bi(i.index,m,e),w=.6*(f.height-f.depth),_=ae.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:g}]},e),E=ae.makeSpan(["root"],[_]);return ae.makeSpan(["mord","sqrt"],[E,f],e)}else return ae.makeSpan(["mord","sqrt"],[f],e)},mathmlBuilder(i,e){var{body:t,index:r}=i;return r?new Ne.MathNode("mroot",[zi(t,e),zi(r,e)]):new Ne.MathNode("msqrt",[zi(t,e)])}});var HU={display:St.DISPLAY,text:St.TEXT,script:St.SCRIPT,scriptscript:St.SCRIPTSCRIPT};rt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:r,parser:n}=i,o=n.parseExpression(!0,t),s=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:s,body:o}},htmlBuilder(i,e){var t=HU[i.style],r=e.havingStyle(t).withFont("");return Fj(i.body,r,e)},mathmlBuilder(i,e){var t=HU[i.style],r=e.havingStyle(t),n=fo(i.body,r),o=new Ne.MathNode("mstyle",n),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 Jde=function(e,t){var r=e.base;if(r)if(r.type==="op"){var n=r.limits&&(t.style.size===St.DISPLAY.size||r.alwaysHandleSupSub);return n?qf:null}else if(r.type==="operatorname"){var o=r.alwaysHandleSupSub&&(t.style.size===St.DISPLAY.size||r.limits);return o?Oj:null}else{if(r.type==="accent")return Nt.isCharacterBox(r.base)?Z5:null;if(r.type==="horizBrace"){var s=!e.sub;return s===r.isOver?Nj:null}else return null}else return null};Pu({type:"supsub",htmlBuilder(i,e){var t=Jde(i,e);if(t)return t(i,e);var{base:r,sup:n,sub:o}=i,s=bi(r,e),a,l,c=e.fontMetrics(),d=0,u=0,h=r&&Nt.isCharacterBox(r);if(n){var f=e.havingStyle(e.style.sup());a=bi(n,f,e),h||(d=s.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(o){var m=e.havingStyle(e.style.sub());l=bi(o,m,e),h||(u=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===St.DISPLAY?g=c.sup1:e.style.cramped?g=c.sup3:g=c.sup2;var w=e.sizeMultiplier,_=$e(.5/c.ptPerEm/w),E=null;if(l){var A=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");(s instanceof ho||A)&&(E=$e(-s.italic))}var L;if(a&&l){d=Math.max(d,g,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var O=c.defaultRuleThickness,U=4*O;if(d-a.depth-(l.height-u)<U){u=U-(d-a.depth)+l.height;var Y=.8*c.xHeight-(d-a.depth);Y>0&&(d+=Y,u-=Y)}var oe=[{type:"elem",elem:l,shift:u,marginRight:_,marginLeft:E},{type:"elem",elem:a,shift:-d,marginRight:_}];L=ae.makeVList({positionType:"individualShift",children:oe},e)}else if(l){u=Math.max(u,c.sub1,l.height-.8*c.xHeight);var te=[{type:"elem",elem:l,marginLeft:E,marginRight:_}];L=ae.makeVList({positionType:"shift",positionData:u,children:te},e)}else if(a)d=Math.max(d,g,a.depth+.25*c.xHeight),L=ae.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:_}]},e);else throw new Error("supsub must have either sup or sub.");var Z=z5(s,"right")||"mord";return ae.makeSpan([Z],[s,ae.makeSpan(["msupsub"],[L])],e)},mathmlBuilder(i,e){var t=!1,r,n;i.base&&i.base.type==="horizBrace"&&(n=!!i.sup,n===i.base.isOver&&(t=!0,r=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var o=[zi(i.base,e)];i.sub&&o.push(zi(i.sub,e)),i.sup&&o.push(zi(i.sup,e));var s;if(t)s=r?"mover":"munder";else if(i.sub)if(i.sup){var c=i.base;c&&c.type==="op"&&c.limits&&e.style===St.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===St.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===St.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===St.DISPLAY)?s="munder":s="msub"}else{var a=i.base;a&&a.type==="op"&&a.limits&&(e.style===St.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===St.DISPLAY)?s="mover":s="msup"}return new Ne.MathNode(s,o)}});Pu({type:"atom",htmlBuilder(i,e){return ae.mathsym(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[os(i.text,i.mode)]);if(i.family==="bin"){var r=X5(i,e);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var zj={mi:"italic",mn:"normal",mtext:"normal"};Pu({type:"mathord",htmlBuilder(i,e){return ae.makeOrd(i,e,"mathord")},mathmlBuilder(i,e){var t=new Ne.MathNode("mi",[os(i.text,i.mode,e)]),r=X5(i,e)||"italic";return r!==zj[t.type]&&t.setAttribute("mathvariant",r),t}});Pu({type:"textord",htmlBuilder(i,e){return ae.makeOrd(i,e,"textord")},mathmlBuilder(i,e){var t=os(i.text,i.mode,e),r=X5(i,e)||"normal",n;return i.mode==="text"?n=new Ne.MathNode("mtext",[t]):/[0-9]/.test(i.text)?n=new Ne.MathNode("mn",[t]):i.text==="\\prime"?n=new Ne.MathNode("mo",[t]):n=new Ne.MathNode("mi",[t]),r!==zj[n.type]&&n.setAttribute("mathvariant",r),n}});var D5={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},M5={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Pu({type:"spacing",htmlBuilder(i,e){if(M5.hasOwnProperty(i.text)){var t=M5[i.text].className||"";if(i.mode==="text"){var r=ae.makeOrd(i,e,"textord");return r.classes.push(t),r}else return ae.makeSpan(["mspace",t],[ae.mathsym(i.text,i.mode,e)],e)}else{if(D5.hasOwnProperty(i.text))return ae.makeSpan(["mspace",D5[i.text]],[],e);throw new Be('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(M5.hasOwnProperty(i.text))t=new Ne.MathNode("mtext",[new Ne.TextNode("\xA0")]);else{if(D5.hasOwnProperty(i.text))return new Ne.MathNode("mspace");throw new Be('Unknown type of space "'+i.text+'"')}return t}});var UU=()=>{var i=new Ne.MathNode("mtd",[]);return i.setAttribute("width","50%"),i};Pu({type:"tag",mathmlBuilder(i,e){var t=new Ne.MathNode("mtable",[new Ne.MathNode("mtr",[UU(),new Ne.MathNode("mtd",[hd(i.body,e)]),UU(),new Ne.MathNode("mtd",[hd(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var jU={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},WU={"\\textbf":"textbf","\\textmd":"textmd"},eue={"\\textit":"textit","\\textup":"textup"},VU=(i,e)=>{var t=i.font;return t?jU[t]?e.withTextFontFamily(jU[t]):WU[t]?e.withTextFontWeight(WU[t]):e.withTextFontShape(eue[t]):e};rt({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:r}=i,n=e[0];return{type:"text",mode:t.mode,body:kr(n),font:r}},htmlBuilder(i,e){var t=VU(i,e),r=jr(i.body,t,!0);return ae.makeSpan(["mord","text"],r,t)},mathmlBuilder(i,e){var t=VU(i,e);return hd(i.body,t)}});rt({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=bi(i.body,e),r=ae.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,o=ae.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return ae.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[new Ne.TextNode("\u203E")]);t.setAttribute("stretchy","true");var r=new Ne.MathNode("munder",[zi(i.body,e),t]);return r.setAttribute("accentunder","true"),r}});rt({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=bi(i.body,e),r=e.fontMetrics().axisHeight,n=.5*(t.height-r-(t.depth+r));return ae.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){return new Ne.MathNode("mpadded",[zi(i.body,e)],["vcenter"])}});rt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new Be("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=qU(i),r=[],n=e.havingStyle(e.style.text()),o=0;o<t.length;o++){var s=t[o];s==="~"&&(s="\\textasciitilde"),r.push(ae.makeSymbol(s,"Typewriter-Regular",i.mode,n,["mord","texttt"]))}return ae.makeSpan(["mord","text"].concat(n.sizingClasses(e)),ae.tryCombineChars(r),n)},mathmlBuilder(i,e){var t=new Ne.TextNode(qU(i)),r=new Ne.MathNode("mtext",[t]);return r.setAttribute("mathvariant","monospace"),r}});var qU=i=>i.body.replace(/ /g,i.star?"\u2423":"\xA0"),dd=aj,Bj=`[ \r - ]`,tue="\\\\[a-zA-Z@]+",iue="\\\\[^\uD800-\uDFFF]",rue="("+tue+")"+Bj+"*",nue=`\\\\( +-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.")}},Nu=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 Nt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){var e=t=>t.toText();return this.children.map(e).join("")}},Aa={"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]}},Zy={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]},wU={\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 Kce(i,e){Aa[i]=e}function G5(i,e,t){if(!Aa[e])throw new Error("Font metrics not found for font: "+e+".");var r=i.charCodeAt(0),n=Aa[e][r];if(!n&&i[0]in wU&&(r=wU[i[0]].charCodeAt(0),n=Aa[e][r]),!n&&t==="text"&&ZU(r)&&(n=Aa[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var C5={};function $ce(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!C5[e]){var t=C5[e]={cssEmPerMu:Zy.quad[e]/18};for(var r in Zy)Zy.hasOwnProperty(r)&&(t[r]=Zy[r][e])}return C5[e]}var Gce=[[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]],xU=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],CU=function(e,t){return t.size<2?e:Gce[e-1][t.size-1]},hw=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=xU[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 r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new i(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:CU(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:xU[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=CU(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=$ce(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};hw.BASESIZE=6;var O5={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},Yce={ex:!0,em:!0,mu:!0},JU=function(e){return typeof e!="string"&&(e=e.unit),e in O5||e in Yce||e==="ex"},dr=function(e,t){var r;if(e.unit in O5)r=O5[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")r=n.fontMetrics().xHeight;else if(e.unit==="em")r=n.fontMetrics().quad;else throw new Be("Invalid unit: '"+e.unit+"'");n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},$e=function(e){return+e.toFixed(4)+"em"},ud=function(e){return e.filter(t=>t).join(" ")},ej=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},tj=function(e){var t=document.createElement(e);t.className=ud(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},ij=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Nt.escape(ud(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Nt.hyphenate(n)+":"+this.style[n]+";");r&&(t+=' style="'+Nt.escape(r)+'"');for(var o in this.attributes)this.attributes.hasOwnProperty(o)&&(t+=" "+o+'="'+Nt.escape(this.attributes[o])+'"');t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t},Ru=class{constructor(e,t,r,n){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,ej.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Nt.contains(this.classes,e)}toNode(){return tj.call(this,"span")}toMarkup(){return ij.call(this,"span")}},qg=class{constructor(e,t,r,n){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,ej.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Nt.contains(this.classes,e)}toNode(){return tj.call(this,"a")}toMarkup(){return ij.call(this,"a")}},F5=class{constructor(e,t,r){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=r}hasClass(e){return Nt.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="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=Nt.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+Nt.escape(t)+'"'),e+="'/>",e}},Xce={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},ho=class{constructor(e,t,r,n,o,s,a,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=o||0,this.width=s||0,this.classes=a||[],this.style=l||{},this.maxFontSize=0;var c=Pce(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Xce[this.text])}hasClass(e){return Nt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=$e(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=ud(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(t=t||document.createElement("span"),t.style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Nt.escape(ud(this.classes)),t+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Nt.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+Nt.escape(r)+'"');var o=Nt.escape(this.text);return e?(t+=">",t+=o,t+="</span>",t):o}},Ps=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 r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}},Ma=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",yU[this.pathName]),t}toMarkup(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+yU[this.pathName]+"'/>"}},Kg=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 r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>",e}};function SU(i){if(i instanceof ho)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function Qce(i){if(i instanceof Ru)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var Zce={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Jce={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},$i={math:{},text:{}};function x(i,e,t,r,n,o){$i[i][n]={font:e,group:t,replace:r},o&&r&&($i[i][r]=$i[i][n])}var T="math",Ae="text",D="main",q="ams",tr="accent-token",ot="bin",Zn="close",Vf="inner",Ct="mathord",Dr="op-token",Fo="open",_w="punct",K="rel",Bl="spacing",J="textord";x(T,D,K,"\u2261","\\equiv",!0);x(T,D,K,"\u227A","\\prec",!0);x(T,D,K,"\u227B","\\succ",!0);x(T,D,K,"\u223C","\\sim",!0);x(T,D,K,"\u22A5","\\perp");x(T,D,K,"\u2AAF","\\preceq",!0);x(T,D,K,"\u2AB0","\\succeq",!0);x(T,D,K,"\u2243","\\simeq",!0);x(T,D,K,"\u2223","\\mid",!0);x(T,D,K,"\u226A","\\ll",!0);x(T,D,K,"\u226B","\\gg",!0);x(T,D,K,"\u224D","\\asymp",!0);x(T,D,K,"\u2225","\\parallel");x(T,D,K,"\u22C8","\\bowtie",!0);x(T,D,K,"\u2323","\\smile",!0);x(T,D,K,"\u2291","\\sqsubseteq",!0);x(T,D,K,"\u2292","\\sqsupseteq",!0);x(T,D,K,"\u2250","\\doteq",!0);x(T,D,K,"\u2322","\\frown",!0);x(T,D,K,"\u220B","\\ni",!0);x(T,D,K,"\u221D","\\propto",!0);x(T,D,K,"\u22A2","\\vdash",!0);x(T,D,K,"\u22A3","\\dashv",!0);x(T,D,K,"\u220B","\\owns");x(T,D,_w,".","\\ldotp");x(T,D,_w,"\u22C5","\\cdotp");x(T,D,J,"#","\\#");x(Ae,D,J,"#","\\#");x(T,D,J,"&","\\&");x(Ae,D,J,"&","\\&");x(T,D,J,"\u2135","\\aleph",!0);x(T,D,J,"\u2200","\\forall",!0);x(T,D,J,"\u210F","\\hbar",!0);x(T,D,J,"\u2203","\\exists",!0);x(T,D,J,"\u2207","\\nabla",!0);x(T,D,J,"\u266D","\\flat",!0);x(T,D,J,"\u2113","\\ell",!0);x(T,D,J,"\u266E","\\natural",!0);x(T,D,J,"\u2663","\\clubsuit",!0);x(T,D,J,"\u2118","\\wp",!0);x(T,D,J,"\u266F","\\sharp",!0);x(T,D,J,"\u2662","\\diamondsuit",!0);x(T,D,J,"\u211C","\\Re",!0);x(T,D,J,"\u2661","\\heartsuit",!0);x(T,D,J,"\u2111","\\Im",!0);x(T,D,J,"\u2660","\\spadesuit",!0);x(T,D,J,"\xA7","\\S",!0);x(Ae,D,J,"\xA7","\\S");x(T,D,J,"\xB6","\\P",!0);x(Ae,D,J,"\xB6","\\P");x(T,D,J,"\u2020","\\dag");x(Ae,D,J,"\u2020","\\dag");x(Ae,D,J,"\u2020","\\textdagger");x(T,D,J,"\u2021","\\ddag");x(Ae,D,J,"\u2021","\\ddag");x(Ae,D,J,"\u2021","\\textdaggerdbl");x(T,D,Zn,"\u23B1","\\rmoustache",!0);x(T,D,Fo,"\u23B0","\\lmoustache",!0);x(T,D,Zn,"\u27EF","\\rgroup",!0);x(T,D,Fo,"\u27EE","\\lgroup",!0);x(T,D,ot,"\u2213","\\mp",!0);x(T,D,ot,"\u2296","\\ominus",!0);x(T,D,ot,"\u228E","\\uplus",!0);x(T,D,ot,"\u2293","\\sqcap",!0);x(T,D,ot,"\u2217","\\ast");x(T,D,ot,"\u2294","\\sqcup",!0);x(T,D,ot,"\u25EF","\\bigcirc",!0);x(T,D,ot,"\u2219","\\bullet",!0);x(T,D,ot,"\u2021","\\ddagger");x(T,D,ot,"\u2240","\\wr",!0);x(T,D,ot,"\u2A3F","\\amalg");x(T,D,ot,"&","\\And");x(T,D,K,"\u27F5","\\longleftarrow",!0);x(T,D,K,"\u21D0","\\Leftarrow",!0);x(T,D,K,"\u27F8","\\Longleftarrow",!0);x(T,D,K,"\u27F6","\\longrightarrow",!0);x(T,D,K,"\u21D2","\\Rightarrow",!0);x(T,D,K,"\u27F9","\\Longrightarrow",!0);x(T,D,K,"\u2194","\\leftrightarrow",!0);x(T,D,K,"\u27F7","\\longleftrightarrow",!0);x(T,D,K,"\u21D4","\\Leftrightarrow",!0);x(T,D,K,"\u27FA","\\Longleftrightarrow",!0);x(T,D,K,"\u21A6","\\mapsto",!0);x(T,D,K,"\u27FC","\\longmapsto",!0);x(T,D,K,"\u2197","\\nearrow",!0);x(T,D,K,"\u21A9","\\hookleftarrow",!0);x(T,D,K,"\u21AA","\\hookrightarrow",!0);x(T,D,K,"\u2198","\\searrow",!0);x(T,D,K,"\u21BC","\\leftharpoonup",!0);x(T,D,K,"\u21C0","\\rightharpoonup",!0);x(T,D,K,"\u2199","\\swarrow",!0);x(T,D,K,"\u21BD","\\leftharpoondown",!0);x(T,D,K,"\u21C1","\\rightharpoondown",!0);x(T,D,K,"\u2196","\\nwarrow",!0);x(T,D,K,"\u21CC","\\rightleftharpoons",!0);x(T,q,K,"\u226E","\\nless",!0);x(T,q,K,"\uE010","\\@nleqslant");x(T,q,K,"\uE011","\\@nleqq");x(T,q,K,"\u2A87","\\lneq",!0);x(T,q,K,"\u2268","\\lneqq",!0);x(T,q,K,"\uE00C","\\@lvertneqq");x(T,q,K,"\u22E6","\\lnsim",!0);x(T,q,K,"\u2A89","\\lnapprox",!0);x(T,q,K,"\u2280","\\nprec",!0);x(T,q,K,"\u22E0","\\npreceq",!0);x(T,q,K,"\u22E8","\\precnsim",!0);x(T,q,K,"\u2AB9","\\precnapprox",!0);x(T,q,K,"\u2241","\\nsim",!0);x(T,q,K,"\uE006","\\@nshortmid");x(T,q,K,"\u2224","\\nmid",!0);x(T,q,K,"\u22AC","\\nvdash",!0);x(T,q,K,"\u22AD","\\nvDash",!0);x(T,q,K,"\u22EA","\\ntriangleleft");x(T,q,K,"\u22EC","\\ntrianglelefteq",!0);x(T,q,K,"\u228A","\\subsetneq",!0);x(T,q,K,"\uE01A","\\@varsubsetneq");x(T,q,K,"\u2ACB","\\subsetneqq",!0);x(T,q,K,"\uE017","\\@varsubsetneqq");x(T,q,K,"\u226F","\\ngtr",!0);x(T,q,K,"\uE00F","\\@ngeqslant");x(T,q,K,"\uE00E","\\@ngeqq");x(T,q,K,"\u2A88","\\gneq",!0);x(T,q,K,"\u2269","\\gneqq",!0);x(T,q,K,"\uE00D","\\@gvertneqq");x(T,q,K,"\u22E7","\\gnsim",!0);x(T,q,K,"\u2A8A","\\gnapprox",!0);x(T,q,K,"\u2281","\\nsucc",!0);x(T,q,K,"\u22E1","\\nsucceq",!0);x(T,q,K,"\u22E9","\\succnsim",!0);x(T,q,K,"\u2ABA","\\succnapprox",!0);x(T,q,K,"\u2246","\\ncong",!0);x(T,q,K,"\uE007","\\@nshortparallel");x(T,q,K,"\u2226","\\nparallel",!0);x(T,q,K,"\u22AF","\\nVDash",!0);x(T,q,K,"\u22EB","\\ntriangleright");x(T,q,K,"\u22ED","\\ntrianglerighteq",!0);x(T,q,K,"\uE018","\\@nsupseteqq");x(T,q,K,"\u228B","\\supsetneq",!0);x(T,q,K,"\uE01B","\\@varsupsetneq");x(T,q,K,"\u2ACC","\\supsetneqq",!0);x(T,q,K,"\uE019","\\@varsupsetneqq");x(T,q,K,"\u22AE","\\nVdash",!0);x(T,q,K,"\u2AB5","\\precneqq",!0);x(T,q,K,"\u2AB6","\\succneqq",!0);x(T,q,K,"\uE016","\\@nsubseteqq");x(T,q,ot,"\u22B4","\\unlhd");x(T,q,ot,"\u22B5","\\unrhd");x(T,q,K,"\u219A","\\nleftarrow",!0);x(T,q,K,"\u219B","\\nrightarrow",!0);x(T,q,K,"\u21CD","\\nLeftarrow",!0);x(T,q,K,"\u21CF","\\nRightarrow",!0);x(T,q,K,"\u21AE","\\nleftrightarrow",!0);x(T,q,K,"\u21CE","\\nLeftrightarrow",!0);x(T,q,K,"\u25B3","\\vartriangle");x(T,q,J,"\u210F","\\hslash");x(T,q,J,"\u25BD","\\triangledown");x(T,q,J,"\u25CA","\\lozenge");x(T,q,J,"\u24C8","\\circledS");x(T,q,J,"\xAE","\\circledR");x(Ae,q,J,"\xAE","\\circledR");x(T,q,J,"\u2221","\\measuredangle",!0);x(T,q,J,"\u2204","\\nexists");x(T,q,J,"\u2127","\\mho");x(T,q,J,"\u2132","\\Finv",!0);x(T,q,J,"\u2141","\\Game",!0);x(T,q,J,"\u2035","\\backprime");x(T,q,J,"\u25B2","\\blacktriangle");x(T,q,J,"\u25BC","\\blacktriangledown");x(T,q,J,"\u25A0","\\blacksquare");x(T,q,J,"\u29EB","\\blacklozenge");x(T,q,J,"\u2605","\\bigstar");x(T,q,J,"\u2222","\\sphericalangle",!0);x(T,q,J,"\u2201","\\complement",!0);x(T,q,J,"\xF0","\\eth",!0);x(Ae,D,J,"\xF0","\xF0");x(T,q,J,"\u2571","\\diagup");x(T,q,J,"\u2572","\\diagdown");x(T,q,J,"\u25A1","\\square");x(T,q,J,"\u25A1","\\Box");x(T,q,J,"\u25CA","\\Diamond");x(T,q,J,"\xA5","\\yen",!0);x(Ae,q,J,"\xA5","\\yen",!0);x(T,q,J,"\u2713","\\checkmark",!0);x(Ae,q,J,"\u2713","\\checkmark");x(T,q,J,"\u2136","\\beth",!0);x(T,q,J,"\u2138","\\daleth",!0);x(T,q,J,"\u2137","\\gimel",!0);x(T,q,J,"\u03DD","\\digamma",!0);x(T,q,J,"\u03F0","\\varkappa");x(T,q,Fo,"\u250C","\\@ulcorner",!0);x(T,q,Zn,"\u2510","\\@urcorner",!0);x(T,q,Fo,"\u2514","\\@llcorner",!0);x(T,q,Zn,"\u2518","\\@lrcorner",!0);x(T,q,K,"\u2266","\\leqq",!0);x(T,q,K,"\u2A7D","\\leqslant",!0);x(T,q,K,"\u2A95","\\eqslantless",!0);x(T,q,K,"\u2272","\\lesssim",!0);x(T,q,K,"\u2A85","\\lessapprox",!0);x(T,q,K,"\u224A","\\approxeq",!0);x(T,q,ot,"\u22D6","\\lessdot");x(T,q,K,"\u22D8","\\lll",!0);x(T,q,K,"\u2276","\\lessgtr",!0);x(T,q,K,"\u22DA","\\lesseqgtr",!0);x(T,q,K,"\u2A8B","\\lesseqqgtr",!0);x(T,q,K,"\u2251","\\doteqdot");x(T,q,K,"\u2253","\\risingdotseq",!0);x(T,q,K,"\u2252","\\fallingdotseq",!0);x(T,q,K,"\u223D","\\backsim",!0);x(T,q,K,"\u22CD","\\backsimeq",!0);x(T,q,K,"\u2AC5","\\subseteqq",!0);x(T,q,K,"\u22D0","\\Subset",!0);x(T,q,K,"\u228F","\\sqsubset",!0);x(T,q,K,"\u227C","\\preccurlyeq",!0);x(T,q,K,"\u22DE","\\curlyeqprec",!0);x(T,q,K,"\u227E","\\precsim",!0);x(T,q,K,"\u2AB7","\\precapprox",!0);x(T,q,K,"\u22B2","\\vartriangleleft");x(T,q,K,"\u22B4","\\trianglelefteq");x(T,q,K,"\u22A8","\\vDash",!0);x(T,q,K,"\u22AA","\\Vvdash",!0);x(T,q,K,"\u2323","\\smallsmile");x(T,q,K,"\u2322","\\smallfrown");x(T,q,K,"\u224F","\\bumpeq",!0);x(T,q,K,"\u224E","\\Bumpeq",!0);x(T,q,K,"\u2267","\\geqq",!0);x(T,q,K,"\u2A7E","\\geqslant",!0);x(T,q,K,"\u2A96","\\eqslantgtr",!0);x(T,q,K,"\u2273","\\gtrsim",!0);x(T,q,K,"\u2A86","\\gtrapprox",!0);x(T,q,ot,"\u22D7","\\gtrdot");x(T,q,K,"\u22D9","\\ggg",!0);x(T,q,K,"\u2277","\\gtrless",!0);x(T,q,K,"\u22DB","\\gtreqless",!0);x(T,q,K,"\u2A8C","\\gtreqqless",!0);x(T,q,K,"\u2256","\\eqcirc",!0);x(T,q,K,"\u2257","\\circeq",!0);x(T,q,K,"\u225C","\\triangleq",!0);x(T,q,K,"\u223C","\\thicksim");x(T,q,K,"\u2248","\\thickapprox");x(T,q,K,"\u2AC6","\\supseteqq",!0);x(T,q,K,"\u22D1","\\Supset",!0);x(T,q,K,"\u2290","\\sqsupset",!0);x(T,q,K,"\u227D","\\succcurlyeq",!0);x(T,q,K,"\u22DF","\\curlyeqsucc",!0);x(T,q,K,"\u227F","\\succsim",!0);x(T,q,K,"\u2AB8","\\succapprox",!0);x(T,q,K,"\u22B3","\\vartriangleright");x(T,q,K,"\u22B5","\\trianglerighteq");x(T,q,K,"\u22A9","\\Vdash",!0);x(T,q,K,"\u2223","\\shortmid");x(T,q,K,"\u2225","\\shortparallel");x(T,q,K,"\u226C","\\between",!0);x(T,q,K,"\u22D4","\\pitchfork",!0);x(T,q,K,"\u221D","\\varpropto");x(T,q,K,"\u25C0","\\blacktriangleleft");x(T,q,K,"\u2234","\\therefore",!0);x(T,q,K,"\u220D","\\backepsilon");x(T,q,K,"\u25B6","\\blacktriangleright");x(T,q,K,"\u2235","\\because",!0);x(T,q,K,"\u22D8","\\llless");x(T,q,K,"\u22D9","\\gggtr");x(T,q,ot,"\u22B2","\\lhd");x(T,q,ot,"\u22B3","\\rhd");x(T,q,K,"\u2242","\\eqsim",!0);x(T,D,K,"\u22C8","\\Join");x(T,q,K,"\u2251","\\Doteq",!0);x(T,q,ot,"\u2214","\\dotplus",!0);x(T,q,ot,"\u2216","\\smallsetminus");x(T,q,ot,"\u22D2","\\Cap",!0);x(T,q,ot,"\u22D3","\\Cup",!0);x(T,q,ot,"\u2A5E","\\doublebarwedge",!0);x(T,q,ot,"\u229F","\\boxminus",!0);x(T,q,ot,"\u229E","\\boxplus",!0);x(T,q,ot,"\u22C7","\\divideontimes",!0);x(T,q,ot,"\u22C9","\\ltimes",!0);x(T,q,ot,"\u22CA","\\rtimes",!0);x(T,q,ot,"\u22CB","\\leftthreetimes",!0);x(T,q,ot,"\u22CC","\\rightthreetimes",!0);x(T,q,ot,"\u22CF","\\curlywedge",!0);x(T,q,ot,"\u22CE","\\curlyvee",!0);x(T,q,ot,"\u229D","\\circleddash",!0);x(T,q,ot,"\u229B","\\circledast",!0);x(T,q,ot,"\u22C5","\\centerdot");x(T,q,ot,"\u22BA","\\intercal",!0);x(T,q,ot,"\u22D2","\\doublecap");x(T,q,ot,"\u22D3","\\doublecup");x(T,q,ot,"\u22A0","\\boxtimes",!0);x(T,q,K,"\u21E2","\\dashrightarrow",!0);x(T,q,K,"\u21E0","\\dashleftarrow",!0);x(T,q,K,"\u21C7","\\leftleftarrows",!0);x(T,q,K,"\u21C6","\\leftrightarrows",!0);x(T,q,K,"\u21DA","\\Lleftarrow",!0);x(T,q,K,"\u219E","\\twoheadleftarrow",!0);x(T,q,K,"\u21A2","\\leftarrowtail",!0);x(T,q,K,"\u21AB","\\looparrowleft",!0);x(T,q,K,"\u21CB","\\leftrightharpoons",!0);x(T,q,K,"\u21B6","\\curvearrowleft",!0);x(T,q,K,"\u21BA","\\circlearrowleft",!0);x(T,q,K,"\u21B0","\\Lsh",!0);x(T,q,K,"\u21C8","\\upuparrows",!0);x(T,q,K,"\u21BF","\\upharpoonleft",!0);x(T,q,K,"\u21C3","\\downharpoonleft",!0);x(T,D,K,"\u22B6","\\origof",!0);x(T,D,K,"\u22B7","\\imageof",!0);x(T,q,K,"\u22B8","\\multimap",!0);x(T,q,K,"\u21AD","\\leftrightsquigarrow",!0);x(T,q,K,"\u21C9","\\rightrightarrows",!0);x(T,q,K,"\u21C4","\\rightleftarrows",!0);x(T,q,K,"\u21A0","\\twoheadrightarrow",!0);x(T,q,K,"\u21A3","\\rightarrowtail",!0);x(T,q,K,"\u21AC","\\looparrowright",!0);x(T,q,K,"\u21B7","\\curvearrowright",!0);x(T,q,K,"\u21BB","\\circlearrowright",!0);x(T,q,K,"\u21B1","\\Rsh",!0);x(T,q,K,"\u21CA","\\downdownarrows",!0);x(T,q,K,"\u21BE","\\upharpoonright",!0);x(T,q,K,"\u21C2","\\downharpoonright",!0);x(T,q,K,"\u21DD","\\rightsquigarrow",!0);x(T,q,K,"\u21DD","\\leadsto");x(T,q,K,"\u21DB","\\Rrightarrow",!0);x(T,q,K,"\u21BE","\\restriction");x(T,D,J,"\u2018","`");x(T,D,J,"$","\\$");x(Ae,D,J,"$","\\$");x(Ae,D,J,"$","\\textdollar");x(T,D,J,"%","\\%");x(Ae,D,J,"%","\\%");x(T,D,J,"_","\\_");x(Ae,D,J,"_","\\_");x(Ae,D,J,"_","\\textunderscore");x(T,D,J,"\u2220","\\angle",!0);x(T,D,J,"\u221E","\\infty",!0);x(T,D,J,"\u2032","\\prime");x(T,D,J,"\u25B3","\\triangle");x(T,D,J,"\u0393","\\Gamma",!0);x(T,D,J,"\u0394","\\Delta",!0);x(T,D,J,"\u0398","\\Theta",!0);x(T,D,J,"\u039B","\\Lambda",!0);x(T,D,J,"\u039E","\\Xi",!0);x(T,D,J,"\u03A0","\\Pi",!0);x(T,D,J,"\u03A3","\\Sigma",!0);x(T,D,J,"\u03A5","\\Upsilon",!0);x(T,D,J,"\u03A6","\\Phi",!0);x(T,D,J,"\u03A8","\\Psi",!0);x(T,D,J,"\u03A9","\\Omega",!0);x(T,D,J,"A","\u0391");x(T,D,J,"B","\u0392");x(T,D,J,"E","\u0395");x(T,D,J,"Z","\u0396");x(T,D,J,"H","\u0397");x(T,D,J,"I","\u0399");x(T,D,J,"K","\u039A");x(T,D,J,"M","\u039C");x(T,D,J,"N","\u039D");x(T,D,J,"O","\u039F");x(T,D,J,"P","\u03A1");x(T,D,J,"T","\u03A4");x(T,D,J,"X","\u03A7");x(T,D,J,"\xAC","\\neg",!0);x(T,D,J,"\xAC","\\lnot");x(T,D,J,"\u22A4","\\top");x(T,D,J,"\u22A5","\\bot");x(T,D,J,"\u2205","\\emptyset");x(T,q,J,"\u2205","\\varnothing");x(T,D,Ct,"\u03B1","\\alpha",!0);x(T,D,Ct,"\u03B2","\\beta",!0);x(T,D,Ct,"\u03B3","\\gamma",!0);x(T,D,Ct,"\u03B4","\\delta",!0);x(T,D,Ct,"\u03F5","\\epsilon",!0);x(T,D,Ct,"\u03B6","\\zeta",!0);x(T,D,Ct,"\u03B7","\\eta",!0);x(T,D,Ct,"\u03B8","\\theta",!0);x(T,D,Ct,"\u03B9","\\iota",!0);x(T,D,Ct,"\u03BA","\\kappa",!0);x(T,D,Ct,"\u03BB","\\lambda",!0);x(T,D,Ct,"\u03BC","\\mu",!0);x(T,D,Ct,"\u03BD","\\nu",!0);x(T,D,Ct,"\u03BE","\\xi",!0);x(T,D,Ct,"\u03BF","\\omicron",!0);x(T,D,Ct,"\u03C0","\\pi",!0);x(T,D,Ct,"\u03C1","\\rho",!0);x(T,D,Ct,"\u03C3","\\sigma",!0);x(T,D,Ct,"\u03C4","\\tau",!0);x(T,D,Ct,"\u03C5","\\upsilon",!0);x(T,D,Ct,"\u03D5","\\phi",!0);x(T,D,Ct,"\u03C7","\\chi",!0);x(T,D,Ct,"\u03C8","\\psi",!0);x(T,D,Ct,"\u03C9","\\omega",!0);x(T,D,Ct,"\u03B5","\\varepsilon",!0);x(T,D,Ct,"\u03D1","\\vartheta",!0);x(T,D,Ct,"\u03D6","\\varpi",!0);x(T,D,Ct,"\u03F1","\\varrho",!0);x(T,D,Ct,"\u03C2","\\varsigma",!0);x(T,D,Ct,"\u03C6","\\varphi",!0);x(T,D,ot,"\u2217","*",!0);x(T,D,ot,"+","+");x(T,D,ot,"\u2212","-",!0);x(T,D,ot,"\u22C5","\\cdot",!0);x(T,D,ot,"\u2218","\\circ",!0);x(T,D,ot,"\xF7","\\div",!0);x(T,D,ot,"\xB1","\\pm",!0);x(T,D,ot,"\xD7","\\times",!0);x(T,D,ot,"\u2229","\\cap",!0);x(T,D,ot,"\u222A","\\cup",!0);x(T,D,ot,"\u2216","\\setminus",!0);x(T,D,ot,"\u2227","\\land");x(T,D,ot,"\u2228","\\lor");x(T,D,ot,"\u2227","\\wedge",!0);x(T,D,ot,"\u2228","\\vee",!0);x(T,D,J,"\u221A","\\surd");x(T,D,Fo,"\u27E8","\\langle",!0);x(T,D,Fo,"\u2223","\\lvert");x(T,D,Fo,"\u2225","\\lVert");x(T,D,Zn,"?","?");x(T,D,Zn,"!","!");x(T,D,Zn,"\u27E9","\\rangle",!0);x(T,D,Zn,"\u2223","\\rvert");x(T,D,Zn,"\u2225","\\rVert");x(T,D,K,"=","=");x(T,D,K,":",":");x(T,D,K,"\u2248","\\approx",!0);x(T,D,K,"\u2245","\\cong",!0);x(T,D,K,"\u2265","\\ge");x(T,D,K,"\u2265","\\geq",!0);x(T,D,K,"\u2190","\\gets");x(T,D,K,">","\\gt",!0);x(T,D,K,"\u2208","\\in",!0);x(T,D,K,"\uE020","\\@not");x(T,D,K,"\u2282","\\subset",!0);x(T,D,K,"\u2283","\\supset",!0);x(T,D,K,"\u2286","\\subseteq",!0);x(T,D,K,"\u2287","\\supseteq",!0);x(T,q,K,"\u2288","\\nsubseteq",!0);x(T,q,K,"\u2289","\\nsupseteq",!0);x(T,D,K,"\u22A8","\\models");x(T,D,K,"\u2190","\\leftarrow",!0);x(T,D,K,"\u2264","\\le");x(T,D,K,"\u2264","\\leq",!0);x(T,D,K,"<","\\lt",!0);x(T,D,K,"\u2192","\\rightarrow",!0);x(T,D,K,"\u2192","\\to");x(T,q,K,"\u2271","\\ngeq",!0);x(T,q,K,"\u2270","\\nleq",!0);x(T,D,Bl,"\xA0","\\ ");x(T,D,Bl,"\xA0","\\space");x(T,D,Bl,"\xA0","\\nobreakspace");x(Ae,D,Bl,"\xA0","\\ ");x(Ae,D,Bl,"\xA0"," ");x(Ae,D,Bl,"\xA0","\\space");x(Ae,D,Bl,"\xA0","\\nobreakspace");x(T,D,Bl,null,"\\nobreak");x(T,D,Bl,null,"\\allowbreak");x(T,D,_w,",",",");x(T,D,_w,";",";");x(T,q,ot,"\u22BC","\\barwedge",!0);x(T,q,ot,"\u22BB","\\veebar",!0);x(T,D,ot,"\u2299","\\odot",!0);x(T,D,ot,"\u2295","\\oplus",!0);x(T,D,ot,"\u2297","\\otimes",!0);x(T,D,J,"\u2202","\\partial",!0);x(T,D,ot,"\u2298","\\oslash",!0);x(T,q,ot,"\u229A","\\circledcirc",!0);x(T,q,ot,"\u22A1","\\boxdot",!0);x(T,D,ot,"\u25B3","\\bigtriangleup");x(T,D,ot,"\u25BD","\\bigtriangledown");x(T,D,ot,"\u2020","\\dagger");x(T,D,ot,"\u22C4","\\diamond");x(T,D,ot,"\u22C6","\\star");x(T,D,ot,"\u25C3","\\triangleleft");x(T,D,ot,"\u25B9","\\triangleright");x(T,D,Fo,"{","\\{");x(Ae,D,J,"{","\\{");x(Ae,D,J,"{","\\textbraceleft");x(T,D,Zn,"}","\\}");x(Ae,D,J,"}","\\}");x(Ae,D,J,"}","\\textbraceright");x(T,D,Fo,"{","\\lbrace");x(T,D,Zn,"}","\\rbrace");x(T,D,Fo,"[","\\lbrack",!0);x(Ae,D,J,"[","\\lbrack",!0);x(T,D,Zn,"]","\\rbrack",!0);x(Ae,D,J,"]","\\rbrack",!0);x(T,D,Fo,"(","\\lparen",!0);x(T,D,Zn,")","\\rparen",!0);x(Ae,D,J,"<","\\textless",!0);x(Ae,D,J,">","\\textgreater",!0);x(T,D,Fo,"\u230A","\\lfloor",!0);x(T,D,Zn,"\u230B","\\rfloor",!0);x(T,D,Fo,"\u2308","\\lceil",!0);x(T,D,Zn,"\u2309","\\rceil",!0);x(T,D,J,"\\","\\backslash");x(T,D,J,"\u2223","|");x(T,D,J,"\u2223","\\vert");x(Ae,D,J,"|","\\textbar",!0);x(T,D,J,"\u2225","\\|");x(T,D,J,"\u2225","\\Vert");x(Ae,D,J,"\u2225","\\textbardbl");x(Ae,D,J,"~","\\textasciitilde");x(Ae,D,J,"\\","\\textbackslash");x(Ae,D,J,"^","\\textasciicircum");x(T,D,K,"\u2191","\\uparrow",!0);x(T,D,K,"\u21D1","\\Uparrow",!0);x(T,D,K,"\u2193","\\downarrow",!0);x(T,D,K,"\u21D3","\\Downarrow",!0);x(T,D,K,"\u2195","\\updownarrow",!0);x(T,D,K,"\u21D5","\\Updownarrow",!0);x(T,D,Dr,"\u2210","\\coprod");x(T,D,Dr,"\u22C1","\\bigvee");x(T,D,Dr,"\u22C0","\\bigwedge");x(T,D,Dr,"\u2A04","\\biguplus");x(T,D,Dr,"\u22C2","\\bigcap");x(T,D,Dr,"\u22C3","\\bigcup");x(T,D,Dr,"\u222B","\\int");x(T,D,Dr,"\u222B","\\intop");x(T,D,Dr,"\u222C","\\iint");x(T,D,Dr,"\u222D","\\iiint");x(T,D,Dr,"\u220F","\\prod");x(T,D,Dr,"\u2211","\\sum");x(T,D,Dr,"\u2A02","\\bigotimes");x(T,D,Dr,"\u2A01","\\bigoplus");x(T,D,Dr,"\u2A00","\\bigodot");x(T,D,Dr,"\u222E","\\oint");x(T,D,Dr,"\u222F","\\oiint");x(T,D,Dr,"\u2230","\\oiiint");x(T,D,Dr,"\u2A06","\\bigsqcup");x(T,D,Dr,"\u222B","\\smallint");x(Ae,D,Vf,"\u2026","\\textellipsis");x(T,D,Vf,"\u2026","\\mathellipsis");x(Ae,D,Vf,"\u2026","\\ldots",!0);x(T,D,Vf,"\u2026","\\ldots",!0);x(T,D,Vf,"\u22EF","\\@cdots",!0);x(T,D,Vf,"\u22F1","\\ddots",!0);x(T,D,J,"\u22EE","\\varvdots");x(T,D,tr,"\u02CA","\\acute");x(T,D,tr,"\u02CB","\\grave");x(T,D,tr,"\xA8","\\ddot");x(T,D,tr,"~","\\tilde");x(T,D,tr,"\u02C9","\\bar");x(T,D,tr,"\u02D8","\\breve");x(T,D,tr,"\u02C7","\\check");x(T,D,tr,"^","\\hat");x(T,D,tr,"\u20D7","\\vec");x(T,D,tr,"\u02D9","\\dot");x(T,D,tr,"\u02DA","\\mathring");x(T,D,Ct,"\uE131","\\@imath");x(T,D,Ct,"\uE237","\\@jmath");x(T,D,J,"\u0131","\u0131");x(T,D,J,"\u0237","\u0237");x(Ae,D,J,"\u0131","\\i",!0);x(Ae,D,J,"\u0237","\\j",!0);x(Ae,D,J,"\xDF","\\ss",!0);x(Ae,D,J,"\xE6","\\ae",!0);x(Ae,D,J,"\u0153","\\oe",!0);x(Ae,D,J,"\xF8","\\o",!0);x(Ae,D,J,"\xC6","\\AE",!0);x(Ae,D,J,"\u0152","\\OE",!0);x(Ae,D,J,"\xD8","\\O",!0);x(Ae,D,tr,"\u02CA","\\'");x(Ae,D,tr,"\u02CB","\\`");x(Ae,D,tr,"\u02C6","\\^");x(Ae,D,tr,"\u02DC","\\~");x(Ae,D,tr,"\u02C9","\\=");x(Ae,D,tr,"\u02D8","\\u");x(Ae,D,tr,"\u02D9","\\.");x(Ae,D,tr,"\xB8","\\c");x(Ae,D,tr,"\u02DA","\\r");x(Ae,D,tr,"\u02C7","\\v");x(Ae,D,tr,"\xA8",'\\"');x(Ae,D,tr,"\u02DD","\\H");x(Ae,D,tr,"\u25EF","\\textcircled");var rj={"--":!0,"---":!0,"``":!0,"''":!0};x(Ae,D,J,"\u2013","--",!0);x(Ae,D,J,"\u2013","\\textendash");x(Ae,D,J,"\u2014","---",!0);x(Ae,D,J,"\u2014","\\textemdash");x(Ae,D,J,"\u2018","`",!0);x(Ae,D,J,"\u2018","\\textquoteleft");x(Ae,D,J,"\u2019","'",!0);x(Ae,D,J,"\u2019","\\textquoteright");x(Ae,D,J,"\u201C","``",!0);x(Ae,D,J,"\u201C","\\textquotedblleft");x(Ae,D,J,"\u201D","''",!0);x(Ae,D,J,"\u201D","\\textquotedblright");x(T,D,J,"\xB0","\\degree",!0);x(Ae,D,J,"\xB0","\\degree");x(Ae,D,J,"\xB0","\\textdegree",!0);x(T,D,J,"\xA3","\\pounds");x(T,D,J,"\xA3","\\mathsterling",!0);x(Ae,D,J,"\xA3","\\pounds");x(Ae,D,J,"\xA3","\\textsterling",!0);x(T,q,J,"\u2720","\\maltese");x(Ae,q,J,"\u2720","\\maltese");var kU='0123456789/@."';for(Jy=0;Jy<kU.length;Jy++)S5=kU.charAt(Jy),x(T,D,J,S5,S5);var S5,Jy,EU='0123456789!@*()-=+";:?/.,';for(ew=0;ew<EU.length;ew++)k5=EU.charAt(ew),x(Ae,D,J,k5,k5);var k5,ew,fw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(tw=0;tw<fw.length;tw++)Bg=fw.charAt(tw),x(T,D,Ct,Bg,Bg),x(Ae,D,J,Bg,Bg);var Bg,tw;x(T,q,J,"C","\u2102");x(Ae,q,J,"C","\u2102");x(T,q,J,"H","\u210D");x(Ae,q,J,"H","\u210D");x(T,q,J,"N","\u2115");x(Ae,q,J,"N","\u2115");x(T,q,J,"P","\u2119");x(Ae,q,J,"P","\u2119");x(T,q,J,"Q","\u211A");x(Ae,q,J,"Q","\u211A");x(T,q,J,"R","\u211D");x(Ae,q,J,"R","\u211D");x(T,q,J,"Z","\u2124");x(Ae,q,J,"Z","\u2124");x(T,D,Ct,"h","\u210E");x(Ae,D,Ct,"h","\u210E");var Mt="";for(Pn=0;Pn<fw.length;Pn++)lr=fw.charAt(Pn),Mt=String.fromCharCode(55349,56320+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56372+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56424+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56580+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56684+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56736+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56788+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56840+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56944+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Pn<26&&(Mt=String.fromCharCode(55349,56632+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt),Mt=String.fromCharCode(55349,56476+Pn),x(T,D,Ct,lr,Mt),x(Ae,D,J,lr,Mt));var lr,Pn;Mt=String.fromCharCode(55349,56668);x(T,D,Ct,"k",Mt);x(Ae,D,J,"k",Mt);for(cd=0;cd<10;cd++)Nl=cd.toString(),Mt=String.fromCharCode(55349,57294+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt),Mt=String.fromCharCode(55349,57314+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt),Mt=String.fromCharCode(55349,57324+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt),Mt=String.fromCharCode(55349,57334+cd),x(T,D,Ct,Nl,Mt),x(Ae,D,J,Nl,Mt);var Nl,cd,z5="\xD0\xDE\xFE";for(iw=0;iw<z5.length;iw++)Hg=z5.charAt(iw),x(T,D,Ct,Hg,Hg),x(Ae,D,J,Hg,Hg);var Hg,iw,rw=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],TU=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ede=function(e,t){var r=e.charCodeAt(0),n=e.charCodeAt(1),o=(r-55296)*1024+(n-56320)+65536,s=t==="math"?0:1;if(119808<=o&&o<120484){var a=Math.floor((o-119808)/26);return[rw[a][2],rw[a][s]]}else if(120782<=o&&o<=120831){var l=Math.floor((o-120782)/10);return[TU[l][2],TU[l][s]]}else{if(o===120485||o===120486)return[rw[0][2],rw[0][s]];if(120486<o&&o<120782)return["",""];throw new Be("Unsupported character: "+e)}},yw=function(e,t,r){return $i[r][e]&&$i[r][e].replace&&(e=$i[r][e].replace),{value:e,metrics:G5(e,t,r)}},Rs=function(e,t,r,n,o){var s=yw(e,t,r),a=s.metrics;e=s.value;var l;if(a){var c=a.italic;(r==="text"||n&&n.font==="mathit")&&(c=0),l=new ho(e,a.height,a.depth,c,a.skew,a.width,o)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '"+r+"'")),l=new ho(e,0,0,0,0,0,o);if(n){l.maxFontSize=n.sizeMultiplier,n.style.isTight()&&l.classes.push("mtight");var d=n.getColor();d&&(l.style.color=d)}return l},tde=function(e,t,r,n){return n===void 0&&(n=[]),r.font==="boldsymbol"&&yw(e,"Main-Bold",t).metrics?Rs(e,"Main-Bold",t,r,n.concat(["mathbf"])):e==="\\"||$i[t][e].font==="main"?Rs(e,"Main-Regular",t,r,n):Rs(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},ide=function(e,t,r,n,o){return o!=="textord"&&yw(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},rde=function(e,t,r){var n=e.mode,o=e.text,s=["mord"],a=n==="math"||n==="text"&&t.font,l=a?t.font:t.fontFamily,c="",d="";if(o.charCodeAt(0)===55349&&([c,d]=ede(o,n)),c.length>0)return Rs(o,c,n,t,s.concat(d));if(l){var u,h;if(l==="boldsymbol"){var f=ide(o,n,t,s,r);u=f.fontName,h=[f.fontClass]}else a?(u=sj[l].fontName,h=[l]):(u=nw(l,t.fontWeight,t.fontShape),h=[l,t.fontWeight,t.fontShape]);if(yw(o,u,n).metrics)return Rs(o,u,n,t,s.concat(h));if(rj.hasOwnProperty(o)&&u.slice(0,10)==="Typewriter"){for(var m=[],g=0;g<o.length;g++)m.push(Rs(o[g],u,n,t,s.concat(h)));return oj(m)}}if(r==="mathord")return Rs(o,"Math-Italic",n,t,s.concat(["mathnormal"]));if(r==="textord"){var w=$i[n][o]&&$i[n][o].font;if(w==="ams"){var _=nw("amsrm",t.fontWeight,t.fontShape);return Rs(o,_,n,t,s.concat("amsrm",t.fontWeight,t.fontShape))}else if(w==="main"||!w){var E=nw("textrm",t.fontWeight,t.fontShape);return Rs(o,E,n,t,s.concat(t.fontWeight,t.fontShape))}else{var A=nw(w,t.fontWeight,t.fontShape);return Rs(o,A,n,t,s.concat(A,t.fontWeight,t.fontShape))}}else throw new Error("unexpected type: "+r+" in makeOrd")},nde=(i,e)=>{if(ud(i.classes)!==ud(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 r in i.style)if(i.style.hasOwnProperty(r)&&i.style[r]!==e.style[r])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&i.style[n]!==e.style[n])return!1;return!0},ode=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],r=i[e+1];t instanceof ho&&r instanceof ho&&nde(t,r)&&(t.text+=r.text,t.height=Math.max(t.height,r.height),t.depth=Math.max(t.depth,r.depth),t.italic=r.italic,i.splice(e+1,1),e--)}return i},Y5=function(e){for(var t=0,r=0,n=0,o=0;o<e.children.length;o++){var s=e.children[o];s.height>t&&(t=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},co=function(e,t,r,n){var o=new Ru(e,t,r,n);return Y5(o),o},nj=(i,e,t,r)=>new Ru(i,e,t,r),sde=function(e,t,r){var n=co([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=$e(n.height),n.maxFontSize=1,n},ade=function(e,t,r,n){var o=new qg(e,t,r,n);return Y5(o),o},oj=function(e){var t=new Nu(e);return Y5(t),t},lde=function(e,t){return e instanceof Nu?co([],[e],t):e},cde=function(e){if(e.positionType==="individualShift"){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,o=n,s=1;s<t.length;s++){var a=-t[s].shift-o-t[s].elem.depth,l=a-(t[s-1].elem.height+t[s-1].elem.depth);o=o+a,r.push({type:"kern",size:l}),r.push(t[s])}return{children:r,depth:n}}var c;if(e.positionType==="top"){for(var d=e.positionData,u=0;u<e.children.length;u++){var h=e.children[u];d-=h.type==="kern"?h.size:h.elem.height+h.elem.depth}c=d}else if(e.positionType==="bottom")c=-e.positionData;else{var f=e.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")c=-f.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")c=-f.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:c}},dde=function(e,t){for(var{children:r,depth:n}=cde(e),o=0,s=0;s<r.length;s++){var a=r[s];if(a.type==="elem"){var l=a.elem;o=Math.max(o,l.maxFontSize,l.height)}}o+=2;var c=co(["pstrut"],[]);c.style.height=$e(o);for(var d=[],u=n,h=n,f=n,m=0;m<r.length;m++){var g=r[m];if(g.type==="kern")f+=g.size;else{var w=g.elem,_=g.wrapperClasses||[],E=g.wrapperStyle||{},A=co(_,[c,w],void 0,E);A.style.top=$e(-o-f-w.depth),g.marginLeft&&(A.style.marginLeft=g.marginLeft),g.marginRight&&(A.style.marginRight=g.marginRight),d.push(A),f+=w.height+w.depth}u=Math.min(u,f),h=Math.max(h,f)}var L=co(["vlist"],d);L.style.height=$e(h);var O;if(u<0){var U=co([],[]),Y=co(["vlist"],[U]);Y.style.height=$e(-u);var oe=co(["vlist-s"],[new ho("\u200B")]);O=[co(["vlist-r"],[L,oe]),co(["vlist-r"],[Y])]}else O=[co(["vlist-r"],[L])];var te=co(["vlist-t"],O);return O.length===2&&te.classes.push("vlist-t2"),te.height=h,te.depth=-u,te},ude=(i,e)=>{var t=co(["mspace"],[],e),r=dr(i,e);return t.style.marginRight=$e(r),t},nw=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var o;return t==="textbf"&&r==="textit"?o="BoldItalic":t==="textbf"?o="Bold":t==="textit"?o="Italic":o="Regular",n+"-"+o},sj={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"}},aj={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},hde=function(e,t){var[r,n,o]=aj[e],s=new Ma(r),a=new Ps([s],{width:$e(n),height:$e(o),style:"width:"+$e(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=nj(["overlay"],[a],t);return l.height=o,l.style.height=$e(o),l.style.width=$e(n),l},ae={fontMap:sj,makeSymbol:Rs,mathsym:tde,makeSpan:co,makeSvgSpan:nj,makeLineSpan:sde,makeAnchor:ade,makeFragment:oj,wrapFragment:lde,makeVList:dde,makeOrd:rde,makeGlue:ude,staticSvg:hde,svgData:aj,tryCombineChars:ode},cr={number:3,unit:"mu"},Du={number:4,unit:"mu"},Rl={number:5,unit:"mu"},fde={mord:{mop:cr,mbin:Du,mrel:Rl,minner:cr},mop:{mord:cr,mop:cr,mrel:Rl,minner:cr},mbin:{mord:Du,mop:Du,mopen:Du,minner:Du},mrel:{mord:Rl,mop:Rl,mopen:Rl,minner:Rl},mopen:{},mclose:{mop:cr,mbin:Du,mrel:Rl,minner:cr},mpunct:{mord:cr,mop:cr,mrel:Rl,mopen:cr,mclose:cr,mpunct:cr,minner:cr},minner:{mord:cr,mop:cr,mbin:Du,mrel:Rl,mopen:cr,mpunct:cr,minner:cr}},pde={mord:{mop:cr},mop:{mord:cr,mop:cr},mbin:{},mrel:{},mopen:{},mclose:{mop:cr},mpunct:{},minner:{mop:cr}},lj={},pw={},mw={};function rt(i){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},l=0;l<t.length;++l)lj[t[l]]=a;e&&(o&&(pw[e]=o),s&&(mw[e]=s))}function Pu(i){var{type:e,htmlBuilder:t,mathmlBuilder:r}=i;rt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:r})}var gw=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},kr=function(e){return e.type==="ordgroup"?e.body:[e]},Fl=ae.makeSpan,mde=["leftmost","mbin","mopen","mrel","mop","mpunct"],gde=["rightmost","mrel","mclose","mpunct"],bde={display:St.DISPLAY,text:St.TEXT,script:St.SCRIPT,scriptscript:St.SCRIPTSCRIPT},vde={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},jr=function(e,t,r,n){n===void 0&&(n=[null,null]);for(var o=[],s=0;s<e.length;s++){var a=bi(e[s],t);if(a instanceof Nu){var l=a.children;o.push(...l)}else o.push(a)}if(ae.tryCombineChars(o),!r)return o;var c=t;if(e.length===1){var d=e[0];d.type==="sizing"?c=t.havingSize(d.size):d.type==="styling"&&(c=t.havingStyle(bde[d.style]))}var u=Fl([n[0]||"leftmost"],[],t),h=Fl([n[1]||"rightmost"],[],t),f=r==="root";return IU(o,(m,g)=>{var w=g.classes[0],_=m.classes[0];w==="mbin"&&Nt.contains(gde,_)?g.classes[0]="mord":_==="mbin"&&Nt.contains(mde,w)&&(m.classes[0]="mord")},{node:u},h,f),IU(o,(m,g)=>{var w=B5(g),_=B5(m),E=w&&_?m.hasClass("mtight")?pde[w][_]:fde[w][_]:null;if(E)return ae.makeGlue(E,c)},{node:u},h,f),o},IU=function i(e,t,r,n,o){n&&e.push(n);for(var s=0;s<e.length;s++){var a=e[s],l=cj(a);if(l){i(l.children,t,r,null,o);continue}var c=!a.hasClass("mspace");if(c){var d=t(a,r.node);d&&(r.insertAfter?r.insertAfter(d):(e.unshift(d),s++))}c?r.node=a:o&&a.hasClass("newline")&&(r.node=Fl(["leftmost"])),r.insertAfter=(u=>h=>{e.splice(u+1,0,h),s++})(s)}n&&e.pop()},cj=function(e){return e instanceof Nu||e instanceof qg||e instanceof Ru&&e.hasClass("enclosing")?e:null},_de=function i(e,t){var r=cj(e);if(r){var n=r.children;if(n.length){if(t==="right")return i(n[n.length-1],"right");if(t==="left")return i(n[0],"left")}}return e},B5=function(e,t){return e?(t&&(e=_de(e,t)),vde[e.classes[0]]||null):null},$g=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Fl(t.concat(r))},bi=function(e,t,r){if(!e)return Fl();if(pw[e.type]){var n=pw[e.type](e,t);if(r&&t.size!==r.size){n=Fl(t.sizingClasses(r),[n],t);var o=t.sizeMultiplier/r.sizeMultiplier;n.height*=o,n.depth*=o}return n}else throw new Be("Got group of unknown type: '"+e.type+"'")};function ow(i,e){var t=Fl(["base"],i,e),r=Fl(["strut"]);return r.style.height=$e(t.height+t.depth),t.depth&&(r.style.verticalAlign=$e(-t.depth)),t.children.unshift(r),t}function H5(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var r=jr(i,e,"root"),n;r.length===2&&r[1].hasClass("tag")&&(n=r.pop());for(var o=[],s=[],a=0;a<r.length;a++)if(s.push(r[a]),r[a].hasClass("mbin")||r[a].hasClass("mrel")||r[a].hasClass("allowbreak")){for(var l=!1;a<r.length-1&&r[a+1].hasClass("mspace")&&!r[a+1].hasClass("newline");)a++,s.push(r[a]),r[a].hasClass("nobreak")&&(l=!0);l||(o.push(ow(s,e)),s=[])}else r[a].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(ow(s,e)),s=[]),o.push(r[a]));s.length>0&&o.push(ow(s,e));var c;t?(c=ow(jr(t,e,!0)),c.classes=["tag"],o.push(c)):n&&o.push(n);var d=Fl(["katex-html"],o);if(d.setAttribute("aria-hidden","true"),c){var u=c.children[0];u.style.height=$e(d.height+d.depth),d.depth&&(u.style.verticalAlign=$e(-d.depth))}return d}function dj(i){return new Nu(i)}var uo=class{constructor(e,t,r){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=r||[]}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=ud(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Nt.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Nt.escape(ud(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},Mu=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Nt.escape(this.toText())}toText(){return this.text}},U5=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",$e(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+$e(this.width)+'"/>'}toText(){return this.character?this.character:" "}},Ne={MathNode:uo,TextNode:Mu,SpaceNode:U5,newDocumentFragment:dj},os=function(e,t,r){return $i[t][e]&&$i[t][e].replace&&e.charCodeAt(0)!==55349&&!(rj.hasOwnProperty(e)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(e=$i[t][e].replace),new Ne.TextNode(e)},X5=function(e){return e.length===1?e[0]:new Ne.MathNode("mrow",e)},Q5=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 r=t.font;if(!r||r==="mathnormal")return null;var n=e.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var o=e.text;if(Nt.contains(["\\imath","\\jmath"],o))return null;$i[n][o]&&$i[n][o].replace&&(o=$i[n][o].replace);var s=ae.fontMap[r].fontName;return G5(o,s,n)?ae.fontMap[r].variant:null},fo=function(e,t,r){if(e.length===1){var n=zi(e[0],t);return r&&n instanceof uo&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var o=[],s,a=0;a<e.length;a++){var l=zi(e[a],t);if(l instanceof uo&&s instanceof uo){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mi"&&l.children.length===1&&s.type==="mn"){var c=l.children[0];if(c instanceof Mu&&c.text==="."){s.children.push(...l.children);continue}}else if(s.type==="mi"&&s.children.length===1){var d=s.children[0];if(d instanceof Mu&&d.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var u=l.children[0];u instanceof Mu&&u.text.length>0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),o.pop())}}}o.push(l),s=l}return o},hd=function(e,t,r){return X5(fo(e,t,r))},zi=function(e,t){if(!e)return new Ne.MathNode("mrow");if(mw[e.type]){var r=mw[e.type](e,t);return r}else throw new Be("Got group of unknown type: '"+e.type+"'")};function LU(i,e,t,r,n){var o=fo(i,t),s;o.length===1&&o[0]instanceof uo&&Nt.contains(["mrow","mtable"],o[0].type)?s=o[0]:s=new Ne.MathNode("mrow",o);var a=new Ne.MathNode("annotation",[new Ne.TextNode(e)]);a.setAttribute("encoding","application/x-tex");var l=new Ne.MathNode("semantics",[s,a]),c=new Ne.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var d=n?"katex":"katex-mathml";return ae.makeSpan([d],[c])}var uj=function(e){return new hw({style:e.displayMode?St.DISPLAY:St.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},hj=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=ae.makeSpan(r,[e])}return e},yde=function(e,t,r){var n=uj(r),o;if(r.output==="mathml")return LU(e,t,n,r.displayMode,!0);if(r.output==="html"){var s=H5(e,n);o=ae.makeSpan(["katex"],[s])}else{var a=LU(e,t,n,r.displayMode,!1),l=H5(e,n);o=ae.makeSpan(["katex"],[a,l])}return hj(o,r)},wde=function(e,t,r){var n=uj(r),o=H5(e,n),s=ae.makeSpan(["katex"],[o]);return hj(s,r)},xde={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":"="},Cde=function(e){var t=new Ne.MathNode("mo",[new Ne.TextNode(xde[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Sde={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]},kde=function(e){return e.type==="ordgroup"?e.body.length:1},Ede=function(e,t){function r(){var a=4e5,l=e.label.slice(1);if(Nt.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=kde(c.base),u,h,f;if(d>5)l==="widehat"||l==="widecheck"?(u=420,a=2364,f=.42,h=l+"4"):(u=312,a=2340,f=.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],f=[0,.24,.3,.3,.36,.42][m],h=l+m):(a=[0,600,1033,2339,2340][m],u=[0,260,286,306,312][m],f=[0,.26,.286,.3,.306,.34][m],h="tilde"+m)}var g=new Ma(h),w=new Ps([g],{width:"100%",height:$e(f),viewBox:"0 0 "+a+" "+u,preserveAspectRatio:"none"});return{span:ae.makeSvgSpan([],[w],t),minWidth:0,height:f}}else{var _=[],E=Sde[l],[A,L,O]=E,U=O/1e3,Y=A.length,oe,te;if(Y===1){var Z=E[3];oe=["hide-tail"],te=[Z]}else if(Y===2)oe=["halfarrow-left","halfarrow-right"],te=["xMinYMin","xMaxYMin"];else if(Y===3)oe=["brace-left","brace-center","brace-right"],te=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+Y+" children.");for(var ve=0;ve<Y;ve++){var Pe=new Ma(A[ve]),Ee=new Ps([Pe],{width:"400em",height:$e(U),viewBox:"0 0 "+a+" "+O,preserveAspectRatio:te[ve]+" slice"}),Oe=ae.makeSvgSpan([oe[ve]],[Ee],t);if(Y===1)return{span:Oe,minWidth:L,height:U};Oe.style.height=$e(U),_.push(Oe)}return{span:ae.makeSpan(["stretchy"],_,t),minWidth:L,height:U}}}var{span:n,minWidth:o,height:s}=r();return n.height=s,n.style.height=$e(s),o>0&&(n.style.minWidth=$e(o)),n},Tde=function(e,t,r,n,o){var s,a=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(s=ae.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 Kg({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&c.push(new Kg({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Ps(c,{width:"100%",height:$e(a)});s=ae.makeSvgSpan([],[d],o)}return s.height=a,s.style.height=$e(a),s},zl={encloseSpan:Tde,mathMLnode:Cde,svgSpan:Ede};function Qt(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 Z5(i){var e=ww(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 ww(i){return i&&(i.type==="atom"||Jce.hasOwnProperty(i.type))?i:null}var J5=(i,e)=>{var t,r,n;i&&i.type==="supsub"?(r=Qt(i.base,"accent"),t=r.base,i.base=t,n=Qce(bi(i,e)),i.base=r):(r=Qt(i,"accent"),t=r.base);var o=bi(t,e.havingCrampedStyle()),s=r.isShifty&&Nt.isCharacterBox(t),a=0;if(s){var l=Nt.getBaseElem(t),c=bi(l,e.havingCrampedStyle());a=SU(c).skew}var d=r.label==="\\c",u=d?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight),h;if(r.isStretchy)h=zl.svgSpan(r,e),h=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+$e(2*a)+")",marginLeft:$e(2*a)}:void 0}]},e);else{var f,m;r.label==="\\vec"?(f=ae.staticSvg("vec",e),m=ae.svgData.vec[1]):(f=ae.makeOrd({mode:r.mode,text:r.label},e,"textord"),f=SU(f),f.italic=0,m=f.width,d&&(u+=f.depth)),h=ae.makeSpan(["accent-body"],[f]);var g=r.label==="\\textcircled";g&&(h.classes.push("accent-full"),u=o.height);var w=a;g||(w-=m/2),h.style.left=$e(w),r.label==="\\textcircled"&&(h.style.top=".2em"),h=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:h}]},e)}var _=ae.makeSpan(["mord","accent"],[h],e);return n?(n.children[0]=_,n.height=Math.max(_.height,n.height),n.classes[0]="mord",n):_},fj=(i,e)=>{var t=i.isStretchy?zl.mathMLnode(i.label):new Ne.MathNode("mo",[os(i.label,i.mode)]),r=new Ne.MathNode("mover",[zi(i.base,e),t]);return r.setAttribute("accent","true"),r},Ide=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));rt({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=gw(e[0]),r=!Ide.test(i.funcName),n=!r||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:r,isShifty:n,base:t}},htmlBuilder:J5,mathmlBuilder:fj});rt({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],r=i.parser.mode;return r==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:J5,mathmlBuilder:fj});rt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:n}},htmlBuilder:(i,e)=>{var t=bi(i.base,e),r=zl.svgSpan(i,e),n=i.label==="\\utilde"?.12:0,o=ae.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return ae.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(i,e)=>{var t=zl.mathMLnode(i.label),r=new Ne.MathNode("munder",[zi(i.base,e),t]);return r.setAttribute("accentunder","true"),r}});var sw=i=>{var e=new Ne.MathNode("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};rt({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:r,funcName:n}=i;return{type:"xArrow",mode:r.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,r=e.havingStyle(t.sup()),n=ae.wrapFragment(bi(i.body,r,e),e),o=i.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(o+"-arrow-pad");var s;i.below&&(r=e.havingStyle(t.sub()),s=ae.wrapFragment(bi(i.below,r,e),e),s.classes.push(o+"-arrow-pad"));var a=zl.svgSpan(i,e),l=-e.fontMetrics().axisHeight+.5*a.height,c=-e.fontMetrics().axisHeight-.5*a.height-.111;(n.depth>.25||i.label==="\\xleftequilibrium")&&(c-=n.depth);var d;if(s){var u=-e.fontMetrics().axisHeight+s.height+.5*a.height+.111;d=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:u}]},e)}else d=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:c},{type:"elem",elem:a,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),ae.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(i,e){var t=zl.mathMLnode(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(i.body){var n=sw(zi(i.body,e));if(i.below){var o=sw(zi(i.below,e));r=new Ne.MathNode("munderover",[t,o,n])}else r=new Ne.MathNode("mover",[t,n])}else if(i.below){var s=sw(zi(i.below,e));r=new Ne.MathNode("munder",[t,s])}else r=sw(),r=new Ne.MathNode("mover",[t,r]);return r}});var Lde=ae.makeSpan;function pj(i,e){var t=jr(i.body,e,!0);return Lde([i.mclass],t,e)}function mj(i,e){var t,r=fo(i.body,e);return i.mclass==="minner"?t=new Ne.MathNode("mpadded",r):i.mclass==="mord"?i.isCharacterBox?(t=r[0],t.type="mi"):t=new Ne.MathNode("mi",r):(i.isCharacterBox?(t=r[0],t.type="mo"):t=new Ne.MathNode("mo",r),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}rt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:r}=i,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:kr(n),isCharacterBox:Nt.isCharacterBox(n)}},htmlBuilder:pj,mathmlBuilder:mj});var xw=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"};rt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:xw(e[0]),body:kr(e[1]),isCharacterBox:Nt.isCharacterBox(e[1])}}});rt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:r}=i,n=e[1],o=e[0],s;r!=="\\stackrel"?s=xw(n):s="mrel";var a={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:kr(n)},l={type:"supsub",mode:o.mode,base:a,sup:r==="\\underset"?null:o,sub:r==="\\underset"?o:null};return{type:"mclass",mode:t.mode,mclass:s,body:[l],isCharacterBox:Nt.isCharacterBox(l)}},htmlBuilder:pj,mathmlBuilder:mj});rt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:xw(e[0]),body:kr(e[0])}},htmlBuilder(i,e){var t=jr(i.body,e,!0),r=ae.makeSpan([i.mclass],t,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(i,e){var t=fo(i.body,e),r=new Ne.MathNode("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Ade={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},AU=()=>({type:"styling",body:[],mode:"math",style:"display"}),DU=i=>i.type==="textord"&&i.text==="@",Dde=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function Mde(i,e,t){var r=Ade[i];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),o={type:"atom",text:r,mode:"math",family:"rel"},s=t.callFunction("\\Big",[o],[]),a=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[n,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 Nde(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 Be("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var r=[],n=[r],o=0;o<e.length;o++){for(var s=e[o],a=AU(),l=0;l<s.length;l++)if(!DU(s[l]))a.body.push(s[l]);else{r.push(a),l+=1;var c=Z5(s[l]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(c)>-1))if("<>AV".indexOf(c)>-1)for(var u=0;u<2;u++){for(var h=!0,f=l+1;f<s.length;f++){if(Dde(s[f],c)){h=!1,l=f;break}if(DU(s[f]))throw new Be("Missing a "+c+" character to complete a CD arrow.",s[f]);d[u].body.push(s[f])}if(h)throw new Be("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new Be('Expected one of "<>AV=|." after @',s[l]);var m=Mde(c,d,i),g={type:"styling",body:[m],mode:"math",style:"display"};r.push(g),a=AU()}o%2===0?r.push(a):r.shift(),r=[],n.push(r)}i.gullet.endGroup(),i.gullet.endGroup();var w=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}rt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:r}=i;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),r=ae.wrapFragment(bi(i.label,t,e),e);return r.classes.push("cd-label-"+i.side),r.style.bottom=$e(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(i,e){var t=new Ne.MathNode("mrow",[zi(i.label,e)]);return t=new Ne.MathNode("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ne.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});rt({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=ae.wrapFragment(bi(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Ne.MathNode("mrow",[zi(i.fragment,e)])}});rt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,r=Qt(e[0],"ordgroup"),n=r.body,o="",s=0;s<n.length;s++){var a=Qt(n[s],"textord");o+=a.text}var l=parseInt(o),c;if(isNaN(l))throw new Be("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new Be("\\@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 gj=(i,e)=>{var t=jr(i.body,e.withColor(i.color),!1);return ae.makeFragment(t)},bj=(i,e)=>{var t=fo(i.body,e.withColor(i.color)),r=new Ne.MathNode("mstyle",t);return r.setAttribute("mathcolor",i.color),r};rt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,r=Qt(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:r,body:kr(n)}},htmlBuilder:gj,mathmlBuilder:bj});rt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:r}=i,n=Qt(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var o=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:n,body:o}},htmlBuilder:gj,mathmlBuilder:bj});rt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:r}=i,n=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:n&&Qt(n,"size").value}},htmlBuilder(i,e){var t=ae.makeSpan(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=$e(dr(i.size,e)))),t},mathmlBuilder(i,e){var t=new Ne.MathNode("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",$e(dr(i.size,e)))),t}});var j5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},vj=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Be("Expected a control sequence",i);return e},Rde=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},_j=(i,e,t,r)=>{var n=i.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,n,r)};rt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var r=e.fetch();if(j5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=j5[r.text]),Qt(e.parseFunction(),"internal");throw new Be("Invalid token after macro prefix",r)}});rt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,r=e.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Be("Expected a control sequence",r);for(var o=0,s,a=[[]];e.gullet.future().text!=="{";)if(r=e.gullet.popToken(),r.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),a[o].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Be('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==o+1)throw new Be('Argument number "'+r.text+'" out of order');o++,a.push([])}else{if(r.text==="EOF")throw new Be("Expected a macro definition");a[o].push(r.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(n,{tokens:l,numArgs:o,delimiters:a},t===j5[t]),{type:"internal",mode:e.mode}}});rt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,r=vj(e.gullet.popToken());e.gullet.consumeSpaces();var n=Rde(e);return _j(e,r,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});rt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,r=vj(e.gullet.popToken()),n=e.gullet.popToken(),o=e.gullet.popToken();return _j(e,r,o,t==="\\\\globalfuture"),e.gullet.pushToken(o),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var Ug=function(e,t,r){var n=$i.math[e]&&$i.math[e].replace,o=G5(n||e,t,r);if(!o)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return o},e6=function(e,t,r,n){var o=r.havingBaseStyle(t),s=ae.makeSpan(n.concat(o.sizingClasses(r)),[e],r),a=o.sizeMultiplier/r.sizeMultiplier;return s.height*=a,s.depth*=a,s.maxFontSize=o.sizeMultiplier,s},yj=function(e,t,r){var n=t.havingBaseStyle(r),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=$e(o),e.height-=o,e.depth+=o},Pde=function(e,t,r,n,o,s){var a=ae.makeSymbol(e,"Main-Regular",o,n),l=e6(a,t,n,s);return r&&yj(l,n,t),l},Ode=function(e,t,r,n){return ae.makeSymbol(e,"Size"+t+"-Regular",r,n)},wj=function(e,t,r,n,o,s){var a=Ode(e,t,o,n),l=e6(ae.makeSpan(["delimsizing","size"+t],[a],n),St.TEXT,n,s);return r&&yj(l,n,St.TEXT),l},E5=function(e,t,r){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var o=ae.makeSpan(["delimsizinginner",n],[ae.makeSpan([],[ae.makeSymbol(e,t,r)])]);return{type:"elem",elem:o}},T5=function(e,t,r){var n=Aa["Size4-Regular"][e.charCodeAt(0)]?Aa["Size4-Regular"][e.charCodeAt(0)][4]:Aa["Size1-Regular"][e.charCodeAt(0)][4],o=new Ma("inner",Vce(e,Math.round(1e3*t))),s=new Ps([o],{width:$e(n),height:$e(t),style:"width:"+$e(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=ae.makeSvgSpan([],[s],r);return a.height=t,a.style.height=$e(t),a.style.width=$e(n),{type:"elem",elem:a}},W5=.008,aw={type:"kern",size:-1*W5},Fde=["|","\\lvert","\\rvert","\\vert"],zde=["\\|","\\lVert","\\rVert","\\Vert"],xj=function(e,t,r,n,o,s){var a,l,c,d,u="",h=0;a=c=d=e,l=null;var f="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"):Nt.contains(Fde,e)?(c="\u2223",u="vert",h=333):Nt.contains(zde,e)?(c="\u2225",u="doublevert",h=556):e==="["||e==="\\lbrack"?(a="\u23A1",c="\u23A2",d="\u23A3",f="Size4-Regular",u="lbrack",h=667):e==="]"||e==="\\rbrack"?(a="\u23A4",c="\u23A5",d="\u23A6",f="Size4-Regular",u="rbrack",h=667):e==="\\lfloor"||e==="\u230A"?(c=a="\u23A2",d="\u23A3",f="Size4-Regular",u="lfloor",h=667):e==="\\lceil"||e==="\u2308"?(a="\u23A1",c=d="\u23A2",f="Size4-Regular",u="lceil",h=667):e==="\\rfloor"||e==="\u230B"?(c=a="\u23A5",d="\u23A6",f="Size4-Regular",u="rfloor",h=667):e==="\\rceil"||e==="\u2309"?(a="\u23A4",c=d="\u23A5",f="Size4-Regular",u="rceil",h=667):e==="("||e==="\\lparen"?(a="\u239B",c="\u239C",d="\u239D",f="Size4-Regular",u="lparen",h=875):e===")"||e==="\\rparen"?(a="\u239E",c="\u239F",d="\u23A0",f="Size4-Regular",u="rparen",h=875):e==="\\{"||e==="\\lbrace"?(a="\u23A7",l="\u23A8",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(a="\u23AB",l="\u23AC",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(a="\u23A7",d="\u23A9",c="\u23AA",f="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(a="\u23AB",d="\u23AD",c="\u23AA",f="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(a="\u23A7",d="\u23AD",c="\u23AA",f="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(a="\u23AB",d="\u23A9",c="\u23AA",f="Size4-Regular");var m=Ug(a,f,o),g=m.height+m.depth,w=Ug(c,f,o),_=w.height+w.depth,E=Ug(d,f,o),A=E.height+E.depth,L=0,O=1;if(l!==null){var U=Ug(l,f,o);L=U.height+U.depth,O=2}var Y=g+A+L,oe=Math.max(0,Math.ceil((t-Y)/(O*_))),te=Y+oe*O*_,Z=n.fontMetrics().axisHeight;r&&(Z*=n.sizeMultiplier);var ve=te/2-Z,Pe=[];if(u.length>0){var Ee=te-g-A,Oe=Math.round(te*1e3),Xe=qce(u,Math.round(Ee*1e3)),dt=new Ma(u,Xe),be=(h/1e3).toFixed(3)+"em",we=(Oe/1e3).toFixed(3)+"em",X=new Ps([dt],{width:be,height:we,viewBox:"0 0 "+h+" "+Oe}),R=ae.makeSvgSpan([],[X],n);R.height=Oe/1e3,R.style.width=be,R.style.height=we,Pe.push({type:"elem",elem:R})}else{if(Pe.push(E5(d,f,o)),Pe.push(aw),l===null){var ne=te-g-A+2*W5;Pe.push(T5(c,ne,n))}else{var me=(te-g-A-L)/2+2*W5;Pe.push(T5(c,me,n)),Pe.push(aw),Pe.push(E5(l,f,o)),Pe.push(aw),Pe.push(T5(c,me,n))}Pe.push(aw),Pe.push(E5(a,f,o))}var G=n.havingBaseStyle(St.TEXT),Et=ae.makeVList({positionType:"bottom",positionData:ve,children:Pe},G);return e6(ae.makeSpan(["delimsizing","mult"],[Et],G),St.TEXT,n,s)},I5=80,L5=.08,A5=function(e,t,r,n,o){var s=Wce(e,n,r),a=new Ma(e,s),l=new Ps([a],{width:"400em",height:$e(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return ae.makeSvgSpan(["hide-tail"],[l],o)},Bde=function(e,t){var r=t.havingBaseSizing(),n=Ej("\\surd",e*r.sizeMultiplier,kj,r),o=r.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l=0,c=0,d=0,u;return n.type==="small"?(d=1e3+1e3*s+I5,e<1?o=1:e<1.4&&(o=.7),l=(1+s+L5)/o,c=(1+s)/o,a=A5("sqrtMain",l,d,s,t),a.style.minWidth="0.853em",u=.833/o):n.type==="large"?(d=(1e3+I5)*jg[n.size],c=(jg[n.size]+s)/o,l=(jg[n.size]+s+L5)/o,a=A5("sqrtSize"+n.size,l,d,s,t),a.style.minWidth="1.02em",u=1/o):(l=e+s+L5,c=e+s,d=Math.floor(1e3*e+s)+I5,a=A5("sqrtTall",l,d,s,t),a.style.minWidth="0.742em",u=1.056),a.height=c,a.style.height=$e(l),{span:a,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},Cj=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Hde=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Sj=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],jg=[0,1.2,1.8,2.4,3],Ude=function(e,t,r,n,o){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Nt.contains(Cj,e)||Nt.contains(Sj,e))return wj(e,t,!1,r,n,o);if(Nt.contains(Hde,e))return xj(e,jg[t],!1,r,n,o);throw new Be("Illegal delimiter: '"+e+"'")},jde=[{type:"small",style:St.SCRIPTSCRIPT},{type:"small",style:St.SCRIPT},{type:"small",style:St.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Wde=[{type:"small",style:St.SCRIPTSCRIPT},{type:"small",style:St.SCRIPT},{type:"small",style:St.TEXT},{type:"stack"}],kj=[{type:"small",style:St.SCRIPTSCRIPT},{type:"small",style:St.SCRIPT},{type:"small",style:St.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Vde=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.")},Ej=function(e,t,r,n){for(var o=Math.min(2,3-n.style.size),s=o;s<r.length&&r[s].type!=="stack";s++){var a=Ug(e,Vde(r[s]),"math"),l=a.height+a.depth;if(r[s].type==="small"){var c=n.havingBaseStyle(r[s].style);l*=c.sizeMultiplier}if(l>t)return r[s]}return r[r.length-1]},Tj=function(e,t,r,n,o,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var a;Nt.contains(Sj,e)?a=jde:Nt.contains(Cj,e)?a=kj:a=Wde;var l=Ej(e,t,a,n);return l.type==="small"?Pde(e,l.style,r,n,o,s):l.type==="large"?wj(e,l.size,r,n,o,s):xj(e,t,r,n,o,s)},qde=function(e,t,r,n,o,s){var a=n.fontMetrics().axisHeight*n.sizeMultiplier,l=901,c=5/n.fontMetrics().ptPerEm,d=Math.max(t-a,r+a),u=Math.max(d/500*l,2*d-c);return Tj(e,u,!0,n,o,s)},Ol={sqrtImage:Bde,sizedDelim:Ude,sizeToMaxHeight:jg,customSizedDelim:Tj,leftRightDelim:qde},MU={"\\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}},Kde=["(","\\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 Cw(i,e){var t=ww(i);if(t&&Nt.contains(Kde,t.text))return t;throw t?new Be("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new Be("Invalid delimiter type '"+i.type+"'",i)}rt({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=Cw(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:MU[i.funcName].size,mclass:MU[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?ae.makeSpan([i.mclass]):Ol.sizedDelim(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(os(i.delim,i.mode));var t=new Ne.MathNode("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=$e(Ol.sizeToMaxHeight[i.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function NU(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}rt({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 Be("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:Cw(e[0],i).text,color:t}}});rt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Cw(e[0],i),r=i.parser;++r.leftrightDepth;var n=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Qt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:n,left:t.text,right:o.delim,rightColor:o.color}},htmlBuilder:(i,e)=>{NU(i);for(var t=jr(i.body,e,!0,["mopen","mclose"]),r=0,n=0,o=!1,s=0;s<t.length;s++)t[s].isMiddle?o=!0:(r=Math.max(t[s].height,r),n=Math.max(t[s].depth,n));r*=e.sizeMultiplier,n*=e.sizeMultiplier;var a;if(i.left==="."?a=$g(e,["mopen"]):a=Ol.leftRightDelim(i.left,r,n,e,i.mode,["mopen"]),t.unshift(a),o)for(var l=1;l<t.length;l++){var c=t[l],d=c.isMiddle;d&&(t[l]=Ol.leftRightDelim(d.delim,r,n,d.options,i.mode,[]))}var u;if(i.right===".")u=$g(e,["mclose"]);else{var h=i.rightColor?e.withColor(i.rightColor):e;u=Ol.leftRightDelim(i.right,r,n,h,i.mode,["mclose"])}return t.push(u),ae.makeSpan(["minner"],t,e)},mathmlBuilder:(i,e)=>{NU(i);var t=fo(i.body,e);if(i.left!=="."){var r=new Ne.MathNode("mo",[os(i.left,i.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(i.right!=="."){var n=new Ne.MathNode("mo",[os(i.right,i.mode)]);n.setAttribute("fence","true"),i.rightColor&&n.setAttribute("mathcolor",i.rightColor),t.push(n)}return X5(t)}});rt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Cw(e[0],i);if(!i.parser.leftrightDepth)throw new Be("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;if(i.delim===".")t=$g(e,[]);else{t=Ol.sizedDelim(i.delim,1,e,i.mode,[]);var r={delim:i.delim,options:e};t.isMiddle=r}return t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?os("|","text"):os(i.delim,i.mode),r=new Ne.MathNode("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var t6=(i,e)=>{var t=ae.wrapFragment(bi(i.body,e),e),r=i.label.slice(1),n=e.sizeMultiplier,o,s=0,a=Nt.isCharacterBox(i.body);if(r==="sout")o=ae.makeSpan(["stretchy","sout"]),o.height=e.fontMetrics().defaultRuleThickness/n,s=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var l=dr({number:.6,unit:"pt"},e),c=dr({number:.35,unit:"ex"},e),d=e.havingBaseSizing();n=n/d.sizeMultiplier;var u=t.height+t.depth+l+c;t.style.paddingLeft=$e(u/2+l);var h=Math.floor(1e3*u*n),f=Uce(h),m=new Ps([new Ma("phase",f)],{width:"400em",height:$e(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});o=ae.makeSvgSpan(["hide-tail"],[m],e),o.style.height=$e(u),s=t.depth+l+c}else{/cancel/.test(r)?a||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var g=0,w=0,_=0;/box/.test(r)?(_=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(r==="colorbox"?0:_),w=g):r==="angl"?(_=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*_,w=Math.max(0,.25-t.depth)):(g=a?.2:0,w=g),o=zl.encloseSpan(t,r,g,w,e),/fbox|boxed|fcolorbox/.test(r)?(o.style.borderStyle="solid",o.style.borderWidth=$e(_)):r==="angl"&&_!==.049&&(o.style.borderTopWidth=$e(_),o.style.borderRightWidth=$e(_)),s=t.depth+w,i.backgroundColor&&(o.style.backgroundColor=i.backgroundColor,i.borderColor&&(o.style.borderColor=i.borderColor))}var E;if(i.backgroundColor)E=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:t,shift:0}]},e);else{var A=/cancel|phase/.test(r)?["svg-align"]:[];E=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:A}]},e)}return/cancel/.test(r)&&(E.height=t.height,E.depth=t.depth),/cancel/.test(r)&&!a?ae.makeSpan(["mord","cancel-lap"],[E],e):ae.makeSpan(["mord"],[E],e)},i6=(i,e)=>{var t=0,r=new Ne.MathNode(i.label.indexOf("colorbox")>-1?"mpadded":"menclose",[zi(i.body,e)]);switch(i.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+n+"em solid "+String(i.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&r.setAttribute("mathbackground",i.backgroundColor),r};rt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(i,e,t){var{parser:r,funcName:n}=i,o=Qt(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:r.mode,label:n,backgroundColor:o,body:s}},htmlBuilder:t6,mathmlBuilder:i6});rt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(i,e,t){var{parser:r,funcName:n}=i,o=Qt(e[0],"color-token").color,s=Qt(e[1],"color-token").color,a=e[2];return{type:"enclose",mode:r.mode,label:n,backgroundColor:s,borderColor:o,body:a}},htmlBuilder:t6,mathmlBuilder:i6});rt({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]}}});rt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:r}=i,n=e[0];return{type:"enclose",mode:t.mode,label:r,body:n}},htmlBuilder:t6,mathmlBuilder:i6});rt({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 Ij={};function Na(i){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:o,mathmlBuilder:s}=i,a={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l<t.length;++l)Ij[t[l]]=a;o&&(pw[e]=o),s&&(mw[e]=s)}var Lj={};function P(i,e){Lj[i]=e}function RU(i){var e=[];i.consumeSpaces();var t=i.fetch().text;for(t==="\\relax"&&(i.consume(),i.consumeSpaces(),t=i.fetch().text);t==="\\hline"||t==="\\hdashline";)i.consume(),e.push(t==="\\hdashline"),i.consumeSpaces(),t=i.fetch().text;return e}var Sw=i=>{var e=i.parser.settings;if(!e.displayMode)throw new Be("{"+i.envName+"} can be used only in display mode.")};function r6(i){if(i.indexOf("ed")===-1)return i.indexOf("*")===-1}function fd(i,e,t){var{hskipBeforeAndAfter:r,addJot:n,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 f=i.gullet.expandMacroAsText("\\arraystretch");if(f==null)s=1;else if(s=parseFloat(f),!s||s<0)throw new Be("Invalid \\arraystretch: "+f)}i.gullet.beginGroup();var m=[],g=[m],w=[],_=[],E=l!=null?[]:void 0;function A(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function L(){E&&(i.gullet.macros.get("\\df@tag")?(E.push(i.subparse([new Da("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):E.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),_.push(RU(i));;){var O=i.parseExpression(!1,c?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup(),O={type:"ordgroup",mode:i.mode,body:O},t&&(O={type:"styling",mode:i.mode,style:t,body:[O]}),m.push(O);var U=i.fetch().text;if(U==="&"){if(u&&m.length===u){if(c||a)throw new Be("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(U==="\\end"){L(),m.length===1&&O.type==="styling"&&O.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),_.length<g.length+1&&_.push([]);break}else if(U==="\\\\"){i.consume();var Y=void 0;i.gullet.future().text!==" "&&(Y=i.parseSizeGroup(!0)),w.push(Y?Y.value:null),L(),_.push(RU(i)),m=[],g.push(m),A()}else throw new Be("Expected & or \\\\ or \\cr or \\end",i.nextToken)}return i.gullet.endGroup(),i.gullet.endGroup(),{type:"array",mode:i.mode,addJot:n,arraystretch:s,body:g,cols:o,rowGaps:w,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:a,tags:E,leqno:h}}function n6(i){return i.slice(0,1)==="d"?"display":"text"}var Ra=function(e,t){var r,n,o=e.body.length,s=e.hLinesBeforeRow,a=0,l=new Array(o),c=[],d=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,h=5*u;if(e.colSeparationType&&e.colSeparationType==="small"){var f=t.havingStyle(St.SCRIPT).sizeMultiplier;h=.2778*(f/t.sizeMultiplier)}var m=e.colSeparationType==="CD"?dr({number:3,unit:"ex"},t):12*u,g=3*u,w=e.arraystretch*m,_=.7*w,E=.3*w,A=0;function L(Ko){for(var hr=0;hr<Ko.length;++hr)hr>0&&(A+=.25),c.push({pos:A,isDashed:Ko[hr]})}for(L(s[0]),r=0;r<e.body.length;++r){var O=e.body[r],U=_,Y=E;a<O.length&&(a=O.length);var oe=new Array(O.length);for(n=0;n<O.length;++n){var te=bi(O[n],t);Y<te.depth&&(Y=te.depth),U<te.height&&(U=te.height),oe[n]=te}var Z=e.rowGaps[r],ve=0;Z&&(ve=dr(Z,t),ve>0&&(ve+=E,Y<ve&&(Y=ve),ve=0)),e.addJot&&(Y+=g),oe.height=U,oe.depth=Y,A+=U,oe.pos=A,A+=Y+ve,l[r]=oe,L(s[r+1])}var Pe=A/2+t.fontMetrics().axisHeight,Ee=e.cols||[],Oe=[],Xe,dt,be=[];if(e.tags&&e.tags.some(Ko=>Ko))for(r=0;r<o;++r){var we=l[r],X=we.pos-Pe,R=e.tags[r],ne=void 0;R===!0?ne=ae.makeSpan(["eqn-num"],[],t):R===!1?ne=ae.makeSpan([],[],t):ne=ae.makeSpan([],jr(R,t,!0),t),ne.depth=we.depth,ne.height=we.height,be.push({type:"elem",elem:ne,shift:X})}for(n=0,dt=0;n<a||dt<Ee.length;++n,++dt){for(var me=Ee[dt]||{},G=!0;me.type==="separator";){if(G||(Xe=ae.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(t.fontMetrics().doubleRuleSep),Oe.push(Xe)),me.separator==="|"||me.separator===":"){var Et=me.separator==="|"?"solid":"dashed",Ot=ae.makeSpan(["vertical-separator"],[],t);Ot.style.height=$e(A),Ot.style.borderRightWidth=$e(d),Ot.style.borderRightStyle=Et,Ot.style.margin="0 "+$e(-d/2);var ai=A-Pe;ai&&(Ot.style.verticalAlign=$e(-ai)),Oe.push(Ot)}else throw new Be("Invalid separator type: "+me.separator);dt++,me=Ee[dt]||{},G=!1}if(!(n>=a)){var Ti=void 0;(n>0||e.hskipBeforeAndAfter)&&(Ti=Nt.deflt(me.pregap,h),Ti!==0&&(Xe=ae.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(Ti),Oe.push(Xe)));var kt=[];for(r=0;r<o;++r){var Ei=l[r],fi=Ei[n];if(fi){var xo=Ei.pos-Pe;fi.depth=Ei.depth,fi.height=Ei.height,kt.push({type:"elem",elem:fi,shift:xo})}}kt=ae.makeVList({positionType:"individualShift",children:kt},t),kt=ae.makeSpan(["col-align-"+(me.align||"c")],[kt]),Oe.push(kt),(n<a-1||e.hskipBeforeAndAfter)&&(Ti=Nt.deflt(me.postgap,h),Ti!==0&&(Xe=ae.makeSpan(["arraycolsep"],[]),Xe.style.width=$e(Ti),Oe.push(Xe)))}}if(l=ae.makeSpan(["mtable"],Oe),c.length>0){for(var ro=ae.makeLineSpan("hline",t,d),kc=ae.makeLineSpan("hdashline",t,d),Ec=[{type:"elem",elem:l,shift:0}];c.length>0;){var rl=c.pop(),ru=rl.pos-Pe;rl.isDashed?Ec.push({type:"elem",elem:kc,shift:ru}):Ec.push({type:"elem",elem:ro,shift:ru})}l=ae.makeVList({positionType:"individualShift",children:Ec},t)}if(be.length===0)return ae.makeSpan(["mord"],[l],t);var Or=ae.makeVList({positionType:"individualShift",children:be},t);return Or=ae.makeSpan(["tag"],[Or],t),ae.makeFragment([l,Or])},$de={c:"center ",l:"left ",r:"right "},Pa=function(e,t){for(var r=[],n=new Ne.MathNode("mtd",[],["mtr-glue"]),o=new Ne.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var a=e.body[s],l=[],c=0;c<a.length;c++)l.push(new Ne.MathNode("mtd",[zi(a[c],t)]));e.tags&&e.tags[s]&&(l.unshift(n),l.push(n),e.leqno?l.unshift(o):l.push(o)),r.push(new Ne.MathNode("mtr",l))}var d=new Ne.MathNode("mtable",r),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",$e(u));var h="",f="";if(e.cols&&e.cols.length>0){var m=e.cols,g="",w=!1,_=0,E=m.length;m[0].type==="separator"&&(h+="top ",_=1),m[m.length-1].type==="separator"&&(h+="bottom ",E-=1);for(var A=_;A<E;A++)m[A].type==="align"?(f+=$de[m[A].align],w&&(g+="none "),w=!0):m[A].type==="separator"&&w&&(g+=m[A].separator==="|"?"solid ":"dashed ",w=!1);d.setAttribute("columnalign",f.trim()),/[sd]/.test(g)&&d.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var L=e.cols||[],O="",U=1;U<L.length;U++)O+=U%2?"0em ":"1em ";d.setAttribute("columnspacing",O.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var Y="",oe=e.hLinesBeforeRow;h+=oe[0].length>0?"left ":"",h+=oe[oe.length-1].length>0?"right ":"";for(var te=1;te<oe.length-1;te++)Y+=oe[te].length===0?"none ":oe[te][0]?"dashed ":"solid ";return/[sd]/.test(Y)&&d.setAttribute("rowlines",Y.trim()),h!==""&&(d=new Ne.MathNode("menclose",[d]),d.setAttribute("notation",h.trim())),e.arraystretch&&e.arraystretch<1&&(d=new Ne.MathNode("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},Aj=function(e,t){e.envName.indexOf("ed")===-1&&Sw(e);var r=[],n=e.envName.indexOf("at")>-1?"alignat":"align",o=e.envName==="split",s=fd(e.parser,{cols:r,addJot:!0,autoTag:o?void 0:r6(e.envName),emptySingleRow:!0,colSeparationType:n,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;u<t[0].body.length;u++){var h=Qt(t[0].body[u],"textord");d+=h.text}a=Number(d),l=a*2}var f=!l;s.body.forEach(function(_){for(var E=1;E<_.length;E+=2){var A=Qt(_[E],"styling"),L=Qt(A.body[0],"ordgroup");L.body.unshift(c)}if(f)l<_.length&&(l=_.length);else{var O=_.length/2;if(a<O)throw new Be("Too many math in a row: "+("expected "+a+", but got "+O),_[0])}});for(var m=0;m<l;++m){var g="r",w=0;m%2===1?g="l":m>0&&f&&(w=1),r[m]={type:"align",align:g,pregap:w,postgap:0}}return s.colSeparationType=f?"align":"alignat",s};Na({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=ww(e[0]),r=t?[e[0]]:Qt(e[0],"ordgroup").body,n=r.map(function(s){var a=Z5(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 Be("Unknown column alignment: "+l,s)}),o={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return fd(i.parser,o,n6(i.envName))},htmlBuilder:Ra,mathmlBuilder:Pa});Na({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",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var n=i.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new Be("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),r.cols=[{type:"align",align:t}]}}var o=fd(i.parser,r,n6(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:Ra,mathmlBuilder:Pa});Na({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=fd(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=ww(e[0]),r=t?[e[0]]:Qt(e[0],"ordgroup").body,n=r.map(function(s){var a=Z5(s),l=a.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Be("Unknown column alignment: "+l,s)});if(n.length>1)throw new Be("{subarray} can contain only one column");var o={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=fd(i.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new Be("{subarray} can contain only one column");return o},htmlBuilder:Ra,mathmlBuilder:Pa});Na({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=fd(i.parser,e,n6(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:Ra,mathmlBuilder:Pa});Na({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Aj,htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){Nt.contains(["gather","gather*"],i.envName)&&Sw(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:r6(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return fd(i.parser,e,"display")},htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Aj,htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){Sw(i);var e={autoTag:r6(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return fd(i.parser,e,"display")},htmlBuilder:Ra,mathmlBuilder:Pa});Na({type:"array",names:["CD"],props:{numArgs:0},handler(i){return Sw(i),Nde(i.parser)},htmlBuilder:Ra,mathmlBuilder:Pa});P("\\nonumber","\\gdef\\@eqnsw{0}");P("\\notag","\\nonumber");rt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new Be(i.funcName+" valid only within array environment")}});var PU=Ij;rt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:r}=i,n=e[0];if(n.type!=="ordgroup")throw new Be("Invalid environment name",n);for(var o="",s=0;s<n.body.length;++s)o+=Qt(n.body[s],"textord").text;if(r==="\\begin"){if(!PU.hasOwnProperty(o))throw new Be("No such environment: "+o,n);var a=PU[o],{args:l,optArgs:c}=t.parseArguments("\\begin{"+o+"}",a),d={mode:t.mode,envName:o,parser:t},u=a.handler(d,l,c);t.expect("\\end",!1);var h=t.nextToken,f=Qt(t.parseFunction(),"environment");if(f.name!==o)throw new Be("Mismatch: \\begin{"+o+"} matched by \\end{"+f.name+"}",h);return u}return{type:"environment",mode:t.mode,name:o,nameGroup:n}}});var Dj=(i,e)=>{var t=i.font,r=e.withFont(t);return bi(i.body,r)},Mj=(i,e)=>{var t=i.font,r=e.withFont(t);return zi(i.body,r)},OU={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};rt({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:r}=i,n=gw(e[0]),o=r;return o in OU&&(o=OU[o]),{type:"font",mode:t.mode,font:o.slice(1),body:n}},htmlBuilder:Dj,mathmlBuilder:Mj});rt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,r=e[0],n=Nt.isCharacterBox(r);return{type:"mclass",mode:t.mode,mclass:xw(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:n}}});rt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:r,breakOnTokenText:n}=i,{mode:o}=t,s=t.parseExpression(!0,n),a="math"+r.slice(1);return{type:"font",mode:o,font:a,body:{type:"ordgroup",mode:t.mode,body:s}}},htmlBuilder:Dj,mathmlBuilder:Mj});var Nj=(i,e)=>{var t=e;return i==="display"?t=t.id>=St.SCRIPT.id?t.text():St.DISPLAY:i==="text"&&t.size===St.DISPLAY.size?t=St.TEXT:i==="script"?t=St.SCRIPT:i==="scriptscript"&&(t=St.SCRIPTSCRIPT),t},o6=(i,e)=>{var t=Nj(i.size,e.style),r=t.fracNum(),n=t.fracDen(),o;o=e.havingStyle(r);var s=bi(i.numer,o,e);if(i.continued){var a=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}o=e.havingStyle(n);var c=bi(i.denom,o,e),d,u,h;i.hasBarLine?(i.barSize?(u=dr(i.barSize,e),d=ae.makeLineSpan("frac-line",e,u)):d=ae.makeLineSpan("frac-line",e),u=d.height,h=d.height):(d=null,u=0,h=e.fontMetrics().defaultRuleThickness);var f,m,g;t.size===St.DISPLAY.size||i.size==="display"?(f=e.fontMetrics().num1,u>0?m=3*h:m=7*h,g=e.fontMetrics().denom1):(u>0?(f=e.fontMetrics().num2,m=h):(f=e.fontMetrics().num3,m=3*h),g=e.fontMetrics().denom2);var w;if(d){var E=e.fontMetrics().axisHeight;f-s.depth-(E+.5*u)<m&&(f+=m-(f-s.depth-(E+.5*u))),E-.5*u-(c.height-g)<m&&(g+=m-(E-.5*u-(c.height-g)));var A=-(E-.5*u);w=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:d,shift:A},{type:"elem",elem:s,shift:-f}]},e)}else{var _=f-s.depth-(c.height-g);_<m&&(f+=.5*(m-_),g+=.5*(m-_)),w=ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:s,shift:-f}]},e)}o=e.havingStyle(t),w.height*=o.sizeMultiplier/e.sizeMultiplier,w.depth*=o.sizeMultiplier/e.sizeMultiplier;var L;t.size===St.DISPLAY.size?L=e.fontMetrics().delim1:t.size===St.SCRIPTSCRIPT.size?L=e.havingStyle(St.SCRIPT).fontMetrics().delim2:L=e.fontMetrics().delim2;var O,U;return i.leftDelim==null?O=$g(e,["mopen"]):O=Ol.customSizedDelim(i.leftDelim,L,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?U=ae.makeSpan([]):i.rightDelim==null?U=$g(e,["mclose"]):U=Ol.customSizedDelim(i.rightDelim,L,!0,e.havingStyle(t),i.mode,["mclose"]),ae.makeSpan(["mord"].concat(o.sizingClasses(e)),[O,ae.makeSpan(["mfrac"],[w]),U],e)},s6=(i,e)=>{var t=new Ne.MathNode("mfrac",[zi(i.numer,e),zi(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var r=dr(i.barSize,e);t.setAttribute("linethickness",$e(r))}var n=Nj(i.size,e.style);if(n.size!==e.style.size){t=new Ne.MathNode("mstyle",[t]);var o=n.size===St.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 Ne.MathNode("mo",[new Ne.TextNode(i.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),i.rightDelim!=null){var l=new Ne.MathNode("mo",[new Ne.TextNode(i.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return X5(s)}return t};rt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0],o=e[1],s,a=null,l=null,c="auto";switch(r){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(r){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:o,hasBarLine:s,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:o6,mathmlBuilder:s6});rt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0],o=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});rt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:r}=i,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:r}}});var FU=["display","text","script","scriptscript"],zU=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};rt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,r=e[4],n=e[5],o=gw(e[0]),s=o.type==="atom"&&o.family==="open"?zU(o.text):null,a=gw(e[1]),l=a.type==="atom"&&a.family==="close"?zU(a.text):null,c=Qt(e[2],"size"),d,u=null;c.isBlank?d=!0:(u=c.value,d=u.number>0);var h="auto",f=e[3];if(f.type==="ordgroup"){if(f.body.length>0){var m=Qt(f.body[0],"textord");h=FU[Number(m.text)]}}else f=Qt(f,"textord"),h=FU[Number(f.text)];return{type:"genfrac",mode:t.mode,numer:r,denom:n,continued:!1,hasBarLine:d,barSize:u,leftDelim:s,rightDelim:l,size:h}},htmlBuilder:o6,mathmlBuilder:s6});rt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:r,token:n}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Qt(e[0],"size").value,token:n}}});rt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0],o=Ece(Qt(e[1],"infix").size),s=e[2],a=o.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:s,continued:!1,hasBarLine:a,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:o6,mathmlBuilder:s6});var Rj=(i,e)=>{var t=e.style,r,n;i.type==="supsub"?(r=i.sup?bi(i.sup,e.havingStyle(t.sup()),e):bi(i.sub,e.havingStyle(t.sub()),e),n=Qt(i.base,"horizBrace")):n=Qt(i,"horizBrace");var o=bi(n.base,e.havingBaseStyle(St.DISPLAY)),s=zl.svgSpan(n,e),a;if(n.isOver?(a=ae.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=ae.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")),r){var l=ae.makeSpan(["mord",n.isOver?"mover":"munder"],[a],e);n.isOver?a=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},e):a=ae.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return ae.makeSpan(["mord",n.isOver?"mover":"munder"],[a],e)},Gde=(i,e)=>{var t=zl.mathMLnode(i.label);return new Ne.MathNode(i.isOver?"mover":"munder",[zi(i.base,e),t])};rt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:r}=i;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:Rj,mathmlBuilder:Gde});rt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[1],n=Qt(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:kr(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=jr(i.body,e,!1);return ae.makeAnchor(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=hd(i.body,e);return t instanceof uo||(t=new uo("mrow",[t])),t.setAttribute("href",i.href),t}});rt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=Qt(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],o=0;o<r.length;o++){var s=r[o];s==="~"&&(s="\\textasciitilde"),n.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:t.mode,font:"\\texttt",body:n};return{type:"href",mode:t.mode,href:r,body:kr(a)}}});rt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(i,e){var{parser:t}=i;return{type:"hbox",mode:t.mode,body:kr(e[0])}},htmlBuilder(i,e){var t=jr(i.body,e,!1);return ae.makeFragment(t)},mathmlBuilder(i,e){return new Ne.MathNode("mrow",fo(i.body,e))}});rt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:r,token:n}=i,o=Qt(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(r){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<c.length;d++){var u=c[d].split("=");if(u.length!==2)throw new Be("Error parsing key-value for \\htmlData");l["data-"+u[0].trim()]=u[1].trim()}a={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(a)?{type:"html",mode:t.mode,attributes:l,body:kr(s)}:t.formatUnsupportedCmd(r)},htmlBuilder:(i,e)=>{var t=jr(i.body,e,!1),r=["enclosing"];i.attributes.class&&r.push(...i.attributes.class.trim().split(/\s+/));var n=ae.makeSpan(r,t,e);for(var o in i.attributes)o!=="class"&&i.attributes.hasOwnProperty(o)&&n.setAttribute(o,i.attributes[o]);return n},mathmlBuilder:(i,e)=>hd(i.body,e)});rt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:kr(e[0]),mathml:kr(e[1])}},htmlBuilder:(i,e)=>{var t=jr(i.html,e,!1);return ae.makeFragment(t)},mathmlBuilder:(i,e)=>hd(i.mathml,e)});var D5=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 Be("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!JU(r))throw new Be("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};rt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:r}=i,n={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(t[0])for(var l=Qt(t[0],"raw").string,c=l.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(u.length===2){var h=u[1].trim();switch(u[0].trim()){case"alt":a=h;break;case"width":n=D5(h);break;case"height":o=D5(h);break;case"totalheight":s=D5(h);break;default:throw new Be("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var f=Qt(e[0],"url").url;return a===""&&(a=f,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:r.mode,alt:a,width:n,height:o,totalheight:s,src:f}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(i,e)=>{var t=dr(i.height,e),r=0;i.totalheight.number>0&&(r=dr(i.totalheight,e)-t);var n=0;i.width.number>0&&(n=dr(i.width,e));var o={height:$e(t+r)};n>0&&(o.width=$e(n)),r>0&&(o.verticalAlign=$e(-r));var s=new F5(i.src,i.alt,o);return s.height=t,s.depth=r,s},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mglyph",[]);t.setAttribute("alt",i.alt);var r=dr(i.height,e),n=0;if(i.totalheight.number>0&&(n=dr(i.totalheight,e)-r,t.setAttribute("valign",$e(-n))),t.setAttribute("height",$e(r+n)),i.width.number>0){var o=dr(i.width,e);t.setAttribute("width",$e(o))}return t.setAttribute("src",i.src),t}});rt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:r}=i,n=Qt(e[0],"size");if(t.settings.strict){var o=r[1]==="m",s=n.value.unit==="mu";o?(s||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(i,e){return ae.makeGlue(i.dimension,e)},mathmlBuilder(i,e){var t=dr(i.dimension,e);return new Ne.SpaceNode(t)}});rt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:n}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=ae.makeSpan([],[bi(i.body,e)]),t=ae.makeSpan(["inner"],[t],e)):t=ae.makeSpan(["inner"],[bi(i.body,e)]);var r=ae.makeSpan(["fix"],[]),n=ae.makeSpan([i.alignment],[t,r],e),o=ae.makeSpan(["strut"]);return o.style.height=$e(n.height+n.depth),n.depth&&(o.style.verticalAlign=$e(-n.depth)),n.children.unshift(o),n=ae.makeSpan(["thinbox"],[n],e),ae.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mpadded",[zi(i.body,e)]);if(i.alignment!=="rlap"){var r=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});rt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:r}=i,n=r.mode;r.switchMode("math");var o=t==="\\("?"\\)":"$",s=r.parseExpression(!1,o);return r.expect(o),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:s}}});rt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new Be("Mismatched "+i.funcName)}});var BU=(i,e)=>{switch(e.style.size){case St.DISPLAY.size:return i.display;case St.TEXT.size:return i.text;case St.SCRIPT.size:return i.script;case St.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};rt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:kr(e[0]),text:kr(e[1]),script:kr(e[2]),scriptscript:kr(e[3])}},htmlBuilder:(i,e)=>{var t=BU(i,e),r=jr(t,e,!1);return ae.makeFragment(r)},mathmlBuilder:(i,e)=>{var t=BU(i,e);return hd(t,e)}});var Pj=(i,e,t,r,n,o,s)=>{i=ae.makeSpan([],[i]);var a=t&&Nt.isCharacterBox(t),l,c;if(e){var d=bi(e,r.havingStyle(n.sup()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var u=bi(t,r.havingStyle(n.sub()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-u.height)}}var h;if(c&&l){var f=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+s;h=ae.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$e(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var m=i.height-s;h=ae.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:$e(-o)},{type:"kern",size:l.kern},{type:"elem",elem:i}]},r)}else if(c){var g=i.depth+s;h=ae.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:$e(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return i;var w=[h];if(l&&o!==0&&!a){var _=ae.makeSpan(["mspace"],[],r);_.style.marginRight=$e(o),w.unshift(_)}return ae.makeSpan(["mop","op-limits"],w,r)},Oj=["\\smallint"],qf=(i,e)=>{var t,r,n=!1,o;i.type==="supsub"?(t=i.sup,r=i.sub,o=Qt(i.base,"op"),n=!0):o=Qt(i,"op");var s=e.style,a=!1;s.size===St.DISPLAY.size&&o.symbol&&!Nt.contains(Oj,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=ae.makeSymbol(o.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),d.length>0){var u=l.italic,h=ae.staticSvg(d+"Size"+(a?"2":"1"),e);l=ae.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 f=jr(o.body,e,!0);f.length===1&&f[0]instanceof ho?(l=f[0],l.classes[0]="mop"):l=ae.makeSpan(["mop"],f,e)}else{for(var m=[],g=1;g<o.name.length;g++)m.push(ae.mathsym(o.name[g],o.mode,e));l=ae.makeSpan(["mop"],m,e)}var w=0,_=0;return(l instanceof ho||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift&&(w=(l.height-l.depth)/2-e.fontMetrics().axisHeight,_=l.italic),n?Pj(l,t,r,e,s,_,w):(w&&(l.style.position="relative",l.style.top=$e(w)),l)},Gg=(i,e)=>{var t;if(i.symbol)t=new uo("mo",[os(i.name,i.mode)]),Nt.contains(Oj,i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new uo("mo",fo(i.body,e));else{t=new uo("mi",[new Mu(i.name.slice(1))]);var r=new uo("mo",[os("\u2061","text")]);i.parentIsSupSub?t=new uo("mrow",[t,r]):t=dj([t,r])}return t},Yde={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};rt({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:r}=i,n=r;return n.length===1&&(n=Yde[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:qf,mathmlBuilder:Gg});rt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:kr(r)}},htmlBuilder:qf,mathmlBuilder:Gg});var Xde={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};rt({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:qf,mathmlBuilder:Gg});rt({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:qf,mathmlBuilder:Gg});rt({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,r=t;return r.length===1&&(r=Xde[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:qf,mathmlBuilder:Gg});var Fj=(i,e)=>{var t,r,n=!1,o;i.type==="supsub"?(t=i.sup,r=i.sub,o=Qt(i.base,"operatorname"),n=!0):o=Qt(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=jr(a,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof ho&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=ae.makeSpan(["mop"],l,e)}else s=ae.makeSpan(["mop"],[],e);return n?Pj(s,t,r,e,e.style,0,0):s},Qde=(i,e)=>{for(var t=fo(i.body,e.withFont("mathrm")),r=!0,n=0;n<t.length;n++){var o=t[n];if(!(o instanceof Ne.SpaceNode))if(o instanceof Ne.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=o.children[0];o.children.length===1&&s instanceof Ne.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var a=t.map(d=>d.toText()).join("");t=[new Ne.TextNode(a)]}var l=new Ne.MathNode("mi",t);l.setAttribute("mathvariant","normal");var c=new Ne.MathNode("mo",[os("\u2061","text")]);return i.parentIsSupSub?new Ne.MathNode("mrow",[l,c]):Ne.newDocumentFragment([l,c])};rt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:r}=i,n=e[0];return{type:"operatorname",mode:t.mode,body:kr(n),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Fj,mathmlBuilder:Qde});P("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Pu({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?ae.makeFragment(jr(i.body,e,!1)):ae.makeSpan(["mord"],jr(i.body,e,!0),e)},mathmlBuilder(i,e){return hd(i.body,e,!0)}});rt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,r=e[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(i,e){var t=bi(i.body,e.havingCrampedStyle()),r=ae.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,o=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},e);return ae.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[new Ne.TextNode("\u203E")]);t.setAttribute("stretchy","true");var r=new Ne.MathNode("mover",[zi(i.body,e),t]);return r.setAttribute("accent","true"),r}});rt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"phantom",mode:t.mode,body:kr(r)}},htmlBuilder:(i,e)=>{var t=jr(i.body,e.withPhantom(),!1);return ae.makeFragment(t)},mathmlBuilder:(i,e)=>{var t=fo(i.body,e);return new Ne.MathNode("mphantom",t)}});rt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"hphantom",mode:t.mode,body:r}},htmlBuilder:(i,e)=>{var t=ae.makeSpan([],[bi(i.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var r=0;r<t.children.length;r++)t.children[r].height=0,t.children[r].depth=0;return t=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e),ae.makeSpan(["mord"],[t],e)},mathmlBuilder:(i,e)=>{var t=fo(kr(i.body),e),r=new Ne.MathNode("mphantom",t),n=new Ne.MathNode("mpadded",[r]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});rt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,r=e[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(i,e)=>{var t=ae.makeSpan(["inner"],[bi(i.body,e.withPhantom())]),r=ae.makeSpan(["fix"],[]);return ae.makeSpan(["mord","rlap"],[t,r],e)},mathmlBuilder:(i,e)=>{var t=fo(kr(i.body),e),r=new Ne.MathNode("mphantom",t),n=new Ne.MathNode("mpadded",[r]);return n.setAttribute("width","0px"),n}});rt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,r=Qt(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:r,body:n}},htmlBuilder(i,e){var t=bi(i.body,e),r=dr(i.dy,e);return ae.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mpadded",[zi(i.body,e)]),r=i.dy.number+i.dy.unit;return t.setAttribute("voffset",r),t}});rt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});rt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(i,e,t){var{parser:r}=i,n=t[0],o=Qt(e[0],"size"),s=Qt(e[1],"size");return{type:"rule",mode:r.mode,shift:n&&Qt(n,"size").value,width:o.value,height:s.value}},htmlBuilder(i,e){var t=ae.makeSpan(["mord","rule"],[],e),r=dr(i.width,e),n=dr(i.height,e),o=i.shift?dr(i.shift,e):0;return t.style.borderRightWidth=$e(r),t.style.borderTopWidth=$e(n),t.style.bottom=$e(o),t.width=r,t.height=n+o,t.depth=-o,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=dr(i.width,e),r=dr(i.height,e),n=i.shift?dr(i.shift,e):0,o=e.color&&e.getColor()||"black",s=new Ne.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",$e(t)),s.setAttribute("height",$e(r));var a=new Ne.MathNode("mpadded",[s]);return n>=0?a.setAttribute("height",$e(n)):(a.setAttribute("height",$e(n)),a.setAttribute("depth",$e(-n))),a.setAttribute("voffset",$e(n)),a}});function zj(i,e,t){for(var r=jr(i,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,o=0;o<r.length;o++){var s=r[o].classes.indexOf("sizing");s<0?Array.prototype.push.apply(r[o].classes,e.sizingClasses(t)):r[o].classes[s+1]==="reset-size"+e.size&&(r[o].classes[s+1]="reset-size"+t.size),r[o].height*=n,r[o].depth*=n}return ae.makeFragment(r)}var HU=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Zde=(i,e)=>{var t=e.havingSize(i.size);return zj(i.body,t,e)};rt({type:"sizing",names:HU,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:r,parser:n}=i,o=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:HU.indexOf(r)+1,body:o}},htmlBuilder:Zde,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),r=fo(i.body,t),n=new Ne.MathNode("mstyle",r);return n.setAttribute("mathsize",$e(t.sizeMultiplier)),n}});rt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:r}=i,n=!1,o=!1,s=t[0]&&Qt(t[0],"ordgroup");if(s)for(var a="",l=0;l<s.body.length;++l){var c=s.body[l];if(a=c.text,a==="t")n=!0;else if(a==="b")o=!0;else{n=!1,o=!1;break}}else n=!0,o=!0;var d=e[0];return{type:"smash",mode:r.mode,body:d,smashHeight:n,smashDepth:o}},htmlBuilder:(i,e)=>{var t=ae.makeSpan([],[bi(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0,t.children))for(var r=0;r<t.children.length;r++)t.children[r].height=0;if(i.smashDepth&&(t.depth=0,t.children))for(var n=0;n<t.children.length;n++)t.children[n].depth=0;var o=ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t}]},e);return ae.makeSpan(["mord"],[o],e)},mathmlBuilder:(i,e)=>{var t=new Ne.MathNode("mpadded",[zi(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});rt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:r}=i,n=t[0],o=e[0];return{type:"sqrt",mode:r.mode,body:o,index:n}},htmlBuilder(i,e){var t=bi(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=ae.wrapFragment(t,e);var r=e.fontMetrics(),n=r.defaultRuleThickness,o=n;e.style.id<St.TEXT.id&&(o=e.fontMetrics().xHeight);var s=n+o/4,a=t.height+t.depth+s+n,{span:l,ruleWidth:c,advanceWidth:d}=Ol.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=$e(d);var f=ae.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(St.SCRIPTSCRIPT),g=bi(i.index,m,e),w=.6*(f.height-f.depth),_=ae.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:g}]},e),E=ae.makeSpan(["root"],[_]);return ae.makeSpan(["mord","sqrt"],[E,f],e)}else return ae.makeSpan(["mord","sqrt"],[f],e)},mathmlBuilder(i,e){var{body:t,index:r}=i;return r?new Ne.MathNode("mroot",[zi(t,e),zi(r,e)]):new Ne.MathNode("msqrt",[zi(t,e)])}});var UU={display:St.DISPLAY,text:St.TEXT,script:St.SCRIPT,scriptscript:St.SCRIPTSCRIPT};rt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:r,parser:n}=i,o=n.parseExpression(!0,t),s=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:s,body:o}},htmlBuilder(i,e){var t=UU[i.style],r=e.havingStyle(t).withFont("");return zj(i.body,r,e)},mathmlBuilder(i,e){var t=UU[i.style],r=e.havingStyle(t),n=fo(i.body,r),o=new Ne.MathNode("mstyle",n),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 Jde=function(e,t){var r=e.base;if(r)if(r.type==="op"){var n=r.limits&&(t.style.size===St.DISPLAY.size||r.alwaysHandleSupSub);return n?qf:null}else if(r.type==="operatorname"){var o=r.alwaysHandleSupSub&&(t.style.size===St.DISPLAY.size||r.limits);return o?Fj:null}else{if(r.type==="accent")return Nt.isCharacterBox(r.base)?J5:null;if(r.type==="horizBrace"){var s=!e.sub;return s===r.isOver?Rj:null}else return null}else return null};Pu({type:"supsub",htmlBuilder(i,e){var t=Jde(i,e);if(t)return t(i,e);var{base:r,sup:n,sub:o}=i,s=bi(r,e),a,l,c=e.fontMetrics(),d=0,u=0,h=r&&Nt.isCharacterBox(r);if(n){var f=e.havingStyle(e.style.sup());a=bi(n,f,e),h||(d=s.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(o){var m=e.havingStyle(e.style.sub());l=bi(o,m,e),h||(u=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===St.DISPLAY?g=c.sup1:e.style.cramped?g=c.sup3:g=c.sup2;var w=e.sizeMultiplier,_=$e(.5/c.ptPerEm/w),E=null;if(l){var A=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");(s instanceof ho||A)&&(E=$e(-s.italic))}var L;if(a&&l){d=Math.max(d,g,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var O=c.defaultRuleThickness,U=4*O;if(d-a.depth-(l.height-u)<U){u=U-(d-a.depth)+l.height;var Y=.8*c.xHeight-(d-a.depth);Y>0&&(d+=Y,u-=Y)}var oe=[{type:"elem",elem:l,shift:u,marginRight:_,marginLeft:E},{type:"elem",elem:a,shift:-d,marginRight:_}];L=ae.makeVList({positionType:"individualShift",children:oe},e)}else if(l){u=Math.max(u,c.sub1,l.height-.8*c.xHeight);var te=[{type:"elem",elem:l,marginLeft:E,marginRight:_}];L=ae.makeVList({positionType:"shift",positionData:u,children:te},e)}else if(a)d=Math.max(d,g,a.depth+.25*c.xHeight),L=ae.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:a,marginRight:_}]},e);else throw new Error("supsub must have either sup or sub.");var Z=B5(s,"right")||"mord";return ae.makeSpan([Z],[s,ae.makeSpan(["msupsub"],[L])],e)},mathmlBuilder(i,e){var t=!1,r,n;i.base&&i.base.type==="horizBrace"&&(n=!!i.sup,n===i.base.isOver&&(t=!0,r=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var o=[zi(i.base,e)];i.sub&&o.push(zi(i.sub,e)),i.sup&&o.push(zi(i.sup,e));var s;if(t)s=r?"mover":"munder";else if(i.sub)if(i.sup){var c=i.base;c&&c.type==="op"&&c.limits&&e.style===St.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===St.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===St.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===St.DISPLAY)?s="munder":s="msub"}else{var a=i.base;a&&a.type==="op"&&a.limits&&(e.style===St.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||e.style===St.DISPLAY)?s="mover":s="msup"}return new Ne.MathNode(s,o)}});Pu({type:"atom",htmlBuilder(i,e){return ae.mathsym(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[os(i.text,i.mode)]);if(i.family==="bin"){var r=Q5(i,e);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var Bj={mi:"italic",mn:"normal",mtext:"normal"};Pu({type:"mathord",htmlBuilder(i,e){return ae.makeOrd(i,e,"mathord")},mathmlBuilder(i,e){var t=new Ne.MathNode("mi",[os(i.text,i.mode,e)]),r=Q5(i,e)||"italic";return r!==Bj[t.type]&&t.setAttribute("mathvariant",r),t}});Pu({type:"textord",htmlBuilder(i,e){return ae.makeOrd(i,e,"textord")},mathmlBuilder(i,e){var t=os(i.text,i.mode,e),r=Q5(i,e)||"normal",n;return i.mode==="text"?n=new Ne.MathNode("mtext",[t]):/[0-9]/.test(i.text)?n=new Ne.MathNode("mn",[t]):i.text==="\\prime"?n=new Ne.MathNode("mo",[t]):n=new Ne.MathNode("mi",[t]),r!==Bj[n.type]&&n.setAttribute("mathvariant",r),n}});var M5={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},N5={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Pu({type:"spacing",htmlBuilder(i,e){if(N5.hasOwnProperty(i.text)){var t=N5[i.text].className||"";if(i.mode==="text"){var r=ae.makeOrd(i,e,"textord");return r.classes.push(t),r}else return ae.makeSpan(["mspace",t],[ae.mathsym(i.text,i.mode,e)],e)}else{if(M5.hasOwnProperty(i.text))return ae.makeSpan(["mspace",M5[i.text]],[],e);throw new Be('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(N5.hasOwnProperty(i.text))t=new Ne.MathNode("mtext",[new Ne.TextNode("\xA0")]);else{if(M5.hasOwnProperty(i.text))return new Ne.MathNode("mspace");throw new Be('Unknown type of space "'+i.text+'"')}return t}});var jU=()=>{var i=new Ne.MathNode("mtd",[]);return i.setAttribute("width","50%"),i};Pu({type:"tag",mathmlBuilder(i,e){var t=new Ne.MathNode("mtable",[new Ne.MathNode("mtr",[jU(),new Ne.MathNode("mtd",[hd(i.body,e)]),jU(),new Ne.MathNode("mtd",[hd(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var WU={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},VU={"\\textbf":"textbf","\\textmd":"textmd"},eue={"\\textit":"textit","\\textup":"textup"},qU=(i,e)=>{var t=i.font;return t?WU[t]?e.withTextFontFamily(WU[t]):VU[t]?e.withTextFontWeight(VU[t]):e.withTextFontShape(eue[t]):e};rt({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:r}=i,n=e[0];return{type:"text",mode:t.mode,body:kr(n),font:r}},htmlBuilder(i,e){var t=qU(i,e),r=jr(i.body,t,!0);return ae.makeSpan(["mord","text"],r,t)},mathmlBuilder(i,e){var t=qU(i,e);return hd(i.body,t)}});rt({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=bi(i.body,e),r=ae.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,o=ae.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return ae.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(i,e){var t=new Ne.MathNode("mo",[new Ne.TextNode("\u203E")]);t.setAttribute("stretchy","true");var r=new Ne.MathNode("munder",[zi(i.body,e),t]);return r.setAttribute("accentunder","true"),r}});rt({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=bi(i.body,e),r=e.fontMetrics().axisHeight,n=.5*(t.height-r-(t.depth+r));return ae.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(i,e){return new Ne.MathNode("mpadded",[zi(i.body,e)],["vcenter"])}});rt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new Be("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=KU(i),r=[],n=e.havingStyle(e.style.text()),o=0;o<t.length;o++){var s=t[o];s==="~"&&(s="\\textasciitilde"),r.push(ae.makeSymbol(s,"Typewriter-Regular",i.mode,n,["mord","texttt"]))}return ae.makeSpan(["mord","text"].concat(n.sizingClasses(e)),ae.tryCombineChars(r),n)},mathmlBuilder(i,e){var t=new Ne.TextNode(KU(i)),r=new Ne.MathNode("mtext",[t]);return r.setAttribute("mathvariant","monospace"),r}});var KU=i=>i.body.replace(/ /g,i.star?"\u2423":"\xA0"),dd=lj,Hj=`[ \r + ]`,tue="\\\\[a-zA-Z@]+",iue="\\\\[^\uD800-\uDFFF]",rue="("+tue+")"+Hj+"*",nue=`\\\\( |[ \r ]+ -?)[ \r ]*`,W5="[\u0300-\u036F]",oue=new RegExp(W5+"+$"),sue="("+Bj+"+)|"+(nue+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(W5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(W5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+rue)+("|"+iue+")"),bw=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(sue,"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 Da("EOF",new Oo(this,t,t));var r=this.tokenRegex.exec(e);if(r===null||r.index!==t)throw new Be("Unexpected character: '"+e[t]+"'",new Da(e[t],new Oo(this,t,t+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[n]===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 Da(n,new Oo(this,t,this.tokenRegex.lastIndex))}},V5=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 Be("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,r){if(r===void 0&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(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}},aue=Ij;P("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});P("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});P("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});P("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});P("\\@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}});P("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");P("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var KU={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};P("\\char",function(i){var e=i.popToken(),t,r="";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]==="\\")r=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Be("\\char` missing argument");r=e.text.charCodeAt(0)}else t=10;if(t){if(r=KU[e.text],r==null||r>=t)throw new Be("Invalid base-"+t+" digit "+e.text);for(var n;(n=KU[i.future().text])!=null&&n<t;)r*=t,r+=n,i.popToken()}return"\\@char{"+r+"}"});var s6=(i,e,t)=>{var r=i.consumeArg().tokens;if(r.length!==1)throw new Be("\\newcommand's first argument must be a macro name");var n=r[0].text,o=i.isDefined(n);if(o&&!e)throw new Be("\\newcommand{"+n+"} attempting to redefine "+(n+"; use \\renewcommand"));if(!o&&!t)throw new Be("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var s=0;if(r=i.consumeArg().tokens,r.length===1&&r[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 Be("Invalid number of arguments: "+a);s=parseInt(a),r=i.consumeArg().tokens}return i.macros.set(n,{tokens:r,numArgs:s}),""};P("\\newcommand",i=>s6(i,!1,!0));P("\\renewcommand",i=>s6(i,!0,!1));P("\\providecommand",i=>s6(i,!0,!0));P("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});P("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});P("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),dd[t],$i.math[t],$i.text[t]),""});P("\\bgroup","{");P("\\egroup","}");P("~","\\nobreakspace");P("\\lq","`");P("\\rq","'");P("\\aa","\\r a");P("\\AA","\\r A");P("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");P("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");P("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");P("\u212C","\\mathscr{B}");P("\u2130","\\mathscr{E}");P("\u2131","\\mathscr{F}");P("\u210B","\\mathscr{H}");P("\u2110","\\mathscr{I}");P("\u2112","\\mathscr{L}");P("\u2133","\\mathscr{M}");P("\u211B","\\mathscr{R}");P("\u212D","\\mathfrak{C}");P("\u210C","\\mathfrak{H}");P("\u2128","\\mathfrak{Z}");P("\\Bbbk","\\Bbb{k}");P("\xB7","\\cdotp");P("\\llap","\\mathllap{\\textrm{#1}}");P("\\rlap","\\mathrlap{\\textrm{#1}}");P("\\clap","\\mathclap{\\textrm{#1}}");P("\\mathstrut","\\vphantom{(}");P("\\underbar","\\underline{\\text{#1}}");P("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');P("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");P("\\ne","\\neq");P("\u2260","\\neq");P("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");P("\u2209","\\notin");P("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");P("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");P("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");P("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");P("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");P("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");P("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");P("\u27C2","\\perp");P("\u203C","\\mathclose{!\\mkern-0.8mu!}");P("\u220C","\\notni");P("\u231C","\\ulcorner");P("\u231D","\\urcorner");P("\u231E","\\llcorner");P("\u231F","\\lrcorner");P("\xA9","\\copyright");P("\xAE","\\textregistered");P("\uFE0F","\\textregistered");P("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');P("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');P("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');P("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');P("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");P("\u22EE","\\vdots");P("\\varGamma","\\mathit{\\Gamma}");P("\\varDelta","\\mathit{\\Delta}");P("\\varTheta","\\mathit{\\Theta}");P("\\varLambda","\\mathit{\\Lambda}");P("\\varXi","\\mathit{\\Xi}");P("\\varPi","\\mathit{\\Pi}");P("\\varSigma","\\mathit{\\Sigma}");P("\\varUpsilon","\\mathit{\\Upsilon}");P("\\varPhi","\\mathit{\\Phi}");P("\\varPsi","\\mathit{\\Psi}");P("\\varOmega","\\mathit{\\Omega}");P("\\substack","\\begin{subarray}{c}#1\\end{subarray}");P("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");P("\\boxed","\\fbox{$\\displaystyle{#1}$}");P("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");P("\\implies","\\DOTSB\\;\\Longrightarrow\\;");P("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var $U={",":"\\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"};P("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in $U?e=$U[t]:(t.slice(0,4)==="\\not"||t in $i.math&&Nt.contains(["bin","rel"],$i.math[t].group))&&(e="\\dotsb"),e});var a6={")":!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};P("\\dotso",function(i){var e=i.future().text;return e in a6?"\\ldots\\,":"\\ldots"});P("\\dotsc",function(i){var e=i.future().text;return e in a6&&e!==","?"\\ldots\\,":"\\ldots"});P("\\cdots",function(i){var e=i.future().text;return e in a6?"\\@cdots\\,":"\\@cdots"});P("\\dotsb","\\cdots");P("\\dotsm","\\cdots");P("\\dotsi","\\!\\cdots");P("\\dotsx","\\ldots\\,");P("\\DOTSI","\\relax");P("\\DOTSB","\\relax");P("\\DOTSX","\\relax");P("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");P("\\,","\\tmspace+{3mu}{.1667em}");P("\\thinspace","\\,");P("\\>","\\mskip{4mu}");P("\\:","\\tmspace+{4mu}{.2222em}");P("\\medspace","\\:");P("\\;","\\tmspace+{5mu}{.2777em}");P("\\thickspace","\\;");P("\\!","\\tmspace-{3mu}{.1667em}");P("\\negthinspace","\\!");P("\\negmedspace","\\tmspace-{4mu}{.2222em}");P("\\negthickspace","\\tmspace-{5mu}{.277em}");P("\\enspace","\\kern.5em ");P("\\enskip","\\hskip.5em\\relax");P("\\quad","\\hskip1em\\relax");P("\\qquad","\\hskip2em\\relax");P("\\tag","\\@ifstar\\tag@literal\\tag@paren");P("\\tag@paren","\\tag@literal{({#1})}");P("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new Be("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});P("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");P("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");P("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");P("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");P("\\newline","\\\\\\relax");P("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Hj=$e(Aa["Main-Regular"]["T".charCodeAt(0)][1]-.7*Aa["Main-Regular"]["A".charCodeAt(0)][1]);P("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Hj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");P("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Hj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");P("\\hspace","\\@ifstar\\@hspacer\\@hspace");P("\\@hspace","\\hskip #1\\relax");P("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");P("\\ordinarycolon",":");P("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");P("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');P("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');P("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');P("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');P("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');P("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');P("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');P("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');P("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');P("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');P("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');P("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');P("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');P("\u2237","\\dblcolon");P("\u2239","\\eqcolon");P("\u2254","\\coloneqq");P("\u2255","\\eqqcolon");P("\u2A74","\\Coloneqq");P("\\ratio","\\vcentcolon");P("\\coloncolon","\\dblcolon");P("\\colonequals","\\coloneqq");P("\\coloncolonequals","\\Coloneqq");P("\\equalscolon","\\eqqcolon");P("\\equalscoloncolon","\\Eqqcolon");P("\\colonminus","\\coloneq");P("\\coloncolonminus","\\Coloneq");P("\\minuscolon","\\eqcolon");P("\\minuscoloncolon","\\Eqcolon");P("\\coloncolonapprox","\\Colonapprox");P("\\coloncolonsim","\\Colonsim");P("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");P("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");P("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");P("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");P("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");P("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");P("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");P("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");P("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");P("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");P("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");P("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");P("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");P("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");P("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");P("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");P("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");P("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");P("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");P("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");P("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");P("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");P("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");P("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");P("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");P("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");P("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");P("\\imath","\\html@mathml{\\@imath}{\u0131}");P("\\jmath","\\html@mathml{\\@jmath}{\u0237}");P("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");P("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");P("\u27E6","\\llbracket");P("\u27E7","\\rrbracket");P("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");P("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");P("\u2983","\\lBrace");P("\u2984","\\rBrace");P("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");P("\u29B5","\\minuso");P("\\darr","\\downarrow");P("\\dArr","\\Downarrow");P("\\Darr","\\Downarrow");P("\\lang","\\langle");P("\\rang","\\rangle");P("\\uarr","\\uparrow");P("\\uArr","\\Uparrow");P("\\Uarr","\\Uparrow");P("\\N","\\mathbb{N}");P("\\R","\\mathbb{R}");P("\\Z","\\mathbb{Z}");P("\\alef","\\aleph");P("\\alefsym","\\aleph");P("\\Alpha","\\mathrm{A}");P("\\Beta","\\mathrm{B}");P("\\bull","\\bullet");P("\\Chi","\\mathrm{X}");P("\\clubs","\\clubsuit");P("\\cnums","\\mathbb{C}");P("\\Complex","\\mathbb{C}");P("\\Dagger","\\ddagger");P("\\diamonds","\\diamondsuit");P("\\empty","\\emptyset");P("\\Epsilon","\\mathrm{E}");P("\\Eta","\\mathrm{H}");P("\\exist","\\exists");P("\\harr","\\leftrightarrow");P("\\hArr","\\Leftrightarrow");P("\\Harr","\\Leftrightarrow");P("\\hearts","\\heartsuit");P("\\image","\\Im");P("\\infin","\\infty");P("\\Iota","\\mathrm{I}");P("\\isin","\\in");P("\\Kappa","\\mathrm{K}");P("\\larr","\\leftarrow");P("\\lArr","\\Leftarrow");P("\\Larr","\\Leftarrow");P("\\lrarr","\\leftrightarrow");P("\\lrArr","\\Leftrightarrow");P("\\Lrarr","\\Leftrightarrow");P("\\Mu","\\mathrm{M}");P("\\natnums","\\mathbb{N}");P("\\Nu","\\mathrm{N}");P("\\Omicron","\\mathrm{O}");P("\\plusmn","\\pm");P("\\rarr","\\rightarrow");P("\\rArr","\\Rightarrow");P("\\Rarr","\\Rightarrow");P("\\real","\\Re");P("\\reals","\\mathbb{R}");P("\\Reals","\\mathbb{R}");P("\\Rho","\\mathrm{P}");P("\\sdot","\\cdot");P("\\sect","\\S");P("\\spades","\\spadesuit");P("\\sub","\\subset");P("\\sube","\\subseteq");P("\\supe","\\supseteq");P("\\Tau","\\mathrm{T}");P("\\thetasym","\\vartheta");P("\\weierp","\\wp");P("\\Zeta","\\mathrm{Z}");P("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");P("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");P("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");P("\\bra","\\mathinner{\\langle{#1}|}");P("\\ket","\\mathinner{|{#1}\\rangle}");P("\\braket","\\mathinner{\\langle{#1}\\rangle}");P("\\Bra","\\left\\langle#1\\right|");P("\\Ket","\\left|#1\\right\\rangle");var Uj=i=>e=>{var t=e.consumeArg().tokens,r=e.consumeArg().tokens,n=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),n.length&&h.macros.set("\\|",a));var f=u;if(!u&&n.length){var m=h.future();m.text==="|"&&(h.popToken(),f=!0)}return{tokens:f?n:r,numArgs:0}};e.macros.set("|",l(!1)),n.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}};P("\\bra@ket",Uj(!1));P("\\bra@set",Uj(!0));P("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");P("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");P("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");P("\\angln","{\\angl n}");P("\\blue","\\textcolor{##6495ed}{#1}");P("\\orange","\\textcolor{##ffa500}{#1}");P("\\pink","\\textcolor{##ff00af}{#1}");P("\\red","\\textcolor{##df0030}{#1}");P("\\green","\\textcolor{##28ae7b}{#1}");P("\\gray","\\textcolor{gray}{#1}");P("\\purple","\\textcolor{##9d38bd}{#1}");P("\\blueA","\\textcolor{##ccfaff}{#1}");P("\\blueB","\\textcolor{##80f6ff}{#1}");P("\\blueC","\\textcolor{##63d9ea}{#1}");P("\\blueD","\\textcolor{##11accd}{#1}");P("\\blueE","\\textcolor{##0c7f99}{#1}");P("\\tealA","\\textcolor{##94fff5}{#1}");P("\\tealB","\\textcolor{##26edd5}{#1}");P("\\tealC","\\textcolor{##01d1c1}{#1}");P("\\tealD","\\textcolor{##01a995}{#1}");P("\\tealE","\\textcolor{##208170}{#1}");P("\\greenA","\\textcolor{##b6ffb0}{#1}");P("\\greenB","\\textcolor{##8af281}{#1}");P("\\greenC","\\textcolor{##74cf70}{#1}");P("\\greenD","\\textcolor{##1fab54}{#1}");P("\\greenE","\\textcolor{##0d923f}{#1}");P("\\goldA","\\textcolor{##ffd0a9}{#1}");P("\\goldB","\\textcolor{##ffbb71}{#1}");P("\\goldC","\\textcolor{##ff9c39}{#1}");P("\\goldD","\\textcolor{##e07d10}{#1}");P("\\goldE","\\textcolor{##a75a05}{#1}");P("\\redA","\\textcolor{##fca9a9}{#1}");P("\\redB","\\textcolor{##ff8482}{#1}");P("\\redC","\\textcolor{##f9685d}{#1}");P("\\redD","\\textcolor{##e84d39}{#1}");P("\\redE","\\textcolor{##bc2612}{#1}");P("\\maroonA","\\textcolor{##ffbde0}{#1}");P("\\maroonB","\\textcolor{##ff92c6}{#1}");P("\\maroonC","\\textcolor{##ed5fa6}{#1}");P("\\maroonD","\\textcolor{##ca337c}{#1}");P("\\maroonE","\\textcolor{##9e034e}{#1}");P("\\purpleA","\\textcolor{##ddd7ff}{#1}");P("\\purpleB","\\textcolor{##c6b9fc}{#1}");P("\\purpleC","\\textcolor{##aa87ff}{#1}");P("\\purpleD","\\textcolor{##7854ab}{#1}");P("\\purpleE","\\textcolor{##543b78}{#1}");P("\\mintA","\\textcolor{##f5f9e8}{#1}");P("\\mintB","\\textcolor{##edf2df}{#1}");P("\\mintC","\\textcolor{##e0e5cc}{#1}");P("\\grayA","\\textcolor{##f6f7f7}{#1}");P("\\grayB","\\textcolor{##f0f1f2}{#1}");P("\\grayC","\\textcolor{##e3e5e6}{#1}");P("\\grayD","\\textcolor{##d6d8da}{#1}");P("\\grayE","\\textcolor{##babec2}{#1}");P("\\grayF","\\textcolor{##888d93}{#1}");P("\\grayG","\\textcolor{##626569}{#1}");P("\\grayH","\\textcolor{##3b3e40}{#1}");P("\\grayI","\\textcolor{##21242c}{#1}");P("\\kaBlue","\\textcolor{##314453}{#1}");P("\\kaGreen","\\textcolor{##71B307}{#1}");var jj={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},q5=class{constructor(e,t,r){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 V5(aue,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new bw(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,r,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Da("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n=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 Be("Extra }",o)}else if(o.text==="EOF")throw new Be("Unexpected end of input in a macro argument, expected '"+(e&&r?e[a]:"}")+"'",o);if(e&&r)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||r);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:o}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Be("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;n<r.length;n++){var o=this.popToken();if(r[n]!==o.text)throw new Be("Use of the macro doesn't match its definition",o)}}for(var s=[],a=0;a<e;a++)s.push(this.consumeArg(t&&t[a+1]).tokens);return s}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(n==null||e&&n.unexpandable){if(e&&n==null&&r[0]==="\\"&&!this.isDefined(r))throw new Be("Undefined control sequence: "+r);return this.pushToken(t),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new Be("Too many expansions: infinite loop or need to increase maxExpand setting");var o=n.tokens,s=this.consumeArgs(n.numArgs,n.delimiters);if(n.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 Be("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 Be("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 Da(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(r=>r.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var r=this.lexer.catcodes[e];if(r!=null&&r!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var o=0;if(n.indexOf("#")!==-1)for(var s=n.replace(/##/g,"");s.indexOf("#"+(o+1))!==-1;)++o;for(var a=new bw(n,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 n}isDefined(e){return this.macros.has(e)||dd.hasOwnProperty(e)||$i.math.hasOwnProperty(e)||$i.text.hasOwnProperty(e)||jj.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:dd.hasOwnProperty(e)&&!dd[e].primitive}},GU=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,lw=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"}),N5={"\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"}},YU={\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"},vw=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 q5(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 Be("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 Da("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(i.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&dd[n.text]&&dd[n.text].infix)break;var o=this.parseAtom(t);if(o){if(o.type==="internal")continue}else break;r.push(o)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,r,n=0;n<e.length;n++)if(e[n].type==="infix"){if(t!==-1)throw new Be("only one infix operator per group",e[n].token);t=n,r=e[n].replaceWith}if(t!==-1&&r){var o,s,a=e.slice(0,t),l=e.slice(t+1);a.length===1&&a[0].type==="ordgroup"?o=a[0]:o={type:"ordgroup",mode:this.mode,body:a},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var c;return r==="\\\\abovefrac"?c=this.callFunction(r,[o,e[t],s],[]):c=this.callFunction(r,[o,s],[]),[c]}else return e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var n=this.parseGroup(e);if(!n)throw new Be("Expected group after '"+r+"'",t);return n}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]};return o}parseAtom(e){var t=this.parseGroup("atom",e);if(this.mode==="text")return t;for(var r,n;;){this.consumeSpaces();var o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(t&&t.type==="op"){var s=o.text==="\\limits";t.limits=s,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=o.text==="\\limits");else throw new Be("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(r)throw new Be("Double superscript",o);r=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(n)throw new Be("Double subscript",o);n=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(r)throw new Be("Double superscript",o);var a={type:"textord",mode:this.mode,text:"\\prime"},l=[a];for(this.consume();this.fetch().text==="'";)l.push(a),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:l}}else if(lw[o.text]){var c=lw[o.text],d=GU.test(o.text);for(this.consume();;){var u=this.fetch().text;if(!lw[u]||GU.test(u)!==d)break;this.consume(),c+=lw[u]}var h=new i(c,this.settings).parse();d?n={type:"ordgroup",mode:"math",body:h}:r={type:"ordgroup",mode:"math",body:h}}else break}return r||n?{type:"supsub",mode:this.mode,base:t,sup:r,sub:n}:t}parseFunction(e,t){var r=this.fetch(),n=r.text,o=dd[n];if(!o)return null;if(this.consume(),t&&t!=="atom"&&!o.allowedInArgument)throw new Be("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if(this.mode==="text"&&!o.allowedInText)throw new Be("Can't use function '"+n+"' in text mode",r);if(this.mode==="math"&&o.allowedInMath===!1)throw new Be("Can't use function '"+n+"' in math mode",r);var{args:s,optArgs:a}=this.parseArguments(n,o);return this.callFunction(n,s,a,r,e)}callFunction(e,t,r,n,o){var s={funcName:e,parser:this,token:n,breakOnTokenText:o},a=dd[e];if(a&&a.handler)return a.handler(s,t,r);throw new Be("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var n=[],o=[],s=0;s<r;s++){var a=t.argTypes&&t.argTypes[s],l=s<t.numOptionalArgs;(t.primitive&&a==null||t.type==="sqrt"&&s===1&&o[0]==null)&&(a="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",a,l);if(l)o.push(c);else if(c!=null)n.push(c);else throw new Be("Null argument, please report this as a bug")}return{args:n,optArgs:o}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":{var n=this.parseArgumentGroup(r,"text");return n!=null?{type:"styling",mode:n.mode,body:[n],style:"text"}:null}case"raw":{var o=this.parseStringGroup("raw",r);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(r)throw new Be("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new Be("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Be("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(r==null)return null;for(var n="",o;(o=this.fetch()).text!=="EOF";)n+=o.text,this.consume();return this.consume(),r.text=n,r}parseRegexGroup(e,t){for(var r=this.fetch(),n=r,o="",s;(s=this.fetch()).text!=="EOF"&&e.test(o+s.text);)n=s,o+=n.text,this.consume();if(o==="")throw new Be("Invalid "+t+": '"+r.text+"'",r);return r.range(n,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new Be("Invalid color: '"+t.text+"'",t);var n=r[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",r=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new Be("Invalid size: '"+t.text+"'",t);var o={number:+(n[1]+n[2]),unit:n[3]};if(!ZU(o))throw new Be("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(r==null)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:r.loc,body:o};return t&&this.switchMode(n),s}parseGroup(e,t){var r=this.fetch(),n=r.text,o;if(n==="{"||n==="\\begingroup"){this.consume();var s=n==="{"?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),o={type:"ordgroup",mode:this.mode,loc:Oo.range(r,l),body:a,semisimple:n==="\\begingroup"||void 0}}else if(o=this.parseFunction(t,e)||this.parseSymbol(),o==null&&n[0]==="\\"&&!jj.hasOwnProperty(n)){if(this.settings.throwOnError)throw new Be("Undefined control sequence: "+n,r);o=this.formatUnsupportedCmd(n),this.consume()}return o}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],o=n.text;o==="-"&&e[r+1].text==="-"&&(r+1<t&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:Oo.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Oo.range(n,e[r+1]),text:"--"}),t-=1)),(o==="'"||o==="`")&&e[r+1].text===o&&(e.splice(r,2,{type:"textord",mode:"text",loc:Oo.range(n,e[r+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),n=r.charAt(0)==="*";if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Be(`\\verb assertion failed -- - please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:n}}YU.hasOwnProperty(t[0])&&!$i[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=YU[t[0]]+t.slice(1));var o=oue.exec(t);o&&(t=t.substring(0,o.index),t==="i"?t="\u0131":t==="j"&&(t="\u0237"));var s;if($i[this.mode][t]){this.settings.strict&&this.mode==="math"&&F5.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a=$i[this.mode][t].group,l=Oo.range(e),c;if(Zce.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&&(QU(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:Oo.range(e),text:t};else return null;if(this.consume(),o)for(var u=0;u<o[0].length;u++){var h=o[0][u];if(!N5[h])throw new Be("Unknown accent ' "+h+"'",e);var f=N5[h][this.mode]||N5[h].text;if(!f)throw new Be("Accent "+h+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Oo.range(e),label:f,isStretchy:!1,isShifty:!0,base:s}}return s}};vw.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var l6=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new vw(e,t);delete r.gullet.macros.current["\\df@tag"];var n=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Be("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:r.subparse([new Da("\\df@tag")])}]}return n},Wj=function(e,t,r){t.textContent="";var n=c6(e,r).toNode();t.appendChild(n)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Wj=function(){throw new Be("KaTeX doesn't work in quirks mode.")});var lue=function(e,t){var r=c6(e,t).toMarkup();return r},cue=function(e,t){var r=new Wg(t);return l6(e,r)},Vj=function(e,t,r){if(r.throwOnError||!(e instanceof Be))throw e;var n=ae.makeSpan(["katex-error"],[new ho(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+r.errorColor),n},c6=function(e,t){var r=new Wg(t);try{var n=l6(e,r);return yde(n,e,r)}catch(o){return Vj(o,e,r)}},due=function(e,t){var r=new Wg(t);try{var n=l6(e,r);return wde(n,e,r)}catch(o){return Vj(o,e,r)}},Kf={version:"0.16.9",render:Wj,renderToString:lue,ParseError:Be,SETTINGS_SCHEMA:cw,__parse:cue,__renderToDomTree:c6,__renderToHTMLTree:due,__setFontMetrics:Kce,__defineSymbol:x,__defineFunction:rt,__defineMacro:P,__domTree:{Span:Ru,Anchor:qg,SymbolNode:ho,SvgNode:Ps,PathNode:Ma,LineNode:Kg}};var uue={};function kw(i){let e=this,t=i||uue,r=e.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(w5(t)),o.push(v5()),s.push(_5(t))}function qj(i,e){let t={type:"element",tagName:"blockquote",properties:{},children:i.wrap(i.all(e),!0)};return i.patch(e,t),i.applyData(e,t)}function Kj(i,e){let t={type:"element",tagName:"br",properties:{},children:[]};return i.patch(e,t),[i.applyData(e,t),{type:"text",value:` -`}]}function $j(i,e){let t=e.value?e.value+` -`:"",r={};e.lang&&(r.className=["language-"+e.lang]);let n={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return e.meta&&(n.data={meta:e.meta}),i.patch(e,n),n=i.applyData(e,n),n={type:"element",tagName:"pre",properties:{},children:[n]},i.patch(e,n),n}function Gj(i,e){let t={type:"element",tagName:"del",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Yj(i,e){let t={type:"element",tagName:"em",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}var vAe=pd(new RegExp("\\p{P}","u")),_Ae=pd(/[A-Za-z]/),d6=pd(/[\dA-Za-z]/),yAe=pd(/[#-'*+\--9=?A-Z^-~]/);var wAe=pd(/\d/),xAe=pd(/[\dA-Fa-f]/),CAe=pd(/[!-/:-@[-`{-~]/);var SAe=pd(/\s/);function pd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function ss(i){let e=[],t=-1,r=0,n=0;for(;++t<i.length;){let o=i.charCodeAt(t),s="";if(o===37&&d6(i.charCodeAt(t+1))&&d6(i.charCodeAt(t+2)))n=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),n=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(r,t),encodeURIComponent(s)),r=t+n+1,s=""),n&&(t+=n,n=0)}return e.join("")+i.slice(r)}function Xj(i,e){let t=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),n=ss(r.toLowerCase()),o=i.footnoteOrder.indexOf(r),s,a=i.footnoteCounts.get(r);a===void 0?(a=0,i.footnoteOrder.push(r),s=i.footnoteOrder.length):s=o+1,a+=1,i.footnoteCounts.set(r,a);let l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+n,id:t+"fnref-"+n+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};i.patch(e,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return i.patch(e,c),i.applyData(e,c)}function Qj(i,e){let t={type:"element",tagName:"h"+e.depth,properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Zj(i,e){if(i.options.allowDangerousHtml){let t={type:"raw",value:e.value};return i.patch(e,t),i.applyData(e,t)}}function Ew(i,e){let t=e.referenceType,r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];let n=i.all(e),o=n[0];o&&o.type==="text"?o.value="["+o.value:n.unshift({type:"text",value:"["});let s=n[n.length-1];return s&&s.type==="text"?s.value+=r:n.push({type:"text",value:r}),n}function Jj(i,e){let t=String(e.identifier).toUpperCase(),r=i.definitionById.get(t);if(!r)return Ew(i,e);let n={src:ss(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"img",properties:n,children:[]};return i.patch(e,o),i.applyData(e,o)}function eW(i,e){let t={src:ss(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);let r={type:"element",tagName:"img",properties:t,children:[]};return i.patch(e,r),i.applyData(e,r)}function tW(i,e){let t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};i.patch(e,t);let r={type:"element",tagName:"code",properties:{},children:[t]};return i.patch(e,r),i.applyData(e,r)}function iW(i,e){let t=String(e.identifier).toUpperCase(),r=i.definitionById.get(t);if(!r)return Ew(i,e);let n={href:ss(r.url||"")};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"a",properties:n,children:i.all(e)};return i.patch(e,o),i.applyData(e,o)}function rW(i,e){let t={href:ss(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);let r={type:"element",tagName:"a",properties:t,children:i.all(e)};return i.patch(e,r),i.applyData(e,r)}function nW(i,e,t){let r=i.all(e),n=t?hue(t):oW(e),o={},s=[];if(typeof e.checked=="boolean"){let d=r[0],u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let d=r[a];(n||a!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:` +?)[ \r ]*`,V5="[\u0300-\u036F]",oue=new RegExp(V5+"+$"),sue="("+Hj+"+)|"+(nue+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(V5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(V5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+rue)+("|"+iue+")"),bw=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(sue,"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 Da("EOF",new Oo(this,t,t));var r=this.tokenRegex.exec(e);if(r===null||r.index!==t)throw new Be("Unexpected character: '"+e[t]+"'",new Da(e[t],new Oo(this,t,t+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[n]===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 Da(n,new Oo(this,t,this.tokenRegex.lastIndex))}},q5=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 Be("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,r){if(r===void 0&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(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}},aue=Lj;P("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});P("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});P("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});P("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});P("\\@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}});P("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");P("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var $U={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};P("\\char",function(i){var e=i.popToken(),t,r="";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]==="\\")r=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Be("\\char` missing argument");r=e.text.charCodeAt(0)}else t=10;if(t){if(r=$U[e.text],r==null||r>=t)throw new Be("Invalid base-"+t+" digit "+e.text);for(var n;(n=$U[i.future().text])!=null&&n<t;)r*=t,r+=n,i.popToken()}return"\\@char{"+r+"}"});var a6=(i,e,t)=>{var r=i.consumeArg().tokens;if(r.length!==1)throw new Be("\\newcommand's first argument must be a macro name");var n=r[0].text,o=i.isDefined(n);if(o&&!e)throw new Be("\\newcommand{"+n+"} attempting to redefine "+(n+"; use \\renewcommand"));if(!o&&!t)throw new Be("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var s=0;if(r=i.consumeArg().tokens,r.length===1&&r[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 Be("Invalid number of arguments: "+a);s=parseInt(a),r=i.consumeArg().tokens}return i.macros.set(n,{tokens:r,numArgs:s}),""};P("\\newcommand",i=>a6(i,!1,!0));P("\\renewcommand",i=>a6(i,!0,!1));P("\\providecommand",i=>a6(i,!0,!0));P("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});P("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});P("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),dd[t],$i.math[t],$i.text[t]),""});P("\\bgroup","{");P("\\egroup","}");P("~","\\nobreakspace");P("\\lq","`");P("\\rq","'");P("\\aa","\\r a");P("\\AA","\\r A");P("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");P("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");P("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");P("\u212C","\\mathscr{B}");P("\u2130","\\mathscr{E}");P("\u2131","\\mathscr{F}");P("\u210B","\\mathscr{H}");P("\u2110","\\mathscr{I}");P("\u2112","\\mathscr{L}");P("\u2133","\\mathscr{M}");P("\u211B","\\mathscr{R}");P("\u212D","\\mathfrak{C}");P("\u210C","\\mathfrak{H}");P("\u2128","\\mathfrak{Z}");P("\\Bbbk","\\Bbb{k}");P("\xB7","\\cdotp");P("\\llap","\\mathllap{\\textrm{#1}}");P("\\rlap","\\mathrlap{\\textrm{#1}}");P("\\clap","\\mathclap{\\textrm{#1}}");P("\\mathstrut","\\vphantom{(}");P("\\underbar","\\underline{\\text{#1}}");P("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');P("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");P("\\ne","\\neq");P("\u2260","\\neq");P("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");P("\u2209","\\notin");P("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");P("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");P("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");P("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");P("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");P("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");P("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");P("\u27C2","\\perp");P("\u203C","\\mathclose{!\\mkern-0.8mu!}");P("\u220C","\\notni");P("\u231C","\\ulcorner");P("\u231D","\\urcorner");P("\u231E","\\llcorner");P("\u231F","\\lrcorner");P("\xA9","\\copyright");P("\xAE","\\textregistered");P("\uFE0F","\\textregistered");P("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');P("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');P("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');P("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');P("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");P("\u22EE","\\vdots");P("\\varGamma","\\mathit{\\Gamma}");P("\\varDelta","\\mathit{\\Delta}");P("\\varTheta","\\mathit{\\Theta}");P("\\varLambda","\\mathit{\\Lambda}");P("\\varXi","\\mathit{\\Xi}");P("\\varPi","\\mathit{\\Pi}");P("\\varSigma","\\mathit{\\Sigma}");P("\\varUpsilon","\\mathit{\\Upsilon}");P("\\varPhi","\\mathit{\\Phi}");P("\\varPsi","\\mathit{\\Psi}");P("\\varOmega","\\mathit{\\Omega}");P("\\substack","\\begin{subarray}{c}#1\\end{subarray}");P("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");P("\\boxed","\\fbox{$\\displaystyle{#1}$}");P("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");P("\\implies","\\DOTSB\\;\\Longrightarrow\\;");P("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var GU={",":"\\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"};P("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in GU?e=GU[t]:(t.slice(0,4)==="\\not"||t in $i.math&&Nt.contains(["bin","rel"],$i.math[t].group))&&(e="\\dotsb"),e});var l6={")":!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};P("\\dotso",function(i){var e=i.future().text;return e in l6?"\\ldots\\,":"\\ldots"});P("\\dotsc",function(i){var e=i.future().text;return e in l6&&e!==","?"\\ldots\\,":"\\ldots"});P("\\cdots",function(i){var e=i.future().text;return e in l6?"\\@cdots\\,":"\\@cdots"});P("\\dotsb","\\cdots");P("\\dotsm","\\cdots");P("\\dotsi","\\!\\cdots");P("\\dotsx","\\ldots\\,");P("\\DOTSI","\\relax");P("\\DOTSB","\\relax");P("\\DOTSX","\\relax");P("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");P("\\,","\\tmspace+{3mu}{.1667em}");P("\\thinspace","\\,");P("\\>","\\mskip{4mu}");P("\\:","\\tmspace+{4mu}{.2222em}");P("\\medspace","\\:");P("\\;","\\tmspace+{5mu}{.2777em}");P("\\thickspace","\\;");P("\\!","\\tmspace-{3mu}{.1667em}");P("\\negthinspace","\\!");P("\\negmedspace","\\tmspace-{4mu}{.2222em}");P("\\negthickspace","\\tmspace-{5mu}{.277em}");P("\\enspace","\\kern.5em ");P("\\enskip","\\hskip.5em\\relax");P("\\quad","\\hskip1em\\relax");P("\\qquad","\\hskip2em\\relax");P("\\tag","\\@ifstar\\tag@literal\\tag@paren");P("\\tag@paren","\\tag@literal{({#1})}");P("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new Be("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});P("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");P("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");P("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");P("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");P("\\newline","\\\\\\relax");P("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Uj=$e(Aa["Main-Regular"]["T".charCodeAt(0)][1]-.7*Aa["Main-Regular"]["A".charCodeAt(0)][1]);P("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Uj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");P("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Uj+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");P("\\hspace","\\@ifstar\\@hspacer\\@hspace");P("\\@hspace","\\hskip #1\\relax");P("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");P("\\ordinarycolon",":");P("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");P("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');P("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');P("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');P("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');P("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');P("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');P("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');P("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');P("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');P("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');P("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');P("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');P("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');P("\u2237","\\dblcolon");P("\u2239","\\eqcolon");P("\u2254","\\coloneqq");P("\u2255","\\eqqcolon");P("\u2A74","\\Coloneqq");P("\\ratio","\\vcentcolon");P("\\coloncolon","\\dblcolon");P("\\colonequals","\\coloneqq");P("\\coloncolonequals","\\Coloneqq");P("\\equalscolon","\\eqqcolon");P("\\equalscoloncolon","\\Eqqcolon");P("\\colonminus","\\coloneq");P("\\coloncolonminus","\\Coloneq");P("\\minuscolon","\\eqcolon");P("\\minuscoloncolon","\\Eqcolon");P("\\coloncolonapprox","\\Colonapprox");P("\\coloncolonsim","\\Colonsim");P("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");P("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");P("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");P("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");P("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");P("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");P("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");P("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");P("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");P("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");P("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");P("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");P("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");P("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");P("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");P("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");P("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");P("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");P("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");P("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");P("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");P("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");P("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");P("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");P("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");P("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");P("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");P("\\imath","\\html@mathml{\\@imath}{\u0131}");P("\\jmath","\\html@mathml{\\@jmath}{\u0237}");P("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");P("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");P("\u27E6","\\llbracket");P("\u27E7","\\rrbracket");P("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");P("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");P("\u2983","\\lBrace");P("\u2984","\\rBrace");P("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");P("\u29B5","\\minuso");P("\\darr","\\downarrow");P("\\dArr","\\Downarrow");P("\\Darr","\\Downarrow");P("\\lang","\\langle");P("\\rang","\\rangle");P("\\uarr","\\uparrow");P("\\uArr","\\Uparrow");P("\\Uarr","\\Uparrow");P("\\N","\\mathbb{N}");P("\\R","\\mathbb{R}");P("\\Z","\\mathbb{Z}");P("\\alef","\\aleph");P("\\alefsym","\\aleph");P("\\Alpha","\\mathrm{A}");P("\\Beta","\\mathrm{B}");P("\\bull","\\bullet");P("\\Chi","\\mathrm{X}");P("\\clubs","\\clubsuit");P("\\cnums","\\mathbb{C}");P("\\Complex","\\mathbb{C}");P("\\Dagger","\\ddagger");P("\\diamonds","\\diamondsuit");P("\\empty","\\emptyset");P("\\Epsilon","\\mathrm{E}");P("\\Eta","\\mathrm{H}");P("\\exist","\\exists");P("\\harr","\\leftrightarrow");P("\\hArr","\\Leftrightarrow");P("\\Harr","\\Leftrightarrow");P("\\hearts","\\heartsuit");P("\\image","\\Im");P("\\infin","\\infty");P("\\Iota","\\mathrm{I}");P("\\isin","\\in");P("\\Kappa","\\mathrm{K}");P("\\larr","\\leftarrow");P("\\lArr","\\Leftarrow");P("\\Larr","\\Leftarrow");P("\\lrarr","\\leftrightarrow");P("\\lrArr","\\Leftrightarrow");P("\\Lrarr","\\Leftrightarrow");P("\\Mu","\\mathrm{M}");P("\\natnums","\\mathbb{N}");P("\\Nu","\\mathrm{N}");P("\\Omicron","\\mathrm{O}");P("\\plusmn","\\pm");P("\\rarr","\\rightarrow");P("\\rArr","\\Rightarrow");P("\\Rarr","\\Rightarrow");P("\\real","\\Re");P("\\reals","\\mathbb{R}");P("\\Reals","\\mathbb{R}");P("\\Rho","\\mathrm{P}");P("\\sdot","\\cdot");P("\\sect","\\S");P("\\spades","\\spadesuit");P("\\sub","\\subset");P("\\sube","\\subseteq");P("\\supe","\\supseteq");P("\\Tau","\\mathrm{T}");P("\\thetasym","\\vartheta");P("\\weierp","\\wp");P("\\Zeta","\\mathrm{Z}");P("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");P("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");P("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");P("\\bra","\\mathinner{\\langle{#1}|}");P("\\ket","\\mathinner{|{#1}\\rangle}");P("\\braket","\\mathinner{\\langle{#1}\\rangle}");P("\\Bra","\\left\\langle#1\\right|");P("\\Ket","\\left|#1\\right\\rangle");var jj=i=>e=>{var t=e.consumeArg().tokens,r=e.consumeArg().tokens,n=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),n.length&&h.macros.set("\\|",a));var f=u;if(!u&&n.length){var m=h.future();m.text==="|"&&(h.popToken(),f=!0)}return{tokens:f?n:r,numArgs:0}};e.macros.set("|",l(!1)),n.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}};P("\\bra@ket",jj(!1));P("\\bra@set",jj(!0));P("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");P("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");P("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");P("\\angln","{\\angl n}");P("\\blue","\\textcolor{##6495ed}{#1}");P("\\orange","\\textcolor{##ffa500}{#1}");P("\\pink","\\textcolor{##ff00af}{#1}");P("\\red","\\textcolor{##df0030}{#1}");P("\\green","\\textcolor{##28ae7b}{#1}");P("\\gray","\\textcolor{gray}{#1}");P("\\purple","\\textcolor{##9d38bd}{#1}");P("\\blueA","\\textcolor{##ccfaff}{#1}");P("\\blueB","\\textcolor{##80f6ff}{#1}");P("\\blueC","\\textcolor{##63d9ea}{#1}");P("\\blueD","\\textcolor{##11accd}{#1}");P("\\blueE","\\textcolor{##0c7f99}{#1}");P("\\tealA","\\textcolor{##94fff5}{#1}");P("\\tealB","\\textcolor{##26edd5}{#1}");P("\\tealC","\\textcolor{##01d1c1}{#1}");P("\\tealD","\\textcolor{##01a995}{#1}");P("\\tealE","\\textcolor{##208170}{#1}");P("\\greenA","\\textcolor{##b6ffb0}{#1}");P("\\greenB","\\textcolor{##8af281}{#1}");P("\\greenC","\\textcolor{##74cf70}{#1}");P("\\greenD","\\textcolor{##1fab54}{#1}");P("\\greenE","\\textcolor{##0d923f}{#1}");P("\\goldA","\\textcolor{##ffd0a9}{#1}");P("\\goldB","\\textcolor{##ffbb71}{#1}");P("\\goldC","\\textcolor{##ff9c39}{#1}");P("\\goldD","\\textcolor{##e07d10}{#1}");P("\\goldE","\\textcolor{##a75a05}{#1}");P("\\redA","\\textcolor{##fca9a9}{#1}");P("\\redB","\\textcolor{##ff8482}{#1}");P("\\redC","\\textcolor{##f9685d}{#1}");P("\\redD","\\textcolor{##e84d39}{#1}");P("\\redE","\\textcolor{##bc2612}{#1}");P("\\maroonA","\\textcolor{##ffbde0}{#1}");P("\\maroonB","\\textcolor{##ff92c6}{#1}");P("\\maroonC","\\textcolor{##ed5fa6}{#1}");P("\\maroonD","\\textcolor{##ca337c}{#1}");P("\\maroonE","\\textcolor{##9e034e}{#1}");P("\\purpleA","\\textcolor{##ddd7ff}{#1}");P("\\purpleB","\\textcolor{##c6b9fc}{#1}");P("\\purpleC","\\textcolor{##aa87ff}{#1}");P("\\purpleD","\\textcolor{##7854ab}{#1}");P("\\purpleE","\\textcolor{##543b78}{#1}");P("\\mintA","\\textcolor{##f5f9e8}{#1}");P("\\mintB","\\textcolor{##edf2df}{#1}");P("\\mintC","\\textcolor{##e0e5cc}{#1}");P("\\grayA","\\textcolor{##f6f7f7}{#1}");P("\\grayB","\\textcolor{##f0f1f2}{#1}");P("\\grayC","\\textcolor{##e3e5e6}{#1}");P("\\grayD","\\textcolor{##d6d8da}{#1}");P("\\grayE","\\textcolor{##babec2}{#1}");P("\\grayF","\\textcolor{##888d93}{#1}");P("\\grayG","\\textcolor{##626569}{#1}");P("\\grayH","\\textcolor{##3b3e40}{#1}");P("\\grayI","\\textcolor{##21242c}{#1}");P("\\kaBlue","\\textcolor{##314453}{#1}");P("\\kaGreen","\\textcolor{##71B307}{#1}");var Wj={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},K5=class{constructor(e,t,r){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 q5(aue,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new bw(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,r,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Da("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n=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 Be("Extra }",o)}else if(o.text==="EOF")throw new Be("Unexpected end of input in a macro argument, expected '"+(e&&r?e[a]:"}")+"'",o);if(e&&r)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||r);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:o}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Be("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;n<r.length;n++){var o=this.popToken();if(r[n]!==o.text)throw new Be("Use of the macro doesn't match its definition",o)}}for(var s=[],a=0;a<e;a++)s.push(this.consumeArg(t&&t[a+1]).tokens);return s}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(n==null||e&&n.unexpandable){if(e&&n==null&&r[0]==="\\"&&!this.isDefined(r))throw new Be("Undefined control sequence: "+r);return this.pushToken(t),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new Be("Too many expansions: infinite loop or need to increase maxExpand setting");var o=n.tokens,s=this.consumeArgs(n.numArgs,n.delimiters);if(n.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 Be("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 Be("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 Da(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(r=>r.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var r=this.lexer.catcodes[e];if(r!=null&&r!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var o=0;if(n.indexOf("#")!==-1)for(var s=n.replace(/##/g,"");s.indexOf("#"+(o+1))!==-1;)++o;for(var a=new bw(n,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 n}isDefined(e){return this.macros.has(e)||dd.hasOwnProperty(e)||$i.math.hasOwnProperty(e)||$i.text.hasOwnProperty(e)||Wj.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:dd.hasOwnProperty(e)&&!dd[e].primitive}},YU=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,lw=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"}),R5={"\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"}},XU={\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"},vw=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 K5(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 Be("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 Da("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(i.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&dd[n.text]&&dd[n.text].infix)break;var o=this.parseAtom(t);if(o){if(o.type==="internal")continue}else break;r.push(o)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,r,n=0;n<e.length;n++)if(e[n].type==="infix"){if(t!==-1)throw new Be("only one infix operator per group",e[n].token);t=n,r=e[n].replaceWith}if(t!==-1&&r){var o,s,a=e.slice(0,t),l=e.slice(t+1);a.length===1&&a[0].type==="ordgroup"?o=a[0]:o={type:"ordgroup",mode:this.mode,body:a},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var c;return r==="\\\\abovefrac"?c=this.callFunction(r,[o,e[t],s],[]):c=this.callFunction(r,[o,s],[]),[c]}else return e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var n=this.parseGroup(e);if(!n)throw new Be("Expected group after '"+r+"'",t);return n}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]};return o}parseAtom(e){var t=this.parseGroup("atom",e);if(this.mode==="text")return t;for(var r,n;;){this.consumeSpaces();var o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(t&&t.type==="op"){var s=o.text==="\\limits";t.limits=s,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=o.text==="\\limits");else throw new Be("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(r)throw new Be("Double superscript",o);r=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(n)throw new Be("Double subscript",o);n=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(r)throw new Be("Double superscript",o);var a={type:"textord",mode:this.mode,text:"\\prime"},l=[a];for(this.consume();this.fetch().text==="'";)l.push(a),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:l}}else if(lw[o.text]){var c=lw[o.text],d=YU.test(o.text);for(this.consume();;){var u=this.fetch().text;if(!lw[u]||YU.test(u)!==d)break;this.consume(),c+=lw[u]}var h=new i(c,this.settings).parse();d?n={type:"ordgroup",mode:"math",body:h}:r={type:"ordgroup",mode:"math",body:h}}else break}return r||n?{type:"supsub",mode:this.mode,base:t,sup:r,sub:n}:t}parseFunction(e,t){var r=this.fetch(),n=r.text,o=dd[n];if(!o)return null;if(this.consume(),t&&t!=="atom"&&!o.allowedInArgument)throw new Be("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if(this.mode==="text"&&!o.allowedInText)throw new Be("Can't use function '"+n+"' in text mode",r);if(this.mode==="math"&&o.allowedInMath===!1)throw new Be("Can't use function '"+n+"' in math mode",r);var{args:s,optArgs:a}=this.parseArguments(n,o);return this.callFunction(n,s,a,r,e)}callFunction(e,t,r,n,o){var s={funcName:e,parser:this,token:n,breakOnTokenText:o},a=dd[e];if(a&&a.handler)return a.handler(s,t,r);throw new Be("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var n=[],o=[],s=0;s<r;s++){var a=t.argTypes&&t.argTypes[s],l=s<t.numOptionalArgs;(t.primitive&&a==null||t.type==="sqrt"&&s===1&&o[0]==null)&&(a="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",a,l);if(l)o.push(c);else if(c!=null)n.push(c);else throw new Be("Null argument, please report this as a bug")}return{args:n,optArgs:o}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":{var n=this.parseArgumentGroup(r,"text");return n!=null?{type:"styling",mode:n.mode,body:[n],style:"text"}:null}case"raw":{var o=this.parseStringGroup("raw",r);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(r)throw new Be("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new Be("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Be("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(r==null)return null;for(var n="",o;(o=this.fetch()).text!=="EOF";)n+=o.text,this.consume();return this.consume(),r.text=n,r}parseRegexGroup(e,t){for(var r=this.fetch(),n=r,o="",s;(s=this.fetch()).text!=="EOF"&&e.test(o+s.text);)n=s,o+=n.text,this.consume();if(o==="")throw new Be("Invalid "+t+": '"+r.text+"'",r);return r.range(n,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new Be("Invalid color: '"+t.text+"'",t);var n=r[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",r=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new Be("Invalid size: '"+t.text+"'",t);var o={number:+(n[1]+n[2]),unit:n[3]};if(!JU(o))throw new Be("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(r==null)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:r.loc,body:o};return t&&this.switchMode(n),s}parseGroup(e,t){var r=this.fetch(),n=r.text,o;if(n==="{"||n==="\\begingroup"){this.consume();var s=n==="{"?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),o={type:"ordgroup",mode:this.mode,loc:Oo.range(r,l),body:a,semisimple:n==="\\begingroup"||void 0}}else if(o=this.parseFunction(t,e)||this.parseSymbol(),o==null&&n[0]==="\\"&&!Wj.hasOwnProperty(n)){if(this.settings.throwOnError)throw new Be("Undefined control sequence: "+n,r);o=this.formatUnsupportedCmd(n),this.consume()}return o}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],o=n.text;o==="-"&&e[r+1].text==="-"&&(r+1<t&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:Oo.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Oo.range(n,e[r+1]),text:"--"}),t-=1)),(o==="'"||o==="`")&&e[r+1].text===o&&(e.splice(r,2,{type:"textord",mode:"text",loc:Oo.range(n,e[r+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),n=r.charAt(0)==="*";if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Be(`\\verb assertion failed -- + please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:n}}XU.hasOwnProperty(t[0])&&!$i[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=XU[t[0]]+t.slice(1));var o=oue.exec(t);o&&(t=t.substring(0,o.index),t==="i"?t="\u0131":t==="j"&&(t="\u0237"));var s;if($i[this.mode][t]){this.settings.strict&&this.mode==="math"&&z5.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a=$i[this.mode][t].group,l=Oo.range(e),c;if(Zce.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&&(ZU(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:Oo.range(e),text:t};else return null;if(this.consume(),o)for(var u=0;u<o[0].length;u++){var h=o[0][u];if(!R5[h])throw new Be("Unknown accent ' "+h+"'",e);var f=R5[h][this.mode]||R5[h].text;if(!f)throw new Be("Accent "+h+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Oo.range(e),label:f,isStretchy:!1,isShifty:!0,base:s}}return s}};vw.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var c6=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new vw(e,t);delete r.gullet.macros.current["\\df@tag"];var n=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Be("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:r.subparse([new Da("\\df@tag")])}]}return n},Vj=function(e,t,r){t.textContent="";var n=d6(e,r).toNode();t.appendChild(n)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Vj=function(){throw new Be("KaTeX doesn't work in quirks mode.")});var lue=function(e,t){var r=d6(e,t).toMarkup();return r},cue=function(e,t){var r=new Wg(t);return c6(e,r)},qj=function(e,t,r){if(r.throwOnError||!(e instanceof Be))throw e;var n=ae.makeSpan(["katex-error"],[new ho(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+r.errorColor),n},d6=function(e,t){var r=new Wg(t);try{var n=c6(e,r);return yde(n,e,r)}catch(o){return qj(o,e,r)}},due=function(e,t){var r=new Wg(t);try{var n=c6(e,r);return wde(n,e,r)}catch(o){return qj(o,e,r)}},Kf={version:"0.16.9",render:Vj,renderToString:lue,ParseError:Be,SETTINGS_SCHEMA:cw,__parse:cue,__renderToDomTree:d6,__renderToHTMLTree:due,__setFontMetrics:Kce,__defineSymbol:x,__defineFunction:rt,__defineMacro:P,__domTree:{Span:Ru,Anchor:qg,SymbolNode:ho,SvgNode:Ps,PathNode:Ma,LineNode:Kg}};var uue={};function kw(i){let e=this,t=i||uue,r=e.data(),n=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);n.push(x5(t)),o.push(_5()),s.push(y5(t))}function Kj(i,e){let t={type:"element",tagName:"blockquote",properties:{},children:i.wrap(i.all(e),!0)};return i.patch(e,t),i.applyData(e,t)}function $j(i,e){let t={type:"element",tagName:"br",properties:{},children:[]};return i.patch(e,t),[i.applyData(e,t),{type:"text",value:` +`}]}function Gj(i,e){let t=e.value?e.value+` +`:"",r={};e.lang&&(r.className=["language-"+e.lang]);let n={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return e.meta&&(n.data={meta:e.meta}),i.patch(e,n),n=i.applyData(e,n),n={type:"element",tagName:"pre",properties:{},children:[n]},i.patch(e,n),n}function Yj(i,e){let t={type:"element",tagName:"del",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Xj(i,e){let t={type:"element",tagName:"em",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}var vAe=pd(new RegExp("\\p{P}","u")),_Ae=pd(/[A-Za-z]/),u6=pd(/[\dA-Za-z]/),yAe=pd(/[#-'*+\--9=?A-Z^-~]/);var wAe=pd(/\d/),xAe=pd(/[\dA-Fa-f]/),CAe=pd(/[!-/:-@[-`{-~]/);var SAe=pd(/\s/);function pd(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function ss(i){let e=[],t=-1,r=0,n=0;for(;++t<i.length;){let o=i.charCodeAt(t),s="";if(o===37&&u6(i.charCodeAt(t+1))&&u6(i.charCodeAt(t+2)))n=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),n=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(r,t),encodeURIComponent(s)),r=t+n+1,s=""),n&&(t+=n,n=0)}return e.join("")+i.slice(r)}function Qj(i,e){let t=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),n=ss(r.toLowerCase()),o=i.footnoteOrder.indexOf(r),s,a=i.footnoteCounts.get(r);a===void 0?(a=0,i.footnoteOrder.push(r),s=i.footnoteOrder.length):s=o+1,a+=1,i.footnoteCounts.set(r,a);let l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+n,id:t+"fnref-"+n+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};i.patch(e,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return i.patch(e,c),i.applyData(e,c)}function Zj(i,e){let t={type:"element",tagName:"h"+e.depth,properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Jj(i,e){if(i.options.allowDangerousHtml){let t={type:"raw",value:e.value};return i.patch(e,t),i.applyData(e,t)}}function Ew(i,e){let t=e.referenceType,r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];let n=i.all(e),o=n[0];o&&o.type==="text"?o.value="["+o.value:n.unshift({type:"text",value:"["});let s=n[n.length-1];return s&&s.type==="text"?s.value+=r:n.push({type:"text",value:r}),n}function eW(i,e){let t=String(e.identifier).toUpperCase(),r=i.definitionById.get(t);if(!r)return Ew(i,e);let n={src:ss(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"img",properties:n,children:[]};return i.patch(e,o),i.applyData(e,o)}function tW(i,e){let t={src:ss(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);let r={type:"element",tagName:"img",properties:t,children:[]};return i.patch(e,r),i.applyData(e,r)}function iW(i,e){let t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};i.patch(e,t);let r={type:"element",tagName:"code",properties:{},children:[t]};return i.patch(e,r),i.applyData(e,r)}function rW(i,e){let t=String(e.identifier).toUpperCase(),r=i.definitionById.get(t);if(!r)return Ew(i,e);let n={href:ss(r.url||"")};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"a",properties:n,children:i.all(e)};return i.patch(e,o),i.applyData(e,o)}function nW(i,e){let t={href:ss(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);let r={type:"element",tagName:"a",properties:t,children:i.all(e)};return i.patch(e,r),i.applyData(e,r)}function oW(i,e,t){let r=i.all(e),n=t?hue(t):sW(e),o={},s=[];if(typeof e.checked=="boolean"){let d=r[0],u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let d=r[a];(n||a!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:` `}),d.type==="element"&&d.tagName==="p"&&!n?s.push(...d.children):s.push(d)}let l=r[r.length-1];l&&(n||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:` -`});let c={type:"element",tagName:"li",properties:o,children:s};return i.patch(e,c),i.applyData(e,c)}function hue(i){let e=!1;if(i.type==="list"){e=i.spread||!1;let t=i.children,r=-1;for(;!e&&++r<t.length;)e=oW(t[r])}return e}function oW(i){let e=i.spread;return e==null?i.children.length>1:e}function sW(i,e){let t={},r=i.all(e),n=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++n<r.length;){let s=r[n];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}let o={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:i.wrap(r,!0)};return i.patch(e,o),i.applyData(e,o)}function aW(i,e){let t={type:"element",tagName:"p",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function lW(i,e){let t={type:"root",children:i.wrap(i.all(e))};return i.patch(e,t),i.applyData(e,t)}function cW(i,e){let t={type:"element",tagName:"strong",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}var Ou=dW("end"),as=dW("start");function dW(i){return e;function e(t){let r=t&&t.position&&t.position[i]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Yg(i){let e=as(i),t=Ou(i);if(e&&t)return{start:e,end:t}}function uW(i,e){let t=i.all(e),r=t.shift(),n=[];if(r){let s={type:"element",tagName:"thead",properties:{},children:i.wrap([r],!0)};i.patch(e.children[0],s),n.push(s)}if(t.length>0){let s={type:"element",tagName:"tbody",properties:{},children:i.wrap(t,!0)},a=as(e.children[1]),l=Ou(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),n.push(s)}let o={type:"element",tagName:"table",properties:{},children:i.wrap(n,!0)};return i.patch(e,o),i.applyData(e,o)}function hW(i,e,t){let r=t?t.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",s=t&&t.type==="table"?t.align:void 0,a=s?s.length:e.children.length,l=-1,c=[];for(;++l<a;){let u=e.children[l],h={},f=s?s[l]:void 0;f&&(h.align=f);let m={type:"element",tagName:o,properties:h,children:[]};u&&(m.children=i.all(u),i.patch(u,m),m=i.applyData(u,m)),c.push(m)}let d={type:"element",tagName:"tr",properties:{},children:i.wrap(c,!0)};return i.patch(e,d),i.applyData(e,d)}function fW(i,e){let t={type:"element",tagName:"td",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function mW(i){let e=String(i),t=/\r?\n|\r/g,r=t.exec(e),n=0,o=[];for(;r;)o.push(pW(e.slice(n,r.index),n>0,!0),r[0]),n=r.index+r[0].length,r=t.exec(e);return o.push(pW(e.slice(n),n>0,!1)),o.join("")}function pW(i,e,t){let r=0,n=i.length;if(e){let o=i.codePointAt(r);for(;o===9||o===32;)r++,o=i.codePointAt(r)}if(t){let o=i.codePointAt(n-1);for(;o===9||o===32;)n--,o=i.codePointAt(n-1)}return n>r?i.slice(r,n):""}function gW(i,e){let t={type:"text",value:mW(String(e.value))};return i.patch(e,t),i.applyData(e,t)}function bW(i,e){let t={type:"element",tagName:"hr",properties:{},children:[]};return i.patch(e,t),i.applyData(e,t)}var vW={blockquote:qj,break:Kj,code:$j,delete:Gj,emphasis:Yj,footnoteReference:Xj,heading:Qj,html:Zj,imageReference:Jj,image:eW,inlineCode:tW,linkReference:iW,link:rW,listItem:nW,list:sW,paragraph:aW,root:lW,strong:cW,table:uW,tableCell:fW,tableRow:hW,text:gW,thematicBreak:bW,toml:Tw,yaml:Tw,definition:Tw,footnoteDefinition:Tw};function Tw(){}var _W=typeof self=="object"?self:globalThis,fue=(i,e)=>{let t=(n,o)=>(i.set(o,n),n),r=n=>{if(i.has(n))return i.get(n);let[o,s]=e[n];switch(o){case 0:case-1:return t(s,n);case 1:{let a=t([],n);for(let l of s)a.push(r(l));return a}case 2:{let a=t({},n);for(let[l,c]of s)a[r(l)]=r(c);return a}case 3:return t(new Date(s),n);case 4:{let{source:a,flags:l}=s;return t(new RegExp(a,l),n)}case 5:{let a=t(new Map,n);for(let[l,c]of s)a.set(r(l),r(c));return a}case 6:{let a=t(new Set,n);for(let l of s)a.add(r(l));return a}case 7:{let{name:a,message:l}=s;return t(new _W[a](l),n)}case 8:return t(BigInt(s),n);case"BigInt":return t(Object(BigInt(s)),n)}return t(new _W[o](s),n)};return r},p6=i=>fue(new Map,i)(0);var $f="",{toString:pue}={},{keys:mue}=Object,Jg=i=>{let e=typeof i;if(e!=="object"||!i)return[0,e];let t=pue.call(i).slice(8,-1);switch(t){case"Array":return[1,$f];case"Object":return[2,$f];case"Date":return[3,$f];case"RegExp":return[4,$f];case"Map":return[5,$f];case"Set":return[6,$f]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Mw=([i,e])=>i===0&&(e==="function"||e==="symbol"),gue=(i,e,t,r)=>{let n=(s,a)=>{let l=r.push(s)-1;return t.set(a,l),l},o=s=>{if(t.has(s))return t.get(s);let[a,l]=Jg(s);switch(a){case 0:{let d=s;switch(l){case"bigint":a=8,d=s.toString();break;case"function":case"symbol":if(i)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return n([-1],s)}return n([a,d],s)}case 1:{if(l)return n([l,[...s]],s);let d=[],u=n([a,d],s);for(let h of s)d.push(o(h));return u}case 2:{if(l)switch(l){case"BigInt":return n([l,s.toString()],s);case"Boolean":case"Number":case"String":return n([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let d=[],u=n([a,d],s);for(let h of mue(s))(i||!Mw(Jg(s[h])))&&d.push([o(h),o(s[h])]);return u}case 3:return n([a,s.toISOString()],s);case 4:{let{source:d,flags:u}=s;return n([a,{source:d,flags:u}],s)}case 5:{let d=[],u=n([a,d],s);for(let[h,f]of s)(i||!(Mw(Jg(h))||Mw(Jg(f))))&&d.push([o(h),o(f)]);return u}case 6:{let d=[],u=n([a,d],s);for(let h of s)(i||!Mw(Jg(h)))&&d.push(o(h));return u}}let{message:c}=s;return n([a,{name:l,message:c}],s)};return o},m6=(i,{json:e,lossy:t}={})=>{let r=[];return gue(!(e||t),!!e,new Map,r)(i),r};var Os=typeof structuredClone=="function"?(i,e)=>e&&("json"in e||"lossy"in e)?p6(m6(i,e)):structuredClone(i):(i,e)=>p6(m6(i,e));function bue(i,e){let t=[{type:"text",value:"\u21A9"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function vue(i,e){return"Back to reference "+(i+1)+(e>1?"-"+e:"")}function yW(i){let e=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",t=i.options.footnoteBackContent||bue,r=i.options.footnoteBackLabel||vue,n=i.options.footnoteLabel||"Footnotes",o=i.options.footnoteLabelTagName||"h2",s=i.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l<i.footnoteOrder.length;){let c=i.footnoteById.get(i.footnoteOrder[l]);if(!c)continue;let d=i.all(c),u=String(c.identifier).toUpperCase(),h=ss(u.toLowerCase()),f=0,m=[],g=i.footnoteCounts.get(u);for(;g!==void 0&&++f<=g;){m.length>0&&m.push({type:"text",value:" "});let E=typeof t=="string"?t:t(l,f);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}let w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){let E=w.children[w.children.length-1];E&&E.type==="text"?E.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else d.push(...m);let _={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:i.wrap(d,!0)};i.patch(c,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:xt(ue({},Os(s)),{id:"footnote-label"}),children:[{type:"text",value:n}]},{type:"text",value:` +`});let c={type:"element",tagName:"li",properties:o,children:s};return i.patch(e,c),i.applyData(e,c)}function hue(i){let e=!1;if(i.type==="list"){e=i.spread||!1;let t=i.children,r=-1;for(;!e&&++r<t.length;)e=sW(t[r])}return e}function sW(i){let e=i.spread;return e==null?i.children.length>1:e}function aW(i,e){let t={},r=i.all(e),n=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++n<r.length;){let s=r[n];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}let o={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:i.wrap(r,!0)};return i.patch(e,o),i.applyData(e,o)}function lW(i,e){let t={type:"element",tagName:"p",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function cW(i,e){let t={type:"root",children:i.wrap(i.all(e))};return i.patch(e,t),i.applyData(e,t)}function dW(i,e){let t={type:"element",tagName:"strong",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}var Ou=uW("end"),as=uW("start");function uW(i){return e;function e(t){let r=t&&t.position&&t.position[i]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Yg(i){let e=as(i),t=Ou(i);if(e&&t)return{start:e,end:t}}function hW(i,e){let t=i.all(e),r=t.shift(),n=[];if(r){let s={type:"element",tagName:"thead",properties:{},children:i.wrap([r],!0)};i.patch(e.children[0],s),n.push(s)}if(t.length>0){let s={type:"element",tagName:"tbody",properties:{},children:i.wrap(t,!0)},a=as(e.children[1]),l=Ou(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),n.push(s)}let o={type:"element",tagName:"table",properties:{},children:i.wrap(n,!0)};return i.patch(e,o),i.applyData(e,o)}function fW(i,e,t){let r=t?t.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",s=t&&t.type==="table"?t.align:void 0,a=s?s.length:e.children.length,l=-1,c=[];for(;++l<a;){let u=e.children[l],h={},f=s?s[l]:void 0;f&&(h.align=f);let m={type:"element",tagName:o,properties:h,children:[]};u&&(m.children=i.all(u),i.patch(u,m),m=i.applyData(u,m)),c.push(m)}let d={type:"element",tagName:"tr",properties:{},children:i.wrap(c,!0)};return i.patch(e,d),i.applyData(e,d)}function pW(i,e){let t={type:"element",tagName:"td",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function gW(i){let e=String(i),t=/\r?\n|\r/g,r=t.exec(e),n=0,o=[];for(;r;)o.push(mW(e.slice(n,r.index),n>0,!0),r[0]),n=r.index+r[0].length,r=t.exec(e);return o.push(mW(e.slice(n),n>0,!1)),o.join("")}function mW(i,e,t){let r=0,n=i.length;if(e){let o=i.codePointAt(r);for(;o===9||o===32;)r++,o=i.codePointAt(r)}if(t){let o=i.codePointAt(n-1);for(;o===9||o===32;)n--,o=i.codePointAt(n-1)}return n>r?i.slice(r,n):""}function bW(i,e){let t={type:"text",value:gW(String(e.value))};return i.patch(e,t),i.applyData(e,t)}function vW(i,e){let t={type:"element",tagName:"hr",properties:{},children:[]};return i.patch(e,t),i.applyData(e,t)}var _W={blockquote:Kj,break:$j,code:Gj,delete:Yj,emphasis:Xj,footnoteReference:Qj,heading:Zj,html:Jj,imageReference:eW,image:tW,inlineCode:iW,linkReference:rW,link:nW,listItem:oW,list:aW,paragraph:lW,root:cW,strong:dW,table:hW,tableCell:pW,tableRow:fW,text:bW,thematicBreak:vW,toml:Tw,yaml:Tw,definition:Tw,footnoteDefinition:Tw};function Tw(){}var yW=typeof self=="object"?self:globalThis,fue=(i,e)=>{let t=(n,o)=>(i.set(o,n),n),r=n=>{if(i.has(n))return i.get(n);let[o,s]=e[n];switch(o){case 0:case-1:return t(s,n);case 1:{let a=t([],n);for(let l of s)a.push(r(l));return a}case 2:{let a=t({},n);for(let[l,c]of s)a[r(l)]=r(c);return a}case 3:return t(new Date(s),n);case 4:{let{source:a,flags:l}=s;return t(new RegExp(a,l),n)}case 5:{let a=t(new Map,n);for(let[l,c]of s)a.set(r(l),r(c));return a}case 6:{let a=t(new Set,n);for(let l of s)a.add(r(l));return a}case 7:{let{name:a,message:l}=s;return t(new yW[a](l),n)}case 8:return t(BigInt(s),n);case"BigInt":return t(Object(BigInt(s)),n)}return t(new yW[o](s),n)};return r},m6=i=>fue(new Map,i)(0);var $f="",{toString:pue}={},{keys:mue}=Object,Jg=i=>{let e=typeof i;if(e!=="object"||!i)return[0,e];let t=pue.call(i).slice(8,-1);switch(t){case"Array":return[1,$f];case"Object":return[2,$f];case"Date":return[3,$f];case"RegExp":return[4,$f];case"Map":return[5,$f];case"Set":return[6,$f]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Mw=([i,e])=>i===0&&(e==="function"||e==="symbol"),gue=(i,e,t,r)=>{let n=(s,a)=>{let l=r.push(s)-1;return t.set(a,l),l},o=s=>{if(t.has(s))return t.get(s);let[a,l]=Jg(s);switch(a){case 0:{let d=s;switch(l){case"bigint":a=8,d=s.toString();break;case"function":case"symbol":if(i)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return n([-1],s)}return n([a,d],s)}case 1:{if(l)return n([l,[...s]],s);let d=[],u=n([a,d],s);for(let h of s)d.push(o(h));return u}case 2:{if(l)switch(l){case"BigInt":return n([l,s.toString()],s);case"Boolean":case"Number":case"String":return n([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let d=[],u=n([a,d],s);for(let h of mue(s))(i||!Mw(Jg(s[h])))&&d.push([o(h),o(s[h])]);return u}case 3:return n([a,s.toISOString()],s);case 4:{let{source:d,flags:u}=s;return n([a,{source:d,flags:u}],s)}case 5:{let d=[],u=n([a,d],s);for(let[h,f]of s)(i||!(Mw(Jg(h))||Mw(Jg(f))))&&d.push([o(h),o(f)]);return u}case 6:{let d=[],u=n([a,d],s);for(let h of s)(i||!Mw(Jg(h)))&&d.push(o(h));return u}}let{message:c}=s;return n([a,{name:l,message:c}],s)};return o},g6=(i,{json:e,lossy:t}={})=>{let r=[];return gue(!(e||t),!!e,new Map,r)(i),r};var Os=typeof structuredClone=="function"?(i,e)=>e&&("json"in e||"lossy"in e)?m6(g6(i,e)):structuredClone(i):(i,e)=>m6(g6(i,e));function bue(i,e){let t=[{type:"text",value:"\u21A9"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function vue(i,e){return"Back to reference "+(i+1)+(e>1?"-"+e:"")}function wW(i){let e=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",t=i.options.footnoteBackContent||bue,r=i.options.footnoteBackLabel||vue,n=i.options.footnoteLabel||"Footnotes",o=i.options.footnoteLabelTagName||"h2",s=i.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l<i.footnoteOrder.length;){let c=i.footnoteById.get(i.footnoteOrder[l]);if(!c)continue;let d=i.all(c),u=String(c.identifier).toUpperCase(),h=ss(u.toLowerCase()),f=0,m=[],g=i.footnoteCounts.get(u);for(;g!==void 0&&++f<=g;){m.length>0&&m.push({type:"text",value:" "});let E=typeof t=="string"?t:t(l,f);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}let w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){let E=w.children[w.children.length-1];E&&E.type==="text"?E.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else d.push(...m);let _={type:"element",tagName:"li",properties:{id:e+"fn-"+h},children:i.wrap(d,!0)};i.patch(c,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:xt(ue({},Os(s)),{id:"footnote-label"}),children:[{type:"text",value:n}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:i.wrap(a,!0)},{type:"text",value:` -`}]}}var g6={}.hasOwnProperty,_ue={};function xW(i,e){let t=e||_ue,r=new Map,n=new Map,o=new Map,s=ue(ue({},vW),t.handlers),a={all:c,applyData:wue,definitionById:r,footnoteById:n,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:t,patch:yue,wrap:Cue};return Rn(i,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){let u=d.type==="definition"?r:n,h=String(d.identifier).toUpperCase();u.has(h)||u.set(h,d)}}),a;function l(d,u){let h=d.type,f=a.handlers[h];if(g6.call(a.handlers,h)&&f)return f(a,d,u);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in d){let g=d,{children:w}=g,_=so(g,["children"]),E=Os(_);return E.children=a.all(d),E}return Os(d)}return(a.options.unknownHandler||xue)(a,d,u)}function c(d){let u=[];if("children"in d){let h=d.children,f=-1;for(;++f<h.length;){let m=a.one(h[f],d);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=wW(m.value)),!Array.isArray(m)&&m.type==="element")){let g=m.children[0];g&&g.type==="text"&&(g.value=wW(g.value))}Array.isArray(m)?u.push(...m):u.push(m)}}}return u}}function yue(i,e){i.position&&(e.position=Yg(i))}function wue(i,e){let t=e;if(i&&i.data){let r=i.data.hName,n=i.data.hChildren,o=i.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{let s="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:s}}t.type==="element"&&o&&Object.assign(t.properties,Os(o)),"children"in t&&t.children&&n!==null&&n!==void 0&&(t.children=n)}return t}function xue(i,e){let t=e.data||{},r="value"in e&&!(g6.call(t,"hProperties")||g6.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:i.all(e)};return i.patch(e,r),i.applyData(e,r)}function Cue(i,e){let t=[],r=-1;for(e&&t.push({type:"text",value:` +`}]}}var b6={}.hasOwnProperty,_ue={};function CW(i,e){let t=e||_ue,r=new Map,n=new Map,o=new Map,s=ue(ue({},_W),t.handlers),a={all:c,applyData:wue,definitionById:r,footnoteById:n,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:t,patch:yue,wrap:Cue};return Rn(i,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){let u=d.type==="definition"?r:n,h=String(d.identifier).toUpperCase();u.has(h)||u.set(h,d)}}),a;function l(d,u){let h=d.type,f=a.handlers[h];if(b6.call(a.handlers,h)&&f)return f(a,d,u);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in d){let g=d,{children:w}=g,_=so(g,["children"]),E=Os(_);return E.children=a.all(d),E}return Os(d)}return(a.options.unknownHandler||xue)(a,d,u)}function c(d){let u=[];if("children"in d){let h=d.children,f=-1;for(;++f<h.length;){let m=a.one(h[f],d);if(m){if(f&&h[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=xW(m.value)),!Array.isArray(m)&&m.type==="element")){let g=m.children[0];g&&g.type==="text"&&(g.value=xW(g.value))}Array.isArray(m)?u.push(...m):u.push(m)}}}return u}}function yue(i,e){i.position&&(e.position=Yg(i))}function wue(i,e){let t=e;if(i&&i.data){let r=i.data.hName,n=i.data.hChildren,o=i.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{let s="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:s}}t.type==="element"&&o&&Object.assign(t.properties,Os(o)),"children"in t&&t.children&&n!==null&&n!==void 0&&(t.children=n)}return t}function xue(i,e){let t=e.data||{},r="value"in e&&!(b6.call(t,"hProperties")||b6.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:i.all(e)};return i.patch(e,r),i.applyData(e,r)}function Cue(i,e){let t=[],r=-1;for(e&&t.push({type:"text",value:` `});++r<i.length;)r&&t.push({type:"text",value:` `}),t.push(i[r]);return e&&i.length>0&&t.push({type:"text",value:` -`}),t}function wW(i){let e=0,t=i.charCodeAt(e);for(;t===9||t===32;)e++,t=i.charCodeAt(e);return i.slice(e)}function Nw(i,e){let t=xW(i,e),r=t.one(i,void 0),n=yW(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return n&&("children"in o,o.children.push({type:"text",value:` -`},n)),o}function Rw(i,e){return i&&"run"in i?async function(t,r){let n=Nw(t,e);await i.run(n,r)}:function(t){return Nw(t,e||i)}}var Hl=class{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}};Hl.prototype.property={};Hl.prototype.normal={};Hl.prototype.space=null;function b6(i,e){let t={},r={},n=-1;for(;++n<i.length;)Object.assign(t,i[n].property),Object.assign(r,i[n].normal);return new Hl(t,r,e)}function Ul(i){return i.toLowerCase()}var On=class{constructor(e,t){this.property=e,this.attribute=t}};On.prototype.space=null;On.prototype.boolean=!1;On.prototype.booleanish=!1;On.prototype.overloadedBoolean=!1;On.prototype.number=!1;On.prototype.commaSeparated=!1;On.prototype.spaceSeparated=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.mustUseProperty=!1;On.prototype.defined=!1;var e0={};Gh(e0,{boolean:()=>$t,booleanish:()=>br,commaOrSpaceSeparated:()=>po,commaSeparated:()=>md,number:()=>Fe,overloadedBoolean:()=>v6,spaceSeparated:()=>Ai});var Sue=0,$t=Fu(),br=Fu(),v6=Fu(),Fe=Fu(),Ai=Fu(),md=Fu(),po=Fu();function Fu(){return 2**++Sue}var _6=Object.keys(e0),zu=class extends On{constructor(e,t,r,n){let o=-1;if(super(e,t),CW(this,"space",n),typeof r=="number")for(;++o<_6.length;){let s=_6[o];CW(this,_6[o],(r&e0[s])===e0[s])}}};zu.prototype.defined=!0;function CW(i,e,t){t&&(i[e]=t)}var kue={}.hasOwnProperty;function ls(i){let e={},t={},r;for(r in i.properties)if(kue.call(i.properties,r)){let n=i.properties[r],o=new zu(r,i.transform(i.attributes||{},r),n,i.space);i.mustUseProperty&&i.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,t[Ul(r)]=r,t[Ul(o.attribute)]=r}return new Hl(e,t,i.space)}var y6=ls({space:"xlink",transform(i,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var w6=ls({space:"xml",transform(i,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Pw(i,e){return e in i?i[e]:e}function Ow(i,e){return Pw(i,e.toLowerCase())}var x6=ls({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ow,properties:{xmlns:null,xmlnsXLink:null}});var C6=ls({transform(i,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:br,ariaAutoComplete:null,ariaBusy:br,ariaChecked:br,ariaColCount:Fe,ariaColIndex:Fe,ariaColSpan:Fe,ariaControls:Ai,ariaCurrent:null,ariaDescribedBy:Ai,ariaDetails:null,ariaDisabled:br,ariaDropEffect:Ai,ariaErrorMessage:null,ariaExpanded:br,ariaFlowTo:Ai,ariaGrabbed:br,ariaHasPopup:null,ariaHidden:br,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ai,ariaLevel:Fe,ariaLive:null,ariaModal:br,ariaMultiLine:br,ariaMultiSelectable:br,ariaOrientation:null,ariaOwns:Ai,ariaPlaceholder:null,ariaPosInSet:Fe,ariaPressed:br,ariaReadOnly:br,ariaRelevant:null,ariaRequired:br,ariaRoleDescription:Ai,ariaRowCount:Fe,ariaRowIndex:Fe,ariaRowSpan:Fe,ariaSelected:br,ariaSetSize:Fe,ariaSort:null,ariaValueMax:Fe,ariaValueMin:Fe,ariaValueNow:Fe,ariaValueText:null,role:null}});var SW=ls({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ow,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:md,acceptCharset:Ai,accessKey:Ai,action:null,allow:null,allowFullScreen:$t,allowPaymentRequest:$t,allowUserMedia:$t,alt:null,as:null,async:$t,autoCapitalize:null,autoComplete:Ai,autoFocus:$t,autoPlay:$t,blocking:Ai,capture:$t,charSet:null,checked:$t,cite:null,className:Ai,cols:Fe,colSpan:null,content:null,contentEditable:br,controls:$t,controlsList:Ai,coords:Fe|md,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$t,defer:$t,dir:null,dirName:null,disabled:$t,download:v6,draggable:br,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$t,formTarget:null,headers:Ai,height:Fe,hidden:$t,high:Fe,href:null,hrefLang:null,htmlFor:Ai,httpEquiv:Ai,id:null,imageSizes:null,imageSrcSet:null,inert:$t,inputMode:null,integrity:null,is:null,isMap:$t,itemId:null,itemProp:Ai,itemRef:Ai,itemScope:$t,itemType:Ai,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$t,low:Fe,manifest:null,max:null,maxLength:Fe,media:null,method:null,min:null,minLength:Fe,multiple:$t,muted:$t,name:null,nonce:null,noModule:$t,noValidate:$t,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$t,optimum:Fe,pattern:null,ping:Ai,placeholder:null,playsInline:$t,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$t,referrerPolicy:null,rel:Ai,required:$t,reversed:$t,rows:Fe,rowSpan:Fe,sandbox:Ai,scope:null,scoped:$t,seamless:$t,selected:$t,shape:null,size:Fe,sizes:null,slot:null,span:Fe,spellCheck:br,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Fe,step:null,style:null,tabIndex:Fe,target:null,title:null,translate:null,type:null,typeMustMatch:$t,useMap:null,value:br,width:Fe,wrap:null,align:null,aLink:null,archive:Ai,axis:null,background:null,bgColor:null,border:Fe,borderColor:null,bottomMargin:Fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$t,declare:$t,event:null,face:null,frame:null,frameBorder:null,hSpace:Fe,leftMargin:Fe,link:null,longDesc:null,lowSrc:null,marginHeight:Fe,marginWidth:Fe,noResize:$t,noHref:$t,noShade:$t,noWrap:$t,object:null,profile:null,prompt:null,rev:null,rightMargin:Fe,rules:null,scheme:null,scrolling:br,standby:null,summary:null,text:null,topMargin:Fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$t,disableRemotePlayback:$t,prefix:null,property:null,results:Fe,security:null,unselectable:null}});var kW=ls({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Pw,properties:{about:po,accentHeight:Fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Fe,amplitude:Fe,arabicForm:null,ascent:Fe,attributeName:null,attributeType:null,azimuth:Fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Fe,by:null,calcMode:null,capHeight:Fe,className:Ai,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Fe,diffuseConstant:Fe,direction:null,display:null,dur:null,divisor:Fe,dominantBaseline:null,download:$t,dx:null,dy:null,edgeMode:null,editable:null,elevation:Fe,enableBackground:null,end:null,event:null,exponent:Fe,externalResourcesRequired:null,fill:null,fillOpacity:Fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:md,g2:md,glyphName:md,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Fe,horizOriginX:Fe,horizOriginY:Fe,id:null,ideographic:Fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Fe,k:Fe,k1:Fe,k2:Fe,k3:Fe,k4:Fe,kernelMatrix:po,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Fe,overlineThickness:Fe,paintOrder:null,panose1:null,path:null,pathLength:Fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ai,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Fe,pointsAtY:Fe,pointsAtZ:Fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:po,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:po,rev:po,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:po,requiredFeatures:po,requiredFonts:po,requiredFormats:po,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Fe,specularExponent:Fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Fe,strikethroughThickness:Fe,string:null,stroke:null,strokeDashArray:po,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Fe,strokeOpacity:Fe,strokeWidth:null,style:null,surfaceScale:Fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:po,tabIndex:Fe,tableValues:null,target:null,targetX:Fe,targetY:Fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:po,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Fe,underlineThickness:Fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Fe,values:null,vAlphabetic:Fe,vMathematical:Fe,vectorEffect:null,vHanging:Fe,vIdeographic:Fe,version:null,vertAdvY:Fe,vertOriginX:Fe,vertOriginY:Fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var Eue=/^data[-\w.:]+$/i,EW=/-[a-z]/g,Tue=/[A-Z]/g;function jl(i,e){let t=Ul(e),r=e,n=On;if(t in i.normal)return i.property[i.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Eue.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(EW,Lue);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!EW.test(o)){let s=o.replace(Tue,Iue);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}n=zu}return new n(r,e)}function Iue(i){return"-"+i.toLowerCase()}function Lue(i){return i.charAt(1).toUpperCase()}var Wl=b6([w6,y6,x6,C6,SW],"html"),cs=b6([w6,y6,x6,C6,kW],"svg");function S6(i){let e=[],t=String(i||""),r=t.indexOf(","),n=0,o=!1;for(;!o;){r===-1&&(r=t.length,o=!0);let s=t.slice(n,r).trim();(s||!o)&&e.push(s),n=r+1,r=t.indexOf(",",n)}return e}function Fw(i,e){let t=e||{};return(i[i.length-1]===""?[...i,""]:i).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var TW=/[#.]/g;function k6(i,e){let t=i||"",r={},n=0,o,s;for(;n<t.length;){TW.lastIndex=n;let a=TW.exec(t),l=t.slice(n,a?a.index:t.length);l&&(o?o==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,n+=l.length),a&&(o=a[0],n++)}return{type:"element",tagName:s||e||"div",properties:r,children:[]}}function E6(i){let e=String(i||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function zw(i){return i.join(" ").trim()}var Aue=new Set(["button","menu","reset","submit"]),T6={}.hasOwnProperty;function L6(i,e,t){let r=t&&Rue(t);function n(o,s,...a){let l=-1,c;if(o==null){c={type:"root",children:[]};let d=s;a.unshift(d)}else if(c=k6(o,e),c.tagName=c.tagName.toLowerCase(),r&&T6.call(r,c.tagName)&&(c.tagName=r[c.tagName]),Due(s,c.tagName)){let d;for(d in s)T6.call(s,d)&&Mue(i,c.properties,d,s[d])}else a.unshift(s);for(;++l<a.length;)I6(c.children,a[l]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return n}function Due(i,e){return i==null||typeof i!="object"||Array.isArray(i)?!1:e==="input"||!i.type||typeof i.type!="string"?!0:"children"in i&&Array.isArray(i.children)?!1:e==="button"?Aue.has(i.type.toLowerCase()):!("value"in i)}function Mue(i,e,t,r){let n=jl(i,t),o=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?n.spaceSeparated?s=E6(r):n.commaSeparated?s=S6(r):n.commaOrSpaceSeparated?s=E6(S6(r).join(" ")):s=IW(n,n.property,r):Array.isArray(r)?s=r.concat():s=n.property==="style"?Nue(r):String(r);if(Array.isArray(s)){let a=[];for(;++o<s.length;){let l=IW(n,n.property,s[o]);a[o]=l}s=a}if(n.property==="className"&&Array.isArray(e.className)){let a=s;s=e.className.concat(a)}e[n.property]=s}}function I6(i,e){let t=-1;if(e!=null)if(typeof e=="string"||typeof e=="number")i.push({type:"text",value:String(e)});else if(Array.isArray(e))for(;++t<e.length;)I6(i,e[t]);else if(typeof e=="object"&&"type"in e)e.type==="root"?I6(i,e.children):i.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function IW(i,e,t){if(typeof t=="string"){if(i.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((i.boolean||i.overloadedBoolean)&&(t===""||Ul(t)===Ul(e)))return!0}return t}function Nue(i){let e=[],t;for(t in i)T6.call(i,t)&&e.push([t,i[t]].join(": "));return e.join("; ")}function Rue(i){let e={},t=-1;for(;++t<i.length;)e[i[t].toLowerCase()]=i[t];return e}var LW=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var t0=L6(Wl,"div"),i0=L6(cs,"g",LW);var A6=/\r?\n|\r/g;function D6(i){let e=String(i),t=[];for(A6.lastIndex=0;A6.test(e);)t.push(A6.lastIndex);return t.push(e.length+1),{toPoint:r,toOffset:n};function r(o){let s=-1;if(typeof o=="number"&&o>-1&&o<t[t.length-1]){for(;++s<t.length;)if(t[s]>o)return{line:s+1,column:o-(s>0?t[s-1]:0)+1,offset:o}}}function n(o){let s=o&&o.line,a=o&&o.column;if(typeof s=="number"&&typeof a=="number"&&!Number.isNaN(s)&&!Number.isNaN(a)&&s-1 in t){let l=(t[s-2]||0)+a-1||0;if(l>-1&&l<t[t.length-1])return l}}}var mo={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/"};var DW={}.hasOwnProperty,Pue=Object.prototype;function r0(i,e){let t=e||{};return M6({file:t.file||void 0,location:!1,schema:t.space==="svg"?cs:Wl,verbose:t.verbose||!1},i)}function M6(i,e){let t;switch(e.nodeName){case"#comment":{let r=e;return t={type:"comment",value:r.data},Bw(i,r,t),t}case"#document":case"#document-fragment":{let r=e,n="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(t={type:"root",children:MW(i,e.childNodes),data:{quirksMode:n}},i.file&&i.location){let o=String(i.file),s=D6(o),a=s.toPoint(0),l=s.toPoint(o.length);t.position={start:a,end:l}}return t}case"#documentType":{let r=e;return t={type:"doctype"},Bw(i,r,t),t}case"#text":{let r=e;return t={type:"text",value:r.value},Bw(i,r,t),t}default:return t=Oue(i,e),t}}function MW(i,e){let t=-1,r=[];for(;++t<e.length;){let n=M6(i,e[t]);r.push(n)}return r}function Oue(i,e){let t=i.schema;i.schema=e.namespaceURI===mo.svg?cs:Wl;let r=-1,n={};for(;++r<e.attrs.length;){let a=e.attrs[r],l=(a.prefix?a.prefix+":":"")+a.name;DW.call(Pue,l)||(n[l]=a.value)}let s=(i.schema.space==="svg"?i0:t0)(e.tagName,n,MW(i,e.childNodes));if(Bw(i,e,s),s.tagName==="template"){let a=e,l=a.sourceCodeLocation,c=l&&l.startTag&&Gf(l.startTag),d=l&&l.endTag&&Gf(l.endTag),u=M6(i,a.content);c&&d&&i.file&&(u.position={start:c.end,end:d.start}),s.content=u}return i.schema=t,s}function Bw(i,e,t){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&i.file){let r=Fue(i,t,e.sourceCodeLocation);r&&(i.location=!0,t.position=r)}}function Fue(i,e,t){let r=Gf(t);if(e.type==="element"){let n=e.children[e.children.length-1];if(r&&!t.endTag&&n&&n.position&&n.position.end&&(r.end=Object.assign({},n.position.end)),i.verbose){let o={},s;if(t.attrs)for(s in t.attrs)DW.call(t.attrs,s)&&(o[jl(i.schema,s).property]=Gf(t.attrs[s]));t.startTag;let a=Gf(t.startTag),l=t.endTag?Gf(t.endTag):void 0,c={opening:a};l&&(c.closing=l),c.properties=o,e.data={position:c}}}return r}function Gf(i){let e=AW({line:i.startLine,column:i.startCol,offset:i.startOffset}),t=AW({line:i.endLine,column:i.endCol,offset:i.endOffset});return e||t?{start:e,end:t}:void 0}function AW(i){return i.line&&i.column?i:void 0}var zue={},Bue={}.hasOwnProperty,NW=Rf("type",{handlers:{root:Hue,element:que,text:Wue,comment:Vue,doctype:jue}});function N6(i,e){let r=(e||zue).space;return NW(i,r==="svg"?cs:Wl)}function Hue(i,e){let t={nodeName:"#document",mode:(i.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=R6(i.children,t,e),Yf(i,t),t}function Uue(i,e){let t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=R6(i.children,t,e),Yf(i,t),t}function jue(i){let e={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Yf(i,e),e}function Wue(i){let e={nodeName:"#text",value:i.value,parentNode:null};return Yf(i,e),e}function Vue(i){let e={nodeName:"#comment",data:i.value,parentNode:null};return Yf(i,e),e}function que(i,e){let t=e,r=t;i.type==="element"&&i.tagName.toLowerCase()==="svg"&&t.space==="html"&&(r=cs);let n=[],o;if(i.properties){for(o in i.properties)if(o!=="children"&&Bue.call(i.properties,o)){let l=Kue(r,o,i.properties[o]);l&&n.push(l)}}let s=r.space;let a={nodeName:i.tagName,tagName:i.tagName,attrs:n,namespaceURI:mo[s],childNodes:[],parentNode:null};return a.childNodes=R6(i.children,a,r),Yf(i,a),i.tagName==="template"&&i.content&&(a.content=Uue(i.content,r)),a}function Kue(i,e,t){let r=jl(i,e);if(t===!1||t===null||t===void 0||typeof t=="number"&&Number.isNaN(t)||!t&&r.boolean)return;Array.isArray(t)&&(t=r.commaSeparated?Fw(t):zw(t));let n={name:r.attribute,value:t===!0?"":String(t)};if(r.space&&r.space!=="html"&&r.space!=="svg"){let o=n.name.indexOf(":");o<0?n.prefix="":(n.name=n.name.slice(o+1),n.prefix=r.attribute.slice(0,o)),n.namespace=mo[r.space]}return n}function R6(i,e,t){let r=-1,n=[];if(i)for(;++r<i.length;){let o=NW(i[r],t);o.parentNode=e,n.push(o)}return n}function Yf(i,e){let t=i.position;t&&t.start&&t.end&&(t.start.offset,t.end.offset,e.sourceCodeLocation={startLine:t.start.line,startCol:t.start.column,startOffset:t.start.offset,endLine:t.end.line,endCol:t.end.column,endOffset:t.end.offset})}var Hw=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var $ue=new Set([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]),Gi="\uFFFD",z;(function(i){i[i.EOF=-1]="EOF",i[i.NULL=0]="NULL",i[i.TABULATION=9]="TABULATION",i[i.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",i[i.LINE_FEED=10]="LINE_FEED",i[i.FORM_FEED=12]="FORM_FEED",i[i.SPACE=32]="SPACE",i[i.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",i[i.QUOTATION_MARK=34]="QUOTATION_MARK",i[i.NUMBER_SIGN=35]="NUMBER_SIGN",i[i.AMPERSAND=38]="AMPERSAND",i[i.APOSTROPHE=39]="APOSTROPHE",i[i.HYPHEN_MINUS=45]="HYPHEN_MINUS",i[i.SOLIDUS=47]="SOLIDUS",i[i.DIGIT_0=48]="DIGIT_0",i[i.DIGIT_9=57]="DIGIT_9",i[i.SEMICOLON=59]="SEMICOLON",i[i.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",i[i.EQUALS_SIGN=61]="EQUALS_SIGN",i[i.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",i[i.QUESTION_MARK=63]="QUESTION_MARK",i[i.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",i[i.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",i[i.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",i[i.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",i[i.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",i[i.GRAVE_ACCENT=96]="GRAVE_ACCENT",i[i.LATIN_SMALL_A=97]="LATIN_SMALL_A",i[i.LATIN_SMALL_F=102]="LATIN_SMALL_F",i[i.LATIN_SMALL_X=120]="LATIN_SMALL_X",i[i.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",i[i.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(z=z||(z={}));var Jn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Uw(i){return i>=55296&&i<=57343}function RW(i){return i>=56320&&i<=57343}function PW(i,e){return(i-55296)*1024+9216+e}function jw(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159}function Ww(i){return i>=64976&&i<=65007||$ue.has(i)}var he;(function(i){i.controlCharacterInInputStream="control-character-in-input-stream",i.noncharacterInInputStream="noncharacter-in-input-stream",i.surrogateInInputStream="surrogate-in-input-stream",i.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",i.endTagWithAttributes="end-tag-with-attributes",i.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",i.unexpectedSolidusInTag="unexpected-solidus-in-tag",i.unexpectedNullCharacter="unexpected-null-character",i.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",i.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",i.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",i.missingEndTagName="missing-end-tag-name",i.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",i.unknownNamedCharacterReference="unknown-named-character-reference",i.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",i.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",i.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",i.eofBeforeTagName="eof-before-tag-name",i.eofInTag="eof-in-tag",i.missingAttributeValue="missing-attribute-value",i.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",i.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",i.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",i.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",i.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",i.missingDoctypePublicIdentifier="missing-doctype-public-identifier",i.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",i.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",i.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",i.cdataInHtmlContent="cdata-in-html-content",i.incorrectlyOpenedComment="incorrectly-opened-comment",i.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",i.eofInDoctype="eof-in-doctype",i.nestedComment="nested-comment",i.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",i.eofInComment="eof-in-comment",i.incorrectlyClosedComment="incorrectly-closed-comment",i.eofInCdata="eof-in-cdata",i.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",i.nullCharacterReference="null-character-reference",i.surrogateCharacterReference="surrogate-character-reference",i.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",i.controlCharacterReference="control-character-reference",i.noncharacterCharacterReference="noncharacter-character-reference",i.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",i.missingDoctypeName="missing-doctype-name",i.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",i.duplicateAttribute="duplicate-attribute",i.nonConformingDoctype="non-conforming-doctype",i.missingDoctype="missing-doctype",i.misplacedDoctype="misplaced-doctype",i.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",i.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",i.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",i.openElementsLeftAfterEof="open-elements-left-after-eof",i.abandonedHeadElementChild="abandoned-head-element-child",i.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",i.nestedNoscriptInHead="nested-noscript-in-head",i.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(he=he||(he={}));var Yue=65536,Vw=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Yue,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){let{line:t,col:r,offset:n}=this;return{code:e,startLine:t,endLine:t,startCol:r,endCol:r,startOffset:n,endOffset:n}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(RW(t))return this.pos++,this._addGap(),PW(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,z.EOF;return this._err(he.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,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.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;let r=this.html.charCodeAt(t);return r===z.CARRIAGE_RETURN?z.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;let e=this.html.charCodeAt(this.pos);return e===z.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,z.LINE_FEED):e===z.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Uw(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===z.LINE_FEED||e===z.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){jw(e)?this._err(he.controlCharacterInInputStream):Ww(e)&&this._err(he.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}};var Vl={};Gh(Vl,{TokenType:()=>ni,getTokenAttr:()=>n0});var ni;(function(i){i[i.CHARACTER=0]="CHARACTER",i[i.NULL_CHARACTER=1]="NULL_CHARACTER",i[i.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",i[i.START_TAG=3]="START_TAG",i[i.END_TAG=4]="END_TAG",i[i.COMMENT=5]="COMMENT",i[i.DOCTYPE=6]="DOCTYPE",i[i.EOF=7]="EOF",i[i.HIBERNATION=8]="HIBERNATION"})(ni=ni||(ni={}));function n0(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}var Oa=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(i=>i.charCodeAt(0)));var OW=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(i=>i.charCodeAt(0)));var P6,Xue=new Map([[0,65533],[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]]),O6=(P6=String.fromCodePoint)!==null&&P6!==void 0?P6:function(i){let e="";return i>65535&&(i-=65536,e+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),e+=String.fromCharCode(i),e};function F6(i){var e;return i>=55296&&i<=57343||i>1114111?65533:(e=Xue.get(i))!==null&&e!==void 0?e:i}var sn;(function(i){i[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z"})(sn||(sn={}));var Que=32,Fs;(function(i){i[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE"})(Fs||(Fs={}));function z6(i){return i>=sn.ZERO&&i<=sn.NINE}function Zue(i){return i>=sn.UPPER_A&&i<=sn.UPPER_F||i>=sn.LOWER_A&&i<=sn.LOWER_F}function Jue(i){return i>=sn.UPPER_A&&i<=sn.UPPER_Z||i>=sn.LOWER_A&&i<=sn.LOWER_Z||z6(i)}function ehe(i){return i===sn.EQUALS||Jue(i)}var on;(function(i){i[i.EntityStart=0]="EntityStart",i[i.NumericStart=1]="NumericStart",i[i.NumericDecimal=2]="NumericDecimal",i[i.NumericHex=3]="NumericHex",i[i.NamedEntity=4]="NamedEntity"})(on||(on={}));var Bu;(function(i){i[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute"})(Bu||(Bu={}));var B6=class{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=on.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bu.Strict}startEntity(e){this.decodeMode=e,this.state=on.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case on.EntityStart:return e.charCodeAt(t)===sn.NUM?(this.state=on.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=on.NamedEntity,this.stateNamedEntity(e,t));case on.NumericStart:return this.stateNumericStart(e,t);case on.NumericDecimal:return this.stateNumericDecimal(e,t);case on.NumericHex:return this.stateNumericHex(e,t);case on.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Que)===sn.LOWER_X?(this.state=on.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=on.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){let o=r-t;this.result=this.result*Math.pow(n,o)+parseInt(e.substr(t,o),n),this.consumed+=o}}stateNumericHex(e,t){let r=t;for(;t<e.length;){let n=e.charCodeAt(t);if(z6(n)||Zue(n))t+=1;else return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){let r=t;for(;t<e.length;){let n=e.charCodeAt(t);if(z6(n))t+=1;else return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(e,r,t,10),-1}emitNumericEntity(e,t){var r;if(this.consumed<=t)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===sn.SEMI)this.consumed+=1;else if(this.decodeMode===Bu.Strict)return 0;return this.emitCodePoint(F6(this.result),this.consumed),this.errors&&(e!==sn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:r}=this,n=r[this.treeIndex],o=(n&Fs.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let s=e.charCodeAt(t);if(this.treeIndex=H6(r,n,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===Bu.Attribute&&(o===0||ehe(s))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],o=(n&Fs.VALUE_LENGTH)>>14,o!==0){if(s===sn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Bu.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:r}=this,n=(r[t]&Fs.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){let{decodeTree:n}=this;return this.emitCodePoint(t===1?n[e]&~Fs.VALUE_LENGTH:n[e+1],r),t===3&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case on.NamedEntity:return this.result!==0&&(this.decodeMode!==Bu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case on.NumericDecimal:return this.emitNumericEntity(0,2);case on.NumericHex:return this.emitNumericEntity(0,3);case on.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case on.EntityStart:return 0}}};function FW(i){let e="",t=new B6(i,r=>e+=O6(r));return function(n,o){let s=0,a=0;for(;(a=n.indexOf("&",a))>=0;){e+=n.slice(s,a),t.startEntity(o);let c=t.write(n,a+1);if(c<0){s=a+t.end();break}s=a+c,a=c===0?s+1:s}let l=e+n.slice(s);return e="",l}}function H6(i,e,t,r){let n=(e&Fs.BRANCH_LENGTH)>>7,o=e&Fs.JUMP_TABLE;if(n===0)return o!==0&&r===o?t:-1;if(o){let l=r-o;return l<0||l>=n?-1:i[t+l]-1}let s=t,a=s+n-1;for(;s<=a;){let l=s+a>>>1,c=i[l];if(c<r)s=l+1;else if(c>r)a=l-1;else return i[l+n]}return-1}var WDe=FW(Oa),VDe=FW(OW);var Xf={};Gh(Xf,{ATTRS:()=>zs,DOCUMENT_MODE:()=>gn,NS:()=>_e,SPECIAL_ELEMENTS:()=>U6,TAG_ID:()=>v,TAG_NAMES:()=>re,getTagID:()=>gd,hasUnescapedText:()=>zW,isNumberedHeader:()=>o0});var _e;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.MATHML="http://www.w3.org/1998/Math/MathML",i.SVG="http://www.w3.org/2000/svg",i.XLINK="http://www.w3.org/1999/xlink",i.XML="http://www.w3.org/XML/1998/namespace",i.XMLNS="http://www.w3.org/2000/xmlns/"})(_e=_e||(_e={}));var zs;(function(i){i.TYPE="type",i.ACTION="action",i.ENCODING="encoding",i.PROMPT="prompt",i.NAME="name",i.COLOR="color",i.FACE="face",i.SIZE="size"})(zs=zs||(zs={}));var gn;(function(i){i.NO_QUIRKS="no-quirks",i.QUIRKS="quirks",i.LIMITED_QUIRKS="limited-quirks"})(gn=gn||(gn={}));var re;(function(i){i.A="a",i.ADDRESS="address",i.ANNOTATION_XML="annotation-xml",i.APPLET="applet",i.AREA="area",i.ARTICLE="article",i.ASIDE="aside",i.B="b",i.BASE="base",i.BASEFONT="basefont",i.BGSOUND="bgsound",i.BIG="big",i.BLOCKQUOTE="blockquote",i.BODY="body",i.BR="br",i.BUTTON="button",i.CAPTION="caption",i.CENTER="center",i.CODE="code",i.COL="col",i.COLGROUP="colgroup",i.DD="dd",i.DESC="desc",i.DETAILS="details",i.DIALOG="dialog",i.DIR="dir",i.DIV="div",i.DL="dl",i.DT="dt",i.EM="em",i.EMBED="embed",i.FIELDSET="fieldset",i.FIGCAPTION="figcaption",i.FIGURE="figure",i.FONT="font",i.FOOTER="footer",i.FOREIGN_OBJECT="foreignObject",i.FORM="form",i.FRAME="frame",i.FRAMESET="frameset",i.H1="h1",i.H2="h2",i.H3="h3",i.H4="h4",i.H5="h5",i.H6="h6",i.HEAD="head",i.HEADER="header",i.HGROUP="hgroup",i.HR="hr",i.HTML="html",i.I="i",i.IMG="img",i.IMAGE="image",i.INPUT="input",i.IFRAME="iframe",i.KEYGEN="keygen",i.LABEL="label",i.LI="li",i.LINK="link",i.LISTING="listing",i.MAIN="main",i.MALIGNMARK="malignmark",i.MARQUEE="marquee",i.MATH="math",i.MENU="menu",i.META="meta",i.MGLYPH="mglyph",i.MI="mi",i.MO="mo",i.MN="mn",i.MS="ms",i.MTEXT="mtext",i.NAV="nav",i.NOBR="nobr",i.NOFRAMES="noframes",i.NOEMBED="noembed",i.NOSCRIPT="noscript",i.OBJECT="object",i.OL="ol",i.OPTGROUP="optgroup",i.OPTION="option",i.P="p",i.PARAM="param",i.PLAINTEXT="plaintext",i.PRE="pre",i.RB="rb",i.RP="rp",i.RT="rt",i.RTC="rtc",i.RUBY="ruby",i.S="s",i.SCRIPT="script",i.SECTION="section",i.SELECT="select",i.SOURCE="source",i.SMALL="small",i.SPAN="span",i.STRIKE="strike",i.STRONG="strong",i.STYLE="style",i.SUB="sub",i.SUMMARY="summary",i.SUP="sup",i.TABLE="table",i.TBODY="tbody",i.TEMPLATE="template",i.TEXTAREA="textarea",i.TFOOT="tfoot",i.TD="td",i.TH="th",i.THEAD="thead",i.TITLE="title",i.TR="tr",i.TRACK="track",i.TT="tt",i.U="u",i.UL="ul",i.SVG="svg",i.VAR="var",i.WBR="wbr",i.XMP="xmp"})(re=re||(re={}));var v;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.A=1]="A",i[i.ADDRESS=2]="ADDRESS",i[i.ANNOTATION_XML=3]="ANNOTATION_XML",i[i.APPLET=4]="APPLET",i[i.AREA=5]="AREA",i[i.ARTICLE=6]="ARTICLE",i[i.ASIDE=7]="ASIDE",i[i.B=8]="B",i[i.BASE=9]="BASE",i[i.BASEFONT=10]="BASEFONT",i[i.BGSOUND=11]="BGSOUND",i[i.BIG=12]="BIG",i[i.BLOCKQUOTE=13]="BLOCKQUOTE",i[i.BODY=14]="BODY",i[i.BR=15]="BR",i[i.BUTTON=16]="BUTTON",i[i.CAPTION=17]="CAPTION",i[i.CENTER=18]="CENTER",i[i.CODE=19]="CODE",i[i.COL=20]="COL",i[i.COLGROUP=21]="COLGROUP",i[i.DD=22]="DD",i[i.DESC=23]="DESC",i[i.DETAILS=24]="DETAILS",i[i.DIALOG=25]="DIALOG",i[i.DIR=26]="DIR",i[i.DIV=27]="DIV",i[i.DL=28]="DL",i[i.DT=29]="DT",i[i.EM=30]="EM",i[i.EMBED=31]="EMBED",i[i.FIELDSET=32]="FIELDSET",i[i.FIGCAPTION=33]="FIGCAPTION",i[i.FIGURE=34]="FIGURE",i[i.FONT=35]="FONT",i[i.FOOTER=36]="FOOTER",i[i.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",i[i.FORM=38]="FORM",i[i.FRAME=39]="FRAME",i[i.FRAMESET=40]="FRAMESET",i[i.H1=41]="H1",i[i.H2=42]="H2",i[i.H3=43]="H3",i[i.H4=44]="H4",i[i.H5=45]="H5",i[i.H6=46]="H6",i[i.HEAD=47]="HEAD",i[i.HEADER=48]="HEADER",i[i.HGROUP=49]="HGROUP",i[i.HR=50]="HR",i[i.HTML=51]="HTML",i[i.I=52]="I",i[i.IMG=53]="IMG",i[i.IMAGE=54]="IMAGE",i[i.INPUT=55]="INPUT",i[i.IFRAME=56]="IFRAME",i[i.KEYGEN=57]="KEYGEN",i[i.LABEL=58]="LABEL",i[i.LI=59]="LI",i[i.LINK=60]="LINK",i[i.LISTING=61]="LISTING",i[i.MAIN=62]="MAIN",i[i.MALIGNMARK=63]="MALIGNMARK",i[i.MARQUEE=64]="MARQUEE",i[i.MATH=65]="MATH",i[i.MENU=66]="MENU",i[i.META=67]="META",i[i.MGLYPH=68]="MGLYPH",i[i.MI=69]="MI",i[i.MO=70]="MO",i[i.MN=71]="MN",i[i.MS=72]="MS",i[i.MTEXT=73]="MTEXT",i[i.NAV=74]="NAV",i[i.NOBR=75]="NOBR",i[i.NOFRAMES=76]="NOFRAMES",i[i.NOEMBED=77]="NOEMBED",i[i.NOSCRIPT=78]="NOSCRIPT",i[i.OBJECT=79]="OBJECT",i[i.OL=80]="OL",i[i.OPTGROUP=81]="OPTGROUP",i[i.OPTION=82]="OPTION",i[i.P=83]="P",i[i.PARAM=84]="PARAM",i[i.PLAINTEXT=85]="PLAINTEXT",i[i.PRE=86]="PRE",i[i.RB=87]="RB",i[i.RP=88]="RP",i[i.RT=89]="RT",i[i.RTC=90]="RTC",i[i.RUBY=91]="RUBY",i[i.S=92]="S",i[i.SCRIPT=93]="SCRIPT",i[i.SECTION=94]="SECTION",i[i.SELECT=95]="SELECT",i[i.SOURCE=96]="SOURCE",i[i.SMALL=97]="SMALL",i[i.SPAN=98]="SPAN",i[i.STRIKE=99]="STRIKE",i[i.STRONG=100]="STRONG",i[i.STYLE=101]="STYLE",i[i.SUB=102]="SUB",i[i.SUMMARY=103]="SUMMARY",i[i.SUP=104]="SUP",i[i.TABLE=105]="TABLE",i[i.TBODY=106]="TBODY",i[i.TEMPLATE=107]="TEMPLATE",i[i.TEXTAREA=108]="TEXTAREA",i[i.TFOOT=109]="TFOOT",i[i.TD=110]="TD",i[i.TH=111]="TH",i[i.THEAD=112]="THEAD",i[i.TITLE=113]="TITLE",i[i.TR=114]="TR",i[i.TRACK=115]="TRACK",i[i.TT=116]="TT",i[i.U=117]="U",i[i.UL=118]="UL",i[i.SVG=119]="SVG",i[i.VAR=120]="VAR",i[i.WBR=121]="WBR",i[i.XMP=122]="XMP"})(v=v||(v={}));var the=new Map([[re.A,v.A],[re.ADDRESS,v.ADDRESS],[re.ANNOTATION_XML,v.ANNOTATION_XML],[re.APPLET,v.APPLET],[re.AREA,v.AREA],[re.ARTICLE,v.ARTICLE],[re.ASIDE,v.ASIDE],[re.B,v.B],[re.BASE,v.BASE],[re.BASEFONT,v.BASEFONT],[re.BGSOUND,v.BGSOUND],[re.BIG,v.BIG],[re.BLOCKQUOTE,v.BLOCKQUOTE],[re.BODY,v.BODY],[re.BR,v.BR],[re.BUTTON,v.BUTTON],[re.CAPTION,v.CAPTION],[re.CENTER,v.CENTER],[re.CODE,v.CODE],[re.COL,v.COL],[re.COLGROUP,v.COLGROUP],[re.DD,v.DD],[re.DESC,v.DESC],[re.DETAILS,v.DETAILS],[re.DIALOG,v.DIALOG],[re.DIR,v.DIR],[re.DIV,v.DIV],[re.DL,v.DL],[re.DT,v.DT],[re.EM,v.EM],[re.EMBED,v.EMBED],[re.FIELDSET,v.FIELDSET],[re.FIGCAPTION,v.FIGCAPTION],[re.FIGURE,v.FIGURE],[re.FONT,v.FONT],[re.FOOTER,v.FOOTER],[re.FOREIGN_OBJECT,v.FOREIGN_OBJECT],[re.FORM,v.FORM],[re.FRAME,v.FRAME],[re.FRAMESET,v.FRAMESET],[re.H1,v.H1],[re.H2,v.H2],[re.H3,v.H3],[re.H4,v.H4],[re.H5,v.H5],[re.H6,v.H6],[re.HEAD,v.HEAD],[re.HEADER,v.HEADER],[re.HGROUP,v.HGROUP],[re.HR,v.HR],[re.HTML,v.HTML],[re.I,v.I],[re.IMG,v.IMG],[re.IMAGE,v.IMAGE],[re.INPUT,v.INPUT],[re.IFRAME,v.IFRAME],[re.KEYGEN,v.KEYGEN],[re.LABEL,v.LABEL],[re.LI,v.LI],[re.LINK,v.LINK],[re.LISTING,v.LISTING],[re.MAIN,v.MAIN],[re.MALIGNMARK,v.MALIGNMARK],[re.MARQUEE,v.MARQUEE],[re.MATH,v.MATH],[re.MENU,v.MENU],[re.META,v.META],[re.MGLYPH,v.MGLYPH],[re.MI,v.MI],[re.MO,v.MO],[re.MN,v.MN],[re.MS,v.MS],[re.MTEXT,v.MTEXT],[re.NAV,v.NAV],[re.NOBR,v.NOBR],[re.NOFRAMES,v.NOFRAMES],[re.NOEMBED,v.NOEMBED],[re.NOSCRIPT,v.NOSCRIPT],[re.OBJECT,v.OBJECT],[re.OL,v.OL],[re.OPTGROUP,v.OPTGROUP],[re.OPTION,v.OPTION],[re.P,v.P],[re.PARAM,v.PARAM],[re.PLAINTEXT,v.PLAINTEXT],[re.PRE,v.PRE],[re.RB,v.RB],[re.RP,v.RP],[re.RT,v.RT],[re.RTC,v.RTC],[re.RUBY,v.RUBY],[re.S,v.S],[re.SCRIPT,v.SCRIPT],[re.SECTION,v.SECTION],[re.SELECT,v.SELECT],[re.SOURCE,v.SOURCE],[re.SMALL,v.SMALL],[re.SPAN,v.SPAN],[re.STRIKE,v.STRIKE],[re.STRONG,v.STRONG],[re.STYLE,v.STYLE],[re.SUB,v.SUB],[re.SUMMARY,v.SUMMARY],[re.SUP,v.SUP],[re.TABLE,v.TABLE],[re.TBODY,v.TBODY],[re.TEMPLATE,v.TEMPLATE],[re.TEXTAREA,v.TEXTAREA],[re.TFOOT,v.TFOOT],[re.TD,v.TD],[re.TH,v.TH],[re.THEAD,v.THEAD],[re.TITLE,v.TITLE],[re.TR,v.TR],[re.TRACK,v.TRACK],[re.TT,v.TT],[re.U,v.U],[re.UL,v.UL],[re.SVG,v.SVG],[re.VAR,v.VAR],[re.WBR,v.WBR],[re.XMP,v.XMP]]);function gd(i){var e;return(e=the.get(i))!==null&&e!==void 0?e:v.UNKNOWN}var Re=v,U6={[_e.HTML]:new Set([Re.ADDRESS,Re.APPLET,Re.AREA,Re.ARTICLE,Re.ASIDE,Re.BASE,Re.BASEFONT,Re.BGSOUND,Re.BLOCKQUOTE,Re.BODY,Re.BR,Re.BUTTON,Re.CAPTION,Re.CENTER,Re.COL,Re.COLGROUP,Re.DD,Re.DETAILS,Re.DIR,Re.DIV,Re.DL,Re.DT,Re.EMBED,Re.FIELDSET,Re.FIGCAPTION,Re.FIGURE,Re.FOOTER,Re.FORM,Re.FRAME,Re.FRAMESET,Re.H1,Re.H2,Re.H3,Re.H4,Re.H5,Re.H6,Re.HEAD,Re.HEADER,Re.HGROUP,Re.HR,Re.HTML,Re.IFRAME,Re.IMG,Re.INPUT,Re.LI,Re.LINK,Re.LISTING,Re.MAIN,Re.MARQUEE,Re.MENU,Re.META,Re.NAV,Re.NOEMBED,Re.NOFRAMES,Re.NOSCRIPT,Re.OBJECT,Re.OL,Re.P,Re.PARAM,Re.PLAINTEXT,Re.PRE,Re.SCRIPT,Re.SECTION,Re.SELECT,Re.SOURCE,Re.STYLE,Re.SUMMARY,Re.TABLE,Re.TBODY,Re.TD,Re.TEMPLATE,Re.TEXTAREA,Re.TFOOT,Re.TH,Re.THEAD,Re.TITLE,Re.TR,Re.TRACK,Re.UL,Re.WBR,Re.XMP]),[_e.MATHML]:new Set([Re.MI,Re.MO,Re.MN,Re.MS,Re.MTEXT,Re.ANNOTATION_XML]),[_e.SVG]:new Set([Re.TITLE,Re.FOREIGN_OBJECT,Re.DESC]),[_e.XLINK]:new Set,[_e.XML]:new Set,[_e.XMLNS]:new Set};function o0(i){return i===Re.H1||i===Re.H2||i===Re.H3||i===Re.H4||i===Re.H5||i===Re.H6}var ihe=new Set([re.STYLE,re.SCRIPT,re.XMP,re.IFRAME,re.NOEMBED,re.NOFRAMES,re.PLAINTEXT]);function zW(i,e){return ihe.has(i)||e&&i===re.NOSCRIPT}var rhe=new Map([[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]]),j;(function(i){i[i.DATA=0]="DATA",i[i.RCDATA=1]="RCDATA",i[i.RAWTEXT=2]="RAWTEXT",i[i.SCRIPT_DATA=3]="SCRIPT_DATA",i[i.PLAINTEXT=4]="PLAINTEXT",i[i.TAG_OPEN=5]="TAG_OPEN",i[i.END_TAG_OPEN=6]="END_TAG_OPEN",i[i.TAG_NAME=7]="TAG_NAME",i[i.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",i[i.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",i[i.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",i[i.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",i[i.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",i[i.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",i[i.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",i[i.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",i[i.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",i[i.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",i[i.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",i[i.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",i[i.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",i[i.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",i[i.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",i[i.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",i[i.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",i[i.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",i[i.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",i[i.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",i[i.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",i[i.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",i[i.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",i[i.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",i[i.BOGUS_COMMENT=40]="BOGUS_COMMENT",i[i.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",i[i.COMMENT_START=42]="COMMENT_START",i[i.COMMENT_START_DASH=43]="COMMENT_START_DASH",i[i.COMMENT=44]="COMMENT",i[i.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",i[i.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",i[i.COMMENT_END_DASH=49]="COMMENT_END_DASH",i[i.COMMENT_END=50]="COMMENT_END",i[i.COMMENT_END_BANG=51]="COMMENT_END_BANG",i[i.DOCTYPE=52]="DOCTYPE",i[i.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",i[i.DOCTYPE_NAME=54]="DOCTYPE_NAME",i[i.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",i[i.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",i[i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",i[i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",i[i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",i[i.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",i[i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",i[i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",i[i.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",i[i.CDATA_SECTION=68]="CDATA_SECTION",i[i.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",i[i.CDATA_SECTION_END=70]="CDATA_SECTION_END",i[i.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",i[i.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",i[i.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",i[i.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",i[i.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",i[i.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",i[i.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",i[i.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(j||(j={}));var ir={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function a0(i){return i>=z.DIGIT_0&&i<=z.DIGIT_9}function s0(i){return i>=z.LATIN_CAPITAL_A&&i<=z.LATIN_CAPITAL_Z}function nhe(i){return i>=z.LATIN_SMALL_A&&i<=z.LATIN_SMALL_Z}function bd(i){return nhe(i)||s0(i)}function j6(i){return bd(i)||a0(i)}function HW(i){return i>=z.LATIN_CAPITAL_A&&i<=z.LATIN_CAPITAL_F}function UW(i){return i>=z.LATIN_SMALL_A&&i<=z.LATIN_SMALL_F}function ohe(i){return a0(i)||HW(i)||UW(i)}function qw(i){return i+32}function jW(i){return i===z.SPACE||i===z.LINE_FEED||i===z.TABULATION||i===z.FORM_FEED}function she(i){return i===z.EQUALS_SIGN||j6(i)}function BW(i){return jW(i)||i===z.SOLIDUS||i===z.GREATER_THAN_SIGN}var l0=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Vw(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,r;(r=(t=this.handler).onParseError)===null||r===void 0||r.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ni.START_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ni.END_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ni.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ni.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let r=this.currentToken;if(n0(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){let n=(e=(t=r.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(he.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=gd(e.tagName),e.type===ni.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(he.endTagWithAttributes),e.selfClosing&&this._err(he.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ni.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ni.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ni.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ni.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=t;return}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=jW(e)?ni.WHITESPACE_CHARACTER:e===z.NULL?ni.NULL_CHARACTER:ni.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ni.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,r=0,n=!1;for(let o=0,s=Oa[0];o>=0&&(o=H6(Oa,s,o+1,e),!(o<0));e=this._consume()){r+=1,s=Oa[o];let a=s&Fs.VALUE_LENGTH;if(a){let l=(a>>14)-1;if(e!==z.SEMICOLON&&this._isCharacterReferenceInAttribute()&&she(this.preprocessor.peek(1))?(t=[z.AMPERSAND],o+=l):(t=l===0?[Oa[o]&~Fs.VALUE_LENGTH]:l===1?[Oa[++o]]:[Oa[++o],Oa[++o]],r=0,n=e!==z.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(r),n&&!this.preprocessor.endOfChunkHit&&this._err(he.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case j.DATA:{this._stateData(e);break}case j.RCDATA:{this._stateRcdata(e);break}case j.RAWTEXT:{this._stateRawtext(e);break}case j.SCRIPT_DATA:{this._stateScriptData(e);break}case j.PLAINTEXT:{this._statePlaintext(e);break}case j.TAG_OPEN:{this._stateTagOpen(e);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case j.TAG_NAME:{this._stateTagName(e);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case j.BOGUS_COMMENT:{this._stateBogusComment(e);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case j.COMMENT_START:{this._stateCommentStart(e);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case j.COMMENT:{this._stateComment(e);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case j.COMMENT_END:{this._stateCommentEnd(e);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case j.DOCTYPE:{this._stateDoctype(e);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case j.CDATA_SECTION:{this._stateCdataSection(e);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case j.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case j.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case j.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case j.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case j.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case j.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case z.AMPERSAND:{this.returnState=j.DATA,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitCodePoint(e);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case z.AMPERSAND:{this.returnState=j.RCDATA,this.state=j.CHARACTER_REFERENCE;break}case z.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(bd(e))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(e);else switch(e){case z.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case z.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case z.QUESTION_MARK:{this._err(he.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e);break}case z.EOF:{this._err(he.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(bd(e))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(e);else switch(e){case z.GREATER_THAN_SIGN:{this._err(he.missingEndTagName),this.state=j.DATA;break}case z.EOF:{this._err(he.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.tagName+=Gi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:t.tagName+=String.fromCodePoint(s0(e)?qw(e):e)}}_stateRcdataLessThanSign(e){e===z.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){bd(e)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case z.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case z.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===z.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){bd(e)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case z.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case z.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){bd(e)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===z.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===z.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===z.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:bd(e)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){bd(e)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Jn.SCRIPT,!1)&&BW(this.preprocessor.peek(Jn.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Jn.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===z.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Jn.SCRIPT,!1)&&BW(this.preprocessor.peek(Jn.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Jn.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case z.EQUALS_SIGN:{this._err(he.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case z.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:{this._err(he.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.name+=Gi;break}default:this.currentAttr.name+=String.fromCodePoint(s0(e)?qw(e):e)}}_stateAfterAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case z.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Gi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case z.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Gi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_UNQUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Gi;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:case z.EQUALS_SIGN:case z.GRAVE_ACCENT:{this._err(he.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._err(he.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case z.GREATER_THAN_SIGN:{let t=this.currentToken;t.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._err(he.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this.emitCurrentComment(t),this._emitEOFToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.data+=Gi;break}default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Jn.DASH_DASH,!0)?(this._createCommentToken(Jn.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(Jn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Jn.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(Jn.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(he.cdataInHtmlContent),this._createCommentToken(Jn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(he.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptClosingOfEmptyComment),this.state=j.DATA;let t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=j.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=j.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case z.LESS_THAN_SIGN:{t.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.data+=Gi;break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case z.EXCLAMATION_MARK:{t.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case z.LESS_THAN_SIGN:{t.data+="<";break}default:this.state=j.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===z.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===z.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==z.GREATER_THAN_SIGN&&e!==z.EOF&&this._err(he.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=j.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(t);break}case z.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case z.HYPHEN_MINUS:{t.data+="-";break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--",this.state=j.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{t.data+="--!",this.state=j.COMMENT_END_DASH;break}case z.GREATER_THAN_SIGN:{this._err(he.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--!",this.state=j.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case z.EOF:{this._err(he.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(s0(e))this._createDoctypeToken(String.fromCharCode(qw(e))),this.state=j.DOCTYPE_NAME;else switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.NULL:{this._err(he.unexpectedNullCharacter),this._createDoctypeToken(Gi),this.state=j.DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeName),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.name+=Gi;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.name+=String.fromCodePoint(s0(e)?qw(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Jn.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Jn.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(he.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.publicId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case z.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.publicId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.QUOTATION_MARK:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.systemId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case z.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.systemId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.NULL:{this._err(he.unexpectedNullCharacter);break}case z.EOF:{this.emitCurrentDoctype(t),this._emitEOFToken();break}default:}}_stateCdataSection(e){switch(e){case z.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case z.EOF:{this._err(he.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===z.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA;break}case z.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===z.NUMBER_SIGN?this.state=j.NUMERIC_CHARACTER_REFERENCE:j6(e)?(this.state=j.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){let t=this._matchNamedCharacterReference(e);if(!this._ensureHibernation())if(t){for(let r=0;r<t.length;r++)this._flushCodePointConsumedAsCharacterReference(t[r]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this.state=j.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){j6(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===z.SEMICOLON&&this._err(he.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===z.LATIN_SMALL_X||e===z.LATIN_CAPITAL_X?this.state=j.HEXADEMICAL_CHARACTER_REFERENCE_START:a0(e)?(this.state=j.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(he.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(z.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){ohe(e)?(this.state=j.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e)):(this._err(he.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(z.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState)}_stateHexademicalCharacterReference(e){HW(e)?this.charRefCode=this.charRefCode*16+e-55:UW(e)?this.charRefCode=this.charRefCode*16+e-87:a0(e)?this.charRefCode=this.charRefCode*16+e-48:e===z.SEMICOLON?this.state=j.NUMERIC_CHARACTER_REFERENCE_END:(this._err(he.missingSemicolonAfterCharacterReference),this.state=j.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){a0(e)?this.charRefCode=this.charRefCode*10+e-48:e===z.SEMICOLON?this.state=j.NUMERIC_CHARACTER_REFERENCE_END:(this._err(he.missingSemicolonAfterCharacterReference),this.state=j.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===z.NULL)this._err(he.nullCharacterReference),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(he.characterReferenceOutsideUnicodeRange),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(Uw(this.charRefCode))this._err(he.surrogateCharacterReference),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(Ww(this.charRefCode))this._err(he.noncharacterCharacterReference);else if(jw(this.charRefCode)||this.charRefCode===z.CARRIAGE_RETURN){this._err(he.controlCharacterReference);let t=rhe.get(this.charRefCode);t!==void 0&&(this.charRefCode=t)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}};var VW=new Set([v.DD,v.DT,v.LI,v.OPTGROUP,v.OPTION,v.P,v.RB,v.RP,v.RT,v.RTC]),WW=new Set([...VW,v.CAPTION,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]),Kw=new Map([[v.APPLET,_e.HTML],[v.CAPTION,_e.HTML],[v.HTML,_e.HTML],[v.MARQUEE,_e.HTML],[v.OBJECT,_e.HTML],[v.TABLE,_e.HTML],[v.TD,_e.HTML],[v.TEMPLATE,_e.HTML],[v.TH,_e.HTML],[v.ANNOTATION_XML,_e.MATHML],[v.MI,_e.MATHML],[v.MN,_e.MATHML],[v.MO,_e.MATHML],[v.MS,_e.MATHML],[v.MTEXT,_e.MATHML],[v.DESC,_e.SVG],[v.FOREIGN_OBJECT,_e.SVG],[v.TITLE,_e.SVG]]),ahe=[v.H1,v.H2,v.H3,v.H4,v.H5,v.H6],lhe=[v.TR,v.TEMPLATE,v.HTML],che=[v.TBODY,v.TFOOT,v.THEAD,v.TEMPLATE,v.HTML],dhe=[v.TABLE,v.TEMPLATE,v.HTML],uhe=[v.TD,v.TH],$w=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=v.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===v.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===_e.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){let n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==_e.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(t<0?0:t)}popUntilPopped(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ahe,_e.HTML)}popUntilTableCellPopped(){this.popUntilPopped(uhe,_e.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let r=this.stackTop;r>=0;r--)if(e.includes(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(dhe,_e.HTML)}clearBackToTableBodyContext(){this.clearBackTo(che,_e.HTML)}clearBackToTableRowContext(){this.clearBackTo(lhe,_e.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===v.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===v.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===_e.HTML)return!0;if(Kw.get(r)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e],r=this.treeAdapter.getNamespaceURI(this.items[e]);if(o0(t)&&r===_e.HTML)return!0;if(Kw.get(t)===r)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===_e.HTML)return!0;if((r===v.UL||r===v.OL)&&n===_e.HTML||Kw.get(r)===n)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===_e.HTML)return!0;if(r===v.BUTTON&&n===_e.HTML||Kw.get(r)===n)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===_e.HTML){if(r===e)return!0;if(r===v.TABLE||r===v.TEMPLATE||r===v.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===_e.HTML){if(t===v.TBODY||t===v.THEAD||t===v.TFOOT)return!0;if(t===v.TABLE||t===v.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===_e.HTML){if(r===e)return!0;if(r!==v.OPTION&&r!==v.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;VW.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;WW.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&WW.has(this.currentTagId);)this.pop()}};var ds;(function(i){i[i.Marker=0]="Marker",i[i.Element=1]="Element"})(ds=ds||(ds={}));var qW={type:ds.Marker},Gw=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let r=[],n=t.length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a<this.entries.length;a++){let l=this.entries[a];if(l.type===ds.Marker)break;let{element:c}=l;if(this.treeAdapter.getTagName(c)===o&&this.treeAdapter.getNamespaceURI(c)===s){let d=this.treeAdapter.getAttrList(c);d.length===n&&r.push({idx:a,attrs:d})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,t);if(r.length<3)return;let n=new Map(t.map(s=>[s.name,s.value])),o=0;for(let s=0;s<r.length;s++){let a=r[s];a.attrs.every(l=>n.get(l.name)===l.value)&&(o+=1,o>=3&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(qW)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:ds.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ds.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(qW);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){let t=this.entries.find(r=>r.type===ds.Marker||this.treeAdapter.getTagName(r.element)===e);return t&&t.type===ds.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===ds.Element&&t.element===e)}};function KW(i){return{nodeName:"#text",value:i,parentNode:null}}var ql={createDocument(){return{nodeName:"#document",mode:gn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(i){return{nodeName:"#comment",data:i,parentNode:null}},appendChild(i,e){i.childNodes.push(e),e.parentNode=i},insertBefore(i,e,t){let r=i.childNodes.indexOf(t);i.childNodes.splice(r,0,e),e.parentNode=i},setTemplateContent(i,e){i.content=e},getTemplateContent(i){return i.content},setDocumentType(i,e,t,r){let n=i.childNodes.find(o=>o.nodeName==="#documentType");if(n)n.name=e,n.publicId=t,n.systemId=r;else{let o={nodeName:"#documentType",name:e,publicId:t,systemId:r,parentNode:null};ql.appendChild(i,o)}},setDocumentMode(i,e){i.mode=e},getDocumentMode(i){return i.mode},detachNode(i){if(i.parentNode){let e=i.parentNode.childNodes.indexOf(i);i.parentNode.childNodes.splice(e,1),i.parentNode=null}},insertText(i,e){if(i.childNodes.length>0){let t=i.childNodes[i.childNodes.length-1];if(ql.isTextNode(t)){t.value+=e;return}}ql.appendChild(i,KW(e))},insertTextBefore(i,e,t){let r=i.childNodes[i.childNodes.indexOf(t)-1];r&&ql.isTextNode(r)?r.value+=e:ql.insertBefore(i,KW(e),t)},adoptAttributes(i,e){let t=new Set(i.attrs.map(r=>r.name));for(let r=0;r<e.length;r++)t.has(e[r].name)||i.attrs.push(e[r])},getFirstChild(i){return i.childNodes[0]},getChildNodes(i){return i.childNodes},getParentNode(i){return i.parentNode},getAttrList(i){return i.attrs},getTagName(i){return i.tagName},getNamespaceURI(i){return i.namespaceURI},getTextNodeContent(i){return i.value},getCommentNodeContent(i){return i.data},getDocumentTypeNodeName(i){return i.name},getDocumentTypeNodePublicId(i){return i.publicId},getDocumentTypeNodeSystemId(i){return i.systemId},isTextNode(i){return i.nodeName==="#text"},isCommentNode(i){return i.nodeName==="#comment"},isDocumentTypeNode(i){return i.nodeName==="#documentType"},isElementNode(i){return Object.prototype.hasOwnProperty.call(i,"tagName")},setNodeSourceCodeLocation(i,e){i.sourceCodeLocation=e},getNodeSourceCodeLocation(i){return i.sourceCodeLocation},updateNodeSourceCodeLocation(i,e){i.sourceCodeLocation=ue(ue({},i.sourceCodeLocation),e)}};var GW="html",hhe="about:legacy-compat",fhe="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",YW=["+//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//"],phe=[...YW,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],mhe=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),XW=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ghe=[...XW,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function $W(i,e){return e.some(t=>i.startsWith(t))}function QW(i){return i.name===GW&&i.publicId===null&&(i.systemId===null||i.systemId===hhe)}function ZW(i){if(i.name!==GW)return gn.QUIRKS;let{systemId:e}=i;if(e&&e.toLowerCase()===fhe)return gn.QUIRKS;let{publicId:t}=i;if(t!==null){if(t=t.toLowerCase(),mhe.has(t))return gn.QUIRKS;let r=e===null?phe:YW;if($W(t,r))return gn.QUIRKS;if(r=e===null?XW:ghe,$W(t,r))return gn.LIMITED_QUIRKS}return gn.NO_QUIRKS}var Qw={};Gh(Qw,{SVG_TAG_NAMES_ADJUSTMENT_MAP:()=>eV,adjustTokenMathMLAttrs:()=>Yw,adjustTokenSVGAttrs:()=>Xw,adjustTokenSVGTagName:()=>V6,adjustTokenXMLAttrs:()=>c0,causesExit:()=>W6,isIntegrationPoint:()=>q6});var JW={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},vhe="definitionurl",_he="definitionURL",yhe=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(i=>[i.toLowerCase(),i])),whe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:_e.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:_e.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:_e.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:_e.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:_e.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:_e.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:_e.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:_e.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:_e.XML}],["xml:space",{prefix:"xml",name:"space",namespace:_e.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:_e.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:_e.XMLNS}]]),eV=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(i=>[i.toLowerCase(),i])),xhe=new Set([v.B,v.BIG,v.BLOCKQUOTE,v.BODY,v.BR,v.CENTER,v.CODE,v.DD,v.DIV,v.DL,v.DT,v.EM,v.EMBED,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HR,v.I,v.IMG,v.LI,v.LISTING,v.MENU,v.META,v.NOBR,v.OL,v.P,v.PRE,v.RUBY,v.S,v.SMALL,v.SPAN,v.STRONG,v.STRIKE,v.SUB,v.SUP,v.TABLE,v.TT,v.U,v.UL,v.VAR]);function W6(i){let e=i.tagID;return e===v.FONT&&i.attrs.some(({name:r})=>r===zs.COLOR||r===zs.SIZE||r===zs.FACE)||xhe.has(e)}function Yw(i){for(let e=0;e<i.attrs.length;e++)if(i.attrs[e].name===vhe){i.attrs[e].name=_he;break}}function Xw(i){for(let e=0;e<i.attrs.length;e++){let t=yhe.get(i.attrs[e].name);t!=null&&(i.attrs[e].name=t)}}function c0(i){for(let e=0;e<i.attrs.length;e++){let t=whe.get(i.attrs[e].name);t&&(i.attrs[e].prefix=t.prefix,i.attrs[e].name=t.name,i.attrs[e].namespace=t.namespace)}}function V6(i){let e=eV.get(i.tagName);e!=null&&(i.tagName=e,i.tagID=gd(i.tagName))}function Che(i,e){return e===_e.MATHML&&(i===v.MI||i===v.MO||i===v.MN||i===v.MS||i===v.MTEXT)}function She(i,e,t){if(e===_e.MATHML&&i===v.ANNOTATION_XML){for(let r=0;r<t.length;r++)if(t[r].name===zs.ENCODING){let n=t[r].value.toLowerCase();return n===JW.TEXT_HTML||n===JW.APPLICATION_XML}}return e===_e.SVG&&(i===v.FOREIGN_OBJECT||i===v.DESC||i===v.TITLE)}function q6(i,e,t,r){return(!r||r===_e.HTML)&&She(i,e,t)||(!r||r===_e.MATHML)&&Che(i,e)}var khe="hidden",Ehe=8,The=3,$;(function(i){i[i.INITIAL=0]="INITIAL",i[i.BEFORE_HTML=1]="BEFORE_HTML",i[i.BEFORE_HEAD=2]="BEFORE_HEAD",i[i.IN_HEAD=3]="IN_HEAD",i[i.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",i[i.AFTER_HEAD=5]="AFTER_HEAD",i[i.IN_BODY=6]="IN_BODY",i[i.TEXT=7]="TEXT",i[i.IN_TABLE=8]="IN_TABLE",i[i.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",i[i.IN_CAPTION=10]="IN_CAPTION",i[i.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",i[i.IN_TABLE_BODY=12]="IN_TABLE_BODY",i[i.IN_ROW=13]="IN_ROW",i[i.IN_CELL=14]="IN_CELL",i[i.IN_SELECT=15]="IN_SELECT",i[i.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",i[i.IN_TEMPLATE=17]="IN_TEMPLATE",i[i.AFTER_BODY=18]="AFTER_BODY",i[i.IN_FRAMESET=19]="IN_FRAMESET",i[i.AFTER_FRAMESET=20]="AFTER_FRAMESET",i[i.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",i[i.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})($||($={}));var Ihe={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},nV=new Set([v.TABLE,v.TBODY,v.TFOOT,v.THEAD,v.TR]),tV={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ql,onParseError:null},Kl=class{constructor(e,t,r=null,n=null){this.fragmentContext=r,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=ue(ue({},tV),e),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t!=null?t:this.treeAdapter.createDocument(),this.tokenizer=new l0(this.options,this),this.activeFormattingElements=new Gw(this.treeAdapter),this.fragmentContextID=r?gd(this.treeAdapter.getTagName(r)):v.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new $w(this.document,this.treeAdapter,this)}static parse(e,t){let r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){let r=ue(ue({},tV),t);e!=null||(e=r.treeAdapter.createElement(re.TEMPLATE,_e.HTML,[]));let n=r.treeAdapter.createElement("documentmock",_e.HTML,[]),o=new this(r,n,e);return o.fragmentContextID===v.TEMPLATE&&o.tmplInsertionModeStack.unshift($.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var n;if(!this.onParseError)return;let o=(n=e.location)!==null&&n!==void 0?n:Ihe,s={code:t,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(s)}onItemPush(e,t,r){var n,o;(o=(n=this.treeAdapter).onItemPush)===null||o===void 0||o.call(n,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(n=(r=this.treeAdapter).onItemPop)===null||n===void 0||n.call(r,e,this.openElements.current),t){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(e,t){let r=e===this.document||this.treeAdapter.getNamespaceURI(e)===_e.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,_e.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=ir.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===re.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==_e.HTML))switch(this.fragmentContextID){case v.TITLE:case v.TEXTAREA:{this.tokenizer.state=ir.RCDATA;break}case v.STYLE:case v.XMP:case v.IFRAME:case v.NOEMBED:case v.NOFRAMES:case v.NOSCRIPT:{this.tokenizer.state=ir.RAWTEXT;break}case v.SCRIPT:{this.tokenizer.state=ir.SCRIPT_DATA;break}case v.PLAINTEXT:{this.tokenizer.state=ir.PLAINTEXT;break}default:}}_setDocumentType(e){let t=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,n),e.location){let s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let r=t&&xt(ue({},t),{startTag:t});this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,e)}}_appendElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){let r=this.treeAdapter.createElement(e,_e.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,_e.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(re.HTML,_e.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,v.HTML)}_appendCommentNode(e,t){let r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let n=this.treeAdapter.getChildNodes(t),o=r?n.lastIndexOf(r):n.length,s=n[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){let{endLine:l,endCol:c,endOffset:d}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,n=this.treeAdapter.getTagName(e),o=t.type===ni.END_TAG&&n===t.tagName?{endTag:ue({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):{current:t,currentTagId:r}=this.openElements,e.tagID===v.SVG&&this.treeAdapter.getTagName(t)===re.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===_e.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===v.MGLYPH||e.tagID===v.MALIGNMARK)&&!this._isIntegrationPoint(r,t,_e.HTML)}_processToken(e){switch(e.type){case ni.CHARACTER:{this.onCharacter(e);break}case ni.NULL_CHARACTER:{this.onNullCharacter(e);break}case ni.COMMENT:{this.onComment(e);break}case ni.DOCTYPE:{this.onDoctype(e);break}case ni.START_TAG:{this._processStartTag(e);break}case ni.END_TAG:{this.onEndTag(e);break}case ni.EOF:{this.onEof(e);break}case ni.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,t,r){let n=this.treeAdapter.getNamespaceURI(t),o=this.treeAdapter.getAttrList(t);return q6(e,n,o,r)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(n=>n.type===ds.Marker||this.openElements.contains(n.element)),r=t<0?e-1:t-1;for(let n=r;n>=0;n--){let o=this.activeFormattingElements.entries[n];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(v.P),this.openElements.popUntilTagNamePopped(v.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case v.TR:{this.insertionMode=$.IN_ROW;return}case v.TBODY:case v.THEAD:case v.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case v.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case v.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case v.TABLE:{this.insertionMode=$.IN_TABLE;return}case v.BODY:{this.insertionMode=$.IN_BODY;return}case v.FRAMESET:{this.insertionMode=$.IN_FRAMESET;return}case v.SELECT:{this._resetInsertionModeForSelect(e);return}case v.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case v.HTML:{this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return}case v.TD:case v.TH:{if(e>0){this.insertionMode=$.IN_CELL;return}break}case v.HEAD:{if(e>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let r=this.openElements.tagIDs[t];if(r===v.TEMPLATE)break;if(r===v.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return nV.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case v.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(t)===_e.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break}case v.TABLE:{let r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){let r=this.treeAdapter.getNamespaceURI(e);return U6[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){npe(this,e);return}switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{h0(this,e);break}case $.BEFORE_HEAD:{f0(this,e);break}case $.IN_HEAD:{p0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{m0(this,e);break}case $.AFTER_HEAD:{g0(this,e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{sV(this,e);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{K6(this,e);break}case $.IN_TABLE_TEXT:{hV(this,e);break}case $.IN_COLUMN_GROUP:{Jw(this,e);break}case $.AFTER_BODY:{ex(this,e);break}case $.AFTER_AFTER_BODY:{Zw(this,e);break}default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rpe(this,e);return}switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{h0(this,e);break}case $.BEFORE_HEAD:{f0(this,e);break}case $.IN_HEAD:{p0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{m0(this,e);break}case $.AFTER_HEAD:{g0(this,e);break}case $.TEXT:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{K6(this,e);break}case $.IN_COLUMN_GROUP:{Jw(this,e);break}case $.AFTER_BODY:{ex(this,e);break}case $.AFTER_AFTER_BODY:{Zw(this,e);break}default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){$6(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{$6(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.AFTER_BODY:{Phe(this,e);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Ohe(this,e);break}default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{Fhe(this,e);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(e,he.misplacedDoctype);break}case $.IN_TABLE_TEXT:{u0(this,e);break}default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,he.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?ope(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{zhe(this,e);break}case $.BEFORE_HEAD:{Hhe(this,e);break}case $.IN_HEAD:{Bs(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Whe(this,e);break}case $.AFTER_HEAD:{qhe(this,e);break}case $.IN_BODY:{Fn(this,e);break}case $.IN_TABLE:{Qf(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.IN_CAPTION:{Ufe(this,e);break}case $.IN_COLUMN_GROUP:{Q6(this,e);break}case $.IN_TABLE_BODY:{rx(this,e);break}case $.IN_ROW:{nx(this,e);break}case $.IN_CELL:{Vfe(this,e);break}case $.IN_SELECT:{mV(this,e);break}case $.IN_SELECT_IN_TABLE:{Kfe(this,e);break}case $.IN_TEMPLATE:{Gfe(this,e);break}case $.AFTER_BODY:{Xfe(this,e);break}case $.IN_FRAMESET:{Qfe(this,e);break}case $.AFTER_FRAMESET:{Jfe(this,e);break}case $.AFTER_AFTER_BODY:{tpe(this,e);break}case $.AFTER_AFTER_FRAMESET:{ipe(this,e);break}default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?spe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{Bhe(this,e);break}case $.BEFORE_HEAD:{Uhe(this,e);break}case $.IN_HEAD:{jhe(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Vhe(this,e);break}case $.AFTER_HEAD:{Khe(this,e);break}case $.IN_BODY:{ix(this,e);break}case $.TEXT:{Dfe(this,e);break}case $.IN_TABLE:{b0(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.IN_CAPTION:{jfe(this,e);break}case $.IN_COLUMN_GROUP:{Wfe(this,e);break}case $.IN_TABLE_BODY:{G6(this,e);break}case $.IN_ROW:{pV(this,e);break}case $.IN_CELL:{qfe(this,e);break}case $.IN_SELECT:{gV(this,e);break}case $.IN_SELECT_IN_TABLE:{$fe(this,e);break}case $.IN_TEMPLATE:{Yfe(this,e);break}case $.AFTER_BODY:{vV(this,e);break}case $.IN_FRAMESET:{Zfe(this,e);break}case $.AFTER_FRAMESET:{epe(this,e);break}case $.AFTER_AFTER_BODY:{Zw(this,e);break}default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{h0(this,e);break}case $.BEFORE_HEAD:{f0(this,e);break}case $.IN_HEAD:{p0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{m0(this,e);break}case $.AFTER_HEAD:{g0(this,e);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{dV(this,e);break}case $.TEXT:{Mfe(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.IN_TEMPLATE:{bV(this,e);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{X6(this,e);break}default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===z.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{oV(this,e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{K6(this,e);break}case $.IN_TABLE_TEXT:{uV(this,e);break}default:}}};function Lhe(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagID)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):cV(i,e),t}function Ahe(i,e){let t=null,r=i.openElements.stackTop;for(;r>=0;r--){let n=i.openElements.items[r];if(n===e.element)break;i._isSpecialElement(n,i.openElements.tagIDs[r])&&(t=n)}return t||(i.openElements.shortenToLength(r<0?0:r),i.activeFormattingElements.removeEntry(e)),t}function Dhe(i,e,t){let r=e,n=i.openElements.getCommonAncestor(e);for(let o=0,s=n;s!==t;o++,s=n){n=i.openElements.getCommonAncestor(s);let a=i.activeFormattingElements.getElementEntry(s),l=a&&o>=The;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=Mhe(i,a),r===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(r),i.treeAdapter.appendChild(s,r),r=s)}return r}function Mhe(i,e){let t=i.treeAdapter.getNamespaceURI(e.element),r=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,r),e.element=r,r}function Nhe(i,e,t){let r=i.treeAdapter.getTagName(e),n=gd(r);if(i._isElementCausesFosterParenting(n))i._fosterParentElement(t);else{let o=i.treeAdapter.getNamespaceURI(e);n===v.TEMPLATE&&o===_e.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function Rhe(i,e,t){let r=i.treeAdapter.getNamespaceURI(t.element),{token:n}=t,o=i.treeAdapter.createElement(n.tagName,r,n.attrs);i._adoptNodes(e,o),i.treeAdapter.appendChild(e,o),i.activeFormattingElements.insertElementAfterBookmark(o,n),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,o,n.tagID)}function Y6(i,e){for(let t=0;t<Ehe;t++){let r=Lhe(i,e);if(!r)break;let n=Ahe(i,r);if(!n)break;i.activeFormattingElements.bookmark=r;let o=Dhe(i,n,r.element),s=i.openElements.getCommonAncestor(r.element);i.treeAdapter.detachNode(o),s&&Nhe(i,s,o),Rhe(i,n,r)}}function $6(i,e){i._appendCommentNode(e,i.openElements.currentTmplContentOrNode)}function Phe(i,e){i._appendCommentNode(e,i.openElements.items[0])}function Ohe(i,e){i._appendCommentNode(e,i.document)}function X6(i,e){if(i.stopped=!0,e.location){let t=i.fragmentContext?0:2;for(let r=i.openElements.stackTop;r>=t;r--)i._setEndLocation(i.openElements.items[r],e);if(!i.fragmentContext&&i.openElements.stackTop>=0){let r=i.openElements.items[0],n=i.treeAdapter.getNodeSourceCodeLocation(r);if(n&&!n.endTag&&(i._setEndLocation(r,e),i.openElements.stackTop>=1)){let o=i.openElements.items[1],s=i.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&i._setEndLocation(o,e)}}}}function Fhe(i,e){i._setDocumentType(e);let t=e.forceQuirks?gn.QUIRKS:ZW(e);QW(e)||i._err(e,he.nonConformingDoctype),i.treeAdapter.setDocumentMode(i.document,t),i.insertionMode=$.BEFORE_HTML}function d0(i,e){i._err(e,he.missingDoctype,!0),i.treeAdapter.setDocumentMode(i.document,gn.QUIRKS),i.insertionMode=$.BEFORE_HTML,i._processToken(e)}function zhe(i,e){e.tagID===v.HTML?(i._insertElement(e,_e.HTML),i.insertionMode=$.BEFORE_HEAD):h0(i,e)}function Bhe(i,e){let t=e.tagID;(t===v.HTML||t===v.HEAD||t===v.BODY||t===v.BR)&&h0(i,e)}function h0(i,e){i._insertFakeRootElement(),i.insertionMode=$.BEFORE_HEAD,i._processToken(e)}function Hhe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.HEAD:{i._insertElement(e,_e.HTML),i.headElement=i.openElements.current,i.insertionMode=$.IN_HEAD;break}default:f0(i,e)}}function Uhe(i,e){let t=e.tagID;t===v.HEAD||t===v.BODY||t===v.HTML||t===v.BR?f0(i,e):i._err(e,he.endTagWithoutMatchingOpenElement)}function f0(i,e){i._insertFakeElement(re.HEAD,v.HEAD),i.headElement=i.openElements.current,i.insertionMode=$.IN_HEAD,i._processToken(e)}function Bs(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.TITLE:{i._switchToTextParsing(e,ir.RCDATA);break}case v.NOSCRIPT:{i.options.scriptingEnabled?i._switchToTextParsing(e,ir.RAWTEXT):(i._insertElement(e,_e.HTML),i.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case v.NOFRAMES:case v.STYLE:{i._switchToTextParsing(e,ir.RAWTEXT);break}case v.SCRIPT:{i._switchToTextParsing(e,ir.SCRIPT_DATA);break}case v.TEMPLATE:{i._insertTemplate(e),i.activeFormattingElements.insertMarker(),i.framesetOk=!1,i.insertionMode=$.IN_TEMPLATE,i.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case v.HEAD:{i._err(e,he.misplacedStartTagForHeadElement);break}default:p0(i,e)}}function jhe(i,e){switch(e.tagID){case v.HEAD:{i.openElements.pop(),i.insertionMode=$.AFTER_HEAD;break}case v.BODY:case v.BR:case v.HTML:{p0(i,e);break}case v.TEMPLATE:{Hu(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function Hu(i,e){i.openElements.tmplCount>0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagId!==v.TEMPLATE&&i._err(e,he.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(v.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode()):i._err(e,he.endTagWithoutMatchingOpenElement)}function p0(i,e){i.openElements.pop(),i.insertionMode=$.AFTER_HEAD,i._processToken(e)}function Whe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.BASEFONT:case v.BGSOUND:case v.HEAD:case v.LINK:case v.META:case v.NOFRAMES:case v.STYLE:{Bs(i,e);break}case v.NOSCRIPT:{i._err(e,he.nestedNoscriptInHead);break}default:m0(i,e)}}function Vhe(i,e){switch(e.tagID){case v.NOSCRIPT:{i.openElements.pop(),i.insertionMode=$.IN_HEAD;break}case v.BR:{m0(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function m0(i,e){let t=e.type===ni.EOF?he.openElementsLeftAfterEof:he.disallowedContentInNoscriptInHead;i._err(e,t),i.openElements.pop(),i.insertionMode=$.IN_HEAD,i._processToken(e)}function qhe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.BODY:{i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=$.IN_BODY;break}case v.FRAMESET:{i._insertElement(e,_e.HTML),i.insertionMode=$.IN_FRAMESET;break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{i._err(e,he.abandonedHeadElementChild),i.openElements.push(i.headElement,v.HEAD),Bs(i,e),i.openElements.remove(i.headElement);break}case v.HEAD:{i._err(e,he.misplacedStartTagForHeadElement);break}default:g0(i,e)}}function Khe(i,e){switch(e.tagID){case v.BODY:case v.HTML:case v.BR:{g0(i,e);break}case v.TEMPLATE:{Hu(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function g0(i,e){i._insertFakeElement(re.BODY,v.BODY),i.insertionMode=$.IN_BODY,tx(i,e)}function tx(i,e){switch(e.type){case ni.CHARACTER:{sV(i,e);break}case ni.WHITESPACE_CHARACTER:{oV(i,e);break}case ni.COMMENT:{$6(i,e);break}case ni.START_TAG:{Fn(i,e);break}case ni.END_TAG:{ix(i,e);break}case ni.EOF:{dV(i,e);break}default:}}function oV(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function sV(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function $he(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function Ghe(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function Yhe(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_FRAMESET)}function Xhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML)}function Qhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),o0(i.openElements.currentTagId)&&i.openElements.pop(),i._insertElement(e,_e.HTML)}function Zhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function Jhe(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),t||(i.formElement=i.openElements.current))}function efe(i,e){i.framesetOk=!1;let t=e.tagID;for(let r=i.openElements.stackTop;r>=0;r--){let n=i.openElements.tagIDs[r];if(t===v.LI&&n===v.LI||(t===v.DD||t===v.DT)&&(n===v.DD||n===v.DT)){i.openElements.generateImpliedEndTagsWithExclusion(n),i.openElements.popUntilTagNamePopped(n);break}if(n!==v.ADDRESS&&n!==v.DIV&&n!==v.P&&i._isSpecialElement(i.openElements.items[r],n))break}i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML)}function tfe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.tokenizer.state=ir.PLAINTEXT}function ife(i,e){i.openElements.hasInScope(v.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.framesetOk=!1}function rfe(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(re.A);t&&(Y6(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function nfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function ofe(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(v.NOBR)&&(Y6(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function sfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function afe(i,e){i.treeAdapter.getDocumentMode(i.document)!==gn.QUIRKS&&i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=$.IN_TABLE}function aV(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,_e.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function lV(i){let e=n0(i,zs.TYPE);return e!=null&&e.toLowerCase()===khe}function lfe(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,_e.HTML),lV(e)||(i.framesetOk=!1),e.ackSelfClosing=!0}function cfe(i,e){i._appendElement(e,_e.HTML),e.ackSelfClosing=!0}function dfe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._appendElement(e,_e.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function ufe(i,e){e.tagName=re.IMG,e.tagID=v.IMG,aV(i,e)}function hfe(i,e){i._insertElement(e,_e.HTML),i.skipNextNewLine=!0,i.tokenizer.state=ir.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=$.TEXT}function ffe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,ir.RAWTEXT)}function pfe(i,e){i.framesetOk=!1,i._switchToTextParsing(e,ir.RAWTEXT)}function iV(i,e){i._switchToTextParsing(e,ir.RAWTEXT)}function mfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=i.insertionMode===$.IN_TABLE||i.insertionMode===$.IN_CAPTION||i.insertionMode===$.IN_TABLE_BODY||i.insertionMode===$.IN_ROW||i.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function gfe(i,e){i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML)}function bfe(i,e){i.openElements.hasInScope(v.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,_e.HTML)}function vfe(i,e){i.openElements.hasInScope(v.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(v.RTC),i._insertElement(e,_e.HTML)}function _fe(i,e){i._reconstructActiveFormattingElements(),Yw(e),c0(e),e.selfClosing?i._appendElement(e,_e.MATHML):i._insertElement(e,_e.MATHML),e.ackSelfClosing=!0}function yfe(i,e){i._reconstructActiveFormattingElements(),Xw(e),c0(e),e.selfClosing?i._appendElement(e,_e.SVG):i._insertElement(e,_e.SVG),e.ackSelfClosing=!0}function rV(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML)}function Fn(i,e){switch(e.tagID){case v.I:case v.S:case v.B:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.SMALL:case v.STRIKE:case v.STRONG:{nfe(i,e);break}case v.A:{rfe(i,e);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{Qhe(i,e);break}case v.P:case v.DL:case v.OL:case v.UL:case v.DIV:case v.DIR:case v.NAV:case v.MAIN:case v.MENU:case v.ASIDE:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.DETAILS:case v.ADDRESS:case v.ARTICLE:case v.SECTION:case v.SUMMARY:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{Xhe(i,e);break}case v.LI:case v.DD:case v.DT:{efe(i,e);break}case v.BR:case v.IMG:case v.WBR:case v.AREA:case v.EMBED:case v.KEYGEN:{aV(i,e);break}case v.HR:{dfe(i,e);break}case v.RB:case v.RTC:{bfe(i,e);break}case v.RT:case v.RP:{vfe(i,e);break}case v.PRE:case v.LISTING:{Zhe(i,e);break}case v.XMP:{ffe(i,e);break}case v.SVG:{yfe(i,e);break}case v.HTML:{$he(i,e);break}case v.BASE:case v.LINK:case v.META:case v.STYLE:case v.TITLE:case v.SCRIPT:case v.BGSOUND:case v.BASEFONT:case v.TEMPLATE:{Bs(i,e);break}case v.BODY:{Ghe(i,e);break}case v.FORM:{Jhe(i,e);break}case v.NOBR:{ofe(i,e);break}case v.MATH:{_fe(i,e);break}case v.TABLE:{afe(i,e);break}case v.INPUT:{lfe(i,e);break}case v.PARAM:case v.TRACK:case v.SOURCE:{cfe(i,e);break}case v.IMAGE:{ufe(i,e);break}case v.BUTTON:{ife(i,e);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{sfe(i,e);break}case v.IFRAME:{pfe(i,e);break}case v.SELECT:{mfe(i,e);break}case v.OPTION:case v.OPTGROUP:{gfe(i,e);break}case v.NOEMBED:{iV(i,e);break}case v.FRAMESET:{Yhe(i,e);break}case v.TEXTAREA:{hfe(i,e);break}case v.NOSCRIPT:{i.options.scriptingEnabled?iV(i,e):rV(i,e);break}case v.PLAINTEXT:{tfe(i,e);break}case v.COL:case v.TH:case v.TD:case v.TR:case v.HEAD:case v.FRAME:case v.TBODY:case v.TFOOT:case v.THEAD:case v.CAPTION:case v.COLGROUP:break;default:rV(i,e)}}function wfe(i,e){if(i.openElements.hasInScope(v.BODY)&&(i.insertionMode=$.AFTER_BODY,i.options.sourceCodeLocationInfo)){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i._setEndLocation(t,e)}}function xfe(i,e){i.openElements.hasInScope(v.BODY)&&(i.insertionMode=$.AFTER_BODY,vV(i,e))}function Cfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function Sfe(i){let e=i.openElements.tmplCount>0,{formElement:t}=i;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(v.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(v.FORM):t&&i.openElements.remove(t))}function kfe(i){i.openElements.hasInButtonScope(v.P)||i._insertFakeElement(re.P,v.P),i._closePElement()}function Efe(i){i.openElements.hasInListItemScope(v.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(v.LI),i.openElements.popUntilTagNamePopped(v.LI))}function Tfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function Ife(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function Lfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function Afe(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(re.BR,v.BR),i.openElements.pop(),i.framesetOk=!1}function cV(i,e){let t=e.tagName,r=e.tagID;for(let n=i.openElements.stackTop;n>0;n--){let o=i.openElements.items[n],s=i.openElements.tagIDs[n];if(r===s&&(r!==v.UNKNOWN||i.treeAdapter.getTagName(o)===t)){i.openElements.generateImpliedEndTagsWithExclusion(r),i.openElements.stackTop>=n&&i.openElements.shortenToLength(n);break}if(i._isSpecialElement(o,s))break}}function ix(i,e){switch(e.tagID){case v.A:case v.B:case v.I:case v.S:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.NOBR:case v.SMALL:case v.STRIKE:case v.STRONG:{Y6(i,e);break}case v.P:{kfe(i);break}case v.DL:case v.UL:case v.OL:case v.DIR:case v.DIV:case v.NAV:case v.PRE:case v.MAIN:case v.MENU:case v.ASIDE:case v.BUTTON:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.ADDRESS:case v.ARTICLE:case v.DETAILS:case v.SECTION:case v.SUMMARY:case v.LISTING:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{Cfe(i,e);break}case v.LI:{Efe(i);break}case v.DD:case v.DT:{Tfe(i,e);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{Ife(i);break}case v.BR:{Afe(i);break}case v.BODY:{wfe(i,e);break}case v.HTML:{xfe(i,e);break}case v.FORM:{Sfe(i);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{Lfe(i,e);break}case v.TEMPLATE:{Hu(i,e);break}default:cV(i,e)}}function dV(i,e){i.tmplInsertionModeStack.length>0?bV(i,e):X6(i,e)}function Dfe(i,e){var t;e.tagID===v.SCRIPT&&((t=i.scriptHandler)===null||t===void 0||t.call(i,i.openElements.current)),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function Mfe(i,e){i._err(e,he.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i.onEof(e)}function K6(i,e){if(nV.has(i.openElements.currentTagId))switch(i.pendingCharacterTokens.length=0,i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=$.IN_TABLE_TEXT,e.type){case ni.CHARACTER:{hV(i,e);break}case ni.WHITESPACE_CHARACTER:{uV(i,e);break}}else v0(i,e)}function Nfe(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_CAPTION}function Rfe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_COLUMN_GROUP}function Pfe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(re.COLGROUP,v.COLGROUP),i.insertionMode=$.IN_COLUMN_GROUP,Q6(i,e)}function Ofe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_TABLE_BODY}function Ffe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(re.TBODY,v.TBODY),i.insertionMode=$.IN_TABLE_BODY,rx(i,e)}function zfe(i,e){i.openElements.hasInTableScope(v.TABLE)&&(i.openElements.popUntilTagNamePopped(v.TABLE),i._resetInsertionMode(),i._processStartTag(e))}function Bfe(i,e){lV(e)?i._appendElement(e,_e.HTML):v0(i,e),e.ackSelfClosing=!0}function Hfe(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,_e.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function Qf(i,e){switch(e.tagID){case v.TD:case v.TH:case v.TR:{Ffe(i,e);break}case v.STYLE:case v.SCRIPT:case v.TEMPLATE:{Bs(i,e);break}case v.COL:{Pfe(i,e);break}case v.FORM:{Hfe(i,e);break}case v.TABLE:{zfe(i,e);break}case v.TBODY:case v.TFOOT:case v.THEAD:{Ofe(i,e);break}case v.INPUT:{Bfe(i,e);break}case v.CAPTION:{Nfe(i,e);break}case v.COLGROUP:{Rfe(i,e);break}default:v0(i,e)}}function b0(i,e){switch(e.tagID){case v.TABLE:{i.openElements.hasInTableScope(v.TABLE)&&(i.openElements.popUntilTagNamePopped(v.TABLE),i._resetInsertionMode());break}case v.TEMPLATE:{Hu(i,e);break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:v0(i,e)}}function v0(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,tx(i,e),i.fosterParentingEnabled=t}function uV(i,e){i.pendingCharacterTokens.push(e)}function hV(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function u0(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t<i.pendingCharacterTokens.length;t++)v0(i,i.pendingCharacterTokens[t]);else for(;t<i.pendingCharacterTokens.length;t++)i._insertCharacters(i.pendingCharacterTokens[t]);i.insertionMode=i.originalInsertionMode,i._processToken(e)}var fV=new Set([v.CAPTION,v.COL,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]);function Ufe(i,e){let t=e.tagID;fV.has(t)?i.openElements.hasInTableScope(v.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_TABLE,Qf(i,e)):Fn(i,e)}function jfe(i,e){let t=e.tagID;switch(t){case v.CAPTION:case v.TABLE:{i.openElements.hasInTableScope(v.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_TABLE,t===v.TABLE&&b0(i,e));break}case v.BODY:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:ix(i,e)}}function Q6(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.COL:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.TEMPLATE:{Bs(i,e);break}default:Jw(i,e)}}function Wfe(i,e){switch(e.tagID){case v.COLGROUP:{i.openElements.currentTagId===v.COLGROUP&&(i.openElements.pop(),i.insertionMode=$.IN_TABLE);break}case v.TEMPLATE:{Hu(i,e);break}case v.COL:break;default:Jw(i,e)}}function Jw(i,e){i.openElements.currentTagId===v.COLGROUP&&(i.openElements.pop(),i.insertionMode=$.IN_TABLE,i._processToken(e))}function rx(i,e){switch(e.tagID){case v.TR:{i.openElements.clearBackToTableBodyContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_ROW;break}case v.TH:case v.TD:{i.openElements.clearBackToTableBodyContext(),i._insertFakeElement(re.TR,v.TR),i.insertionMode=$.IN_ROW,nx(i,e);break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE,Qf(i,e));break}default:Qf(i,e)}}function G6(i,e){let t=e.tagID;switch(e.tagID){case v.TBODY:case v.TFOOT:case v.THEAD:{i.openElements.hasInTableScope(t)&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE);break}case v.TABLE:{i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE,b0(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:case v.TR:break;default:b0(i,e)}}function nx(i,e){switch(e.tagID){case v.TH:case v.TD:{i.openElements.clearBackToTableRowContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_CELL,i.activeFormattingElements.insertMarker();break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,rx(i,e));break}default:Qf(i,e)}}function pV(i,e){switch(e.tagID){case v.TR:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY);break}case v.TABLE:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,G6(i,e));break}case v.TBODY:case v.TFOOT:case v.THEAD:{(i.openElements.hasInTableScope(e.tagID)||i.openElements.hasInTableScope(v.TR))&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,G6(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:break;default:b0(i,e)}}function Vfe(i,e){let t=e.tagID;fV.has(t)?(i.openElements.hasInTableScope(v.TD)||i.openElements.hasInTableScope(v.TH))&&(i._closeTableCell(),nx(i,e)):Fn(i,e)}function qfe(i,e){let t=e.tagID;switch(t){case v.TD:case v.TH:{i.openElements.hasInTableScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_ROW);break}case v.TABLE:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{i.openElements.hasInTableScope(t)&&(i._closeTableCell(),pV(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:break;default:ix(i,e)}}function mV(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.OPTION:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i._insertElement(e,_e.HTML);break}case v.OPTGROUP:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i.openElements.currentTagId===v.OPTGROUP&&i.openElements.pop(),i._insertElement(e,_e.HTML);break}case v.INPUT:case v.KEYGEN:case v.TEXTAREA:case v.SELECT:{i.openElements.hasInSelectScope(v.SELECT)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),e.tagID!==v.SELECT&&i._processStartTag(e));break}case v.SCRIPT:case v.TEMPLATE:{Bs(i,e);break}default:}}function gV(i,e){switch(e.tagID){case v.OPTGROUP:{i.openElements.stackTop>0&&i.openElements.currentTagId===v.OPTION&&i.openElements.tagIDs[i.openElements.stackTop-1]===v.OPTGROUP&&i.openElements.pop(),i.openElements.currentTagId===v.OPTGROUP&&i.openElements.pop();break}case v.OPTION:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop();break}case v.SELECT:{i.openElements.hasInSelectScope(v.SELECT)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode());break}case v.TEMPLATE:{Hu(i,e);break}default:}}function Kfe(i,e){let t=e.tagID;t===v.CAPTION||t===v.TABLE||t===v.TBODY||t===v.TFOOT||t===v.THEAD||t===v.TR||t===v.TD||t===v.TH?(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),i._processStartTag(e)):mV(i,e)}function $fe(i,e){let t=e.tagID;t===v.CAPTION||t===v.TABLE||t===v.TBODY||t===v.TFOOT||t===v.THEAD||t===v.TR||t===v.TD||t===v.TH?i.openElements.hasInTableScope(t)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),i.onEndTag(e)):gV(i,e)}function Gfe(i,e){switch(e.tagID){case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{Bs(i,e);break}case v.CAPTION:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{i.tmplInsertionModeStack[0]=$.IN_TABLE,i.insertionMode=$.IN_TABLE,Qf(i,e);break}case v.COL:{i.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,i.insertionMode=$.IN_COLUMN_GROUP,Q6(i,e);break}case v.TR:{i.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,i.insertionMode=$.IN_TABLE_BODY,rx(i,e);break}case v.TD:case v.TH:{i.tmplInsertionModeStack[0]=$.IN_ROW,i.insertionMode=$.IN_ROW,nx(i,e);break}default:i.tmplInsertionModeStack[0]=$.IN_BODY,i.insertionMode=$.IN_BODY,Fn(i,e)}}function Yfe(i,e){e.tagID===v.TEMPLATE&&Hu(i,e)}function bV(i,e){i.openElements.tmplCount>0?(i.openElements.popUntilTagNamePopped(v.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode(),i.onEof(e)):X6(i,e)}function Xfe(i,e){e.tagID===v.HTML?Fn(i,e):ex(i,e)}function vV(i,e){var t;if(e.tagID===v.HTML){if(i.fragmentContext||(i.insertionMode=$.AFTER_AFTER_BODY),i.options.sourceCodeLocationInfo&&i.openElements.tagIDs[0]===v.HTML){i._setEndLocation(i.openElements.items[0],e);let r=i.openElements.items[1];r&&!(!((t=i.treeAdapter.getNodeSourceCodeLocation(r))===null||t===void 0)&&t.endTag)&&i._setEndLocation(r,e)}}else ex(i,e)}function ex(i,e){i.insertionMode=$.IN_BODY,tx(i,e)}function Qfe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.FRAMESET:{i._insertElement(e,_e.HTML);break}case v.FRAME:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.NOFRAMES:{Bs(i,e);break}default:}}function Zfe(i,e){e.tagID===v.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagId!==v.FRAMESET&&(i.insertionMode=$.AFTER_FRAMESET))}function Jfe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.NOFRAMES:{Bs(i,e);break}default:}}function epe(i,e){e.tagID===v.HTML&&(i.insertionMode=$.AFTER_AFTER_FRAMESET)}function tpe(i,e){e.tagID===v.HTML?Fn(i,e):Zw(i,e)}function Zw(i,e){i.insertionMode=$.IN_BODY,tx(i,e)}function ipe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.NOFRAMES:{Bs(i,e);break}default:}}function rpe(i,e){e.chars=Gi,i._insertCharacters(e)}function npe(i,e){i._insertCharacters(e),i.framesetOk=!1}function _V(i){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==_e.HTML&&!i._isIntegrationPoint(i.openElements.currentTagId,i.openElements.current);)i.openElements.pop()}function ope(i,e){if(W6(e))_V(i),i._startTagOutsideForeignContent(e);else{let t=i._getAdjustedCurrentElement(),r=i.treeAdapter.getNamespaceURI(t);r===_e.MATHML?Yw(e):r===_e.SVG&&(V6(e),Xw(e)),c0(e),e.selfClosing?i._appendElement(e,r):i._insertElement(e,r),e.ackSelfClosing=!0}}function spe(i,e){if(e.tagID===v.P||e.tagID===v.BR){_V(i),i._endTagOutsideForeignContent(e);return}for(let t=i.openElements.stackTop;t>0;t--){let r=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(r)===_e.HTML){i._endTagOutsideForeignContent(e);break}let n=i.treeAdapter.getTagName(r);if(n.toLowerCase()===e.tagName){e.tagName=n,i.openElements.shortenToLength(t);break}}}var ape=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),bMe=String.prototype.codePointAt!=null?(i,e)=>i.codePointAt(e):(i,e)=>(i.charCodeAt(e)&64512)===55296?(i.charCodeAt(e)-55296)*1024+i.charCodeAt(e+1)-56320+65536:i.charCodeAt(e);function Z6(i,e){return function(r){let n,o=0,s="";for(;n=i.exec(r);)o!==n.index&&(s+=r.substring(o,n.index)),s+=e.get(n[0].charCodeAt(0)),o=n.index+1;return s+r.substring(o)}}var vMe=Z6(/[&<>'"]/g,ape),lpe=Z6(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),cpe=Z6(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var CMe=new Set([re.AREA,re.BASE,re.BASEFONT,re.BGSOUND,re.BR,re.COL,re.EMBED,re.FRAME,re.HR,re.IMG,re.INPUT,re.KEYGEN,re.LINK,re.META,re.PARAM,re.SOURCE,re.TRACK,re.WBR]);function yV(i,e){return Kl.parse(i,e)}function wV(i,e,t){typeof i=="string"&&(t=e,e=i,i=null);let r=Kl.getFragmentParser(i,t);return r.tokenizer.write(e,!0),r.getFragment()}var dpe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),xV={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ox(i,e){let t=ype(i),r=Rf("type",{handlers:{root:upe,element:hpe,text:fpe,comment:SV,doctype:ppe,raw:gpe},unknown:bpe}),n={parser:t?new Kl(xV):Kl.getFragmentParser(void 0,xV),handle(a){r(a,n)},stitches:!1,options:e||{}};r(i,n),Zf(n,as());let o=t?n.parser.document:n.parser.getFragment(),s=r0(o,{file:n.options.file});return n.stitches&&Rn(s,"comment",function(a,l,c){let d=a;if(d.value.stitch&&c&&l!==void 0){let u=c.children;return u[l]=d.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===i.type?s.children[0]:s}function CV(i,e){let t=-1;if(i)for(;++t<i.length;)e.handle(i[t])}function upe(i,e){CV(i.children,e)}function hpe(i,e){vpe(i,e),CV(i.children,e),_pe(i,e)}function fpe(i,e){let t={type:Vl.TokenType.CHARACTER,chars:i.value,location:_0(i)};Zf(e,as(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function ppe(i,e){let t={type:Vl.TokenType.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:_0(i)};Zf(e,as(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function mpe(i,e){e.stitches=!0;let t=wpe(i);if("children"in i&&"children"in t){let r=ox({type:"root",children:i.children},e.options);t.children=r.children}SV({type:"comment",value:{stitch:t}},e)}function SV(i,e){let t=i.value,r={type:Vl.TokenType.COMMENT,data:t,location:_0(i)};Zf(e,as(i)),e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)}function gpe(i,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,kV(e,as(i)),e.parser.tokenizer.write(i.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;let t=e.parser.tokenizer._consume();e.parser.tokenizer._callState(t)}}function bpe(i,e){let t=i;if(e.options.passThrough&&e.options.passThrough.includes(t.type))mpe(t,e);else{let r="";throw dpe.has(t.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+t.type+"` node"+r)}}function Zf(i,e){kV(i,e);let t=i.parser.tokenizer.currentCharacterToken;t&&t.location&&(t.location.endLine=i.parser.tokenizer.preprocessor.line,t.location.endCol=i.parser.tokenizer.preprocessor.col+1,t.location.endOffset=i.parser.tokenizer.preprocessor.offset+1,i.parser.currentToken=t,i.parser._processToken(i.parser.currentToken)),i.parser.tokenizer.paused=!1,i.parser.tokenizer.inLoop=!1,i.parser.tokenizer.active=!1,i.parser.tokenizer.returnState=ir.DATA,i.parser.tokenizer.charRefCode=-1,i.parser.tokenizer.consumedAfterSnapshot=-1,i.parser.tokenizer.currentLocation=null,i.parser.tokenizer.currentCharacterToken=null,i.parser.tokenizer.currentToken=null,i.parser.tokenizer.currentAttr={name:"",value:""}}function kV(i,e){if(e&&e.offset!==void 0){let t={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};i.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,i.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,i.parser.tokenizer.preprocessor.line=e.line,i.parser.tokenizer.currentLocation=t}}function vpe(i,e){if(e.parser.tokenizer.state===ir.PLAINTEXT)return;Zf(e,as(i));let t=e.parser.openElements.current,r="namespaceURI"in t?t.namespaceURI:mo.html;r===mo.html&&i.tagName==="svg"&&(r=mo.svg);let n=N6(xt(ue({},i),{children:[]}),{space:r===mo.svg?"svg":"html"}),o="attrs"in n?n.attrs:[],s={type:Vl.TokenType.START_TAG,tagName:i.tagName,tagID:Xf.getTagID(i.tagName),selfClosing:!1,ackSelfClosing:!1,attrs:o,location:_0(i)};e.parser.currentToken=s,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=i.tagName}function _pe(i,e){if(!e.parser.tokenizer.inForeignNode&&Hw.includes(i.tagName)||e.parser.tokenizer.state===ir.PLAINTEXT)return;Zf(e,Ou(i));let t={type:Vl.TokenType.END_TAG,tagName:i.tagName,tagID:Xf.getTagID(i.tagName),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:_0(i)};e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken),t.tagName===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===ir.RCDATA||e.parser.tokenizer.state===ir.RAWTEXT||e.parser.tokenizer.state===ir.SCRIPT_DATA)&&(e.parser.tokenizer.state=ir.DATA)}function ype(i){let e=i.type==="root"?i.children[0]:i;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName==="html"))}function _0(i){let e=as(i)||{line:void 0,column:void 0,offset:void 0},t=Ou(i)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function wpe(i){return"children"in i?Os(xt(ue({},i),{children:[]})):Os(i)}function sx(i){return function(e,t){return ox(e,xt(ue({},i),{file:t}))}}function J6(i,e){return TV(i,e||{})||{type:"root",children:[]}}function TV(i,e){let t=xpe(i,e);return t&&e.afterTransform&&e.afterTransform(i,t),t}function xpe(i,e){switch(i.nodeType){case 1:return Epe(i,e);case 3:return Spe(i);case 8:return kpe(i);case 9:return EV(i,e);case 10:return Cpe();case 11:return EV(i,e);default:return}}function EV(i,e){return{type:"root",children:IV(i,e)}}function Cpe(){return{type:"doctype"}}function Spe(i){return{type:"text",value:i.nodeValue||""}}function kpe(i){return{type:"comment",value:i.nodeValue||""}}function Epe(i,e){let t=i.namespaceURI,r=t===mo.svg?i0:t0,n=t===mo.html?i.tagName.toLowerCase():i.tagName,o=t===mo.html&&n==="template"?i.content:i,s=i.getAttributeNames(),a={},l=-1;for(;++l<s.length;)a[s[l]]=i.getAttribute(s[l])||"";return r(n,a,IV(o,e))}function IV(i,e){let t=i.childNodes,r=[],n=-1;for(;++n<t.length;){let o=TV(t[n],e);o!==void 0&&r.push(o)}return r}var Tpe=new DOMParser;function LV(i,e){let t=e!=null&&e.fragment?Ipe(i):Tpe.parseFromString(i,"text/html");return J6(t)}function Ipe(i){let e=document.createElement("template");return e.innerHTML=i,e.content}var ax=function(i,e,t){let r=Ea(t);if(!i||!i.type||!i.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=i.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<i.children.length;)if(r(i.children[e],e,i))return i.children[e]};var $l=function(i){if(i==null)return Dpe;if(typeof i=="string")return Ape(i);if(typeof i=="object")return Lpe(i);if(typeof i=="function")return eT(i);throw new Error("Expected function, string, or array as `test`")};function Lpe(i){let e=[],t=-1;for(;++t<i.length;)e[t]=$l(i[t]);return eT(r);function r(...n){let o=-1;for(;++o<e.length;)if(e[o].apply(this,n))return!0;return!1}}function Ape(i){return eT(e);function e(t){return t.tagName===i}}function eT(i){return e;function e(t,r,n){return!!(Mpe(t)&&i.call(this,t,typeof r=="number"?r:void 0,n||void 0))}}function Dpe(i){return!!(i&&typeof i=="object"&&"type"in i&&i.type==="element"&&"tagName"in i&&typeof i.tagName=="string")}function Mpe(i){return i!==null&&typeof i=="object"&&"type"in i&&"tagName"in i}var AV=/\n/g,DV=/[\t ]+/g,tT=$l("br"),MV=$l(Bpe),Npe=$l("p"),NV=$l("tr"),Rpe=$l(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",zpe,Hpe]),RV=$l(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function y0(i,e={}){let t="children"in i?i.children:[],r=RV(i),n=FV(i,{whitespace:e.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(i.type==="text"||i.type==="comment")&&o.push(...OV(i,{whitespace:n,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<t.length;)o.push(...PV(t[s],i,{whitespace:n,breakBefore:s?void 0:r,breakAfter:s<t.length-1?tT(t[s+1]):r}));let a=[],l;for(s=-1;++s<o.length;){let c=o[s];typeof c=="number"?l!==void 0&&c>l&&(l=c):c&&(l!==void 0&&l>-1&&a.push(` -`.repeat(l)||" "),l=-1,a.push(c))}return a.join("")}function PV(i,e,t){return i.type==="element"?Ppe(i,e,t):i.type==="text"?t.whitespace==="normal"?OV(i,t):Ope(i):[]}function Ppe(i,e,t){let r=FV(i,t),n=i.children||[],o=-1,s=[];if(Rpe(i))return s;let a,l;for(tT(i)||NV(i)&&ax(e,i,NV)?l=` -`:Npe(i)?(a=2,l=2):RV(i)&&(a=1,l=1);++o<n.length;)s=s.concat(PV(n[o],i,{whitespace:r,breakBefore:o?void 0:a,breakAfter:o<n.length-1?tT(n[o+1]):l}));return MV(i)&&ax(e,i,MV)&&s.push(" "),a&&s.unshift(a),l&&s.push(l),s}function OV(i,e){let t=String(i.value),r=[],n=[],o=0;for(;o<=t.length;){AV.lastIndex=o;let l=AV.exec(t),c=l&&"index"in l?l.index:t.length;r.push(Fpe(t.slice(o,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?e.breakBefore:!0,c===t.length?e.breakAfter:!0)),o=c+1}let s=-1,a;for(;++s<r.length;)r[s].charCodeAt(r[s].length-1)===8203||s<r.length-1&&r[s+1].charCodeAt(0)===8203?(n.push(r[s]),a=void 0):r[s]?(typeof a=="number"&&n.push(a),n.push(r[s]),a=0):(s===0||s===r.length-1)&&n.push(0);return n}function Ope(i){return[String(i.value)]}function Fpe(i,e,t){let r=[],n=0,o;for(;n<i.length;){DV.lastIndex=n;let s=DV.exec(i);o=s?s.index:i.length,!n&&!o&&s&&!e&&r.push(""),n!==o&&r.push(i.slice(n,o)),n=s?o+s[0].length:o}return n!==o&&!t&&r.push(""),r.join(" ")}function FV(i,e){if(i.type==="element"){let t=i.properties||{};switch(i.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap";default:}}return e.whitespace}function zpe(i){return!!(i.properties||{}).hidden}function Bpe(i){return i.tagName==="td"||i.tagName==="th"}function Hpe(i){return i.tagName==="dialog"&&!(i.properties||{}).open}var Upe={},jpe=[];function lx(i){let e=i||Upe;return function(t,r){Iu(t,"element",function(n,o){let s=Array.isArray(n.properties.className)?n.properties.className:jpe,a=s.includes("language-math"),l=s.includes("math-display"),c=s.includes("math-inline"),d=l;if(!a&&!l&&!c)return;let u=o[o.length-1],h=n;if(n.tagName==="code"&&a&&u&&u.type==="element"&&u.tagName==="pre"&&(h=u,u=o[o.length-2],d=!0),!u)return;let f=y0(h,{whitespace:"pre"}),m;try{m=Kf.renderToString(f,xt(ue({},e),{displayMode:d,throwOnError:!0}))}catch(w){let _=w,E=_.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...o,n],cause:_,place:n.position,ruleId:E,source:"rehype-katex"}),E==="parseerror"?m=Kf.renderToString(f,xt(ue({},e),{displayMode:d,strict:"ignore",throwOnError:!1})):m=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(e.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:f}]}]}typeof m=="string"&&(m=LV(m,{fragment:!0}).children);let g=u.children.indexOf(h);return u.children.splice(g,1,...m),Nf})}}var zV={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",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 `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}};var Wpe="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",Vpe=/-[a-z]/g,qpe=/%c(?:([-+])(\d+))?/g,Kpe=/%x/g,$pe={2:!0,1:!1,0:null},Gpe={};function iT(i,e){let t=e||Gpe,r=t.onerror,n=i instanceof Zc?i:new Zc(i),o=t.fragment?wV:yV,s=String(n),a=o(s,{sourceCodeLocationInfo:!0,onParseError:t.onerror?l:null,scriptingEnabled:!1});return r0(a,{file:n,space:t.space,verbose:t.verbose});function l(c){let d=c.code,u=Ype(d),h=t[u],f=h==null?!0:h,m=typeof f=="number"?f:f?1:0;if(m){let w=zV[u];let _=new Ar(g(w.reason),{place:{start:{line:c.startLine,column:c.startCol,offset:c.startOffset},end:{line:c.endLine,column:c.endCol,offset:c.endOffset}},ruleId:d,source:"hast-util-from-html"});n.path&&(_.file=n.path,_.name=n.path+":"+_.name),_.fatal=$pe[m],_.note=g(w.description),_.url=w.url===!1?void 0:Wpe+d,r(_)}function g(w){return w.replace(qpe,_).replace(Kpe,E);function _(A,L,O){let U=(O?Number.parseInt(O,10):0)*(L==="-"?-1:1),Y=s.charAt(c.startOffset+U);return Qpe(Y)}function E(){return Zpe(s.charCodeAt(c.startOffset))}}}}function Ype(i){return i.replace(Vpe,Xpe)}function Xpe(i){return i.charAt(1).toUpperCase()}function Qpe(i){return i==="`"?"` ` `":i}function Zpe(i){return"0x"+i.toString(16).toUpperCase()}function cx(i){let e=this,o=ue(ue({},e.data("settings")),i),{emitParseErrors:t}=o,r=so(o,["emitParseErrors"]);e.parser=n;function n(s,a){return iT(s,xt(ue({},r),{onerror:t?function(l){a.path&&(l.name=a.path+":"+l.name,l.file=a.path),a.messages.push(l)}:void 0}))}}var Uu=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Hs={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Uu,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Uu],h2:[["id","footnote-label"],["className","sr-only"]],img:[...Uu,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Uu,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Uu],table:[...Uu],ul:[...Uu,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","disabled","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]};var vd={}.hasOwnProperty;function rT(i,e){let t={type:"root",children:[]},r={schema:e?ue(ue({},Hs),e):Hs,stack:[]},n=HV(r,i);return n&&(Array.isArray(n)?n.length===1?t=n[0]:t.children=n:t=n),t}function HV(i,e){if(e&&typeof e=="object"){let t=e;switch(typeof t.type=="string"?t.type:""){case"comment":return Jpe(i,t);case"doctype":return eme(i,t);case"element":return tme(i,t);case"root":return ime(i,t);case"text":return rme(i,t);default:}}}function Jpe(i,e){if(i.schema.allowComments){let t=typeof e.value=="string"?e.value:"",r=t.indexOf("-->"),o={type:"comment",value:r<0?t:t.slice(0,r)};return w0(o,e),o}}function eme(i,e){if(i.schema.allowDoctypes){let t={type:"doctype"};return w0(t,e),t}}function tme(i,e){let t=typeof e.tagName=="string"?e.tagName:"";i.stack.push(t);let r=UV(i,e.children),n=nme(i,e.properties);i.stack.pop();let o=!1;if(t.length>0&&t!=="*"&&(!i.schema.tagNames||i.schema.tagNames.includes(t))&&(o=!0,i.schema.ancestors&&vd.call(i.schema.ancestors,t))){let a=i.schema.ancestors[t],l=-1;for(o=!1;++l<a.length;)i.stack.includes(a[l])&&(o=!0)}if(!o)return i.schema.strip&&!i.schema.strip.includes(t)?r:void 0;let s={type:"element",tagName:t,properties:n,children:r};return w0(s,e),s}function ime(i,e){let r={type:"root",children:UV(i,e.children)};return w0(r,e),r}function rme(i,e){let r={type:"text",value:typeof e.value=="string"?e.value:""};return w0(r,e),r}function UV(i,e){let t=[];if(Array.isArray(e)){let r=e,n=-1;for(;++n<r.length;){let o=HV(i,r[n]);o&&(Array.isArray(o)?t.push(...o):t.push(o))}}return t}function nme(i,e){let t=i.stack[i.stack.length-1],r=i.schema.attributes,n=i.schema.required,o=r&&vd.call(r,t)?r[t]:void 0,s=r&&vd.call(r,"*")?r["*"]:void 0,a=e&&typeof e=="object"?e:{},l={},c;for(c in a)if(vd.call(a,c)){let d;if(o&&(d=BV(o,c)),!d&&s&&(d=BV(s,c)),d){let u=a[c],h=Array.isArray(u)?ome(i,d,c,u):jV(i,d,c,u);h!=null&&(l[c]=h)}}if(n&&vd.call(n,t)){let d=n[t];for(c in d)vd.call(d,c)&&!vd.call(l,c)&&(l[c]=d[c])}return l}function ome(i,e,t,r){let n=-1,o=[];for(;++n<r.length;){let s=jV(i,e,t,r[n]);(typeof s=="number"||typeof s=="string")&&o.push(s)}return o}function jV(i,e,t,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&sme(i,t,r)){if(typeof e=="object"&&e.length>1){let n=!1,o=0;for(;++o<e.length;){let s=e[o];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){n=!0;break}}else if(s===r){n=!0;break}}if(!n)return}return i.schema.clobber&&i.schema.clobberPrefix&&i.schema.clobber.includes(t)?i.schema.clobberPrefix+r:r}}function sme(i,e,t){let r=i.schema.protocols&&vd.call(i.schema.protocols,e)?i.schema.protocols[e]:void 0;if(!r||r.length===0)return!0;let n=String(t),o=n.indexOf(":"),s=n.indexOf("?"),a=n.indexOf("#"),l=n.indexOf("/");if(o<0||l>-1&&o>l||s>-1&&o>s||a>-1&&o>a)return!0;let c=-1;for(;++c<r.length;){let d=r[c];if(o===d.length&&n.slice(0,d.length)===d)return!0}return!1}function w0(i,e){let t=Yg(e);e.data&&(i.data=Os(e.data)),t&&(i.position=t)}function BV(i,e){let t,r=-1;for(;++r<i.length;){let n=i[r],o=typeof n=="string"?n:n[0];if(o===e)return n;o==="data*"&&(t=n)}if(e.length>4&&e.slice(0,4).toLowerCase()==="data")return t}function dx(i){return function(e){return rT(e,i)}}function WV(i,e){if(i=i.replace(e.subset?ame(e.subset):/["&'<>`]/g,r),e.subset||e.escapeOnly)return i;return i.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function t(n,o,s){return e.format((n.charCodeAt(0)-55296)*1024+n.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function r(n,o,s){return e.format(n.charCodeAt(0),s.charCodeAt(o+1),e)}}function ame(i){let e=[],t=-1;for(;++t<i.length;)e.push(i[t].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function VV(i,e,t){let r="&#x"+i.toString(16).toUpperCase();return t&&e&&!/[\dA-Fa-f]/.test(String.fromCharCode(e))?r:r+";"}function qV(i,e,t){let r="&#"+String(i);return t&&e&&!/\d/.test(String.fromCharCode(e))?r:r+";"}var KV=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var ux={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var $V=["cent","copy","divide","gt","lt","not","para","times"];var GV={}.hasOwnProperty,nT={},hx;for(hx in ux)GV.call(ux,hx)&&(nT[ux[hx]]=hx);function YV(i,e,t,r){let n=String.fromCharCode(i);if(GV.call(nT,n)){let o=nT[n],s="&"+o;return t&&KV.includes(o)&&!$V.includes(o)&&(!r||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?s:s+";"}return""}function XV(i,e,t){let r=VV(i,e,t.omitOptionalSemicolons),n;if((t.useNamedReferences||t.useShortestReferences)&&(n=YV(i,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!n)&&t.useShortestReferences){let o=qV(i,e,t.omitOptionalSemicolons);o.length<r.length&&(r=o)}return n&&(!t.useShortestReferences||n.length<r.length)?n:r}function Gl(i,e){return WV(i,Object.assign({format:XV},e))}function QV(i,e,t,r){return r.settings.bogusComments?"<?"+Gl(i.value,Object.assign({},r.settings.characterReferences,{subset:[">"]}))+">":"<!--"+i.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,n)+"-->";function n(o){return Gl(o,Object.assign({},r.settings.characterReferences,{subset:["<",">"]}))}}function ZV(i,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var lme=/[ \t\n\f\r]/g;function ju(i){return typeof i=="object"?i.type==="text"?JV(i.value):!1:JV(i)}function JV(i){return i.replace(lme,"")===""}var Er=eq(1),oT=eq(-1),cme=[];function eq(i){return e;function e(t,r,n){let o=t?t.children:cme,s=(r||0)+i,a=o[s];if(!n)for(;a&&ju(a);)s+=i,a=o[s];return a}}var dme={}.hasOwnProperty;function fx(i){return e;function e(t,r,n){return dme.call(i,t.tagName)&&i[t.tagName](t,r,n)}}var x0=fx({body:hme,caption:sT,colgroup:sT,dd:gme,dt:mme,head:sT,html:ume,li:pme,optgroup:bme,option:vme,p:fme,rp:tq,rt:tq,tbody:yme,td:iq,tfoot:wme,th:iq,thead:_me,tr:xme});function sT(i,e,t){let r=Er(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ju(r.value.charAt(0)))}function ume(i,e,t){let r=Er(t,e);return!r||r.type!=="comment"}function hme(i,e,t){let r=Er(t,e);return!r||r.type!=="comment"}function fme(i,e,t){let r=Er(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function pme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&r.tagName==="li"}function mme(i,e,t){let r=Er(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function gme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function tq(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function bme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function vme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function _me(i,e,t){let r=Er(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function yme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function wme(i,e,t){return!Er(t,e)}function xme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function iq(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var rq=fx({body:kme,colgroup:Eme,head:Sme,html:Cme,tbody:Tme});function Cme(i){let e=Er(i,-1);return!e||e.type!=="comment"}function Sme(i){let e=i.children,t=[],r=-1;for(;++r<e.length;){let n=e[r];if(n.type==="element"&&(n.tagName==="title"||n.tagName==="base")){if(t.includes(n.tagName))return!1;t.push(n.tagName)}}return e.length>0}function kme(i){let e=Er(i,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ju(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Eme(i,e,t){let r=oT(t,e),n=Er(i,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&x0(r,t.children.indexOf(r),t)?!1:!!(n&&n.type==="element"&&n.tagName==="col")}function Tme(i,e,t){let r=oT(t,e),n=Er(i,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&x0(r,t.children.indexOf(r),t)?!1:!!(n&&n.type==="element"&&n.tagName==="tr")}var px={name:[[` +`}),t}function xW(i){let e=0,t=i.charCodeAt(e);for(;t===9||t===32;)e++,t=i.charCodeAt(e);return i.slice(e)}function Nw(i,e){let t=CW(i,e),r=t.one(i,void 0),n=wW(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return n&&("children"in o,o.children.push({type:"text",value:` +`},n)),o}function Rw(i,e){return i&&"run"in i?async function(t,r){let n=Nw(t,e);await i.run(n,r)}:function(t){return Nw(t,e||i)}}var Hl=class{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}};Hl.prototype.property={};Hl.prototype.normal={};Hl.prototype.space=null;function v6(i,e){let t={},r={},n=-1;for(;++n<i.length;)Object.assign(t,i[n].property),Object.assign(r,i[n].normal);return new Hl(t,r,e)}function Ul(i){return i.toLowerCase()}var On=class{constructor(e,t){this.property=e,this.attribute=t}};On.prototype.space=null;On.prototype.boolean=!1;On.prototype.booleanish=!1;On.prototype.overloadedBoolean=!1;On.prototype.number=!1;On.prototype.commaSeparated=!1;On.prototype.spaceSeparated=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.mustUseProperty=!1;On.prototype.defined=!1;var e0={};Gh(e0,{boolean:()=>$t,booleanish:()=>br,commaOrSpaceSeparated:()=>po,commaSeparated:()=>md,number:()=>Fe,overloadedBoolean:()=>_6,spaceSeparated:()=>Ai});var Sue=0,$t=Fu(),br=Fu(),_6=Fu(),Fe=Fu(),Ai=Fu(),md=Fu(),po=Fu();function Fu(){return 2**++Sue}var y6=Object.keys(e0),zu=class extends On{constructor(e,t,r,n){let o=-1;if(super(e,t),SW(this,"space",n),typeof r=="number")for(;++o<y6.length;){let s=y6[o];SW(this,y6[o],(r&e0[s])===e0[s])}}};zu.prototype.defined=!0;function SW(i,e,t){t&&(i[e]=t)}var kue={}.hasOwnProperty;function ls(i){let e={},t={},r;for(r in i.properties)if(kue.call(i.properties,r)){let n=i.properties[r],o=new zu(r,i.transform(i.attributes||{},r),n,i.space);i.mustUseProperty&&i.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,t[Ul(r)]=r,t[Ul(o.attribute)]=r}return new Hl(e,t,i.space)}var w6=ls({space:"xlink",transform(i,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var x6=ls({space:"xml",transform(i,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Pw(i,e){return e in i?i[e]:e}function Ow(i,e){return Pw(i,e.toLowerCase())}var C6=ls({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ow,properties:{xmlns:null,xmlnsXLink:null}});var S6=ls({transform(i,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:br,ariaAutoComplete:null,ariaBusy:br,ariaChecked:br,ariaColCount:Fe,ariaColIndex:Fe,ariaColSpan:Fe,ariaControls:Ai,ariaCurrent:null,ariaDescribedBy:Ai,ariaDetails:null,ariaDisabled:br,ariaDropEffect:Ai,ariaErrorMessage:null,ariaExpanded:br,ariaFlowTo:Ai,ariaGrabbed:br,ariaHasPopup:null,ariaHidden:br,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ai,ariaLevel:Fe,ariaLive:null,ariaModal:br,ariaMultiLine:br,ariaMultiSelectable:br,ariaOrientation:null,ariaOwns:Ai,ariaPlaceholder:null,ariaPosInSet:Fe,ariaPressed:br,ariaReadOnly:br,ariaRelevant:null,ariaRequired:br,ariaRoleDescription:Ai,ariaRowCount:Fe,ariaRowIndex:Fe,ariaRowSpan:Fe,ariaSelected:br,ariaSetSize:Fe,ariaSort:null,ariaValueMax:Fe,ariaValueMin:Fe,ariaValueNow:Fe,ariaValueText:null,role:null}});var kW=ls({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ow,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:md,acceptCharset:Ai,accessKey:Ai,action:null,allow:null,allowFullScreen:$t,allowPaymentRequest:$t,allowUserMedia:$t,alt:null,as:null,async:$t,autoCapitalize:null,autoComplete:Ai,autoFocus:$t,autoPlay:$t,blocking:Ai,capture:$t,charSet:null,checked:$t,cite:null,className:Ai,cols:Fe,colSpan:null,content:null,contentEditable:br,controls:$t,controlsList:Ai,coords:Fe|md,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$t,defer:$t,dir:null,dirName:null,disabled:$t,download:_6,draggable:br,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$t,formTarget:null,headers:Ai,height:Fe,hidden:$t,high:Fe,href:null,hrefLang:null,htmlFor:Ai,httpEquiv:Ai,id:null,imageSizes:null,imageSrcSet:null,inert:$t,inputMode:null,integrity:null,is:null,isMap:$t,itemId:null,itemProp:Ai,itemRef:Ai,itemScope:$t,itemType:Ai,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$t,low:Fe,manifest:null,max:null,maxLength:Fe,media:null,method:null,min:null,minLength:Fe,multiple:$t,muted:$t,name:null,nonce:null,noModule:$t,noValidate:$t,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$t,optimum:Fe,pattern:null,ping:Ai,placeholder:null,playsInline:$t,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$t,referrerPolicy:null,rel:Ai,required:$t,reversed:$t,rows:Fe,rowSpan:Fe,sandbox:Ai,scope:null,scoped:$t,seamless:$t,selected:$t,shape:null,size:Fe,sizes:null,slot:null,span:Fe,spellCheck:br,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Fe,step:null,style:null,tabIndex:Fe,target:null,title:null,translate:null,type:null,typeMustMatch:$t,useMap:null,value:br,width:Fe,wrap:null,align:null,aLink:null,archive:Ai,axis:null,background:null,bgColor:null,border:Fe,borderColor:null,bottomMargin:Fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$t,declare:$t,event:null,face:null,frame:null,frameBorder:null,hSpace:Fe,leftMargin:Fe,link:null,longDesc:null,lowSrc:null,marginHeight:Fe,marginWidth:Fe,noResize:$t,noHref:$t,noShade:$t,noWrap:$t,object:null,profile:null,prompt:null,rev:null,rightMargin:Fe,rules:null,scheme:null,scrolling:br,standby:null,summary:null,text:null,topMargin:Fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$t,disableRemotePlayback:$t,prefix:null,property:null,results:Fe,security:null,unselectable:null}});var EW=ls({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Pw,properties:{about:po,accentHeight:Fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Fe,amplitude:Fe,arabicForm:null,ascent:Fe,attributeName:null,attributeType:null,azimuth:Fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Fe,by:null,calcMode:null,capHeight:Fe,className:Ai,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Fe,diffuseConstant:Fe,direction:null,display:null,dur:null,divisor:Fe,dominantBaseline:null,download:$t,dx:null,dy:null,edgeMode:null,editable:null,elevation:Fe,enableBackground:null,end:null,event:null,exponent:Fe,externalResourcesRequired:null,fill:null,fillOpacity:Fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:md,g2:md,glyphName:md,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Fe,horizOriginX:Fe,horizOriginY:Fe,id:null,ideographic:Fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Fe,k:Fe,k1:Fe,k2:Fe,k3:Fe,k4:Fe,kernelMatrix:po,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Fe,overlineThickness:Fe,paintOrder:null,panose1:null,path:null,pathLength:Fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ai,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Fe,pointsAtY:Fe,pointsAtZ:Fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:po,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:po,rev:po,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:po,requiredFeatures:po,requiredFonts:po,requiredFormats:po,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Fe,specularExponent:Fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Fe,strikethroughThickness:Fe,string:null,stroke:null,strokeDashArray:po,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Fe,strokeOpacity:Fe,strokeWidth:null,style:null,surfaceScale:Fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:po,tabIndex:Fe,tableValues:null,target:null,targetX:Fe,targetY:Fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:po,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Fe,underlineThickness:Fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Fe,values:null,vAlphabetic:Fe,vMathematical:Fe,vectorEffect:null,vHanging:Fe,vIdeographic:Fe,version:null,vertAdvY:Fe,vertOriginX:Fe,vertOriginY:Fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var Eue=/^data[-\w.:]+$/i,TW=/-[a-z]/g,Tue=/[A-Z]/g;function jl(i,e){let t=Ul(e),r=e,n=On;if(t in i.normal)return i.property[i.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Eue.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(TW,Lue);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!TW.test(o)){let s=o.replace(Tue,Iue);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}n=zu}return new n(r,e)}function Iue(i){return"-"+i.toLowerCase()}function Lue(i){return i.charAt(1).toUpperCase()}var Wl=v6([x6,w6,C6,S6,kW],"html"),cs=v6([x6,w6,C6,S6,EW],"svg");function k6(i){let e=[],t=String(i||""),r=t.indexOf(","),n=0,o=!1;for(;!o;){r===-1&&(r=t.length,o=!0);let s=t.slice(n,r).trim();(s||!o)&&e.push(s),n=r+1,r=t.indexOf(",",n)}return e}function Fw(i,e){let t=e||{};return(i[i.length-1]===""?[...i,""]:i).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var IW=/[#.]/g;function E6(i,e){let t=i||"",r={},n=0,o,s;for(;n<t.length;){IW.lastIndex=n;let a=IW.exec(t),l=t.slice(n,a?a.index:t.length);l&&(o?o==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,n+=l.length),a&&(o=a[0],n++)}return{type:"element",tagName:s||e||"div",properties:r,children:[]}}function T6(i){let e=String(i||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function zw(i){return i.join(" ").trim()}var Aue=new Set(["button","menu","reset","submit"]),I6={}.hasOwnProperty;function A6(i,e,t){let r=t&&Rue(t);function n(o,s,...a){let l=-1,c;if(o==null){c={type:"root",children:[]};let d=s;a.unshift(d)}else if(c=E6(o,e),c.tagName=c.tagName.toLowerCase(),r&&I6.call(r,c.tagName)&&(c.tagName=r[c.tagName]),Due(s,c.tagName)){let d;for(d in s)I6.call(s,d)&&Mue(i,c.properties,d,s[d])}else a.unshift(s);for(;++l<a.length;)L6(c.children,a[l]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return n}function Due(i,e){return i==null||typeof i!="object"||Array.isArray(i)?!1:e==="input"||!i.type||typeof i.type!="string"?!0:"children"in i&&Array.isArray(i.children)?!1:e==="button"?Aue.has(i.type.toLowerCase()):!("value"in i)}function Mue(i,e,t,r){let n=jl(i,t),o=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?n.spaceSeparated?s=T6(r):n.commaSeparated?s=k6(r):n.commaOrSpaceSeparated?s=T6(k6(r).join(" ")):s=LW(n,n.property,r):Array.isArray(r)?s=r.concat():s=n.property==="style"?Nue(r):String(r);if(Array.isArray(s)){let a=[];for(;++o<s.length;){let l=LW(n,n.property,s[o]);a[o]=l}s=a}if(n.property==="className"&&Array.isArray(e.className)){let a=s;s=e.className.concat(a)}e[n.property]=s}}function L6(i,e){let t=-1;if(e!=null)if(typeof e=="string"||typeof e=="number")i.push({type:"text",value:String(e)});else if(Array.isArray(e))for(;++t<e.length;)L6(i,e[t]);else if(typeof e=="object"&&"type"in e)e.type==="root"?L6(i,e.children):i.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function LW(i,e,t){if(typeof t=="string"){if(i.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((i.boolean||i.overloadedBoolean)&&(t===""||Ul(t)===Ul(e)))return!0}return t}function Nue(i){let e=[],t;for(t in i)I6.call(i,t)&&e.push([t,i[t]].join(": "));return e.join("; ")}function Rue(i){let e={},t=-1;for(;++t<i.length;)e[i[t].toLowerCase()]=i[t];return e}var AW=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var t0=A6(Wl,"div"),i0=A6(cs,"g",AW);var D6=/\r?\n|\r/g;function M6(i){let e=String(i),t=[];for(D6.lastIndex=0;D6.test(e);)t.push(D6.lastIndex);return t.push(e.length+1),{toPoint:r,toOffset:n};function r(o){let s=-1;if(typeof o=="number"&&o>-1&&o<t[t.length-1]){for(;++s<t.length;)if(t[s]>o)return{line:s+1,column:o-(s>0?t[s-1]:0)+1,offset:o}}}function n(o){let s=o&&o.line,a=o&&o.column;if(typeof s=="number"&&typeof a=="number"&&!Number.isNaN(s)&&!Number.isNaN(a)&&s-1 in t){let l=(t[s-2]||0)+a-1||0;if(l>-1&&l<t[t.length-1])return l}}}var mo={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/"};var MW={}.hasOwnProperty,Pue=Object.prototype;function r0(i,e){let t=e||{};return N6({file:t.file||void 0,location:!1,schema:t.space==="svg"?cs:Wl,verbose:t.verbose||!1},i)}function N6(i,e){let t;switch(e.nodeName){case"#comment":{let r=e;return t={type:"comment",value:r.data},Bw(i,r,t),t}case"#document":case"#document-fragment":{let r=e,n="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(t={type:"root",children:NW(i,e.childNodes),data:{quirksMode:n}},i.file&&i.location){let o=String(i.file),s=M6(o),a=s.toPoint(0),l=s.toPoint(o.length);t.position={start:a,end:l}}return t}case"#documentType":{let r=e;return t={type:"doctype"},Bw(i,r,t),t}case"#text":{let r=e;return t={type:"text",value:r.value},Bw(i,r,t),t}default:return t=Oue(i,e),t}}function NW(i,e){let t=-1,r=[];for(;++t<e.length;){let n=N6(i,e[t]);r.push(n)}return r}function Oue(i,e){let t=i.schema;i.schema=e.namespaceURI===mo.svg?cs:Wl;let r=-1,n={};for(;++r<e.attrs.length;){let a=e.attrs[r],l=(a.prefix?a.prefix+":":"")+a.name;MW.call(Pue,l)||(n[l]=a.value)}let s=(i.schema.space==="svg"?i0:t0)(e.tagName,n,NW(i,e.childNodes));if(Bw(i,e,s),s.tagName==="template"){let a=e,l=a.sourceCodeLocation,c=l&&l.startTag&&Gf(l.startTag),d=l&&l.endTag&&Gf(l.endTag),u=N6(i,a.content);c&&d&&i.file&&(u.position={start:c.end,end:d.start}),s.content=u}return i.schema=t,s}function Bw(i,e,t){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&i.file){let r=Fue(i,t,e.sourceCodeLocation);r&&(i.location=!0,t.position=r)}}function Fue(i,e,t){let r=Gf(t);if(e.type==="element"){let n=e.children[e.children.length-1];if(r&&!t.endTag&&n&&n.position&&n.position.end&&(r.end=Object.assign({},n.position.end)),i.verbose){let o={},s;if(t.attrs)for(s in t.attrs)MW.call(t.attrs,s)&&(o[jl(i.schema,s).property]=Gf(t.attrs[s]));t.startTag;let a=Gf(t.startTag),l=t.endTag?Gf(t.endTag):void 0,c={opening:a};l&&(c.closing=l),c.properties=o,e.data={position:c}}}return r}function Gf(i){let e=DW({line:i.startLine,column:i.startCol,offset:i.startOffset}),t=DW({line:i.endLine,column:i.endCol,offset:i.endOffset});return e||t?{start:e,end:t}:void 0}function DW(i){return i.line&&i.column?i:void 0}var zue={},Bue={}.hasOwnProperty,RW=Rf("type",{handlers:{root:Hue,element:que,text:Wue,comment:Vue,doctype:jue}});function R6(i,e){let r=(e||zue).space;return RW(i,r==="svg"?cs:Wl)}function Hue(i,e){let t={nodeName:"#document",mode:(i.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=P6(i.children,t,e),Yf(i,t),t}function Uue(i,e){let t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=P6(i.children,t,e),Yf(i,t),t}function jue(i){let e={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Yf(i,e),e}function Wue(i){let e={nodeName:"#text",value:i.value,parentNode:null};return Yf(i,e),e}function Vue(i){let e={nodeName:"#comment",data:i.value,parentNode:null};return Yf(i,e),e}function que(i,e){let t=e,r=t;i.type==="element"&&i.tagName.toLowerCase()==="svg"&&t.space==="html"&&(r=cs);let n=[],o;if(i.properties){for(o in i.properties)if(o!=="children"&&Bue.call(i.properties,o)){let l=Kue(r,o,i.properties[o]);l&&n.push(l)}}let s=r.space;let a={nodeName:i.tagName,tagName:i.tagName,attrs:n,namespaceURI:mo[s],childNodes:[],parentNode:null};return a.childNodes=P6(i.children,a,r),Yf(i,a),i.tagName==="template"&&i.content&&(a.content=Uue(i.content,r)),a}function Kue(i,e,t){let r=jl(i,e);if(t===!1||t===null||t===void 0||typeof t=="number"&&Number.isNaN(t)||!t&&r.boolean)return;Array.isArray(t)&&(t=r.commaSeparated?Fw(t):zw(t));let n={name:r.attribute,value:t===!0?"":String(t)};if(r.space&&r.space!=="html"&&r.space!=="svg"){let o=n.name.indexOf(":");o<0?n.prefix="":(n.name=n.name.slice(o+1),n.prefix=r.attribute.slice(0,o)),n.namespace=mo[r.space]}return n}function P6(i,e,t){let r=-1,n=[];if(i)for(;++r<i.length;){let o=RW(i[r],t);o.parentNode=e,n.push(o)}return n}function Yf(i,e){let t=i.position;t&&t.start&&t.end&&(t.start.offset,t.end.offset,e.sourceCodeLocation={startLine:t.start.line,startCol:t.start.column,startOffset:t.start.offset,endLine:t.end.line,endCol:t.end.column,endOffset:t.end.offset})}var Hw=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var $ue=new Set([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]),Gi="\uFFFD",z;(function(i){i[i.EOF=-1]="EOF",i[i.NULL=0]="NULL",i[i.TABULATION=9]="TABULATION",i[i.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",i[i.LINE_FEED=10]="LINE_FEED",i[i.FORM_FEED=12]="FORM_FEED",i[i.SPACE=32]="SPACE",i[i.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",i[i.QUOTATION_MARK=34]="QUOTATION_MARK",i[i.NUMBER_SIGN=35]="NUMBER_SIGN",i[i.AMPERSAND=38]="AMPERSAND",i[i.APOSTROPHE=39]="APOSTROPHE",i[i.HYPHEN_MINUS=45]="HYPHEN_MINUS",i[i.SOLIDUS=47]="SOLIDUS",i[i.DIGIT_0=48]="DIGIT_0",i[i.DIGIT_9=57]="DIGIT_9",i[i.SEMICOLON=59]="SEMICOLON",i[i.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",i[i.EQUALS_SIGN=61]="EQUALS_SIGN",i[i.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",i[i.QUESTION_MARK=63]="QUESTION_MARK",i[i.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",i[i.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",i[i.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",i[i.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",i[i.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",i[i.GRAVE_ACCENT=96]="GRAVE_ACCENT",i[i.LATIN_SMALL_A=97]="LATIN_SMALL_A",i[i.LATIN_SMALL_F=102]="LATIN_SMALL_F",i[i.LATIN_SMALL_X=120]="LATIN_SMALL_X",i[i.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",i[i.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(z=z||(z={}));var Jn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Uw(i){return i>=55296&&i<=57343}function PW(i){return i>=56320&&i<=57343}function OW(i,e){return(i-55296)*1024+9216+e}function jw(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159}function Ww(i){return i>=64976&&i<=65007||$ue.has(i)}var he;(function(i){i.controlCharacterInInputStream="control-character-in-input-stream",i.noncharacterInInputStream="noncharacter-in-input-stream",i.surrogateInInputStream="surrogate-in-input-stream",i.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",i.endTagWithAttributes="end-tag-with-attributes",i.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",i.unexpectedSolidusInTag="unexpected-solidus-in-tag",i.unexpectedNullCharacter="unexpected-null-character",i.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",i.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",i.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",i.missingEndTagName="missing-end-tag-name",i.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",i.unknownNamedCharacterReference="unknown-named-character-reference",i.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",i.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",i.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",i.eofBeforeTagName="eof-before-tag-name",i.eofInTag="eof-in-tag",i.missingAttributeValue="missing-attribute-value",i.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",i.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",i.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",i.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",i.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",i.missingDoctypePublicIdentifier="missing-doctype-public-identifier",i.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",i.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",i.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",i.cdataInHtmlContent="cdata-in-html-content",i.incorrectlyOpenedComment="incorrectly-opened-comment",i.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",i.eofInDoctype="eof-in-doctype",i.nestedComment="nested-comment",i.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",i.eofInComment="eof-in-comment",i.incorrectlyClosedComment="incorrectly-closed-comment",i.eofInCdata="eof-in-cdata",i.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",i.nullCharacterReference="null-character-reference",i.surrogateCharacterReference="surrogate-character-reference",i.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",i.controlCharacterReference="control-character-reference",i.noncharacterCharacterReference="noncharacter-character-reference",i.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",i.missingDoctypeName="missing-doctype-name",i.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",i.duplicateAttribute="duplicate-attribute",i.nonConformingDoctype="non-conforming-doctype",i.missingDoctype="missing-doctype",i.misplacedDoctype="misplaced-doctype",i.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",i.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",i.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",i.openElementsLeftAfterEof="open-elements-left-after-eof",i.abandonedHeadElementChild="abandoned-head-element-child",i.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",i.nestedNoscriptInHead="nested-noscript-in-head",i.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(he=he||(he={}));var Yue=65536,Vw=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Yue,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){let{line:t,col:r,offset:n}=this;return{code:e,startLine:t,endLine:t,startCol:r,endCol:r,startOffset:n,endOffset:n}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(PW(t))return this.pos++,this._addGap(),OW(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,z.EOF;return this._err(he.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,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.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;let r=this.html.charCodeAt(t);return r===z.CARRIAGE_RETURN?z.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;let e=this.html.charCodeAt(this.pos);return e===z.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,z.LINE_FEED):e===z.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Uw(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===z.LINE_FEED||e===z.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){jw(e)?this._err(he.controlCharacterInInputStream):Ww(e)&&this._err(he.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}};var Vl={};Gh(Vl,{TokenType:()=>ni,getTokenAttr:()=>n0});var ni;(function(i){i[i.CHARACTER=0]="CHARACTER",i[i.NULL_CHARACTER=1]="NULL_CHARACTER",i[i.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",i[i.START_TAG=3]="START_TAG",i[i.END_TAG=4]="END_TAG",i[i.COMMENT=5]="COMMENT",i[i.DOCTYPE=6]="DOCTYPE",i[i.EOF=7]="EOF",i[i.HIBERNATION=8]="HIBERNATION"})(ni=ni||(ni={}));function n0(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}var Oa=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(i=>i.charCodeAt(0)));var FW=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(i=>i.charCodeAt(0)));var O6,Xue=new Map([[0,65533],[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]]),F6=(O6=String.fromCodePoint)!==null&&O6!==void 0?O6:function(i){let e="";return i>65535&&(i-=65536,e+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),e+=String.fromCharCode(i),e};function z6(i){var e;return i>=55296&&i<=57343||i>1114111?65533:(e=Xue.get(i))!==null&&e!==void 0?e:i}var sn;(function(i){i[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z"})(sn||(sn={}));var Que=32,Fs;(function(i){i[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE"})(Fs||(Fs={}));function B6(i){return i>=sn.ZERO&&i<=sn.NINE}function Zue(i){return i>=sn.UPPER_A&&i<=sn.UPPER_F||i>=sn.LOWER_A&&i<=sn.LOWER_F}function Jue(i){return i>=sn.UPPER_A&&i<=sn.UPPER_Z||i>=sn.LOWER_A&&i<=sn.LOWER_Z||B6(i)}function ehe(i){return i===sn.EQUALS||Jue(i)}var on;(function(i){i[i.EntityStart=0]="EntityStart",i[i.NumericStart=1]="NumericStart",i[i.NumericDecimal=2]="NumericDecimal",i[i.NumericHex=3]="NumericHex",i[i.NamedEntity=4]="NamedEntity"})(on||(on={}));var Bu;(function(i){i[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute"})(Bu||(Bu={}));var H6=class{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=on.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bu.Strict}startEntity(e){this.decodeMode=e,this.state=on.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case on.EntityStart:return e.charCodeAt(t)===sn.NUM?(this.state=on.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=on.NamedEntity,this.stateNamedEntity(e,t));case on.NumericStart:return this.stateNumericStart(e,t);case on.NumericDecimal:return this.stateNumericDecimal(e,t);case on.NumericHex:return this.stateNumericHex(e,t);case on.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Que)===sn.LOWER_X?(this.state=on.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=on.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){let o=r-t;this.result=this.result*Math.pow(n,o)+parseInt(e.substr(t,o),n),this.consumed+=o}}stateNumericHex(e,t){let r=t;for(;t<e.length;){let n=e.charCodeAt(t);if(B6(n)||Zue(n))t+=1;else return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){let r=t;for(;t<e.length;){let n=e.charCodeAt(t);if(B6(n))t+=1;else return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(e,r,t,10),-1}emitNumericEntity(e,t){var r;if(this.consumed<=t)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===sn.SEMI)this.consumed+=1;else if(this.decodeMode===Bu.Strict)return 0;return this.emitCodePoint(z6(this.result),this.consumed),this.errors&&(e!==sn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:r}=this,n=r[this.treeIndex],o=(n&Fs.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let s=e.charCodeAt(t);if(this.treeIndex=U6(r,n,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===Bu.Attribute&&(o===0||ehe(s))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],o=(n&Fs.VALUE_LENGTH)>>14,o!==0){if(s===sn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Bu.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:r}=this,n=(r[t]&Fs.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){let{decodeTree:n}=this;return this.emitCodePoint(t===1?n[e]&~Fs.VALUE_LENGTH:n[e+1],r),t===3&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case on.NamedEntity:return this.result!==0&&(this.decodeMode!==Bu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case on.NumericDecimal:return this.emitNumericEntity(0,2);case on.NumericHex:return this.emitNumericEntity(0,3);case on.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case on.EntityStart:return 0}}};function zW(i){let e="",t=new H6(i,r=>e+=F6(r));return function(n,o){let s=0,a=0;for(;(a=n.indexOf("&",a))>=0;){e+=n.slice(s,a),t.startEntity(o);let c=t.write(n,a+1);if(c<0){s=a+t.end();break}s=a+c,a=c===0?s+1:s}let l=e+n.slice(s);return e="",l}}function U6(i,e,t,r){let n=(e&Fs.BRANCH_LENGTH)>>7,o=e&Fs.JUMP_TABLE;if(n===0)return o!==0&&r===o?t:-1;if(o){let l=r-o;return l<0||l>=n?-1:i[t+l]-1}let s=t,a=s+n-1;for(;s<=a;){let l=s+a>>>1,c=i[l];if(c<r)s=l+1;else if(c>r)a=l-1;else return i[l+n]}return-1}var WDe=zW(Oa),VDe=zW(FW);var Xf={};Gh(Xf,{ATTRS:()=>zs,DOCUMENT_MODE:()=>gn,NS:()=>_e,SPECIAL_ELEMENTS:()=>j6,TAG_ID:()=>v,TAG_NAMES:()=>re,getTagID:()=>gd,hasUnescapedText:()=>BW,isNumberedHeader:()=>o0});var _e;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.MATHML="http://www.w3.org/1998/Math/MathML",i.SVG="http://www.w3.org/2000/svg",i.XLINK="http://www.w3.org/1999/xlink",i.XML="http://www.w3.org/XML/1998/namespace",i.XMLNS="http://www.w3.org/2000/xmlns/"})(_e=_e||(_e={}));var zs;(function(i){i.TYPE="type",i.ACTION="action",i.ENCODING="encoding",i.PROMPT="prompt",i.NAME="name",i.COLOR="color",i.FACE="face",i.SIZE="size"})(zs=zs||(zs={}));var gn;(function(i){i.NO_QUIRKS="no-quirks",i.QUIRKS="quirks",i.LIMITED_QUIRKS="limited-quirks"})(gn=gn||(gn={}));var re;(function(i){i.A="a",i.ADDRESS="address",i.ANNOTATION_XML="annotation-xml",i.APPLET="applet",i.AREA="area",i.ARTICLE="article",i.ASIDE="aside",i.B="b",i.BASE="base",i.BASEFONT="basefont",i.BGSOUND="bgsound",i.BIG="big",i.BLOCKQUOTE="blockquote",i.BODY="body",i.BR="br",i.BUTTON="button",i.CAPTION="caption",i.CENTER="center",i.CODE="code",i.COL="col",i.COLGROUP="colgroup",i.DD="dd",i.DESC="desc",i.DETAILS="details",i.DIALOG="dialog",i.DIR="dir",i.DIV="div",i.DL="dl",i.DT="dt",i.EM="em",i.EMBED="embed",i.FIELDSET="fieldset",i.FIGCAPTION="figcaption",i.FIGURE="figure",i.FONT="font",i.FOOTER="footer",i.FOREIGN_OBJECT="foreignObject",i.FORM="form",i.FRAME="frame",i.FRAMESET="frameset",i.H1="h1",i.H2="h2",i.H3="h3",i.H4="h4",i.H5="h5",i.H6="h6",i.HEAD="head",i.HEADER="header",i.HGROUP="hgroup",i.HR="hr",i.HTML="html",i.I="i",i.IMG="img",i.IMAGE="image",i.INPUT="input",i.IFRAME="iframe",i.KEYGEN="keygen",i.LABEL="label",i.LI="li",i.LINK="link",i.LISTING="listing",i.MAIN="main",i.MALIGNMARK="malignmark",i.MARQUEE="marquee",i.MATH="math",i.MENU="menu",i.META="meta",i.MGLYPH="mglyph",i.MI="mi",i.MO="mo",i.MN="mn",i.MS="ms",i.MTEXT="mtext",i.NAV="nav",i.NOBR="nobr",i.NOFRAMES="noframes",i.NOEMBED="noembed",i.NOSCRIPT="noscript",i.OBJECT="object",i.OL="ol",i.OPTGROUP="optgroup",i.OPTION="option",i.P="p",i.PARAM="param",i.PLAINTEXT="plaintext",i.PRE="pre",i.RB="rb",i.RP="rp",i.RT="rt",i.RTC="rtc",i.RUBY="ruby",i.S="s",i.SCRIPT="script",i.SECTION="section",i.SELECT="select",i.SOURCE="source",i.SMALL="small",i.SPAN="span",i.STRIKE="strike",i.STRONG="strong",i.STYLE="style",i.SUB="sub",i.SUMMARY="summary",i.SUP="sup",i.TABLE="table",i.TBODY="tbody",i.TEMPLATE="template",i.TEXTAREA="textarea",i.TFOOT="tfoot",i.TD="td",i.TH="th",i.THEAD="thead",i.TITLE="title",i.TR="tr",i.TRACK="track",i.TT="tt",i.U="u",i.UL="ul",i.SVG="svg",i.VAR="var",i.WBR="wbr",i.XMP="xmp"})(re=re||(re={}));var v;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.A=1]="A",i[i.ADDRESS=2]="ADDRESS",i[i.ANNOTATION_XML=3]="ANNOTATION_XML",i[i.APPLET=4]="APPLET",i[i.AREA=5]="AREA",i[i.ARTICLE=6]="ARTICLE",i[i.ASIDE=7]="ASIDE",i[i.B=8]="B",i[i.BASE=9]="BASE",i[i.BASEFONT=10]="BASEFONT",i[i.BGSOUND=11]="BGSOUND",i[i.BIG=12]="BIG",i[i.BLOCKQUOTE=13]="BLOCKQUOTE",i[i.BODY=14]="BODY",i[i.BR=15]="BR",i[i.BUTTON=16]="BUTTON",i[i.CAPTION=17]="CAPTION",i[i.CENTER=18]="CENTER",i[i.CODE=19]="CODE",i[i.COL=20]="COL",i[i.COLGROUP=21]="COLGROUP",i[i.DD=22]="DD",i[i.DESC=23]="DESC",i[i.DETAILS=24]="DETAILS",i[i.DIALOG=25]="DIALOG",i[i.DIR=26]="DIR",i[i.DIV=27]="DIV",i[i.DL=28]="DL",i[i.DT=29]="DT",i[i.EM=30]="EM",i[i.EMBED=31]="EMBED",i[i.FIELDSET=32]="FIELDSET",i[i.FIGCAPTION=33]="FIGCAPTION",i[i.FIGURE=34]="FIGURE",i[i.FONT=35]="FONT",i[i.FOOTER=36]="FOOTER",i[i.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",i[i.FORM=38]="FORM",i[i.FRAME=39]="FRAME",i[i.FRAMESET=40]="FRAMESET",i[i.H1=41]="H1",i[i.H2=42]="H2",i[i.H3=43]="H3",i[i.H4=44]="H4",i[i.H5=45]="H5",i[i.H6=46]="H6",i[i.HEAD=47]="HEAD",i[i.HEADER=48]="HEADER",i[i.HGROUP=49]="HGROUP",i[i.HR=50]="HR",i[i.HTML=51]="HTML",i[i.I=52]="I",i[i.IMG=53]="IMG",i[i.IMAGE=54]="IMAGE",i[i.INPUT=55]="INPUT",i[i.IFRAME=56]="IFRAME",i[i.KEYGEN=57]="KEYGEN",i[i.LABEL=58]="LABEL",i[i.LI=59]="LI",i[i.LINK=60]="LINK",i[i.LISTING=61]="LISTING",i[i.MAIN=62]="MAIN",i[i.MALIGNMARK=63]="MALIGNMARK",i[i.MARQUEE=64]="MARQUEE",i[i.MATH=65]="MATH",i[i.MENU=66]="MENU",i[i.META=67]="META",i[i.MGLYPH=68]="MGLYPH",i[i.MI=69]="MI",i[i.MO=70]="MO",i[i.MN=71]="MN",i[i.MS=72]="MS",i[i.MTEXT=73]="MTEXT",i[i.NAV=74]="NAV",i[i.NOBR=75]="NOBR",i[i.NOFRAMES=76]="NOFRAMES",i[i.NOEMBED=77]="NOEMBED",i[i.NOSCRIPT=78]="NOSCRIPT",i[i.OBJECT=79]="OBJECT",i[i.OL=80]="OL",i[i.OPTGROUP=81]="OPTGROUP",i[i.OPTION=82]="OPTION",i[i.P=83]="P",i[i.PARAM=84]="PARAM",i[i.PLAINTEXT=85]="PLAINTEXT",i[i.PRE=86]="PRE",i[i.RB=87]="RB",i[i.RP=88]="RP",i[i.RT=89]="RT",i[i.RTC=90]="RTC",i[i.RUBY=91]="RUBY",i[i.S=92]="S",i[i.SCRIPT=93]="SCRIPT",i[i.SECTION=94]="SECTION",i[i.SELECT=95]="SELECT",i[i.SOURCE=96]="SOURCE",i[i.SMALL=97]="SMALL",i[i.SPAN=98]="SPAN",i[i.STRIKE=99]="STRIKE",i[i.STRONG=100]="STRONG",i[i.STYLE=101]="STYLE",i[i.SUB=102]="SUB",i[i.SUMMARY=103]="SUMMARY",i[i.SUP=104]="SUP",i[i.TABLE=105]="TABLE",i[i.TBODY=106]="TBODY",i[i.TEMPLATE=107]="TEMPLATE",i[i.TEXTAREA=108]="TEXTAREA",i[i.TFOOT=109]="TFOOT",i[i.TD=110]="TD",i[i.TH=111]="TH",i[i.THEAD=112]="THEAD",i[i.TITLE=113]="TITLE",i[i.TR=114]="TR",i[i.TRACK=115]="TRACK",i[i.TT=116]="TT",i[i.U=117]="U",i[i.UL=118]="UL",i[i.SVG=119]="SVG",i[i.VAR=120]="VAR",i[i.WBR=121]="WBR",i[i.XMP=122]="XMP"})(v=v||(v={}));var the=new Map([[re.A,v.A],[re.ADDRESS,v.ADDRESS],[re.ANNOTATION_XML,v.ANNOTATION_XML],[re.APPLET,v.APPLET],[re.AREA,v.AREA],[re.ARTICLE,v.ARTICLE],[re.ASIDE,v.ASIDE],[re.B,v.B],[re.BASE,v.BASE],[re.BASEFONT,v.BASEFONT],[re.BGSOUND,v.BGSOUND],[re.BIG,v.BIG],[re.BLOCKQUOTE,v.BLOCKQUOTE],[re.BODY,v.BODY],[re.BR,v.BR],[re.BUTTON,v.BUTTON],[re.CAPTION,v.CAPTION],[re.CENTER,v.CENTER],[re.CODE,v.CODE],[re.COL,v.COL],[re.COLGROUP,v.COLGROUP],[re.DD,v.DD],[re.DESC,v.DESC],[re.DETAILS,v.DETAILS],[re.DIALOG,v.DIALOG],[re.DIR,v.DIR],[re.DIV,v.DIV],[re.DL,v.DL],[re.DT,v.DT],[re.EM,v.EM],[re.EMBED,v.EMBED],[re.FIELDSET,v.FIELDSET],[re.FIGCAPTION,v.FIGCAPTION],[re.FIGURE,v.FIGURE],[re.FONT,v.FONT],[re.FOOTER,v.FOOTER],[re.FOREIGN_OBJECT,v.FOREIGN_OBJECT],[re.FORM,v.FORM],[re.FRAME,v.FRAME],[re.FRAMESET,v.FRAMESET],[re.H1,v.H1],[re.H2,v.H2],[re.H3,v.H3],[re.H4,v.H4],[re.H5,v.H5],[re.H6,v.H6],[re.HEAD,v.HEAD],[re.HEADER,v.HEADER],[re.HGROUP,v.HGROUP],[re.HR,v.HR],[re.HTML,v.HTML],[re.I,v.I],[re.IMG,v.IMG],[re.IMAGE,v.IMAGE],[re.INPUT,v.INPUT],[re.IFRAME,v.IFRAME],[re.KEYGEN,v.KEYGEN],[re.LABEL,v.LABEL],[re.LI,v.LI],[re.LINK,v.LINK],[re.LISTING,v.LISTING],[re.MAIN,v.MAIN],[re.MALIGNMARK,v.MALIGNMARK],[re.MARQUEE,v.MARQUEE],[re.MATH,v.MATH],[re.MENU,v.MENU],[re.META,v.META],[re.MGLYPH,v.MGLYPH],[re.MI,v.MI],[re.MO,v.MO],[re.MN,v.MN],[re.MS,v.MS],[re.MTEXT,v.MTEXT],[re.NAV,v.NAV],[re.NOBR,v.NOBR],[re.NOFRAMES,v.NOFRAMES],[re.NOEMBED,v.NOEMBED],[re.NOSCRIPT,v.NOSCRIPT],[re.OBJECT,v.OBJECT],[re.OL,v.OL],[re.OPTGROUP,v.OPTGROUP],[re.OPTION,v.OPTION],[re.P,v.P],[re.PARAM,v.PARAM],[re.PLAINTEXT,v.PLAINTEXT],[re.PRE,v.PRE],[re.RB,v.RB],[re.RP,v.RP],[re.RT,v.RT],[re.RTC,v.RTC],[re.RUBY,v.RUBY],[re.S,v.S],[re.SCRIPT,v.SCRIPT],[re.SECTION,v.SECTION],[re.SELECT,v.SELECT],[re.SOURCE,v.SOURCE],[re.SMALL,v.SMALL],[re.SPAN,v.SPAN],[re.STRIKE,v.STRIKE],[re.STRONG,v.STRONG],[re.STYLE,v.STYLE],[re.SUB,v.SUB],[re.SUMMARY,v.SUMMARY],[re.SUP,v.SUP],[re.TABLE,v.TABLE],[re.TBODY,v.TBODY],[re.TEMPLATE,v.TEMPLATE],[re.TEXTAREA,v.TEXTAREA],[re.TFOOT,v.TFOOT],[re.TD,v.TD],[re.TH,v.TH],[re.THEAD,v.THEAD],[re.TITLE,v.TITLE],[re.TR,v.TR],[re.TRACK,v.TRACK],[re.TT,v.TT],[re.U,v.U],[re.UL,v.UL],[re.SVG,v.SVG],[re.VAR,v.VAR],[re.WBR,v.WBR],[re.XMP,v.XMP]]);function gd(i){var e;return(e=the.get(i))!==null&&e!==void 0?e:v.UNKNOWN}var Re=v,j6={[_e.HTML]:new Set([Re.ADDRESS,Re.APPLET,Re.AREA,Re.ARTICLE,Re.ASIDE,Re.BASE,Re.BASEFONT,Re.BGSOUND,Re.BLOCKQUOTE,Re.BODY,Re.BR,Re.BUTTON,Re.CAPTION,Re.CENTER,Re.COL,Re.COLGROUP,Re.DD,Re.DETAILS,Re.DIR,Re.DIV,Re.DL,Re.DT,Re.EMBED,Re.FIELDSET,Re.FIGCAPTION,Re.FIGURE,Re.FOOTER,Re.FORM,Re.FRAME,Re.FRAMESET,Re.H1,Re.H2,Re.H3,Re.H4,Re.H5,Re.H6,Re.HEAD,Re.HEADER,Re.HGROUP,Re.HR,Re.HTML,Re.IFRAME,Re.IMG,Re.INPUT,Re.LI,Re.LINK,Re.LISTING,Re.MAIN,Re.MARQUEE,Re.MENU,Re.META,Re.NAV,Re.NOEMBED,Re.NOFRAMES,Re.NOSCRIPT,Re.OBJECT,Re.OL,Re.P,Re.PARAM,Re.PLAINTEXT,Re.PRE,Re.SCRIPT,Re.SECTION,Re.SELECT,Re.SOURCE,Re.STYLE,Re.SUMMARY,Re.TABLE,Re.TBODY,Re.TD,Re.TEMPLATE,Re.TEXTAREA,Re.TFOOT,Re.TH,Re.THEAD,Re.TITLE,Re.TR,Re.TRACK,Re.UL,Re.WBR,Re.XMP]),[_e.MATHML]:new Set([Re.MI,Re.MO,Re.MN,Re.MS,Re.MTEXT,Re.ANNOTATION_XML]),[_e.SVG]:new Set([Re.TITLE,Re.FOREIGN_OBJECT,Re.DESC]),[_e.XLINK]:new Set,[_e.XML]:new Set,[_e.XMLNS]:new Set};function o0(i){return i===Re.H1||i===Re.H2||i===Re.H3||i===Re.H4||i===Re.H5||i===Re.H6}var ihe=new Set([re.STYLE,re.SCRIPT,re.XMP,re.IFRAME,re.NOEMBED,re.NOFRAMES,re.PLAINTEXT]);function BW(i,e){return ihe.has(i)||e&&i===re.NOSCRIPT}var rhe=new Map([[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]]),j;(function(i){i[i.DATA=0]="DATA",i[i.RCDATA=1]="RCDATA",i[i.RAWTEXT=2]="RAWTEXT",i[i.SCRIPT_DATA=3]="SCRIPT_DATA",i[i.PLAINTEXT=4]="PLAINTEXT",i[i.TAG_OPEN=5]="TAG_OPEN",i[i.END_TAG_OPEN=6]="END_TAG_OPEN",i[i.TAG_NAME=7]="TAG_NAME",i[i.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",i[i.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",i[i.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",i[i.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",i[i.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",i[i.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",i[i.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",i[i.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",i[i.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",i[i.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",i[i.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",i[i.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",i[i.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",i[i.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",i[i.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",i[i.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",i[i.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",i[i.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",i[i.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",i[i.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",i[i.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",i[i.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",i[i.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",i[i.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",i[i.BOGUS_COMMENT=40]="BOGUS_COMMENT",i[i.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",i[i.COMMENT_START=42]="COMMENT_START",i[i.COMMENT_START_DASH=43]="COMMENT_START_DASH",i[i.COMMENT=44]="COMMENT",i[i.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",i[i.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",i[i.COMMENT_END_DASH=49]="COMMENT_END_DASH",i[i.COMMENT_END=50]="COMMENT_END",i[i.COMMENT_END_BANG=51]="COMMENT_END_BANG",i[i.DOCTYPE=52]="DOCTYPE",i[i.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",i[i.DOCTYPE_NAME=54]="DOCTYPE_NAME",i[i.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",i[i.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",i[i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",i[i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",i[i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",i[i.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",i[i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",i[i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",i[i.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",i[i.CDATA_SECTION=68]="CDATA_SECTION",i[i.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",i[i.CDATA_SECTION_END=70]="CDATA_SECTION_END",i[i.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",i[i.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",i[i.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",i[i.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",i[i.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",i[i.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",i[i.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",i[i.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(j||(j={}));var ir={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function a0(i){return i>=z.DIGIT_0&&i<=z.DIGIT_9}function s0(i){return i>=z.LATIN_CAPITAL_A&&i<=z.LATIN_CAPITAL_Z}function nhe(i){return i>=z.LATIN_SMALL_A&&i<=z.LATIN_SMALL_Z}function bd(i){return nhe(i)||s0(i)}function W6(i){return bd(i)||a0(i)}function UW(i){return i>=z.LATIN_CAPITAL_A&&i<=z.LATIN_CAPITAL_F}function jW(i){return i>=z.LATIN_SMALL_A&&i<=z.LATIN_SMALL_F}function ohe(i){return a0(i)||UW(i)||jW(i)}function qw(i){return i+32}function WW(i){return i===z.SPACE||i===z.LINE_FEED||i===z.TABULATION||i===z.FORM_FEED}function she(i){return i===z.EQUALS_SIGN||W6(i)}function HW(i){return WW(i)||i===z.SOLIDUS||i===z.GREATER_THAN_SIGN}var l0=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Vw(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,r;(r=(t=this.handler).onParseError)===null||r===void 0||r.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ni.START_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ni.END_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ni.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ni.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let r=this.currentToken;if(n0(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){let n=(e=(t=r.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(he.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=gd(e.tagName),e.type===ni.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(he.endTagWithAttributes),e.selfClosing&&this._err(he.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ni.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ni.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ni.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ni.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=t;return}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=WW(e)?ni.WHITESPACE_CHARACTER:e===z.NULL?ni.NULL_CHARACTER:ni.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ni.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,r=0,n=!1;for(let o=0,s=Oa[0];o>=0&&(o=U6(Oa,s,o+1,e),!(o<0));e=this._consume()){r+=1,s=Oa[o];let a=s&Fs.VALUE_LENGTH;if(a){let l=(a>>14)-1;if(e!==z.SEMICOLON&&this._isCharacterReferenceInAttribute()&&she(this.preprocessor.peek(1))?(t=[z.AMPERSAND],o+=l):(t=l===0?[Oa[o]&~Fs.VALUE_LENGTH]:l===1?[Oa[++o]]:[Oa[++o],Oa[++o]],r=0,n=e!==z.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(r),n&&!this.preprocessor.endOfChunkHit&&this._err(he.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case j.DATA:{this._stateData(e);break}case j.RCDATA:{this._stateRcdata(e);break}case j.RAWTEXT:{this._stateRawtext(e);break}case j.SCRIPT_DATA:{this._stateScriptData(e);break}case j.PLAINTEXT:{this._statePlaintext(e);break}case j.TAG_OPEN:{this._stateTagOpen(e);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case j.TAG_NAME:{this._stateTagName(e);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case j.BOGUS_COMMENT:{this._stateBogusComment(e);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case j.COMMENT_START:{this._stateCommentStart(e);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case j.COMMENT:{this._stateComment(e);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case j.COMMENT_END:{this._stateCommentEnd(e);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case j.DOCTYPE:{this._stateDoctype(e);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case j.CDATA_SECTION:{this._stateCdataSection(e);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case j.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case j.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case j.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case j.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case j.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case j.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case z.AMPERSAND:{this.returnState=j.DATA,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitCodePoint(e);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case z.AMPERSAND:{this.returnState=j.RCDATA,this.state=j.CHARACTER_REFERENCE;break}case z.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(bd(e))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(e);else switch(e){case z.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case z.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case z.QUESTION_MARK:{this._err(he.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e);break}case z.EOF:{this._err(he.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(bd(e))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(e);else switch(e){case z.GREATER_THAN_SIGN:{this._err(he.missingEndTagName),this.state=j.DATA;break}case z.EOF:{this._err(he.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(he.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.tagName+=Gi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:t.tagName+=String.fromCodePoint(s0(e)?qw(e):e)}}_stateRcdataLessThanSign(e){e===z.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){bd(e)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case z.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case z.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===z.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){bd(e)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case z.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case z.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){bd(e)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===z.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===z.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===z.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:bd(e)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){bd(e)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Jn.SCRIPT,!1)&&HW(this.preprocessor.peek(Jn.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Jn.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Gi);break}case z.EOF:{this._err(he.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===z.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Jn.SCRIPT,!1)&&HW(this.preprocessor.peek(Jn.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Jn.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case z.EQUALS_SIGN:{this._err(he.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case z.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:{this._err(he.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.name+=Gi;break}default:this.currentAttr.name+=String.fromCodePoint(s0(e)?qw(e):e)}}_stateAfterAttributeName(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case z.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Gi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case z.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Gi;break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.AMPERSAND:{this.returnState=j.ATTRIBUTE_VALUE_UNQUOTED,this.state=j.CHARACTER_REFERENCE;break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),this.currentAttr.value+=Gi;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:case z.EQUALS_SIGN:case z.GRAVE_ACCENT:{this._err(he.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._err(he.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case z.GREATER_THAN_SIGN:{let t=this.currentToken;t.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(he.eofInTag),this._emitEOFToken();break}default:this._err(he.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this.emitCurrentComment(t),this._emitEOFToken();break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.data+=Gi;break}default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Jn.DASH_DASH,!0)?(this._createCommentToken(Jn.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(Jn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Jn.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(Jn.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(he.cdataInHtmlContent),this._createCommentToken(Jn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(he.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptClosingOfEmptyComment),this.state=j.DATA;let t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=j.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=j.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case z.LESS_THAN_SIGN:{t.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.data+=Gi;break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case z.EXCLAMATION_MARK:{t.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case z.LESS_THAN_SIGN:{t.data+="<";break}default:this.state=j.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===z.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===z.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==z.GREATER_THAN_SIGN&&e!==z.EOF&&this._err(he.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="-",this.state=j.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(t);break}case z.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case z.HYPHEN_MINUS:{t.data+="-";break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--",this.state=j.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case z.HYPHEN_MINUS:{t.data+="--!",this.state=j.COMMENT_END_DASH;break}case z.GREATER_THAN_SIGN:{this._err(he.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(t);break}case z.EOF:{this._err(he.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break}default:t.data+="--!",this.state=j.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case z.EOF:{this._err(he.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(s0(e))this._createDoctypeToken(String.fromCharCode(qw(e))),this.state=j.DOCTYPE_NAME;else switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.NULL:{this._err(he.unexpectedNullCharacter),this._createDoctypeToken(Gi),this.state=j.DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeName),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),this._createDoctypeToken(null);let t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.name+=Gi;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.name+=String.fromCodePoint(s0(e)?qw(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Jn.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Jn.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(he.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.publicId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case z.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.publicId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case z.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.QUOTATION_MARK:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(he.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(he.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{t.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(he.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(t);break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case z.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.systemId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case z.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(he.unexpectedNullCharacter),t.systemId+=Gi;break}case z.GREATER_THAN_SIGN:{this._err(he.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.EOF:{this._err(he.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(he.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(t),this.state=j.DATA;break}case z.NULL:{this._err(he.unexpectedNullCharacter);break}case z.EOF:{this.emitCurrentDoctype(t),this._emitEOFToken();break}default:}}_stateCdataSection(e){switch(e){case z.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case z.EOF:{this._err(he.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===z.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case z.GREATER_THAN_SIGN:{this.state=j.DATA;break}case z.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===z.NUMBER_SIGN?this.state=j.NUMERIC_CHARACTER_REFERENCE:W6(e)?(this.state=j.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){let t=this._matchNamedCharacterReference(e);if(!this._ensureHibernation())if(t){for(let r=0;r<t.length;r++)this._flushCodePointConsumedAsCharacterReference(t[r]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this.state=j.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){W6(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===z.SEMICOLON&&this._err(he.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===z.LATIN_SMALL_X||e===z.LATIN_CAPITAL_X?this.state=j.HEXADEMICAL_CHARACTER_REFERENCE_START:a0(e)?(this.state=j.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(he.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(z.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){ohe(e)?(this.state=j.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e)):(this._err(he.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(z.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState)}_stateHexademicalCharacterReference(e){UW(e)?this.charRefCode=this.charRefCode*16+e-55:jW(e)?this.charRefCode=this.charRefCode*16+e-87:a0(e)?this.charRefCode=this.charRefCode*16+e-48:e===z.SEMICOLON?this.state=j.NUMERIC_CHARACTER_REFERENCE_END:(this._err(he.missingSemicolonAfterCharacterReference),this.state=j.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){a0(e)?this.charRefCode=this.charRefCode*10+e-48:e===z.SEMICOLON?this.state=j.NUMERIC_CHARACTER_REFERENCE_END:(this._err(he.missingSemicolonAfterCharacterReference),this.state=j.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===z.NULL)this._err(he.nullCharacterReference),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(he.characterReferenceOutsideUnicodeRange),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(Uw(this.charRefCode))this._err(he.surrogateCharacterReference),this.charRefCode=z.REPLACEMENT_CHARACTER;else if(Ww(this.charRefCode))this._err(he.noncharacterCharacterReference);else if(jw(this.charRefCode)||this.charRefCode===z.CARRIAGE_RETURN){this._err(he.controlCharacterReference);let t=rhe.get(this.charRefCode);t!==void 0&&(this.charRefCode=t)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}};var qW=new Set([v.DD,v.DT,v.LI,v.OPTGROUP,v.OPTION,v.P,v.RB,v.RP,v.RT,v.RTC]),VW=new Set([...qW,v.CAPTION,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]),Kw=new Map([[v.APPLET,_e.HTML],[v.CAPTION,_e.HTML],[v.HTML,_e.HTML],[v.MARQUEE,_e.HTML],[v.OBJECT,_e.HTML],[v.TABLE,_e.HTML],[v.TD,_e.HTML],[v.TEMPLATE,_e.HTML],[v.TH,_e.HTML],[v.ANNOTATION_XML,_e.MATHML],[v.MI,_e.MATHML],[v.MN,_e.MATHML],[v.MO,_e.MATHML],[v.MS,_e.MATHML],[v.MTEXT,_e.MATHML],[v.DESC,_e.SVG],[v.FOREIGN_OBJECT,_e.SVG],[v.TITLE,_e.SVG]]),ahe=[v.H1,v.H2,v.H3,v.H4,v.H5,v.H6],lhe=[v.TR,v.TEMPLATE,v.HTML],che=[v.TBODY,v.TFOOT,v.THEAD,v.TEMPLATE,v.HTML],dhe=[v.TABLE,v.TEMPLATE,v.HTML],uhe=[v.TD,v.TH],$w=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=v.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===v.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===_e.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){let n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==_e.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(t<0?0:t)}popUntilPopped(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ahe,_e.HTML)}popUntilTableCellPopped(){this.popUntilPopped(uhe,_e.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let r=this.stackTop;r>=0;r--)if(e.includes(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){let r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(dhe,_e.HTML)}clearBackToTableBodyContext(){this.clearBackTo(che,_e.HTML)}clearBackToTableRowContext(){this.clearBackTo(lhe,_e.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===v.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===v.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===_e.HTML)return!0;if(Kw.get(r)===n)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e],r=this.treeAdapter.getNamespaceURI(this.items[e]);if(o0(t)&&r===_e.HTML)return!0;if(Kw.get(t)===r)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===_e.HTML)return!0;if((r===v.UL||r===v.OL)&&n===_e.HTML||Kw.get(r)===n)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===_e.HTML)return!0;if(r===v.BUTTON&&n===_e.HTML||Kw.get(r)===n)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===_e.HTML){if(r===e)return!0;if(r===v.TABLE||r===v.TEMPLATE||r===v.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===_e.HTML){if(t===v.TBODY||t===v.THEAD||t===v.TFOOT)return!0;if(t===v.TABLE||t===v.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===_e.HTML){if(r===e)return!0;if(r!==v.OPTION&&r!==v.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;qW.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;VW.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&VW.has(this.currentTagId);)this.pop()}};var ds;(function(i){i[i.Marker=0]="Marker",i[i.Element=1]="Element"})(ds=ds||(ds={}));var KW={type:ds.Marker},Gw=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let r=[],n=t.length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a<this.entries.length;a++){let l=this.entries[a];if(l.type===ds.Marker)break;let{element:c}=l;if(this.treeAdapter.getTagName(c)===o&&this.treeAdapter.getNamespaceURI(c)===s){let d=this.treeAdapter.getAttrList(c);d.length===n&&r.push({idx:a,attrs:d})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,t);if(r.length<3)return;let n=new Map(t.map(s=>[s.name,s.value])),o=0;for(let s=0;s<r.length;s++){let a=r[s];a.attrs.every(l=>n.get(l.name)===l.value)&&(o+=1,o>=3&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(KW)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:ds.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ds.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(KW);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){let t=this.entries.find(r=>r.type===ds.Marker||this.treeAdapter.getTagName(r.element)===e);return t&&t.type===ds.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===ds.Element&&t.element===e)}};function $W(i){return{nodeName:"#text",value:i,parentNode:null}}var ql={createDocument(){return{nodeName:"#document",mode:gn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(i){return{nodeName:"#comment",data:i,parentNode:null}},appendChild(i,e){i.childNodes.push(e),e.parentNode=i},insertBefore(i,e,t){let r=i.childNodes.indexOf(t);i.childNodes.splice(r,0,e),e.parentNode=i},setTemplateContent(i,e){i.content=e},getTemplateContent(i){return i.content},setDocumentType(i,e,t,r){let n=i.childNodes.find(o=>o.nodeName==="#documentType");if(n)n.name=e,n.publicId=t,n.systemId=r;else{let o={nodeName:"#documentType",name:e,publicId:t,systemId:r,parentNode:null};ql.appendChild(i,o)}},setDocumentMode(i,e){i.mode=e},getDocumentMode(i){return i.mode},detachNode(i){if(i.parentNode){let e=i.parentNode.childNodes.indexOf(i);i.parentNode.childNodes.splice(e,1),i.parentNode=null}},insertText(i,e){if(i.childNodes.length>0){let t=i.childNodes[i.childNodes.length-1];if(ql.isTextNode(t)){t.value+=e;return}}ql.appendChild(i,$W(e))},insertTextBefore(i,e,t){let r=i.childNodes[i.childNodes.indexOf(t)-1];r&&ql.isTextNode(r)?r.value+=e:ql.insertBefore(i,$W(e),t)},adoptAttributes(i,e){let t=new Set(i.attrs.map(r=>r.name));for(let r=0;r<e.length;r++)t.has(e[r].name)||i.attrs.push(e[r])},getFirstChild(i){return i.childNodes[0]},getChildNodes(i){return i.childNodes},getParentNode(i){return i.parentNode},getAttrList(i){return i.attrs},getTagName(i){return i.tagName},getNamespaceURI(i){return i.namespaceURI},getTextNodeContent(i){return i.value},getCommentNodeContent(i){return i.data},getDocumentTypeNodeName(i){return i.name},getDocumentTypeNodePublicId(i){return i.publicId},getDocumentTypeNodeSystemId(i){return i.systemId},isTextNode(i){return i.nodeName==="#text"},isCommentNode(i){return i.nodeName==="#comment"},isDocumentTypeNode(i){return i.nodeName==="#documentType"},isElementNode(i){return Object.prototype.hasOwnProperty.call(i,"tagName")},setNodeSourceCodeLocation(i,e){i.sourceCodeLocation=e},getNodeSourceCodeLocation(i){return i.sourceCodeLocation},updateNodeSourceCodeLocation(i,e){i.sourceCodeLocation=ue(ue({},i.sourceCodeLocation),e)}};var YW="html",hhe="about:legacy-compat",fhe="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",XW=["+//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//"],phe=[...XW,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],mhe=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),QW=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ghe=[...QW,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function GW(i,e){return e.some(t=>i.startsWith(t))}function ZW(i){return i.name===YW&&i.publicId===null&&(i.systemId===null||i.systemId===hhe)}function JW(i){if(i.name!==YW)return gn.QUIRKS;let{systemId:e}=i;if(e&&e.toLowerCase()===fhe)return gn.QUIRKS;let{publicId:t}=i;if(t!==null){if(t=t.toLowerCase(),mhe.has(t))return gn.QUIRKS;let r=e===null?phe:XW;if(GW(t,r))return gn.QUIRKS;if(r=e===null?QW:ghe,GW(t,r))return gn.LIMITED_QUIRKS}return gn.NO_QUIRKS}var Qw={};Gh(Qw,{SVG_TAG_NAMES_ADJUSTMENT_MAP:()=>tV,adjustTokenMathMLAttrs:()=>Yw,adjustTokenSVGAttrs:()=>Xw,adjustTokenSVGTagName:()=>q6,adjustTokenXMLAttrs:()=>c0,causesExit:()=>V6,isIntegrationPoint:()=>K6});var eV={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},vhe="definitionurl",_he="definitionURL",yhe=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(i=>[i.toLowerCase(),i])),whe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:_e.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:_e.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:_e.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:_e.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:_e.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:_e.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:_e.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:_e.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:_e.XML}],["xml:space",{prefix:"xml",name:"space",namespace:_e.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:_e.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:_e.XMLNS}]]),tV=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(i=>[i.toLowerCase(),i])),xhe=new Set([v.B,v.BIG,v.BLOCKQUOTE,v.BODY,v.BR,v.CENTER,v.CODE,v.DD,v.DIV,v.DL,v.DT,v.EM,v.EMBED,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HR,v.I,v.IMG,v.LI,v.LISTING,v.MENU,v.META,v.NOBR,v.OL,v.P,v.PRE,v.RUBY,v.S,v.SMALL,v.SPAN,v.STRONG,v.STRIKE,v.SUB,v.SUP,v.TABLE,v.TT,v.U,v.UL,v.VAR]);function V6(i){let e=i.tagID;return e===v.FONT&&i.attrs.some(({name:r})=>r===zs.COLOR||r===zs.SIZE||r===zs.FACE)||xhe.has(e)}function Yw(i){for(let e=0;e<i.attrs.length;e++)if(i.attrs[e].name===vhe){i.attrs[e].name=_he;break}}function Xw(i){for(let e=0;e<i.attrs.length;e++){let t=yhe.get(i.attrs[e].name);t!=null&&(i.attrs[e].name=t)}}function c0(i){for(let e=0;e<i.attrs.length;e++){let t=whe.get(i.attrs[e].name);t&&(i.attrs[e].prefix=t.prefix,i.attrs[e].name=t.name,i.attrs[e].namespace=t.namespace)}}function q6(i){let e=tV.get(i.tagName);e!=null&&(i.tagName=e,i.tagID=gd(i.tagName))}function Che(i,e){return e===_e.MATHML&&(i===v.MI||i===v.MO||i===v.MN||i===v.MS||i===v.MTEXT)}function She(i,e,t){if(e===_e.MATHML&&i===v.ANNOTATION_XML){for(let r=0;r<t.length;r++)if(t[r].name===zs.ENCODING){let n=t[r].value.toLowerCase();return n===eV.TEXT_HTML||n===eV.APPLICATION_XML}}return e===_e.SVG&&(i===v.FOREIGN_OBJECT||i===v.DESC||i===v.TITLE)}function K6(i,e,t,r){return(!r||r===_e.HTML)&&She(i,e,t)||(!r||r===_e.MATHML)&&Che(i,e)}var khe="hidden",Ehe=8,The=3,$;(function(i){i[i.INITIAL=0]="INITIAL",i[i.BEFORE_HTML=1]="BEFORE_HTML",i[i.BEFORE_HEAD=2]="BEFORE_HEAD",i[i.IN_HEAD=3]="IN_HEAD",i[i.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",i[i.AFTER_HEAD=5]="AFTER_HEAD",i[i.IN_BODY=6]="IN_BODY",i[i.TEXT=7]="TEXT",i[i.IN_TABLE=8]="IN_TABLE",i[i.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",i[i.IN_CAPTION=10]="IN_CAPTION",i[i.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",i[i.IN_TABLE_BODY=12]="IN_TABLE_BODY",i[i.IN_ROW=13]="IN_ROW",i[i.IN_CELL=14]="IN_CELL",i[i.IN_SELECT=15]="IN_SELECT",i[i.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",i[i.IN_TEMPLATE=17]="IN_TEMPLATE",i[i.AFTER_BODY=18]="AFTER_BODY",i[i.IN_FRAMESET=19]="IN_FRAMESET",i[i.AFTER_FRAMESET=20]="AFTER_FRAMESET",i[i.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",i[i.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})($||($={}));var Ihe={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},oV=new Set([v.TABLE,v.TBODY,v.TFOOT,v.THEAD,v.TR]),iV={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ql,onParseError:null},Kl=class{constructor(e,t,r=null,n=null){this.fragmentContext=r,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=ue(ue({},iV),e),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t!=null?t:this.treeAdapter.createDocument(),this.tokenizer=new l0(this.options,this),this.activeFormattingElements=new Gw(this.treeAdapter),this.fragmentContextID=r?gd(this.treeAdapter.getTagName(r)):v.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new $w(this.document,this.treeAdapter,this)}static parse(e,t){let r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){let r=ue(ue({},iV),t);e!=null||(e=r.treeAdapter.createElement(re.TEMPLATE,_e.HTML,[]));let n=r.treeAdapter.createElement("documentmock",_e.HTML,[]),o=new this(r,n,e);return o.fragmentContextID===v.TEMPLATE&&o.tmplInsertionModeStack.unshift($.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var n;if(!this.onParseError)return;let o=(n=e.location)!==null&&n!==void 0?n:Ihe,s={code:t,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(s)}onItemPush(e,t,r){var n,o;(o=(n=this.treeAdapter).onItemPush)===null||o===void 0||o.call(n,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(n=(r=this.treeAdapter).onItemPop)===null||n===void 0||n.call(r,e,this.openElements.current),t){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(e,t){let r=e===this.document||this.treeAdapter.getNamespaceURI(e)===_e.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,_e.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=ir.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===re.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==_e.HTML))switch(this.fragmentContextID){case v.TITLE:case v.TEXTAREA:{this.tokenizer.state=ir.RCDATA;break}case v.STYLE:case v.XMP:case v.IFRAME:case v.NOEMBED:case v.NOFRAMES:case v.NOSCRIPT:{this.tokenizer.state=ir.RAWTEXT;break}case v.SCRIPT:{this.tokenizer.state=ir.SCRIPT_DATA;break}case v.PLAINTEXT:{this.tokenizer.state=ir.PLAINTEXT;break}default:}}_setDocumentType(e){let t=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,n),e.location){let s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let r=t&&xt(ue({},t),{startTag:t});this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,e)}}_appendElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){let r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){let r=this.treeAdapter.createElement(e,_e.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,_e.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(re.HTML,_e.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,v.HTML)}_appendCommentNode(e,t){let r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let n=this.treeAdapter.getChildNodes(t),o=r?n.lastIndexOf(r):n.length,s=n[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){let{endLine:l,endCol:c,endOffset:d}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,n=this.treeAdapter.getTagName(e),o=t.type===ni.END_TAG&&n===t.tagName?{endTag:ue({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):{current:t,currentTagId:r}=this.openElements,e.tagID===v.SVG&&this.treeAdapter.getTagName(t)===re.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===_e.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===v.MGLYPH||e.tagID===v.MALIGNMARK)&&!this._isIntegrationPoint(r,t,_e.HTML)}_processToken(e){switch(e.type){case ni.CHARACTER:{this.onCharacter(e);break}case ni.NULL_CHARACTER:{this.onNullCharacter(e);break}case ni.COMMENT:{this.onComment(e);break}case ni.DOCTYPE:{this.onDoctype(e);break}case ni.START_TAG:{this._processStartTag(e);break}case ni.END_TAG:{this.onEndTag(e);break}case ni.EOF:{this.onEof(e);break}case ni.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,t,r){let n=this.treeAdapter.getNamespaceURI(t),o=this.treeAdapter.getAttrList(t);return K6(e,n,o,r)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(n=>n.type===ds.Marker||this.openElements.contains(n.element)),r=t<0?e-1:t-1;for(let n=r;n>=0;n--){let o=this.activeFormattingElements.entries[n];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(v.P),this.openElements.popUntilTagNamePopped(v.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case v.TR:{this.insertionMode=$.IN_ROW;return}case v.TBODY:case v.THEAD:case v.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case v.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case v.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case v.TABLE:{this.insertionMode=$.IN_TABLE;return}case v.BODY:{this.insertionMode=$.IN_BODY;return}case v.FRAMESET:{this.insertionMode=$.IN_FRAMESET;return}case v.SELECT:{this._resetInsertionModeForSelect(e);return}case v.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case v.HTML:{this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return}case v.TD:case v.TH:{if(e>0){this.insertionMode=$.IN_CELL;return}break}case v.HEAD:{if(e>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let r=this.openElements.tagIDs[t];if(r===v.TEMPLATE)break;if(r===v.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return oV.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case v.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(t)===_e.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break}case v.TABLE:{let r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){let r=this.treeAdapter.getNamespaceURI(e);return j6[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){npe(this,e);return}switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{h0(this,e);break}case $.BEFORE_HEAD:{f0(this,e);break}case $.IN_HEAD:{p0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{m0(this,e);break}case $.AFTER_HEAD:{g0(this,e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{aV(this,e);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{$6(this,e);break}case $.IN_TABLE_TEXT:{fV(this,e);break}case $.IN_COLUMN_GROUP:{Jw(this,e);break}case $.AFTER_BODY:{ex(this,e);break}case $.AFTER_AFTER_BODY:{Zw(this,e);break}default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rpe(this,e);return}switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{h0(this,e);break}case $.BEFORE_HEAD:{f0(this,e);break}case $.IN_HEAD:{p0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{m0(this,e);break}case $.AFTER_HEAD:{g0(this,e);break}case $.TEXT:{this._insertCharacters(e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{$6(this,e);break}case $.IN_COLUMN_GROUP:{Jw(this,e);break}case $.AFTER_BODY:{ex(this,e);break}case $.AFTER_AFTER_BODY:{Zw(this,e);break}default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){G6(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{G6(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.AFTER_BODY:{Phe(this,e);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Ohe(this,e);break}default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{Fhe(this,e);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(e,he.misplacedDoctype);break}case $.IN_TABLE_TEXT:{u0(this,e);break}default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,he.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?ope(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{zhe(this,e);break}case $.BEFORE_HEAD:{Hhe(this,e);break}case $.IN_HEAD:{Bs(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Whe(this,e);break}case $.AFTER_HEAD:{qhe(this,e);break}case $.IN_BODY:{Fn(this,e);break}case $.IN_TABLE:{Qf(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.IN_CAPTION:{Ufe(this,e);break}case $.IN_COLUMN_GROUP:{Z6(this,e);break}case $.IN_TABLE_BODY:{rx(this,e);break}case $.IN_ROW:{nx(this,e);break}case $.IN_CELL:{Vfe(this,e);break}case $.IN_SELECT:{gV(this,e);break}case $.IN_SELECT_IN_TABLE:{Kfe(this,e);break}case $.IN_TEMPLATE:{Gfe(this,e);break}case $.AFTER_BODY:{Xfe(this,e);break}case $.IN_FRAMESET:{Qfe(this,e);break}case $.AFTER_FRAMESET:{Jfe(this,e);break}case $.AFTER_AFTER_BODY:{tpe(this,e);break}case $.AFTER_AFTER_FRAMESET:{ipe(this,e);break}default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?spe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{Bhe(this,e);break}case $.BEFORE_HEAD:{Uhe(this,e);break}case $.IN_HEAD:{jhe(this,e);break}case $.IN_HEAD_NO_SCRIPT:{Vhe(this,e);break}case $.AFTER_HEAD:{Khe(this,e);break}case $.IN_BODY:{ix(this,e);break}case $.TEXT:{Dfe(this,e);break}case $.IN_TABLE:{b0(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.IN_CAPTION:{jfe(this,e);break}case $.IN_COLUMN_GROUP:{Wfe(this,e);break}case $.IN_TABLE_BODY:{Y6(this,e);break}case $.IN_ROW:{mV(this,e);break}case $.IN_CELL:{qfe(this,e);break}case $.IN_SELECT:{bV(this,e);break}case $.IN_SELECT_IN_TABLE:{$fe(this,e);break}case $.IN_TEMPLATE:{Yfe(this,e);break}case $.AFTER_BODY:{_V(this,e);break}case $.IN_FRAMESET:{Zfe(this,e);break}case $.AFTER_FRAMESET:{epe(this,e);break}case $.AFTER_AFTER_BODY:{Zw(this,e);break}default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:{d0(this,e);break}case $.BEFORE_HTML:{h0(this,e);break}case $.BEFORE_HEAD:{f0(this,e);break}case $.IN_HEAD:{p0(this,e);break}case $.IN_HEAD_NO_SCRIPT:{m0(this,e);break}case $.AFTER_HEAD:{g0(this,e);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{uV(this,e);break}case $.TEXT:{Mfe(this,e);break}case $.IN_TABLE_TEXT:{u0(this,e);break}case $.IN_TEMPLATE:{vV(this,e);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{Q6(this,e);break}default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===z.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(e);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{sV(this,e);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{$6(this,e);break}case $.IN_TABLE_TEXT:{hV(this,e);break}default:}}};function Lhe(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagID)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):dV(i,e),t}function Ahe(i,e){let t=null,r=i.openElements.stackTop;for(;r>=0;r--){let n=i.openElements.items[r];if(n===e.element)break;i._isSpecialElement(n,i.openElements.tagIDs[r])&&(t=n)}return t||(i.openElements.shortenToLength(r<0?0:r),i.activeFormattingElements.removeEntry(e)),t}function Dhe(i,e,t){let r=e,n=i.openElements.getCommonAncestor(e);for(let o=0,s=n;s!==t;o++,s=n){n=i.openElements.getCommonAncestor(s);let a=i.activeFormattingElements.getElementEntry(s),l=a&&o>=The;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=Mhe(i,a),r===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(r),i.treeAdapter.appendChild(s,r),r=s)}return r}function Mhe(i,e){let t=i.treeAdapter.getNamespaceURI(e.element),r=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,r),e.element=r,r}function Nhe(i,e,t){let r=i.treeAdapter.getTagName(e),n=gd(r);if(i._isElementCausesFosterParenting(n))i._fosterParentElement(t);else{let o=i.treeAdapter.getNamespaceURI(e);n===v.TEMPLATE&&o===_e.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function Rhe(i,e,t){let r=i.treeAdapter.getNamespaceURI(t.element),{token:n}=t,o=i.treeAdapter.createElement(n.tagName,r,n.attrs);i._adoptNodes(e,o),i.treeAdapter.appendChild(e,o),i.activeFormattingElements.insertElementAfterBookmark(o,n),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,o,n.tagID)}function X6(i,e){for(let t=0;t<Ehe;t++){let r=Lhe(i,e);if(!r)break;let n=Ahe(i,r);if(!n)break;i.activeFormattingElements.bookmark=r;let o=Dhe(i,n,r.element),s=i.openElements.getCommonAncestor(r.element);i.treeAdapter.detachNode(o),s&&Nhe(i,s,o),Rhe(i,n,r)}}function G6(i,e){i._appendCommentNode(e,i.openElements.currentTmplContentOrNode)}function Phe(i,e){i._appendCommentNode(e,i.openElements.items[0])}function Ohe(i,e){i._appendCommentNode(e,i.document)}function Q6(i,e){if(i.stopped=!0,e.location){let t=i.fragmentContext?0:2;for(let r=i.openElements.stackTop;r>=t;r--)i._setEndLocation(i.openElements.items[r],e);if(!i.fragmentContext&&i.openElements.stackTop>=0){let r=i.openElements.items[0],n=i.treeAdapter.getNodeSourceCodeLocation(r);if(n&&!n.endTag&&(i._setEndLocation(r,e),i.openElements.stackTop>=1)){let o=i.openElements.items[1],s=i.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&i._setEndLocation(o,e)}}}}function Fhe(i,e){i._setDocumentType(e);let t=e.forceQuirks?gn.QUIRKS:JW(e);ZW(e)||i._err(e,he.nonConformingDoctype),i.treeAdapter.setDocumentMode(i.document,t),i.insertionMode=$.BEFORE_HTML}function d0(i,e){i._err(e,he.missingDoctype,!0),i.treeAdapter.setDocumentMode(i.document,gn.QUIRKS),i.insertionMode=$.BEFORE_HTML,i._processToken(e)}function zhe(i,e){e.tagID===v.HTML?(i._insertElement(e,_e.HTML),i.insertionMode=$.BEFORE_HEAD):h0(i,e)}function Bhe(i,e){let t=e.tagID;(t===v.HTML||t===v.HEAD||t===v.BODY||t===v.BR)&&h0(i,e)}function h0(i,e){i._insertFakeRootElement(),i.insertionMode=$.BEFORE_HEAD,i._processToken(e)}function Hhe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.HEAD:{i._insertElement(e,_e.HTML),i.headElement=i.openElements.current,i.insertionMode=$.IN_HEAD;break}default:f0(i,e)}}function Uhe(i,e){let t=e.tagID;t===v.HEAD||t===v.BODY||t===v.HTML||t===v.BR?f0(i,e):i._err(e,he.endTagWithoutMatchingOpenElement)}function f0(i,e){i._insertFakeElement(re.HEAD,v.HEAD),i.headElement=i.openElements.current,i.insertionMode=$.IN_HEAD,i._processToken(e)}function Bs(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.TITLE:{i._switchToTextParsing(e,ir.RCDATA);break}case v.NOSCRIPT:{i.options.scriptingEnabled?i._switchToTextParsing(e,ir.RAWTEXT):(i._insertElement(e,_e.HTML),i.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case v.NOFRAMES:case v.STYLE:{i._switchToTextParsing(e,ir.RAWTEXT);break}case v.SCRIPT:{i._switchToTextParsing(e,ir.SCRIPT_DATA);break}case v.TEMPLATE:{i._insertTemplate(e),i.activeFormattingElements.insertMarker(),i.framesetOk=!1,i.insertionMode=$.IN_TEMPLATE,i.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case v.HEAD:{i._err(e,he.misplacedStartTagForHeadElement);break}default:p0(i,e)}}function jhe(i,e){switch(e.tagID){case v.HEAD:{i.openElements.pop(),i.insertionMode=$.AFTER_HEAD;break}case v.BODY:case v.BR:case v.HTML:{p0(i,e);break}case v.TEMPLATE:{Hu(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function Hu(i,e){i.openElements.tmplCount>0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagId!==v.TEMPLATE&&i._err(e,he.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(v.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode()):i._err(e,he.endTagWithoutMatchingOpenElement)}function p0(i,e){i.openElements.pop(),i.insertionMode=$.AFTER_HEAD,i._processToken(e)}function Whe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.BASEFONT:case v.BGSOUND:case v.HEAD:case v.LINK:case v.META:case v.NOFRAMES:case v.STYLE:{Bs(i,e);break}case v.NOSCRIPT:{i._err(e,he.nestedNoscriptInHead);break}default:m0(i,e)}}function Vhe(i,e){switch(e.tagID){case v.NOSCRIPT:{i.openElements.pop(),i.insertionMode=$.IN_HEAD;break}case v.BR:{m0(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function m0(i,e){let t=e.type===ni.EOF?he.openElementsLeftAfterEof:he.disallowedContentInNoscriptInHead;i._err(e,t),i.openElements.pop(),i.insertionMode=$.IN_HEAD,i._processToken(e)}function qhe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.BODY:{i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=$.IN_BODY;break}case v.FRAMESET:{i._insertElement(e,_e.HTML),i.insertionMode=$.IN_FRAMESET;break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{i._err(e,he.abandonedHeadElementChild),i.openElements.push(i.headElement,v.HEAD),Bs(i,e),i.openElements.remove(i.headElement);break}case v.HEAD:{i._err(e,he.misplacedStartTagForHeadElement);break}default:g0(i,e)}}function Khe(i,e){switch(e.tagID){case v.BODY:case v.HTML:case v.BR:{g0(i,e);break}case v.TEMPLATE:{Hu(i,e);break}default:i._err(e,he.endTagWithoutMatchingOpenElement)}}function g0(i,e){i._insertFakeElement(re.BODY,v.BODY),i.insertionMode=$.IN_BODY,tx(i,e)}function tx(i,e){switch(e.type){case ni.CHARACTER:{aV(i,e);break}case ni.WHITESPACE_CHARACTER:{sV(i,e);break}case ni.COMMENT:{G6(i,e);break}case ni.START_TAG:{Fn(i,e);break}case ni.END_TAG:{ix(i,e);break}case ni.EOF:{uV(i,e);break}default:}}function sV(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function aV(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function $he(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function Ghe(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function Yhe(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_FRAMESET)}function Xhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML)}function Qhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),o0(i.openElements.currentTagId)&&i.openElements.pop(),i._insertElement(e,_e.HTML)}function Zhe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function Jhe(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),t||(i.formElement=i.openElements.current))}function efe(i,e){i.framesetOk=!1;let t=e.tagID;for(let r=i.openElements.stackTop;r>=0;r--){let n=i.openElements.tagIDs[r];if(t===v.LI&&n===v.LI||(t===v.DD||t===v.DT)&&(n===v.DD||n===v.DT)){i.openElements.generateImpliedEndTagsWithExclusion(n),i.openElements.popUntilTagNamePopped(n);break}if(n!==v.ADDRESS&&n!==v.DIV&&n!==v.P&&i._isSpecialElement(i.openElements.items[r],n))break}i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML)}function tfe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.tokenizer.state=ir.PLAINTEXT}function ife(i,e){i.openElements.hasInScope(v.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.framesetOk=!1}function rfe(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(re.A);t&&(X6(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function nfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function ofe(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(v.NOBR)&&(X6(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,_e.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function sfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function afe(i,e){i.treeAdapter.getDocumentMode(i.document)!==gn.QUIRKS&&i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=$.IN_TABLE}function lV(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,_e.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function cV(i){let e=n0(i,zs.TYPE);return e!=null&&e.toLowerCase()===khe}function lfe(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,_e.HTML),cV(e)||(i.framesetOk=!1),e.ackSelfClosing=!0}function cfe(i,e){i._appendElement(e,_e.HTML),e.ackSelfClosing=!0}function dfe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._appendElement(e,_e.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function ufe(i,e){e.tagName=re.IMG,e.tagID=v.IMG,lV(i,e)}function hfe(i,e){i._insertElement(e,_e.HTML),i.skipNextNewLine=!0,i.tokenizer.state=ir.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=$.TEXT}function ffe(i,e){i.openElements.hasInButtonScope(v.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,ir.RAWTEXT)}function pfe(i,e){i.framesetOk=!1,i._switchToTextParsing(e,ir.RAWTEXT)}function rV(i,e){i._switchToTextParsing(e,ir.RAWTEXT)}function mfe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML),i.framesetOk=!1,i.insertionMode=i.insertionMode===$.IN_TABLE||i.insertionMode===$.IN_CAPTION||i.insertionMode===$.IN_TABLE_BODY||i.insertionMode===$.IN_ROW||i.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function gfe(i,e){i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML)}function bfe(i,e){i.openElements.hasInScope(v.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,_e.HTML)}function vfe(i,e){i.openElements.hasInScope(v.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(v.RTC),i._insertElement(e,_e.HTML)}function _fe(i,e){i._reconstructActiveFormattingElements(),Yw(e),c0(e),e.selfClosing?i._appendElement(e,_e.MATHML):i._insertElement(e,_e.MATHML),e.ackSelfClosing=!0}function yfe(i,e){i._reconstructActiveFormattingElements(),Xw(e),c0(e),e.selfClosing?i._appendElement(e,_e.SVG):i._insertElement(e,_e.SVG),e.ackSelfClosing=!0}function nV(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,_e.HTML)}function Fn(i,e){switch(e.tagID){case v.I:case v.S:case v.B:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.SMALL:case v.STRIKE:case v.STRONG:{nfe(i,e);break}case v.A:{rfe(i,e);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{Qhe(i,e);break}case v.P:case v.DL:case v.OL:case v.UL:case v.DIV:case v.DIR:case v.NAV:case v.MAIN:case v.MENU:case v.ASIDE:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.DETAILS:case v.ADDRESS:case v.ARTICLE:case v.SECTION:case v.SUMMARY:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{Xhe(i,e);break}case v.LI:case v.DD:case v.DT:{efe(i,e);break}case v.BR:case v.IMG:case v.WBR:case v.AREA:case v.EMBED:case v.KEYGEN:{lV(i,e);break}case v.HR:{dfe(i,e);break}case v.RB:case v.RTC:{bfe(i,e);break}case v.RT:case v.RP:{vfe(i,e);break}case v.PRE:case v.LISTING:{Zhe(i,e);break}case v.XMP:{ffe(i,e);break}case v.SVG:{yfe(i,e);break}case v.HTML:{$he(i,e);break}case v.BASE:case v.LINK:case v.META:case v.STYLE:case v.TITLE:case v.SCRIPT:case v.BGSOUND:case v.BASEFONT:case v.TEMPLATE:{Bs(i,e);break}case v.BODY:{Ghe(i,e);break}case v.FORM:{Jhe(i,e);break}case v.NOBR:{ofe(i,e);break}case v.MATH:{_fe(i,e);break}case v.TABLE:{afe(i,e);break}case v.INPUT:{lfe(i,e);break}case v.PARAM:case v.TRACK:case v.SOURCE:{cfe(i,e);break}case v.IMAGE:{ufe(i,e);break}case v.BUTTON:{ife(i,e);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{sfe(i,e);break}case v.IFRAME:{pfe(i,e);break}case v.SELECT:{mfe(i,e);break}case v.OPTION:case v.OPTGROUP:{gfe(i,e);break}case v.NOEMBED:{rV(i,e);break}case v.FRAMESET:{Yhe(i,e);break}case v.TEXTAREA:{hfe(i,e);break}case v.NOSCRIPT:{i.options.scriptingEnabled?rV(i,e):nV(i,e);break}case v.PLAINTEXT:{tfe(i,e);break}case v.COL:case v.TH:case v.TD:case v.TR:case v.HEAD:case v.FRAME:case v.TBODY:case v.TFOOT:case v.THEAD:case v.CAPTION:case v.COLGROUP:break;default:nV(i,e)}}function wfe(i,e){if(i.openElements.hasInScope(v.BODY)&&(i.insertionMode=$.AFTER_BODY,i.options.sourceCodeLocationInfo)){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i._setEndLocation(t,e)}}function xfe(i,e){i.openElements.hasInScope(v.BODY)&&(i.insertionMode=$.AFTER_BODY,_V(i,e))}function Cfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function Sfe(i){let e=i.openElements.tmplCount>0,{formElement:t}=i;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(v.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(v.FORM):t&&i.openElements.remove(t))}function kfe(i){i.openElements.hasInButtonScope(v.P)||i._insertFakeElement(re.P,v.P),i._closePElement()}function Efe(i){i.openElements.hasInListItemScope(v.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(v.LI),i.openElements.popUntilTagNamePopped(v.LI))}function Tfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function Ife(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function Lfe(i,e){let t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function Afe(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(re.BR,v.BR),i.openElements.pop(),i.framesetOk=!1}function dV(i,e){let t=e.tagName,r=e.tagID;for(let n=i.openElements.stackTop;n>0;n--){let o=i.openElements.items[n],s=i.openElements.tagIDs[n];if(r===s&&(r!==v.UNKNOWN||i.treeAdapter.getTagName(o)===t)){i.openElements.generateImpliedEndTagsWithExclusion(r),i.openElements.stackTop>=n&&i.openElements.shortenToLength(n);break}if(i._isSpecialElement(o,s))break}}function ix(i,e){switch(e.tagID){case v.A:case v.B:case v.I:case v.S:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.NOBR:case v.SMALL:case v.STRIKE:case v.STRONG:{X6(i,e);break}case v.P:{kfe(i);break}case v.DL:case v.UL:case v.OL:case v.DIR:case v.DIV:case v.NAV:case v.PRE:case v.MAIN:case v.MENU:case v.ASIDE:case v.BUTTON:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.ADDRESS:case v.ARTICLE:case v.DETAILS:case v.SECTION:case v.SUMMARY:case v.LISTING:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{Cfe(i,e);break}case v.LI:{Efe(i);break}case v.DD:case v.DT:{Tfe(i,e);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{Ife(i);break}case v.BR:{Afe(i);break}case v.BODY:{wfe(i,e);break}case v.HTML:{xfe(i,e);break}case v.FORM:{Sfe(i);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{Lfe(i,e);break}case v.TEMPLATE:{Hu(i,e);break}default:dV(i,e)}}function uV(i,e){i.tmplInsertionModeStack.length>0?vV(i,e):Q6(i,e)}function Dfe(i,e){var t;e.tagID===v.SCRIPT&&((t=i.scriptHandler)===null||t===void 0||t.call(i,i.openElements.current)),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function Mfe(i,e){i._err(e,he.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i.onEof(e)}function $6(i,e){if(oV.has(i.openElements.currentTagId))switch(i.pendingCharacterTokens.length=0,i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=$.IN_TABLE_TEXT,e.type){case ni.CHARACTER:{fV(i,e);break}case ni.WHITESPACE_CHARACTER:{hV(i,e);break}}else v0(i,e)}function Nfe(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_CAPTION}function Rfe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_COLUMN_GROUP}function Pfe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(re.COLGROUP,v.COLGROUP),i.insertionMode=$.IN_COLUMN_GROUP,Z6(i,e)}function Ofe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_TABLE_BODY}function Ffe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(re.TBODY,v.TBODY),i.insertionMode=$.IN_TABLE_BODY,rx(i,e)}function zfe(i,e){i.openElements.hasInTableScope(v.TABLE)&&(i.openElements.popUntilTagNamePopped(v.TABLE),i._resetInsertionMode(),i._processStartTag(e))}function Bfe(i,e){cV(e)?i._appendElement(e,_e.HTML):v0(i,e),e.ackSelfClosing=!0}function Hfe(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,_e.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function Qf(i,e){switch(e.tagID){case v.TD:case v.TH:case v.TR:{Ffe(i,e);break}case v.STYLE:case v.SCRIPT:case v.TEMPLATE:{Bs(i,e);break}case v.COL:{Pfe(i,e);break}case v.FORM:{Hfe(i,e);break}case v.TABLE:{zfe(i,e);break}case v.TBODY:case v.TFOOT:case v.THEAD:{Ofe(i,e);break}case v.INPUT:{Bfe(i,e);break}case v.CAPTION:{Nfe(i,e);break}case v.COLGROUP:{Rfe(i,e);break}default:v0(i,e)}}function b0(i,e){switch(e.tagID){case v.TABLE:{i.openElements.hasInTableScope(v.TABLE)&&(i.openElements.popUntilTagNamePopped(v.TABLE),i._resetInsertionMode());break}case v.TEMPLATE:{Hu(i,e);break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:v0(i,e)}}function v0(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,tx(i,e),i.fosterParentingEnabled=t}function hV(i,e){i.pendingCharacterTokens.push(e)}function fV(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function u0(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t<i.pendingCharacterTokens.length;t++)v0(i,i.pendingCharacterTokens[t]);else for(;t<i.pendingCharacterTokens.length;t++)i._insertCharacters(i.pendingCharacterTokens[t]);i.insertionMode=i.originalInsertionMode,i._processToken(e)}var pV=new Set([v.CAPTION,v.COL,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]);function Ufe(i,e){let t=e.tagID;pV.has(t)?i.openElements.hasInTableScope(v.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_TABLE,Qf(i,e)):Fn(i,e)}function jfe(i,e){let t=e.tagID;switch(t){case v.CAPTION:case v.TABLE:{i.openElements.hasInTableScope(v.CAPTION)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(v.CAPTION),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_TABLE,t===v.TABLE&&b0(i,e));break}case v.BODY:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:ix(i,e)}}function Z6(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.COL:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.TEMPLATE:{Bs(i,e);break}default:Jw(i,e)}}function Wfe(i,e){switch(e.tagID){case v.COLGROUP:{i.openElements.currentTagId===v.COLGROUP&&(i.openElements.pop(),i.insertionMode=$.IN_TABLE);break}case v.TEMPLATE:{Hu(i,e);break}case v.COL:break;default:Jw(i,e)}}function Jw(i,e){i.openElements.currentTagId===v.COLGROUP&&(i.openElements.pop(),i.insertionMode=$.IN_TABLE,i._processToken(e))}function rx(i,e){switch(e.tagID){case v.TR:{i.openElements.clearBackToTableBodyContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_ROW;break}case v.TH:case v.TD:{i.openElements.clearBackToTableBodyContext(),i._insertFakeElement(re.TR,v.TR),i.insertionMode=$.IN_ROW,nx(i,e);break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE,Qf(i,e));break}default:Qf(i,e)}}function Y6(i,e){let t=e.tagID;switch(e.tagID){case v.TBODY:case v.TFOOT:case v.THEAD:{i.openElements.hasInTableScope(t)&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE);break}case v.TABLE:{i.openElements.hasTableBodyContextInTableScope()&&(i.openElements.clearBackToTableBodyContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE,b0(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:case v.TR:break;default:b0(i,e)}}function nx(i,e){switch(e.tagID){case v.TH:case v.TD:{i.openElements.clearBackToTableRowContext(),i._insertElement(e,_e.HTML),i.insertionMode=$.IN_CELL,i.activeFormattingElements.insertMarker();break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,rx(i,e));break}default:Qf(i,e)}}function mV(i,e){switch(e.tagID){case v.TR:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY);break}case v.TABLE:{i.openElements.hasInTableScope(v.TR)&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,Y6(i,e));break}case v.TBODY:case v.TFOOT:case v.THEAD:{(i.openElements.hasInTableScope(e.tagID)||i.openElements.hasInTableScope(v.TR))&&(i.openElements.clearBackToTableRowContext(),i.openElements.pop(),i.insertionMode=$.IN_TABLE_BODY,Y6(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:break;default:b0(i,e)}}function Vfe(i,e){let t=e.tagID;pV.has(t)?(i.openElements.hasInTableScope(v.TD)||i.openElements.hasInTableScope(v.TH))&&(i._closeTableCell(),nx(i,e)):Fn(i,e)}function qfe(i,e){let t=e.tagID;switch(t){case v.TD:case v.TH:{i.openElements.hasInTableScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker(),i.insertionMode=$.IN_ROW);break}case v.TABLE:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{i.openElements.hasInTableScope(t)&&(i._closeTableCell(),mV(i,e));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:break;default:ix(i,e)}}function gV(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.OPTION:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i._insertElement(e,_e.HTML);break}case v.OPTGROUP:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop(),i.openElements.currentTagId===v.OPTGROUP&&i.openElements.pop(),i._insertElement(e,_e.HTML);break}case v.INPUT:case v.KEYGEN:case v.TEXTAREA:case v.SELECT:{i.openElements.hasInSelectScope(v.SELECT)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),e.tagID!==v.SELECT&&i._processStartTag(e));break}case v.SCRIPT:case v.TEMPLATE:{Bs(i,e);break}default:}}function bV(i,e){switch(e.tagID){case v.OPTGROUP:{i.openElements.stackTop>0&&i.openElements.currentTagId===v.OPTION&&i.openElements.tagIDs[i.openElements.stackTop-1]===v.OPTGROUP&&i.openElements.pop(),i.openElements.currentTagId===v.OPTGROUP&&i.openElements.pop();break}case v.OPTION:{i.openElements.currentTagId===v.OPTION&&i.openElements.pop();break}case v.SELECT:{i.openElements.hasInSelectScope(v.SELECT)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode());break}case v.TEMPLATE:{Hu(i,e);break}default:}}function Kfe(i,e){let t=e.tagID;t===v.CAPTION||t===v.TABLE||t===v.TBODY||t===v.TFOOT||t===v.THEAD||t===v.TR||t===v.TD||t===v.TH?(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),i._processStartTag(e)):gV(i,e)}function $fe(i,e){let t=e.tagID;t===v.CAPTION||t===v.TABLE||t===v.TBODY||t===v.TFOOT||t===v.THEAD||t===v.TR||t===v.TD||t===v.TH?i.openElements.hasInTableScope(t)&&(i.openElements.popUntilTagNamePopped(v.SELECT),i._resetInsertionMode(),i.onEndTag(e)):bV(i,e)}function Gfe(i,e){switch(e.tagID){case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{Bs(i,e);break}case v.CAPTION:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{i.tmplInsertionModeStack[0]=$.IN_TABLE,i.insertionMode=$.IN_TABLE,Qf(i,e);break}case v.COL:{i.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,i.insertionMode=$.IN_COLUMN_GROUP,Z6(i,e);break}case v.TR:{i.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,i.insertionMode=$.IN_TABLE_BODY,rx(i,e);break}case v.TD:case v.TH:{i.tmplInsertionModeStack[0]=$.IN_ROW,i.insertionMode=$.IN_ROW,nx(i,e);break}default:i.tmplInsertionModeStack[0]=$.IN_BODY,i.insertionMode=$.IN_BODY,Fn(i,e)}}function Yfe(i,e){e.tagID===v.TEMPLATE&&Hu(i,e)}function vV(i,e){i.openElements.tmplCount>0?(i.openElements.popUntilTagNamePopped(v.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode(),i.onEof(e)):Q6(i,e)}function Xfe(i,e){e.tagID===v.HTML?Fn(i,e):ex(i,e)}function _V(i,e){var t;if(e.tagID===v.HTML){if(i.fragmentContext||(i.insertionMode=$.AFTER_AFTER_BODY),i.options.sourceCodeLocationInfo&&i.openElements.tagIDs[0]===v.HTML){i._setEndLocation(i.openElements.items[0],e);let r=i.openElements.items[1];r&&!(!((t=i.treeAdapter.getNodeSourceCodeLocation(r))===null||t===void 0)&&t.endTag)&&i._setEndLocation(r,e)}}else ex(i,e)}function ex(i,e){i.insertionMode=$.IN_BODY,tx(i,e)}function Qfe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.FRAMESET:{i._insertElement(e,_e.HTML);break}case v.FRAME:{i._appendElement(e,_e.HTML),e.ackSelfClosing=!0;break}case v.NOFRAMES:{Bs(i,e);break}default:}}function Zfe(i,e){e.tagID===v.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagId!==v.FRAMESET&&(i.insertionMode=$.AFTER_FRAMESET))}function Jfe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.NOFRAMES:{Bs(i,e);break}default:}}function epe(i,e){e.tagID===v.HTML&&(i.insertionMode=$.AFTER_AFTER_FRAMESET)}function tpe(i,e){e.tagID===v.HTML?Fn(i,e):Zw(i,e)}function Zw(i,e){i.insertionMode=$.IN_BODY,tx(i,e)}function ipe(i,e){switch(e.tagID){case v.HTML:{Fn(i,e);break}case v.NOFRAMES:{Bs(i,e);break}default:}}function rpe(i,e){e.chars=Gi,i._insertCharacters(e)}function npe(i,e){i._insertCharacters(e),i.framesetOk=!1}function yV(i){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==_e.HTML&&!i._isIntegrationPoint(i.openElements.currentTagId,i.openElements.current);)i.openElements.pop()}function ope(i,e){if(V6(e))yV(i),i._startTagOutsideForeignContent(e);else{let t=i._getAdjustedCurrentElement(),r=i.treeAdapter.getNamespaceURI(t);r===_e.MATHML?Yw(e):r===_e.SVG&&(q6(e),Xw(e)),c0(e),e.selfClosing?i._appendElement(e,r):i._insertElement(e,r),e.ackSelfClosing=!0}}function spe(i,e){if(e.tagID===v.P||e.tagID===v.BR){yV(i),i._endTagOutsideForeignContent(e);return}for(let t=i.openElements.stackTop;t>0;t--){let r=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(r)===_e.HTML){i._endTagOutsideForeignContent(e);break}let n=i.treeAdapter.getTagName(r);if(n.toLowerCase()===e.tagName){e.tagName=n,i.openElements.shortenToLength(t);break}}}var ape=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),bMe=String.prototype.codePointAt!=null?(i,e)=>i.codePointAt(e):(i,e)=>(i.charCodeAt(e)&64512)===55296?(i.charCodeAt(e)-55296)*1024+i.charCodeAt(e+1)-56320+65536:i.charCodeAt(e);function J6(i,e){return function(r){let n,o=0,s="";for(;n=i.exec(r);)o!==n.index&&(s+=r.substring(o,n.index)),s+=e.get(n[0].charCodeAt(0)),o=n.index+1;return s+r.substring(o)}}var vMe=J6(/[&<>'"]/g,ape),lpe=J6(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),cpe=J6(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var CMe=new Set([re.AREA,re.BASE,re.BASEFONT,re.BGSOUND,re.BR,re.COL,re.EMBED,re.FRAME,re.HR,re.IMG,re.INPUT,re.KEYGEN,re.LINK,re.META,re.PARAM,re.SOURCE,re.TRACK,re.WBR]);function wV(i,e){return Kl.parse(i,e)}function xV(i,e,t){typeof i=="string"&&(t=e,e=i,i=null);let r=Kl.getFragmentParser(i,t);return r.tokenizer.write(e,!0),r.getFragment()}var dpe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),CV={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ox(i,e){let t=ype(i),r=Rf("type",{handlers:{root:upe,element:hpe,text:fpe,comment:kV,doctype:ppe,raw:gpe},unknown:bpe}),n={parser:t?new Kl(CV):Kl.getFragmentParser(void 0,CV),handle(a){r(a,n)},stitches:!1,options:e||{}};r(i,n),Zf(n,as());let o=t?n.parser.document:n.parser.getFragment(),s=r0(o,{file:n.options.file});return n.stitches&&Rn(s,"comment",function(a,l,c){let d=a;if(d.value.stitch&&c&&l!==void 0){let u=c.children;return u[l]=d.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===i.type?s.children[0]:s}function SV(i,e){let t=-1;if(i)for(;++t<i.length;)e.handle(i[t])}function upe(i,e){SV(i.children,e)}function hpe(i,e){vpe(i,e),SV(i.children,e),_pe(i,e)}function fpe(i,e){let t={type:Vl.TokenType.CHARACTER,chars:i.value,location:_0(i)};Zf(e,as(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function ppe(i,e){let t={type:Vl.TokenType.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:_0(i)};Zf(e,as(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function mpe(i,e){e.stitches=!0;let t=wpe(i);if("children"in i&&"children"in t){let r=ox({type:"root",children:i.children},e.options);t.children=r.children}kV({type:"comment",value:{stitch:t}},e)}function kV(i,e){let t=i.value,r={type:Vl.TokenType.COMMENT,data:t,location:_0(i)};Zf(e,as(i)),e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)}function gpe(i,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,EV(e,as(i)),e.parser.tokenizer.write(i.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;let t=e.parser.tokenizer._consume();e.parser.tokenizer._callState(t)}}function bpe(i,e){let t=i;if(e.options.passThrough&&e.options.passThrough.includes(t.type))mpe(t,e);else{let r="";throw dpe.has(t.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+t.type+"` node"+r)}}function Zf(i,e){EV(i,e);let t=i.parser.tokenizer.currentCharacterToken;t&&t.location&&(t.location.endLine=i.parser.tokenizer.preprocessor.line,t.location.endCol=i.parser.tokenizer.preprocessor.col+1,t.location.endOffset=i.parser.tokenizer.preprocessor.offset+1,i.parser.currentToken=t,i.parser._processToken(i.parser.currentToken)),i.parser.tokenizer.paused=!1,i.parser.tokenizer.inLoop=!1,i.parser.tokenizer.active=!1,i.parser.tokenizer.returnState=ir.DATA,i.parser.tokenizer.charRefCode=-1,i.parser.tokenizer.consumedAfterSnapshot=-1,i.parser.tokenizer.currentLocation=null,i.parser.tokenizer.currentCharacterToken=null,i.parser.tokenizer.currentToken=null,i.parser.tokenizer.currentAttr={name:"",value:""}}function EV(i,e){if(e&&e.offset!==void 0){let t={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};i.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,i.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,i.parser.tokenizer.preprocessor.line=e.line,i.parser.tokenizer.currentLocation=t}}function vpe(i,e){if(e.parser.tokenizer.state===ir.PLAINTEXT)return;Zf(e,as(i));let t=e.parser.openElements.current,r="namespaceURI"in t?t.namespaceURI:mo.html;r===mo.html&&i.tagName==="svg"&&(r=mo.svg);let n=R6(xt(ue({},i),{children:[]}),{space:r===mo.svg?"svg":"html"}),o="attrs"in n?n.attrs:[],s={type:Vl.TokenType.START_TAG,tagName:i.tagName,tagID:Xf.getTagID(i.tagName),selfClosing:!1,ackSelfClosing:!1,attrs:o,location:_0(i)};e.parser.currentToken=s,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=i.tagName}function _pe(i,e){if(!e.parser.tokenizer.inForeignNode&&Hw.includes(i.tagName)||e.parser.tokenizer.state===ir.PLAINTEXT)return;Zf(e,Ou(i));let t={type:Vl.TokenType.END_TAG,tagName:i.tagName,tagID:Xf.getTagID(i.tagName),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:_0(i)};e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken),t.tagName===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===ir.RCDATA||e.parser.tokenizer.state===ir.RAWTEXT||e.parser.tokenizer.state===ir.SCRIPT_DATA)&&(e.parser.tokenizer.state=ir.DATA)}function ype(i){let e=i.type==="root"?i.children[0]:i;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName==="html"))}function _0(i){let e=as(i)||{line:void 0,column:void 0,offset:void 0},t=Ou(i)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function wpe(i){return"children"in i?Os(xt(ue({},i),{children:[]})):Os(i)}function sx(i){return function(e,t){return ox(e,xt(ue({},i),{file:t}))}}function eT(i,e){return IV(i,e||{})||{type:"root",children:[]}}function IV(i,e){let t=xpe(i,e);return t&&e.afterTransform&&e.afterTransform(i,t),t}function xpe(i,e){switch(i.nodeType){case 1:return Epe(i,e);case 3:return Spe(i);case 8:return kpe(i);case 9:return TV(i,e);case 10:return Cpe();case 11:return TV(i,e);default:return}}function TV(i,e){return{type:"root",children:LV(i,e)}}function Cpe(){return{type:"doctype"}}function Spe(i){return{type:"text",value:i.nodeValue||""}}function kpe(i){return{type:"comment",value:i.nodeValue||""}}function Epe(i,e){let t=i.namespaceURI,r=t===mo.svg?i0:t0,n=t===mo.html?i.tagName.toLowerCase():i.tagName,o=t===mo.html&&n==="template"?i.content:i,s=i.getAttributeNames(),a={},l=-1;for(;++l<s.length;)a[s[l]]=i.getAttribute(s[l])||"";return r(n,a,LV(o,e))}function LV(i,e){let t=i.childNodes,r=[],n=-1;for(;++n<t.length;){let o=IV(t[n],e);o!==void 0&&r.push(o)}return r}var Tpe=new DOMParser;function AV(i,e){let t=e!=null&&e.fragment?Ipe(i):Tpe.parseFromString(i,"text/html");return eT(t)}function Ipe(i){let e=document.createElement("template");return e.innerHTML=i,e.content}var ax=function(i,e,t){let r=Ea(t);if(!i||!i.type||!i.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=i.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<i.children.length;)if(r(i.children[e],e,i))return i.children[e]};var $l=function(i){if(i==null)return Dpe;if(typeof i=="string")return Ape(i);if(typeof i=="object")return Lpe(i);if(typeof i=="function")return tT(i);throw new Error("Expected function, string, or array as `test`")};function Lpe(i){let e=[],t=-1;for(;++t<i.length;)e[t]=$l(i[t]);return tT(r);function r(...n){let o=-1;for(;++o<e.length;)if(e[o].apply(this,n))return!0;return!1}}function Ape(i){return tT(e);function e(t){return t.tagName===i}}function tT(i){return e;function e(t,r,n){return!!(Mpe(t)&&i.call(this,t,typeof r=="number"?r:void 0,n||void 0))}}function Dpe(i){return!!(i&&typeof i=="object"&&"type"in i&&i.type==="element"&&"tagName"in i&&typeof i.tagName=="string")}function Mpe(i){return i!==null&&typeof i=="object"&&"type"in i&&"tagName"in i}var DV=/\n/g,MV=/[\t ]+/g,iT=$l("br"),NV=$l(Bpe),Npe=$l("p"),RV=$l("tr"),Rpe=$l(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",zpe,Hpe]),PV=$l(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function y0(i,e={}){let t="children"in i?i.children:[],r=PV(i),n=zV(i,{whitespace:e.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(i.type==="text"||i.type==="comment")&&o.push(...FV(i,{whitespace:n,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<t.length;)o.push(...OV(t[s],i,{whitespace:n,breakBefore:s?void 0:r,breakAfter:s<t.length-1?iT(t[s+1]):r}));let a=[],l;for(s=-1;++s<o.length;){let c=o[s];typeof c=="number"?l!==void 0&&c>l&&(l=c):c&&(l!==void 0&&l>-1&&a.push(` +`.repeat(l)||" "),l=-1,a.push(c))}return a.join("")}function OV(i,e,t){return i.type==="element"?Ppe(i,e,t):i.type==="text"?t.whitespace==="normal"?FV(i,t):Ope(i):[]}function Ppe(i,e,t){let r=zV(i,t),n=i.children||[],o=-1,s=[];if(Rpe(i))return s;let a,l;for(iT(i)||RV(i)&&ax(e,i,RV)?l=` +`:Npe(i)?(a=2,l=2):PV(i)&&(a=1,l=1);++o<n.length;)s=s.concat(OV(n[o],i,{whitespace:r,breakBefore:o?void 0:a,breakAfter:o<n.length-1?iT(n[o+1]):l}));return NV(i)&&ax(e,i,NV)&&s.push(" "),a&&s.unshift(a),l&&s.push(l),s}function FV(i,e){let t=String(i.value),r=[],n=[],o=0;for(;o<=t.length;){DV.lastIndex=o;let l=DV.exec(t),c=l&&"index"in l?l.index:t.length;r.push(Fpe(t.slice(o,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?e.breakBefore:!0,c===t.length?e.breakAfter:!0)),o=c+1}let s=-1,a;for(;++s<r.length;)r[s].charCodeAt(r[s].length-1)===8203||s<r.length-1&&r[s+1].charCodeAt(0)===8203?(n.push(r[s]),a=void 0):r[s]?(typeof a=="number"&&n.push(a),n.push(r[s]),a=0):(s===0||s===r.length-1)&&n.push(0);return n}function Ope(i){return[String(i.value)]}function Fpe(i,e,t){let r=[],n=0,o;for(;n<i.length;){MV.lastIndex=n;let s=MV.exec(i);o=s?s.index:i.length,!n&&!o&&s&&!e&&r.push(""),n!==o&&r.push(i.slice(n,o)),n=s?o+s[0].length:o}return n!==o&&!t&&r.push(""),r.join(" ")}function zV(i,e){if(i.type==="element"){let t=i.properties||{};switch(i.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap";default:}}return e.whitespace}function zpe(i){return!!(i.properties||{}).hidden}function Bpe(i){return i.tagName==="td"||i.tagName==="th"}function Hpe(i){return i.tagName==="dialog"&&!(i.properties||{}).open}var Upe={},jpe=[];function lx(i){let e=i||Upe;return function(t,r){Iu(t,"element",function(n,o){let s=Array.isArray(n.properties.className)?n.properties.className:jpe,a=s.includes("language-math"),l=s.includes("math-display"),c=s.includes("math-inline"),d=l;if(!a&&!l&&!c)return;let u=o[o.length-1],h=n;if(n.tagName==="code"&&a&&u&&u.type==="element"&&u.tagName==="pre"&&(h=u,u=o[o.length-2],d=!0),!u)return;let f=y0(h,{whitespace:"pre"}),m;try{m=Kf.renderToString(f,xt(ue({},e),{displayMode:d,throwOnError:!0}))}catch(w){let _=w,E=_.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...o,n],cause:_,place:n.position,ruleId:E,source:"rehype-katex"}),E==="parseerror"?m=Kf.renderToString(f,xt(ue({},e),{displayMode:d,strict:"ignore",throwOnError:!1})):m=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(e.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:f}]}]}typeof m=="string"&&(m=AV(m,{fragment:!0}).children);let g=u.children.indexOf(h);return u.children.splice(g,1,...m),Nf})}}var BV={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",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 `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}};var Wpe="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",Vpe=/-[a-z]/g,qpe=/%c(?:([-+])(\d+))?/g,Kpe=/%x/g,$pe={2:!0,1:!1,0:null},Gpe={};function rT(i,e){let t=e||Gpe,r=t.onerror,n=i instanceof Zc?i:new Zc(i),o=t.fragment?xV:wV,s=String(n),a=o(s,{sourceCodeLocationInfo:!0,onParseError:t.onerror?l:null,scriptingEnabled:!1});return r0(a,{file:n,space:t.space,verbose:t.verbose});function l(c){let d=c.code,u=Ype(d),h=t[u],f=h==null?!0:h,m=typeof f=="number"?f:f?1:0;if(m){let w=BV[u];let _=new Ar(g(w.reason),{place:{start:{line:c.startLine,column:c.startCol,offset:c.startOffset},end:{line:c.endLine,column:c.endCol,offset:c.endOffset}},ruleId:d,source:"hast-util-from-html"});n.path&&(_.file=n.path,_.name=n.path+":"+_.name),_.fatal=$pe[m],_.note=g(w.description),_.url=w.url===!1?void 0:Wpe+d,r(_)}function g(w){return w.replace(qpe,_).replace(Kpe,E);function _(A,L,O){let U=(O?Number.parseInt(O,10):0)*(L==="-"?-1:1),Y=s.charAt(c.startOffset+U);return Qpe(Y)}function E(){return Zpe(s.charCodeAt(c.startOffset))}}}}function Ype(i){return i.replace(Vpe,Xpe)}function Xpe(i){return i.charAt(1).toUpperCase()}function Qpe(i){return i==="`"?"` ` `":i}function Zpe(i){return"0x"+i.toString(16).toUpperCase()}function cx(i){let e=this,o=ue(ue({},e.data("settings")),i),{emitParseErrors:t}=o,r=so(o,["emitParseErrors"]);e.parser=n;function n(s,a){return rT(s,xt(ue({},r),{onerror:t?function(l){a.path&&(l.name=a.path+":"+l.name,l.file=a.path),a.messages.push(l)}:void 0}))}}var Uu=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Hs={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Uu,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Uu],h2:[["id","footnote-label"],["className","sr-only"]],img:[...Uu,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Uu,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Uu],table:[...Uu],ul:[...Uu,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","disabled","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rel","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","target","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]};var vd={}.hasOwnProperty;function nT(i,e){let t={type:"root",children:[]},r={schema:e?ue(ue({},Hs),e):Hs,stack:[]},n=UV(r,i);return n&&(Array.isArray(n)?n.length===1?t=n[0]:t.children=n:t=n),t}function UV(i,e){if(e&&typeof e=="object"){let t=e;switch(typeof t.type=="string"?t.type:""){case"comment":return Jpe(i,t);case"doctype":return eme(i,t);case"element":return tme(i,t);case"root":return ime(i,t);case"text":return rme(i,t);default:}}}function Jpe(i,e){if(i.schema.allowComments){let t=typeof e.value=="string"?e.value:"",r=t.indexOf("-->"),o={type:"comment",value:r<0?t:t.slice(0,r)};return w0(o,e),o}}function eme(i,e){if(i.schema.allowDoctypes){let t={type:"doctype"};return w0(t,e),t}}function tme(i,e){let t=typeof e.tagName=="string"?e.tagName:"";i.stack.push(t);let r=jV(i,e.children),n=nme(i,e.properties);i.stack.pop();let o=!1;if(t.length>0&&t!=="*"&&(!i.schema.tagNames||i.schema.tagNames.includes(t))&&(o=!0,i.schema.ancestors&&vd.call(i.schema.ancestors,t))){let a=i.schema.ancestors[t],l=-1;for(o=!1;++l<a.length;)i.stack.includes(a[l])&&(o=!0)}if(!o)return i.schema.strip&&!i.schema.strip.includes(t)?r:void 0;let s={type:"element",tagName:t,properties:n,children:r};return w0(s,e),s}function ime(i,e){let r={type:"root",children:jV(i,e.children)};return w0(r,e),r}function rme(i,e){let r={type:"text",value:typeof e.value=="string"?e.value:""};return w0(r,e),r}function jV(i,e){let t=[];if(Array.isArray(e)){let r=e,n=-1;for(;++n<r.length;){let o=UV(i,r[n]);o&&(Array.isArray(o)?t.push(...o):t.push(o))}}return t}function nme(i,e){let t=i.stack[i.stack.length-1],r=i.schema.attributes,n=i.schema.required,o=r&&vd.call(r,t)?r[t]:void 0,s=r&&vd.call(r,"*")?r["*"]:void 0,a=e&&typeof e=="object"?e:{},l={},c;for(c in a)if(vd.call(a,c)){let d;if(o&&(d=HV(o,c)),!d&&s&&(d=HV(s,c)),d){let u=a[c],h=Array.isArray(u)?ome(i,d,c,u):WV(i,d,c,u);h!=null&&(l[c]=h)}}if(n&&vd.call(n,t)){let d=n[t];for(c in d)vd.call(d,c)&&!vd.call(l,c)&&(l[c]=d[c])}return l}function ome(i,e,t,r){let n=-1,o=[];for(;++n<r.length;){let s=WV(i,e,t,r[n]);(typeof s=="number"||typeof s=="string")&&o.push(s)}return o}function WV(i,e,t,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&sme(i,t,r)){if(typeof e=="object"&&e.length>1){let n=!1,o=0;for(;++o<e.length;){let s=e[o];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){n=!0;break}}else if(s===r){n=!0;break}}if(!n)return}return i.schema.clobber&&i.schema.clobberPrefix&&i.schema.clobber.includes(t)?i.schema.clobberPrefix+r:r}}function sme(i,e,t){let r=i.schema.protocols&&vd.call(i.schema.protocols,e)?i.schema.protocols[e]:void 0;if(!r||r.length===0)return!0;let n=String(t),o=n.indexOf(":"),s=n.indexOf("?"),a=n.indexOf("#"),l=n.indexOf("/");if(o<0||l>-1&&o>l||s>-1&&o>s||a>-1&&o>a)return!0;let c=-1;for(;++c<r.length;){let d=r[c];if(o===d.length&&n.slice(0,d.length)===d)return!0}return!1}function w0(i,e){let t=Yg(e);e.data&&(i.data=Os(e.data)),t&&(i.position=t)}function HV(i,e){let t,r=-1;for(;++r<i.length;){let n=i[r],o=typeof n=="string"?n:n[0];if(o===e)return n;o==="data*"&&(t=n)}if(e.length>4&&e.slice(0,4).toLowerCase()==="data")return t}function dx(i){return function(e){return nT(e,i)}}function VV(i,e){if(i=i.replace(e.subset?ame(e.subset):/["&'<>`]/g,r),e.subset||e.escapeOnly)return i;return i.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function t(n,o,s){return e.format((n.charCodeAt(0)-55296)*1024+n.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function r(n,o,s){return e.format(n.charCodeAt(0),s.charCodeAt(o+1),e)}}function ame(i){let e=[],t=-1;for(;++t<i.length;)e.push(i[t].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function qV(i,e,t){let r="&#x"+i.toString(16).toUpperCase();return t&&e&&!/[\dA-Fa-f]/.test(String.fromCharCode(e))?r:r+";"}function KV(i,e,t){let r="&#"+String(i);return t&&e&&!/\d/.test(String.fromCharCode(e))?r:r+";"}var $V=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var ux={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var GV=["cent","copy","divide","gt","lt","not","para","times"];var YV={}.hasOwnProperty,oT={},hx;for(hx in ux)YV.call(ux,hx)&&(oT[ux[hx]]=hx);function XV(i,e,t,r){let n=String.fromCharCode(i);if(YV.call(oT,n)){let o=oT[n],s="&"+o;return t&&$V.includes(o)&&!GV.includes(o)&&(!r||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?s:s+";"}return""}function QV(i,e,t){let r=qV(i,e,t.omitOptionalSemicolons),n;if((t.useNamedReferences||t.useShortestReferences)&&(n=XV(i,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!n)&&t.useShortestReferences){let o=KV(i,e,t.omitOptionalSemicolons);o.length<r.length&&(r=o)}return n&&(!t.useShortestReferences||n.length<r.length)?n:r}function Gl(i,e){return VV(i,Object.assign({format:QV},e))}function ZV(i,e,t,r){return r.settings.bogusComments?"<?"+Gl(i.value,Object.assign({},r.settings.characterReferences,{subset:[">"]}))+">":"<!--"+i.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,n)+"-->";function n(o){return Gl(o,Object.assign({},r.settings.characterReferences,{subset:["<",">"]}))}}function JV(i,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var lme=/[ \t\n\f\r]/g;function ju(i){return typeof i=="object"?i.type==="text"?eq(i.value):!1:eq(i)}function eq(i){return i.replace(lme,"")===""}var Er=tq(1),sT=tq(-1),cme=[];function tq(i){return e;function e(t,r,n){let o=t?t.children:cme,s=(r||0)+i,a=o[s];if(!n)for(;a&&ju(a);)s+=i,a=o[s];return a}}var dme={}.hasOwnProperty;function fx(i){return e;function e(t,r,n){return dme.call(i,t.tagName)&&i[t.tagName](t,r,n)}}var x0=fx({body:hme,caption:aT,colgroup:aT,dd:gme,dt:mme,head:aT,html:ume,li:pme,optgroup:bme,option:vme,p:fme,rp:iq,rt:iq,tbody:yme,td:rq,tfoot:wme,th:rq,thead:_me,tr:xme});function aT(i,e,t){let r=Er(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ju(r.value.charAt(0)))}function ume(i,e,t){let r=Er(t,e);return!r||r.type!=="comment"}function hme(i,e,t){let r=Er(t,e);return!r||r.type!=="comment"}function fme(i,e,t){let r=Er(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function pme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&r.tagName==="li"}function mme(i,e,t){let r=Er(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function gme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function iq(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function bme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function vme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function _me(i,e,t){let r=Er(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function yme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function wme(i,e,t){return!Er(t,e)}function xme(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function rq(i,e,t){let r=Er(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var nq=fx({body:kme,colgroup:Eme,head:Sme,html:Cme,tbody:Tme});function Cme(i){let e=Er(i,-1);return!e||e.type!=="comment"}function Sme(i){let e=i.children,t=[],r=-1;for(;++r<e.length;){let n=e[r];if(n.type==="element"&&(n.tagName==="title"||n.tagName==="base")){if(t.includes(n.tagName))return!1;t.push(n.tagName)}}return e.length>0}function kme(i){let e=Er(i,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ju(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Eme(i,e,t){let r=sT(t,e),n=Er(i,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&x0(r,t.children.indexOf(r),t)?!1:!!(n&&n.type==="element"&&n.tagName==="col")}function Tme(i,e,t){let r=sT(t,e),n=Er(i,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&x0(r,t.children.indexOf(r),t)?!1:!!(n&&n.type==="element"&&n.tagName==="tr")}var px={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 @@ -463,25 +463,25 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function nq(i,e,t,r){let n=r.schema,o=n.space==="svg"?!1:r.settings.omitOptionalTags,s=n.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(i.tagName.toLowerCase()),a=[],l;n.space==="html"&&i.tagName==="svg"&&(r.schema=cs);let c=Ime(r,i.properties),d=r.all(n.space==="html"&&i.tagName==="template"?i.content:i);return r.schema=n,d&&(s=!1),(c||!o||!rq(i,e,t))&&(a.push("<",i.tagName,c?" "+c:""),s&&(n.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(d),!s&&(!o||!x0(i,e,t))&&a.push("</"+i.tagName+">"),a.join("")}function Ime(i,e){let t=[],r=-1,n;if(e){for(n in e)if(e[n]!==null&&e[n]!==void 0){let o=Lme(i,n,e[n]);o&&t.push(o)}}for(;++r<t.length;){let o=i.settings.tightAttributes?t[r].charAt(t[r].length-1):void 0;r!==t.length-1&&o!=='"'&&o!=="'"&&(t[r]+=" ")}return t.join("")}function Lme(i,e,t){let r=jl(i.schema,e),n=i.settings.allowParseErrors&&i.schema.space==="html"?0:1,o=i.settings.allowDangerousCharacters?0:1,s=i.quote,a;if(r.overloadedBoolean&&(t===r.attribute||t==="")?t=!0:(r.boolean||r.overloadedBoolean&&typeof t!="string")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";let l=Gl(r.attribute,Object.assign({},i.settings.characterReferences,{subset:px.name[n][o]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?Fw:zw)(t,{padLeft:!i.settings.tightCommaSeparatedLists}):String(t),i.settings.collapseEmptyAttributes&&!t)?l:(i.settings.preferUnquoted&&(a=Gl(t,Object.assign({},i.settings.characterReferences,{attribute:!0,subset:px.unquoted[n][o]}))),a!==t&&(i.settings.quoteSmart&&Mf(t,s)>Mf(t,i.alternative)&&(s=i.alternative),a=s+Gl(t,Object.assign({},i.settings.characterReferences,{subset:(s==="'"?px.single:px.double)[n][o],attribute:!0}))+s),l+(a&&"="+a))}function mx(i,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?i.value:Gl(i.value,Object.assign({},r.settings.characterReferences,{subset:["<","&"]}))}function oq(i,e,t,r){return r.settings.allowDangerousHtml?i.value:mx(i,e,t,r)}function sq(i,e,t,r){return r.all(i)}var aq=Rf("type",{invalid:Ame,unknown:Dme,handlers:{comment:QV,doctype:ZV,element:nq,raw:oq,root:sq,text:mx}});function Ame(i){throw new Error("Expected node, not `"+i+"`")}function Dme(i){let e=i;throw new Error("Cannot compile unknown node `"+e.type+"`")}var Mme={},Nme={},Rme=[];function aT(i,e){let t=e||Mme,r=t.quote||'"',n=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Pme,all:Ome,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||Hw,characterReferences:t.characterReferences||Nme,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?cs:Wl,quote:r,alternative:n}.one(Array.isArray(i)?{type:"root",children:i}:i,void 0,void 0)}function Pme(i,e,t){return aq(i,e,t,this)}function Ome(i){let e=[],t=i&&i.children||Rme,r=-1;for(;++r<t.length;)e[r]=this.one(t[r],r,i);return e.join("")}function gx(i){let e=this,t=ue(ue({},e.data("settings")),i);e.compiler=r;function r(n){return aT(n,t)}}var Fme={inline:["$","$"],display:["$$","$$"]};function zme(i,e){e===void 0&&(e=Fme);for(var t=i.querySelectorAll(".katex-mathml + .katex-html"),r=0;r<t.length;r++){var n=t[r];n.remove?n.remove():n.parentNode&&n.parentNode.removeChild(n)}for(var o=i.querySelectorAll(".katex-mathml"),s=0;s<o.length;s++){var a=o[s],l=a.querySelector("annotation");l&&(a.replaceWith?a.replaceWith(l):a.parentNode&&a.parentNode.replaceChild(l,a),l.innerHTML=e.inline[0]+l.innerHTML+e.inline[1])}for(var c=i.querySelectorAll(".katex-display annotation"),d=0;d<c.length;d++){var u=c[d];u.innerHTML=e.display[0]+u.innerHTML.substr(e.inline[0].length,u.innerHTML.length-e.inline[0].length-e.inline[1].length)+e.display[1]}return i}function lq(i){var e=i instanceof Element?i:i.parentElement;return e&&e.closest(".katex")}document.addEventListener("copy",function(i){var e=window.getSelection();if(!(e.isCollapsed||!i.clipboardData)){var t=i.clipboardData,r=e.getRangeAt(0),n=lq(r.startContainer);n&&r.setStartBefore(n);var o=lq(r.endContainer);o&&r.setEndAfter(o);var s=r.cloneContents();if(s.querySelector(".katex-mathml")){var a=Array.prototype.map.call(s.childNodes,l=>l instanceof Text?l.textContent:l.outerHTML).join("");t.setData("text/html",a),t.setData("text/plain",zme(s).textContent),i.preventDefault()}}});function lT(i,e){let r=(e||{}).force||!1;Rn(i,n);function n(o){r?delete o.position:o.position=void 0}}window.MonacoEnvironment={globalAPI:!0,getWorkerUrl(i,e){return e==="json"?"/assets/language/json/json.worker.js":"/assets/editor/editor.worker.js"}};r_();pT();_T();xT();ST();IT();GT();eI();sI();cI();hI();fI();DI();b2();cb();kL();var Eyt=Wn(LL());wA();W0();Qb();OC();jC();JC();I8();O8();var Pyt=Wn(B8());U8();a7();u7();g7();b7();R7();j7();$7();nD();oD();dD();Cp();xD();iC();TD();FD();zD();KD();JS();xM();CM();var rwt=Wn(EM());TM();LM();PM();HM();jM();Ds();WM();qM();KM();$M();GM();YM();XM();QM();ZM();Wi();var Eve={autoFormatTriggerCharacters:[` +\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function oq(i,e,t,r){let n=r.schema,o=n.space==="svg"?!1:r.settings.omitOptionalTags,s=n.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(i.tagName.toLowerCase()),a=[],l;n.space==="html"&&i.tagName==="svg"&&(r.schema=cs);let c=Ime(r,i.properties),d=r.all(n.space==="html"&&i.tagName==="template"?i.content:i);return r.schema=n,d&&(s=!1),(c||!o||!nq(i,e,t))&&(a.push("<",i.tagName,c?" "+c:""),s&&(n.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(d),!s&&(!o||!x0(i,e,t))&&a.push("</"+i.tagName+">"),a.join("")}function Ime(i,e){let t=[],r=-1,n;if(e){for(n in e)if(e[n]!==null&&e[n]!==void 0){let o=Lme(i,n,e[n]);o&&t.push(o)}}for(;++r<t.length;){let o=i.settings.tightAttributes?t[r].charAt(t[r].length-1):void 0;r!==t.length-1&&o!=='"'&&o!=="'"&&(t[r]+=" ")}return t.join("")}function Lme(i,e,t){let r=jl(i.schema,e),n=i.settings.allowParseErrors&&i.schema.space==="html"?0:1,o=i.settings.allowDangerousCharacters?0:1,s=i.quote,a;if(r.overloadedBoolean&&(t===r.attribute||t==="")?t=!0:(r.boolean||r.overloadedBoolean&&typeof t!="string")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";let l=Gl(r.attribute,Object.assign({},i.settings.characterReferences,{subset:px.name[n][o]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?Fw:zw)(t,{padLeft:!i.settings.tightCommaSeparatedLists}):String(t),i.settings.collapseEmptyAttributes&&!t)?l:(i.settings.preferUnquoted&&(a=Gl(t,Object.assign({},i.settings.characterReferences,{attribute:!0,subset:px.unquoted[n][o]}))),a!==t&&(i.settings.quoteSmart&&Mf(t,s)>Mf(t,i.alternative)&&(s=i.alternative),a=s+Gl(t,Object.assign({},i.settings.characterReferences,{subset:(s==="'"?px.single:px.double)[n][o],attribute:!0}))+s),l+(a&&"="+a))}function mx(i,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?i.value:Gl(i.value,Object.assign({},r.settings.characterReferences,{subset:["<","&"]}))}function sq(i,e,t,r){return r.settings.allowDangerousHtml?i.value:mx(i,e,t,r)}function aq(i,e,t,r){return r.all(i)}var lq=Rf("type",{invalid:Ame,unknown:Dme,handlers:{comment:ZV,doctype:JV,element:oq,raw:sq,root:aq,text:mx}});function Ame(i){throw new Error("Expected node, not `"+i+"`")}function Dme(i){let e=i;throw new Error("Cannot compile unknown node `"+e.type+"`")}var Mme={},Nme={},Rme=[];function lT(i,e){let t=e||Mme,r=t.quote||'"',n=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Pme,all:Ome,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||Hw,characterReferences:t.characterReferences||Nme,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?cs:Wl,quote:r,alternative:n}.one(Array.isArray(i)?{type:"root",children:i}:i,void 0,void 0)}function Pme(i,e,t){return lq(i,e,t,this)}function Ome(i){let e=[],t=i&&i.children||Rme,r=-1;for(;++r<t.length;)e[r]=this.one(t[r],r,i);return e.join("")}function gx(i){let e=this,t=ue(ue({},e.data("settings")),i);e.compiler=r;function r(n){return lT(n,t)}}var Fme={inline:["$","$"],display:["$$","$$"]};function zme(i,e){e===void 0&&(e=Fme);for(var t=i.querySelectorAll(".katex-mathml + .katex-html"),r=0;r<t.length;r++){var n=t[r];n.remove?n.remove():n.parentNode&&n.parentNode.removeChild(n)}for(var o=i.querySelectorAll(".katex-mathml"),s=0;s<o.length;s++){var a=o[s],l=a.querySelector("annotation");l&&(a.replaceWith?a.replaceWith(l):a.parentNode&&a.parentNode.replaceChild(l,a),l.innerHTML=e.inline[0]+l.innerHTML+e.inline[1])}for(var c=i.querySelectorAll(".katex-display annotation"),d=0;d<c.length;d++){var u=c[d];u.innerHTML=e.display[0]+u.innerHTML.substr(e.inline[0].length,u.innerHTML.length-e.inline[0].length-e.inline[1].length)+e.display[1]}return i}function cq(i){var e=i instanceof Element?i:i.parentElement;return e&&e.closest(".katex")}document.addEventListener("copy",function(i){var e=window.getSelection();if(!(e.isCollapsed||!i.clipboardData)){var t=i.clipboardData,r=e.getRangeAt(0),n=cq(r.startContainer);n&&r.setStartBefore(n);var o=cq(r.endContainer);o&&r.setEndAfter(o);var s=r.cloneContents();if(s.querySelector(".katex-mathml")){var a=Array.prototype.map.call(s.childNodes,l=>l instanceof Text?l.textContent:l.outerHTML).join("");t.setData("text/html",a),t.setData("text/plain",zme(s).textContent),i.preventDefault()}}});function cT(i,e){let r=(e||{}).force||!1;Rn(i,n);function n(o){r?delete o.position:o.position=void 0}}window.MonacoEnvironment={globalAPI:!0,getWorkerUrl(i,e){return e==="json"?"/assets/language/json/json.worker.js":"/assets/editor/editor.worker.js"}};r_();mT();yT();CT();kT();LT();YT();tI();aI();dI();fI();pI();MI();b2();cb();EL();var Eyt=Wn(AL());xA();W0();Qb();OC();jC();JC();L8();F8();var Pyt=Wn(H8());j8();l7();h7();b7();v7();P7();W7();G7();oD();sD();uD();Cp();CD();iC();ID();zD();BD();$D();JS();CM();SM();var rwt=Wn(TM());IM();AM();OM();UM();WM();Ds();VM();KM();$M();GM();YM();XM();QM();ZM();JM();Wi();var Eve={autoFormatTriggerCharacters:[` `],provideOnTypeFormattingEdits(i,e,t,r,n){return t===` -`?Tve(i,e):[]}};function Tve(i,e){let t=i.getLinesContent(),r=e.lineNumber-1,n=t[r],o=t[r-1],s=JM(o);if(Ive(t,r)){let a=e.lineNumber<t.length&&GX(n);return a?[Lve(e,s,a)]:[]}return[]}function Ive(i,e){let t=i[e-1],r=JM(t),n=KX(t);if($X(n)==="do"||n.includes("fn")&&$X(n)==="->"){let o=i.slice(e+1).filter(s=>!GX(s)).find(s=>JM(s)===r);if(o){let[s]=KX(o);if(["after","else","catch","rescue","end"].includes(s))return!1}return!0}return!1}function Lve(i,e,t){return t?{range:new ui.Range(i.lineNumber+1,1,i.lineNumber+1,1),text:`${e}end +`?Tve(i,e):[]}};function Tve(i,e){let t=i.getLinesContent(),r=e.lineNumber-1,n=t[r],o=t[r-1],s=eN(o);if(Ive(t,r)){let a=e.lineNumber<t.length&&YX(n);return a?[Lve(e,s,a)]:[]}return[]}function Ive(i,e){let t=i[e-1],r=eN(t),n=$X(t);if(GX(n)==="do"||n.includes("fn")&&GX(n)==="->"){let o=i.slice(e+1).filter(s=>!YX(s)).find(s=>eN(s)===r);if(o){let[s]=$X(o);if(["after","else","catch","rescue","end"].includes(s))return!1}return!0}return!1}function Lve(i,e,t){return t?{range:new ui.Range(i.lineNumber+1,1,i.lineNumber+1,1),text:`${e}end `}:{range:new ui.Range(i.lineNumber,i.column,i.lineNumber,i.column),text:` -${e}end`}}function JM(i){let[e]=i.match(/^\s*/);return e}function KX(i){return i.replace(/#.*/,"").match(/->|[\w:]+/g)||[]}function $X(i){return i[i.length-1]}function GX(i){return i.trim()===""}var YX=Eve;var Ave={keywords:["case","if","begin","end","when","of","fun","maybe","else","try","catch","receive","after"],attributes:["-module","-record","-export","-spec","-include","-include_lib","-export","-undef","-ifdef","-ifndef","-else","-endif","-if","-elif","-define"],operators:["=","==","=:=","/=","=/=",">","<","=<",">=","+","++","-","--","*","/","!","and","or","not","xor","andalso","orelse","bnot","div","rem","band","bor","bxor","bsl","bsr",":=","=>","->","?=","<-","||"],builtins:["error","exit"],brackets:[["(",")","delimiter.parenthesis"],["{","}","delimiter.curly"],["[","]","delimiter.square"]],symbols:/[=><~&|+\-*\/%@#]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/(-[a-z_]+)/,{cases:{"@attributes":"keyword","@default":"identifier"}}],[/(\?[a-zA-Z_0-9]+)/,"constant"],[/[A-Z_][a-z0-9_]*/,"identifier"],[/[a-z_][\w\-']*/,{cases:{"@builtins":"predefined.identifier","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[()\[\]\{\}]/,"@brackets"],[/@symbols/,{cases:{"@operators":"predefined.operator","@default":"operator"}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/16#[0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/%.*$/,"comment"]]}},XX=Ave;var Dve={comments:{lineComment:"%"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:'<<"',close:'">>',notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'"},{open:'"',close:'"'}],indentationRules:{increaseIndentPattern:/^((?!%).)*([{([]|->|after|begin|case|catch|fun|if|of|try|when|(\|\|.*))\s*$/,decreaseIndentPattern:/^\s*([)}]]|end|->\s*$)/,indentNextLinePattern:/^((?!%).)*(::|=>|:=|<-)\s*$/}},QX=Dve;var eN={background:"#282c34",default:"#c4cad6",lightRed:"#e06c75",blue:"#61afef",gray:"#8c92a3",green:"#98c379",purple:"#c678dd",red:"#be5046",teal:"#56b6c2",peach:"#d19a66"},ev={background:"#fafafa",default:"#304254",lightRed:"#e45649",blue:"#4078F2",gray:"#707177",green:"#50a14f",purple:"#a726a4",red:"#ca1243",teal:"#56b6c2",peach:"#986801"},ZX=i=>[{token:"",foreground:i.default},{token:"variable",foreground:i.lightRed},{token:"constant",foreground:i.blue},{token:"constant.character.escape",foreground:i.blue},{token:"comment",foreground:i.gray},{token:"number",foreground:i.blue},{token:"regexp",foreground:i.lightRed},{token:"type",foreground:i.lightRed},{token:"string",foreground:i.green},{token:"keyword",foreground:i.purple},{token:"operator",foreground:i.peach},{token:"delimiter.bracket.embed",foreground:i.red},{token:"sigil",foreground:i.teal},{token:"function",foreground:i.blue},{token:"function.call",foreground:i.default},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"keyword.md",foreground:i.lightRed},{token:"keyword.table",foreground:i.lightRed},{token:"string.link.md",foreground:i.blue},{token:"variable.md",foreground:i.teal},{token:"string.md",foreground:i.default},{token:"variable.source.md",foreground:i.default},{token:"tag",foreground:i.lightRed},{token:"metatag",foreground:i.lightRed},{token:"attribute.name",foreground:i.peach},{token:"attribute.value",foreground:i.green},{token:"string.key",foreground:i.lightRed},{token:"keyword.json",foreground:i.blue},{token:"operator.sql",foreground:i.purple}],JX={base:"vs-dark",inherit:!1,rules:ZX(eN),colors:{"editor.background":eN.background,"editor.foreground":eN.default,"editorLineNumber.foreground":"#636d83","editorCursor.foreground":"#636d83","editor.selectionBackground":"#3e4451","editor.findMatchHighlightBackground":"#528bff3d","editorSuggestWidget.background":"#21252b","editorSuggestWidget.border":"#181a1f","editorSuggestWidget.selectedBackground":"#2c313a","input.background":"#1b1d23","input.border":"#181a1f","editorBracketMatch.border":"#282c34","editorBracketMatch.background":"#3e4451"}},eQ={base:"vs",inherit:!1,rules:ZX(ev),colors:{"editor.background":ev.background,"editor.foreground":ev.default,"editorLineNumber.foreground":"#9d9d9f","editorCursor.foreground":"#526fff","editor.selectionBackground":"#e5e5e6","editor.findMatchHighlightBackground":"#526fff33","editorSuggestWidget.highlightForeground":ev.default,"editorSuggestWidget.focusHighlightForeground":"#0431fa","editorSuggestWidget.selectedForeground":ev.default,"editorSuggestWidget.background":"#eaeaeb","editorSuggestWidget.border":"#dbdbdc","editorSuggestWidget.selectedBackground":"#ffffff","input.background":"#ffffff","input.border":"#dbdbdc","editorBracketMatch.border":"#fafafa","editorBracketMatch.background":"#e5e5e6"}};Ere();var tQ="settings",tv={normal:14,large:16},Mve={default:"default",emacs:"emacs",vim:"vim"},lm={default:"default",light:"light"},Nve={editor_auto_completion:!0,editor_auto_signature:!0,editor_font_size:tv.normal,editor_theme:lm.default,editor_markdown_word_wrap:!0,editor_mode:Mve.default,custom_view_show_section:!0,custom_view_show_markdown:!0,custom_view_show_output:!0,custom_view_spotlight:!1},tN=class{constructor(){this._subscribers=[],this._settings=Nve,this._loadSettings()}get(){return this._settings}update(e){let t=this._settings;this._settings=ue(ue({},this._settings),e),this._subscribers.forEach(r=>r(this._settings,t)),this._storeSettings()}getAndSubscribe(e){return this._subscribers.push(e),e(this._settings),()=>{this.unsubscribe(e)}}unsubscribe(e){let t=this._subscribers.indexOf(e);t!==-1&&this._subscribers.splice(t,1)}_loadSettings(){let e=Cu(tQ);e&&(Object.values(lm).includes(e.editor_theme)||delete e.editor_theme,this._settings=ue(ue({},this._settings),e))}_storeSettings(){If(tQ,this._settings)}},nr=new tN;if(v_.prototype.finish){let i=v_.prototype.finish;v_.prototype.finish=function(...e){let t=i.apply(this,e);if(t._getEOL)t._getEOL=function(r){return` -`};else throw new Error("failed to override line endings to LF");return t}}else throw new Error("failed to override line endings to LF");wa.registerOnTypeFormattingEditProvider("elixir",YX);wa.register({id:"erlang"});wa.setMonarchTokensProvider("erlang",XX);wa.setLanguageConfiguration("erlang",QX);wu.defineTheme("default",JX);wu.defineTheme("light",eQ);document.fonts.addEventListener("loadingdone",i=>{i.fontfaces.some(t=>t.family.includes("JetBrains Mono"))&&wu.remeasureFonts()});var iN=null;nr.getAndSubscribe(i=>{iN&&iN.dispose(),iN=wa.registerCompletionItemProvider("elixir",{triggerCharacters:i.editor_auto_completion?["."]:[],provideCompletionItems:(e,t,r,n)=>e.__getCompletionItems__?e.__getCompletionItems__(e,t):null})});wa.registerHoverProvider("elixir",{provideHover:(i,e,t)=>i.__getHover__?i.__getHover__(i,e):null});wa.registerSignatureHelpProvider("elixir",{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:(i,e,t,r)=>i.__getSignatureHelp__?i.__getSignatureHelp__(i,e):null});wa.registerDocumentFormattingEditProvider("elixir",{provideDocumentFormattingEdits:(i,e,t)=>i.__getDocumentFormattingEdits__?i.__getDocumentFormattingEdits__(i):null});var ui=As;function cm(i,e){if(!cm.initialized){let t=nr.get();wu.create(document.createElement("div"),{theme:t.editor_theme}),cm.initialized=!0}return wu.colorize(i,e).then(t=>t.replace(/<br\/>$/,""))}var dQ=Wn(oQ()),uQ=Wn(aQ()),rN=Wn(cQ());function h4(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function Qd(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function nN(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function Xd(i){return i.offsetParent===null}function hQ(i){let e=null;return new Promise((t,r)=>{Xd(i)?(e=new ResizeObserver(n=>{Xd(i)||(e.disconnect(),t())}),e.observe(i)):t()})}function oN(i){return!Xd(i)&&nN(i)}function fQ(i,e,t){return Math.min(Math.max(i,e),t)}function pQ(i){let e=window.getComputedStyle(i),t=parseInt(e.lineHeight,10);if(Number.isNaN(t)){let r=i.cloneNode();r.innerHTML="<br>",i.appendChild(r);let n=r.clientHeight;r.innerHTML="<br><br>";let o=r.clientHeight;return i.removeChild(r),o-n}else return t}function mQ(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function Zd(i){let{height:e}=i.getBoundingClientRect();e<window.innerHeight?i.scrollIntoView({behavior:"smooth",block:"center"}):i.scrollIntoView({behavior:"smooth",block:"start"})}function gQ(i){return Math.abs(i.scrollHeight-i.clientHeight-i.scrollTop)<1}function iv(i){i.scrollTop=i.scrollHeight}function bQ(i){return btoa(unescape(encodeURIComponent(i)))}function vQ(i){return decodeURIComponent(escape(atob(i)))}function f4(){return yQ(24)}function _Q(){return yQ(40)}function yQ(i){let e=new Uint8Array(i);crypto.getRandomValues(e);let t=String.fromCharCode(...e);return btoa(t)}function p4(i){return(0,dQ.default)(i).toString(rN.default)}function wQ(i){return(0,uQ.default)(i).toString(rN.default)}function m4(i){let e=document.querySelector('[rel="icon"]');e||(e=document.createElement("link"),e.rel="icon",document.head.appendChild(e)),e.href=`/${i}.svg`}function mc(i,e){let t=i.querySelector(e);if(!t)throw new Error(`expected a child matching ${e}, but none was found`);return t}function el(i){i.preventDefault(),i.stopPropagation()}var Rve={"&":"&","<":"<",">":">",'"':""","'":"'"};function xQ(i){return(i||"").replace(/[&<>"']/g,e=>Rve[e])}function CQ(i){let e=atob(i),t=new Uint8Array(e.length),r=t.byteLength;for(let n=0;n<r;n++)t[n]=e.charCodeAt(n);return t.buffer}function g4(){return document.body.hasAttribute("data-within-iframe")?";SameSite=None;Secure":";SameSite=Lax"}var rv=class{constructor(e){this.size=e,this.cache=new Map}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}else return}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size===this.size){let r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(e,t)}};var Pve=0,Ove=()=>`mermaid-graph-${Pve++}`,SQ=!1,Fve="5.15.4",kQ=new rv(25);function EQ(i){let e=p4(i),t=kQ.get(e);return t?Promise.resolve(t):zve().then(r=>(Bve(i),r.render(Ove(),i).then(({svg:n})=>(kQ.set(e,n),n)).catch(n=>`<div class="error-box whitespace-pre-wrap"><span class="font-semibold">Mermaid</span> -${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js").then(({default:i})=>(SQ||(i.initialize({startOnLoad:!1}),SQ=!0),i))}function Bve(i){let e=`https://cdnjs.cloudflare.com/ajax/libs/font-awesome/${Fve}/css/all.min.css`;if(i.includes("fa:")&&!document.querySelector(`link[href="${e}"]`)){let t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e,document.head.appendChild(t)}}var sN=class{constructor(e,t,{baseUrl:r=null,emptyText:n="",allowedUriSchemes:o=[]}={}){this.container=e,this.content=t,this.baseUrl=r,this.emptyText=n,this.allowedUriSchemes=o,this._render()}setContent(e){this.content=e,this._render()}_render(){this._getHtml().then(e=>{let t=`<div>${e}</div>`;yB(this.container,t,{childrenOnly:!0})})}_getHtml(){return Ay().use(Uy).use(Qy).use(kw).use(Vve).use(Uve,{highlight:cm}).use(Rw,{allowDangerousHtml:!0}).use(sx).use(jve,{baseUrl:this.baseUrl}).use(dx,Hve(this.allowedUriSchemes)).use(lx).use(qve).use(Kve,{baseUrl:this.baseUrl}).use(gx).process(this.content).then(e=>String(e)).catch(e=>{console.error(`Failed to render markdown, reason: ${e.message}`)}).then(e=>e||` +${e}end`}}function eN(i){let[e]=i.match(/^\s*/);return e}function $X(i){return i.replace(/#.*/,"").match(/->|[\w:]+/g)||[]}function GX(i){return i[i.length-1]}function YX(i){return i.trim()===""}var XX=Eve;var Ave={keywords:["case","if","begin","end","when","of","fun","maybe","else","try","catch","receive","after"],attributes:["-module","-record","-export","-spec","-include","-include_lib","-export","-undef","-ifdef","-ifndef","-else","-endif","-if","-elif","-define"],operators:["=","==","=:=","/=","=/=",">","<","=<",">=","+","++","-","--","*","/","!","and","or","not","xor","andalso","orelse","bnot","div","rem","band","bor","bxor","bsl","bsr",":=","=>","->","?=","<-","||"],builtins:["error","exit"],brackets:[["(",")","delimiter.parenthesis"],["{","}","delimiter.curly"],["[","]","delimiter.square"]],symbols:/[=><~&|+\-*\/%@#]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/(-[a-z_]+)/,{cases:{"@attributes":"keyword","@default":"identifier"}}],[/(\?[a-zA-Z_0-9]+)/,"constant"],[/[A-Z_][a-z0-9_]*/,"identifier"],[/[a-z_][\w\-']*/,{cases:{"@builtins":"predefined.identifier","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[()\[\]\{\}]/,"@brackets"],[/@symbols/,{cases:{"@operators":"predefined.operator","@default":"operator"}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/16#[0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/%.*$/,"comment"]]}},QX=Ave;var Dve={comments:{lineComment:"%"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:'<<"',close:'">>',notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"'",close:"'"},{open:'"',close:'"'}],indentationRules:{increaseIndentPattern:/^((?!%).)*([{([]|->|after|begin|case|catch|fun|if|of|try|when|(\|\|.*))\s*$/,decreaseIndentPattern:/^\s*([)}]]|end|->\s*$)/,indentNextLinePattern:/^((?!%).)*(::|=>|:=|<-)\s*$/}},ZX=Dve;var tN={background:"#282c34",default:"#c4cad6",lightRed:"#e06c75",blue:"#61afef",gray:"#8c92a3",green:"#98c379",purple:"#c678dd",red:"#be5046",teal:"#56b6c2",peach:"#d19a66"},ev={background:"#fafafa",default:"#304254",lightRed:"#e45649",blue:"#4078F2",gray:"#707177",green:"#50a14f",purple:"#a726a4",red:"#ca1243",teal:"#56b6c2",peach:"#986801"},JX=i=>[{token:"",foreground:i.default},{token:"variable",foreground:i.lightRed},{token:"constant",foreground:i.blue},{token:"constant.character.escape",foreground:i.blue},{token:"comment",foreground:i.gray},{token:"number",foreground:i.blue},{token:"regexp",foreground:i.lightRed},{token:"type",foreground:i.lightRed},{token:"string",foreground:i.green},{token:"keyword",foreground:i.purple},{token:"operator",foreground:i.peach},{token:"delimiter.bracket.embed",foreground:i.red},{token:"sigil",foreground:i.teal},{token:"function",foreground:i.blue},{token:"function.call",foreground:i.default},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"keyword.md",foreground:i.lightRed},{token:"keyword.table",foreground:i.lightRed},{token:"string.link.md",foreground:i.blue},{token:"variable.md",foreground:i.teal},{token:"string.md",foreground:i.default},{token:"variable.source.md",foreground:i.default},{token:"tag",foreground:i.lightRed},{token:"metatag",foreground:i.lightRed},{token:"attribute.name",foreground:i.peach},{token:"attribute.value",foreground:i.green},{token:"string.key",foreground:i.lightRed},{token:"keyword.json",foreground:i.blue},{token:"operator.sql",foreground:i.purple}],eQ={base:"vs-dark",inherit:!1,rules:JX(tN),colors:{"editor.background":tN.background,"editor.foreground":tN.default,"editorLineNumber.foreground":"#636d83","editorCursor.foreground":"#636d83","editor.selectionBackground":"#3e4451","editor.findMatchHighlightBackground":"#528bff3d","editorSuggestWidget.background":"#21252b","editorSuggestWidget.border":"#181a1f","editorSuggestWidget.selectedBackground":"#2c313a","input.background":"#1b1d23","input.border":"#181a1f","editorBracketMatch.border":"#282c34","editorBracketMatch.background":"#3e4451"}},tQ={base:"vs",inherit:!1,rules:JX(ev),colors:{"editor.background":ev.background,"editor.foreground":ev.default,"editorLineNumber.foreground":"#9d9d9f","editorCursor.foreground":"#526fff","editor.selectionBackground":"#e5e5e6","editor.findMatchHighlightBackground":"#526fff33","editorSuggestWidget.highlightForeground":ev.default,"editorSuggestWidget.focusHighlightForeground":"#0431fa","editorSuggestWidget.selectedForeground":ev.default,"editorSuggestWidget.background":"#eaeaeb","editorSuggestWidget.border":"#dbdbdc","editorSuggestWidget.selectedBackground":"#ffffff","input.background":"#ffffff","input.border":"#dbdbdc","editorBracketMatch.border":"#fafafa","editorBracketMatch.background":"#e5e5e6"}};Ere();var iQ="settings",tv={normal:14,large:16},Mve={default:"default",emacs:"emacs",vim:"vim"},lm={default:"default",light:"light"},Nve={editor_auto_completion:!0,editor_auto_signature:!0,editor_font_size:tv.normal,editor_theme:lm.default,editor_markdown_word_wrap:!0,editor_mode:Mve.default,custom_view_show_section:!0,custom_view_show_markdown:!0,custom_view_show_output:!0,custom_view_spotlight:!1},iN=class{constructor(){this._subscribers=[],this._settings=Nve,this._loadSettings()}get(){return this._settings}update(e){let t=this._settings;this._settings=ue(ue({},this._settings),e),this._subscribers.forEach(r=>r(this._settings,t)),this._storeSettings()}getAndSubscribe(e){return this._subscribers.push(e),e(this._settings),()=>{this.unsubscribe(e)}}unsubscribe(e){let t=this._subscribers.indexOf(e);t!==-1&&this._subscribers.splice(t,1)}_loadSettings(){let e=Cu(iQ);e&&(Object.values(lm).includes(e.editor_theme)||delete e.editor_theme,this._settings=ue(ue({},this._settings),e))}_storeSettings(){If(iQ,this._settings)}},nr=new iN;if(v_.prototype.finish){let i=v_.prototype.finish;v_.prototype.finish=function(...e){let t=i.apply(this,e);if(t._getEOL)t._getEOL=function(r){return` +`};else throw new Error("failed to override line endings to LF");return t}}else throw new Error("failed to override line endings to LF");wa.registerOnTypeFormattingEditProvider("elixir",XX);wa.register({id:"erlang"});wa.setMonarchTokensProvider("erlang",QX);wa.setLanguageConfiguration("erlang",ZX);wu.defineTheme("default",eQ);wu.defineTheme("light",tQ);document.fonts.addEventListener("loadingdone",i=>{i.fontfaces.some(t=>t.family.includes("JetBrains Mono"))&&wu.remeasureFonts()});var rN=null;nr.getAndSubscribe(i=>{rN&&rN.dispose(),rN=wa.registerCompletionItemProvider("elixir",{triggerCharacters:i.editor_auto_completion?["."]:[],provideCompletionItems:(e,t,r,n)=>e.__getCompletionItems__?e.__getCompletionItems__(e,t):null})});wa.registerHoverProvider("elixir",{provideHover:(i,e,t)=>i.__getHover__?i.__getHover__(i,e):null});wa.registerSignatureHelpProvider("elixir",{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:(i,e,t,r)=>i.__getSignatureHelp__?i.__getSignatureHelp__(i,e):null});wa.registerDocumentFormattingEditProvider("elixir",{provideDocumentFormattingEdits:(i,e,t)=>i.__getDocumentFormattingEdits__?i.__getDocumentFormattingEdits__(i):null});var ui=As;function cm(i,e){if(!cm.initialized){let t=nr.get();wu.create(document.createElement("div"),{theme:t.editor_theme}),cm.initialized=!0}return wu.colorize(i,e).then(t=>t.replace(/<br\/>$/,""))}var uQ=Wn(sQ()),hQ=Wn(lQ()),nN=Wn(dQ());function h4(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function Qd(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function oN(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function Xd(i){return i.offsetParent===null}function fQ(i){let e=null;return new Promise((t,r)=>{Xd(i)?(e=new ResizeObserver(n=>{Xd(i)||(e.disconnect(),t())}),e.observe(i)):t()})}function sN(i){return!Xd(i)&&oN(i)}function pQ(i,e,t){return Math.min(Math.max(i,e),t)}function mQ(i){let e=window.getComputedStyle(i),t=parseInt(e.lineHeight,10);if(Number.isNaN(t)){let r=i.cloneNode();r.innerHTML="<br>",i.appendChild(r);let n=r.clientHeight;r.innerHTML="<br><br>";let o=r.clientHeight;return i.removeChild(r),o-n}else return t}function gQ(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function Zd(i){let{height:e}=i.getBoundingClientRect();e<window.innerHeight?i.scrollIntoView({behavior:"smooth",block:"center"}):i.scrollIntoView({behavior:"smooth",block:"start"})}function bQ(i){return Math.abs(i.scrollHeight-i.clientHeight-i.scrollTop)<1}function iv(i){i.scrollTop=i.scrollHeight}function vQ(i){return btoa(unescape(encodeURIComponent(i)))}function _Q(i){return decodeURIComponent(escape(atob(i)))}function f4(){return wQ(24)}function yQ(){return wQ(40)}function wQ(i){let e=new Uint8Array(i);crypto.getRandomValues(e);let t=String.fromCharCode(...e);return btoa(t)}function p4(i){return(0,uQ.default)(i).toString(nN.default)}function xQ(i){return(0,hQ.default)(i).toString(nN.default)}function m4(i){let e=document.querySelector('[rel="icon"]');e||(e=document.createElement("link"),e.rel="icon",document.head.appendChild(e)),e.href=`/${i}.svg`}function mc(i,e){let t=i.querySelector(e);if(!t)throw new Error(`expected a child matching ${e}, but none was found`);return t}function el(i){i.preventDefault(),i.stopPropagation()}var Rve={"&":"&","<":"<",">":">",'"':""","'":"'"};function CQ(i){return(i||"").replace(/[&<>"']/g,e=>Rve[e])}function SQ(i){let e=atob(i),t=new Uint8Array(e.length),r=t.byteLength;for(let n=0;n<r;n++)t[n]=e.charCodeAt(n);return t.buffer}function g4(){return document.body.hasAttribute("data-within-iframe")?";SameSite=None;Secure":";SameSite=Lax"}var rv=class{constructor(e){this.size=e,this.cache=new Map}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}else return}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size===this.size){let r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(e,t)}};var Pve=0,Ove=()=>`mermaid-graph-${Pve++}`,kQ=!1,Fve="5.15.4",EQ=new rv(25);function TQ(i){let e=p4(i),t=EQ.get(e);return t?Promise.resolve(t):zve().then(r=>(Bve(i),r.render(Ove(),i).then(({svg:n})=>(EQ.set(e,n),n)).catch(n=>`<div class="error-box whitespace-pre-wrap"><span class="font-semibold">Mermaid</span> +${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js").then(({default:i})=>(kQ||(i.initialize({startOnLoad:!1}),kQ=!0),i))}function Bve(i){let e=`https://cdnjs.cloudflare.com/ajax/libs/font-awesome/${Fve}/css/all.min.css`;if(i.includes("fa:")&&!document.querySelector(`link[href="${e}"]`)){let t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e,document.head.appendChild(t)}}var aN=class{constructor(e,t,{baseUrl:r=null,emptyText:n="",allowedUriSchemes:o=[]}={}){this.container=e,this.content=t,this.baseUrl=r,this.emptyText=n,this.allowedUriSchemes=o,this._render()}setContent(e){this.content=e,this._render()}_render(){this._getHtml().then(e=>{let t=`<div>${e}</div>`;wB(this.container,t,{childrenOnly:!0})})}_getHtml(){return Ay().use(Uy).use(Qy).use(kw).use(Vve).use(Uve,{highlight:cm}).use(Rw,{allowDangerousHtml:!0}).use(sx).use(jve,{baseUrl:this.baseUrl}).use(dx,Hve(this.allowedUriSchemes)).use(lx).use(qve).use(Kve,{baseUrl:this.baseUrl}).use(gx).process(this.content).then(e=>String(e)).catch(e=>{console.error(`Failed to render markdown, reason: ${e.message}`)}).then(e=>e||` <div class="text-gray-300"> ${this.emptyText} </div> - `)}},b4=sN;function Hve(i){return xt(ue({},Hs),{attributes:xt(ue({},Hs.attributes),{"*":[...Hs.attributes["*"]||[],"className","style"]}),protocols:xt(ue({},Hs.protocols),{href:[...Hs.protocols.href,...i]})})}function Uve(i){return e=>{let t=[];return Rn(e,"code",r=>{if(r.lang){let n=function(s){r.type="html",r.value=`<pre><code>${s}</code></pre>`},o=i.highlight(r.value,r.lang);if(o&&typeof o.then=="function"){let s=Promise.resolve(o).then(n);t.push(s)}else n(o)}}),Promise.all(t).then(()=>null)}}function jve(i){return e=>{i.baseUrl&&Rn(e,"element",t=>{if(t.tagName==="a"&&t.properties){let r=t.properties.href;r&&!aN(r)&&!lN(r)&&!$ve(r)&&(t.properties.href=TQ(i.baseUrl,r))}if(t.tagName==="img"&&t.properties){let r=t.properties.src;r&&!aN(r)&&!lN(r)&&(t.properties.src=TQ(i.baseUrl,r))}}),Rn(e,"element",t=>{t.tagName==="a"&&t.properties&&t.properties.href&&(t.properties.href=t.properties.href.split("/").map(r=>r===".."?"__parent__":r).join("/"))})}}var Wve=Ay().use(cx,{fragment:!0});function Vve(i){return e=>{Rn(e,"code",(t,r,n)=>{t.lang==="mermaid"&&(t.type="html",t.value=` - <div class="mermaid">${xQ(t.value)}</div> - `)})}}function qve(i){return e=>{let t=[];return Rn(e,"element",r=>{if((r.properties&&Array.isArray(r.properties.className)?r.properties.className:[]).includes("mermaid")){let o=function(l){let c=Wve.parse(l);lT(c,!0),r.children=c.children},s=y0(r,{whitespace:"pre"}),a=EQ(s).then(o);t.push(a)}}),Promise.all(t).then(()=>null)}}function Kve(i){return e=>{Rn(e,"element",t=>{if(t.properties&&t.properties.href){let r=t.properties.href;lN(r)?(t.properties["data-phx-link"]=i.baseUrl&&r.startsWith(i.baseUrl)?"patch":"redirect",t.properties["data-phx-link-state"]="push"):aN(r)&&(t.properties.target="_blank",t.properties.rel="noreferrer noopener")}})}}function aN(i){return/^(?:[a-z]+:)?\/\//i.test(i)}function $ve(i){return i.startsWith("#")}function lN(i){return i.startsWith("/")||i.startsWith(window.location.origin)}function TQ(i,e){return i.replace(/\/$/,"")+"/"+e}var v4=class{constructor(){this.subscribersByTopic={}}subscribe(e,t){return Array.isArray(this.subscribersByTopic[e])||(this.subscribersByTopic[e]=[]),this.subscribersByTopic[e].push(t),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){let r=this.subscribersByTopic[e].indexOf(t);r!==-1&&this.subscribersByTopic[e].splice(r,1)}broadcast(e,t){Array.isArray(this.subscribersByTopic[e])&&this.subscribersByTopic[e].forEach(r=>{r(t)})}},_r=new v4;var IQ=i=>typeof i=="object"&&i!=null&&i.nodeType===1,LQ=(i,e)=>(!e||i!=="hidden")&&i!=="visible"&&i!=="clip",cN=(i,e)=>{if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){let t=getComputedStyle(i,null);return LQ(t.overflowY,e)||LQ(t.overflowX,e)||(r=>{let n=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch(s){return null}})(r);return!!n&&(n.clientHeight<r.scrollHeight||n.clientWidth<r.scrollWidth)})(i)}return!1},_4=(i,e,t,r,n,o,s,a)=>o<i&&s>e||o>i&&s<e?0:o<=i&&a<=t||s>=e&&a>=t?o-i-r:s>e&&a<t||o<i&&a>t?s-e+n:0,Gve=i=>{let e=i.parentElement;return e==null?i.getRootNode().host||null:e},dN=(i,e)=>{var t,r,n,o;if(typeof document=="undefined")return[];let{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:d}=e,u=typeof c=="function"?c:Pe=>Pe!==c;if(!IQ(i))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],m=i;for(;IQ(m)&&u(m);){if(m=Gve(m),m===h){f.push(m);break}m!=null&&m===document.body&&cN(m)&&!cN(document.documentElement)||m!=null&&cN(m,d)&&f.push(m)}let g=(r=(t=window.visualViewport)==null?void 0:t.width)!=null?r:innerWidth,w=(o=(n=window.visualViewport)==null?void 0:n.height)!=null?o:innerHeight,{scrollX:_,scrollY:E}=window,{height:A,width:L,top:O,right:U,bottom:Y,left:oe}=i.getBoundingClientRect(),te=a==="start"||a==="nearest"?O:a==="end"?Y:O+A/2,Z=l==="center"?oe+L/2:l==="end"?U:oe,ve=[];for(let Pe=0;Pe<f.length;Pe++){let Ee=f[Pe],{height:Oe,width:Xe,top:dt,right:be,bottom:we,left:X}=Ee.getBoundingClientRect();if(s==="if-needed"&&O>=0&&oe>=0&&Y<=w&&U<=g&&O>=dt&&Y<=we&&oe>=X&&U<=be)return ve;let R=getComputedStyle(Ee),ne=parseInt(R.borderLeftWidth,10),me=parseInt(R.borderTopWidth,10),G=parseInt(R.borderRightWidth,10),Et=parseInt(R.borderBottomWidth,10),Ot=0,ai=0,Ti="offsetWidth"in Ee?Ee.offsetWidth-Ee.clientWidth-ne-G:0,kt="offsetHeight"in Ee?Ee.offsetHeight-Ee.clientHeight-me-Et:0,Ei="offsetWidth"in Ee?Ee.offsetWidth===0?0:Xe/Ee.offsetWidth:0,fi="offsetHeight"in Ee?Ee.offsetHeight===0?0:Oe/Ee.offsetHeight:0;if(h===Ee)Ot=a==="start"?te:a==="end"?te-w:a==="nearest"?_4(E,E+w,w,me,Et,E+te,E+te+A,A):te-w/2,ai=l==="start"?Z:l==="center"?Z-g/2:l==="end"?Z-g:_4(_,_+g,g,ne,G,_+Z,_+Z+L,L),Ot=Math.max(0,Ot+E),ai=Math.max(0,ai+_);else{Ot=a==="start"?te-dt-me:a==="end"?te-we+Et+kt:a==="nearest"?_4(dt,we,Oe,me,Et+kt,te,te+A,A):te-(dt+Oe/2)+kt/2,ai=l==="start"?Z-X-ne:l==="center"?Z-(X+Xe/2)+Ti/2:l==="end"?Z-be+G+Ti:_4(X,be,Xe,ne,G+Ti,Z,Z+L,L);let{scrollLeft:xo,scrollTop:ro}=Ee;Ot=Math.max(0,Math.min(ro+Ot/fi,Ee.scrollHeight-Oe/fi+kt)),ai=Math.max(0,Math.min(xo+ai/Ei,Ee.scrollWidth-Xe/Ei+Ti)),te+=ro-Ot,Z+=xo-ai}ve.push({el:Ee,top:Ot,left:ai})}return ve};var Yve=i=>i===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(i)?i:{block:"start",inline:"nearest"};function y4(i,e){if(!i.isConnected||!(n=>{let o=n;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(i))return;let t=(n=>{let o=window.getComputedStyle(n);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(i);if((n=>typeof n=="object"&&typeof n.behavior=="function")(e))return e.behavior(dN(i,e));let r=typeof e=="boolean"||e==null?void 0:e.behavior;for(let{el:n,top:o,left:s}of dN(i,Yve(e))){let a=o-t.top+t.bottom,l=s-t.left+t.right;n.scroll({top:a,left:l,behavior:r})}}function Fh(i){return["code","smart","setup"].includes(i)}function AQ(i){return["markdown","code","setup"].includes(i)}var Xve={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.liveEditors={},this.updateInsertModeAvailability(),["code","smart"].includes(this.props.type)&&this.el.querySelector("[data-el-amplify-outputs-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-amplified")}),this.props.type==="smart"&&this.el.querySelector("[data-el-toggle-source-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-source-visible"),this.updateInsertModeAvailability(),this.maybeFocusCurrentEditor()}),this.el.addEventListener("lb:cell:editor_created",i=>{let{tag:e,liveEditor:t}=i.detail;this.handleCellEditorCreated(e,t)}),this.el.addEventListener("lb:cell:editor_removed",i=>{let{tag:e}=i.detail;this.handleCellEditorRemoved(e)}),this.el.addEventListener("mouseenter",i=>{this.el.setAttribute("data-js-hover","")}),this.el.addEventListener("mouseleave",i=>{this.el.removeAttribute("data-js-hover")}),this.unsubscribeFromNavigationEvents=_r.subscribe("navigation",i=>this.handleNavigationEvent(i)),this.unsubscribeFromCellsEvents=_r.subscribe("cells",i=>this.handleCellsEvent(i)),this.unsubscribeFromCellEvents=_r.subscribe(`cells:${this.props.cellId}`,i=>this.handleCellEvent(i)),this._handleViewportResize=this.handleViewportResize.bind(this),window.visualViewport.addEventListener("resize",this._handleViewportResize)},disconnected(){this.el.removeAttribute("id")},destroyed(){this.unsubscribeFromNavigationEvents(),this.unsubscribeFromCellsEvents(),this.unsubscribeFromCellEvents(),window.visualViewport.removeEventListener("resize",this._handleViewportResize)},updated(){let i=this.props;this.props=this.getProps(),this.props.evaluationDigest!==i.evaluationDigest&&this.updateChangeIndicator()},getProps(){return Ri(this.el,["cell-id","type","session-path","evaluation-digest","smart-cell-js-view-ref","allowed-uri-schemes"])},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"?this.handleInsertModeChanged(i.enabled):i.type==="location_report"&&this.handleLocationReport(i.client,i.report)},handleCellsEvent(i){i.type==="cell_moved"?this.handleCellMoved(i.cellId):i.type==="cell_upload"&&this.handleCellUpload(i.cellId,i.url)},handleCellEvent(i){i.type==="dispatch_queue_evaluation"&&this.handleDispatchQueueEvaluation(i.dispatch)},handleElementFocused(i,e){this.props.cellId===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&Zd(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleCellEditorCreated(i,e){if(this.liveEditors[i]=e,this.updateInsertModeAvailability(),this.props.type!=="markdown"&&setTimeout(()=>{e.isMounted()||e.mount()},0),e===this.currentEditor()&&this.maybeFocusCurrentEditor(!0),e.onBlur(()=>{this.isFocused&&this.insertMode&&this.currentEditor().focus()}),e.onCursorSelectionChange(t=>{this.broadcastSelection(t)}),i==="primary"){let t=e.getSource();if(this.el.toggleAttribute("data-js-empty",t===""),e.onChange(r=>{this.el.toggleAttribute("data-js-empty",r==="")}),this.props.type==="markdown"){let r=this.el.querySelector("[data-el-markdown-container]"),n=new b4(r,t,{baseUrl:this.props.sessionPath,emptyText:"Empty markdown cell",allowedUriSchemes:this.props.allowedUriSchemes});e.onChange(o=>{n.setContent(o)})}Fh(this.props.type)&&(this.updateChangeIndicator(),e.onChange(r=>{this.updateChangeIndicator()}),this.handleEvent(`evaluation_finished:${this.props.cellId}`,({code_markers:r})=>{e.setCodeMarkers(r)}),this.handleEvent(`start_evaluation:${this.props.cellId}`,()=>{e.clearDoctests()}),this.handleEvent(`doctest_report:${this.props.cellId}`,r=>{e.updateDoctest(r)}),this.handleEvent("erase_outputs",()=>{e.setCodeMarkers([]),e.clearDoctests()}))}},handleCellEditorRemoved(i){delete this.liveEditors[i]},handleViewportResize(){this.isFocused&&this.scrollActiveElementIntoView()},currentEditor(){return this.liveEditors[this.currentEditorTag()]},currentEditorTag(){return this.props.type==="smart"?this.el.hasAttribute("data-js-source-visible")?"primary":"secondary":"primary"},updateInsertModeAvailability(){this.el.toggleAttribute("data-js-insert-mode-disabled",!this.currentEditor())},maybeFocusCurrentEditor(i=!1){this.isFocused&&this.insertMode&&(this.currentEditor().focus(),i&&Zd(this.el),this.broadcastSelection())},updateChangeIndicator(){let i=this.el.querySelector("[data-el-cell-status]");if(i&&i.querySelector("[data-el-change-indicator]")&&this.props.evaluationDigest){let t=this.liveEditors.primary.getSource(),r=p4(t),n=this.props.evaluationDigest!==r;this.el.toggleAttribute("data-js-changed",n)}},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.currentEditor()&&(this.currentEditor().focus(),setTimeout(this.scrollActiveElementIntoView.bind(this),0),this.broadcastSelection())):this.insertMode&&!i&&(this.insertMode=i,this.currentEditor()&&this.currentEditor().blur())},handleCellMoved(i){this.isFocused&&i===this.props.cellId&&Zd(this.el)},handleCellUpload(i,e){let t=this.liveEditors.primary;if(t&&this.props.cellId===i){let r=``;t.insert(r)}},handleDispatchQueueEvaluation(i){this.props.type==="smart"&&this.props.smartCellJsViewRef?_r.broadcast(`js_views:${this.props.smartCellJsViewRef}`,{type:"sync",callback:i}):i()},handleLocationReport(i,e){Object.entries(this.liveEditors).forEach(([t,r])=>{this.props.cellId===e.focusableId&&e.selection&&e.selection.tag===t?r.updateUserSelection(i,e.selection.editorSelection):r.removeUserSelection(i)})},broadcastSelection(i=null){i=i||this.currentEditor().editor.getSelection();let e=this.currentEditorTag();this.isFocused&&this.insertMode&&_r.broadcast("session",{type:"cursor_selection_changed",focusableId:this.props.cellId,selection:{tag:e,editorSelection:i}})},scrollActiveElementIntoView(){y4(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}},DQ=Xve;var Qve=function(e,t,r){for(var n=r,o=0,s=e.length;n<t.length;){var a=t[n];if(o<=0&&t.slice(n,n+s)===e)return n;a==="\\"?n++:a==="{"?o++:a==="}"&&o--,n++}return-1},Zve=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},Jve=/^\\begin{/,e_e=function(e,t){for(var r,n=[],o=new RegExp("("+t.map(c=>Zve(c.left)).join("|")+")");r=e.search(o),r!==-1;){r>0&&(n.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));var s=t.findIndex(c=>e.startsWith(c.left));if(r=Qve(t[s].right,e,t[s].left.length),r===-1)break;var a=e.slice(0,r+t[s].right.length),l=Jve.test(a)?a:e.slice(t[s].left.length,r);n.push({type:"math",data:l,rawData:a,display:t[s].display}),e=e.slice(r+t[s].right.length)}return e!==""&&n.push({type:"text",data:e}),n},t_e=function(e,t){var r=e_e(e,t.delimiters);if(r.length===1&&r[0].type==="text")return null;for(var n=document.createDocumentFragment(),o=0;o<r.length;o++)if(r[o].type==="text")n.appendChild(document.createTextNode(r[o].data));else{var s=document.createElement("span"),a=r[o].data;t.displayMode=r[o].display;try{t.preProcess&&(a=t.preProcess(a)),Kf.render(a,s,t)}catch(l){if(!(l instanceof Kf.ParseError))throw l;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[o].data+"` with ",l),n.appendChild(document.createTextNode(r[o].rawData));continue}n.appendChild(s)}return n},i_e=function i(e,t){for(var r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(n.nodeType===3){for(var o=n.textContent,s=n.nextSibling,a=0;s&&s.nodeType===Node.TEXT_NODE;)o+=s.textContent,s=s.nextSibling,a++;var l=t_e(o,t);if(l){for(var c=0;c<a;c++)n.nextSibling.remove();r+=l.childNodes.length-1,e.replaceChild(l,n)}else r+=a}else n.nodeType===1&&function(){var d=" "+n.className+" ",u=t.ignoredTags.indexOf(n.nodeName.toLowerCase())===-1&&t.ignoredClasses.every(h=>d.indexOf(" "+h+" ")===-1);u&&i(n,t)}()}},MQ=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},i_e(e,r)};var nv=class{constructor(e,t){this.serverAdapter=e,this.revision=t,this.state=new w4(this),this._onDelta=null,this.serverAdapter.onDelta(r=>{this._handleServerDelta(r)}),this.serverAdapter.onAcknowledgement(()=>{this._handleServerAcknowledgement()})}setEditorAdapter(e){this.editorAdapter=e,this.editorAdapter.onDelta(t=>{this._handleClientDelta(t),this._emitDelta(t)})}onDelta(e){this._onDelta=e}_emitDelta(e){this._onDelta&&this._onDelta(e)}_handleClientDelta(e){this.state=this.state.onClientDelta(e)}_handleServerDelta(e){this.revision++,this.state=this.state.onServerDelta(e)}_handleServerAcknowledgement(){this.revision++,this.state=this.state.onServerAcknowledgement()}applyDelta(e){this.editorAdapter&&this.editorAdapter.applyDelta(e),this._emitDelta(e)}sendDelta(e){this.serverAdapter.sendDelta(e,this.revision+1)}reportCurrentRevision(){this.serverAdapter.reportRevision(this.revision)}},w4=class{constructor(e,t=5e3){this.client=e,this.reportRevisionTimeoutId=null,this.reportRevisionTimeout=t}onClientDelta(e){return this.reportRevisionTimeoutId!==null&&(clearTimeout(this.reportRevisionTimeoutId),this.reportRevisionTimeoutId=null),this.client.sendDelta(e),new x4(this.client,e)}onServerDelta(e){return this.client.applyDelta(e),this.reportRevisionTimeoutId===null&&(this.reportRevisionTimeoutId=setTimeout(()=>{this.client.reportCurrentRevision(),this.reportRevisionTimeoutId=null},this.reportRevisionTimeout)),this}onServerAcknowledgement(){throw new Error("Unexpected server acknowledgement.")}},x4=class i{constructor(e,t){this.client=e,this.awaitedDelta=t}onClientDelta(e){return new uN(this.client,this.awaitedDelta,e)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right");this.client.applyDelta(t);let r=e.transform(this.awaitedDelta,"left");return new i(this.client,r)}onServerAcknowledgement(){return new w4(this.client)}},uN=class i{constructor(e,t,r){this.client=e,this.awaitedDelta=t,this.buffer=r}onClientDelta(e){let t=this.buffer.compose(e);return new i(this.client,this.awaitedDelta,t)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right"),r=this.buffer.transform(t,"right");this.client.applyDelta(r);let n=e.transform(this.awaitedDelta,"left"),o=t.transform(this.buffer,"left");return new i(this.client,n,o)}onServerAcknowledgement(){return this.client.sendDelta(this.buffer),new x4(this.client,this.buffer)}};var zh=class i{constructor(e=[]){this.ops=e}retain(e){return e<=0?this:this.append({retain:e})}insert(e){return e===""?this:this.append({insert:e})}delete(e){return e<=0?this:this.append({delete:e})}append(e){if(this.ops.length===0)return this.ops.push(e),this;let t=this.ops.pop();return _o(e)&&yo(t)?this.append(e).append(t):_o(e)&&_o(t)?(this.ops.push({insert:t.insert+e.insert}),this):yo(e)&&yo(t)?(this.ops.push({delete:t.delete+e.delete}),this):Gs(e)&&Gs(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}compose(e){let t=new dm(this.ops),r=new dm(e.ops),n=new i;for(;t.hasNext()||r.hasNext();)if(_o(r.peek()))n.append(r.next());else if(yo(t.peek()))n.append(t.next());else{let o=Math.min(t.peekLength(),r.peekLength()),s=t.next(o),a=r.next(o);Gs(a)?n.append(s):yo(a)&&Gs(s)&&n.append(a)}return n._trim()}transform(e,t){if(t!=="left"&&t!=="right")throw new Error(`Invalid priority "${t}", should be either "left" or "right"`);let r=new dm(this.ops),n=new dm(e.ops),o=new i;for(;r.hasNext()||n.hasNext();)if(_o(r.peek())&&(!_o(n.peek())||t==="left")){let s=hN(r.next());o.retain(s)}else if(_o(n.peek()))o.append(n.next());else{let s=Math.min(r.peekLength(),n.peekLength()),a=r.next(s),l=n.next(s);if(yo(a))continue;yo(l)?o.append(l):o.retain(s)}return o._trim()}_trim(){return this.ops.length>0&&Gs(this.ops[this.ops.length-1])&&this.ops.pop(),this}toCompressed(){return this.ops.map(e=>{if(_o(e))return e.insert;if(Gs(e))return e.retain;if(yo(e))return-e.delete;throw new Error(`Invalid operation ${e}`)})}static fromCompressed(e){return e.reduce((t,r)=>{if(typeof r=="string")return t.insert(r);if(typeof r=="number"&&r>=0)return t.retain(r);if(typeof r=="number"&&r<0)return t.delete(-r);throw new Error(`Invalid compressed operation ${r}`)},new this)}applyToString(e){let t="",r=0;return this.ops.forEach(n=>{Gs(n)&&(t+=e.slice(r,r+n.retain),r+=n.retain),_o(n)&&(t+=n.insert),yo(n)&&(r+=n.delete)}),t+=e.slice(r),t}},dm=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e=1/0){let t=this.ops[this.index];if(t){let r=this.offset,n=hN(t);if(e>=n-r?(e=n-r,this.index+=1,this.offset=0):this.offset+=e,yo(t))return{delete:e};if(Gs(t))return{retain:e};if(_o(t))return{insert:t.insert.substr(r,e)}}else return{retain:e}}peek(){return this.ops[this.index]||{retain:1/0}}peekLength(){return this.ops[this.index]?hN(this.ops[this.index])-this.offset:1/0}};function hN(i){if(_o(i))return i.insert.length;if(Gs(i))return i.retain;if(yo(i))return i.delete}function _o(i){return typeof i.insert=="string"}function Gs(i){return typeof i.retain=="number"}function yo(i){return typeof i.delete=="number"}var ov=class{constructor(e){this.editor=e,this._onDelta=null,this.isLastChangeRemote=!1,this.editor.onDidChangeModelContent(t=>{if(this.ignoreChange)return;this.isLastChangeRemote=!1;let r=this._deltaFromEditorChange(t);this._onDelta&&this._onDelta(r)})}onDelta(e){this._onDelta=e}applyDelta(e){e.ops.some(n=>yo(n)?!0:_o(n)?n.insert.match(/\s+/):!1)||!this.isLastChangeRemote?this.editor.getModel().pushStackElement():this.editor.getModel().popStackElement();let r=this._deltaToEditorOperations(e);this.ignoreChange=!0,this.editor.getModel().pushEditOperations(null,r,null),this.editor.getModel().pushStackElement(),this.ignoreChange=!1,this.isLastChangeRemote=!0}_deltaFromEditorChange(e){return e.changes.map(r=>{let{rangeOffset:n,rangeLength:o,text:s}=r,a=new zh;return n&&a.retain(n),o&&a.delete(o),s&&a.insert(s),a}).reduce((r,n)=>r.compose(n))}_deltaToEditorOperations(e){let t=this.editor.getModel(),r=[],n=0;return e.ops.forEach(o=>{if(Gs(o)&&(n+=o.retain),_o(o)){let s=t.getPositionAt(n);r.push({forceMoveMarkers:!0,range:new ui.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:o.insert})}if(yo(o)){let s=t.getPositionAt(n),a=t.getPositionAt(n+o.delete);r.push({forceMoveMarkers:!1,range:new ui.Range(s.lineNumber,s.column,a.lineNumber,a.column),text:null}),n+=o.delete}}),r}};var sv=class{constructor(e,t,r){this.hook=e,this.cellId=t,this.tag=r,this._onDelta=null,this._onAcknowledgement=null,this.hook.handleEvent(`cell_delta:${this.cellId}:${this.tag}`,({delta:n})=>{this._onDelta&&this._onDelta(zh.fromCompressed(n))}),this.hook.handleEvent(`cell_acknowledgement:${this.cellId}:${this.tag}`,()=>{this._onAcknowledgement&&this._onAcknowledgement()})}onDelta(e){this._onDelta=e}onAcknowledgement(e){this._onAcknowledgement=e}sendDelta(e,t){this.hook.pushEvent("apply_cell_delta",{cell_id:this.cellId,tag:this.tag,delta:e.toCompressed(),revision:t})}reportRevision(e){this.hook.pushEvent("report_cell_revision",{cell_id:this.cellId,tag:this.tag,revision:e})}};var av=class{constructor(e,t,r,n){this._cursorWidget=new fN(e,t.getPosition(),r,n),this._selectionDecoration=new pN(e,t,r)}update(e){this._cursorWidget.update(e.getPosition()),this._selectionDecoration.update(e)}dispose(){this._cursorWidget.dispose(),this._selectionDecoration.dispose()}},fN=class{constructor(e,t,r,n){this._id=f4(),this._editor=e,this._position=t,this._isPositionValid=this._checkPositionValidity(t),this._buildDomNode(r,n),this._editor.addContentWidget(this),this._onDidChangeModelContentDisposable=this._editor.onDidChangeModelContent(o=>{this._isPositionValid||this.update(this._position)})}getId(){return this._id}getPosition(){return{position:this._position,preference:[ui.editor.ContentWidgetPositionPreference.EXACT]}}update(e){this._position=e,this._isPositionValid=this._checkPositionValidity(e),this._updateDomNode(),this._editor.layoutContentWidget(this)}getDomNode(){return this._domNode}dispose(){this._editor.removeContentWidget(this),this._onDidChangeModelContentDisposable.dispose()}_checkPositionValidity(e){let t=this._editor.getModel().validatePosition(e);return e.equals(t)}_buildDomNode(e,t){let r=this._editor.getOption(ui.editor.EditorOption.lineHeight),n=document.createElement("div");n.classList.add("monaco-cursor-widget-container");let o=document.createElement("div");o.classList.add("monaco-cursor-widget-cursor"),o.style.background=e,o.style.height=`${r}px`;let s=document.createElement("div");s.classList.add("monaco-cursor-widget-label"),s.style.height=`${r}px`,s.innerText=t,s.style.background=e,n.appendChild(o),n.appendChild(s),this._domNode=n,this._updateDomNode()}_updateDomNode(){let e=this._position.lineNumber===1;this._domNode.classList.toggle("inline",e)}},pN=class{constructor(e,t,r){this._editor=e,this._decorations=[],this._className=`user-selection-${r.replace("#","")}`,this._styleElement=document.createElement("style"),this._styleElement.innerHTML=` + `)}},b4=aN;function Hve(i){return xt(ue({},Hs),{attributes:xt(ue({},Hs.attributes),{"*":[...Hs.attributes["*"]||[],"className","style"]}),protocols:xt(ue({},Hs.protocols),{href:[...Hs.protocols.href,...i]})})}function Uve(i){return e=>{let t=[];return Rn(e,"code",r=>{if(r.lang){let n=function(s){r.type="html",r.value=`<pre><code>${s}</code></pre>`},o=i.highlight(r.value,r.lang);if(o&&typeof o.then=="function"){let s=Promise.resolve(o).then(n);t.push(s)}else n(o)}}),Promise.all(t).then(()=>null)}}function jve(i){return e=>{i.baseUrl&&Rn(e,"element",t=>{if(t.tagName==="a"&&t.properties){let r=t.properties.href;r&&!lN(r)&&!cN(r)&&!$ve(r)&&(t.properties.href=IQ(i.baseUrl,r))}if(t.tagName==="img"&&t.properties){let r=t.properties.src;r&&!lN(r)&&!cN(r)&&(t.properties.src=IQ(i.baseUrl,r))}}),Rn(e,"element",t=>{t.tagName==="a"&&t.properties&&t.properties.href&&(t.properties.href=t.properties.href.split("/").map(r=>r===".."?"__parent__":r).join("/"))})}}var Wve=Ay().use(cx,{fragment:!0});function Vve(i){return e=>{Rn(e,"code",(t,r,n)=>{t.lang==="mermaid"&&(t.type="html",t.value=` + <div class="mermaid">${CQ(t.value)}</div> + `)})}}function qve(i){return e=>{let t=[];return Rn(e,"element",r=>{if((r.properties&&Array.isArray(r.properties.className)?r.properties.className:[]).includes("mermaid")){let o=function(l){let c=Wve.parse(l);cT(c,!0),r.children=c.children},s=y0(r,{whitespace:"pre"}),a=TQ(s).then(o);t.push(a)}}),Promise.all(t).then(()=>null)}}function Kve(i){return e=>{Rn(e,"element",t=>{if(t.properties&&t.properties.href){let r=t.properties.href;cN(r)?(t.properties["data-phx-link"]=i.baseUrl&&r.startsWith(i.baseUrl)?"patch":"redirect",t.properties["data-phx-link-state"]="push"):lN(r)&&(t.properties.target="_blank",t.properties.rel="noreferrer noopener")}})}}function lN(i){return/^(?:[a-z]+:)?\/\//i.test(i)}function $ve(i){return i.startsWith("#")}function cN(i){return i.startsWith("/")||i.startsWith(window.location.origin)}function IQ(i,e){return i.replace(/\/$/,"")+"/"+e}var v4=class{constructor(){this.subscribersByTopic={}}subscribe(e,t){return Array.isArray(this.subscribersByTopic[e])||(this.subscribersByTopic[e]=[]),this.subscribersByTopic[e].push(t),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){let r=this.subscribersByTopic[e].indexOf(t);r!==-1&&this.subscribersByTopic[e].splice(r,1)}broadcast(e,t){Array.isArray(this.subscribersByTopic[e])&&this.subscribersByTopic[e].forEach(r=>{r(t)})}},_r=new v4;var LQ=i=>typeof i=="object"&&i!=null&&i.nodeType===1,AQ=(i,e)=>(!e||i!=="hidden")&&i!=="visible"&&i!=="clip",dN=(i,e)=>{if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){let t=getComputedStyle(i,null);return AQ(t.overflowY,e)||AQ(t.overflowX,e)||(r=>{let n=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch(s){return null}})(r);return!!n&&(n.clientHeight<r.scrollHeight||n.clientWidth<r.scrollWidth)})(i)}return!1},_4=(i,e,t,r,n,o,s,a)=>o<i&&s>e||o>i&&s<e?0:o<=i&&a<=t||s>=e&&a>=t?o-i-r:s>e&&a<t||o<i&&a>t?s-e+n:0,Gve=i=>{let e=i.parentElement;return e==null?i.getRootNode().host||null:e},uN=(i,e)=>{var t,r,n,o;if(typeof document=="undefined")return[];let{scrollMode:s,block:a,inline:l,boundary:c,skipOverflowHiddenElements:d}=e,u=typeof c=="function"?c:Pe=>Pe!==c;if(!LQ(i))throw new TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],m=i;for(;LQ(m)&&u(m);){if(m=Gve(m),m===h){f.push(m);break}m!=null&&m===document.body&&dN(m)&&!dN(document.documentElement)||m!=null&&dN(m,d)&&f.push(m)}let g=(r=(t=window.visualViewport)==null?void 0:t.width)!=null?r:innerWidth,w=(o=(n=window.visualViewport)==null?void 0:n.height)!=null?o:innerHeight,{scrollX:_,scrollY:E}=window,{height:A,width:L,top:O,right:U,bottom:Y,left:oe}=i.getBoundingClientRect(),te=a==="start"||a==="nearest"?O:a==="end"?Y:O+A/2,Z=l==="center"?oe+L/2:l==="end"?U:oe,ve=[];for(let Pe=0;Pe<f.length;Pe++){let Ee=f[Pe],{height:Oe,width:Xe,top:dt,right:be,bottom:we,left:X}=Ee.getBoundingClientRect();if(s==="if-needed"&&O>=0&&oe>=0&&Y<=w&&U<=g&&O>=dt&&Y<=we&&oe>=X&&U<=be)return ve;let R=getComputedStyle(Ee),ne=parseInt(R.borderLeftWidth,10),me=parseInt(R.borderTopWidth,10),G=parseInt(R.borderRightWidth,10),Et=parseInt(R.borderBottomWidth,10),Ot=0,ai=0,Ti="offsetWidth"in Ee?Ee.offsetWidth-Ee.clientWidth-ne-G:0,kt="offsetHeight"in Ee?Ee.offsetHeight-Ee.clientHeight-me-Et:0,Ei="offsetWidth"in Ee?Ee.offsetWidth===0?0:Xe/Ee.offsetWidth:0,fi="offsetHeight"in Ee?Ee.offsetHeight===0?0:Oe/Ee.offsetHeight:0;if(h===Ee)Ot=a==="start"?te:a==="end"?te-w:a==="nearest"?_4(E,E+w,w,me,Et,E+te,E+te+A,A):te-w/2,ai=l==="start"?Z:l==="center"?Z-g/2:l==="end"?Z-g:_4(_,_+g,g,ne,G,_+Z,_+Z+L,L),Ot=Math.max(0,Ot+E),ai=Math.max(0,ai+_);else{Ot=a==="start"?te-dt-me:a==="end"?te-we+Et+kt:a==="nearest"?_4(dt,we,Oe,me,Et+kt,te,te+A,A):te-(dt+Oe/2)+kt/2,ai=l==="start"?Z-X-ne:l==="center"?Z-(X+Xe/2)+Ti/2:l==="end"?Z-be+G+Ti:_4(X,be,Xe,ne,G+Ti,Z,Z+L,L);let{scrollLeft:xo,scrollTop:ro}=Ee;Ot=Math.max(0,Math.min(ro+Ot/fi,Ee.scrollHeight-Oe/fi+kt)),ai=Math.max(0,Math.min(xo+ai/Ei,Ee.scrollWidth-Xe/Ei+Ti)),te+=ro-Ot,Z+=xo-ai}ve.push({el:Ee,top:Ot,left:ai})}return ve};var Yve=i=>i===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(i)?i:{block:"start",inline:"nearest"};function y4(i,e){if(!i.isConnected||!(n=>{let o=n;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(i))return;let t=(n=>{let o=window.getComputedStyle(n);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(i);if((n=>typeof n=="object"&&typeof n.behavior=="function")(e))return e.behavior(uN(i,e));let r=typeof e=="boolean"||e==null?void 0:e.behavior;for(let{el:n,top:o,left:s}of uN(i,Yve(e))){let a=o-t.top+t.bottom,l=s-t.left+t.right;n.scroll({top:a,left:l,behavior:r})}}function Fh(i){return["code","smart","setup"].includes(i)}function DQ(i){return["markdown","code","setup"].includes(i)}var Xve={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.liveEditors={},this.updateInsertModeAvailability(),["code","smart"].includes(this.props.type)&&this.el.querySelector("[data-el-amplify-outputs-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-amplified")}),this.props.type==="smart"&&this.el.querySelector("[data-el-toggle-source-button]").addEventListener("click",e=>{this.el.toggleAttribute("data-js-source-visible"),this.updateInsertModeAvailability(),this.maybeFocusCurrentEditor()}),this.el.addEventListener("lb:cell:editor_created",i=>{let{tag:e,liveEditor:t}=i.detail;this.handleCellEditorCreated(e,t)}),this.el.addEventListener("lb:cell:editor_removed",i=>{let{tag:e}=i.detail;this.handleCellEditorRemoved(e)}),this.el.addEventListener("mouseenter",i=>{this.el.setAttribute("data-js-hover","")}),this.el.addEventListener("mouseleave",i=>{this.el.removeAttribute("data-js-hover")}),this.unsubscribeFromNavigationEvents=_r.subscribe("navigation",i=>this.handleNavigationEvent(i)),this.unsubscribeFromCellsEvents=_r.subscribe("cells",i=>this.handleCellsEvent(i)),this.unsubscribeFromCellEvents=_r.subscribe(`cells:${this.props.cellId}`,i=>this.handleCellEvent(i)),this._handleViewportResize=this.handleViewportResize.bind(this),window.visualViewport.addEventListener("resize",this._handleViewportResize)},disconnected(){this.el.removeAttribute("id")},destroyed(){this.unsubscribeFromNavigationEvents(),this.unsubscribeFromCellsEvents(),this.unsubscribeFromCellEvents(),window.visualViewport.removeEventListener("resize",this._handleViewportResize)},updated(){let i=this.props;this.props=this.getProps(),this.props.evaluationDigest!==i.evaluationDigest&&this.updateChangeIndicator()},getProps(){return Ri(this.el,["cell-id","type","session-path","evaluation-digest","smart-cell-js-view-ref","allowed-uri-schemes"])},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"?this.handleInsertModeChanged(i.enabled):i.type==="location_report"&&this.handleLocationReport(i.client,i.report)},handleCellsEvent(i){i.type==="cell_moved"?this.handleCellMoved(i.cellId):i.type==="cell_upload"&&this.handleCellUpload(i.cellId,i.url)},handleCellEvent(i){i.type==="dispatch_queue_evaluation"&&this.handleDispatchQueueEvaluation(i.dispatch)},handleElementFocused(i,e){this.props.cellId===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&Zd(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleCellEditorCreated(i,e){if(this.liveEditors[i]=e,this.updateInsertModeAvailability(),this.props.type!=="markdown"&&setTimeout(()=>{e.isMounted()||e.mount()},0),e===this.currentEditor()&&this.maybeFocusCurrentEditor(!0),e.onBlur(()=>{this.isFocused&&this.insertMode&&this.currentEditor().focus()}),e.onCursorSelectionChange(t=>{this.broadcastSelection(t)}),i==="primary"){let t=e.getSource();if(this.el.toggleAttribute("data-js-empty",t===""),e.onChange(r=>{this.el.toggleAttribute("data-js-empty",r==="")}),this.props.type==="markdown"){let r=this.el.querySelector("[data-el-markdown-container]"),n=new b4(r,t,{baseUrl:this.props.sessionPath,emptyText:"Empty markdown cell",allowedUriSchemes:this.props.allowedUriSchemes});e.onChange(o=>{n.setContent(o)})}Fh(this.props.type)&&(this.updateChangeIndicator(),e.onChange(r=>{this.updateChangeIndicator()}),this.handleEvent(`evaluation_finished:${this.props.cellId}`,({code_markers:r})=>{e.setCodeMarkers(r)}),this.handleEvent(`start_evaluation:${this.props.cellId}`,()=>{e.clearDoctests()}),this.handleEvent(`doctest_report:${this.props.cellId}`,r=>{e.updateDoctest(r)}),this.handleEvent("erase_outputs",()=>{e.setCodeMarkers([]),e.clearDoctests()}))}},handleCellEditorRemoved(i){delete this.liveEditors[i]},handleViewportResize(){this.isFocused&&this.scrollActiveElementIntoView()},currentEditor(){return this.liveEditors[this.currentEditorTag()]},currentEditorTag(){return this.props.type==="smart"?this.el.hasAttribute("data-js-source-visible")?"primary":"secondary":"primary"},updateInsertModeAvailability(){this.el.toggleAttribute("data-js-insert-mode-disabled",!this.currentEditor())},maybeFocusCurrentEditor(i=!1){this.isFocused&&this.insertMode&&(this.currentEditor().focus(),i&&Zd(this.el),this.broadcastSelection())},updateChangeIndicator(){let i=this.el.querySelector("[data-el-cell-status]");if(i&&i.querySelector("[data-el-change-indicator]")&&this.props.evaluationDigest){let t=this.liveEditors.primary.getSource(),r=p4(t),n=this.props.evaluationDigest!==r;this.el.toggleAttribute("data-js-changed",n)}},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.currentEditor()&&(this.currentEditor().focus(),setTimeout(this.scrollActiveElementIntoView.bind(this),0),this.broadcastSelection())):this.insertMode&&!i&&(this.insertMode=i,this.currentEditor()&&this.currentEditor().blur())},handleCellMoved(i){this.isFocused&&i===this.props.cellId&&Zd(this.el)},handleCellUpload(i,e){let t=this.liveEditors.primary;if(t&&this.props.cellId===i){let r=``;t.insert(r)}},handleDispatchQueueEvaluation(i){this.props.type==="smart"&&this.props.smartCellJsViewRef?_r.broadcast(`js_views:${this.props.smartCellJsViewRef}`,{type:"sync",callback:i}):i()},handleLocationReport(i,e){Object.entries(this.liveEditors).forEach(([t,r])=>{this.props.cellId===e.focusableId&&e.selection&&e.selection.tag===t?r.updateUserSelection(i,e.selection.editorSelection):r.removeUserSelection(i)})},broadcastSelection(i=null){i=i||this.currentEditor().editor.getSelection();let e=this.currentEditorTag();this.isFocused&&this.insertMode&&_r.broadcast("session",{type:"cursor_selection_changed",focusableId:this.props.cellId,selection:{tag:e,editorSelection:i}})},scrollActiveElementIntoView(){y4(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}},MQ=Xve;var Qve=function(e,t,r){for(var n=r,o=0,s=e.length;n<t.length;){var a=t[n];if(o<=0&&t.slice(n,n+s)===e)return n;a==="\\"?n++:a==="{"?o++:a==="}"&&o--,n++}return-1},Zve=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},Jve=/^\\begin{/,e_e=function(e,t){for(var r,n=[],o=new RegExp("("+t.map(c=>Zve(c.left)).join("|")+")");r=e.search(o),r!==-1;){r>0&&(n.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));var s=t.findIndex(c=>e.startsWith(c.left));if(r=Qve(t[s].right,e,t[s].left.length),r===-1)break;var a=e.slice(0,r+t[s].right.length),l=Jve.test(a)?a:e.slice(t[s].left.length,r);n.push({type:"math",data:l,rawData:a,display:t[s].display}),e=e.slice(r+t[s].right.length)}return e!==""&&n.push({type:"text",data:e}),n},t_e=function(e,t){var r=e_e(e,t.delimiters);if(r.length===1&&r[0].type==="text")return null;for(var n=document.createDocumentFragment(),o=0;o<r.length;o++)if(r[o].type==="text")n.appendChild(document.createTextNode(r[o].data));else{var s=document.createElement("span"),a=r[o].data;t.displayMode=r[o].display;try{t.preProcess&&(a=t.preProcess(a)),Kf.render(a,s,t)}catch(l){if(!(l instanceof Kf.ParseError))throw l;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[o].data+"` with ",l),n.appendChild(document.createTextNode(r[o].rawData));continue}n.appendChild(s)}return n},i_e=function i(e,t){for(var r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(n.nodeType===3){for(var o=n.textContent,s=n.nextSibling,a=0;s&&s.nodeType===Node.TEXT_NODE;)o+=s.textContent,s=s.nextSibling,a++;var l=t_e(o,t);if(l){for(var c=0;c<a;c++)n.nextSibling.remove();r+=l.childNodes.length-1,e.replaceChild(l,n)}else r+=a}else n.nodeType===1&&function(){var d=" "+n.className+" ",u=t.ignoredTags.indexOf(n.nodeName.toLowerCase())===-1&&t.ignoredClasses.every(h=>d.indexOf(" "+h+" ")===-1);u&&i(n,t)}()}},NQ=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},i_e(e,r)};var nv=class{constructor(e,t){this.serverAdapter=e,this.revision=t,this.state=new w4(this),this._onDelta=null,this.serverAdapter.onDelta(r=>{this._handleServerDelta(r)}),this.serverAdapter.onAcknowledgement(()=>{this._handleServerAcknowledgement()})}setEditorAdapter(e){this.editorAdapter=e,this.editorAdapter.onDelta(t=>{this._handleClientDelta(t),this._emitDelta(t)})}onDelta(e){this._onDelta=e}_emitDelta(e){this._onDelta&&this._onDelta(e)}_handleClientDelta(e){this.state=this.state.onClientDelta(e)}_handleServerDelta(e){this.revision++,this.state=this.state.onServerDelta(e)}_handleServerAcknowledgement(){this.revision++,this.state=this.state.onServerAcknowledgement()}applyDelta(e){this.editorAdapter&&this.editorAdapter.applyDelta(e),this._emitDelta(e)}sendDelta(e){this.serverAdapter.sendDelta(e,this.revision+1)}reportCurrentRevision(){this.serverAdapter.reportRevision(this.revision)}},w4=class{constructor(e,t=5e3){this.client=e,this.reportRevisionTimeoutId=null,this.reportRevisionTimeout=t}onClientDelta(e){return this.reportRevisionTimeoutId!==null&&(clearTimeout(this.reportRevisionTimeoutId),this.reportRevisionTimeoutId=null),this.client.sendDelta(e),new x4(this.client,e)}onServerDelta(e){return this.client.applyDelta(e),this.reportRevisionTimeoutId===null&&(this.reportRevisionTimeoutId=setTimeout(()=>{this.client.reportCurrentRevision(),this.reportRevisionTimeoutId=null},this.reportRevisionTimeout)),this}onServerAcknowledgement(){throw new Error("Unexpected server acknowledgement.")}},x4=class i{constructor(e,t){this.client=e,this.awaitedDelta=t}onClientDelta(e){return new hN(this.client,this.awaitedDelta,e)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right");this.client.applyDelta(t);let r=e.transform(this.awaitedDelta,"left");return new i(this.client,r)}onServerAcknowledgement(){return new w4(this.client)}},hN=class i{constructor(e,t,r){this.client=e,this.awaitedDelta=t,this.buffer=r}onClientDelta(e){let t=this.buffer.compose(e);return new i(this.client,this.awaitedDelta,t)}onServerDelta(e){let t=this.awaitedDelta.transform(e,"right"),r=this.buffer.transform(t,"right");this.client.applyDelta(r);let n=e.transform(this.awaitedDelta,"left"),o=t.transform(this.buffer,"left");return new i(this.client,n,o)}onServerAcknowledgement(){return this.client.sendDelta(this.buffer),new x4(this.client,this.buffer)}};var zh=class i{constructor(e=[]){this.ops=e}retain(e){return e<=0?this:this.append({retain:e})}insert(e){return e===""?this:this.append({insert:e})}delete(e){return e<=0?this:this.append({delete:e})}append(e){if(this.ops.length===0)return this.ops.push(e),this;let t=this.ops.pop();return _o(e)&&yo(t)?this.append(e).append(t):_o(e)&&_o(t)?(this.ops.push({insert:t.insert+e.insert}),this):yo(e)&&yo(t)?(this.ops.push({delete:t.delete+e.delete}),this):Gs(e)&&Gs(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}compose(e){let t=new dm(this.ops),r=new dm(e.ops),n=new i;for(;t.hasNext()||r.hasNext();)if(_o(r.peek()))n.append(r.next());else if(yo(t.peek()))n.append(t.next());else{let o=Math.min(t.peekLength(),r.peekLength()),s=t.next(o),a=r.next(o);Gs(a)?n.append(s):yo(a)&&Gs(s)&&n.append(a)}return n._trim()}transform(e,t){if(t!=="left"&&t!=="right")throw new Error(`Invalid priority "${t}", should be either "left" or "right"`);let r=new dm(this.ops),n=new dm(e.ops),o=new i;for(;r.hasNext()||n.hasNext();)if(_o(r.peek())&&(!_o(n.peek())||t==="left")){let s=fN(r.next());o.retain(s)}else if(_o(n.peek()))o.append(n.next());else{let s=Math.min(r.peekLength(),n.peekLength()),a=r.next(s),l=n.next(s);if(yo(a))continue;yo(l)?o.append(l):o.retain(s)}return o._trim()}_trim(){return this.ops.length>0&&Gs(this.ops[this.ops.length-1])&&this.ops.pop(),this}toCompressed(){return this.ops.map(e=>{if(_o(e))return e.insert;if(Gs(e))return e.retain;if(yo(e))return-e.delete;throw new Error(`Invalid operation ${e}`)})}static fromCompressed(e){return e.reduce((t,r)=>{if(typeof r=="string")return t.insert(r);if(typeof r=="number"&&r>=0)return t.retain(r);if(typeof r=="number"&&r<0)return t.delete(-r);throw new Error(`Invalid compressed operation ${r}`)},new this)}applyToString(e){let t="",r=0;return this.ops.forEach(n=>{Gs(n)&&(t+=e.slice(r,r+n.retain),r+=n.retain),_o(n)&&(t+=n.insert),yo(n)&&(r+=n.delete)}),t+=e.slice(r),t}},dm=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e=1/0){let t=this.ops[this.index];if(t){let r=this.offset,n=fN(t);if(e>=n-r?(e=n-r,this.index+=1,this.offset=0):this.offset+=e,yo(t))return{delete:e};if(Gs(t))return{retain:e};if(_o(t))return{insert:t.insert.substr(r,e)}}else return{retain:e}}peek(){return this.ops[this.index]||{retain:1/0}}peekLength(){return this.ops[this.index]?fN(this.ops[this.index])-this.offset:1/0}};function fN(i){if(_o(i))return i.insert.length;if(Gs(i))return i.retain;if(yo(i))return i.delete}function _o(i){return typeof i.insert=="string"}function Gs(i){return typeof i.retain=="number"}function yo(i){return typeof i.delete=="number"}var ov=class{constructor(e){this.editor=e,this._onDelta=null,this.isLastChangeRemote=!1,this.editor.onDidChangeModelContent(t=>{if(this.ignoreChange)return;this.isLastChangeRemote=!1;let r=this._deltaFromEditorChange(t);this._onDelta&&this._onDelta(r)})}onDelta(e){this._onDelta=e}applyDelta(e){e.ops.some(n=>yo(n)?!0:_o(n)?n.insert.match(/\s+/):!1)||!this.isLastChangeRemote?this.editor.getModel().pushStackElement():this.editor.getModel().popStackElement();let r=this._deltaToEditorOperations(e);this.ignoreChange=!0,this.editor.getModel().pushEditOperations(null,r,null),this.editor.getModel().pushStackElement(),this.ignoreChange=!1,this.isLastChangeRemote=!0}_deltaFromEditorChange(e){return e.changes.map(r=>{let{rangeOffset:n,rangeLength:o,text:s}=r,a=new zh;return n&&a.retain(n),o&&a.delete(o),s&&a.insert(s),a}).reduce((r,n)=>r.compose(n))}_deltaToEditorOperations(e){let t=this.editor.getModel(),r=[],n=0;return e.ops.forEach(o=>{if(Gs(o)&&(n+=o.retain),_o(o)){let s=t.getPositionAt(n);r.push({forceMoveMarkers:!0,range:new ui.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:o.insert})}if(yo(o)){let s=t.getPositionAt(n),a=t.getPositionAt(n+o.delete);r.push({forceMoveMarkers:!1,range:new ui.Range(s.lineNumber,s.column,a.lineNumber,a.column),text:null}),n+=o.delete}}),r}};var sv=class{constructor(e,t,r){this.hook=e,this.cellId=t,this.tag=r,this._onDelta=null,this._onAcknowledgement=null,this.hook.handleEvent(`cell_delta:${this.cellId}:${this.tag}`,({delta:n})=>{this._onDelta&&this._onDelta(zh.fromCompressed(n))}),this.hook.handleEvent(`cell_acknowledgement:${this.cellId}:${this.tag}`,()=>{this._onAcknowledgement&&this._onAcknowledgement()})}onDelta(e){this._onDelta=e}onAcknowledgement(e){this._onAcknowledgement=e}sendDelta(e,t){this.hook.pushEvent("apply_cell_delta",{cell_id:this.cellId,tag:this.tag,delta:e.toCompressed(),revision:t})}reportRevision(e){this.hook.pushEvent("report_cell_revision",{cell_id:this.cellId,tag:this.tag,revision:e})}};var av=class{constructor(e,t,r,n){this._cursorWidget=new pN(e,t.getPosition(),r,n),this._selectionDecoration=new mN(e,t,r)}update(e){this._cursorWidget.update(e.getPosition()),this._selectionDecoration.update(e)}dispose(){this._cursorWidget.dispose(),this._selectionDecoration.dispose()}},pN=class{constructor(e,t,r,n){this._id=f4(),this._editor=e,this._position=t,this._isPositionValid=this._checkPositionValidity(t),this._buildDomNode(r,n),this._editor.addContentWidget(this),this._onDidChangeModelContentDisposable=this._editor.onDidChangeModelContent(o=>{this._isPositionValid||this.update(this._position)})}getId(){return this._id}getPosition(){return{position:this._position,preference:[ui.editor.ContentWidgetPositionPreference.EXACT]}}update(e){this._position=e,this._isPositionValid=this._checkPositionValidity(e),this._updateDomNode(),this._editor.layoutContentWidget(this)}getDomNode(){return this._domNode}dispose(){this._editor.removeContentWidget(this),this._onDidChangeModelContentDisposable.dispose()}_checkPositionValidity(e){let t=this._editor.getModel().validatePosition(e);return e.equals(t)}_buildDomNode(e,t){let r=this._editor.getOption(ui.editor.EditorOption.lineHeight),n=document.createElement("div");n.classList.add("monaco-cursor-widget-container");let o=document.createElement("div");o.classList.add("monaco-cursor-widget-cursor"),o.style.background=e,o.style.height=`${r}px`;let s=document.createElement("div");s.classList.add("monaco-cursor-widget-label"),s.style.height=`${r}px`,s.innerText=t,s.style.background=e,n.appendChild(o),n.appendChild(s),this._domNode=n,this._updateDomNode()}_updateDomNode(){let e=this._position.lineNumber===1;this._domNode.classList.toggle("inline",e)}},mN=class{constructor(e,t,r){this._editor=e,this._decorations=[],this._className=`user-selection-${r.replace("#","")}`,this._styleElement=document.createElement("style"),this._styleElement.innerHTML=` .${this._className} { background-color: ${r}30; } - `,document.body.appendChild(this._styleElement),this.update(t)}update(e){let t=[{range:e,options:{className:this._className}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[]),this._styleElement.remove()}};function NQ(i,e){let t=e;for(;!i.endsWith(t);)t=t.slice(0,-1);return t.length}var lv=class{constructor(e,t){this._editor=e,this._statusDecoration=new mN(e,t.line,t.status),t.status==="failed"&&(this._detailsWidget=new C4(e,t))}update(e){this._statusDecoration.update(e.status),e.status==="failed"&&(this._detailsWidget&&this._detailsWidget.dispose(),this._detailsWidget=new C4(this._editor,e))}dispose(){this._statusDecoration.dispose(),this._detailsWidget&&this._detailsWidget.dispose()}},mN=class{constructor(e,t,r){this._editor=e,this._lineNumber=t,this._decorations=[],this.update(r)}update(e){let t=[{range:new ui.Range(this._lineNumber,1,this._lineNumber,1),options:{isWholeLine:!0,linesDecorationsClassName:`doctest-status-decoration-${e}`}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[])}},C4=class{constructor(e,t){this._editor=e;let{line:r,end_line:n,details:o,column:s}=t,a=o.join(` -`),l=o.length,c=this._editor.getOption(ui.editor.EditorOption.fontSize),d=this._editor.getOption(ui.editor.EditorOption.lineHeight),u=document.createElement("div");u.innerHTML=a,u.classList.add("doctest-details-widget","editor-theme-aware-ansi"),u.style.fontSize=`${c}px`,u.style.lineHeight=`${d}px`,this._overlayWidget={getId:()=>`livebook.doctest.overlay.${r}`,getDomNode:()=>u,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget),this._editor.changeViewZones(h=>{this._viewZone=h.addZone({afterLineNumber:n,heightInPx:l*d+12,domNode:document.createElement("div"),onDomNodeTop:f=>{u.style.top=`${f}px`;let m=this._editor.getDomNode().querySelector(".margin-view-overlays").offsetWidth;u.style.paddingLeft=`calc(${m}px + ${s}ch)`},onComputedHeight:f=>{u.style.height=`${f}px`}})})}dispose(){this._editor.removeOverlayWidget(this._overlayWidget),this._editor.changeViewZones(e=>{e.removeZone(this._viewZone)})}};var Qee=Wn(ZQ()),$4=Wn(Yee());var uR=class{constructor(e,t,r,n,o,s,a,l,c,d,u){this.hook=e,this.container=t,this.cellId=r,this.source=o,this.language=a,this.intellisense=l,this.readOnly=c,this._onMount=[],this._onChange=[],this._onBlur=[],this._onCursorSelectionChange=[],this._remoteUserByClientId={},this._doctestByLine={},this._initializeWidgets=()=>{this.setCodeMarkers(d),u.forEach(f=>{this.updateDoctest(f)})};let h=new sv(e,r,n);this.editorClient=new nv(h,s),this.editorClient.onDelta(f=>{this.source=f.applyToString(this.source),this._onChange.forEach(m=>m(this.source))})}isMounted(){return!!this.editor}mount(){if(this.isMounted())throw new Error("The editor is already mounted");this._mountEditor(),this.intellisense&&this._setupIntellisense(),this.editorClient.setEditorAdapter(new ov(this.editor)),this.editor.onDidFocusEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"always"})}),this.editor.onDidBlurEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"never"}),this._onBlur.forEach(e=>e())}),this.editor.onDidChangeCursorSelection(e=>{this._onCursorSelectionChange.forEach(t=>t(e.selection))}),this._onMount.forEach(e=>e())}_ensureMounted(){this.isMounted()||this.mount()}getSource(){return this.source}onMount(e){this._onMount.push(e)}onChange(e){this._onChange.push(e)}onCursorSelectionChange(e){this._onCursorSelectionChange.push(e)}onBlur(e){this._onBlur.push(e)}focus(){this._ensureMounted(),this.editor.focus()}blur(){this._ensureMounted(),this.editor.hasTextFocus()&&document.activeElement.blur()}insert(e){this._ensureMounted();let t=this.editor.getSelection();this.editor.getModel().pushEditOperations([],[{forceMoveMarkers:!0,range:t,text:e}])}dispose(){if(this.isMounted()){this.editor.dispose();let e=this.editor.getModel();e&&e.dispose()}}updateUserSelection(e,t){this._ensureMounted(),this._remoteUserByClientId[e.id]?this._remoteUserByClientId[e.id].update(t):this._remoteUserByClientId[e.id]=new av(this.editor,t,e.hex_color,e.name)}removeUserSelection(e){this._ensureMounted(),this._remoteUserByClientId[e.id]&&(this._remoteUserByClientId[e.id].dispose(),delete this._remoteUserByClientId[e.id])}updateDoctest(e){this._ensureMounted(),this._doctestByLine[e.line]?this._doctestByLine[e.line].update(e):this._doctestByLine[e.line]=new lv(this.editor,e)}clearDoctests(){this._ensureMounted(),Object.values(this._doctestByLine).forEach(e=>e.dispose()),this._doctestByLine={}}setCodeMarkers(e){this._ensureMounted();let t="livebook.code-marker",r=e.map(n=>{let o=this.editor.getModel().getLineContent(n.line),[,s,a]=o.match(/^(\s*).*?(\s*)$/);return{startLineNumber:n.line,startColumn:s.length+1,endLineNumber:n.line,endColumn:o.length+1-a.length,message:n.description,severity:{error:ui.MarkerSeverity.Error,warning:ui.MarkerSeverity.Warning}[n.severity]}});ui.editor.setModelMarkers(this.editor.getModel(),t,r)}_mountEditor(){let e=nr.get();this.editor=ui.editor.create(this.container,{language:this.language,value:this.source,readOnly:this.readOnly,scrollbar:{vertical:"hidden",alwaysConsumeMouseWheel:!1},minimap:{enabled:!1},overviewRulerLanes:0,scrollBeyondLastLine:!1,guides:{indentation:!1},occurrencesHighlight:!1,renderLineHighlight:"none",theme:e.editor_theme,fontFamily:"JetBrains Mono, Droid Sans Mono, monospace",fontSize:e.editor_font_size,tabIndex:-1,tabSize:2,autoIndent:!0,formatOnType:!0,formatOnPaste:!0,quickSuggestions:this.intellisense&&e.editor_auto_completion,tabCompletion:"on",suggestSelection:"first",wordBasedSuggestions:!this.intellisense,parameterHints:this.intellisense&&e.editor_auto_signature,wordWrap:this.language==="markdown"&&e.editor_markdown_word_wrap?"on":"off"}),this._setScreenDependantEditorOptions(),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"enable-word-wrapping",label:"Enable word wrapping",precondition:"config.editor.wordWrap == off",keybindings:[ui.KeyMod.Alt|ui.KeyCode.KeyZ],run:n=>n.updateOptions({wordWrap:"on"})}),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"disable-word-wrapping",label:"Disable word wrapping",precondition:"config.editor.wordWrap == on",keybindings:[ui.KeyMod.Alt|ui.KeyCode.KeyZ],run:n=>n.updateOptions({wordWrap:"off"})}),new ResizeObserver(n=>{n.forEach(o=>{this.container.offsetHeight>0&&(this._setScreenDependantEditorOptions(),this.editor.layout())})}).observe(this.container),this.editor.onDidContentSizeChange(()=>{let n=this.editor.getContentHeight();this.container.style.height=`${n}px`});let r=this.editor.getContribution("editor.controller.quickInput").widget.domNode;r.remove(),this.editor._modelData.view._contentWidgets.overflowingContentWidgetsDomNode.domNode.appendChild(r),this._initializeWidgets(),this._setEditorMode(e.editor_mode)}_setScreenDependantEditorOptions(){window.screen.width<768?this.editor.updateOptions({folding:!1,lineDecorationsWidth:16,lineNumbersMinChars:Math.floor(Math.log10(this.editor.getModel().getLineCount()))+3}):this.editor.updateOptions({folding:!0,lineDecorationsWidth:10,lineNumbersMinChars:5})}_setupIntellisense(){let e=nr.get();this.handlerByRef={},this.editor.getModel().__getCompletionItems__=(r,n)=>{let s=r.getLineContent(n.lineNumber).slice(0,n.column-1);return this._asyncIntellisenseRequest("completion",{hint:s,editor_auto_completion:e.editor_auto_completion}).then(a=>({suggestions:Ywe(a.items,e).map(c=>{let d=NQ(s,c.insertText),u=new ui.Range(n.lineNumber,n.column-d,n.lineNumber,n.column);return xt(ue({},c),{range:u})})})).catch(()=>null)},this.editor.getModel().__getHover__=(r,n)=>{this.hoverContentProcessed=!1,this.hoverContentEl||(this.hoverContentEl=this.container.querySelector(".monaco-hover-content"),this.hoverContentEl?new MutationObserver(a=>{this.hoverContentProcessed||(MQ(this.hoverContentEl,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}],throwOnError:!1}),this.hoverContentProcessed=!0)}).observe(this.hoverContentEl,{childList:!0}):console.warn("Could not find an element matching .monaco-hover-content"));let o=r.getLineContent(n.lineNumber),s=n.column;return this._asyncIntellisenseRequest("details",{line:o,column:s}).then(a=>{let l=a.contents.map(d=>({value:d,isTrusted:!0})),c=new ui.Range(n.lineNumber,a.range.from,n.lineNumber,a.range.to);return{contents:l,range:c}}).catch(()=>null)};let t={codeUntilLastStop:null,response:null};this.editor.getModel().__getSignatureHelp__=(r,n)=>{let o=r.getLinesContent(),s=n.lineNumber-1,a=o.slice(0,s),l=o[s].slice(0,n.column-1),c=[...a,l].join(` -`),d=c.replace(/[^(),\s]*?$/,"").replace(/([(),])\s*$/,"$1");return d===t.codeUntilLastStop?{value:Xee(t.response),dispose:()=>{}}:this._asyncIntellisenseRequest("signature",{hint:c}).then(u=>(t.response=u,t.codeUntilLastStop=d,{value:Xee(u),dispose:()=>{}})).catch(()=>null)},this.editor.getModel().__getDocumentFormattingEdits__=r=>{let n=r.getValue();return this._asyncIntellisenseRequest("format",{code:n}).then(o=>(this.setCodeMarkers(o.code_markers),o.code?[{range:r.getFullModelRange(),text:o.code}]:[])).catch(()=>null)},this.hook.handleEvent("intellisense_response",({ref:r,response:n})=>{let o=this.handlerByRef[r];o&&(o(n),delete this.handlerByRef[r])})}_asyncIntellisenseRequest(e,t){return new Promise((r,n)=>{this.hook.pushEvent("intellisense_request",ue({cell_id:this.cellId,type:e},t),({ref:o})=>{o?this.handlerByRef[o]=s=>{s?r(s):n(null)}:n(null)})})}_setEditorMode(e){e=="emacs"?(this.emacsMode=new $4.EmacsExtension(this.editor),this.emacsMode.start(),(0,$4.unregisterKey)("Tab")):e=="vim"&&(this.vimMode=(0,Qee.initVimMode)(this.editor),this.vimMode.on("vim-mode-change",({mode:t})=>{this.editor.getDomNode().setAttribute("data-vim-mode",t)}))}};function Ywe(i,e){return i.map(t=>Xwe(t,e)).map((t,r)=>xt(ue({},t),{sortText:Zwe(r,i.length)}))}function Xwe(i,e){return{label:i.label,kind:Qwe(i.kind),detail:i.detail,documentation:i.documentation&&{value:i.documentation,isTrusted:!0},insertText:i.insert_text,insertTextRules:ui.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:e.editor_auto_signature?{title:"Trigger Parameter Hint",id:"editor.action.triggerParameterHints"}:null}}function Qwe(i){switch(i){case"function":return ui.languages.CompletionItemKind.Function;case"module":return ui.languages.CompletionItemKind.Module;case"struct":return ui.languages.CompletionItemKind.Struct;case"interface":return ui.languages.CompletionItemKind.Interface;case"type":return ui.languages.CompletionItemKind.Class;case"variable":return ui.languages.CompletionItemKind.Variable;case"field":return ui.languages.CompletionItemKind.Field;case"keyword":return ui.languages.CompletionItemKind.Keyword;default:return null}}function Zwe(i,e){return String(i).padStart(e,"0")}function Xee(i){return{activeSignature:0,activeParameter:i.active_argument,signatures:i.signature_items.map(e=>({label:e.signature,parameters:e.arguments.map(t=>({label:t})),documentation:null}))}}var Zee=uR;var Jwe={mounted(){this.props=this.getProps(),this.handleEvent(`cell_editor_init:${this.props.cellId}:${this.props.tag}`,({source:i,revision:e,doctest_reports:t,code_markers:r})=>{let n=this.el.querySelector("[data-el-editor-container]"),o=document.createElement("div");n.appendChild(o),this.liveEditor=new Zee(this,o,this.props.cellId,this.props.tag,i,e,this.props.language,this.props.intellisense,this.props.readOnly,r,t),this.liveEditor.onMount(()=>{let s=n.querySelector("[data-el-skeleton]");s&&s.remove()}),this.el.dispatchEvent(new CustomEvent("lb:cell:editor_created",{detail:{tag:this.props.tag,liveEditor:this.liveEditor},bubbles:!0}))})},disconnected(){this.el.removeAttribute("id")},destroyed(){this.liveEditor&&(this.el.dispatchEvent(new CustomEvent("lb:cell:editor_removed",{detail:{tag:this.props.tag},bubbles:!0})),this.liveEditor.dispose())},getProps(){return Ri(this.el,["cell-id","tag","language","intellisense","read-only"])}},Jee=Jwe;var hR="data-js-dragging",exe={mounted(){this.el.addEventListener("dragenter",i=>{this.el.setAttribute(hR,"")}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.removeAttribute(hR)}),this.el.addEventListener("drop",i=>{this.el.removeAttribute(hR)})}},ete=exe;var txe={mounted(){let i=nr.get(),e=this.el.querySelector('[name="editor_auto_completion"][value="true"]'),t=this.el.querySelector('[name="editor_auto_signature"][value="true"]'),r=this.el.querySelector('[name="editor_font_size"][value="true"]'),n=this.el.querySelector('[name="editor_light_theme"][value="true"]'),o=this.el.querySelector('[name="editor_markdown_word_wrap"][value="true"]'),s=this.el.querySelector('select[name="editor_mode"]');e.checked=i.editor_auto_completion,t.checked=i.editor_auto_signature,r.checked=i.editor_font_size===tv.large,n.checked=i.editor_theme===lm.light,o.checked=i.editor_markdown_word_wrap,s.value=i.editor_mode,e.addEventListener("change",a=>{nr.update({editor_auto_completion:a.target.checked})}),t.addEventListener("change",a=>{nr.update({editor_auto_signature:a.target.checked})}),r.addEventListener("change",a=>{nr.update({editor_font_size:a.target.checked?tv.large:tv.normal})}),n.addEventListener("change",a=>{nr.update({editor_theme:a.target.checked?lm.light:lm.default})}),o.addEventListener("change",a=>{nr.update({editor_markdown_word_wrap:a.target.checked})}),s.addEventListener("change",a=>{nr.update({editor_mode:a.target.value})})}},tte=txe;var ZR=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},wc=(i,e,t)=>(ZR(i,e,"read from private field"),t?t.call(i):e.get(i)),yc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},_R=(i,e,t,r)=>(ZR(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Xs=(i,e,t)=>(ZR(i,e,"access private method"),t),ixe="14.0";function rxe(i,e,t){let r=`https://cdn.jsdelivr.net/npm/emojibase-data@${e}/${i}`;return typeof t=="function"?r=t(i,e):typeof t=="string"&&(r=`${t}/${i}`),r}async function JR(i,e={}){let h=e,{local:t=!1,version:r="latest",cdnUrl:n}=h,o=so(h,["local","version","cdnUrl"]),s=rxe(i,r,n),a=t?localStorage:sessionStorage,l=`emojibase/${r}/${i}`,c=a.getItem(l);if(c)return Promise.resolve(JSON.parse(c));let d=await fetch(s,ue({credentials:"omit",mode:"cors",redirect:"error"},o));if(!d.ok)throw new Error("Failed to load Emojibase dataset.");let u=await d.json();try{a.setItem(l,JSON.stringify(u))}catch(f){}return u}var nxe={discord:"joypixels",slack:"iamcal"};async function ite(i,e,t){var r;return JR(`${i}/shortcodes/${(r=nxe[e])!==null&&r!==void 0?r:e}.json`,t)}function wv(i,e){if(e.length===0)return i;let t=new Set(i.shortcodes);return e.forEach(r=>{let n=r[i.hexcode];Array.isArray(n)?n.forEach(o=>t.add(o)):n&&t.add(n)}),i.shortcodes=[...t],i.skins&&i.skins.forEach(r=>{wv(r,e)}),i}function oxe(i,e=[]){let t=[];return i.forEach(r=>{if(r.skins){let n=r,{skins:o}=n,s=so(n,["skins"]);t.push(wv(s,e)),o.forEach(a=>{let l=ue({},a);s.tags&&(l.tags=[...s.tags]),t.push(wv(l,e))})}else t.push(wv(r,e))}),t}function sxe(i,e){return e.length===0||i.forEach(t=>{wv(t,e)}),i}async function ute(i,e={}){let l=e,{compact:t=!1,flat:r=!1,shortcodes:n=[]}=l,o=so(l,["compact","flat","shortcodes"]),s=await JR(`${i}/${t?"compact":"data"}.json`,o),a=[];return n.length>0&&(a=await Promise.all(n.map(c=>{let d;if(c.includes("/")){let[u,h]=c.split("/");d=ite(u,h,o)}else d=ite(i,c,o);return d.catch(()=>({}))}))),r?oxe(s,a):sxe(s,a)}async function hte(i,e){return JR(`${i}/messages.json`,e)}function fR(i,e){let t=i.target.closest("[data-emoji]");if(t){let r=e.find(n=>n.emoji===t.dataset.emoji);if(r)return r}return null}function fte(i){var e;let t=(e=window.matchMedia)==null?void 0:e.call(window,"(prefers-reduced-motion: reduce)");return i.animate&&!(t!=null&&t.matches)}function rte(i,e){return i.toLowerCase().includes(e.toLowerCase())}function axe(i,e){let t=null;return()=>{t||(t=window.setTimeout(()=>{i(),t=null},e))}}function lxe(i,e){let t=null;return(...r)=>{t&&window.clearTimeout(t),t=window.setTimeout(()=>{i(...r),t=null},e)}}function Uh(i,e,t,r){if(fte(r)&&i.animate)return i.animate(e,t).finished;let n=t.direction==="normal"?1:0,o=Object.entries(e).reduce((s,[a,l])=>xt(ue({},s),{[a]:l[n]}),{});return Object.assign(i.style,o),Promise.resolve()}function yR(i){var e;let t=document.createElement("template");return t.innerHTML=i,(e=t.content)==null?void 0:e.firstElementChild}async function cxe(i){let e=new TextEncoder().encode(i),t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function xn(...i){return i.reduce((e,t)=>xt(ue({},e),{[t]:e9(t)}),{})}function e9(i){return`picmo__${i}`}function Q4(i){for(;i.firstChild;)i.removeChild(i.firstChild);return i}function vm(i,...e){Q4(i).append(...e)}function pte(i){try{return window[i].length,!0}catch(e){return!1}}function dxe(){return pte("sessionStorage")}function uxe(){return pte("localStorage")}function Cv(i){var e;return{emoji:i.emoji,label:i.label,tags:i.tags,skins:(e=i.skins)==null?void 0:e.map(t=>Cv(t)),order:i.order,custom:!1,hexcode:i.hexcode,version:i.version}}function n3(i,e,t){var r;return t&&!t.some(n=>n.order===i.group)?!1:rte(i.label,e)||((r=i.tags)==null?void 0:r.some(n=>rte(n,e)))}var o3=class{constructor(e="en"){this.locale=e}},hxe=[(i,e)=>(i.hexcode==="1F91D"&&e<14&&(i.skins=[]),i),(i,e)=>(i.skins&&(i.skins=i.skins.filter(t=>!t.version||t.version<=e)),i)];function fxe(i,e){return hxe.some(t=>t(i,e)===null)?null:i}function s3(i,e){return i.filter(t=>fxe(t,e)!==null)}var pR={};function mte(i){return pR[i]||(pR[i]=new wR(i)),pR[i]}mte.deleteDatabase=i=>{};var wR=class extends o3{open(){return Promise.resolve()}delete(){return Promise.resolve()}close(){}isPopulated(){return Promise.resolve(!1)}getEmojiCount(){return Promise.resolve(this.emojis.length)}getEtags(){return Promise.resolve({foo:"bar"})}getHash(){return Promise.resolve("")}populate(e){return this.categories=e.groups,this.emojis=e.emojis,Promise.resolve()}getCategories(e){var t;let r=this.categories.filter(n=>n.key!=="component");if(e.showRecents&&r.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&r.push({key:"custom",order:10}),e.categories){let n=e.categories;r=r.filter(o=>n.includes(o.key)),r.sort((o,s)=>n.indexOf(o.key)-n.indexOf(s.key))}else r.sort((n,o)=>n.order-o.order);return Promise.resolve(r)}getEmojis(e,t){let r=this.emojis.filter(n=>n.group===e.order).filter(n=>n.version<=t).sort((n,o)=>n.order!=null&&o.order!=null?n.order-o.order:0).map(Cv);return Promise.resolve(s3(r,t))}searchEmojis(e,t,r,n){let o=this.emojis.filter(l=>n3(l,e,n)&&l.version<=r).map(Cv),s=t.filter(l=>n3(l,e,n)),a=[...s3(o,r),...s];return Promise.resolve(a)}setMeta(e){this.meta=e}};function pxe(i,e){let t=`https://cdn.jsdelivr.net/npm/emojibase-data@${i}/${e}`;return{emojisUrl:`${t}/data.json`,messagesUrl:`${t}/messages.json`}}async function nte(i){try{return(await fetch(i,{method:"HEAD"})).headers.get("etag")}catch(e){return null}}function mxe(i){let{emojisUrl:e,messagesUrl:t}=pxe("latest",i);try{return Promise.all([nte(e),nte(t)])}catch(r){return Promise.all([null,null])}}async function gxe(i,e,t){let r;try{r=await i.getEtags()}catch(s){r={}}let{storedEmojisEtag:n,storedMessagesEtag:o}=r;if(t!==o||e!==n){let[s,a]=await Promise.all([hte(i.locale),ute(i.locale)]);await i.populate({groups:s.groups,emojis:a,emojisEtag:e,messagesEtag:t})}}async function bxe(i,e){let t=await i.getHash();return e!==t}async function gte(i,e,t){let r=t||e(i);try{await r.open()}catch(n){console.warn("[picmo] IndexedDB not available, falling back to InMemoryStoreFactory"),r=mte(i)}return r}async function vxe(i,e,t){if(!dxe()&&typeof window<"u")throw new Error("Session storage is required to use CDN emoji data.");let r=await gte(i,e,t),[n,o]=await mxe(i);if(await r.isPopulated())n&&o&&await gxe(r,n,o);else{let[s,a]=await Promise.all([hte(i),ute(i)]);await r.populate({groups:s.groups,emojis:a,emojisEtag:n,messagesEtag:o})}return r}async function _xe(i,e,t,r,n){let o=await gte(i,e,n),s=await cxe(r);return(!await o.isPopulated()||await bxe(o,s))&&await o.populate({groups:t.groups,emojis:r,hash:s}),o}async function bte(i,e,t,r,n){return t&&r?_xe(i,e,t,r,n):vxe(i,e,n)}var Sv=class{constructor(){this.handleKeyDown=this.handleKeyDown.bind(this)}activate(e){this.rootElement=e,this.rootElement.addEventListener("keydown",this.handleKeyDown)}deactivate(){var e;(e=this.rootElement)==null||e.removeEventListener("keydown",this.handleKeyDown)}get focusableElements(){return this.rootElement.querySelectorAll('input, [tabindex="0"]')}get lastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}get firstFocusableElement(){return this.focusableElements[0]}checkFocus(e,t,r){e.target===t&&(r.focus(),e.preventDefault())}handleKeyDown(e){e.key==="Tab"&&this.checkFocus(e,e.shiftKey?this.firstFocusableElement:this.lastFocusableElement,e.shiftKey?this.lastFocusableElement:this.firstFocusableElement)}},{light:yxe,dark:v5t,auto:_5t}=xn("light","dark","auto"),Gt=class{constructor({template:e,classes:t,parent:r}){this.isDestroyed=!1,this.appEvents={},this.uiEvents=[],this.uiElements={},this.ui={},this.template=e,this.classes=t,this.parent=r,this.keyBindingHandler=this.keyBindingHandler.bind(this)}initialize(){this.bindAppEvents()}setCustomEmojis(e){this.customEmojis=e}setEvents(e){this.events=e}setPickerId(e){this.pickerId=e}emit(e,...t){this.events.emit(e,...t)}setI18n(e){this.i18n=e}setRenderer(e){this.renderer=e}setEmojiData(e){this.emojiDataPromise=e,e.then(t=>{this.emojiData=t})}updateEmojiData(e){this.emojiData=e,this.emojiDataPromise=Promise.resolve(e)}setOptions(e){this.options=e}renderSync(e={}){return this.el=this.template.renderSync(ue({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}async render(e={}){return await this.emojiDataPromise,this.el=await this.template.renderAsync(ue({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}postRender(){this.bindUIElements(),this.bindKeyBindings(),this.bindUIEvents(),this.scheduleShowAnimation()}bindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.on(e,this.appEvents[e],this)}),this.events.on("data:ready",this.updateEmojiData,this)}unbindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.off(e,this.appEvents[e])}),this.events.off("data:ready",this.updateEmojiData)}keyBindingHandler(e){let t=this.keyBindings[e.key];t&&t.call(this,e)}bindKeyBindings(){this.keyBindings&&this.el.addEventListener("keydown",this.keyBindingHandler)}unbindKeyBindings(){this.keyBindings&&this.el.removeEventListener("keydown",this.keyBindingHandler)}bindUIElements(){this.ui=Object.keys(this.uiElements).reduce((e,t)=>xt(ue({},e),{[t]:this.el.querySelector(this.uiElements[t])}),{})}bindUIEvents(){this.uiEvents.forEach(e=>{e.handler=e.handler.bind(this),(e.target?this.ui[e.target]:this.el).addEventListener(e.event,e.handler,e.options)})}unbindUIEvents(){this.uiEvents.forEach(e=>{(e.target?this.ui[e.target]:this.el).removeEventListener(e.event,e.handler)})}destroy(){this.unbindAppEvents(),this.unbindUIEvents(),this.unbindKeyBindings(),this.el.remove(),this.isDestroyed=!0}scheduleShowAnimation(){if(this.parent){let e=new MutationObserver(t=>{let[r]=t;r.type==="childList"&&r.addedNodes[0]===this.el&&(fte(this.options)&&this.animateShow&&this.animateShow(),e.disconnect)});e.observe(this.parent,{childList:!0})}}static childEvent(e,t,r,n={}){return{target:e,event:t,handler:r,options:n}}static uiEvent(e,t,r={}){return{event:e,handler:t,options:r}}static byClass(e){return`.${e}`}},wxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg>',xxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"/></svg>',Cxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240zM336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176zM259.9 369.4C288.8 369.4 316.2 375.2 340.6 385.5C352.9 390.7 366.7 381.3 361.4 369.1C344.8 330.9 305.6 303.1 259.9 303.1C214.3 303.1 175.1 330.8 158.4 369.1C153.1 381.3 166.1 390.6 179.3 385.4C203.7 375.1 231 369.4 259.9 369.4L259.9 369.4z"/></svg>',Sxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M448 64H192C85.96 64 0 149.1 0 256s85.96 192 192 192h256c106 0 192-85.96 192-192S554 64 448 64zM247.1 280h-32v32c0 13.2-10.78 24-23.98 24c-13.2 0-24.02-10.8-24.02-24v-32L136 279.1C122.8 279.1 111.1 269.2 111.1 256c0-13.2 10.85-24.01 24.05-24.01L167.1 232v-32c0-13.2 10.82-24 24.02-24c13.2 0 23.98 10.8 23.98 24v32h32c13.2 0 24.02 10.8 24.02 24C271.1 269.2 261.2 280 247.1 280zM431.1 344c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40s39.1 17.88 39.1 40S454.1 344 431.1 344zM495.1 248c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40c22.12 0 39.1 17.88 39.1 40S518.1 248 495.1 248z"/></svg>',kxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"/></svg>',Exe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M512 32H120c-13.25 0-24 10.75-24 24L96.01 288c0 53 43 96 96 96h192C437 384 480 341 480 288h32c70.63 0 128-57.38 128-128S582.6 32 512 32zM512 224h-32V96h32c35.25 0 64 28.75 64 64S547.3 224 512 224zM560 416h-544C7.164 416 0 423.2 0 432C0 458.5 21.49 480 48 480h480c26.51 0 48-21.49 48-48C576 423.2 568.8 416 560 416z"/></svg>',Txe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M482.3 192C516.5 192 576 221 576 256C576 292 516.5 320 482.3 320H365.7L265.2 495.9C259.5 505.8 248.9 512 237.4 512H181.2C170.6 512 162.9 501.8 165.8 491.6L214.9 320H112L68.8 377.6C65.78 381.6 61.04 384 56 384H14.03C6.284 384 0 377.7 0 369.1C0 368.7 .1818 367.4 .5398 366.1L32 256L.5398 145.9C.1818 144.6 0 143.3 0 142C0 134.3 6.284 128 14.03 128H56C61.04 128 65.78 130.4 68.8 134.4L112 192H214.9L165.8 20.4C162.9 10.17 170.6 0 181.2 0H237.4C248.9 0 259.5 6.153 265.2 16.12L365.7 192H482.3z"/></svg>',Ixe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M9.375 233.4C3.375 239.4 0 247.5 0 256v128c0 8.5 3.375 16.62 9.375 22.62S23.5 416 32 416h32V224H32C23.5 224 15.38 227.4 9.375 233.4zM464 96H352V32c0-17.62-14.38-32-32-32S288 14.38 288 32v64H176C131.8 96 96 131.8 96 176V448c0 35.38 28.62 64 64 64h320c35.38 0 64-28.62 64-64V176C544 131.8 508.3 96 464 96zM256 416H192v-32h64V416zM224 296C201.9 296 184 278.1 184 256S201.9 216 224 216S264 233.9 264 256S246.1 296 224 296zM352 416H288v-32h64V416zM448 416h-64v-32h64V416zM416 296c-22.12 0-40-17.88-40-40S393.9 216 416 216S456 233.9 456 256S438.1 296 416 296zM630.6 233.4C624.6 227.4 616.5 224 608 224h-32v192h32c8.5 0 16.62-3.375 22.62-9.375S640 392.5 640 384V256C640 247.5 636.6 239.4 630.6 233.4z"/></svg>',Lxe=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> + `,document.body.appendChild(this._styleElement),this.update(t)}update(e){let t=[{range:e,options:{className:this._className}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[]),this._styleElement.remove()}};function RQ(i,e){let t=e;for(;!i.endsWith(t);)t=t.slice(0,-1);return t.length}var lv=class{constructor(e,t){this._editor=e,this._statusDecoration=new gN(e,t.line,t.status),t.status==="failed"&&(this._detailsWidget=new C4(e,t))}update(e){this._statusDecoration.update(e.status),e.status==="failed"&&(this._detailsWidget&&this._detailsWidget.dispose(),this._detailsWidget=new C4(this._editor,e))}dispose(){this._statusDecoration.dispose(),this._detailsWidget&&this._detailsWidget.dispose()}},gN=class{constructor(e,t,r){this._editor=e,this._lineNumber=t,this._decorations=[],this.update(r)}update(e){let t=[{range:new ui.Range(this._lineNumber,1,this._lineNumber,1),options:{isWholeLine:!0,linesDecorationsClassName:`doctest-status-decoration-${e}`}}];this._decorations=this._editor.deltaDecorations(this._decorations,t)}dispose(){this._editor.deltaDecorations(this._decorations,[])}},C4=class{constructor(e,t){this._editor=e;let{line:r,end_line:n,details:o,column:s}=t,a=o.join(` +`),l=o.length,c=this._editor.getOption(ui.editor.EditorOption.fontSize),d=this._editor.getOption(ui.editor.EditorOption.lineHeight),u=document.createElement("div");u.innerHTML=a,u.classList.add("doctest-details-widget","editor-theme-aware-ansi"),u.style.fontSize=`${c}px`,u.style.lineHeight=`${d}px`,this._overlayWidget={getId:()=>`livebook.doctest.overlay.${r}`,getDomNode:()=>u,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget),this._editor.changeViewZones(h=>{this._viewZone=h.addZone({afterLineNumber:n,heightInPx:l*d+12,domNode:document.createElement("div"),onDomNodeTop:f=>{u.style.top=`${f}px`;let m=this._editor.getDomNode().querySelector(".margin-view-overlays").offsetWidth;u.style.paddingLeft=`calc(${m}px + ${s}ch)`},onComputedHeight:f=>{u.style.height=`${f}px`}})})}dispose(){this._editor.removeOverlayWidget(this._overlayWidget),this._editor.changeViewZones(e=>{e.removeZone(this._viewZone)})}};var $4=Wn(JQ()),G4=Wn(Xee());window.unstable_monacoExtensions={VimMode:$4.VimMode};var hR=class{constructor(e,t,r,n,o,s,a,l,c,d,u){this.hook=e,this.container=t,this.cellId=r,this.source=o,this.language=a,this.intellisense=l,this.readOnly=c,this._onMount=[],this._onChange=[],this._onBlur=[],this._onCursorSelectionChange=[],this._remoteUserByClientId={},this._doctestByLine={},this._initializeWidgets=()=>{this.setCodeMarkers(d),u.forEach(f=>{this.updateDoctest(f)})};let h=new sv(e,r,n);this.editorClient=new nv(h,s),this.editorClient.onDelta(f=>{this.source=f.applyToString(this.source),this._onChange.forEach(m=>m(this.source))})}isMounted(){return!!this.editor}mount(){if(this.isMounted())throw new Error("The editor is already mounted");this._mountEditor(),this.intellisense&&this._setupIntellisense(),this.editorClient.setEditorAdapter(new ov(this.editor)),this.editor.onDidFocusEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"always"})}),this.editor.onDidBlurEditorWidget(()=>{this.editor.updateOptions({matchBrackets:"never"}),this._onBlur.forEach(e=>e())}),this.editor.onDidChangeCursorSelection(e=>{this._onCursorSelectionChange.forEach(t=>t(e.selection))}),this._onMount.forEach(e=>e())}_ensureMounted(){this.isMounted()||this.mount()}getSource(){return this.source}onMount(e){this._onMount.push(e)}onChange(e){this._onChange.push(e)}onCursorSelectionChange(e){this._onCursorSelectionChange.push(e)}onBlur(e){this._onBlur.push(e)}focus(){this._ensureMounted(),this.editor.focus()}blur(){this._ensureMounted(),this.editor.hasTextFocus()&&document.activeElement.blur()}insert(e){this._ensureMounted();let t=this.editor.getSelection();this.editor.getModel().pushEditOperations([],[{forceMoveMarkers:!0,range:t,text:e}])}dispose(){if(this.isMounted()){this.editor.dispose();let e=this.editor.getModel();e&&e.dispose()}}updateUserSelection(e,t){this._ensureMounted(),this._remoteUserByClientId[e.id]?this._remoteUserByClientId[e.id].update(t):this._remoteUserByClientId[e.id]=new av(this.editor,t,e.hex_color,e.name)}removeUserSelection(e){this._ensureMounted(),this._remoteUserByClientId[e.id]&&(this._remoteUserByClientId[e.id].dispose(),delete this._remoteUserByClientId[e.id])}updateDoctest(e){this._ensureMounted(),this._doctestByLine[e.line]?this._doctestByLine[e.line].update(e):this._doctestByLine[e.line]=new lv(this.editor,e)}clearDoctests(){this._ensureMounted(),Object.values(this._doctestByLine).forEach(e=>e.dispose()),this._doctestByLine={}}setCodeMarkers(e){this._ensureMounted();let t="livebook.code-marker",r=e.map(n=>{let o=this.editor.getModel().getLineContent(n.line),[,s,a]=o.match(/^(\s*).*?(\s*)$/);return{startLineNumber:n.line,startColumn:s.length+1,endLineNumber:n.line,endColumn:o.length+1-a.length,message:n.description,severity:{error:ui.MarkerSeverity.Error,warning:ui.MarkerSeverity.Warning}[n.severity]}});ui.editor.setModelMarkers(this.editor.getModel(),t,r)}_mountEditor(){let e=nr.get();this.editor=ui.editor.create(this.container,{language:this.language,value:this.source,readOnly:this.readOnly,scrollbar:{vertical:"hidden",alwaysConsumeMouseWheel:!1},minimap:{enabled:!1},overviewRulerLanes:0,scrollBeyondLastLine:!1,guides:{indentation:!1},occurrencesHighlight:!1,renderLineHighlight:"none",theme:e.editor_theme,fontFamily:"JetBrains Mono, Droid Sans Mono, monospace",fontSize:e.editor_font_size,tabIndex:-1,tabSize:2,autoIndent:!0,formatOnType:!0,formatOnPaste:!0,quickSuggestions:this.intellisense&&e.editor_auto_completion,tabCompletion:"on",suggestSelection:"first",wordBasedSuggestions:!this.intellisense,parameterHints:this.intellisense&&e.editor_auto_signature,wordWrap:this.language==="markdown"&&e.editor_markdown_word_wrap?"on":"off"}),this._setScreenDependantEditorOptions(),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"enable-word-wrapping",label:"Enable word wrapping",precondition:"config.editor.wordWrap == off",keybindings:[ui.KeyMod.Alt|ui.KeyCode.KeyZ],run:n=>n.updateOptions({wordWrap:"on"})}),this.editor.addAction({contextMenuGroupId:"word-wrapping",id:"disable-word-wrapping",label:"Disable word wrapping",precondition:"config.editor.wordWrap == on",keybindings:[ui.KeyMod.Alt|ui.KeyCode.KeyZ],run:n=>n.updateOptions({wordWrap:"off"})}),new ResizeObserver(n=>{n.forEach(o=>{this.container.offsetHeight>0&&(this._setScreenDependantEditorOptions(),this.editor.layout())})}).observe(this.container),this.editor.onDidContentSizeChange(()=>{let n=this.editor.getContentHeight();this.container.style.height=`${n}px`});let r=this.editor.getContribution("editor.controller.quickInput").widget.domNode;r.remove(),this.editor._modelData.view._contentWidgets.overflowingContentWidgetsDomNode.domNode.appendChild(r),this._initializeWidgets(),this._setEditorMode(e.editor_mode)}_setScreenDependantEditorOptions(){window.screen.width<768?this.editor.updateOptions({folding:!1,lineDecorationsWidth:16,lineNumbersMinChars:Math.floor(Math.log10(this.editor.getModel().getLineCount()))+3}):this.editor.updateOptions({folding:!0,lineDecorationsWidth:10,lineNumbersMinChars:5})}_setupIntellisense(){let e=nr.get();this.handlerByRef={},this.editor.getModel().__getCompletionItems__=(r,n)=>{let s=r.getLineContent(n.lineNumber).slice(0,n.column-1);return this._asyncIntellisenseRequest("completion",{hint:s,editor_auto_completion:e.editor_auto_completion}).then(a=>({suggestions:Ywe(a.items,e).map(c=>{let d=RQ(s,c.insertText),u=new ui.Range(n.lineNumber,n.column-d,n.lineNumber,n.column);return xt(ue({},c),{range:u})})})).catch(()=>null)},this.editor.getModel().__getHover__=(r,n)=>{this.hoverContentProcessed=!1,this.hoverContentEl||(this.hoverContentEl=this.container.querySelector(".monaco-hover-content"),this.hoverContentEl?new MutationObserver(a=>{this.hoverContentProcessed||(NQ(this.hoverContentEl,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}],throwOnError:!1}),this.hoverContentProcessed=!0)}).observe(this.hoverContentEl,{childList:!0}):console.warn("Could not find an element matching .monaco-hover-content"));let o=r.getLineContent(n.lineNumber),s=n.column;return this._asyncIntellisenseRequest("details",{line:o,column:s}).then(a=>{let l=a.contents.map(d=>({value:d,isTrusted:!0})),c=new ui.Range(n.lineNumber,a.range.from,n.lineNumber,a.range.to);return{contents:l,range:c}}).catch(()=>null)};let t={codeUntilLastStop:null,response:null};this.editor.getModel().__getSignatureHelp__=(r,n)=>{let o=r.getLinesContent(),s=n.lineNumber-1,a=o.slice(0,s),l=o[s].slice(0,n.column-1),c=[...a,l].join(` +`),d=c.replace(/[^(),\s]*?$/,"").replace(/([(),])\s*$/,"$1");return d===t.codeUntilLastStop?{value:Qee(t.response),dispose:()=>{}}:this._asyncIntellisenseRequest("signature",{hint:c}).then(u=>(t.response=u,t.codeUntilLastStop=d,{value:Qee(u),dispose:()=>{}})).catch(()=>null)},this.editor.getModel().__getDocumentFormattingEdits__=r=>{let n=r.getValue();return this._asyncIntellisenseRequest("format",{code:n}).then(o=>(this.setCodeMarkers(o.code_markers),o.code?[{range:r.getFullModelRange(),text:o.code}]:[])).catch(()=>null)},this.hook.handleEvent("intellisense_response",({ref:r,response:n})=>{let o=this.handlerByRef[r];o&&(o(n),delete this.handlerByRef[r])})}_asyncIntellisenseRequest(e,t){return new Promise((r,n)=>{this.hook.pushEvent("intellisense_request",ue({cell_id:this.cellId,type:e},t),({ref:o})=>{o?this.handlerByRef[o]=s=>{s?r(s):n(null)}:n(null)})})}_setEditorMode(e){e=="emacs"?(this.emacsMode=new G4.EmacsExtension(this.editor),this.emacsMode.start(),(0,G4.unregisterKey)("Tab")):e=="vim"&&(this.vimMode=(0,$4.initVimMode)(this.editor),this.vimMode.on("vim-mode-change",({mode:t})=>{this.editor.getDomNode().setAttribute("data-vim-mode",t)}))}};function Ywe(i,e){return i.map(t=>Xwe(t,e)).map((t,r)=>xt(ue({},t),{sortText:Zwe(r,i.length)}))}function Xwe(i,e){return{label:i.label,kind:Qwe(i.kind),detail:i.detail,documentation:i.documentation&&{value:i.documentation,isTrusted:!0},insertText:i.insert_text,insertTextRules:ui.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:e.editor_auto_signature?{title:"Trigger Parameter Hint",id:"editor.action.triggerParameterHints"}:null}}function Qwe(i){switch(i){case"function":return ui.languages.CompletionItemKind.Function;case"module":return ui.languages.CompletionItemKind.Module;case"struct":return ui.languages.CompletionItemKind.Struct;case"interface":return ui.languages.CompletionItemKind.Interface;case"type":return ui.languages.CompletionItemKind.Class;case"variable":return ui.languages.CompletionItemKind.Variable;case"field":return ui.languages.CompletionItemKind.Field;case"keyword":return ui.languages.CompletionItemKind.Keyword;default:return null}}function Zwe(i,e){return String(i).padStart(e,"0")}function Qee(i){return{activeSignature:0,activeParameter:i.active_argument,signatures:i.signature_items.map(e=>({label:e.signature,parameters:e.arguments.map(t=>({label:t})),documentation:null}))}}var Zee=hR;var Jwe={mounted(){this.props=this.getProps(),this.handleEvent(`cell_editor_init:${this.props.cellId}:${this.props.tag}`,({source:i,revision:e,doctest_reports:t,code_markers:r})=>{let n=this.el.querySelector("[data-el-editor-container]"),o=document.createElement("div");n.appendChild(o),this.liveEditor=new Zee(this,o,this.props.cellId,this.props.tag,i,e,this.props.language,this.props.intellisense,this.props.readOnly,r,t),this.liveEditor.onMount(()=>{let s=n.querySelector("[data-el-skeleton]");s&&s.remove()}),this.el.dispatchEvent(new CustomEvent("lb:cell:editor_created",{detail:{tag:this.props.tag,liveEditor:this.liveEditor},bubbles:!0}))})},disconnected(){this.el.removeAttribute("id")},destroyed(){this.liveEditor&&(this.el.dispatchEvent(new CustomEvent("lb:cell:editor_removed",{detail:{tag:this.props.tag},bubbles:!0})),this.liveEditor.dispose())},getProps(){return Ri(this.el,["cell-id","tag","language","intellisense","read-only"])}},Jee=Jwe;var fR="data-js-dragging",exe={mounted(){this.el.addEventListener("dragenter",i=>{this.el.setAttribute(fR,"")}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.removeAttribute(fR)}),this.el.addEventListener("drop",i=>{this.el.removeAttribute(fR)})}},ete=exe;var txe={mounted(){let i=nr.get(),e=this.el.querySelector('[name="editor_auto_completion"][value="true"]'),t=this.el.querySelector('[name="editor_auto_signature"][value="true"]'),r=this.el.querySelector('[name="editor_font_size"][value="true"]'),n=this.el.querySelector('[name="editor_light_theme"][value="true"]'),o=this.el.querySelector('[name="editor_markdown_word_wrap"][value="true"]'),s=this.el.querySelector('select[name="editor_mode"]');e.checked=i.editor_auto_completion,t.checked=i.editor_auto_signature,r.checked=i.editor_font_size===tv.large,n.checked=i.editor_theme===lm.light,o.checked=i.editor_markdown_word_wrap,s.value=i.editor_mode,e.addEventListener("change",a=>{nr.update({editor_auto_completion:a.target.checked})}),t.addEventListener("change",a=>{nr.update({editor_auto_signature:a.target.checked})}),r.addEventListener("change",a=>{nr.update({editor_font_size:a.target.checked?tv.large:tv.normal})}),n.addEventListener("change",a=>{nr.update({editor_theme:a.target.checked?lm.light:lm.default})}),o.addEventListener("change",a=>{nr.update({editor_markdown_word_wrap:a.target.checked})}),s.addEventListener("change",a=>{nr.update({editor_mode:a.target.value})})}},tte=txe;var JR=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},wc=(i,e,t)=>(JR(i,e,"read from private field"),t?t.call(i):e.get(i)),yc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},yR=(i,e,t,r)=>(JR(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Xs=(i,e,t)=>(JR(i,e,"access private method"),t),ixe="14.0";function rxe(i,e,t){let r=`https://cdn.jsdelivr.net/npm/emojibase-data@${e}/${i}`;return typeof t=="function"?r=t(i,e):typeof t=="string"&&(r=`${t}/${i}`),r}async function e9(i,e={}){let h=e,{local:t=!1,version:r="latest",cdnUrl:n}=h,o=so(h,["local","version","cdnUrl"]),s=rxe(i,r,n),a=t?localStorage:sessionStorage,l=`emojibase/${r}/${i}`,c=a.getItem(l);if(c)return Promise.resolve(JSON.parse(c));let d=await fetch(s,ue({credentials:"omit",mode:"cors",redirect:"error"},o));if(!d.ok)throw new Error("Failed to load Emojibase dataset.");let u=await d.json();try{a.setItem(l,JSON.stringify(u))}catch(f){}return u}var nxe={discord:"joypixels",slack:"iamcal"};async function ite(i,e,t){var r;return e9(`${i}/shortcodes/${(r=nxe[e])!==null&&r!==void 0?r:e}.json`,t)}function wv(i,e){if(e.length===0)return i;let t=new Set(i.shortcodes);return e.forEach(r=>{let n=r[i.hexcode];Array.isArray(n)?n.forEach(o=>t.add(o)):n&&t.add(n)}),i.shortcodes=[...t],i.skins&&i.skins.forEach(r=>{wv(r,e)}),i}function oxe(i,e=[]){let t=[];return i.forEach(r=>{if(r.skins){let n=r,{skins:o}=n,s=so(n,["skins"]);t.push(wv(s,e)),o.forEach(a=>{let l=ue({},a);s.tags&&(l.tags=[...s.tags]),t.push(wv(l,e))})}else t.push(wv(r,e))}),t}function sxe(i,e){return e.length===0||i.forEach(t=>{wv(t,e)}),i}async function ute(i,e={}){let l=e,{compact:t=!1,flat:r=!1,shortcodes:n=[]}=l,o=so(l,["compact","flat","shortcodes"]),s=await e9(`${i}/${t?"compact":"data"}.json`,o),a=[];return n.length>0&&(a=await Promise.all(n.map(c=>{let d;if(c.includes("/")){let[u,h]=c.split("/");d=ite(u,h,o)}else d=ite(i,c,o);return d.catch(()=>({}))}))),r?oxe(s,a):sxe(s,a)}async function hte(i,e){return e9(`${i}/messages.json`,e)}function pR(i,e){let t=i.target.closest("[data-emoji]");if(t){let r=e.find(n=>n.emoji===t.dataset.emoji);if(r)return r}return null}function fte(i){var e;let t=(e=window.matchMedia)==null?void 0:e.call(window,"(prefers-reduced-motion: reduce)");return i.animate&&!(t!=null&&t.matches)}function rte(i,e){return i.toLowerCase().includes(e.toLowerCase())}function axe(i,e){let t=null;return()=>{t||(t=window.setTimeout(()=>{i(),t=null},e))}}function lxe(i,e){let t=null;return(...r)=>{t&&window.clearTimeout(t),t=window.setTimeout(()=>{i(...r),t=null},e)}}function Uh(i,e,t,r){if(fte(r)&&i.animate)return i.animate(e,t).finished;let n=t.direction==="normal"?1:0,o=Object.entries(e).reduce((s,[a,l])=>xt(ue({},s),{[a]:l[n]}),{});return Object.assign(i.style,o),Promise.resolve()}function wR(i){var e;let t=document.createElement("template");return t.innerHTML=i,(e=t.content)==null?void 0:e.firstElementChild}async function cxe(i){let e=new TextEncoder().encode(i),t=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function xn(...i){return i.reduce((e,t)=>xt(ue({},e),{[t]:t9(t)}),{})}function t9(i){return`picmo__${i}`}function Z4(i){for(;i.firstChild;)i.removeChild(i.firstChild);return i}function vm(i,...e){Z4(i).append(...e)}function pte(i){try{return window[i].length,!0}catch(e){return!1}}function dxe(){return pte("sessionStorage")}function uxe(){return pte("localStorage")}function Cv(i){var e;return{emoji:i.emoji,label:i.label,tags:i.tags,skins:(e=i.skins)==null?void 0:e.map(t=>Cv(t)),order:i.order,custom:!1,hexcode:i.hexcode,version:i.version}}function o3(i,e,t){var r;return t&&!t.some(n=>n.order===i.group)?!1:rte(i.label,e)||((r=i.tags)==null?void 0:r.some(n=>rte(n,e)))}var s3=class{constructor(e="en"){this.locale=e}},hxe=[(i,e)=>(i.hexcode==="1F91D"&&e<14&&(i.skins=[]),i),(i,e)=>(i.skins&&(i.skins=i.skins.filter(t=>!t.version||t.version<=e)),i)];function fxe(i,e){return hxe.some(t=>t(i,e)===null)?null:i}function a3(i,e){return i.filter(t=>fxe(t,e)!==null)}var mR={};function mte(i){return mR[i]||(mR[i]=new xR(i)),mR[i]}mte.deleteDatabase=i=>{};var xR=class extends s3{open(){return Promise.resolve()}delete(){return Promise.resolve()}close(){}isPopulated(){return Promise.resolve(!1)}getEmojiCount(){return Promise.resolve(this.emojis.length)}getEtags(){return Promise.resolve({foo:"bar"})}getHash(){return Promise.resolve("")}populate(e){return this.categories=e.groups,this.emojis=e.emojis,Promise.resolve()}getCategories(e){var t;let r=this.categories.filter(n=>n.key!=="component");if(e.showRecents&&r.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&r.push({key:"custom",order:10}),e.categories){let n=e.categories;r=r.filter(o=>n.includes(o.key)),r.sort((o,s)=>n.indexOf(o.key)-n.indexOf(s.key))}else r.sort((n,o)=>n.order-o.order);return Promise.resolve(r)}getEmojis(e,t){let r=this.emojis.filter(n=>n.group===e.order).filter(n=>n.version<=t).sort((n,o)=>n.order!=null&&o.order!=null?n.order-o.order:0).map(Cv);return Promise.resolve(a3(r,t))}searchEmojis(e,t,r,n){let o=this.emojis.filter(l=>o3(l,e,n)&&l.version<=r).map(Cv),s=t.filter(l=>o3(l,e,n)),a=[...a3(o,r),...s];return Promise.resolve(a)}setMeta(e){this.meta=e}};function pxe(i,e){let t=`https://cdn.jsdelivr.net/npm/emojibase-data@${i}/${e}`;return{emojisUrl:`${t}/data.json`,messagesUrl:`${t}/messages.json`}}async function nte(i){try{return(await fetch(i,{method:"HEAD"})).headers.get("etag")}catch(e){return null}}function mxe(i){let{emojisUrl:e,messagesUrl:t}=pxe("latest",i);try{return Promise.all([nte(e),nte(t)])}catch(r){return Promise.all([null,null])}}async function gxe(i,e,t){let r;try{r=await i.getEtags()}catch(s){r={}}let{storedEmojisEtag:n,storedMessagesEtag:o}=r;if(t!==o||e!==n){let[s,a]=await Promise.all([hte(i.locale),ute(i.locale)]);await i.populate({groups:s.groups,emojis:a,emojisEtag:e,messagesEtag:t})}}async function bxe(i,e){let t=await i.getHash();return e!==t}async function gte(i,e,t){let r=t||e(i);try{await r.open()}catch(n){console.warn("[picmo] IndexedDB not available, falling back to InMemoryStoreFactory"),r=mte(i)}return r}async function vxe(i,e,t){if(!dxe()&&typeof window<"u")throw new Error("Session storage is required to use CDN emoji data.");let r=await gte(i,e,t),[n,o]=await mxe(i);if(await r.isPopulated())n&&o&&await gxe(r,n,o);else{let[s,a]=await Promise.all([hte(i),ute(i)]);await r.populate({groups:s.groups,emojis:a,emojisEtag:n,messagesEtag:o})}return r}async function _xe(i,e,t,r,n){let o=await gte(i,e,n),s=await cxe(r);return(!await o.isPopulated()||await bxe(o,s))&&await o.populate({groups:t.groups,emojis:r,hash:s}),o}async function bte(i,e,t,r,n){return t&&r?_xe(i,e,t,r,n):vxe(i,e,n)}var Sv=class{constructor(){this.handleKeyDown=this.handleKeyDown.bind(this)}activate(e){this.rootElement=e,this.rootElement.addEventListener("keydown",this.handleKeyDown)}deactivate(){var e;(e=this.rootElement)==null||e.removeEventListener("keydown",this.handleKeyDown)}get focusableElements(){return this.rootElement.querySelectorAll('input, [tabindex="0"]')}get lastFocusableElement(){return this.focusableElements[this.focusableElements.length-1]}get firstFocusableElement(){return this.focusableElements[0]}checkFocus(e,t,r){e.target===t&&(r.focus(),e.preventDefault())}handleKeyDown(e){e.key==="Tab"&&this.checkFocus(e,e.shiftKey?this.firstFocusableElement:this.lastFocusableElement,e.shiftKey?this.lastFocusableElement:this.firstFocusableElement)}},{light:yxe,dark:v5t,auto:_5t}=xn("light","dark","auto"),Gt=class{constructor({template:e,classes:t,parent:r}){this.isDestroyed=!1,this.appEvents={},this.uiEvents=[],this.uiElements={},this.ui={},this.template=e,this.classes=t,this.parent=r,this.keyBindingHandler=this.keyBindingHandler.bind(this)}initialize(){this.bindAppEvents()}setCustomEmojis(e){this.customEmojis=e}setEvents(e){this.events=e}setPickerId(e){this.pickerId=e}emit(e,...t){this.events.emit(e,...t)}setI18n(e){this.i18n=e}setRenderer(e){this.renderer=e}setEmojiData(e){this.emojiDataPromise=e,e.then(t=>{this.emojiData=t})}updateEmojiData(e){this.emojiData=e,this.emojiDataPromise=Promise.resolve(e)}setOptions(e){this.options=e}renderSync(e={}){return this.el=this.template.renderSync(ue({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}async render(e={}){return await this.emojiDataPromise,this.el=await this.template.renderAsync(ue({classes:this.classes,i18n:this.i18n,pickerId:this.pickerId},e)),this.postRender(),this.el}postRender(){this.bindUIElements(),this.bindKeyBindings(),this.bindUIEvents(),this.scheduleShowAnimation()}bindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.on(e,this.appEvents[e],this)}),this.events.on("data:ready",this.updateEmojiData,this)}unbindAppEvents(){Object.keys(this.appEvents).forEach(e=>{this.events.off(e,this.appEvents[e])}),this.events.off("data:ready",this.updateEmojiData)}keyBindingHandler(e){let t=this.keyBindings[e.key];t&&t.call(this,e)}bindKeyBindings(){this.keyBindings&&this.el.addEventListener("keydown",this.keyBindingHandler)}unbindKeyBindings(){this.keyBindings&&this.el.removeEventListener("keydown",this.keyBindingHandler)}bindUIElements(){this.ui=Object.keys(this.uiElements).reduce((e,t)=>xt(ue({},e),{[t]:this.el.querySelector(this.uiElements[t])}),{})}bindUIEvents(){this.uiEvents.forEach(e=>{e.handler=e.handler.bind(this),(e.target?this.ui[e.target]:this.el).addEventListener(e.event,e.handler,e.options)})}unbindUIEvents(){this.uiEvents.forEach(e=>{(e.target?this.ui[e.target]:this.el).removeEventListener(e.event,e.handler)})}destroy(){this.unbindAppEvents(),this.unbindUIEvents(),this.unbindKeyBindings(),this.el.remove(),this.isDestroyed=!0}scheduleShowAnimation(){if(this.parent){let e=new MutationObserver(t=>{let[r]=t;r.type==="childList"&&r.addedNodes[0]===this.el&&(fte(this.options)&&this.animateShow&&this.animateShow(),e.disconnect)});e.observe(this.parent,{childList:!0})}}static childEvent(e,t,r,n={}){return{target:e,event:t,handler:r,options:n}}static uiEvent(e,t,r={}){return{event:e,handler:t,options:r}}static byClass(e){return`.${e}`}},wxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg>',xxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"/></svg>',Cxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM176.4 240C194 240 208.4 225.7 208.4 208C208.4 190.3 194 176 176.4 176C158.7 176 144.4 190.3 144.4 208C144.4 225.7 158.7 240 176.4 240zM336.4 176C318.7 176 304.4 190.3 304.4 208C304.4 225.7 318.7 240 336.4 240C354 240 368.4 225.7 368.4 208C368.4 190.3 354 176 336.4 176zM259.9 369.4C288.8 369.4 316.2 375.2 340.6 385.5C352.9 390.7 366.7 381.3 361.4 369.1C344.8 330.9 305.6 303.1 259.9 303.1C214.3 303.1 175.1 330.8 158.4 369.1C153.1 381.3 166.1 390.6 179.3 385.4C203.7 375.1 231 369.4 259.9 369.4L259.9 369.4z"/></svg>',Sxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M448 64H192C85.96 64 0 149.1 0 256s85.96 192 192 192h256c106 0 192-85.96 192-192S554 64 448 64zM247.1 280h-32v32c0 13.2-10.78 24-23.98 24c-13.2 0-24.02-10.8-24.02-24v-32L136 279.1C122.8 279.1 111.1 269.2 111.1 256c0-13.2 10.85-24.01 24.05-24.01L167.1 232v-32c0-13.2 10.82-24 24.02-24c13.2 0 23.98 10.8 23.98 24v32h32c13.2 0 24.02 10.8 24.02 24C271.1 269.2 261.2 280 247.1 280zM431.1 344c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40s39.1 17.88 39.1 40S454.1 344 431.1 344zM495.1 248c-22.12 0-39.1-17.87-39.1-39.1s17.87-40 39.1-40c22.12 0 39.1 17.88 39.1 40S518.1 248 495.1 248z"/></svg>',kxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"/></svg>',Exe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M512 32H120c-13.25 0-24 10.75-24 24L96.01 288c0 53 43 96 96 96h192C437 384 480 341 480 288h32c70.63 0 128-57.38 128-128S582.6 32 512 32zM512 224h-32V96h32c35.25 0 64 28.75 64 64S547.3 224 512 224zM560 416h-544C7.164 416 0 423.2 0 432C0 458.5 21.49 480 48 480h480c26.51 0 48-21.49 48-48C576 423.2 568.8 416 560 416z"/></svg>',Txe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M482.3 192C516.5 192 576 221 576 256C576 292 516.5 320 482.3 320H365.7L265.2 495.9C259.5 505.8 248.9 512 237.4 512H181.2C170.6 512 162.9 501.8 165.8 491.6L214.9 320H112L68.8 377.6C65.78 381.6 61.04 384 56 384H14.03C6.284 384 0 377.7 0 369.1C0 368.7 .1818 367.4 .5398 366.1L32 256L.5398 145.9C.1818 144.6 0 143.3 0 142C0 134.3 6.284 128 14.03 128H56C61.04 128 65.78 130.4 68.8 134.4L112 192H214.9L165.8 20.4C162.9 10.17 170.6 0 181.2 0H237.4C248.9 0 259.5 6.153 265.2 16.12L365.7 192H482.3z"/></svg>',Ixe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M9.375 233.4C3.375 239.4 0 247.5 0 256v128c0 8.5 3.375 16.62 9.375 22.62S23.5 416 32 416h32V224H32C23.5 224 15.38 227.4 9.375 233.4zM464 96H352V32c0-17.62-14.38-32-32-32S288 14.38 288 32v64H176C131.8 96 96 131.8 96 176V448c0 35.38 28.62 64 64 64h320c35.38 0 64-28.62 64-64V176C544 131.8 508.3 96 464 96zM256 416H192v-32h64V416zM224 296C201.9 296 184 278.1 184 256S201.9 216 224 216S264 233.9 264 256S246.1 296 224 296zM352 416H288v-32h64V416zM448 416h-64v-32h64V416zM416 296c-22.12 0-40-17.88-40-40S393.9 216 416 216S456 233.9 456 256S438.1 296 416 296zM630.6 233.4C624.6 227.4 616.5 224 608 224h-32v192h32c8.5 0 16.62-3.375 22.62-9.375S640 392.5 640 384V256C640 247.5 636.6 239.4 630.6 233.4z"/></svg>',Lxe=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <defs> <radialGradient gradientUnits="userSpaceOnUse" cy="10%" id="gradient-0"> <stop offset="0" stop-color="hsl(50, 100%, 50%)" /> @@ -503,9 +503,9 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" </defs> <!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="url('#radial')" d="M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z" /> -</svg>`,Oxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>';function Fxe(i,e){let t=yR(e);return t.dataset.icon=i,t.classList.add(e9("icon")),t}var ote={clock:wxe,flag:xxe,frown:Cxe,gamepad:Sxe,lightbulb:kxe,mug:Exe,plane:Txe,robot:Ixe,sad:Lxe,search:Axe,smiley:Dxe,symbols:Mxe,tree:Nxe,users:Rxe,warning:Pxe,xmark:Oxe},d3={recents:"clock","smileys-emotion":"smiley","people-body":"users","animals-nature":"tree","food-drink":"mug",activities:"gamepad","travel-places":"plane",objects:"lightbulb",symbols:"symbols",flags:"flag",custom:"robot"};function vte(i,e){if(!(i in ote))return console.warn(`Unknown icon: "${i}"`),document.createElement("div");let t=Fxe(i,ote[i]);return e&&t.classList.add(e9(`icon-${e}`)),t}var zxe={mode:"sync"},yv,Z4,J4,xR,e3,CR,t3,SR,Pr=class{constructor(e,t={}){yc(this,J4),yc(this,e3),yc(this,t3),yc(this,yv,void 0),yc(this,Z4,void 0),_R(this,yv,e),_R(this,Z4,t.mode||zxe.mode)}renderSync(e={}){let t=yR(wc(this,yv).call(this,e));return Xs(this,t3,SR).call(this,t,e),Xs(this,e3,CR).call(this,t),Xs(this,J4,xR).call(this,t,e),t}async renderAsync(e={}){let t=yR(wc(this,yv).call(this,e));return Xs(this,t3,SR).call(this,t,e),Xs(this,e3,CR).call(this,t),await Xs(this,J4,xR).call(this,t,e),t}render(e){return wc(this,Z4)==="sync"?this.renderSync(e):this.renderAsync(e)}};yv=new WeakMap,Z4=new WeakMap,J4=new WeakSet,xR=async function(i,e){let t=i.querySelectorAll("[data-view]"),r=[];for(let n of t){let o=e[n.dataset.view];o?n.dataset.render!=="sync"?r.push(o.render().then(s=>(n.replaceWith(s),s))):n.replaceWith(o.renderSync()):n.remove()}return Promise.all(r)},e3=new WeakSet,CR=function(i){i.querySelectorAll("i[data-icon]").forEach(e=>{let{icon:t,size:r}=e.dataset;e.replaceWith(vte(t,r))})},t3=new WeakSet,SR=function(i,e){return i.querySelectorAll("[data-placeholder]").forEach(t=>{let r=t.dataset.placeholder;if(r&&e[r]){let n=e[r];t.replaceWith(...[n].flat())}else console.warn(`Missing placeholder element for key "${r}"`)}),i};var Bxe=xn("imagePlaceholder","placeholder"),Hxe=new Pr(({classes:i})=>` +</svg>`,Oxe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>';function Fxe(i,e){let t=wR(e);return t.dataset.icon=i,t.classList.add(t9("icon")),t}var ote={clock:wxe,flag:xxe,frown:Cxe,gamepad:Sxe,lightbulb:kxe,mug:Exe,plane:Txe,robot:Ixe,sad:Lxe,search:Axe,smiley:Dxe,symbols:Mxe,tree:Nxe,users:Rxe,warning:Pxe,xmark:Oxe},u3={recents:"clock","smileys-emotion":"smiley","people-body":"users","animals-nature":"tree","food-drink":"mug",activities:"gamepad","travel-places":"plane",objects:"lightbulb",symbols:"symbols",flags:"flag",custom:"robot"};function vte(i,e){if(!(i in ote))return console.warn(`Unknown icon: "${i}"`),document.createElement("div");let t=Fxe(i,ote[i]);return e&&t.classList.add(t9(`icon-${e}`)),t}var zxe={mode:"sync"},yv,J4,e3,CR,t3,SR,i3,kR,Pr=class{constructor(e,t={}){yc(this,e3),yc(this,t3),yc(this,i3),yc(this,yv,void 0),yc(this,J4,void 0),yR(this,yv,e),yR(this,J4,t.mode||zxe.mode)}renderSync(e={}){let t=wR(wc(this,yv).call(this,e));return Xs(this,i3,kR).call(this,t,e),Xs(this,t3,SR).call(this,t),Xs(this,e3,CR).call(this,t,e),t}async renderAsync(e={}){let t=wR(wc(this,yv).call(this,e));return Xs(this,i3,kR).call(this,t,e),Xs(this,t3,SR).call(this,t),await Xs(this,e3,CR).call(this,t,e),t}render(e){return wc(this,J4)==="sync"?this.renderSync(e):this.renderAsync(e)}};yv=new WeakMap,J4=new WeakMap,e3=new WeakSet,CR=async function(i,e){let t=i.querySelectorAll("[data-view]"),r=[];for(let n of t){let o=e[n.dataset.view];o?n.dataset.render!=="sync"?r.push(o.render().then(s=>(n.replaceWith(s),s))):n.replaceWith(o.renderSync()):n.remove()}return Promise.all(r)},t3=new WeakSet,SR=function(i){i.querySelectorAll("i[data-icon]").forEach(e=>{let{icon:t,size:r}=e.dataset;e.replaceWith(vte(t,r))})},i3=new WeakSet,kR=function(i,e){return i.querySelectorAll("[data-placeholder]").forEach(t=>{let r=t.dataset.placeholder;if(r&&e[r]){let n=e[r];t.replaceWith(...[n].flat())}else console.warn(`Missing placeholder element for key "${r}"`)}),i};var Bxe=xn("imagePlaceholder","placeholder"),Hxe=new Pr(({classes:i})=>` <div class="${i.placeholder} ${i.imagePlaceholder}"></div> -`),kR=class extends Gt{constructor({classNames:e}={}){super({template:Hxe,classes:Bxe}),this.classNames=e}load(e){let t=document.createElement("img");this.classNames&&(t.className=this.classNames),t.addEventListener("load",()=>{this.el.replaceWith(t)},{once:!0}),Promise.resolve(e).then(r=>t.src=r)}renderSync(){return super.renderSync(),this.classNames&&this.classNames.split(" ").forEach(e=>this.el.classList.add(e)),this.el}},Uxe=xn("customEmoji"),ER=class{renderElement(e){return{content:e}}renderImage(e="",t){let r=new kR({classNames:e});return r.renderSync(),{content:r,resolver:()=>(r.load(t()),r.el)}}doRender(e,t,r){if(e.custom)return this.renderCustom(e,t,r);let{content:n,resolver:o}=this.render(e,r),s=n instanceof Element?n:n.el;return o&&o(),s}doEmit(e){return e.custom?this.emitCustom(e):this.emit(e)}emitCustom({url:e,label:t,emoji:r,data:n}){return{url:e,label:t,emoji:r,data:n}}renderCustom(e,t,r=""){let n=[Uxe.customEmoji,r].join(" ").trim(),{content:o,resolver:s}=this.renderImage(n,()=>e.url),a=o instanceof Element?o:o.el;return s&&s(),a}},jxe=new Pr(({emoji:i})=>`<span>${i}</span>`),TR=class extends ER{render(e){return this.renderElement(jxe.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:r}){return{emoji:e,hexcode:t,label:r}}},Wxe={"categories.activities":"Activities","categories.animals-nature":"Animals & Nature","categories.custom":"Custom","categories.flags":"Flags","categories.food-drink":"Food & Drink","categories.objects":"Objects","categories.people-body":"People & Body","categories.recents":"Recently Used","categories.smileys-emotion":"Smileys & Emotion","categories.symbols":"Symbols","categories.travel-places":"Travel & Places","error.load":"Failed to load emojis","recents.clear":"Clear recent emojis","recents.none":"You haven't selected any emojis yet.",retry:"Try again","search.clear":"Clear search","search.error":"Failed to search emojis","search.notFound":"No results found",search:"Search emojis..."},IR="PicMo";function _te(i){return new LR(i)}_te.deleteDatabase=i=>new Promise((e,t)=>{let r=indexedDB.deleteDatabase(`${IR}-${i}`);r.addEventListener("success",e),r.addEventListener("error",t)});var LR=class extends o3{async open(){let e=indexedDB.open(`${IR}-${this.locale}`);return new Promise((t,r)=>{e.addEventListener("success",n=>{var o;this.db=(o=n.target)==null?void 0:o.result,t()}),e.addEventListener("error",r),e.addEventListener("upgradeneeded",async n=>{var o;this.db=(o=n.target)==null?void 0:o.result,this.db.createObjectStore("category",{keyPath:"order"});let s=this.db.createObjectStore("emoji",{keyPath:"emoji"});s.createIndex("category","group"),s.createIndex("version","version"),this.db.createObjectStore("meta")})})}async delete(){this.close();let e=indexedDB.deleteDatabase(`${IR}-${this.locale}`);await this.waitForRequest(e)}close(){this.db.close()}async getEmojiCount(){let e=this.db.transaction("emoji","readonly").objectStore("emoji");return(await this.waitForRequest(e.count())).target.result}async getEtags(){let e=this.db.transaction("meta","readonly").objectStore("meta"),[t,r]=await Promise.all([this.waitForRequest(e.get("emojisEtag")),this.waitForRequest(e.get("messagesEtag"))]);return{storedEmojisEtag:t.target.result,storedMessagesEtag:r.target.result}}async setMeta(e){let t=this.db.transaction("meta","readwrite"),r=t.objectStore("meta");return new Promise(n=>{t.oncomplete=n,Object.keys(e).filter(Boolean).forEach(o=>{r.put(e[o],o)})})}async getHash(){let e=this.db.transaction("meta","readonly").objectStore("meta");return(await this.waitForRequest(e.get("hash"))).target.result}async isPopulated(){let e=this.db.transaction("category","readonly").objectStore("category");return(await this.waitForRequest(e.count())).target.result>0}async populate({groups:e,emojis:t,emojisEtag:r,messagesEtag:n,hash:o}){await this.removeAllObjects("category","emoji");let s=[this.addObjects("category",e),this.addObjects("emoji",t),this.setMeta({emojisEtag:r,messagesEtag:n,hash:o})];await Promise.all(s)}async getCategories(e){var t;let r=this.db.transaction("category","readonly").objectStore("category"),n=(await this.waitForRequest(r.getAll())).target.result.filter(o=>o.key!=="component");if(e.showRecents&&n.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&n.push({key:"custom",order:10}),e.categories){let o=e.categories;n=n.filter(s=>o.includes(s.key)),n.sort((s,a)=>o.indexOf(s.key)-o.indexOf(a.key))}else n.sort((o,s)=>o.order-s.order);return n}async getEmojis(e,t){let r=this.db.transaction("emoji","readonly").objectStore("emoji").index("category"),n=(await this.waitForRequest(r.getAll(e.order))).target.result.filter(o=>o.version<=t).sort((o,s)=>o.order!=null&&s.order!=null?o.order-s.order:0).map(Cv);return s3(n,t)}async searchEmojis(e,t,r,n){let o=[];return new Promise((s,a)=>{let l=this.db.transaction("emoji","readonly").objectStore("emoji").openCursor();l.addEventListener("success",c=>{var d;let u=(d=c.target)==null?void 0:d.result;if(!u)return s([...s3(o,r),...t.filter(f=>n3(f,e))]);let h=u.value;n3(h,e,n)&&h.version<=r&&o.push(Cv(h)),u.continue()}),l.addEventListener("error",c=>{a(c)})})}async waitForRequest(e){return new Promise((t,r)=>{e.onsuccess=t,e.onerror=r})}withTransaction(e,t="readwrite",r){return new Promise((n,o)=>{let s=this.db.transaction(e,t);s.oncomplete=n,s.onerror=o,r(s)})}async removeAllObjects(...e){let t=this.db.transaction(e,"readwrite"),r=e.map(n=>t.objectStore(n));await Promise.all(r.map(n=>this.waitForRequest(n.clear())))}async addObjects(e,t){return this.withTransaction(e,"readwrite",r=>{let n=r.objectStore(e);t.forEach(o=>{n.add(o)})})}};function Vxe(){let i={};return{getItem:e=>i[e],setItem:(e,t)=>i[e]=t,length:Object.keys(i).length,clear:()=>i={},key:e=>Object.keys(i)[e],removeItem:e=>delete i[e]}}var AR=class{},mR="PicMo:recents",DR=class extends AR{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem(mR)}getRecents(e){var t;try{return JSON.parse((t=this.storage.getItem(mR))!=null?t:"[]").slice(0,e)}catch(r){return[]}}addOrUpdateRecent(e,t){let r=[e,...this.getRecents(t).filter(n=>n.hexcode!==e.hexcode)].slice(0,t);try{this.storage.setItem(mR,JSON.stringify(r))}catch(n){console.warn("storage is not available, recent emojis will not be saved")}}},MR=class extends DR{constructor(){super(uxe()?localStorage:Vxe())}},qxe={dataStore:_te,theme:yxe,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:Wxe,locale:"en",maxRecents:50,custom:[]};function t9(i={}){return xt(ue(ue({},qxe),i),{renderer:i.renderer||new TR,recentsProvider:i.recentsProvider||new MR})}var jh,xv,a3,i3,NR,Wh=class{constructor(){yc(this,xv),yc(this,i3),yc(this,jh,new Map)}on(e,t,r){Xs(this,i3,NR).call(this,e,t,r)}once(e,t,r){Xs(this,i3,NR).call(this,e,t,r,!0)}off(e,t){let r=Xs(this,xv,a3).call(this,e);wc(this,jh).set(e,r.filter(n=>n.handler!==t))}emit(e,...t){Xs(this,xv,a3).call(this,e).forEach(r=>{r.handler.apply(r.context,t),r.once&&this.off(e,r.handler)})}removeAll(){wc(this,jh).clear()}};jh=new WeakMap,xv=new WeakSet,a3=function(i){return wc(this,jh).has(i)||wc(this,jh).set(i,[]),wc(this,jh).get(i)},i3=new WeakSet,NR=function(i,e,t,r=!1){Xs(this,xv,a3).call(this,i).push({context:t,handler:e,once:r})};var Kxe={injectStyles:!0},RR=class extends Wh{},PR=class extends Wh{},OR=xn("emojiCategory","categoryName","noRecents","recentEmojis"),kv=class extends Gt{constructor({template:e,category:t,showVariants:r,lazyLoader:n}){super({template:e,classes:OR}),this.baseUIElements={categoryName:Gt.byClass(OR.categoryName)},this.category=t,this.showVariants=r,this.lazyLoader=n}setActive(e,t,r){this.emojiContainer.setActive(e,t,r)}},$xe=new Pr(({classes:i,emoji:e})=>` +`),ER=class extends Gt{constructor({classNames:e}={}){super({template:Hxe,classes:Bxe}),this.classNames=e}load(e){let t=document.createElement("img");this.classNames&&(t.className=this.classNames),t.addEventListener("load",()=>{this.el.replaceWith(t)},{once:!0}),Promise.resolve(e).then(r=>t.src=r)}renderSync(){return super.renderSync(),this.classNames&&this.classNames.split(" ").forEach(e=>this.el.classList.add(e)),this.el}},Uxe=xn("customEmoji"),TR=class{renderElement(e){return{content:e}}renderImage(e="",t){let r=new ER({classNames:e});return r.renderSync(),{content:r,resolver:()=>(r.load(t()),r.el)}}doRender(e,t,r){if(e.custom)return this.renderCustom(e,t,r);let{content:n,resolver:o}=this.render(e,r),s=n instanceof Element?n:n.el;return o&&o(),s}doEmit(e){return e.custom?this.emitCustom(e):this.emit(e)}emitCustom({url:e,label:t,emoji:r,data:n}){return{url:e,label:t,emoji:r,data:n}}renderCustom(e,t,r=""){let n=[Uxe.customEmoji,r].join(" ").trim(),{content:o,resolver:s}=this.renderImage(n,()=>e.url),a=o instanceof Element?o:o.el;return s&&s(),a}},jxe=new Pr(({emoji:i})=>`<span>${i}</span>`),IR=class extends TR{render(e){return this.renderElement(jxe.renderSync({emoji:e.emoji}))}emit({emoji:e,hexcode:t,label:r}){return{emoji:e,hexcode:t,label:r}}},Wxe={"categories.activities":"Activities","categories.animals-nature":"Animals & Nature","categories.custom":"Custom","categories.flags":"Flags","categories.food-drink":"Food & Drink","categories.objects":"Objects","categories.people-body":"People & Body","categories.recents":"Recently Used","categories.smileys-emotion":"Smileys & Emotion","categories.symbols":"Symbols","categories.travel-places":"Travel & Places","error.load":"Failed to load emojis","recents.clear":"Clear recent emojis","recents.none":"You haven't selected any emojis yet.",retry:"Try again","search.clear":"Clear search","search.error":"Failed to search emojis","search.notFound":"No results found",search:"Search emojis..."},LR="PicMo";function _te(i){return new AR(i)}_te.deleteDatabase=i=>new Promise((e,t)=>{let r=indexedDB.deleteDatabase(`${LR}-${i}`);r.addEventListener("success",e),r.addEventListener("error",t)});var AR=class extends s3{async open(){let e=indexedDB.open(`${LR}-${this.locale}`);return new Promise((t,r)=>{e.addEventListener("success",n=>{var o;this.db=(o=n.target)==null?void 0:o.result,t()}),e.addEventListener("error",r),e.addEventListener("upgradeneeded",async n=>{var o;this.db=(o=n.target)==null?void 0:o.result,this.db.createObjectStore("category",{keyPath:"order"});let s=this.db.createObjectStore("emoji",{keyPath:"emoji"});s.createIndex("category","group"),s.createIndex("version","version"),this.db.createObjectStore("meta")})})}async delete(){this.close();let e=indexedDB.deleteDatabase(`${LR}-${this.locale}`);await this.waitForRequest(e)}close(){this.db.close()}async getEmojiCount(){let e=this.db.transaction("emoji","readonly").objectStore("emoji");return(await this.waitForRequest(e.count())).target.result}async getEtags(){let e=this.db.transaction("meta","readonly").objectStore("meta"),[t,r]=await Promise.all([this.waitForRequest(e.get("emojisEtag")),this.waitForRequest(e.get("messagesEtag"))]);return{storedEmojisEtag:t.target.result,storedMessagesEtag:r.target.result}}async setMeta(e){let t=this.db.transaction("meta","readwrite"),r=t.objectStore("meta");return new Promise(n=>{t.oncomplete=n,Object.keys(e).filter(Boolean).forEach(o=>{r.put(e[o],o)})})}async getHash(){let e=this.db.transaction("meta","readonly").objectStore("meta");return(await this.waitForRequest(e.get("hash"))).target.result}async isPopulated(){let e=this.db.transaction("category","readonly").objectStore("category");return(await this.waitForRequest(e.count())).target.result>0}async populate({groups:e,emojis:t,emojisEtag:r,messagesEtag:n,hash:o}){await this.removeAllObjects("category","emoji");let s=[this.addObjects("category",e),this.addObjects("emoji",t),this.setMeta({emojisEtag:r,messagesEtag:n,hash:o})];await Promise.all(s)}async getCategories(e){var t;let r=this.db.transaction("category","readonly").objectStore("category"),n=(await this.waitForRequest(r.getAll())).target.result.filter(o=>o.key!=="component");if(e.showRecents&&n.unshift({key:"recents",order:-1}),(t=e.custom)!=null&&t.length&&n.push({key:"custom",order:10}),e.categories){let o=e.categories;n=n.filter(s=>o.includes(s.key)),n.sort((s,a)=>o.indexOf(s.key)-o.indexOf(a.key))}else n.sort((o,s)=>o.order-s.order);return n}async getEmojis(e,t){let r=this.db.transaction("emoji","readonly").objectStore("emoji").index("category"),n=(await this.waitForRequest(r.getAll(e.order))).target.result.filter(o=>o.version<=t).sort((o,s)=>o.order!=null&&s.order!=null?o.order-s.order:0).map(Cv);return a3(n,t)}async searchEmojis(e,t,r,n){let o=[];return new Promise((s,a)=>{let l=this.db.transaction("emoji","readonly").objectStore("emoji").openCursor();l.addEventListener("success",c=>{var d;let u=(d=c.target)==null?void 0:d.result;if(!u)return s([...a3(o,r),...t.filter(f=>o3(f,e))]);let h=u.value;o3(h,e,n)&&h.version<=r&&o.push(Cv(h)),u.continue()}),l.addEventListener("error",c=>{a(c)})})}async waitForRequest(e){return new Promise((t,r)=>{e.onsuccess=t,e.onerror=r})}withTransaction(e,t="readwrite",r){return new Promise((n,o)=>{let s=this.db.transaction(e,t);s.oncomplete=n,s.onerror=o,r(s)})}async removeAllObjects(...e){let t=this.db.transaction(e,"readwrite"),r=e.map(n=>t.objectStore(n));await Promise.all(r.map(n=>this.waitForRequest(n.clear())))}async addObjects(e,t){return this.withTransaction(e,"readwrite",r=>{let n=r.objectStore(e);t.forEach(o=>{n.add(o)})})}};function Vxe(){let i={};return{getItem:e=>i[e],setItem:(e,t)=>i[e]=t,length:Object.keys(i).length,clear:()=>i={},key:e=>Object.keys(i)[e],removeItem:e=>delete i[e]}}var DR=class{},gR="PicMo:recents",MR=class extends DR{constructor(e){super(),this.storage=e}clear(){this.storage.removeItem(gR)}getRecents(e){var t;try{return JSON.parse((t=this.storage.getItem(gR))!=null?t:"[]").slice(0,e)}catch(r){return[]}}addOrUpdateRecent(e,t){let r=[e,...this.getRecents(t).filter(n=>n.hexcode!==e.hexcode)].slice(0,t);try{this.storage.setItem(gR,JSON.stringify(r))}catch(n){console.warn("storage is not available, recent emojis will not be saved")}}},NR=class extends MR{constructor(){super(uxe()?localStorage:Vxe())}},qxe={dataStore:_te,theme:yxe,animate:!0,showCategoryTabs:!0,showPreview:!0,showRecents:!0,showSearch:!0,showVariants:!0,emojisPerRow:8,visibleRows:6,emojiVersion:"auto",i18n:Wxe,locale:"en",maxRecents:50,custom:[]};function i9(i={}){return xt(ue(ue({},qxe),i),{renderer:i.renderer||new IR,recentsProvider:i.recentsProvider||new NR})}var jh,xv,l3,r3,RR,Wh=class{constructor(){yc(this,xv),yc(this,r3),yc(this,jh,new Map)}on(e,t,r){Xs(this,r3,RR).call(this,e,t,r)}once(e,t,r){Xs(this,r3,RR).call(this,e,t,r,!0)}off(e,t){let r=Xs(this,xv,l3).call(this,e);wc(this,jh).set(e,r.filter(n=>n.handler!==t))}emit(e,...t){Xs(this,xv,l3).call(this,e).forEach(r=>{r.handler.apply(r.context,t),r.once&&this.off(e,r.handler)})}removeAll(){wc(this,jh).clear()}};jh=new WeakMap,xv=new WeakSet,l3=function(i){return wc(this,jh).has(i)||wc(this,jh).set(i,[]),wc(this,jh).get(i)},r3=new WeakSet,RR=function(i,e,t,r=!1){Xs(this,xv,l3).call(this,i).push({context:t,handler:e,once:r})};var Kxe={injectStyles:!0},PR=class extends Wh{},OR=class extends Wh{},FR=xn("emojiCategory","categoryName","noRecents","recentEmojis"),kv=class extends Gt{constructor({template:e,category:t,showVariants:r,lazyLoader:n}){super({template:e,classes:FR}),this.baseUIElements={categoryName:Gt.byClass(FR.categoryName)},this.category=t,this.showVariants=r,this.lazyLoader=n}setActive(e,t,r){this.emojiContainer.setActive(e,t,r)}},$xe=new Pr(({classes:i,emoji:e})=>` <button type="button" class="${i.emojiButton}" @@ -514,11 +514,11 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" tabindex="-1"> <div data-placeholder="emojiContent"></div> </button> -`),Gxe=xn("emojiButton"),l3=class extends Gt{constructor({emoji:e,lazyLoader:t,category:r}){super({template:$xe,classes:Gxe}),this.emoji=e,this.lazyLoader=t,this.category=r}initialize(){this.uiEvents=[Gt.uiEvent("focus",this.handleFocus)],super.initialize()}handleFocus(){this.category&&this.events.emit("focus:change",this.category)}activateFocus(e){this.el.tabIndex=0,e&&this.el.focus()}deactivateFocus(){this.el.tabIndex=-1}renderSync(){return super.renderSync({emoji:this.emoji,emojiContent:this.renderer.doRender(this.emoji,this.lazyLoader)})}},FR=class{constructor(e,t,r=0,n=0,o=!1){this.events=new Wh,this.keyHandlers={ArrowLeft:this.focusPrevious.bind(this),ArrowRight:this.focusNext.bind(this),ArrowUp:this.focusUp.bind(this),ArrowDown:this.focusDown.bind(this)},this.rowCount=Math.ceil(t/e),this.columnCount=e,this.focusedRow=r,this.focusedColumn=n,this.emojiCount=t,this.wrap=o,this.handleKeyDown=this.handleKeyDown.bind(this)}destroy(){this.events.removeAll()}on(e,t){this.events.on(e,t)}handleKeyDown(e){e.key in this.keyHandlers&&(e.preventDefault(),this.keyHandlers[e.key]())}setCell(e,t,r=!0){let n=this.getIndex();this.focusedRow=e,t!==void 0&&(this.focusedColumn=Math.min(this.columnCount,t)),(this.focusedRow>=this.rowCount||this.getIndex()>=this.emojiCount)&&(this.focusedRow=this.rowCount-1,this.focusedColumn=this.emojiCount%this.columnCount-1),this.events.emit("focus:change",{from:n,to:this.getIndex(),performFocus:r})}setFocusedIndex(e,t=!0){let r=Math.floor(e/this.columnCount),n=e%this.columnCount;this.setCell(r,n,t)}focusNext(){this.focusedColumn<this.columnCount-1&&this.getIndex()<this.emojiCount-1?this.setCell(this.focusedRow,this.focusedColumn+1):this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,0):this.wrap?this.setCell(0,0):this.events.emit("focus:overflow",0)}focusPrevious(){this.focusedColumn>0?this.setCell(this.focusedRow,this.focusedColumn-1):this.focusedRow>0?this.setCell(this.focusedRow-1,this.columnCount-1):this.wrap?this.setCell(this.rowCount-1,this.columnCount-1):this.events.emit("focus:underflow",this.columnCount-1)}focusUp(){this.focusedRow>0?this.setCell(this.focusedRow-1,this.focusedColumn):this.events.emit("focus:underflow",this.focusedColumn)}focusDown(){this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,this.focusedColumn):this.events.emit("focus:overflow",this.focusedColumn)}focusToIndex(e){this.setCell(Math.floor(e/this.columnCount),e%this.columnCount)}getIndex(){return this.focusedRow*this.columnCount+this.focusedColumn}getCell(){return{row:this.focusedRow,column:this.focusedColumn}}getRowCount(){return this.rowCount}},Yxe=new Pr(({classes:i})=>` +`),Gxe=xn("emojiButton"),c3=class extends Gt{constructor({emoji:e,lazyLoader:t,category:r}){super({template:$xe,classes:Gxe}),this.emoji=e,this.lazyLoader=t,this.category=r}initialize(){this.uiEvents=[Gt.uiEvent("focus",this.handleFocus)],super.initialize()}handleFocus(){this.category&&this.events.emit("focus:change",this.category)}activateFocus(e){this.el.tabIndex=0,e&&this.el.focus()}deactivateFocus(){this.el.tabIndex=-1}renderSync(){return super.renderSync({emoji:this.emoji,emojiContent:this.renderer.doRender(this.emoji,this.lazyLoader)})}},zR=class{constructor(e,t,r=0,n=0,o=!1){this.events=new Wh,this.keyHandlers={ArrowLeft:this.focusPrevious.bind(this),ArrowRight:this.focusNext.bind(this),ArrowUp:this.focusUp.bind(this),ArrowDown:this.focusDown.bind(this)},this.rowCount=Math.ceil(t/e),this.columnCount=e,this.focusedRow=r,this.focusedColumn=n,this.emojiCount=t,this.wrap=o,this.handleKeyDown=this.handleKeyDown.bind(this)}destroy(){this.events.removeAll()}on(e,t){this.events.on(e,t)}handleKeyDown(e){e.key in this.keyHandlers&&(e.preventDefault(),this.keyHandlers[e.key]())}setCell(e,t,r=!0){let n=this.getIndex();this.focusedRow=e,t!==void 0&&(this.focusedColumn=Math.min(this.columnCount,t)),(this.focusedRow>=this.rowCount||this.getIndex()>=this.emojiCount)&&(this.focusedRow=this.rowCount-1,this.focusedColumn=this.emojiCount%this.columnCount-1),this.events.emit("focus:change",{from:n,to:this.getIndex(),performFocus:r})}setFocusedIndex(e,t=!0){let r=Math.floor(e/this.columnCount),n=e%this.columnCount;this.setCell(r,n,t)}focusNext(){this.focusedColumn<this.columnCount-1&&this.getIndex()<this.emojiCount-1?this.setCell(this.focusedRow,this.focusedColumn+1):this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,0):this.wrap?this.setCell(0,0):this.events.emit("focus:overflow",0)}focusPrevious(){this.focusedColumn>0?this.setCell(this.focusedRow,this.focusedColumn-1):this.focusedRow>0?this.setCell(this.focusedRow-1,this.columnCount-1):this.wrap?this.setCell(this.rowCount-1,this.columnCount-1):this.events.emit("focus:underflow",this.columnCount-1)}focusUp(){this.focusedRow>0?this.setCell(this.focusedRow-1,this.focusedColumn):this.events.emit("focus:underflow",this.focusedColumn)}focusDown(){this.focusedRow<this.rowCount-1?this.setCell(this.focusedRow+1,this.focusedColumn):this.events.emit("focus:overflow",this.focusedColumn)}focusToIndex(e){this.setCell(Math.floor(e/this.columnCount),e%this.columnCount)}getIndex(){return this.focusedRow*this.columnCount+this.focusedColumn}getCell(){return{row:this.focusedRow,column:this.focusedColumn}}getRowCount(){return this.rowCount}},Yxe=new Pr(({classes:i})=>` <div class="${i.emojiContainer}"> <div data-placeholder="emojis"></div> </div> -`),Xxe=xn("emojiContainer"),Vh=class extends Gt{constructor({emojis:e,showVariants:t,preview:r=!0,lazyLoader:n,category:o,fullHeight:s=!1}){super({template:Yxe,classes:Xxe}),this.fullHeight=!1,this.showVariants=t,this.lazyLoader=n,this.preview=r,this.emojis=e,this.category=o,this.fullHeight=s,this.setFocus=this.setFocus.bind(this),this.triggerNextCategory=this.triggerNextCategory.bind(this),this.triggerPreviousCategory=this.triggerPreviousCategory.bind(this)}initialize(){this.grid=new FR(this.options.emojisPerRow,this.emojiCount,0,0,!this.category),this.grid.on("focus:change",this.setFocus),this.grid.on("focus:overflow",this.triggerNextCategory),this.grid.on("focus:underflow",this.triggerPreviousCategory),this.uiEvents=[Gt.uiEvent("click",this.selectEmoji),Gt.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(Gt.uiEvent("mouseover",this.showPreview),Gt.uiEvent("mouseout",this.hidePreview),Gt.uiEvent("focus",this.showPreview,{capture:!0}),Gt.uiEvent("blur",this.hidePreview,{capture:!0})),super.initialize()}setFocusedView(e,t){if(e)if(typeof e=="string"){let r=this.emojis.findIndex(n=>n.emoji===e);this.grid.setFocusedIndex(r,!1),setTimeout(()=>{var n,o,s,a;let l=this.emojiViews[r].el;l.scrollIntoView();let c=(n=l.parentElement)==null?void 0:n.previousElementSibling,d=(s=(o=l.parentElement)==null?void 0:o.parentElement)==null?void 0:s.parentElement;d.scrollTop-=(a=c==null?void 0:c.offsetHeight)!=null?a:0})}else e.row==="first"||e.row===0?this.grid.setCell(0,e.offset,t):e.row==="last"&&this.grid.setCell(this.grid.getRowCount()-1,e.offset,t)}setActive(e,t,r){var n;e?this.setFocusedView(t,r):(n=this.emojiViews[this.grid.getIndex()])==null||n.deactivateFocus()}renderSync(){return this.emojiViews=this.emojis.map(e=>this.viewFactory.create(l3,{emoji:e,category:this.category,lazyLoader:this.lazyLoader,renderer:this.renderer})),this.emojiElements=this.emojiViews.map(e=>e.renderSync()),super.renderSync({emojis:this.emojiElements,i18n:this.i18n})}destroy(){super.destroy(),this.emojiViews.forEach(e=>e.destroy()),this.grid.destroy()}triggerPreviousCategory(e){this.events.emit("category:previous",e)}triggerNextCategory(e){this.category&&this.events.emit("category:next",e)}setFocus({from:e,to:t,performFocus:r}){var n,o;(n=this.emojiViews[e])==null||n.deactivateFocus(),(o=this.emojiViews[t])==null||o.activateFocus(r)}selectEmoji(e){e.stopPropagation();let t=fR(e,this.emojis);t&&this.events.emit("emoji:select",{emoji:t,showVariants:this.showVariants})}showPreview(e){let t=e.target.closest("button"),r=t==null?void 0:t.firstElementChild,n=fR(e,this.emojis);n&&this.events.emit("preview:show",n,r==null?void 0:r.cloneNode(!0))}hidePreview(e){fR(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}},Qxe=new Pr(({classes:i,category:e,pickerId:t,icon:r,i18n:n})=>` +`),Xxe=xn("emojiContainer"),Vh=class extends Gt{constructor({emojis:e,showVariants:t,preview:r=!0,lazyLoader:n,category:o,fullHeight:s=!1}){super({template:Yxe,classes:Xxe}),this.fullHeight=!1,this.showVariants=t,this.lazyLoader=n,this.preview=r,this.emojis=e,this.category=o,this.fullHeight=s,this.setFocus=this.setFocus.bind(this),this.triggerNextCategory=this.triggerNextCategory.bind(this),this.triggerPreviousCategory=this.triggerPreviousCategory.bind(this)}initialize(){this.grid=new zR(this.options.emojisPerRow,this.emojiCount,0,0,!this.category),this.grid.on("focus:change",this.setFocus),this.grid.on("focus:overflow",this.triggerNextCategory),this.grid.on("focus:underflow",this.triggerPreviousCategory),this.uiEvents=[Gt.uiEvent("click",this.selectEmoji),Gt.uiEvent("keydown",this.grid.handleKeyDown)],this.preview&&this.uiEvents.push(Gt.uiEvent("mouseover",this.showPreview),Gt.uiEvent("mouseout",this.hidePreview),Gt.uiEvent("focus",this.showPreview,{capture:!0}),Gt.uiEvent("blur",this.hidePreview,{capture:!0})),super.initialize()}setFocusedView(e,t){if(e)if(typeof e=="string"){let r=this.emojis.findIndex(n=>n.emoji===e);this.grid.setFocusedIndex(r,!1),setTimeout(()=>{var n,o,s,a;let l=this.emojiViews[r].el;l.scrollIntoView();let c=(n=l.parentElement)==null?void 0:n.previousElementSibling,d=(s=(o=l.parentElement)==null?void 0:o.parentElement)==null?void 0:s.parentElement;d.scrollTop-=(a=c==null?void 0:c.offsetHeight)!=null?a:0})}else e.row==="first"||e.row===0?this.grid.setCell(0,e.offset,t):e.row==="last"&&this.grid.setCell(this.grid.getRowCount()-1,e.offset,t)}setActive(e,t,r){var n;e?this.setFocusedView(t,r):(n=this.emojiViews[this.grid.getIndex()])==null||n.deactivateFocus()}renderSync(){return this.emojiViews=this.emojis.map(e=>this.viewFactory.create(c3,{emoji:e,category:this.category,lazyLoader:this.lazyLoader,renderer:this.renderer})),this.emojiElements=this.emojiViews.map(e=>e.renderSync()),super.renderSync({emojis:this.emojiElements,i18n:this.i18n})}destroy(){super.destroy(),this.emojiViews.forEach(e=>e.destroy()),this.grid.destroy()}triggerPreviousCategory(e){this.events.emit("category:previous",e)}triggerNextCategory(e){this.category&&this.events.emit("category:next",e)}setFocus({from:e,to:t,performFocus:r}){var n,o;(n=this.emojiViews[e])==null||n.deactivateFocus(),(o=this.emojiViews[t])==null||o.activateFocus(r)}selectEmoji(e){e.stopPropagation();let t=pR(e,this.emojis);t&&this.events.emit("emoji:select",{emoji:t,showVariants:this.showVariants})}showPreview(e){let t=e.target.closest("button"),r=t==null?void 0:t.firstElementChild,n=pR(e,this.emojis);n&&this.events.emit("preview:show",n,r==null?void 0:r.cloneNode(!0))}hidePreview(e){pR(e,this.emojis)&&this.events.emit("preview:hide")}get emojiCount(){return this.emojis.length}},Qxe=new Pr(({classes:i,category:e,pickerId:t,icon:r,i18n:n})=>` <section class="${i.emojiCategory}" role="tabpanel" aria-labelledby="${t}-category-${e.key}"> <h3 data-category="${e.key}" class="${i.categoryName}"> <i data-icon="${r}"></i> @@ -526,7 +526,7 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" </h3> <div data-view="emojis" data-render="sync"></div> </section> -`),zR=class extends kv{constructor({category:e,showVariants:t,lazyLoader:r,emojiVersion:n}){super({category:e,showVariants:t,lazyLoader:r,template:Qxe}),this.showVariants=t,this.lazyLoader=r,this.emojiVersion=n}initialize(){this.uiElements=ue({},this.baseUIElements),super.initialize()}async render(){await this.emojiDataPromise;let e=await this.emojiData.getEmojis(this.category,this.emojiVersion);return this.emojiContainer=this.viewFactory.create(Vh,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:d3[this.category.key]})}},BR=class extends Vh{constructor({category:e,emojis:t,preview:r=!0,lazyLoader:n}){super({category:e,emojis:t,showVariants:!1,preview:r,lazyLoader:n})}async addOrUpdate(e){let t=this.el.querySelector(`[data-emoji="${e.emoji}"]`);t&&(this.el.removeChild(t),this.emojis=this.emojis.filter(n=>n!==e));let r=this.viewFactory.create(l3,{emoji:e});if(this.el.insertBefore(r.renderSync(),this.el.firstChild),this.emojis=[e,...this.emojis.filter(n=>n!==e)],this.emojis.length>this.options.maxRecents){this.emojis=this.emojis.slice(0,this.options.maxRecents);let n=this.el.childElementCount-this.options.maxRecents;for(let o=0;o<n;o++)this.el.lastElementChild&&this.el.removeChild(this.el.lastElementChild)}}},Zxe=new Pr(({emojiCount:i,classes:e,category:t,pickerId:r,icon:n,i18n:o})=>` +`),BR=class extends kv{constructor({category:e,showVariants:t,lazyLoader:r,emojiVersion:n}){super({category:e,showVariants:t,lazyLoader:r,template:Qxe}),this.showVariants=t,this.lazyLoader=r,this.emojiVersion=n}initialize(){this.uiElements=ue({},this.baseUIElements),super.initialize()}async render(){await this.emojiDataPromise;let e=await this.emojiData.getEmojis(this.category,this.emojiVersion);return this.emojiContainer=this.viewFactory.create(Vh,{emojis:e,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:e.length,icon:u3[this.category.key]})}},HR=class extends Vh{constructor({category:e,emojis:t,preview:r=!0,lazyLoader:n}){super({category:e,emojis:t,showVariants:!1,preview:r,lazyLoader:n})}async addOrUpdate(e){let t=this.el.querySelector(`[data-emoji="${e.emoji}"]`);t&&(this.el.removeChild(t),this.emojis=this.emojis.filter(n=>n!==e));let r=this.viewFactory.create(c3,{emoji:e});if(this.el.insertBefore(r.renderSync(),this.el.firstChild),this.emojis=[e,...this.emojis.filter(n=>n!==e)],this.emojis.length>this.options.maxRecents){this.emojis=this.emojis.slice(0,this.options.maxRecents);let n=this.el.childElementCount-this.options.maxRecents;for(let o=0;o<n;o++)this.el.lastElementChild&&this.el.removeChild(this.el.lastElementChild)}}},Zxe=new Pr(({emojiCount:i,classes:e,category:t,pickerId:r,icon:n,i18n:o})=>` <section class="${e.emojiCategory}" role="tabpanel" aria-labelledby="${r}-category-${t.key}"> <h3 data-category="${t.key}" class="${e.categoryName}"> <i data-icon="${n}"></i> @@ -539,7 +539,7 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" ${o.get("recents.none")} </div> </section> -`,{mode:"async"}),HR=class extends kv{constructor({category:e,lazyLoader:t,provider:r}){super({category:e,showVariants:!1,lazyLoader:t,template:Zxe}),this.provider=r}initialize(){this.uiElements=xt(ue({},this.baseUIElements),{recents:Gt.byClass(OR.recentEmojis)}),this.appEvents={"recent:add":this.addRecent},super.initialize()}async addRecent(e){await this.emojiContainer.addOrUpdate(e),this.ui.recents.dataset.empty="false"}async render(){var e;let t=(e=this.provider)==null?void 0:e.getRecents(this.options.maxRecents);return this.emojiContainer=this.viewFactory.create(BR,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:d3[this.category.key]}),this.el}},Jxe=new Pr(({classes:i,category:e,pickerId:t,icon:r,i18n:n})=>` +`,{mode:"async"}),UR=class extends kv{constructor({category:e,lazyLoader:t,provider:r}){super({category:e,showVariants:!1,lazyLoader:t,template:Zxe}),this.provider=r}initialize(){this.uiElements=xt(ue({},this.baseUIElements),{recents:Gt.byClass(FR.recentEmojis)}),this.appEvents={"recent:add":this.addRecent},super.initialize()}async addRecent(e){await this.emojiContainer.addOrUpdate(e),this.ui.recents.dataset.empty="false"}async render(){var e;let t=(e=this.provider)==null?void 0:e.getRecents(this.options.maxRecents);return this.emojiContainer=this.viewFactory.create(HR,{emojis:t,showVariants:!1,lazyLoader:this.lazyLoader,category:this.category.key}),await super.render({category:this.category,emojis:this.emojiContainer,emojiCount:t.length,icon:u3[this.category.key]}),this.el}},Jxe=new Pr(({classes:i,category:e,pickerId:t,icon:r,i18n:n})=>` <section class="${i.emojiCategory}" role="tabpanel" aria-labelledby="${t}-category-${e.key}"> <h3 data-category="${e.key}" class="${i.categoryName}"> <i data-icon="${r}"></i> @@ -547,11 +547,11 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" </h3> <div data-view="emojis" data-render="sync"></div> </section> -`),UR=class extends kv{constructor({category:e,lazyLoader:t}){super({template:Jxe,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements=ue({},this.baseUIElements),super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(Vh,{emojis:this.customEmojis,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:this.customEmojis.length,icon:d3[this.category.key]})}},c3=class{constructor(){this.elements=new Map}lazyLoad(e,t){return this.elements.set(e,t),e}observe(e){if(window.IntersectionObserver){let t=new IntersectionObserver(r=>{r.filter(n=>n.intersectionRatio>0).map(n=>n.target).forEach(n=>{let o=this.elements.get(n);o==null||o(),t.unobserve(n)})},{root:e});this.elements.forEach((r,n)=>{t.observe(n)})}else this.elements.forEach(t=>{t()})}},ste=xn("emojiArea"),e2e=new Pr(({classes:i})=>` +`),jR=class extends kv{constructor({category:e,lazyLoader:t}){super({template:Jxe,showVariants:!1,lazyLoader:t,category:e})}initialize(){this.uiElements=ue({},this.baseUIElements),super.initialize()}async render(){return this.emojiContainer=this.viewFactory.create(Vh,{emojis:this.customEmojis,showVariants:this.showVariants,lazyLoader:this.lazyLoader,category:this.category.key}),super.render({category:this.category,emojis:this.emojiContainer,emojiCount:this.customEmojis.length,icon:u3[this.category.key]})}},d3=class{constructor(){this.elements=new Map}lazyLoad(e,t){return this.elements.set(e,t),e}observe(e){if(window.IntersectionObserver){let t=new IntersectionObserver(r=>{r.filter(n=>n.intersectionRatio>0).map(n=>n.target).forEach(n=>{let o=this.elements.get(n);o==null||o(),t.unobserve(n)})},{root:e});this.elements.forEach((r,n)=>{t.observe(n)})}else this.elements.forEach(t=>{t()})}},ste=xn("emojiArea"),e2e=new Pr(({classes:i})=>` <div class="${i.emojiArea}"> <div data-placeholder="emojis"></div> </div> -`,{mode:"async"}),t2e={recents:HR,custom:UR};function i2e(i){return t2e[i.key]||zR}function r2e(i){return!i||i==="button"?{row:"first",offset:0}:i}var jR=class extends Gt{constructor({categoryTabs:e,categories:t,emojiVersion:r}){super({template:e2e,classes:ste}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new c3,this.categoryTabs=e,this.categories=t,this.emojiVersion=r,this.handleScroll=axe(this.handleScroll.bind(this),100)}initialize(){this.appEvents={"category:select":this.handleCategorySelect,"category:previous":this.focusPreviousCategory,"category:next":this.focusNextCategory,"focus:change":this.updateFocusedCategory},this.uiElements={emojis:Gt.byClass(ste.emojiArea)},this.uiEvents=[Gt.uiEvent("scroll",this.handleScroll)],super.initialize()}get focusableEmoji(){return this.el.querySelector('[tabindex="0"]')}async render(){this.emojiCategories=this.categories.map(this.createCategory,this);let e={};return this.categories.forEach((t,r)=>{e[`emojis-${t.key}`]=this.emojiCategories[r]}),await super.render({emojis:await Promise.all(this.emojiCategories.map(t=>t.render()))}),this.lazyLoader.observe(this.el),this.el}destroy(){super.destroy(),this.emojiCategories.forEach(e=>{var t;(t=this.observer)==null||t.unobserve(e.el),e.destroy()})}handleCategorySelect(e,t){this.el.style.overflow="hidden",this.selectCategory(e,t),this.el.style.overflow="auto"}createCategory(e){let t=i2e(e);return this.viewFactory.create(t,{category:e,showVariants:!0,lazyLoader:this.lazyLoader,emojiVersion:this.emojiVersion,provider:this.options.recentsProvider})}determineInitialCategory(){var e;return this.options.initialCategory&&this.categories.find(t=>t.key===this.options.initialCategory)?this.options.initialCategory:(e=this.categories.find(t=>t.key!=="recents"))==null?void 0:e.key}determineFocusTarget(e){let t=this.emojiCategories.find(r=>r.category.key===e);return this.options.initialEmoji&&(t!=null&&t.el.querySelector(`[data-emoji="${this.options.initialEmoji}"]`))?this.options.initialEmoji:"button"}reset(e=!0){this.events.emit("preview:hide");let t=this.determineInitialCategory();t&&(this.selectCategory(t,{focus:this.determineFocusTarget(t),performFocus:e,scroll:"jump"}),this.selectedCategory=this.getCategoryIndex(t))}getCategoryIndex(e){return this.categories.findIndex(t=>t.key===e)}focusPreviousCategory(e){this.selectedCategory>0&&this.focusCategory(this.selectedCategory-1,{row:"last",offset:e!=null?e:this.options.emojisPerRow})}focusNextCategory(e){this.selectedCategory<this.categories.length-1&&this.focusCategory(this.selectedCategory+1,{row:"first",offset:e!=null?e:0})}focusCategory(e,t){this.selectCategory(e,{focus:t,performFocus:!0})}async selectCategory(e,t={}){var r;this.scrollListenerState="suspend";let{focus:n,performFocus:o,scroll:s}=ue({performFocus:!1},t);this.emojiCategories[this.selectedCategory].setActive(!1);let a=this.selectedCategory=typeof e=="number"?e:this.getCategoryIndex(e);(r=this.categoryTabs)==null||r.setActiveTab(this.selectedCategory,{performFocus:o,scroll:n==="button"});let l=this.emojiCategories[a].el.offsetTop;this.emojiCategories[a].setActive(!0,r2e(n),n!=="button"&&o),s&&(this.el.scrollTop=l),this.scrollListenerState="resume"}updateFocusedCategory(e){var t;this.categories[this.selectedCategory].key!==e&&(this.scrollListenerState="suspend",this.selectedCategory=this.getCategoryIndex(e),(t=this.categoryTabs)==null||t.setActiveTab(this.selectedCategory,{changeFocusable:!1,performFocus:!1}),this.scrollListenerState="resume")}handleScroll(){if(this.scrollListenerState==="suspend"||!this.categoryTabs)return;if(this.scrollListenerState==="resume"){this.scrollListenerState="active";return}let e=this.el.scrollTop,t=this.el.scrollHeight-this.el.offsetHeight,r=this.emojiCategories.findIndex((o,s)=>{var a;return e<((a=this.emojiCategories[s+1])==null?void 0:a.el.offsetTop)}),n={changeFocusable:!1,performFocus:!1,scroll:!1};e===0?this.categoryTabs.setActiveTab(0,n):Math.floor(e)===Math.floor(t)||r<0?this.categoryTabs.setActiveTab(this.categories.length-1,n):this.categoryTabs.setActiveTab(r,n)}},n2e=new Pr(({classList:i,classes:e,icon:t,message:r})=>` +`,{mode:"async"}),t2e={recents:UR,custom:jR};function i2e(i){return t2e[i.key]||BR}function r2e(i){return!i||i==="button"?{row:"first",offset:0}:i}var WR=class extends Gt{constructor({categoryTabs:e,categories:t,emojiVersion:r}){super({template:e2e,classes:ste}),this.selectedCategory=0,this.scrollListenerState="active",this.lazyLoader=new d3,this.categoryTabs=e,this.categories=t,this.emojiVersion=r,this.handleScroll=axe(this.handleScroll.bind(this),100)}initialize(){this.appEvents={"category:select":this.handleCategorySelect,"category:previous":this.focusPreviousCategory,"category:next":this.focusNextCategory,"focus:change":this.updateFocusedCategory},this.uiElements={emojis:Gt.byClass(ste.emojiArea)},this.uiEvents=[Gt.uiEvent("scroll",this.handleScroll)],super.initialize()}get focusableEmoji(){return this.el.querySelector('[tabindex="0"]')}async render(){this.emojiCategories=this.categories.map(this.createCategory,this);let e={};return this.categories.forEach((t,r)=>{e[`emojis-${t.key}`]=this.emojiCategories[r]}),await super.render({emojis:await Promise.all(this.emojiCategories.map(t=>t.render()))}),this.lazyLoader.observe(this.el),this.el}destroy(){super.destroy(),this.emojiCategories.forEach(e=>{var t;(t=this.observer)==null||t.unobserve(e.el),e.destroy()})}handleCategorySelect(e,t){this.el.style.overflow="hidden",this.selectCategory(e,t),this.el.style.overflow="auto"}createCategory(e){let t=i2e(e);return this.viewFactory.create(t,{category:e,showVariants:!0,lazyLoader:this.lazyLoader,emojiVersion:this.emojiVersion,provider:this.options.recentsProvider})}determineInitialCategory(){var e;return this.options.initialCategory&&this.categories.find(t=>t.key===this.options.initialCategory)?this.options.initialCategory:(e=this.categories.find(t=>t.key!=="recents"))==null?void 0:e.key}determineFocusTarget(e){let t=this.emojiCategories.find(r=>r.category.key===e);return this.options.initialEmoji&&(t!=null&&t.el.querySelector(`[data-emoji="${this.options.initialEmoji}"]`))?this.options.initialEmoji:"button"}reset(e=!0){this.events.emit("preview:hide");let t=this.determineInitialCategory();t&&(this.selectCategory(t,{focus:this.determineFocusTarget(t),performFocus:e,scroll:"jump"}),this.selectedCategory=this.getCategoryIndex(t))}getCategoryIndex(e){return this.categories.findIndex(t=>t.key===e)}focusPreviousCategory(e){this.selectedCategory>0&&this.focusCategory(this.selectedCategory-1,{row:"last",offset:e!=null?e:this.options.emojisPerRow})}focusNextCategory(e){this.selectedCategory<this.categories.length-1&&this.focusCategory(this.selectedCategory+1,{row:"first",offset:e!=null?e:0})}focusCategory(e,t){this.selectCategory(e,{focus:t,performFocus:!0})}async selectCategory(e,t={}){var r;this.scrollListenerState="suspend";let{focus:n,performFocus:o,scroll:s}=ue({performFocus:!1},t);this.emojiCategories[this.selectedCategory].setActive(!1);let a=this.selectedCategory=typeof e=="number"?e:this.getCategoryIndex(e);(r=this.categoryTabs)==null||r.setActiveTab(this.selectedCategory,{performFocus:o,scroll:n==="button"});let l=this.emojiCategories[a].el.offsetTop;this.emojiCategories[a].setActive(!0,r2e(n),n!=="button"&&o),s&&(this.el.scrollTop=l),this.scrollListenerState="resume"}updateFocusedCategory(e){var t;this.categories[this.selectedCategory].key!==e&&(this.scrollListenerState="suspend",this.selectedCategory=this.getCategoryIndex(e),(t=this.categoryTabs)==null||t.setActiveTab(this.selectedCategory,{changeFocusable:!1,performFocus:!1}),this.scrollListenerState="resume")}handleScroll(){if(this.scrollListenerState==="suspend"||!this.categoryTabs)return;if(this.scrollListenerState==="resume"){this.scrollListenerState="active";return}let e=this.el.scrollTop,t=this.el.scrollHeight-this.el.offsetHeight,r=this.emojiCategories.findIndex((o,s)=>{var a;return e<((a=this.emojiCategories[s+1])==null?void 0:a.el.offsetTop)}),n={changeFocusable:!1,performFocus:!1,scroll:!1};e===0?this.categoryTabs.setActiveTab(0,n):Math.floor(e)===Math.floor(t)||r<0?this.categoryTabs.setActiveTab(this.categories.length-1,n):this.categoryTabs.setActiveTab(r,n)}},n2e=new Pr(({classList:i,classes:e,icon:t,message:r})=>` <div class="${i}" role="alert"> <div class="${e.iconContainer}"><i data-size="10x" data-icon="${t}"></i></div> <h3 class="${e.title}">${r}</h3> @@ -562,7 +562,7 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" <h3 class="${e.title}">${n}</h3> <button type="button">${r.get("retry")}</button> </div> -`),s2e=xn("dataError"),WR=class extends Ev{constructor({message:e}){super({message:e,template:o2e,className:s2e.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[Gt.childEvent("retryButton","click",this.onRetry)],super.initialize()}async onRetry(){this.emojiData?await this.emojiData.delete():await this.options.dataStore.deleteDatabase(this.options.locale),this.events.emit("reinitialize");let e=await bte(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}},vv=xn("preview","previewEmoji","previewName","tagList","tag"),a2e=new Pr(({classes:i,tag:e})=>` +`),s2e=xn("dataError"),VR=class extends Ev{constructor({message:e}){super({message:e,template:o2e,className:s2e.dataError})}initialize(){this.uiElements={retryButton:"button"},this.uiEvents=[Gt.childEvent("retryButton","click",this.onRetry)],super.initialize()}async onRetry(){this.emojiData?await this.emojiData.delete():await this.options.dataStore.deleteDatabase(this.options.locale),this.events.emit("reinitialize");let e=await bte(this.options.locale,this.options.dataStore,this.options.messages,this.options.emojiData,this.emojiData);this.viewFactory.setEmojiData(e),this.events.emit("data:ready",e)}},vv=xn("preview","previewEmoji","previewName","tagList","tag"),a2e=new Pr(({classes:i,tag:e})=>` <li class="${i.tag}">${e}</li> `),l2e=new Pr(({classes:i})=>` <div class="${i.preview}"> @@ -570,7 +570,7 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" <div class="${i.previewName}"></div> <ul class="${i.tagList}"></ul> </div> -`),VR=class extends Gt{constructor(){super({template:l2e,classes:vv})}initialize(){this.uiElements={emoji:Gt.byClass(vv.previewEmoji),name:Gt.byClass(vv.previewName),tagList:Gt.byClass(vv.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(vm(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";let r=e.tags.map(n=>a2e.renderSync({tag:n,classes:vv}));vm(this.ui.tagList,...r)}}hidePreview(){Q4(this.ui.emoji),Q4(this.ui.name),Q4(this.ui.tagList)}},c2e=new Pr(({classes:i,i18n:e})=>` +`),qR=class extends Gt{constructor(){super({template:l2e,classes:vv})}initialize(){this.uiElements={emoji:Gt.byClass(vv.previewEmoji),name:Gt.byClass(vv.previewName),tagList:Gt.byClass(vv.tagList)},this.appEvents={"preview:show":this.showPreview,"preview:hide":this.hidePreview},super.initialize()}showPreview(e,t){if(vm(this.ui.emoji,t),this.ui.name.textContent=e.label,e.tags){this.ui.tagList.style.display="flex";let r=e.tags.map(n=>a2e.renderSync({tag:n,classes:vv}));vm(this.ui.tagList,...r)}}hidePreview(){Z4(this.ui.emoji),Z4(this.ui.name),Z4(this.ui.tagList)}},c2e=new Pr(({classes:i,i18n:e})=>` <button title="${e.get("search.clear")}" class="${i.clearSearchButton}"> <i data-icon="xmark"></i> </button> @@ -579,13 +579,13 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" <input class="${i.searchField}" placeholder="${e.get("search")}"> <span class="${i.searchAccessory}"></span> </div> -`,{mode:"async"}),_v=xn("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound"),qR=class extends Gt{constructor({categories:e,emojiVersion:t}){super({template:d2e,classes:_v}),this.categories=e.filter(r=>r.key!=="recents"),this.emojiVersion=t,this.search=lxe(this.search.bind(this),100)}initialize(){this.uiElements={searchField:Gt.byClass(_v.searchField),searchAccessory:Gt.byClass(_v.searchAccessory)},this.uiEvents=[Gt.childEvent("searchField","keydown",this.onKeyDown),Gt.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=vte("search"),this.notFoundMessage=this.viewFactory.create(Ev,{message:this.i18n.get("search.notFound"),className:_v.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(Ev,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=c2e.render({classes:_v,i18n:this.i18n}),this.clearSearchButton.addEventListener("click",e=>this.onClearSearch(e)),this.searchField=this.ui.searchField,this.showSearchIcon(),this.el}showSearchIcon(){this.showSearchAccessory(this.searchIcon)}showClearSearchButton(){this.showSearchAccessory(this.clearSearchButton)}showSearchAccessory(e){vm(this.ui.searchAccessory,e)}clear(){this.searchField.value="",this.showSearchIcon()}focus(){this.searchField.focus()}onClearSearch(e){var t;e.stopPropagation(),this.searchField.value="",(t=this.resultsContainer)==null||t.destroy(),this.resultsContainer=null,this.showSearchIcon(),this.events.emit("content:show"),this.searchField.focus()}handleResultsKeydown(e){this.resultsContainer&&e.key==="Escape"&&this.onClearSearch(e)}onKeyDown(e){var t;e.key==="Escape"&&this.searchField.value?this.onClearSearch(e):(e.key==="Enter"||e.key==="ArrowDown")&&this.resultsContainer&&(e.preventDefault(),(t=this.resultsContainer.el.querySelector('[tabindex="0"]'))==null||t.focus())}onSearchInput(e){this.searchField.value?(this.showClearSearchButton(),this.search()):this.onClearSearch(e)}async search(){var e;if(this.searchField.value)try{let t=await this.emojiData.searchEmojis(this.searchField.value,this.customEmojis,this.emojiVersion,this.categories);if(this.events.emit("preview:hide"),t.length){let r=new c3;this.resultsContainer=this.viewFactory.create(Vh,{emojis:t,fullHeight:!0,showVariants:!0,lazyLoader:r}),this.resultsContainer.renderSync(),(e=this.resultsContainer)!=null&&e.el&&(r.observe(this.resultsContainer.el),this.resultsContainer.setActive(!0,{row:0,offset:0},!1),this.resultsContainer.el.addEventListener("keydown",n=>this.handleResultsKeydown(n)),this.events.emit("content:show",this.resultsContainer))}else this.events.emit("content:show",this.notFoundMessage)}catch(t){this.events.emit("content:show",this.errorMessage)}}},u2e=new Pr(({classes:i})=>` +`,{mode:"async"}),_v=xn("searchContainer","searchField","clearButton","searchAccessory","clearSearchButton","notFound"),KR=class extends Gt{constructor({categories:e,emojiVersion:t}){super({template:d2e,classes:_v}),this.categories=e.filter(r=>r.key!=="recents"),this.emojiVersion=t,this.search=lxe(this.search.bind(this),100)}initialize(){this.uiElements={searchField:Gt.byClass(_v.searchField),searchAccessory:Gt.byClass(_v.searchAccessory)},this.uiEvents=[Gt.childEvent("searchField","keydown",this.onKeyDown),Gt.childEvent("searchField","input",this.onSearchInput)],super.initialize()}async render(){return await super.render(),this.searchIcon=vte("search"),this.notFoundMessage=this.viewFactory.create(Ev,{message:this.i18n.get("search.notFound"),className:_v.notFound,icon:"sad"}),this.notFoundMessage.renderSync(),this.errorMessage=this.viewFactory.create(Ev,{message:this.i18n.get("search.error")}),this.errorMessage.renderSync(),this.clearSearchButton=c2e.render({classes:_v,i18n:this.i18n}),this.clearSearchButton.addEventListener("click",e=>this.onClearSearch(e)),this.searchField=this.ui.searchField,this.showSearchIcon(),this.el}showSearchIcon(){this.showSearchAccessory(this.searchIcon)}showClearSearchButton(){this.showSearchAccessory(this.clearSearchButton)}showSearchAccessory(e){vm(this.ui.searchAccessory,e)}clear(){this.searchField.value="",this.showSearchIcon()}focus(){this.searchField.focus()}onClearSearch(e){var t;e.stopPropagation(),this.searchField.value="",(t=this.resultsContainer)==null||t.destroy(),this.resultsContainer=null,this.showSearchIcon(),this.events.emit("content:show"),this.searchField.focus()}handleResultsKeydown(e){this.resultsContainer&&e.key==="Escape"&&this.onClearSearch(e)}onKeyDown(e){var t;e.key==="Escape"&&this.searchField.value?this.onClearSearch(e):(e.key==="Enter"||e.key==="ArrowDown")&&this.resultsContainer&&(e.preventDefault(),(t=this.resultsContainer.el.querySelector('[tabindex="0"]'))==null||t.focus())}onSearchInput(e){this.searchField.value?(this.showClearSearchButton(),this.search()):this.onClearSearch(e)}async search(){var e;if(this.searchField.value)try{let t=await this.emojiData.searchEmojis(this.searchField.value,this.customEmojis,this.emojiVersion,this.categories);if(this.events.emit("preview:hide"),t.length){let r=new d3;this.resultsContainer=this.viewFactory.create(Vh,{emojis:t,fullHeight:!0,showVariants:!0,lazyLoader:r}),this.resultsContainer.renderSync(),(e=this.resultsContainer)!=null&&e.el&&(r.observe(this.resultsContainer.el),this.resultsContainer.setActive(!0,{row:0,offset:0},!1),this.resultsContainer.el.addEventListener("keydown",n=>this.handleResultsKeydown(n)),this.events.emit("content:show",this.resultsContainer))}else this.events.emit("content:show",this.notFoundMessage)}catch(t){this.events.emit("content:show",this.errorMessage)}}},u2e=new Pr(({classes:i})=>` <div class="${i.variantOverlay}"> <div class="${i.variantPopup}"> <div data-view="emojis" data-render="sync"></div> </div> </div> -`),lte=xn("variantOverlay","variantPopup"),gR={easing:"ease-in-out",duration:250,fill:"both"},cte={opacity:[0,1]},dte={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]},KR=class extends Gt{constructor({emoji:e,parent:t}){super({template:u2e,classes:lte,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new Sv,this.animateShow=()=>Promise.all([Uh(this.el,cte,gR,this.options),Uh(this.ui.popup,dte,gR,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:Gt.byClass(lte.variantPopup)},this.uiEvents=[Gt.uiEvent("click",this.handleClick),Gt.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){let e=xt(ue({},gR),{direction:"reverse"});return Promise.all([Uh(this.el,cte,e,this.options),Uh(this.ui.popup,dte,e,this.options)])}async hide(){await this.animateHide(),this.events.emit("variantPopup:hide")}handleKeydown(e){e.key==="Escape"&&(this.hide(),e.stopPropagation())}handleClick(e){this.ui.popup.contains(e.target)||this.hide()}getEmoji(e){return this.renderedEmojis[e]}setFocusedEmoji(e){let t=this.getEmoji(this.focusedEmojiIndex);t.tabIndex=-1,this.focusedEmojiIndex=e;let r=this.getEmoji(this.focusedEmojiIndex);r.tabIndex=0,r.focus()}destroy(){this.emojiContainer.destroy(),this.focusTrap.deactivate(),super.destroy()}renderSync(){let e=xt(ue({},this.emoji),{skins:null}),t=(this.emoji.skins||[]).map(n=>xt(ue({},n),{label:this.emoji.label,tags:this.emoji.tags})),r=[e,...t];return this.emojiContainer=this.viewFactory.create(Vh,{emojis:r,preview:!1}),super.renderSync({emojis:this.emojiContainer}),r.length<this.options.emojisPerRow&&this.el.style.setProperty("--emojis-per-row",r.length.toString()),this.el}activate(){this.emojiContainer.setActive(!0,{row:0,offset:0},!0),this.focusTrap.activate(this.el)}},h2e=new Pr(({classes:i,i18n:e,category:t,pickerId:r,icon:n})=>` +`),lte=xn("variantOverlay","variantPopup"),bR={easing:"ease-in-out",duration:250,fill:"both"},cte={opacity:[0,1]},dte={opacity:[0,1],transform:["scale3d(0.8, 0.8, 0.8)","scale3d(1, 1, 1)"]},$R=class extends Gt{constructor({emoji:e,parent:t}){super({template:u2e,classes:lte,parent:t}),this.focusedEmojiIndex=0,this.focusTrap=new Sv,this.animateShow=()=>Promise.all([Uh(this.el,cte,bR,this.options),Uh(this.ui.popup,dte,bR,this.options)]),this.emoji=e}initialize(){this.uiElements={popup:Gt.byClass(lte.variantPopup)},this.uiEvents=[Gt.uiEvent("click",this.handleClick),Gt.uiEvent("keydown",this.handleKeydown)],super.initialize()}animateHide(){let e=xt(ue({},bR),{direction:"reverse"});return Promise.all([Uh(this.el,cte,e,this.options),Uh(this.ui.popup,dte,e,this.options)])}async hide(){await this.animateHide(),this.events.emit("variantPopup:hide")}handleKeydown(e){e.key==="Escape"&&(this.hide(),e.stopPropagation())}handleClick(e){this.ui.popup.contains(e.target)||this.hide()}getEmoji(e){return this.renderedEmojis[e]}setFocusedEmoji(e){let t=this.getEmoji(this.focusedEmojiIndex);t.tabIndex=-1,this.focusedEmojiIndex=e;let r=this.getEmoji(this.focusedEmojiIndex);r.tabIndex=0,r.focus()}destroy(){this.emojiContainer.destroy(),this.focusTrap.deactivate(),super.destroy()}renderSync(){let e=xt(ue({},this.emoji),{skins:null}),t=(this.emoji.skins||[]).map(n=>xt(ue({},n),{label:this.emoji.label,tags:this.emoji.tags})),r=[e,...t];return this.emojiContainer=this.viewFactory.create(Vh,{emojis:r,preview:!1}),super.renderSync({emojis:this.emojiContainer}),r.length<this.options.emojisPerRow&&this.el.style.setProperty("--emojis-per-row",r.length.toString()),this.el}activate(){this.emojiContainer.setActive(!0,{row:0,offset:0},!0),this.focusTrap.activate(this.el)}},h2e=new Pr(({classes:i,i18n:e,category:t,pickerId:r,icon:n})=>` <li class="${i.categoryTab}"> <button aria-selected="false" @@ -599,13 +599,13 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" > <i data-icon="${n}"></i> </li> -`),bR=xn("categoryTab","categoryTabActive","categoryButton"),$R=class extends Gt{constructor({category:e,icon:t}){super({template:h2e,classes:bR}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:Gt.byClass(bR.categoryButton)},this.uiEvents=[Gt.childEvent("button","click",this.selectCategory),Gt.childEvent("button","focus",this.selectCategory)],super.initialize()}renderSync(){return super.renderSync({category:this.category,icon:this.icon}),this.ui.button.ariaSelected="false",this.el}setActive(e,t={}){let{changeFocusable:r,performFocus:n,scroll:o}=ue({changeFocusable:!0,performFocus:!0,scroll:!0},t);this.el.classList.toggle(bR.categoryTabActive,e),r&&(this.ui.button.tabIndex=e?0:-1,this.ui.button.ariaSelected=e.toString()),e&&n&&(this.ui.button.focus(),o&&this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!1})),this.isActive=e}selectCategory(){this.isActive||this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!0})}},f2e=new Pr(({classes:i})=>` +`),vR=xn("categoryTab","categoryTabActive","categoryButton"),GR=class extends Gt{constructor({category:e,icon:t}){super({template:h2e,classes:vR}),this.isActive=!1,this.category=e,this.icon=t}initialize(){this.uiElements={button:Gt.byClass(vR.categoryButton)},this.uiEvents=[Gt.childEvent("button","click",this.selectCategory),Gt.childEvent("button","focus",this.selectCategory)],super.initialize()}renderSync(){return super.renderSync({category:this.category,icon:this.icon}),this.ui.button.ariaSelected="false",this.el}setActive(e,t={}){let{changeFocusable:r,performFocus:n,scroll:o}=ue({changeFocusable:!0,performFocus:!0,scroll:!0},t);this.el.classList.toggle(vR.categoryTabActive,e),r&&(this.ui.button.tabIndex=e?0:-1,this.ui.button.ariaSelected=e.toString()),e&&n&&(this.ui.button.focus(),o&&this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!1})),this.isActive=e}selectCategory(){this.isActive||this.events.emit("category:select",this.category.key,{scroll:"animate",focus:"button",performFocus:!0})}},f2e=new Pr(({classes:i})=>` <div class="${i.categoryButtonsContainer}"> <ul role="tablist" class="${i.categoryButtons}"> <div data-placeholder="tabs"></div> </ul> </div> -`),p2e=xn("categoryButtons","categoryButtonsContainer"),GR=class extends Gt{constructor({categories:e}){super({template:f2e,classes:p2e}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[Gt.uiEvent("scroll",this.checkOverflow)],super.initialize()}checkOverflow(){let e=Math.abs(this.el.scrollLeft-(this.el.scrollWidth-this.el.offsetWidth))>1,t=this.el.scrollLeft>0;this.el.className="categoryButtonsContainer",t&&e?this.el.classList.add("has-overflow-both"):t?this.el.classList.add("has-overflow-left"):e&&this.el.classList.add("has-overflow-right")}renderSync(){return this.tabViews=this.categories.map(e=>this.viewFactory.create($R,{category:e,icon:d3[e.key]})),super.renderSync({tabs:this.tabViews.map(e=>e.renderSync())}),this.el}get currentCategory(){return this.categories[this.activeCategoryIndex]}get currentTabView(){return this.tabViews[this.activeCategoryIndex]}setActiveTab(e,t={}){this.checkOverflow();let r=this.currentTabView,n=this.tabViews[e];r.setActive(!1,t),n.setActive(!0,t),this.activeCategoryIndex=e}getTargetCategory(e){return e<0?this.categories.length-1:e>=this.categories.length?0:e}stepSelectedTab(e){return()=>{let t=this.activeCategoryIndex+e;this.setActiveTab(this.getTargetCategory(t),{changeFocusable:!0,performFocus:!0})}}},m2e=[{version:15,emoji:String.fromCodePoint(129768)},{version:14,emoji:String.fromCodePoint(128733)},{version:13,emoji:String.fromCodePoint(129729)},{version:12,emoji:String.fromCodePoint(129449)},{version:11,emoji:String.fromCodePoint(129463)},{version:5,emoji:String.fromCodePoint(129322)},{version:4,emoji:String.fromCodePoint(9877)},{version:3,emoji:String.fromCodePoint(129314)},{version:2,emoji:String.fromCodePoint(128488)},{version:1,emoji:String.fromCodePoint(128512)}];function g2e(){var i;let e=m2e.find(t=>b2e(t.emoji));return(i=e==null?void 0:e.version)!=null?i:1}function b2e(i){let e=document.createElement("canvas").getContext("2d");if(e)return e.textBaseline="top",e.font="32px Arial",e.fillText(i,0,0),e.getImageData(16,16,1,1).data[0]!==0}function vR(i,e){return Array.from({length:i},()=>e).join("")}function v2e({showHeader:i,classes:e}){return i?` +`),p2e=xn("categoryButtons","categoryButtonsContainer"),YR=class extends Gt{constructor({categories:e}){super({template:f2e,classes:p2e}),this.activeCategoryIndex=0,this.categories=e}initialize(){this.keyBindings={ArrowLeft:this.stepSelectedTab(-1),ArrowRight:this.stepSelectedTab(1)},this.uiEvents=[Gt.uiEvent("scroll",this.checkOverflow)],super.initialize()}checkOverflow(){let e=Math.abs(this.el.scrollLeft-(this.el.scrollWidth-this.el.offsetWidth))>1,t=this.el.scrollLeft>0;this.el.className="categoryButtonsContainer",t&&e?this.el.classList.add("has-overflow-both"):t?this.el.classList.add("has-overflow-left"):e&&this.el.classList.add("has-overflow-right")}renderSync(){return this.tabViews=this.categories.map(e=>this.viewFactory.create(GR,{category:e,icon:u3[e.key]})),super.renderSync({tabs:this.tabViews.map(e=>e.renderSync())}),this.el}get currentCategory(){return this.categories[this.activeCategoryIndex]}get currentTabView(){return this.tabViews[this.activeCategoryIndex]}setActiveTab(e,t={}){this.checkOverflow();let r=this.currentTabView,n=this.tabViews[e];r.setActive(!1,t),n.setActive(!0,t),this.activeCategoryIndex=e}getTargetCategory(e){return e<0?this.categories.length-1:e>=this.categories.length?0:e}stepSelectedTab(e){return()=>{let t=this.activeCategoryIndex+e;this.setActiveTab(this.getTargetCategory(t),{changeFocusable:!0,performFocus:!0})}}},m2e=[{version:15,emoji:String.fromCodePoint(129768)},{version:14,emoji:String.fromCodePoint(128733)},{version:13,emoji:String.fromCodePoint(129729)},{version:12,emoji:String.fromCodePoint(129449)},{version:11,emoji:String.fromCodePoint(129463)},{version:5,emoji:String.fromCodePoint(129322)},{version:4,emoji:String.fromCodePoint(9877)},{version:3,emoji:String.fromCodePoint(129314)},{version:2,emoji:String.fromCodePoint(128488)},{version:1,emoji:String.fromCodePoint(128512)}];function g2e(){var i;let e=m2e.find(t=>b2e(t.emoji));return(i=e==null?void 0:e.version)!=null?i:1}function b2e(i){let e=document.createElement("canvas").getContext("2d");if(e)return e.textBaseline="top",e.font="32px Arial",e.fillText(i,0,0),e.getImageData(16,16,1,1).data[0]!==0}function _R(i,e){return Array.from({length:i},()=>e).join("")}function v2e({showHeader:i,classes:e}){return i?` <header class="${e.header}"> <div data-view="search"></div> <div data-view="categoryTabs" data-render="sync"></div> @@ -624,7 +624,7 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" </div> `:"",a=({showCategoryTabs:d,classes:u})=>d?` <div class="${u.categoryTabsSkeleton}"> - ${vR(o,`<div class="${u.placeholder} ${u.categoryTab}"></div>`)} + ${_R(o,`<div class="${u.placeholder} ${u.categoryTab}"></div>`)} </div> `:"",l=({showHeader:d,classes:u})=>d?` <header class="${u.headerSkeleton}"> @@ -636,7 +636,7 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" <div class="${u.placeholder} ${u.previewEmoji}"></div> <div class="${u.placeholder} ${u.previewName}"></div> <ul class="${u.tagList}"> - ${vR(3,`<li class="${u.placeholder} ${u.tag}"></li>`)} + ${_R(3,`<li class="${u.placeholder} ${u.tag}"></li>`)} </ul> </div> `:"";return` @@ -645,16 +645,16 @@ ${n.message}</div>`)))}function zve(){return import("./mermaid.core-KJGAOKCX.js" <div class="${t.contentSkeleton}"> <div class="${t.placeholder} ${t.categoryName}"></div> <div class="${t.emojiGrid}"> - ${vR(e,`<div class="${t.placeholder} ${t.emoji}"></div>`)} + ${_R(e,`<div class="${t.placeholder} ${t.emoji}"></div>`)} </div> </div> ${c(i)} </div> - `}var w2e=new Pr(i=>i.isLoaded?_2e(i):y2e(i)),G4=xn("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),Y4={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"},YR=class extends Gt{constructor(){super({template:w2e,classes:G4}),this.pickerReady=!1,this.externalEvents=new PR,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(Y4[e],t.toString()),theme:e=>{let t=this.options.theme,r=this.el.closest(`.${t}`);this.el.classList.remove(t),r==null||r.classList.remove(t),this.el.classList.add(e),r==null||r.classList.add(e)},className:e=>{this.options.className&&this.el.classList.remove(this.options.className),this.el.classList.add(e)},emojisPerRow:this.updateStyleProperty.bind(this,"emojisPerRow"),emojiSize:this.updateStyleProperty.bind(this,"emojiSize"),visibleRows:this.updateStyleProperty.bind(this,"visibleRows")}}initialize(){this.uiElements={pickerContent:Gt.byClass(G4.content),header:Gt.byClass(G4.header)},this.uiEvents=[Gt.uiEvent("keydown",this.handleKeyDown)],this.appEvents={error:this.onError,reinitialize:this.reinitialize,"data:ready":this.onDataReady,"content:show":this.showContent,"variantPopup:hide":this.hideVariantPopup,"emoji:select":this.selectEmoji},super.initialize(),this.options.recentsProvider}destroy(){var e,t;super.destroy(),(e=this.search)==null||e.destroy(),this.emojiArea.destroy(),(t=this.categoryTabs)==null||t.destroy(),this.events.removeAll(),this.externalEvents.removeAll()}clearRecents(){this.options.recentsProvider.clear()}addEventListener(e,t){this.externalEvents.on(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t)}initializePickerView(){this.pickerReady&&(this.showContent(),this.emojiArea.reset(!1))}handleKeyDown(e){let t=e.ctrlKey||e.metaKey;e.key==="s"&&t&&this.search&&(e.preventDefault(),this.search.focus())}buildChildViews(){return this.options.showPreview&&(this.preview=this.viewFactory.create(VR)),this.options.showSearch&&(this.search=this.viewFactory.create(qR,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(GR,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(jR,{categoryTabs:this.categoryTabs,categories:this.categories,emojiVersion:this.emojiVersion}),[this.preview,this.search,this.emojiArea,this.categoryTabs]}setStyleProperties(){this.options.showSearch||this.el.style.setProperty("--search-height-full","0px"),this.options.showCategoryTabs||(this.el.style.setProperty("--category-tabs-height","0px"),this.el.style.setProperty("--category-tabs-offset","0px")),this.options.showPreview||this.el.style.setProperty("--emoji-preview-height-full","0px"),Object.keys(Y4).forEach(e=>{this.options[e]&&this.el.style.setProperty(Y4[e],this.options[e].toString())})}updateStyleProperty(e,t){this.el.style.setProperty(Y4[e],t.toString())}reinitialize(){this.renderSync()}onError(e){let t=this.viewFactory.createWithOptions({data:!1},WR,{message:this.i18n.get("error.load")}),r=this.el.offsetHeight||375;throw this.el.style.height=`${r}px`,vm(this.el,t.renderSync()),e}async onDataReady(e){let t=this.el;try{e?this.emojiData=e:await this.emojiDataPromise,this.options.emojiVersion==="auto"?this.emojiVersion=g2e()||parseFloat(ixe):this.emojiVersion=this.options.emojiVersion,this.categories=await this.emojiData.getCategories(this.options);let[r,n,o,s]=this.buildChildViews();await super.render({isLoaded:!0,search:n,categoryTabs:s,emojiArea:o,preview:r,showHeader:!!(this.search||this.categoryTabs),theme:this.options.theme,className:this.options.className}),this.el.style.setProperty("--category-count",this.categories.length.toString()),this.pickerReady=!0,t.replaceWith(this.el),this.setStyleProperties(),this.initializePickerView(),this.setInitialFocus(),this.externalEvents.emit("data:ready")}catch(r){this.events.emit("error",r)}}renderSync(){var e;let t=((e=this.options.categories)==null?void 0:e.length)||10;if(this.options.showRecents&&(t+=1),super.renderSync({isLoaded:!1,theme:this.options.theme,className:this.options.className,showSearch:this.options.showSearch,showPreview:this.options.showPreview,showCategoryTabs:this.options.showCategoryTabs,showHeader:this.options.showSearch||this.options.showCategoryTabs,emojiCount:this.options.emojisPerRow*this.options.visibleRows,categoryCount:t}),this.el.style.setProperty("--category-count",t.toString()),!this.options.rootElement)throw new Error("Picker must be given a root element via the rootElement option");return vm(this.options.rootElement,this.el),this.setStyleProperties(),this.pickerReady&&this.initializePickerView(),this.el}getInitialFocusTarget(){if(typeof this.options.autoFocus<"u")switch(this.options.autoFocus){case"emojis":return this.emojiArea.focusableEmoji;case"search":return this.search;case"auto":return this.search||this.emojiArea.focusableEmoji;default:return null}if(this.options.autoFocusSearch===!0)return console.warn("options.autoFocusSearch is deprecated, please use options.focusTarget instead"),this.search}setInitialFocus(){var e;!this.pickerReady||(e=this.getInitialFocusTarget())==null||e.focus()}reset(e=!0){var t;this.pickerReady&&(this.emojiArea.reset(e),this.showContent(this.emojiArea)),(t=this.search)==null||t.clear(),this.hideVariantPopup()}showContent(e=this.emojiArea){var t,r;e!==this.currentView&&(this.currentView!==this.emojiArea&&((t=this.currentView)==null||t.destroy()),this.ui.pickerContent.classList.toggle(G4.fullHeight,e!==this.emojiArea),vm(this.ui.pickerContent,e.el),this.currentView=e,e===this.emojiArea?(this.emojiArea.reset(),this.categoryTabs&&this.ui.header.appendChild(this.categoryTabs.el)):(r=this.categoryTabs)==null||r.el.remove())}hideVariantPopup(){var e;(e=this.variantPopup)==null||e.destroy()}isPickerClick(e){var t,r;let n=e.target,o=this.el.contains(n),s=(r=(t=this.variantPopup)==null?void 0:t.el)==null?void 0:r.contains(n);return o||s}async selectEmoji({emoji:e}){var t,r;(t=e.skins)!=null&&t.length&&this.options.showVariants&&!this.isVariantPopupOpen?this.showVariantPopup(e):(await((r=this.variantPopup)==null?void 0:r.animateHide()),this.events.emit("variantPopup:hide"),await this.emitEmoji(e))}get isVariantPopupOpen(){return this.variantPopup&&!this.variantPopup.isDestroyed}async showVariantPopup(e){let t=document.activeElement;this.events.once("variantPopup:hide",()=>{t==null||t.focus()}),this.variantPopup=this.viewFactory.create(KR,{emoji:e,parent:this.el}),this.el.appendChild(this.variantPopup.renderSync()),this.variantPopup.activate()}async emitEmoji(e){this.externalEvents.emit("emoji:select",await this.renderer.doEmit(e)),this.options.recentsProvider.addOrUpdateRecent(e,this.options.maxRecents),this.events.emit("recent:add",e)}updateOptions(e){Object.keys(e).forEach(t=>{this.updaters[t](e[t])}),Object.assign(this.options,e)}},XR=class{constructor({events:e,i18n:t,renderer:r,emojiData:n,options:o,customEmojis:s=[],pickerId:a}){this.events=e,this.i18n=t,this.renderer=r,this.emojiData=n,this.options=o,this.customEmojis=s,this.pickerId=a}setEmojiData(e){this.emojiData=Promise.resolve(e)}createWithOptions(e={},t,...r){let n=new t(...r);return n.setPickerId(this.pickerId),n.setEvents(this.events),n.setI18n(this.i18n),n.setRenderer(this.renderer),e.data!==!1&&n.setEmojiData(this.emojiData),n.setOptions(this.options),n.setCustomEmojis(this.customEmojis),n.viewFactory=this,n.initialize(),n}create(e,...t){return this.createWithOptions({},e,...t)}},r3,QR=class{constructor(e={}){yc(this,r3,void 0),_R(this,r3,new Map(Object.entries(e)))}get(e,t=e){return wc(this,r3).get(e)||t}};r3=new WeakMap;function x2e(i,e){e===void 0&&(e={});var t=e.insertAt;if(!(!i||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=i:n.appendChild(document.createTextNode(i))}}function i9(){let i=!1;return function(e){Kxe.injectStyles&&!i&&(x2e(e),i=!0)}}var C2e=`.picmo__picker .picmo__icon{width:1.25em;height:1em;fill:currentColor}.picmo__icon-small{font-size:.8em}.picmo__icon-medium{font-size:1em}.picmo__icon-large{font-size:1.25em}.picmo__icon-2x{font-size:2em}.picmo__icon-3x{font-size:3em}.picmo__icon-4x{font-size:4em}.picmo__icon-5x{font-size:5em}.picmo__icon-8x{font-size:8em}.picmo__icon-10x{font-size:10em}.picmo__light,.picmo__auto{color-scheme:light;--accent-color: #4f46e5;--background-color: #f9fafb;--border-color: #cccccc;--category-name-background-color: #f9fafb;--category-name-button-color: #999999;--category-name-text-color: hsl(214, 30%, 50%);--category-tab-active-background-color: rgba(255, 255, 255, .6);--category-tab-active-color: var(--accent-color);--category-tab-color: #666;--category-tab-highlight-background-color: rgba(0, 0, 0, .15);--error-color-dark: hsl(0, 100%, 45%);--error-color: hsl(0, 100%, 40%);--focus-indicator-background-color: hsl(198, 65%, 85%);--focus-indicator-color: #333333;--hover-background-color: #c7d2fe;--placeholder-background-color: #cccccc;--search-background-color: #f9fafb;--search-focus-background-color: #ffffff;--search-icon-color: #999999;--search-placeholder-color: #71717a;--secondary-background-color: #e2e8f0;--secondary-text-color: #666666;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #000000;--variant-popup-background-color: #ffffff}.picmo__dark{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}@media (prefers-color-scheme: dark){.picmo__auto{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}}.picmo__picker .picmo__categoryButtonsContainer{overflow:auto;padding:2px 0}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-right{mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-left{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-both{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%)}.picmo__picker .picmo__categoryButtons{display:flex;flex-direction:row;gap:var(--tab-gap);margin:0;padding:0 .5em;align-items:center;height:var(--category-tabs-height);box-sizing:border-box;width:100%;justify-content:space-between;position:relative;list-style-type:none;justify-self:center;max-width:min(23.55rem,calc(var(--category-count, 1) * 2.5rem))}.picmo__picker .picmo__categoryButtons .picmo__categoryTab{display:flex;align-items:center;transition:all .1s;width:2em}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton{color:var(--category-tab-active-color);background:linear-gradient(rgba(255,255,255,.75) 0%,rgba(255,255,255,.75) 100%),linear-gradient(var(--category-tab-active-color) 0%,var(--category-tab-active-color) 100%);border:2px solid var(--category-tab-active-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton:hover{background-color:var(--category-tab-active-background-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton{border-radius:5px;background:transparent;border:2px solid transparent;color:var(--category-tab-color);cursor:pointer;padding:2px;vertical-align:middle;display:flex;align-items:center;justify-content:center;font-size:1.2rem;width:1.6em;height:1.6em;transition:all .1s}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:is(img){width:var(--category-tab-size);height:var(--category-tab-size)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:hover{background:var(--category-tab-highlight-background-color)}.picmo__dataError [data-icon]{opacity:.8}@keyframes appear{0%{opacity:0}to{opacity:.8}}@keyframes appear-grow{0%{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}.picmo__picker .picmo__error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--secondary-text-color)}.picmo__picker .picmo__error .picmo__iconContainer{opacity:.8;animation:appear-grow .25s cubic-bezier(.175,.885,.32,1.275);--color-primary: var(--error-color);--color-secondary: var(--error-color-dark)}.picmo__picker .picmo__error .picmo__title{animation:appear .25s;animation-delay:50ms;animation-fill-mode:both}.picmo__picker .picmo__error button{padding:8px 16px;cursor:pointer;background:var(--background-color);border:1px solid var(--text-color);border-radius:5px;color:var(--text-color)}.picmo__picker .picmo__error button:hover{background:var(--text-color);color:var(--background-color)}.picmo__emojiButton{background:transparent;border:none;border-radius:15px;cursor:pointer;display:flex;font-family:var(--emoji-font);font-size:var(--emoji-size);height:100%;justify-content:center;align-items:center;margin:0;overflow:hidden;padding:0;width:100%}.picmo__emojiButton:hover{background:var(--hover-background-color)}.picmo__emojiButton:focus{border-radius:0;background:var(--focus-indicator-background-color);outline:1px solid var(--focus-indicator-color)}.picmo__picker .picmo__emojiArea{height:var(--emoji-area-height);overflow-y:auto;position:relative}.picmo__picker .picmo__emojiCategory{position:relative}.picmo__picker .picmo__emojiCategory .picmo__categoryName{font-size:.9em;padding:.5rem;margin:0;background:var(--category-name-background-color);color:var(--category-name-text-color);top:0;z-index:1;display:grid;gap:4px;grid-template-columns:auto 1fr auto;align-items:center;line-height:1;box-sizing:border-box;height:var(--category-name-height);justify-content:flex-start;text-transform:uppercase}.picmo__picker .picmo__emojiCategory .picmo__categoryName button{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;color:var(--category-name-button-color)}.picmo__picker .picmo__emojiCategory .picmo__categoryName button:hover{opacity:1}.picmo__picker .picmo__emojiCategory .picmo__noRecents{color:var(--secondary-text-color);grid-column:1 / span var(--emojis-per-row);font-size:.9em;text-align:center;display:flex;align-items:center;justify-content:center;min-height:calc(var(--emoji-size) * var(--emoji-size-multiplier))}.picmo__picker .picmo__emojiCategory .picmo__recentEmojis[data-empty=true]{display:none}:is(.picmo__picker .picmo__emojiCategory) .picmo__recentEmojis[data-empty=false]+div{display:none}.picmo__picker .picmo__emojiContainer{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center}.picmo__picker.picmo__picker{--border-radius: 5px;--emoji-area-height: calc( (var(--row-count) * var(--emoji-size) * var(--emoji-size-multiplier)) + var(--category-name-height) );--content-height: var(--emoji-area-height);--emojis-per-row: 8;--row-count: 6;--emoji-preview-margin: 4px;--emoji-preview-height: calc(var(--emoji-preview-size) + 1em + 1px);--emoji-preview-height-full: calc(var(--emoji-preview-height) + var(--emoji-preview-margin));--emoji-preview-size: 2.75em;--emoji-size: 2rem;--emoji-size-multiplier: 1.3;--content-margin: 8px;--category-tabs-height:calc(1.5em + 9px);--category-tabs-offset: 8px;--category-tab-size: 1.2rem;--category-name-height: 2rem;--category-name-padding-y: 6px;--search-height: 2em;--search-margin: .5em;--search-margin-bottom: 4px;--search-height-full: calc(var(--search-height) + var(--search-margin) + var(--search-margin-bottom));--overlay-background-color: rgba(0, 0, 0, .8);--emoji-font: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";--ui-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;--ui-font-size: 16px;--picker-width: calc(var(--emojis-per-row) * var(--emoji-size) * var(--emoji-size-multiplier) + 2.75rem);--preview-background-color: var(--secondary-background-color);background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);font-size:var(--ui-font-size);overflow:hidden;position:relative;width:var(--picker-width);display:grid;gap:8px}.picmo__picker.picmo__picker>*{font-family:var(--ui-font)}.picmo__picker.picmo__skeleton{background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);width:var(--picker-width);color:var(--secondary-text-color)}.picmo__picker.picmo__skeleton *{box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__picker.picmo__skeleton .picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}.picmo__picker.picmo__skeleton .picmo__headerSkeleton{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;overflow:hidden;gap:8px;border-bottom:1px solid var(--border-color);width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton{padding:0 8px;height:var(--search-height)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton .picmo__searchInput{width:100%;height:28px;border-radius:3px}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton{height:var(--category-tabs-height);display:flex;flex-direction:row;align-items:center;justify-self:center;width:calc(2rem * var(--category-count, 1))}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton .picmo__categoryTab{width:25px;height:25px;padding:2px;border-radius:5px;margin:.25em}.picmo__picker.picmo__skeleton .picmo__contentSkeleton{height:var(--content-height);padding-right:8px;opacity:.7}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__categoryName{width:50%;height:1rem;margin:.5rem;box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center;width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid .picmo__emoji{width:var(--emoji-size);height:var(--emoji-size);border-radius:50%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton{height:var(--emoji-preview-height);border-top:1px solid var(--border-color);display:grid;align-items:center;padding:.5em;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags"}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewEmoji{grid-area:emoji;border-radius:50%;width:var(--emoji-preview-size);height:var(--emoji-preview-size)}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewName{grid-area:name;height:.8em;width:80%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList .picmo__tag{border-radius:3px;padding:2px 8px;margin-right:.25em;height:1em;width:20%}.picmo__overlay{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.picmo__content{position:relative;overflow:hidden;height:var(--content-height)}.picmo__content.picmo__fullHeight{height:calc(var(--content-height) + var(--category-tabs-height) + var(--category-tabs-offset));overflow-y:auto}.picmo__pluginContainer{margin:.5em;display:flex;flex-direction:row}.picmo__header{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:grid;gap:8px;border-bottom:1px solid var(--border-color)}@media (prefers-reduced-motion: reduce){.picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__placeholder:after{display:none}}.picmo__picker .picmo__preview{border-top:1px solid var(--border-color);display:grid;align-items:center;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags";height:var(--emoji-preview-height);box-sizing:border-box;padding:.5em;position:relative;background:var(--preview-background-color)}.picmo__picker .picmo__preview .picmo__previewEmoji{grid-area:emoji;font-size:var(--emoji-preview-size);font-family:var(--emoji-font);width:1.25em;display:flex;align-items:center;justify-content:center}.picmo__picker .picmo__preview .picmo__previewName{grid-area:name;color:var(--text-color);font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.picmo__picker .picmo__preview .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0;font-size:.75em;overflow:hidden}.picmo__picker .picmo__preview .picmo__tag{border-radius:3px;background:var(--tag-background-color);color:var(--text-color);padding:2px 8px;margin-right:.25em;white-space:nowrap}.picmo__picker .picmo__preview .picmo__tag:last-child{margin-right:0}.picmo__picker .picmo__searchContainer{display:flex;height:var(--search-height);box-sizing:border-box;padding:0 8px;position:relative}.picmo__picker .picmo__searchContainer .picmo__searchField{background:var(--search-background-color);border-radius:3px;border:none;box-sizing:border-box;color:var(--text-color);font-size:.9em;outline:none;padding:.5em 2.25em .5em .5em;width:100%}.picmo__picker .picmo__searchContainer .picmo__searchField:focus{background:var(--search-focus-background-color)}.picmo__picker .picmo__searchContainer .picmo__searchField::placeholder{color:var(--search-placeholder-color)}.picmo__picker .picmo__searchContainer .picmo__searchAccessory{color:var(--search-icon-color);height:100%;position:absolute;right:1em;top:0;width:1.25rem;display:flex;align-items:center}.picmo__picker .picmo__searchContainer .picmo__searchAccessory svg{fill:var(--search-icon-color)}.picmo__picker .picmo__searchContainer .picmo__clearButton{border:0;color:var(--search-icon-color);background:transparent;cursor:pointer}.picmo__picker .picmo__searchContainer .picmo__clearSearchButton{cursor:pointer;border:none;background:transparent;color:var(--search-icon-color);font-size:1em;width:100%;height:100%;display:flex;align-items:center;padding:0}.picmo__picker .picmo__searchContainer .picmo__notFound [data-icon]{fill:#f3e265}.picmo__picker .picmo__variantOverlay{background:var(--overlay-background-color);border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.picmo__picker .picmo__variantOverlay .picmo__variantPopup{background:var(--variant-popup-background-color);border-radius:5px;margin:.5em;padding:.5em;text-align:center;user-select:none;display:flex;align-items:center;justify-content:center}.picmo__customEmoji{width:1em;height:1em}@keyframes shine{to{transform:translate(100%)}}.picmo__picker .picmo__imagePlaceholder{width:2rem;height:2rem;border-radius:50%}.picmo__placeholder{background:#DDDBDD;position:relative}.picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""} -`;function S2e(i){return bte(i.locale,i.dataStore,i.messages,i.emojiData)}var k2e=0,X4;function E2e(){return`picmo-${Date.now()}-${k2e++}`}var T2e=i9();function yte(i){T2e(C2e);let e=t9(i),t=((e==null?void 0:e.custom)||[]).map(s=>xt(ue({},s),{custom:!0,tags:["custom",...s.tags||[]]})),r=new RR;X4||(X4=S2e(e));let n=new QR(e.i18n);X4.then(s=>{r.emit("data:ready",s)}).catch(s=>{r.emit("error",s)});let o=new XR({events:r,i18n:n,customEmojis:t,renderer:e.renderer,options:e,emojiData:X4,pickerId:E2e()}).create(YR);return o.renderSync(),o}function qh(i){return i.split("-")[0]}function _m(i){return i.split("-")[1]}function m3(i){return["top","bottom"].includes(qh(i))?"x":"y"}function Ate(i){return i==="y"?"height":"width"}function wte(i,e,t){let{reference:r,floating:n}=i,o=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2,a=m3(e),l=Ate(a),c=r[l]/2-n[l]/2,d=qh(e),u=a==="x",h;switch(d){case"top":h={x:o,y:r.y-n.height};break;case"bottom":h={x:o,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:s};break;case"left":h={x:r.x-n.width,y:s};break;default:h={x:r.x,y:r.y}}switch(_m(e)){case"start":h[a]-=c*(t&&u?-1:1);break;case"end":h[a]+=c*(t&&u?-1:1);break}return h}var I2e=async(i,e,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:s}=t,a=await(s.isRTL==null?void 0:s.isRTL(e)),l=await s.getElementRects({reference:i,floating:e,strategy:n}),{x:c,y:d}=wte(l,r,a),u=r,h={},f=0;for(let m=0;m<o.length;m++){let{name:g,fn:w}=o[m],{x:_,y:E,data:A,reset:L}=await w({x:c,y:d,initialPlacement:r,placement:u,strategy:n,middlewareData:h,rects:l,platform:s,elements:{reference:i,floating:e}});if(c=_!=null?_:c,d=E!=null?E:d,h=xt(ue({},h),{[g]:ue(ue({},h[g]),A)}),L&&f<=50){f++,typeof L=="object"&&(L.placement&&(u=L.placement),L.rects&&(l=L.rects===!0?await s.getElementRects({reference:i,floating:e,strategy:n}):L.rects),{x:c,y:d}=wte(l,u,a)),m=-1;continue}}return{x:c,y:d,placement:u,strategy:n,middlewareData:h}};function L2e(i){return ue({top:0,right:0,bottom:0,left:0},i)}function A2e(i){return typeof i!="number"?L2e(i):{top:i,right:i,bottom:i,left:i}}function u3(i){return xt(ue({},i),{top:i.y,left:i.x,right:i.x+i.width,bottom:i.y+i.height})}async function s9(i,e){var t;e===void 0&&(e={});let{x:r,y:n,platform:o,rects:s,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=e,m=A2e(f),g=a[h?u==="floating"?"reference":"floating":u],w=u3(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(g)))==null||t?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=u3(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u==="floating"?xt(ue({},s.floating),{x:r,y:n}):s.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),strategy:l}):s[u]);return{top:w.top-_.top+m.top,bottom:_.bottom-w.bottom+m.bottom,left:w.left-_.left+m.left,right:_.right-w.right+m.right}}var D2e=Math.min,M2e=Math.max;function xte(i,e,t){return M2e(i,D2e(e,t))}var N2e={left:"right",right:"left",bottom:"top",top:"bottom"};function h3(i){return i.replace(/left|right|bottom|top/g,e=>N2e[e])}function Dte(i,e,t){t===void 0&&(t=!1);let r=_m(i),n=m3(i),o=Ate(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=h3(s)),{main:s,cross:h3(s)}}var R2e={start:"end",end:"start"};function r9(i){return i.replace(/start|end/g,e=>R2e[e])}var P2e=["top","right","bottom","left"],O2e=P2e.reduce((i,e)=>i.concat(e,e+"-start",e+"-end"),[]);function F2e(i,e,t){return(i?[...t.filter(r=>_m(r)===i),...t.filter(r=>_m(r)!==i)]:t.filter(r=>qh(r)===r)).filter(r=>i?_m(r)===i||(e?r9(r)!==r:!1):!0)}var z2e=function(i){return i===void 0&&(i={}),{name:"autoPlacement",options:i,async fn(e){var t,r,n,o,s;let{x:a,y:l,rects:c,middlewareData:d,placement:u,platform:h,elements:f}=e,Oe=i,{alignment:m=null,allowedPlacements:g=O2e,autoAlignment:w=!0}=Oe,_=so(Oe,["alignment","allowedPlacements","autoAlignment"]),E=F2e(m,w,g),A=await s9(e,_),L=(t=(r=d.autoPlacement)==null?void 0:r.index)!=null?t:0,O=E[L];if(O==null)return{};let{main:U,cross:Y}=Dte(O,c,await(h.isRTL==null?void 0:h.isRTL(f.floating)));if(u!==O)return{x:a,y:l,reset:{placement:E[0]}};let oe=[A[qh(O)],A[U],A[Y]],te=[...(n=(o=d.autoPlacement)==null?void 0:o.overflows)!=null?n:[],{placement:O,overflows:oe}],Z=E[L+1];if(Z)return{data:{index:L+1,overflows:te},reset:{placement:Z}};let ve=te.slice().sort((Xe,dt)=>Xe.overflows[0]-dt.overflows[0]),Pe=(s=ve.find(Xe=>{let{overflows:dt}=Xe;return dt.every(be=>be<=0)}))==null?void 0:s.placement,Ee=Pe!=null?Pe:ve[0].placement;return Ee!==u?{data:{index:L+1,overflows:te},reset:{placement:Ee}}:{}}}};function B2e(i){let e=h3(i);return[r9(i),e,r9(e)]}var H2e=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(e){var t;let{placement:r,middlewareData:n,rects:o,initialPlacement:s,platform:a,elements:l}=e,oe=i,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",flipAlignment:f=!0}=oe,m=so(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),g=qh(r),w=u||(g===s||!f?[h3(s)]:B2e(s)),_=[s,...w],E=await s9(e,m),A=[],L=((t=n.flip)==null?void 0:t.overflows)||[];if(c&&A.push(E[g]),d){let{main:te,cross:Z}=Dte(r,o,await(a.isRTL==null?void 0:a.isRTL(l.floating)));A.push(E[te],E[Z])}if(L=[...L,{placement:r,overflows:A}],!A.every(te=>te<=0)){var O,U;let te=((O=(U=n.flip)==null?void 0:U.index)!=null?O:0)+1,Z=_[te];if(Z)return{data:{index:te,overflows:L},reset:{placement:Z}};let ve="bottom";switch(h){case"bestFit":{var Y;let Pe=(Y=L.map(Ee=>[Ee,Ee.overflows.filter(Oe=>Oe>0).reduce((Oe,Xe)=>Oe+Xe,0)]).sort((Ee,Oe)=>Ee[1]-Oe[1])[0])==null?void 0:Y[0].placement;Pe&&(ve=Pe);break}case"initialPlacement":ve=s;break}if(r!==ve)return{reset:{placement:ve}}}return{}}}};async function U2e(i,e){let{placement:t,platform:r,elements:n}=i,o=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=qh(t),a=_m(t),l=m3(t)==="x",c=["left","top"].includes(s)?-1:1,d=o&&l?-1:1,u=typeof e=="function"?e(i):e,{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:ue({mainAxis:0,crossAxis:0,alignmentAxis:null},u);return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*d,y:h*c}:{x:h*c,y:f*d}}var Cte=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){let{x:t,y:r}=e,n=await U2e(e,i);return{x:t+n.x,y:r+n.y,data:n}}}};function j2e(i){return i==="x"?"y":"x"}var Ste=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){let{x:t,y:r,placement:n}=e,w=i,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:_=>{let{x:E,y:A}=_;return{x:E,y:A}}}}=w,l=so(w,["mainAxis","crossAxis","limiter"]),c={x:t,y:r},d=await s9(e,l),u=m3(qh(n)),h=j2e(u),f=c[u],m=c[h];if(o){let _=u==="y"?"top":"left",E=u==="y"?"bottom":"right",A=f+d[_],L=f-d[E];f=xte(A,f,L)}if(s){let _=h==="y"?"top":"left",E=h==="y"?"bottom":"right",A=m+d[_],L=m-d[E];m=xte(A,m,L)}let g=a.fn(xt(ue({},e),{[u]:f,[h]:m}));return xt(ue({},g),{data:{x:g.x-t,y:g.y-r}})}}};function Mte(i){return i&&i.document&&i.location&&i.alert&&i.setInterval}function Sc(i){if(i==null)return window;if(!Mte(i)){let e=i.ownerDocument;return e&&e.defaultView||window}return i}function tl(i){return Sc(i).getComputedStyle(i)}function xc(i){return Mte(i)?"":i?(i.nodeName||"").toLowerCase():""}function Nte(){let i=navigator.userAgentData;return i!=null&&i.brands?i.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function il(i){return i instanceof Sc(i).HTMLElement}function tu(i){return i instanceof Sc(i).Element}function W2e(i){return i instanceof Sc(i).Node}function ym(i){if(typeof ShadowRoot>"u")return!1;let e=Sc(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function g3(i){let{overflow:e,overflowX:t,overflowY:r}=tl(i);return/auto|scroll|overlay|hidden/.test(e+r+t)}function V2e(i){return["table","td","th"].includes(xc(i))}function Rte(i){let e=/firefox/i.test(Nte()),t=tl(i);return t.transform!=="none"||t.perspective!=="none"||t.contain==="paint"||["transform","perspective"].includes(t.willChange)||e&&t.willChange==="filter"||e&&(t.filter?t.filter!=="none":!1)}function Pte(){return!/^((?!chrome|android).)*safari/i.test(Nte())}var kte=Math.min,Tv=Math.max,f3=Math.round;function Cc(i,e,t){var r,n,o,s;e===void 0&&(e=!1),t===void 0&&(t=!1);let a=i.getBoundingClientRect(),l=1,c=1;e&&il(i)&&(l=i.offsetWidth>0&&f3(a.width)/i.offsetWidth||1,c=i.offsetHeight>0&&f3(a.height)/i.offsetHeight||1);let d=tu(i)?Sc(i):window,u=!Pte()&&t,h=(a.left+(u&&(r=(n=d.visualViewport)==null?void 0:n.offsetLeft)!=null?r:0))/l,f=(a.top+(u&&(o=(s=d.visualViewport)==null?void 0:s.offsetTop)!=null?o:0))/c,m=a.width/l,g=a.height/c;return{width:m,height:g,top:f,right:h+m,bottom:f+g,left:h,x:h,y:f}}function iu(i){return((W2e(i)?i.ownerDocument:i.document)||window.document).documentElement}function b3(i){return tu(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function Ote(i){return Cc(iu(i)).left+b3(i).scrollLeft}function q2e(i){let e=Cc(i);return f3(e.width)!==i.offsetWidth||f3(e.height)!==i.offsetHeight}function K2e(i,e,t){let r=il(e),n=iu(e),o=Cc(i,r&&q2e(e),t==="fixed"),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(r||!r&&t!=="fixed")if((xc(e)!=="body"||g3(n))&&(s=b3(e)),il(e)){let l=Cc(e,!0);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else n&&(a.x=Ote(n));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function Fte(i){return xc(i)==="html"?i:i.assignedSlot||i.parentNode||(ym(i)?i.host:null)||iu(i)}function Ete(i){return!il(i)||tl(i).position==="fixed"?null:$2e(i)}function $2e(i){let{offsetParent:e}=i,t=i,r=!1;for(;t&&t!==e;){let{assignedSlot:n}=t;if(n){let o=n.offsetParent;if(tl(n).display==="contents"){let s=n.hasAttribute("style"),a=n.style.display;n.style.display=tl(t).display,o=n.offsetParent,n.style.display=a,s||n.removeAttribute("style")}t=n,e!==o&&(e=o,r=!0)}else if(ym(t)&&t.host&&r)break;t=ym(t)&&t.host||t.parentNode}return e}function G2e(i){let e=Fte(i);for(ym(e)&&(e=e.host);il(e)&&!["html","body"].includes(xc(e));){if(Rte(e))return e;{let t=e.parentNode;e=ym(t)?t.host:t}}return null}function n9(i){let e=Sc(i),t=Ete(i);for(;t&&V2e(t)&&tl(t).position==="static";)t=Ete(t);return t&&(xc(t)==="html"||xc(t)==="body"&&tl(t).position==="static"&&!Rte(t))?e:t||G2e(i)||e}function Tte(i){if(il(i))return{width:i.offsetWidth,height:i.offsetHeight};let e=Cc(i);return{width:e.width,height:e.height}}function Y2e(i){let{rect:e,offsetParent:t,strategy:r}=i,n=il(t),o=iu(t);if(t===o)return e;let s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if((n||!n&&r!=="fixed")&&((xc(t)!=="body"||g3(o))&&(s=b3(t)),il(t))){let l=Cc(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}return xt(ue({},e),{x:e.x-s.scrollLeft+a.x,y:e.y-s.scrollTop+a.y})}function X2e(i,e){let t=Sc(i),r=iu(i),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let c=Pte();(c||!c&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:o,height:s,x:a,y:l}}function Q2e(i){var e;let t=iu(i),r=b3(i),n=(e=i.ownerDocument)==null?void 0:e.body,o=Tv(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),s=Tv(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-r.scrollLeft+Ote(i),l=-r.scrollTop;return tl(n||t).direction==="rtl"&&(a+=Tv(t.clientWidth,n?n.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function zte(i){let e=Fte(i);return["html","body","#document"].includes(xc(e))?i.ownerDocument.body:il(e)&&g3(e)?e:zte(e)}function p3(i,e){var t;e===void 0&&(e=[]);let r=zte(i),n=r===((t=i.ownerDocument)==null?void 0:t.body),o=Sc(r),s=n?[o].concat(o.visualViewport||[],g3(r)?r:[]):r,a=e.concat(s);return n?a:a.concat(p3(s))}function Z2e(i,e){let t=e.getRootNode==null?void 0:e.getRootNode();if(i.contains(e))return!0;if(t&&ym(t)){let r=e;do{if(r&&i===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function J2e(i,e){let t=Cc(i,!1,e==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft;return{top:r,left:n,x:n,y:r,right:n+i.clientWidth,bottom:r+i.clientHeight,width:i.clientWidth,height:i.clientHeight}}function Ite(i,e,t){return e==="viewport"?u3(X2e(i,t)):tu(e)?J2e(e,t):u3(Q2e(iu(i)))}function eCe(i){let e=p3(i),t=["absolute","fixed"].includes(tl(i).position)&&il(i)?n9(i):i;return tu(t)?e.filter(r=>tu(r)&&Z2e(r,t)&&xc(r)!=="body"):[]}function tCe(i){let{element:e,boundary:t,rootBoundary:r,strategy:n}=i,o=[...t==="clippingAncestors"?eCe(e):[].concat(t),r],s=o[0],a=o.reduce((l,c)=>{let d=Ite(e,c,n);return l.top=Tv(d.top,l.top),l.right=kte(d.right,l.right),l.bottom=kte(d.bottom,l.bottom),l.left=Tv(d.left,l.left),l},Ite(e,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}var iCe={getClippingRect:tCe,convertOffsetParentRelativeRectToViewportRelativeRect:Y2e,isElement:tu,getDimensions:Tte,getOffsetParent:n9,getDocumentElement:iu,getElementRects:i=>{let{reference:e,floating:t,strategy:r}=i;return{reference:K2e(e,n9(t),r),floating:xt(ue({},Tte(t)),{x:0,y:0})}},getClientRects:i=>Array.from(i.getClientRects()),isRTL:i=>tl(i).direction==="rtl"};function rCe(i,e,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=n&&!a,c=o&&!a,d=l||c?[...tu(i)?p3(i):[],...p3(e)]:[];d.forEach(g=>{l&&g.addEventListener("scroll",t,{passive:!0}),c&&g.addEventListener("resize",t)});let u=null;if(s){let g=!0;u=new ResizeObserver(()=>{g||t(),g=!1}),tu(i)&&!a&&u.observe(i),u.observe(e)}let h,f=a?Cc(i):null;a&&m();function m(){let g=Cc(i);f&&(g.x!==f.x||g.y!==f.y||g.width!==f.width||g.height!==f.height)&&t(),f=g,h=requestAnimationFrame(m)}return t(),()=>{var g;d.forEach(w=>{l&&w.removeEventListener("scroll",t),c&&w.removeEventListener("resize",t)}),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(h)}}var nCe=(i,e,t)=>I2e(i,e,ue({platform:iCe},t));async function oCe(i,e,t,r){if(!r)throw new Error("Must provide a positioning option");return await(typeof r=="string"?sCe(i,e,t,r):aCe(e,r))}async function sCe(i,e,t,r){if(!t)throw new Error("Reference element is required for relative positioning");let n;return r==="auto"?n={middleware:[z2e(),Ste(),Cte({mainAxis:5,crossAxis:12})]}:n={placement:r,middleware:[H2e(),Ste(),Cte(5)]},rCe(t,e,async()=>{if((!t.isConnected||!t.offsetParent)&&lCe(i))return;let{x:o,y:s}=await nCe(t,e,n);Object.assign(e.style,{position:"absolute",left:`${o}px`,top:`${s}px`})})}function aCe(i,e){return i.style.position="fixed",Object.entries(e).forEach(([t,r])=>{i.style[t]=r}),()=>{}}function lCe(i){switch(i.options.onPositionLost){case"close":return i.close(),!0;case"destroy":return i.destroy(),!0;case"hold":return!0}}var cCe={hideOnClickOutside:!0,hideOnEmojiSelect:!0,hideOnEscape:!0,position:"auto",showCloseButton:!0,onPositionLost:"none"};function dCe(i={}){return ue(xt(ue({},cCe),{rootElement:document.body}),i)}var uCe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>',Lte=xn("popupContainer","closeButton"),o9=class{constructor(e,t){this.isOpen=!1,this.externalEvents=new Wh,this.options=ue(ue({},dCe(t)),t9(e)),this.popupEl=document.createElement("div"),this.popupEl.classList.add(Lte.popupContainer),this.popupEl.classList.add(this.options.theme),t.className&&this.popupEl.classList.add(t.className),this.options.showCloseButton&&(this.closeButton=document.createElement("button"),this.closeButton.type="button",this.closeButton.classList.add(Lte.closeButton),this.closeButton.innerHTML=uCe,this.closeButton.addEventListener("click",()=>{this.close()}),this.popupEl.appendChild(this.closeButton));let r=document.createElement("div");this.popupEl.appendChild(r),this.picker=yte(xt(ue({},this.options),{rootElement:r})),this.focusTrap=new Sv,this.picker.addEventListener("data:ready",()=>{this.focusTrap.activate(this.picker.el),this.picker.setInitialFocus()}),this.options.hideOnEmojiSelect&&this.picker.addEventListener("emoji:select",()=>{var n;this.close(),(n=this.triggerElement)==null||n.focus()}),this.options.hideOnClickOutside&&(this.onDocumentClick=this.onDocumentClick.bind(this),document.addEventListener("click",this.onDocumentClick)),this.options.hideOnEscape&&(this.handleKeydown=this.handleKeydown.bind(this),this.popupEl.addEventListener("keydown",this.handleKeydown)),this.referenceElement=this.options.referenceElement,this.triggerElement=this.options.triggerElement}addEventListener(e,t){this.externalEvents.on(e,t),this.picker.addEventListener(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t),this.picker.removeEventListener(e,t)}handleKeydown(e){var t;e.key==="Escape"&&(this.close(),(t=this.triggerElement)==null||t.focus())}async destroy(){this.isOpen&&await this.close(),document.removeEventListener("click",this.onDocumentClick),this.picker.destroy(),this.externalEvents.removeAll()}toggle(e){return this.isOpen?this.close():this.open(e)}async open({triggerElement:e,referenceElement:t}={}){this.isOpen||(e&&(this.triggerElement=e),t&&(this.referenceElement=t),await this.initiateOpenStateChange(!0),this.popupEl.style.opacity="0",this.options.rootElement.appendChild(this.popupEl),await this.setPosition(),this.picker.reset(!1),await this.animatePopup(!0),await this.animateCloseButton(!0),this.picker.setInitialFocus(),this.externalEvents.emit("picker:open"))}async close(){var e;!this.isOpen||(await this.initiateOpenStateChange(!1),await this.animateCloseButton(!1),await this.animatePopup(!1),this.popupEl.remove(),this.picker.reset(),(e=this.positionCleanup)==null||e.call(this),this.focusTrap.deactivate(),this.externalEvents.emit("picker:close"))}getRunningAnimations(){return this.picker.el.getAnimations().filter(e=>e.playState==="running")}async setPosition(){var e;(e=this.positionCleanup)==null||e.call(this),this.positionCleanup=await oCe(this,this.popupEl,this.referenceElement,this.options.position)}awaitPendingAnimations(){return Promise.all(this.getRunningAnimations().map(e=>e.finished))}onDocumentClick(e){var t;let r=e.target,n=(t=this.triggerElement)==null?void 0:t.contains(r);this.isOpen&&!this.picker.isPickerClick(e)&&!n&&this.close()}animatePopup(e){return Uh(this.popupEl,{opacity:[0,1],transform:["scale(0.9)","scale(1)"]},{duration:150,id:e?"show-picker":"hide-picker",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}animateCloseButton(e){if(this.closeButton)return Uh(this.closeButton,{opacity:[0,1]},{duration:25,id:e?"show-close":"hide-close",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}async initiateOpenStateChange(e){this.isOpen=e,await this.awaitPendingAnimations()}},hCe=`.picmo__popupContainer{display:flex;flex-direction:column;position:absolute}.picmo__popupContainer .picmo__closeButton{position:absolute;opacity:0;background:transparent;border:none;z-index:1;right:0;top:0;cursor:pointer;padding:4px;align-self:flex-end;transform:translate(50%,-50%);background:#999999;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:50%}.picmo__popupContainer .picmo__closeButton:hover{background:var(--accent-color)}.picmo__popupContainer .picmo__closeButton svg{fill:#fff;width:1.25rem;height:1.25rem} -`,fCe=i9();function Bte(i,e){return fCe(hCe),new o9(ue({autoFocus:"auto"},i),e)}var pCe={mounted(){let i=this.el.querySelector("[data-emoji-button]"),e=this.el.querySelector("[data-emoji-preview]"),t=this.el.querySelector("[data-emoji-input]"),r=Bte({showPreview:!1},{triggerElement:i,referenceElement:i,position:"bottom"});r.addEventListener("emoji:select",({emoji:n})=>{e.innerHTML=n,t.value=n}),i.addEventListener("click",n=>{r.toggle()})}},Hte=pCe;var mCe={mounted(){this.focus()},updated(){this.el!==document.activeElement&&this.focus()},focus(){Qd(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length,this.el.scrollLeft=this.el.scrollWidth)}},Ute=mCe;var gCe={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.initializeHeadingEl(),this.unsubscribeFromNavigationEvents=_r.subscribe("navigation",i=>{this.handleNavigationEvent(i)})},updated(){this.props=this.getProps(),this.initializeHeadingEl()},destroyed(){this.unsubscribeFromNavigationEvents()},getProps(){return Ri(this.el,["id","on-value-change","metadata"])},initializeHeadingEl(){let i=this.el.querySelector("[data-el-heading]");i!==this.headingEl&&(this.headingEl=i,this.headingEl.addEventListener("paste",e=>{e.preventDefault();let t=e.clipboardData.getData("text/plain").replace(` -`," ");document.execCommand("insertText",!1,t)}),this.headingEl.addEventListener("keydown",e=>{e.key==="Enter"&&e.preventDefault()}),this.headingEl.addEventListener("blur",e=>{setTimeout(()=>{this.isFocused&&this.insertMode&&(this.headingEl.focus(),jte(this.headingEl))},0)}))},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"&&this.handleInsertModeChanged(i.enabled)},handleElementFocused(i,e){this.props.id===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&Zd(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.el.setAttribute("phx-update","ignore"),this.headingEl.setAttribute("contenteditable",""),this.headingEl.focus(),jte(this.headingEl)):this.insertMode&&!i&&(this.insertMode=i,this.headingEl.removeAttribute("contenteditable"),this.el.removeAttribute("phx-update"),this.pushEvent(this.props.onValueChange,{value:this.headingEl.textContent.trim(),metadata:this.props.metadata}))}};function jte(i){let e=document.createRange();e.selectNodeContents(i),e.collapse(!1);let t=window.getSelection();t.removeAllRanges(),t.addRange(e)}var Wte=gCe;var bCe={mounted(){this.props=this.getProps(),this.sourceEl=mc(this.el,"[data-source]"),this.targetEl=mc(this.el,"[data-target]"),this.updateDOM()},updated(){this.props=this.getProps(),this.updateDOM()},getProps(){return Ri(this.el,["language"])},updateDOM(){let i=this.sourceEl.innerText;cm(i,this.props.language).then(e=>{this.targetEl.innerHTML=e,this.el.setAttribute("data-highlighted","")})}},Vte=bCe;var a9=["bg-yellow-100","border-yellow-300"],vCe={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.previewEl=this.el.querySelector("[data-preview]"),this.initialPreviewContentEl=this.previewEl.firstElementChild,this.cameraPreviewEl=this.el.querySelector("[data-camera-preview]"),this.cameraListEl=this.el.querySelector("[data-camera-list]"),this.cameraItemTemplateEl=this.cameraListEl.firstElementChild,this.cameraItemTemplateEl.remove(),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.openCameraButton=this.el.querySelector("[data-btn-open-camera]"),this.captureCameraButton=this.el.querySelector("[data-btn-capture-camera]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.cameraListPopulated=!1,this.cameraVideoEl=null,this.cameraStream=null,this.updateImagePreview(),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.loadFile(e),this.closeCameraView()}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...a9)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...a9)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...a9)}),this.openCameraButton.addEventListener("click",i=>{this.cameraListPopulated||(this.renderCameraList(),this.cameraListPopulated=!0)}),this.cameraListEl.addEventListener("click",i=>{let e=i.target.closest("[data-camera-id]");if(e){let t=e.dataset.cameraId;this.openCameraView(t)}}),this.captureCameraButton.addEventListener("click",i=>{let e=this.toCanvas(this.cameraVideoEl,this.cameraVideoEl.videoWidth,this.cameraVideoEl.videoHeight);this.pushImage(e),this.closeCameraView()}),this.cancelButton.addEventListener("click",i=>{this.closeCameraView()})},updated(){this.props=this.getProps(),this.updateImagePreview()},getProps(){return Ri(this.el,["id","phx-target","height","width","format","fit","image-url","value-height","value-width"])},updateImagePreview(){this.props.imageUrl?wCe(this.props.imageUrl,this.props.valueHeight,this.props.valueWidth,this.props.format).then(i=>{this.setPreview(i)}):this.setPreview(this.initialPreviewContentEl)},loadFile(i){let e=new FileReader;e.onload=t=>{let r=document.createElement("img");r.addEventListener("load",n=>{let o=this.toCanvas(r,r.width,r.height);this.pushImage(o)}),r.src=t.target.result},e.readAsDataURL(i)},openCameraView(i){this.cameraPreviewEl.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.captureCameraButton.classList.remove("hidden"),this.previewEl.classList.add("hidden"),this.openCameraButton.classList.add("hidden"),this.uploadButton.classList.add("hidden"),navigator.mediaDevices.getUserMedia(this.cameraConstraints(i)).then(e=>{this.cameraStream=e,this.cameraVideoEl=document.createElement("video"),this.cameraVideoEl.autoplay=!0,this.cameraVideoEl.playsinline=!0,this.cameraVideoEl.muted=!0,this.cameraVideoEl.srcObject=e,this.setCameraPreview(this.cameraVideoEl)}).catch(()=>{})},cameraConstraints(i){return i==="system_default"?{audio:!1,video:!0}:{audio:!1,video:{deviceId:i}}},renderCameraList(){navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then(i=>navigator.mediaDevices.enumerateDevices().then(e=>(this.stopMediaStream(i),e))).then(i=>{let e=i.filter(t=>t.kind==="videoinput").map(t=>({deviceId:t.deviceId,label:t.label}));[{deviceId:"system_default",label:"System Default"},...e].forEach(({deviceId:t,label:r})=>{let n=this.cameraItemTemplateEl.cloneNode(!0);n.querySelector("[data-camera-id]").setAttribute("data-camera-id",t),n.querySelector("[data-label]").innerHTML=r,this.cameraListEl.appendChild(n)})}).catch(i=>{console.error(i),this.openCameraButton.disabled=!0})},closeCameraView(){return this.cameraStream!==null&&(this.stopMediaStream(this.cameraStream),this.cameraStream=null),this.cameraVideoEl!==null&&(this.cameraVideoEl.remove(),this.cameraVideoEl=null),this.cameraPreviewEl.classList.add("hidden"),this.cancelButton.classList.add("hidden"),this.captureCameraButton.classList.add("hidden"),this.previewEl.classList.remove("hidden"),this.openCameraButton.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),!0},stopMediaStream(i){i.getTracks().forEach(e=>{e.stop()})},pushImage(i){_Ce(i,this.props.format).then(e=>{let t={height:i.height,width:i.width},r=new Blob([e]);r.meta=()=>t,this.uploadTo(this.props.phxTarget,"file",[r])})},toCanvas(i,e,t){let{width:r,height:n}=this.props,o=document.createElement("canvas"),s=o.getContext("2d");if(r===null&&n===null||r===e&&n===t)o.width=e,o.height=t,o.getContext("2d").drawImage(i,0,0,e,t,0,0,e,t);else if(this.props.fit==="contain"){let a=r/e,l=n/t,c=Math.min(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=d,o.height=u,s.drawImage(i,0,0,e,t,0,0,d,u)}else if(this.props.fit==="crop"){let a=r/e,l=n/t,c=Math.max(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=r,o.height=n,s.drawImage(i,Math.round((d-r)/c/2),Math.round((u-n)/c/2),e-Math.round((d-r)/c),t-Math.round((u-n)/c),0,0,r,n)}else if(this.props.fit==="pad"){let a=r/e,l=n/t,c=Math.min(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=r,o.height=n,s.fillStyle="black",s.fillRect(0,0,o.width,o.height),s.drawImage(i,0,0,e,t,Math.round((r-d)/2),Math.round((n-u)/2),d,u)}else o.width=r,o.height=n,s.drawImage(i,0,0,e,t,0,0,r,n);return o},setPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.previewEl.replaceChildren(i)},setCameraPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.cameraPreviewEl.replaceChildren(i)}};function _Ce(i,e){if(e==="png"||e==="jpeg")return new Promise((t,r)=>{i.toBlob(n=>{n.arrayBuffer().then(o=>{t(o)})},`image/${e}`)});if(e==="rgb"){let t=i.getContext("2d").getImageData(0,0,i.width,i.height),r=yCe(t);return Promise.resolve(r)}throw new Error(`Unexpected format: ${e}`)}function yCe(i){let e=i.width*i.height,t=new Uint8ClampedArray(e*3);for(let r=0;r<e;r++)t[r*3]=i.data[r*4],t[r*3+1]=i.data[r*4+1],t[r*3+2]=i.data[r*4+2];return t.buffer}function wCe(i,e,t,r){if(r==="png"||r==="jpeg"){let n=document.createElement("img");return n.src=i,Promise.resolve(n)}if(r==="rgb")return fetch(i).then(n=>n.arrayBuffer()).then(n=>{let o=document.createElement("canvas");o.height=e,o.width=t;let s=xCe(n,t,e);return o.getContext("2d").putImageData(s,0,0),o});throw new Error(`Unexpected format: ${r}`)}function xCe(i,e,t){let r=e*t,n=new Uint8Array(i),o=new Uint8ClampedArray(r*4);for(let s=0;s<r;s++)o[s*4]=n[s*3],o[s*4+1]=n[s*3+1],o[s*4+2]=n[s*3+2],o[s*4+3]=255;return new ImageData(o,e,t)}var qte=vCe;var CCe={mounted(){this.updateSrc()},updated(){this.updateSrc()},updateSrc(){let i=this.el.src,e="data:image/x-pixel;base64,",t=i.slice(e.length);if(i.startsWith(e)){let r=CQ(t),n=new DataView(r),o=n.getUint32(0,!1),s=n.getUint32(4,!1),a=n.getUint8(8),l=r.slice(9),c=SCe(l,s,o,a),d=document.createElement("canvas");d.height=o,d.width=s,d.getContext("2d").putImageData(c,0,0);let u=d.toDataURL("image/png");this.el.src=u}}};function SCe(i,e,t,r){let n=e*t,o=new Uint8Array(i),s=new Uint8ClampedArray(n*4);for(let a=0;a<n;a++)r===1?(s[a*4]=o[a],s[a*4+1]=o[a],s[a*4+2]=o[a],s[a*4+3]=255):r===2?(s[a*4]=o[a*2],s[a*4+1]=o[a*2],s[a*4+2]=o[a*2],s[a*4+3]=o[a*2+1]):r===3?(s[a*4]=o[a*3],s[a*4+1]=o[a*3+1],s[a*4+2]=o[a*3+2],s[a*4+3]=255):r===4&&(s[a*4]=o[a*4],s[a*4+1]=o[a*4+1],s[a*4+2]=o[a*4+2],s[a*4+3]=o[a*4+3]);return new ImageData(s,e,t)}var Kte=CCe;var kCe=document.querySelector("meta[name='csrf-token']").getAttribute("content"),l9=new ay(window.LIVEBOOK_BASE_URL_PATH+"/socket",{params:{_csrf_token:kCe}}),Kh=null;function $te(i){return Kh||(l9.connect(),Kh=l9.channel("js_view",{session_token:i}),Kh.join()),Kh}function Gte(){Kh&&(Kh.leave(),Kh=null,l9.disconnect())}function Yte(i,e){if(Array.isArray(e)&&e[1]&&e[1].constructor===ArrayBuffer){let[t,r]=e;return hB([i,t],r)}else return{root:[i,e]}}function c9(i){if(i.constructor===ArrayBuffer){let[[e,t],r]=fB(i);return[e,[t,r]]}else{let{root:[e,t]}=i;return[e,t]}}var Xte="wcqj5QWCo66osdAWDnEgPRFyL7nfe8oNqNggnw4vvW8=";function Qte(i,e,t){let r=ECe(e,t);return TCe(r).then(()=>{i.sandbox="allow-scripts allow-same-origin allow-downloads allow-forms allow-modals allow-popups allow-top-navigation",i.allow="accelerometer; ambient-light-sensor; camera; display-capture; encrypted-media; fullscreen; geolocation; gyroscope; microphone; midi; usb; xr-spatial-tracking; clipboard-read; clipboard-write",i.src=r})}function ECe(i,e){let t=window.location.protocol;return e?e.replace(/^https?:/,t):t==="https:"?"https://livebookusercontent.com/iframe/v5.html":`http://${window.location.hostname}:${i}/iframe/v5.html`}var d9=null;function TCe(i){return d9||(d9=fetch(i).then(e=>e.text()).then(e=>{if(wQ(e)!==Xte)throw new Error(`The iframe loaded from ${i} doesn't have the expected checksum ${Xte}`)})),d9}var ICe={mounted(){this.props=this.getProps(),this.id=f4(),this.childToken=_Q(),this.childReadyPromise=null,this.childReady=!1,this.initReceived=!1,this.syncCallbackQueue=[],this.pongCallbackQueue=[],this.initTimeout=setTimeout(()=>this.handleInitTimeout(),2e3),this.channel=$te(this.props.sessionToken),this.iframeActions=this.createIframe(),this.childReadyPromise=new Promise((n,o)=>{this._handleWindowMessage=s=>{s.source===this.iframe.contentWindow&&this.handleChildMessage(s.data,n)},window.addEventListener("message",this._handleWindowMessage)}),this.hiddenInput=document.createElement("input"),this.hiddenInput.style.display="none",this.el.appendChild(this.hiddenInput),this.iframeActions.visibilityPromise.then(()=>{this.loadIframe()});let i=this.channel.on(`init:${this.props.ref}:${this.id}`,n=>{let[,o]=c9(n);this.handleServerInit(o)}),e=this.channel.on(`event:${this.props.ref}`,n=>{let[[o],s]=c9(n);this.handleServerEvent(o,s)}),t=this.channel.on(`error:${this.props.ref}`,({message:n,init:o})=>{this.handleServerError(n,o)}),r=this.channel.on(`pong:${this.props.ref}`,()=>{this.handleServerPong()});this.unsubscribeFromChannelEvents=()=>{this.channel.off(`init:${this.props.ref}:${this.id}`,i),this.channel.off(`event:${this.props.ref}`,e),this.channel.off(`error:${this.props.ref}`,t),this.channel.off(`pong:${this.props.ref}`,r)},this.unsubscribeFromJSViewEvents=_r.subscribe(`js_views:${this.props.ref}`,n=>this.handleJSViewEvent(n)),this.channel.push("connect",{connect_token:this.props.connectToken,ref:this.props.ref,id:this.id},3e4),this.unsubscribeFromCellEvents=_r.subscribe("navigation",n=>this.handleNavigationEvent(n))},updated(){this.props=this.getProps(this)},disconnected(){this.el.removeAttribute("id")},destroyed(){window.removeEventListener("message",this._handleWindowMessage),this.iframeActions.remove(),this.unsubscribeFromChannelEvents(),this.channel.push("disconnect",{ref:this.props.ref}),this.unsubscribeFromJSViewEvents(),this.unsubscribeFromCellEvents()},getProps(){return Ri(this.el,["ref","assets-base-path","assets-cdn-url","js-path","session-token","connect-token","iframe-port","iframe-url","timeout-message"])},createIframe(){this.iframePlaceholder=document.createElement("div"),this.el.appendChild(this.iframePlaceholder),this.iframe=document.createElement("iframe"),this.iframe.className="w-full h-0 absolute z-[1]";let i=document.querySelector("[data-el-notebook]"),e=i.querySelector("[data-el-notebook-content]"),t=new ResizeObserver(a=>{this.repositionIframe()});t.observe(e),t.observe(i);let r=_r.subscribe("js_views",a=>{a.type==="reposition"&&this.repositionIframe()});this.iframe.addEventListener("mouseenter",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0}))}),this.iframe.addEventListener("mouseleave",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0}))});let n=null,o=new Promise((a,l)=>{oN(this.iframePlaceholder)?a():(n=new IntersectionObserver(c=>{oN(this.iframePlaceholder)&&(n.disconnect(),a())}),n.observe(this.iframePlaceholder))});return this.iframe.toggleAttribute("data-js-focused",!!this.el.closest("[data-js-focused]")),{visibilityPromise:o,remove:()=>{t.disconnect(),r(),n&&n.disconnect(),this.iframe.remove(),this.iframePlaceholder.remove()}}},repositionIframe(){let{iframe:i,iframePlaceholder:e}=this,t=document.querySelector("[data-el-notebook]");if(Xd(e))i.classList.add("hidden");else{i.classList.remove("hidden");let r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=n.top-r.top+t.scrollTop;i.style.top=`${o}px`;let s=n.left-r.left+t.scrollLeft;i.style.left=`${s}px`,i.style.height=`${n.height}px`,i.style.width=`${n.width}px`}},loadIframe(){let i=document.querySelector("[data-el-js-view-iframes]");Qte(this.iframe,this.props.iframePort,this.props.iframeUrl).then(()=>{i.appendChild(this.iframe)})},handleChildMessage(i,e){if(i.type==="ready"&&!this.childReady)this.getAssetsBaseUrl().then(t=>{this.postMessage({type:"readyReply",token:this.childToken,baseUrl:t,jsPath:this.props.jsPath}),this.childReady=!0,e()});else{if(i.token!==this.childToken)throw new Error("Token mismatch");if(i.type==="resize")this.iframePlaceholder.style.height=`${i.height}px`,this.iframe.style.height=`${i.height}px`;else if(i.type==="domEvent"){let t=this.replicateDomEvent(i.event);i.isTargetEditable?this.hiddenInput.dispatchEvent(t):this.el.dispatchEvent(t)}else if(i.type==="event"){let{event:t,payload:r}=i,n=Yte([t,this.props.ref],r);this.channel.push("event",n)}else i.type==="syncReply"?(this.pongCallbackQueue.push(this.syncCallbackQueue.shift()),this.channel.push("ping",{ref:this.props.ref})):i.type==="selectSecret"?this.pushEvent("select_secret",{js_view_ref:this.props.ref,preselect_name:i.preselectName,options:i.options}):i.type==="setSmartCellEditorIntellisenseNode"&&this.pushEvent("set_smart_cell_editor_intellisense_node",{js_view_ref:this.props.ref,node:i.node,cookie:i.cookie})}},getAssetsBaseUrl(){return v3().then(i=>!i&&this.props.assetsCdnUrl?this.props.assetsCdnUrl:window.location.origin+this.props.assetsBasePath)},postMessage(i){this.iframe.contentWindow.postMessage(i,"*")},replicateDomEvent(i){if(i.type==="focus")return new FocusEvent("focus");if(i.type==="mousedown")return new MouseEvent("mousedown",{bubbles:!0});if(i.type==="keydown")return new KeyboardEvent(i.type,i.props)},handleInitTimeout(){this.initTimeoutContainer=document.createElement("div"),this.initTimeoutContainer.classList.add("info-box"),this.el.prepend(this.initTimeoutContainer),this.initTimeoutContainer.textContent=this.props.timeoutMessage},clearInitTimeout(){clearTimeout(this.initTimeout),this.initTimeoutContainer&&this.initTimeoutContainer.remove()},handleServerInit(i){this.clearInitTimeout(),this.initReceived=!0,this.childReadyPromise.then(()=>{this.postMessage({type:"init",data:i})})},handleServerEvent(i,e){this.initReceived&&this.childReadyPromise.then(()=>{this.postMessage({type:"event",event:i,payload:e})})},handleServerError(i,e){e&&this.clearInitTimeout(),this.errorContainer||(this.errorContainer=document.createElement("div"),this.errorContainer.classList.add("error-box","mb-4"),this.el.prepend(this.errorContainer)),this.errorContainer.textContent=i},handleServerPong(){this.pongCallbackQueue.shift()()},handleJSViewEvent(i){i.type==="sync"?(this.syncCallbackQueue.push(i.callback),this.postMessage({type:"sync"})):i.type=="secretSelected"&&this.postMessage({type:"secretSelected",secretName:i.secretName})},handleNavigationEvent(i){if(i.type==="element_focused"){let e=this.el.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null;this.iframe.toggleAttribute("data-js-focused",t===i.focusableId)}}};function v3(){return v3.promise=v3.promise||fetch("/public/health").then(i=>i.status===200).catch(i=>!1),v3.promise}var Zte=ICe;var LCe={mounted(){this.props=this.getProps(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentKeyUp=this.handleDocumentKeyUp.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),window.addEventListener("keydown",this._handleDocumentKeyDown,!0),window.addEventListener("keyup",this._handleDocumentKeyUp,!0),window.addEventListener("focus",this._handleDocumentFocus,!0)},updated(){this.props=this.getProps()},destroyed(){window.removeEventListener("keydown",this._handleDocumentKeyDown,!0),window.removeEventListener("keyup",this._handleDocumentKeyUp,!0),window.removeEventListener("focus",this._handleDocumentFocus,!0)},getProps(){return Ri(this.el,["cell-id","default-handlers","keydown-enabled","keyup-enabled","target"])},handleDocumentKeyDown(i){if(this.isKeyboardToggle(i)&&!Qd(document.activeElement)){el(i),this.keyboardEnabled()?this.disableKeyboard():this.enableKeyboard();return}if(this.keyboardEnabled()){if(this.props.defaultHandlers!=="on"&&el(i),i.repeat)return;if(this.props.keydownEnabled){let{key:e}=i;this.pushEventTo(this.props.target,"keydown",{key:e})}}},handleDocumentKeyUp(i){if(this.keyboardEnabled()&&(this.props.defaultHandlers!=="on"&&el(i),this.props.keyupEnabled)){let{key:e}=i;this.pushEventTo(this.props.target,"keyup",{key:e})}},handleDocumentFocus(i){this.props.keydownEnabled&&Qd(i.target)&&this.disableKeyboard()},enableKeyboard(){this.keyboardEnabled()||this.pushEventTo(this.props.target,"enable_keyboard",{})},disableKeyboard(){this.keyboardEnabled()&&this.pushEventTo(this.props.target,"disable_keyboard",{})},keyboardEnabled(){return this.props.keydownEnabled||this.props.keyupEnabled},isKeyboardToggle(i){if(i.repeat)return!1;let{metaKey:e,ctrlKey:t,key:r}=i;return(h4()?e:t)&&r==="k"&&this.isCellFocused()?!this.keyboardEnabled()||["on","disable_only"].includes(this.props.defaultHandlers):!1},isCellFocused(){let i=this.el.closest("[data-el-session]");return i&&i.getAttribute("data-js-focused-id")===this.props.cellId}},Jte=LCe;var ACe={mounted(){this.props=this.getProps(),this.templateEl=mc(this.el,"[data-template]"),this.contentEl=mc(this.el,"[data-content]"),this.markdown=new b4(this.contentEl,this.templateEl.textContent,{baseUrl:this.props.basePath,allowedUriSchemes:this.props.allowedUriSchemes})},updated(){this.props=this.getProps(),this.markdown.setContent(this.templateEl.textContent)},getProps(){return Ri(this.el,["base-path","allowed-uri-schemes"])}},eie=ACe;var DCe={mounted(){this.scroll()},updated(){this.scroll()},scroll(){iv(this.el)}},tie=DCe;var u9=class{constructor(e=2e3){this.resetTimeout=e,this.buffer=[],this.resetTimeoutId=null}push(e){this.buffer.push(e),this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=setTimeout(()=>{this.reset()},this.resetTimeout)}reset(){this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=null,this.buffer=[]}tryMatch(e){if(e.length>this.buffer.length)return!1;let t=this.buffer.slice(-e.length),r=e.every((n,o)=>n===t[o]);return r&&this.reset(),r}},iie=u9;var MCe={mounted(){this.props=this.getProps(),this.focusedId=null,this.insertMode=!1,this.view=null,this.viewOptions=null,this.keyBuffer=new iie,this.clientsMap={},this.lastLocationReportByClientId={},this.followedClientId=null,m4(this.faviconForEvaluationStatus(this.props.globalStatus)),this.updateSectionListHighlight(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),this._handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("keydown",this._handleDocumentKeyDown,!0),document.addEventListener("mousedown",this._handleDocumentMouseDown),document.addEventListener("focus",this._handleDocumentFocus,!0),document.addEventListener("click",this._handleDocumentClick),this.getElement("sections-list").addEventListener("click",i=>{this.handleSectionsListClick(i),this.handleCellIndicatorsClick(i)}),this.getElement("clients-list").addEventListener("click",i=>this.handleClientsListClick(i)),this.getElement("sections-list-toggle").addEventListener("click",i=>this.toggleSectionsList()),this.getElement("clients-list-toggle").addEventListener("click",i=>this.toggleClientsList()),this.getElement("secrets-list-toggle").addEventListener("click",i=>this.toggleSecretsList()),this.getElement("runtime-info-toggle").addEventListener("click",i=>this.toggleRuntimeInfo()),this.getElement("app-info-toggle").addEventListener("click",i=>this.toggleAppInfo()),this.getElement("files-list-toggle").addEventListener("click",i=>this.toggleFilesList()),this.getElement("notebook").addEventListener("scroll",i=>this.updateSectionListHighlight()),this.getElement("notebook-indicators").addEventListener("click",i=>this.handleCellIndicatorsClick(i)),this.getElement("views").addEventListener("click",i=>{this.handleViewsClick(i)}),this.getElement("section-toggle-collapse-all-button").addEventListener("click",i=>this.toggleCollapseAllSections()),this.initializeDragAndDrop(),window.addEventListener("phx:page-loading-stop",()=>{this.initializeFocus()},{once:!0}),this.handleEvent("session_init",({clients:i})=>{i.forEach(e=>{this.clientsMap[e.id]=e})}),this.handleEvent("cell_inserted",({cell_id:i})=>{this.handleCellInserted(i)}),this.handleEvent("cell_deleted",({cell_id:i,sibling_cell_id:e})=>{this.handleCellDeleted(i,e)}),this.handleEvent("cell_restored",({cell_id:i})=>{this.handleCellRestored(i)}),this.handleEvent("cell_moved",({cell_id:i})=>{this.handleCellMoved(i)}),this.handleEvent("section_inserted",({section_id:i})=>{this.handleSectionInserted(i)}),this.handleEvent("section_deleted",({section_id:i})=>{this.handleSectionDeleted(i)}),this.handleEvent("section_moved",({section_id:i})=>{this.handleSectionMoved(i)}),this.handleEvent("cell_upload",({cell_id:i,url:e})=>{this.handleCellUpload(i,e)}),this.handleEvent("client_joined",({client:i})=>{this.handleClientJoined(i)}),this.handleEvent("client_left",({client_id:i})=>{this.handleClientLeft(i)}),this.handleEvent("clients_updated",({clients:i})=>{this.handleClientsUpdated(i)}),this.handleEvent("secret_selected",({select_secret_ref:i,secret_name:e})=>{this.handleSecretSelected(i,e)}),this.handleEvent("location_report",({client_id:i,focusable_id:e,selection:t})=>{let r={focusableId:e,selection:this.decodeSelection(t)};this.handleLocationReport(i,r)}),this.unsubscribeFromSessionEvents=_r.subscribe("session",i=>{this.handleSessionEvent(i)})},updated(){let i=this.props;this.props=this.getProps(),this.props.globalStatus!==i.globalStatus&&m4(this.faviconForEvaluationStatus(this.props.globalStatus))},disconnected(){this.el.removeAttribute("id"),this.keepChannel=!0},destroyed(){this.unsubscribeFromSessionEvents(),document.removeEventListener("keydown",this._handleDocumentKeyDown,!0),document.removeEventListener("mousedown",this._handleDocumentMouseDown),document.removeEventListener("focus",this._handleDocumentFocus,!0),document.removeEventListener("click",this._handleDocumentClick),m4("favicon"),this.keepChannel||Gte()},getProps(){return Ri(this.el,["autofocus-cell-id","global-status"])},faviconForEvaluationStatus(i){return i==="evaluating"?"favicon-evaluating":i==="stale"?"favicon-stale":i==="errored"?"favicon-errored":"favicon"},handleDocumentKeyDown(i){if(i.repeat)return;let e=h4()?i.metaKey:i.ctrlKey,t=i.altKey,r=i.shiftKey,n=i.key,o=this.keyBuffer;if(!(Qd(i.target)&&i.target.closest("[data-el-outputs-container]"))){if(e&&r&&!t&&n==="Enter"){el(i),this.queueFullCellsEvaluation(!0);return}else if(!e&&r&&!t&&n==="Enter"){el(i),Fh(this.focusedCellType())&&this.queueFocusedCellEvaluation(),this.moveFocus(1);return}else if(e&&!t&&n==="Enter"){el(i),Fh(this.focusedCellType())&&this.queueFocusedCellEvaluation();return}else if(e&&n==="s"){el(i),this.saveNotebook();return}else if(e||t)return}this.insertMode?(o.reset(),n==="Escape"&&(this.escapesMonacoWidget(i)||this.escapeInsertMode())):Qd(i.target)?(o.reset(),n==="Escape"&&i.target.blur()):(o.push(i.key),o.tryMatch(["d","d"])?this.deleteFocusedCell():o.tryMatch(["e","a"])?this.queueFullCellsEvaluation(!1):o.tryMatch(["e","e"])?Fh(this.focusedCellType())&&this.queueFocusedCellEvaluation():o.tryMatch(["e","s"])?this.queueFocusedSectionEvaluation():o.tryMatch(["s","s"])?this.toggleSectionsList():o.tryMatch(["s","e"])?this.toggleSecretsList():o.tryMatch(["s","a"])?this.toggleAppInfo():o.tryMatch(["s","u"])?this.toggleClientsList():o.tryMatch(["s","f"])?this.toggleFilesList():o.tryMatch(["s","r"])?this.toggleRuntimeInfo():o.tryMatch(["s","b"])?this.showBin():o.tryMatch(["s","p"])?this.showPackageSearch():o.tryMatch(["e","x"])?this.cancelFocusedCellEvaluation():o.tryMatch(["0","0"])?this.reconnectRuntime():o.tryMatch(["Escape","Escape"])?this.setFocusedEl(null):o.tryMatch(["?"])?this.showShortcuts():o.tryMatch(["i"])||i.target.matches("body, [data-el-cell-body], [data-el-heading], [data-focusable-id]")&&this.focusedId&&n==="Enter"?(el(i),this.isInsertModeAvailable()&&this.enterInsertMode()):o.tryMatch(["j"])?this.moveFocus(1):o.tryMatch(["k"])?this.moveFocus(-1):o.tryMatch(["J"])?this.moveFocusedCell(1):o.tryMatch(["K"])?this.moveFocusedCell(-1):o.tryMatch(["n"])?this.insertCellBelowFocused("code"):o.tryMatch(["N"])?this.insertCellAboveFocused("code"):o.tryMatch(["m"])?(!this.view||this.viewOptions.showMarkdown)&&this.insertCellBelowFocused("markdown"):o.tryMatch(["M"])?(!this.view||this.viewOptions.showMarkdown)&&this.insertCellAboveFocused("markdown"):o.tryMatch(["v","z"])?this.toggleView("code-zen"):o.tryMatch(["v","p"])?this.toggleView("presentation"):o.tryMatch(["v","c"])?this.toggleView("custom"):o.tryMatch(["c"])?(!this.view||this.viewOptions.showSection)&&this.toggleCollapseSection():o.tryMatch(["C"])&&(!this.view||this.viewOptions.showSection)&&this.toggleCollapseAllSections())},escapesMonacoWidget(i){if(i.target.closest(".monaco-inputbox"))return!0;let e=i.target.closest(".monaco-editor.focused");return e?!!(e.querySelector(".editor-widget.parameter-hints-widget.visible")||e.querySelector(".editor-widget.suggest-widget.visible")||e.querySelectorAll(".cursor").length>1||["insert","visual"].includes(e.dataset.vimMode)):!1},handleDocumentMouseDown(i){if(!i.target.closest("[data-el-notebook]")||i.target.closest(".doctest-details-widget")){this.insertMode&&this.setInsertMode(!1);return}if(i.target.closest("[data-el-insert-buttons] button"))return;let e=i.target.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null,r=this.editableElementClicked(i,e);t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1}),!i.target.closest("[data-el-actions]")&&this.insertMode!==r&&this.setInsertMode(r)},editableElementClicked(i,e){if(e){let t=i.target.closest("[data-el-editor-container], [data-el-heading]");return t&&e.contains(t)}return!1},handleDocumentFocus(i){let e=i.target.closest&&i.target.closest("[data-focusable-id]");if(e){let t=e.dataset.focusableId;t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1})}},handleDocumentClick(i){i.target.closest("[data-el-enable-insert-mode-button]")&&this.setInsertMode(!0),i.target.closest("[data-btn-package-search]")&&this.insertMode&&this.setInsertMode(!1);let e=i.target.closest("[data-el-queue-cell-evaluation-button]");if(e){let r=e.getAttribute("data-cell-id"),n=e.hasAttribute("data-disable-dependencies-cache");this.queueCellEvaluation(r,n)}let t=window.location.hash;if(t){let r=t.replace(/^#/,"");!document.getElementById(r).contains(i.target)&&!i.target.closest("a")&&history.pushState(null,document.title,window.location.pathname+window.location.search)}},handleSectionsListClick(i){let e=i.target.closest("[data-el-sections-list-item]");if(e){let t=e.getAttribute("data-section-id");this.getSectionById(t).scrollIntoView({behavior:"smooth",block:"start"})}},handleClientsListClick(i){let e=i.target.closest("[data-el-clients-list-item]");if(e){let t=e.getAttribute("data-client-id");i.target.closest("[data-el-client-link]")&&this.handleClientLinkClick(t),i.target.closest("[data-el-client-follow-toggle]")&&this.handleClientFollowToggleClick(t,e)}},handleClientLinkClick(i){this.mirrorClientFocus(i)},handleClientFollowToggleClick(i,e){let t=this.el.querySelector("[data-el-clients-list-item][data-js-followed]");t&&t.removeAttribute("data-js-followed"),i===this.followedClientId?this.followedClientId=null:(e.setAttribute("data-js-followed",""),this.followedClientId=i,this.mirrorClientFocus(i))},mirrorClientFocus(i){let e=this.lastLocationReportByClientId[i];e&&e.focusableId&&this.setFocusedEl(e.focusableId)},handleCellIndicatorsClick(i){let e=i.target.closest("[data-el-focus-cell-button]");if(e){let t=e.getAttribute("data-target");this.setFocusedEl(t)}},initializeFocus(){let i=window.location.hash;if(i){let e=i.replace(/^#/,""),t=document.getElementById(e);if(t){let r=t.closest("[data-focusable-id]");r?this.setFocusedEl(r.dataset.focusableId):t.scrollIntoView()}}else this.props.autofocusCellId&&(this.setFocusedEl(this.props.autofocusCellId,{scroll:!1}),this.setInsertMode(!0))},updateSectionListHighlight(){let i=this.el.querySelector("[data-el-sections-list-item][data-js-is-viewed]");i&&i.removeAttribute("data-js-is-viewed");let e=this.getSections().reverse().find(t=>{let{top:r}=t.getBoundingClientRect(),n=document.documentElement.scrollTop;return r<=n+window.innerHeight*.35});if(e){let t=e.getAttribute("data-section-id");this.el.querySelector(`[data-el-sections-list-item][data-section-id="${t}"]`).setAttribute("data-js-is-viewed","")}},initializeDragAndDrop(){let i=!1,e=null,t=null,r=(o=null)=>{if(!i){i=!0,e=o;let s=o?"internal":"external";this.el.setAttribute("data-js-dragging",s),s==="external"&&this.toggleFilesList(!0)}},n=()=>{i&&(i=!1,this.el.removeAttribute("data-js-dragging"))};this.el.addEventListener("dragstart",o=>{r(o.target)}),this.el.addEventListener("dragenter",o=>{r()}),this.el.addEventListener("dragleave",o=>{this.el.contains(o.relatedTarget)||n()}),this.el.addEventListener("dragover",o=>{o.stopPropagation(),o.preventDefault()}),this.el.addEventListener("drop",o=>{o.stopPropagation(),o.preventDefault();let s=o.target.closest("[data-el-insert-drop-area]"),a=o.target.closest("[data-el-files-drop-area]");if(s){let l=s.getAttribute("data-section-id")||null,c=s.getAttribute("data-cell-id")||null;if(o.dataTransfer.files.length>0)t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{section_id:l,cell_id:c});else if(e&&e.matches("[data-el-file-entry]")){let d=e.getAttribute("data-name");this.pushEvent("insert_file",{file_entry_name:d,section_id:l,cell_id:c})}}else a&&o.dataTransfer.files.length>0&&(t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{}));n()}),this.handleEvent("finish_file_drop",o=>{let s=document.querySelector('#add-file-entry-modal input[type="file"]');s&&(s.files=t,s.dispatchEvent(new Event("change",{bubbles:!0})))})},toggleSectionsList(i=null){this.toggleSidePanelContent("sections-list",i)},toggleClientsList(i=null){this.toggleSidePanelContent("clients-list",i)},toggleSecretsList(i=null){this.toggleSidePanelContent("secrets-list",i)},toggleAppInfo(i=null){this.toggleSidePanelContent("app-info",i)},toggleFilesList(i=null){this.toggleSidePanelContent("files-list",i)},toggleRuntimeInfo(i=null){this.toggleSidePanelContent("runtime-info",i)},toggleSidePanelContent(i,e=null){(e===null?this.el.getAttribute("data-js-side-panel-content")!==i:e)?this.el.setAttribute("data-js-side-panel-content",i):this.el.removeAttribute("data-js-side-panel-content")},showBin(){let i=this.el.querySelector("[data-btn-show-bin]");i&&i.click()},showPackageSearch(){this.setFocusedEl("setup");let i=this.el.querySelector("[data-btn-package-search]");i&&i.click()},saveNotebook(){this.pushEvent("save",{})},deleteFocusedCell(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("delete_cell",{cell_id:this.focusedId})},queueCellEvaluation(i,e){this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:i,disable_dependencies_cache:e})})},queueFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:this.focusedId})})},queueFullCellsEvaluation(i){let e=i&&this.focusedId&&this.isCell(this.focusedId)?[this.focusedId]:[];this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_full_evaluation",{forced_cell_ids:e})})},queueFocusedSectionEvaluation(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);i&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_section_evaluation",{section_id:i})})}},dispatchQueueEvaluation(i){Fh(this.focusedCellType())?_r.broadcast(`cells:${this.focusedId}`,{type:"dispatch_queue_evaluation",dispatch:i}):i()},cancelFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("cancel_cell_evaluation",{cell_id:this.focusedId})},reconnectRuntime(){this.pushEvent("reconnect_runtime",{})},showShortcuts(){let i=this.el.querySelector("[data-btn-show-shortcuts]");i&&i.click()},isInsertModeAvailable(){if(!this.focusedId)return!1;let i=this.getFocusableEl(this.focusedId);return!this.isCell(this.focusedId)||!i.hasAttribute("data-js-insert-mode-disabled")},enterInsertMode(){this.focusedId&&this.setInsertMode(!0)},escapeInsertMode(){this.setInsertMode(!1)},moveFocus(i){let e=this.nearbyFocusableId(this.focusedId,i);this.setFocusedEl(e)},moveFocusedCell(i){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("move_cell",{cell_id:this.focusedId,offset:i})},insertCellBelowFocused(i){if(this.focusedId)this.insertCellBelowFocusableId(this.focusedId,i);else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[e.length-1],i)}},insertCellAboveFocused(i){if(this.focusedId){let e=this.nearbyFocusableId(this.focusedId,-1);this.insertCellBelowFocusableId(e,i)}else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[0],i)}},insertCellBelowFocusableId(i,e){if(this.isCell(i))this.pushEvent("insert_cell_below",{type:e,cell_id:i});else if(this.isSection(i))this.pushEvent("insert_cell_below",{type:e,section_id:i});else if(this.isNotebook(i)){let t=this.getSectionIds();t.length>0&&this.pushEvent("insert_cell_below",{type:e,section_id:t[0]})}},setFocusedEl(i,{scroll:e=!0,focusElement:t=!0}={}){if(this.focusedId=i,i?this.el.setAttribute("data-js-focused-id",i):this.el.removeAttribute("data-js-focused-id"),i){if(!this.isSection(i)){let n=this.getSectionIdByFocusableId(i);n&&this.getSectionById(n).removeAttribute("data-js-collapsed")}let r=this.getFocusableEl(i);t&&(r.querySelector("[data-el-cell-body]")||r.querySelector("[data-el-heading]")||r).focus({preventScroll:!0})}_r.broadcast("navigation",{type:"element_focused",focusableId:i,scroll:e}),this.setInsertMode(!1)},setInsertMode(i){this.insertMode=i,i?this.el.setAttribute("data-js-insert-mode",""):(this.el.removeAttribute("data-js-insert-mode"),this.sendLocationReport({focusableId:this.focusedId,selection:null})),_r.broadcast("navigation",{type:"insert_mode_changed",enabled:i})},handleViewsClick(i){let e=i.target.closest("[data-el-view-toggle]");if(e){let t=e.getAttribute("data-el-view-toggle");this.toggleView(t)}},toggleView(i){i===this.view?(this.unsetView(),i==="custom"&&this.unsubscribeCustomViewFromSettings()):i==="code-zen"?this.setView(i,{showSection:!1,showMarkdown:!1,showOutput:!0,spotlight:!1}):i==="presentation"?this.setView(i,{showSection:!0,showMarkdown:!0,showOutput:!0,spotlight:!0}):i==="custom"&&(this.unsubscribeCustomViewFromSettings=nr.getAndSubscribe(t=>{this.setView(i,{showSection:t.custom_view_show_section,showMarkdown:t.custom_view_show_markdown,showOutput:t.custom_view_show_output,spotlight:t.custom_view_spotlight})}),this.pushEvent("open_custom_view_settings"));let e=this.focusedId||this.nearbyFocusableId(null,0);if(e){let t=this.ensureVisibleFocusableEl(e);t!==this.focused&&this.setFocusedEl(t,{scroll:!1}),t&&this.getFocusableEl(t).scrollIntoView({block:"center"})}},setView(i,e){this.view=i,this.viewOptions=e,this.el.setAttribute("data-js-view",i),this.el.toggleAttribute("data-js-hide-section",!e.showSection),this.el.toggleAttribute("data-js-hide-markdown",!e.showMarkdown),this.el.toggleAttribute("data-js-hide-output",!e.showOutput),this.el.toggleAttribute("data-js-spotlight",e.spotlight)},unsetView(){this.view=null,this.viewOptions=null,this.el.removeAttribute("data-js-view"),this.el.removeAttribute("data-js-hide-section"),this.el.removeAttribute("data-js-hide-markdown"),this.el.removeAttribute("data-js-hide-output"),this.el.removeAttribute("data-js-spotlight")},toggleCollapseSection(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);if(i){let e=this.getSectionById(i);e.hasAttribute("data-js-collapsed")?e.removeAttribute("data-js-collapsed"):(e.setAttribute("data-js-collapsed",""),this.setFocusedEl(i,{scroll:!0}))}}},toggleCollapseAllSections(){let i=this.getSections().every(e=>e.hasAttribute("data-js-collapsed"));if(this.getSections().forEach(e=>{e.toggleAttribute("data-js-collapsed",!i)}),this.focusedId){let e=this.getSectionIdByFocusableId(this.focusedId);e&&this.setFocusedEl(e,{scroll:!0})}},handleCellInserted(i){this.setFocusedEl(i),AQ(this.focusedCellType())&&this.setInsertMode(!0)},handleCellDeleted(i,e){if(this.focusedId===i)if(this.view){let t=this.ensureVisibleFocusableEl(e);this.setFocusedEl(t)}else this.setFocusedEl(e)},handleCellRestored(i){this.setFocusedEl(i)},handleCellMoved(i){this.repositionJSViews(),this.focusedId===i&&_r.broadcast("cells",{type:"cell_moved",cellId:i})},handleSectionInserted(i){let t=this.getSectionById(i).querySelector("[data-el-section-headline]"),{focusableId:r}=t.dataset;this.setFocusedEl(r),this.setInsertMode(!0),mQ(document.activeElement)},handleSectionDeleted(i){this.focusedId&&!this.getFocusableEl(this.focusedId)&&this.setFocusedEl(null)},handleSectionMoved(i){this.repositionJSViews();let e=this.getSectionById(i);Zd(e)},handleCellUpload(i,e){this.focusedId!==i&&this.setFocusedEl(i),this.insertMode||this.setInsertMode(!0),_r.broadcast("cells",{type:"cell_upload",cellId:i,url:e})},handleClientJoined(i){this.clientsMap[i.id]=i},handleClientLeft(i){let e=this.clientsMap[i];e&&(delete this.clientsMap[i],this.broadcastLocationReport(e,{focusableId:null,selection:null}),e.id===this.followedClientId&&(this.followedClientId=null))},handleClientsUpdated(i){i.forEach(e=>{this.clientsMap[e.id]=e})},handleSecretSelected(i,e){_r.broadcast(`js_views:${i}`,{type:"secretSelected",secretName:e})},handleLocationReport(i,e){let t=this.clientsMap[i];this.lastLocationReportByClientId[i]=e,t&&(this.broadcastLocationReport(t,e),t.id===this.followedClientId&&e.focusableId!==this.focusedId&&this.setFocusedEl(e.focusableId))},handleSessionEvent(i){i.type==="cursor_selection_changed"&&this.sendLocationReport({focusableId:i.focusableId,selection:i.selection})},repositionJSViews(){_r.broadcast("js_views",{type:"reposition"})},broadcastLocationReport(i,e){_r.broadcast("navigation",{type:"location_report",client:i,report:e})},sendLocationReport(i){Object.keys(this.clientsMap).length>1&&this.pushEvent("location_report",{focusable_id:i.focusableId,selection:this.encodeSelection(i.selection)})},encodeSelection(i){if(i===null)return null;let{tag:e,editorSelection:t}=i;return[e,t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn]},decodeSelection(i){if(i===null)return null;let[e,t,r,n,o]=i,s=new ui.Selection(t,r,n,o);return{tag:e,editorSelection:s}},focusedCellType(){return this.focusedId&&this.isCell(this.focusedId)?this.getFocusableEl(this.focusedId).getAttribute("data-type"):null},nearbyFocusableId(i,e){let t=this.getFocusableIds();if(t.length===0)return null;let r=t.indexOf(i);if(r===-1){let n=this.getFocusableEls().find(nN);return n?n.getAttribute("data-focusable-id"):t[0]}else{let n=fQ(r+e,0,t.length-1);return t[n]}},ensureVisibleFocusableEl(i){let e=this.getFocusableEl(i),t=Array.from(this.el.querySelectorAll("[data-focusable-id]")),r=t.indexOf(e),n=[...t.slice(r,-1),...t.slice(0,r).reverse()].find(o=>!Xd(o));return n&&n.getAttribute("data-focusable-id")},isCell(i){return this.getFocusableEl(i).hasAttribute("data-el-cell")},isSection(i){return this.getFocusableEl(i).hasAttribute("data-el-section-headline")},isNotebook(i){return this.getFocusableEl(i).hasAttribute("data-el-notebook-headline")},getFocusableEl(i){return this.el.querySelector(`[data-focusable-id="${i}"]`)},getFocusableEls(){return Array.from(this.el.querySelectorAll("[data-focusable-id]")).filter(i=>!Xd(i))},getFocusableIds(){return this.getFocusableEls().map(i=>i.getAttribute("data-focusable-id"))},getSectionIdByFocusableId(i){let t=this.getFocusableEl(i).closest("[data-el-section]");return t&&t.getAttribute("data-section-id")},getSectionIds(){return this.getSections().map(e=>e.getAttribute("data-section-id"))},getSections(){return Array.from(this.el.querySelectorAll("[data-el-section]"))},getSectionById(i){return this.el.querySelector(`[data-el-section][data-section-id="${i}"]`)},getElement(i){return this.el.querySelector(`[data-el-${i}]`)}},rie=MCe;var NCe={mounted(){this.autosize(),this.el.addEventListener("input",i=>{this.autosize()})},updated(){this.autosize()},autosize(){this.el.style.height="0px",this.el.style.height=`${this.el.scrollHeight+2}px`}},nie=NCe;var RCe=100,PCe={mounted(){this.props=this.getProps(),this.interval=setInterval(()=>this.updateDOM(),RCe)},updated(){this.props=this.getProps(),this.updateDOM()},destroyed(){clearInterval(this.interval)},getProps(){return Ri(this.el,["start"])},updateDOM(){let e=(Date.now()-new Date(this.props.start))/1e3;this.el.innerHTML=`${e.toFixed(1)}s`}},oie=PCe;var sie="lb:user_data";function aie(i){let e=JSON.stringify(i),t=bQ(e);FCe(sie,t,15768e4)}function lie(){let i=OCe(sie);if(i){let e=vQ(i);return JSON.parse(e)}else return null}function OCe(i){let e=document.cookie.split("; ").find(t=>t.startsWith(`${i}=`));return e?e.replace(`${i}=`,""):null}function FCe(i,e,t){let r=`${i}=${e};max-age=${t};path=/${g4()}`;document.cookie=r}var zCe={mounted(){this.el.addEventListener("submit",i=>{let e=this.el.user_form_name.value,t=this.el.user_form_hex_color.value;aie({name:e,hex_color:t})})}},cie=zCe;var BCe={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.datetimeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return Ri(this.el,["utc-value","utc-min","utc-max","phx-target"])},updateAttrs(){this.el.value=this.datetimeUtcToLocal(this.props.utcValue),this.el.min=this.datetimeUtcToLocal(this.props.utcMin),this.el.max=this.datetimeUtcToLocal(this.props.utcMax)},datetimeUtcToLocal(i){if(!i)return null;let e=new Date(i+"Z"),t=e.getFullYear().toString(),r=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0");return`${t}-${r}-${n}T${o}:${s}:${a}`},datetimeLocalToUtc(i){if(!i)return null;let e=new Date(i),t=e.getUTCFullYear().toString(),r=(e.getUTCMonth()+1).toString().padStart(2,"0"),n=e.getUTCDate().toString().padStart(2,"0"),o=e.getUTCHours().toString().padStart(2,"0"),s=e.getUTCMinutes().toString().padStart(2,"0"),a=e.getUTCSeconds().toString().padStart(2,"0");return`${t}-${r}-${n}T${o}:${s}:${a}`}},die=BCe;var HCe={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.timeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return Ri(this.el,["utc-value","utc-min","utc-max","phx-target"])},updateAttrs(){this.el.value=this.timeUtcToLocal(this.props.utcValue),this.el.min=this.timeUtcToLocal(this.props.utcMin),this.el.max=this.timeUtcToLocal(this.props.utcMax)},timeUtcToLocal(i){if(!i)return null;let e=new Date;e.setUTCHours(...i.split(":"));let t=e.getHours().toString().padStart(2,"0"),r=e.getMinutes().toString().padStart(2,"0"),n=e.getSeconds().toString().padStart(2,"0");return`${t}:${r}:${n}`},timeLocalToUtc(i){if(!i)return null;let e=new Date;e.setHours(...i.split(":"));let t=e.getUTCHours().toString().padStart(2,"0"),r=e.getUTCMinutes().toString().padStart(2,"0"),n=e.getUTCSeconds().toString().padStart(2,"0");return`${t}:${r}:${n}`}},uie=HCe;var pie=Wn(fie());var UCe={mounted(){this.props=this.getProps(),this.lineHeight=pQ(this.el),this.templateEl=mc(this.el,"[data-template]"),this.contentEl=mc(this.el,"[data-content]"),this.capLines();let i=this.hyperListConfig();this.virtualizedList=new pie.default(this.contentEl,i),this.props.follow&&iv(this.contentEl)},updated(){this.props=this.getProps(),this.capLines();let i=this.props.follow&&gQ(this.contentEl),e=this.hyperListConfig();this.virtualizedList.refresh(this.contentEl,e),i&&iv(this.contentEl)},getProps(){return Ri(this.el,["max-height","follow","max-lines","ignore-trailing-empty-line"])},hyperListConfig(){let i=this.getLineElements(),e=i.length,t=Math.min(this.props.maxHeight,this.lineHeight*e);return{height:t,total:e,itemHeight:this.lineHeight,generate:r=>{let n=i[r].cloneNode(!0);return n.removeAttribute("id"),n},afterRender:()=>{this.contentEl.scrollWidth>this.contentEl.clientWidth?this.contentEl.style.height=`${t+12}px`:this.contentEl.style.height=`${t}px`}}},getLineElements(){let i=Array.from(this.templateEl.querySelectorAll("[data-line]"));if(i.length===0)return[];let e=i[i.length-1];return this.props.ignoreTrailingEmptyLine&&e.innerText===""?i.slice(0,-1):i},capLines(){if(this.props.maxLines){let e=Array.from(this.templateEl.querySelectorAll("[data-line]")).slice(0,-this.props.maxLines),[t,...r]=e;r.forEach(n=>n.remove()),t&&(t.innerHTML="...")}}},mie=UCe;var jCe={mounted(){let i=nr.get(),e=this.el.querySelector('[name="show_section"][value="true"]'),t=this.el.querySelector('[name="show_markdown"][value="true"]'),r=this.el.querySelector('[name="show_output"][value="true"]'),n=this.el.querySelector('[name="spotlight"][value="true"]');e.checked=i.custom_view_show_section,t.checked=i.custom_view_show_markdown,r.checked=i.custom_view_show_output,n.checked=i.custom_view_spotlight,e.addEventListener("change",o=>{nr.update({custom_view_show_section:o.target.checked})}),t.addEventListener("change",o=>{nr.update({custom_view_show_markdown:o.target.checked})}),r.addEventListener("change",o=>{nr.update({custom_view_show_output:o.target.checked})}),n.addEventListener("change",o=>{nr.update({custom_view_spotlight:o.target.checked})})}},gie=jCe;var bie={AppAuth:dB,AudioInput:pB,Cell:DQ,CellEditor:Jee,Dropzone:ete,EditorSettings:tte,EmojiPicker:Hte,FocusOnUpdate:Ute,Headline:Wte,Highlight:Vte,ImageInput:qte,ImageOutput:Kte,JSView:Zte,KeyboardControl:Jte,MarkdownRenderer:eie,ScrollOnUpdate:tie,Session:rie,TextareaAutosize:nie,Timer:oie,UserForm:cie,UtcDateTimeInput:die,UtcTimeInput:uie,VirtualizedLines:mie,CustomViewSettings:gie};var vie={onBeforeElUpdated(i,e){for(let t of i.attributes)t.name.startsWith("data-js-")&&e.setAttribute(t.name,t.value),t.name==="data-keep-attribute"&&(i.hasAttribute(t.value)?e.setAttribute(t.value,i.getAttribute(t.value)):e.removeAttribute(t.value))},onNodeAdded(i){if(i.nodeType===Node.ELEMENT_NODE&&i.hasAttribute("autofocus")&&(i.focus(),i.setSelectionRange&&i.value)){let e=i.value.length;i.setSelectionRange(e,e)}}};var y3=Wn(yie());function wie(){y3.default.config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"}),window.addEventListener("phx:page-loading-start",()=>{y3.default.show(500)}),window.addEventListener("phx:page-loading-stop",()=>{y3.default.hide()})}function xie(){window.addEventListener("lb:focus",i=>{requestAnimationFrame(()=>{i.target.focus()})}),window.addEventListener("lb:set_value",i=>{i.target.value=i.detail.value}),window.addEventListener("lb:check",i=>{i.target.checked=!0}),window.addEventListener("lb:uncheck",i=>{i.target.checked=!1}),window.addEventListener("lb:set_text",i=>{i.target.textContent=i.detail.value}),window.addEventListener("lb:clipcopy",i=>{"clipboard"in navigator?i.detail.content?navigator.clipboard.writeText(i.detail.content):i.target.tagName==="INPUT"?navigator.clipboard.writeText(i.target.value):navigator.clipboard.writeText(i.target.textContent):alert(`Sorry, your browser does not support clipboard copy. -This generally requires a secure origin \u2014 either HTTPS or localhost.`)}),window.addEventListener("lb:scroll_into_view",i=>{hQ(i.target).then(()=>{y4(i.target,{scrollMode:"if-needed",behavior:"smooth",block:"nearest",inline:"nearest"})})}),window.addEventListener("phx:lb:exec_js",i=>{let e=i.detail.to||"body";document.querySelectorAll(e).forEach(t=>{window.liveSocket.execJS(t,i.detail.js)})}),window.addEventListener("lb:session_list:on_selection_change",()=>{let i=!!document.querySelector("[name='session_ids[]']:checked"),e=document.querySelector("#edit-sessions [name='disconnect']"),t=document.querySelector("#edit-sessions [name='close_all']");e.parentElement.classList.toggle("pointer-events-none",!i),e.parentElement.classList.toggle("opacity-50",!i),t.parentElement.classList.toggle("pointer-events-none",!i),t.parentElement.classList.toggle("opacity-50",!i)}),window.addEventListener("contextmenu",i=>{let e=i.target.closest("[data-contextmenu-trigger-click]");e&&(i.preventDefault(),e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0})))}),window.addEventListener("submit",i=>{i.target.hasAttribute("phx-nosubmit")&&(i.preventDefault(),i.stopPropagation())},{capture:!0})}function Cie(){let i=/AppleWebKit/.test(navigator.userAgent),e="ontouchstart"in window||navigator.maxTouchPoints>0;if(i&&e){let t=document.querySelector("meta[name='viewport']");t&&(t.content+=", maximum-scale=1.0")}}var f9="confirm-opted-out-ids";function Sie(){return Cu(f9)||[]}function kie(){window.addEventListener("phx:add_confirm_opt_out_id",i=>{let e=Cu(f9)||[],t=i.detail.opt_out_id;e.push(t),If(f9,e)})}function WCe(){let i=document.querySelector("meta[name='csrf-token']").getAttribute("content"),e=new oB(window.LIVEBOOK_BASE_URL_PATH+"/live",ay,{params:t=>({_csrf_token:i,user_data:lie(),app_auth_token:cB(),confirm_opt_out_ids:Sie()}),hooks:bie,dom:vie});wie(),xie(),kie(),Cie(),nr.getAndSubscribe(t=>{document.body.setAttribute("data-editor-theme",t.editor_theme)}),e.connect(),window.liveSocket=e}if(VCe())WCe();else{let i=document.createElement("div");i.innerHTML=` + `}var w2e=new Pr(i=>i.isLoaded?_2e(i):y2e(i)),Y4=xn("picker","skeleton","placeholder","searchSkeleton","searchInput","categoryTabsSkeleton","headerSkeleton","categoryTab","contentSkeleton","categoryName","emojiGrid","emoji","previewSkeleton","previewEmoji","previewName","tagList","tag","overlay","content","fullHeight","pluginContainer","header"),X4={emojisPerRow:"--emojis-per-row",visibleRows:"--row-count",emojiSize:"--emoji-size"},XR=class extends Gt{constructor(){super({template:w2e,classes:Y4}),this.pickerReady=!1,this.externalEvents=new OR,this.updaters={styleProperty:e=>t=>this.el.style.setProperty(X4[e],t.toString()),theme:e=>{let t=this.options.theme,r=this.el.closest(`.${t}`);this.el.classList.remove(t),r==null||r.classList.remove(t),this.el.classList.add(e),r==null||r.classList.add(e)},className:e=>{this.options.className&&this.el.classList.remove(this.options.className),this.el.classList.add(e)},emojisPerRow:this.updateStyleProperty.bind(this,"emojisPerRow"),emojiSize:this.updateStyleProperty.bind(this,"emojiSize"),visibleRows:this.updateStyleProperty.bind(this,"visibleRows")}}initialize(){this.uiElements={pickerContent:Gt.byClass(Y4.content),header:Gt.byClass(Y4.header)},this.uiEvents=[Gt.uiEvent("keydown",this.handleKeyDown)],this.appEvents={error:this.onError,reinitialize:this.reinitialize,"data:ready":this.onDataReady,"content:show":this.showContent,"variantPopup:hide":this.hideVariantPopup,"emoji:select":this.selectEmoji},super.initialize(),this.options.recentsProvider}destroy(){var e,t;super.destroy(),(e=this.search)==null||e.destroy(),this.emojiArea.destroy(),(t=this.categoryTabs)==null||t.destroy(),this.events.removeAll(),this.externalEvents.removeAll()}clearRecents(){this.options.recentsProvider.clear()}addEventListener(e,t){this.externalEvents.on(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t)}initializePickerView(){this.pickerReady&&(this.showContent(),this.emojiArea.reset(!1))}handleKeyDown(e){let t=e.ctrlKey||e.metaKey;e.key==="s"&&t&&this.search&&(e.preventDefault(),this.search.focus())}buildChildViews(){return this.options.showPreview&&(this.preview=this.viewFactory.create(qR)),this.options.showSearch&&(this.search=this.viewFactory.create(KR,{categories:this.categories,emojiVersion:this.emojiVersion})),this.options.showCategoryTabs&&(this.categoryTabs=this.viewFactory.create(YR,{categories:this.categories})),this.currentView=this.emojiArea=this.viewFactory.create(WR,{categoryTabs:this.categoryTabs,categories:this.categories,emojiVersion:this.emojiVersion}),[this.preview,this.search,this.emojiArea,this.categoryTabs]}setStyleProperties(){this.options.showSearch||this.el.style.setProperty("--search-height-full","0px"),this.options.showCategoryTabs||(this.el.style.setProperty("--category-tabs-height","0px"),this.el.style.setProperty("--category-tabs-offset","0px")),this.options.showPreview||this.el.style.setProperty("--emoji-preview-height-full","0px"),Object.keys(X4).forEach(e=>{this.options[e]&&this.el.style.setProperty(X4[e],this.options[e].toString())})}updateStyleProperty(e,t){this.el.style.setProperty(X4[e],t.toString())}reinitialize(){this.renderSync()}onError(e){let t=this.viewFactory.createWithOptions({data:!1},VR,{message:this.i18n.get("error.load")}),r=this.el.offsetHeight||375;throw this.el.style.height=`${r}px`,vm(this.el,t.renderSync()),e}async onDataReady(e){let t=this.el;try{e?this.emojiData=e:await this.emojiDataPromise,this.options.emojiVersion==="auto"?this.emojiVersion=g2e()||parseFloat(ixe):this.emojiVersion=this.options.emojiVersion,this.categories=await this.emojiData.getCategories(this.options);let[r,n,o,s]=this.buildChildViews();await super.render({isLoaded:!0,search:n,categoryTabs:s,emojiArea:o,preview:r,showHeader:!!(this.search||this.categoryTabs),theme:this.options.theme,className:this.options.className}),this.el.style.setProperty("--category-count",this.categories.length.toString()),this.pickerReady=!0,t.replaceWith(this.el),this.setStyleProperties(),this.initializePickerView(),this.setInitialFocus(),this.externalEvents.emit("data:ready")}catch(r){this.events.emit("error",r)}}renderSync(){var e;let t=((e=this.options.categories)==null?void 0:e.length)||10;if(this.options.showRecents&&(t+=1),super.renderSync({isLoaded:!1,theme:this.options.theme,className:this.options.className,showSearch:this.options.showSearch,showPreview:this.options.showPreview,showCategoryTabs:this.options.showCategoryTabs,showHeader:this.options.showSearch||this.options.showCategoryTabs,emojiCount:this.options.emojisPerRow*this.options.visibleRows,categoryCount:t}),this.el.style.setProperty("--category-count",t.toString()),!this.options.rootElement)throw new Error("Picker must be given a root element via the rootElement option");return vm(this.options.rootElement,this.el),this.setStyleProperties(),this.pickerReady&&this.initializePickerView(),this.el}getInitialFocusTarget(){if(typeof this.options.autoFocus<"u")switch(this.options.autoFocus){case"emojis":return this.emojiArea.focusableEmoji;case"search":return this.search;case"auto":return this.search||this.emojiArea.focusableEmoji;default:return null}if(this.options.autoFocusSearch===!0)return console.warn("options.autoFocusSearch is deprecated, please use options.focusTarget instead"),this.search}setInitialFocus(){var e;!this.pickerReady||(e=this.getInitialFocusTarget())==null||e.focus()}reset(e=!0){var t;this.pickerReady&&(this.emojiArea.reset(e),this.showContent(this.emojiArea)),(t=this.search)==null||t.clear(),this.hideVariantPopup()}showContent(e=this.emojiArea){var t,r;e!==this.currentView&&(this.currentView!==this.emojiArea&&((t=this.currentView)==null||t.destroy()),this.ui.pickerContent.classList.toggle(Y4.fullHeight,e!==this.emojiArea),vm(this.ui.pickerContent,e.el),this.currentView=e,e===this.emojiArea?(this.emojiArea.reset(),this.categoryTabs&&this.ui.header.appendChild(this.categoryTabs.el)):(r=this.categoryTabs)==null||r.el.remove())}hideVariantPopup(){var e;(e=this.variantPopup)==null||e.destroy()}isPickerClick(e){var t,r;let n=e.target,o=this.el.contains(n),s=(r=(t=this.variantPopup)==null?void 0:t.el)==null?void 0:r.contains(n);return o||s}async selectEmoji({emoji:e}){var t,r;(t=e.skins)!=null&&t.length&&this.options.showVariants&&!this.isVariantPopupOpen?this.showVariantPopup(e):(await((r=this.variantPopup)==null?void 0:r.animateHide()),this.events.emit("variantPopup:hide"),await this.emitEmoji(e))}get isVariantPopupOpen(){return this.variantPopup&&!this.variantPopup.isDestroyed}async showVariantPopup(e){let t=document.activeElement;this.events.once("variantPopup:hide",()=>{t==null||t.focus()}),this.variantPopup=this.viewFactory.create($R,{emoji:e,parent:this.el}),this.el.appendChild(this.variantPopup.renderSync()),this.variantPopup.activate()}async emitEmoji(e){this.externalEvents.emit("emoji:select",await this.renderer.doEmit(e)),this.options.recentsProvider.addOrUpdateRecent(e,this.options.maxRecents),this.events.emit("recent:add",e)}updateOptions(e){Object.keys(e).forEach(t=>{this.updaters[t](e[t])}),Object.assign(this.options,e)}},QR=class{constructor({events:e,i18n:t,renderer:r,emojiData:n,options:o,customEmojis:s=[],pickerId:a}){this.events=e,this.i18n=t,this.renderer=r,this.emojiData=n,this.options=o,this.customEmojis=s,this.pickerId=a}setEmojiData(e){this.emojiData=Promise.resolve(e)}createWithOptions(e={},t,...r){let n=new t(...r);return n.setPickerId(this.pickerId),n.setEvents(this.events),n.setI18n(this.i18n),n.setRenderer(this.renderer),e.data!==!1&&n.setEmojiData(this.emojiData),n.setOptions(this.options),n.setCustomEmojis(this.customEmojis),n.viewFactory=this,n.initialize(),n}create(e,...t){return this.createWithOptions({},e,...t)}},n3,ZR=class{constructor(e={}){yc(this,n3,void 0),yR(this,n3,new Map(Object.entries(e)))}get(e,t=e){return wc(this,n3).get(e)||t}};n3=new WeakMap;function x2e(i,e){e===void 0&&(e={});var t=e.insertAt;if(!(!i||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=i:n.appendChild(document.createTextNode(i))}}function r9(){let i=!1;return function(e){Kxe.injectStyles&&!i&&(x2e(e),i=!0)}}var C2e=`.picmo__picker .picmo__icon{width:1.25em;height:1em;fill:currentColor}.picmo__icon-small{font-size:.8em}.picmo__icon-medium{font-size:1em}.picmo__icon-large{font-size:1.25em}.picmo__icon-2x{font-size:2em}.picmo__icon-3x{font-size:3em}.picmo__icon-4x{font-size:4em}.picmo__icon-5x{font-size:5em}.picmo__icon-8x{font-size:8em}.picmo__icon-10x{font-size:10em}.picmo__light,.picmo__auto{color-scheme:light;--accent-color: #4f46e5;--background-color: #f9fafb;--border-color: #cccccc;--category-name-background-color: #f9fafb;--category-name-button-color: #999999;--category-name-text-color: hsl(214, 30%, 50%);--category-tab-active-background-color: rgba(255, 255, 255, .6);--category-tab-active-color: var(--accent-color);--category-tab-color: #666;--category-tab-highlight-background-color: rgba(0, 0, 0, .15);--error-color-dark: hsl(0, 100%, 45%);--error-color: hsl(0, 100%, 40%);--focus-indicator-background-color: hsl(198, 65%, 85%);--focus-indicator-color: #333333;--hover-background-color: #c7d2fe;--placeholder-background-color: #cccccc;--search-background-color: #f9fafb;--search-focus-background-color: #ffffff;--search-icon-color: #999999;--search-placeholder-color: #71717a;--secondary-background-color: #e2e8f0;--secondary-text-color: #666666;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #000000;--variant-popup-background-color: #ffffff}.picmo__dark{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}@media (prefers-color-scheme: dark){.picmo__auto{color-scheme:dark;--accent-color: #A580F9;--background-color: #333333;--border-color: #666666;--category-name-background-color: #333333;--category-name-button-color: #eeeeee;--category-name-text-color: #ffffff;--category-tab-active-background-color: #000000;--category-tab-active-color: var(--accent-color);--category-tab-color: #cccccc;--category-tab-highlight-background-color: #4A4A4A;--error-color-dark: hsl(0, 7%, 3%);--error-color: hsl(0, 30%, 60%);--focus-indicator-background-color: hsl(0, 0%, 50%);--focus-indicator-color: #999999;--hover-background-color: hsla(0, 0%, 40%, .85);--image-placeholder-color: #ffffff;--placeholder-background-color: #666666;--search-background-color: #71717a;--search-focus-background-color: #52525b;--search-icon-color: #cccccc;--search-placeholder-color: #d4d4d8;--secondary-background-color: #000000;--secondary-text-color: #999999;--tag-background-color: rgba(162, 190, 245, .3);--text-color: #ffffff;--variant-popup-background-color: #333333}}.picmo__picker .picmo__categoryButtonsContainer{overflow:auto;padding:2px 0}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-right{mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(270deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-left{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%)}.picmo__picker .picmo__categoryButtonsContainer.picmo__has-overflow-both{mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%);-webkit-mask-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,1) 10%,rgba(255,255,255,1) 90%,rgba(255,255,255,0) 100%)}.picmo__picker .picmo__categoryButtons{display:flex;flex-direction:row;gap:var(--tab-gap);margin:0;padding:0 .5em;align-items:center;height:var(--category-tabs-height);box-sizing:border-box;width:100%;justify-content:space-between;position:relative;list-style-type:none;justify-self:center;max-width:min(23.55rem,calc(var(--category-count, 1) * 2.5rem))}.picmo__picker .picmo__categoryButtons .picmo__categoryTab{display:flex;align-items:center;transition:all .1s;width:2em}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton{color:var(--category-tab-active-color);background:linear-gradient(rgba(255,255,255,.75) 0%,rgba(255,255,255,.75) 100%),linear-gradient(var(--category-tab-active-color) 0%,var(--category-tab-active-color) 100%);border:2px solid var(--category-tab-active-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab.picmo__categoryTabActive .picmo__categoryButton:hover{background-color:var(--category-tab-active-background-color)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton{border-radius:5px;background:transparent;border:2px solid transparent;color:var(--category-tab-color);cursor:pointer;padding:2px;vertical-align:middle;display:flex;align-items:center;justify-content:center;font-size:1.2rem;width:1.6em;height:1.6em;transition:all .1s}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:is(img){width:var(--category-tab-size);height:var(--category-tab-size)}.picmo__picker .picmo__categoryButtons .picmo__categoryTab button.picmo__categoryButton:hover{background:var(--category-tab-highlight-background-color)}.picmo__dataError [data-icon]{opacity:.8}@keyframes appear{0%{opacity:0}to{opacity:.8}}@keyframes appear-grow{0%{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}.picmo__picker .picmo__error{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--secondary-text-color)}.picmo__picker .picmo__error .picmo__iconContainer{opacity:.8;animation:appear-grow .25s cubic-bezier(.175,.885,.32,1.275);--color-primary: var(--error-color);--color-secondary: var(--error-color-dark)}.picmo__picker .picmo__error .picmo__title{animation:appear .25s;animation-delay:50ms;animation-fill-mode:both}.picmo__picker .picmo__error button{padding:8px 16px;cursor:pointer;background:var(--background-color);border:1px solid var(--text-color);border-radius:5px;color:var(--text-color)}.picmo__picker .picmo__error button:hover{background:var(--text-color);color:var(--background-color)}.picmo__emojiButton{background:transparent;border:none;border-radius:15px;cursor:pointer;display:flex;font-family:var(--emoji-font);font-size:var(--emoji-size);height:100%;justify-content:center;align-items:center;margin:0;overflow:hidden;padding:0;width:100%}.picmo__emojiButton:hover{background:var(--hover-background-color)}.picmo__emojiButton:focus{border-radius:0;background:var(--focus-indicator-background-color);outline:1px solid var(--focus-indicator-color)}.picmo__picker .picmo__emojiArea{height:var(--emoji-area-height);overflow-y:auto;position:relative}.picmo__picker .picmo__emojiCategory{position:relative}.picmo__picker .picmo__emojiCategory .picmo__categoryName{font-size:.9em;padding:.5rem;margin:0;background:var(--category-name-background-color);color:var(--category-name-text-color);top:0;z-index:1;display:grid;gap:4px;grid-template-columns:auto 1fr auto;align-items:center;line-height:1;box-sizing:border-box;height:var(--category-name-height);justify-content:flex-start;text-transform:uppercase}.picmo__picker .picmo__emojiCategory .picmo__categoryName button{background:transparent;border:none;display:flex;align-items:center;cursor:pointer;color:var(--category-name-button-color)}.picmo__picker .picmo__emojiCategory .picmo__categoryName button:hover{opacity:1}.picmo__picker .picmo__emojiCategory .picmo__noRecents{color:var(--secondary-text-color);grid-column:1 / span var(--emojis-per-row);font-size:.9em;text-align:center;display:flex;align-items:center;justify-content:center;min-height:calc(var(--emoji-size) * var(--emoji-size-multiplier))}.picmo__picker .picmo__emojiCategory .picmo__recentEmojis[data-empty=true]{display:none}:is(.picmo__picker .picmo__emojiCategory) .picmo__recentEmojis[data-empty=false]+div{display:none}.picmo__picker .picmo__emojiContainer{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center}.picmo__picker.picmo__picker{--border-radius: 5px;--emoji-area-height: calc( (var(--row-count) * var(--emoji-size) * var(--emoji-size-multiplier)) + var(--category-name-height) );--content-height: var(--emoji-area-height);--emojis-per-row: 8;--row-count: 6;--emoji-preview-margin: 4px;--emoji-preview-height: calc(var(--emoji-preview-size) + 1em + 1px);--emoji-preview-height-full: calc(var(--emoji-preview-height) + var(--emoji-preview-margin));--emoji-preview-size: 2.75em;--emoji-size: 2rem;--emoji-size-multiplier: 1.3;--content-margin: 8px;--category-tabs-height:calc(1.5em + 9px);--category-tabs-offset: 8px;--category-tab-size: 1.2rem;--category-name-height: 2rem;--category-name-padding-y: 6px;--search-height: 2em;--search-margin: .5em;--search-margin-bottom: 4px;--search-height-full: calc(var(--search-height) + var(--search-margin) + var(--search-margin-bottom));--overlay-background-color: rgba(0, 0, 0, .8);--emoji-font: "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji";--ui-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;--ui-font-size: 16px;--picker-width: calc(var(--emojis-per-row) * var(--emoji-size) * var(--emoji-size-multiplier) + 2.75rem);--preview-background-color: var(--secondary-background-color);background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);font-size:var(--ui-font-size);overflow:hidden;position:relative;width:var(--picker-width);display:grid;gap:8px}.picmo__picker.picmo__picker>*{font-family:var(--ui-font)}.picmo__picker.picmo__skeleton{background:var(--background-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-family:var(--ui-font);width:var(--picker-width);color:var(--secondary-text-color)}.picmo__picker.picmo__skeleton *{box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__picker.picmo__skeleton .picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""}.picmo__picker.picmo__skeleton .picmo__headerSkeleton{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;overflow:hidden;gap:8px;border-bottom:1px solid var(--border-color);width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton{padding:0 8px;height:var(--search-height)}.picmo__picker.picmo__skeleton .picmo__searchSkeleton .picmo__searchInput{width:100%;height:28px;border-radius:3px}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton{height:var(--category-tabs-height);display:flex;flex-direction:row;align-items:center;justify-self:center;width:calc(2rem * var(--category-count, 1))}.picmo__picker.picmo__skeleton .picmo__categoryTabsSkeleton .picmo__categoryTab{width:25px;height:25px;padding:2px;border-radius:5px;margin:.25em}.picmo__picker.picmo__skeleton .picmo__contentSkeleton{height:var(--content-height);padding-right:8px;opacity:.7}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__categoryName{width:50%;height:1rem;margin:.5rem;box-sizing:border-box}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid{display:grid;justify-content:space-between;gap:1px;padding:0 .5em;grid-template-columns:repeat(var(--emojis-per-row),calc(var(--emoji-size) * var(--emoji-size-multiplier)));grid-auto-rows:calc(var(--emoji-size) * var(--emoji-size-multiplier));align-items:center;justify-items:center;width:var(--picker-width)}.picmo__picker.picmo__skeleton .picmo__contentSkeleton .picmo__emojiGrid .picmo__emoji{width:var(--emoji-size);height:var(--emoji-size);border-radius:50%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton{height:var(--emoji-preview-height);border-top:1px solid var(--border-color);display:grid;align-items:center;padding:.5em;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags"}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewEmoji{grid-area:emoji;border-radius:50%;width:var(--emoji-preview-size);height:var(--emoji-preview-size)}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__previewName{grid-area:name;height:.8em;width:80%}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0}.picmo__picker.picmo__skeleton .picmo__previewSkeleton .picmo__tagList .picmo__tag{border-radius:3px;padding:2px 8px;margin-right:.25em;height:1em;width:20%}.picmo__overlay{background:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:1000}.picmo__content{position:relative;overflow:hidden;height:var(--content-height)}.picmo__content.picmo__fullHeight{height:calc(var(--content-height) + var(--category-tabs-height) + var(--category-tabs-offset));overflow-y:auto}.picmo__pluginContainer{margin:.5em;display:flex;flex-direction:row}.picmo__header{background-color:var(--secondary-background-color);padding-top:8px;padding-bottom:8px;display:grid;gap:8px;border-bottom:1px solid var(--border-color)}@media (prefers-reduced-motion: reduce){.picmo__placeholder{background:var(--placeholder-background-color);position:relative;overflow:hidden}.picmo__placeholder:after{display:none}}.picmo__picker .picmo__preview{border-top:1px solid var(--border-color);display:grid;align-items:center;gap:6px;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"emoji name" "emoji tags";height:var(--emoji-preview-height);box-sizing:border-box;padding:.5em;position:relative;background:var(--preview-background-color)}.picmo__picker .picmo__preview .picmo__previewEmoji{grid-area:emoji;font-size:var(--emoji-preview-size);font-family:var(--emoji-font);width:1.25em;display:flex;align-items:center;justify-content:center}.picmo__picker .picmo__preview .picmo__previewName{grid-area:name;color:var(--text-color);font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.picmo__picker .picmo__preview .picmo__tagList{grid-area:tags;list-style-type:none;display:flex;flex-direction:row;padding:0;margin:0;font-size:.75em;overflow:hidden}.picmo__picker .picmo__preview .picmo__tag{border-radius:3px;background:var(--tag-background-color);color:var(--text-color);padding:2px 8px;margin-right:.25em;white-space:nowrap}.picmo__picker .picmo__preview .picmo__tag:last-child{margin-right:0}.picmo__picker .picmo__searchContainer{display:flex;height:var(--search-height);box-sizing:border-box;padding:0 8px;position:relative}.picmo__picker .picmo__searchContainer .picmo__searchField{background:var(--search-background-color);border-radius:3px;border:none;box-sizing:border-box;color:var(--text-color);font-size:.9em;outline:none;padding:.5em 2.25em .5em .5em;width:100%}.picmo__picker .picmo__searchContainer .picmo__searchField:focus{background:var(--search-focus-background-color)}.picmo__picker .picmo__searchContainer .picmo__searchField::placeholder{color:var(--search-placeholder-color)}.picmo__picker .picmo__searchContainer .picmo__searchAccessory{color:var(--search-icon-color);height:100%;position:absolute;right:1em;top:0;width:1.25rem;display:flex;align-items:center}.picmo__picker .picmo__searchContainer .picmo__searchAccessory svg{fill:var(--search-icon-color)}.picmo__picker .picmo__searchContainer .picmo__clearButton{border:0;color:var(--search-icon-color);background:transparent;cursor:pointer}.picmo__picker .picmo__searchContainer .picmo__clearSearchButton{cursor:pointer;border:none;background:transparent;color:var(--search-icon-color);font-size:1em;width:100%;height:100%;display:flex;align-items:center;padding:0}.picmo__picker .picmo__searchContainer .picmo__notFound [data-icon]{fill:#f3e265}.picmo__picker .picmo__variantOverlay{background:var(--overlay-background-color);border-radius:5px;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.picmo__picker .picmo__variantOverlay .picmo__variantPopup{background:var(--variant-popup-background-color);border-radius:5px;margin:.5em;padding:.5em;text-align:center;user-select:none;display:flex;align-items:center;justify-content:center}.picmo__customEmoji{width:1em;height:1em}@keyframes shine{to{transform:translate(100%)}}.picmo__picker .picmo__imagePlaceholder{width:2rem;height:2rem;border-radius:50%}.picmo__placeholder{background:#DDDBDD;position:relative}.picmo__placeholder:after{position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 100%);animation:shine 2s infinite;content:""} +`;function S2e(i){return bte(i.locale,i.dataStore,i.messages,i.emojiData)}var k2e=0,Q4;function E2e(){return`picmo-${Date.now()}-${k2e++}`}var T2e=r9();function yte(i){T2e(C2e);let e=i9(i),t=((e==null?void 0:e.custom)||[]).map(s=>xt(ue({},s),{custom:!0,tags:["custom",...s.tags||[]]})),r=new PR;Q4||(Q4=S2e(e));let n=new ZR(e.i18n);Q4.then(s=>{r.emit("data:ready",s)}).catch(s=>{r.emit("error",s)});let o=new QR({events:r,i18n:n,customEmojis:t,renderer:e.renderer,options:e,emojiData:Q4,pickerId:E2e()}).create(XR);return o.renderSync(),o}function qh(i){return i.split("-")[0]}function _m(i){return i.split("-")[1]}function g3(i){return["top","bottom"].includes(qh(i))?"x":"y"}function Ate(i){return i==="y"?"height":"width"}function wte(i,e,t){let{reference:r,floating:n}=i,o=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2,a=g3(e),l=Ate(a),c=r[l]/2-n[l]/2,d=qh(e),u=a==="x",h;switch(d){case"top":h={x:o,y:r.y-n.height};break;case"bottom":h={x:o,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:s};break;case"left":h={x:r.x-n.width,y:s};break;default:h={x:r.x,y:r.y}}switch(_m(e)){case"start":h[a]-=c*(t&&u?-1:1);break;case"end":h[a]+=c*(t&&u?-1:1);break}return h}var I2e=async(i,e,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:s}=t,a=await(s.isRTL==null?void 0:s.isRTL(e)),l=await s.getElementRects({reference:i,floating:e,strategy:n}),{x:c,y:d}=wte(l,r,a),u=r,h={},f=0;for(let m=0;m<o.length;m++){let{name:g,fn:w}=o[m],{x:_,y:E,data:A,reset:L}=await w({x:c,y:d,initialPlacement:r,placement:u,strategy:n,middlewareData:h,rects:l,platform:s,elements:{reference:i,floating:e}});if(c=_!=null?_:c,d=E!=null?E:d,h=xt(ue({},h),{[g]:ue(ue({},h[g]),A)}),L&&f<=50){f++,typeof L=="object"&&(L.placement&&(u=L.placement),L.rects&&(l=L.rects===!0?await s.getElementRects({reference:i,floating:e,strategy:n}):L.rects),{x:c,y:d}=wte(l,u,a)),m=-1;continue}}return{x:c,y:d,placement:u,strategy:n,middlewareData:h}};function L2e(i){return ue({top:0,right:0,bottom:0,left:0},i)}function A2e(i){return typeof i!="number"?L2e(i):{top:i,right:i,bottom:i,left:i}}function h3(i){return xt(ue({},i),{top:i.y,left:i.x,right:i.x+i.width,bottom:i.y+i.height})}async function a9(i,e){var t;e===void 0&&(e={});let{x:r,y:n,platform:o,rects:s,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=e,m=A2e(f),g=a[h?u==="floating"?"reference":"floating":u],w=h3(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(g)))==null||t?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),_=h3(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u==="floating"?xt(ue({},s.floating),{x:r,y:n}):s.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),strategy:l}):s[u]);return{top:w.top-_.top+m.top,bottom:_.bottom-w.bottom+m.bottom,left:w.left-_.left+m.left,right:_.right-w.right+m.right}}var D2e=Math.min,M2e=Math.max;function xte(i,e,t){return M2e(i,D2e(e,t))}var N2e={left:"right",right:"left",bottom:"top",top:"bottom"};function f3(i){return i.replace(/left|right|bottom|top/g,e=>N2e[e])}function Dte(i,e,t){t===void 0&&(t=!1);let r=_m(i),n=g3(i),o=Ate(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=f3(s)),{main:s,cross:f3(s)}}var R2e={start:"end",end:"start"};function n9(i){return i.replace(/start|end/g,e=>R2e[e])}var P2e=["top","right","bottom","left"],O2e=P2e.reduce((i,e)=>i.concat(e,e+"-start",e+"-end"),[]);function F2e(i,e,t){return(i?[...t.filter(r=>_m(r)===i),...t.filter(r=>_m(r)!==i)]:t.filter(r=>qh(r)===r)).filter(r=>i?_m(r)===i||(e?n9(r)!==r:!1):!0)}var z2e=function(i){return i===void 0&&(i={}),{name:"autoPlacement",options:i,async fn(e){var t,r,n,o,s;let{x:a,y:l,rects:c,middlewareData:d,placement:u,platform:h,elements:f}=e,Oe=i,{alignment:m=null,allowedPlacements:g=O2e,autoAlignment:w=!0}=Oe,_=so(Oe,["alignment","allowedPlacements","autoAlignment"]),E=F2e(m,w,g),A=await a9(e,_),L=(t=(r=d.autoPlacement)==null?void 0:r.index)!=null?t:0,O=E[L];if(O==null)return{};let{main:U,cross:Y}=Dte(O,c,await(h.isRTL==null?void 0:h.isRTL(f.floating)));if(u!==O)return{x:a,y:l,reset:{placement:E[0]}};let oe=[A[qh(O)],A[U],A[Y]],te=[...(n=(o=d.autoPlacement)==null?void 0:o.overflows)!=null?n:[],{placement:O,overflows:oe}],Z=E[L+1];if(Z)return{data:{index:L+1,overflows:te},reset:{placement:Z}};let ve=te.slice().sort((Xe,dt)=>Xe.overflows[0]-dt.overflows[0]),Pe=(s=ve.find(Xe=>{let{overflows:dt}=Xe;return dt.every(be=>be<=0)}))==null?void 0:s.placement,Ee=Pe!=null?Pe:ve[0].placement;return Ee!==u?{data:{index:L+1,overflows:te},reset:{placement:Ee}}:{}}}};function B2e(i){let e=f3(i);return[n9(i),e,n9(e)]}var H2e=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(e){var t;let{placement:r,middlewareData:n,rects:o,initialPlacement:s,platform:a,elements:l}=e,oe=i,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",flipAlignment:f=!0}=oe,m=so(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),g=qh(r),w=u||(g===s||!f?[f3(s)]:B2e(s)),_=[s,...w],E=await a9(e,m),A=[],L=((t=n.flip)==null?void 0:t.overflows)||[];if(c&&A.push(E[g]),d){let{main:te,cross:Z}=Dte(r,o,await(a.isRTL==null?void 0:a.isRTL(l.floating)));A.push(E[te],E[Z])}if(L=[...L,{placement:r,overflows:A}],!A.every(te=>te<=0)){var O,U;let te=((O=(U=n.flip)==null?void 0:U.index)!=null?O:0)+1,Z=_[te];if(Z)return{data:{index:te,overflows:L},reset:{placement:Z}};let ve="bottom";switch(h){case"bestFit":{var Y;let Pe=(Y=L.map(Ee=>[Ee,Ee.overflows.filter(Oe=>Oe>0).reduce((Oe,Xe)=>Oe+Xe,0)]).sort((Ee,Oe)=>Ee[1]-Oe[1])[0])==null?void 0:Y[0].placement;Pe&&(ve=Pe);break}case"initialPlacement":ve=s;break}if(r!==ve)return{reset:{placement:ve}}}return{}}}};async function U2e(i,e){let{placement:t,platform:r,elements:n}=i,o=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=qh(t),a=_m(t),l=g3(t)==="x",c=["left","top"].includes(s)?-1:1,d=o&&l?-1:1,u=typeof e=="function"?e(i):e,{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:ue({mainAxis:0,crossAxis:0,alignmentAxis:null},u);return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*d,y:h*c}:{x:h*c,y:f*d}}var Cte=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){let{x:t,y:r}=e,n=await U2e(e,i);return{x:t+n.x,y:r+n.y,data:n}}}};function j2e(i){return i==="x"?"y":"x"}var Ste=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(e){let{x:t,y:r,placement:n}=e,w=i,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:_=>{let{x:E,y:A}=_;return{x:E,y:A}}}}=w,l=so(w,["mainAxis","crossAxis","limiter"]),c={x:t,y:r},d=await a9(e,l),u=g3(qh(n)),h=j2e(u),f=c[u],m=c[h];if(o){let _=u==="y"?"top":"left",E=u==="y"?"bottom":"right",A=f+d[_],L=f-d[E];f=xte(A,f,L)}if(s){let _=h==="y"?"top":"left",E=h==="y"?"bottom":"right",A=m+d[_],L=m-d[E];m=xte(A,m,L)}let g=a.fn(xt(ue({},e),{[u]:f,[h]:m}));return xt(ue({},g),{data:{x:g.x-t,y:g.y-r}})}}};function Mte(i){return i&&i.document&&i.location&&i.alert&&i.setInterval}function Sc(i){if(i==null)return window;if(!Mte(i)){let e=i.ownerDocument;return e&&e.defaultView||window}return i}function tl(i){return Sc(i).getComputedStyle(i)}function xc(i){return Mte(i)?"":i?(i.nodeName||"").toLowerCase():""}function Nte(){let i=navigator.userAgentData;return i!=null&&i.brands?i.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function il(i){return i instanceof Sc(i).HTMLElement}function tu(i){return i instanceof Sc(i).Element}function W2e(i){return i instanceof Sc(i).Node}function ym(i){if(typeof ShadowRoot>"u")return!1;let e=Sc(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function b3(i){let{overflow:e,overflowX:t,overflowY:r}=tl(i);return/auto|scroll|overlay|hidden/.test(e+r+t)}function V2e(i){return["table","td","th"].includes(xc(i))}function Rte(i){let e=/firefox/i.test(Nte()),t=tl(i);return t.transform!=="none"||t.perspective!=="none"||t.contain==="paint"||["transform","perspective"].includes(t.willChange)||e&&t.willChange==="filter"||e&&(t.filter?t.filter!=="none":!1)}function Pte(){return!/^((?!chrome|android).)*safari/i.test(Nte())}var kte=Math.min,Tv=Math.max,p3=Math.round;function Cc(i,e,t){var r,n,o,s;e===void 0&&(e=!1),t===void 0&&(t=!1);let a=i.getBoundingClientRect(),l=1,c=1;e&&il(i)&&(l=i.offsetWidth>0&&p3(a.width)/i.offsetWidth||1,c=i.offsetHeight>0&&p3(a.height)/i.offsetHeight||1);let d=tu(i)?Sc(i):window,u=!Pte()&&t,h=(a.left+(u&&(r=(n=d.visualViewport)==null?void 0:n.offsetLeft)!=null?r:0))/l,f=(a.top+(u&&(o=(s=d.visualViewport)==null?void 0:s.offsetTop)!=null?o:0))/c,m=a.width/l,g=a.height/c;return{width:m,height:g,top:f,right:h+m,bottom:f+g,left:h,x:h,y:f}}function iu(i){return((W2e(i)?i.ownerDocument:i.document)||window.document).documentElement}function v3(i){return tu(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.pageXOffset,scrollTop:i.pageYOffset}}function Ote(i){return Cc(iu(i)).left+v3(i).scrollLeft}function q2e(i){let e=Cc(i);return p3(e.width)!==i.offsetWidth||p3(e.height)!==i.offsetHeight}function K2e(i,e,t){let r=il(e),n=iu(e),o=Cc(i,r&&q2e(e),t==="fixed"),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(r||!r&&t!=="fixed")if((xc(e)!=="body"||b3(n))&&(s=v3(e)),il(e)){let l=Cc(e,!0);a.x=l.x+e.clientLeft,a.y=l.y+e.clientTop}else n&&(a.x=Ote(n));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}function Fte(i){return xc(i)==="html"?i:i.assignedSlot||i.parentNode||(ym(i)?i.host:null)||iu(i)}function Ete(i){return!il(i)||tl(i).position==="fixed"?null:$2e(i)}function $2e(i){let{offsetParent:e}=i,t=i,r=!1;for(;t&&t!==e;){let{assignedSlot:n}=t;if(n){let o=n.offsetParent;if(tl(n).display==="contents"){let s=n.hasAttribute("style"),a=n.style.display;n.style.display=tl(t).display,o=n.offsetParent,n.style.display=a,s||n.removeAttribute("style")}t=n,e!==o&&(e=o,r=!0)}else if(ym(t)&&t.host&&r)break;t=ym(t)&&t.host||t.parentNode}return e}function G2e(i){let e=Fte(i);for(ym(e)&&(e=e.host);il(e)&&!["html","body"].includes(xc(e));){if(Rte(e))return e;{let t=e.parentNode;e=ym(t)?t.host:t}}return null}function o9(i){let e=Sc(i),t=Ete(i);for(;t&&V2e(t)&&tl(t).position==="static";)t=Ete(t);return t&&(xc(t)==="html"||xc(t)==="body"&&tl(t).position==="static"&&!Rte(t))?e:t||G2e(i)||e}function Tte(i){if(il(i))return{width:i.offsetWidth,height:i.offsetHeight};let e=Cc(i);return{width:e.width,height:e.height}}function Y2e(i){let{rect:e,offsetParent:t,strategy:r}=i,n=il(t),o=iu(t);if(t===o)return e;let s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if((n||!n&&r!=="fixed")&&((xc(t)!=="body"||b3(o))&&(s=v3(t)),il(t))){let l=Cc(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}return xt(ue({},e),{x:e.x-s.scrollLeft+a.x,y:e.y-s.scrollTop+a.y})}function X2e(i,e){let t=Sc(i),r=iu(i),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let c=Pte();(c||!c&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:o,height:s,x:a,y:l}}function Q2e(i){var e;let t=iu(i),r=v3(i),n=(e=i.ownerDocument)==null?void 0:e.body,o=Tv(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),s=Tv(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-r.scrollLeft+Ote(i),l=-r.scrollTop;return tl(n||t).direction==="rtl"&&(a+=Tv(t.clientWidth,n?n.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function zte(i){let e=Fte(i);return["html","body","#document"].includes(xc(e))?i.ownerDocument.body:il(e)&&b3(e)?e:zte(e)}function m3(i,e){var t;e===void 0&&(e=[]);let r=zte(i),n=r===((t=i.ownerDocument)==null?void 0:t.body),o=Sc(r),s=n?[o].concat(o.visualViewport||[],b3(r)?r:[]):r,a=e.concat(s);return n?a:a.concat(m3(s))}function Z2e(i,e){let t=e.getRootNode==null?void 0:e.getRootNode();if(i.contains(e))return!0;if(t&&ym(t)){let r=e;do{if(r&&i===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function J2e(i,e){let t=Cc(i,!1,e==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft;return{top:r,left:n,x:n,y:r,right:n+i.clientWidth,bottom:r+i.clientHeight,width:i.clientWidth,height:i.clientHeight}}function Ite(i,e,t){return e==="viewport"?h3(X2e(i,t)):tu(e)?J2e(e,t):h3(Q2e(iu(i)))}function eCe(i){let e=m3(i),t=["absolute","fixed"].includes(tl(i).position)&&il(i)?o9(i):i;return tu(t)?e.filter(r=>tu(r)&&Z2e(r,t)&&xc(r)!=="body"):[]}function tCe(i){let{element:e,boundary:t,rootBoundary:r,strategy:n}=i,o=[...t==="clippingAncestors"?eCe(e):[].concat(t),r],s=o[0],a=o.reduce((l,c)=>{let d=Ite(e,c,n);return l.top=Tv(d.top,l.top),l.right=kte(d.right,l.right),l.bottom=kte(d.bottom,l.bottom),l.left=Tv(d.left,l.left),l},Ite(e,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}var iCe={getClippingRect:tCe,convertOffsetParentRelativeRectToViewportRelativeRect:Y2e,isElement:tu,getDimensions:Tte,getOffsetParent:o9,getDocumentElement:iu,getElementRects:i=>{let{reference:e,floating:t,strategy:r}=i;return{reference:K2e(e,o9(t),r),floating:xt(ue({},Tte(t)),{x:0,y:0})}},getClientRects:i=>Array.from(i.getClientRects()),isRTL:i=>tl(i).direction==="rtl"};function rCe(i,e,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=n&&!a,c=o&&!a,d=l||c?[...tu(i)?m3(i):[],...m3(e)]:[];d.forEach(g=>{l&&g.addEventListener("scroll",t,{passive:!0}),c&&g.addEventListener("resize",t)});let u=null;if(s){let g=!0;u=new ResizeObserver(()=>{g||t(),g=!1}),tu(i)&&!a&&u.observe(i),u.observe(e)}let h,f=a?Cc(i):null;a&&m();function m(){let g=Cc(i);f&&(g.x!==f.x||g.y!==f.y||g.width!==f.width||g.height!==f.height)&&t(),f=g,h=requestAnimationFrame(m)}return t(),()=>{var g;d.forEach(w=>{l&&w.removeEventListener("scroll",t),c&&w.removeEventListener("resize",t)}),(g=u)==null||g.disconnect(),u=null,a&&cancelAnimationFrame(h)}}var nCe=(i,e,t)=>I2e(i,e,ue({platform:iCe},t));async function oCe(i,e,t,r){if(!r)throw new Error("Must provide a positioning option");return await(typeof r=="string"?sCe(i,e,t,r):aCe(e,r))}async function sCe(i,e,t,r){if(!t)throw new Error("Reference element is required for relative positioning");let n;return r==="auto"?n={middleware:[z2e(),Ste(),Cte({mainAxis:5,crossAxis:12})]}:n={placement:r,middleware:[H2e(),Ste(),Cte(5)]},rCe(t,e,async()=>{if((!t.isConnected||!t.offsetParent)&&lCe(i))return;let{x:o,y:s}=await nCe(t,e,n);Object.assign(e.style,{position:"absolute",left:`${o}px`,top:`${s}px`})})}function aCe(i,e){return i.style.position="fixed",Object.entries(e).forEach(([t,r])=>{i.style[t]=r}),()=>{}}function lCe(i){switch(i.options.onPositionLost){case"close":return i.close(),!0;case"destroy":return i.destroy(),!0;case"hold":return!0}}var cCe={hideOnClickOutside:!0,hideOnEmojiSelect:!0,hideOnEscape:!0,position:"auto",showCloseButton:!0,onPositionLost:"none"};function dCe(i={}){return ue(xt(ue({},cCe),{rootElement:document.body}),i)}var uCe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>',Lte=xn("popupContainer","closeButton"),s9=class{constructor(e,t){this.isOpen=!1,this.externalEvents=new Wh,this.options=ue(ue({},dCe(t)),i9(e)),this.popupEl=document.createElement("div"),this.popupEl.classList.add(Lte.popupContainer),this.popupEl.classList.add(this.options.theme),t.className&&this.popupEl.classList.add(t.className),this.options.showCloseButton&&(this.closeButton=document.createElement("button"),this.closeButton.type="button",this.closeButton.classList.add(Lte.closeButton),this.closeButton.innerHTML=uCe,this.closeButton.addEventListener("click",()=>{this.close()}),this.popupEl.appendChild(this.closeButton));let r=document.createElement("div");this.popupEl.appendChild(r),this.picker=yte(xt(ue({},this.options),{rootElement:r})),this.focusTrap=new Sv,this.picker.addEventListener("data:ready",()=>{this.focusTrap.activate(this.picker.el),this.picker.setInitialFocus()}),this.options.hideOnEmojiSelect&&this.picker.addEventListener("emoji:select",()=>{var n;this.close(),(n=this.triggerElement)==null||n.focus()}),this.options.hideOnClickOutside&&(this.onDocumentClick=this.onDocumentClick.bind(this),document.addEventListener("click",this.onDocumentClick)),this.options.hideOnEscape&&(this.handleKeydown=this.handleKeydown.bind(this),this.popupEl.addEventListener("keydown",this.handleKeydown)),this.referenceElement=this.options.referenceElement,this.triggerElement=this.options.triggerElement}addEventListener(e,t){this.externalEvents.on(e,t),this.picker.addEventListener(e,t)}removeEventListener(e,t){this.externalEvents.off(e,t),this.picker.removeEventListener(e,t)}handleKeydown(e){var t;e.key==="Escape"&&(this.close(),(t=this.triggerElement)==null||t.focus())}async destroy(){this.isOpen&&await this.close(),document.removeEventListener("click",this.onDocumentClick),this.picker.destroy(),this.externalEvents.removeAll()}toggle(e){return this.isOpen?this.close():this.open(e)}async open({triggerElement:e,referenceElement:t}={}){this.isOpen||(e&&(this.triggerElement=e),t&&(this.referenceElement=t),await this.initiateOpenStateChange(!0),this.popupEl.style.opacity="0",this.options.rootElement.appendChild(this.popupEl),await this.setPosition(),this.picker.reset(!1),await this.animatePopup(!0),await this.animateCloseButton(!0),this.picker.setInitialFocus(),this.externalEvents.emit("picker:open"))}async close(){var e;!this.isOpen||(await this.initiateOpenStateChange(!1),await this.animateCloseButton(!1),await this.animatePopup(!1),this.popupEl.remove(),this.picker.reset(),(e=this.positionCleanup)==null||e.call(this),this.focusTrap.deactivate(),this.externalEvents.emit("picker:close"))}getRunningAnimations(){return this.picker.el.getAnimations().filter(e=>e.playState==="running")}async setPosition(){var e;(e=this.positionCleanup)==null||e.call(this),this.positionCleanup=await oCe(this,this.popupEl,this.referenceElement,this.options.position)}awaitPendingAnimations(){return Promise.all(this.getRunningAnimations().map(e=>e.finished))}onDocumentClick(e){var t;let r=e.target,n=(t=this.triggerElement)==null?void 0:t.contains(r);this.isOpen&&!this.picker.isPickerClick(e)&&!n&&this.close()}animatePopup(e){return Uh(this.popupEl,{opacity:[0,1],transform:["scale(0.9)","scale(1)"]},{duration:150,id:e?"show-picker":"hide-picker",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}animateCloseButton(e){if(this.closeButton)return Uh(this.closeButton,{opacity:[0,1]},{duration:25,id:e?"show-close":"hide-close",easing:"ease-in-out",direction:e?"normal":"reverse",fill:"both"},this.options)}async initiateOpenStateChange(e){this.isOpen=e,await this.awaitPendingAnimations()}},hCe=`.picmo__popupContainer{display:flex;flex-direction:column;position:absolute}.picmo__popupContainer .picmo__closeButton{position:absolute;opacity:0;background:transparent;border:none;z-index:1;right:0;top:0;cursor:pointer;padding:4px;align-self:flex-end;transform:translate(50%,-50%);background:#999999;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:50%}.picmo__popupContainer .picmo__closeButton:hover{background:var(--accent-color)}.picmo__popupContainer .picmo__closeButton svg{fill:#fff;width:1.25rem;height:1.25rem} +`,fCe=r9();function Bte(i,e){return fCe(hCe),new s9(ue({autoFocus:"auto"},i),e)}var pCe={mounted(){let i=this.el.querySelector("[data-emoji-button]"),e=this.el.querySelector("[data-emoji-preview]"),t=this.el.querySelector("[data-emoji-input]"),r=Bte({showPreview:!1},{triggerElement:i,referenceElement:i,position:"bottom"});r.addEventListener("emoji:select",({emoji:n})=>{e.innerHTML=n,t.value=n}),i.addEventListener("click",n=>{r.toggle()})}},Hte=pCe;var mCe={mounted(){this.focus()},updated(){this.el!==document.activeElement&&this.focus()},focus(){Qd(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length,this.el.scrollLeft=this.el.scrollWidth)}},Ute=mCe;var gCe={mounted(){this.props=this.getProps(),this.isFocused=!1,this.insertMode=!1,this.initializeHeadingEl(),this.unsubscribeFromNavigationEvents=_r.subscribe("navigation",i=>{this.handleNavigationEvent(i)})},updated(){this.props=this.getProps(),this.initializeHeadingEl()},destroyed(){this.unsubscribeFromNavigationEvents()},getProps(){return Ri(this.el,["id","on-value-change","metadata"])},initializeHeadingEl(){let i=this.el.querySelector("[data-el-heading]");i!==this.headingEl&&(this.headingEl=i,this.headingEl.addEventListener("paste",e=>{e.preventDefault();let t=e.clipboardData.getData("text/plain").replace(` +`," ");document.execCommand("insertText",!1,t)}),this.headingEl.addEventListener("keydown",e=>{e.key==="Enter"&&e.preventDefault()}),this.headingEl.addEventListener("blur",e=>{setTimeout(()=>{this.isFocused&&this.insertMode&&(this.headingEl.focus(),jte(this.headingEl))},0)}))},handleNavigationEvent(i){i.type==="element_focused"?this.handleElementFocused(i.focusableId,i.scroll):i.type==="insert_mode_changed"&&this.handleInsertModeChanged(i.enabled)},handleElementFocused(i,e){this.props.id===i?(this.isFocused=!0,this.el.setAttribute("data-js-focused",""),e&&Zd(this.el)):this.isFocused&&(this.isFocused=!1,this.el.removeAttribute("data-js-focused"))},handleInsertModeChanged(i){this.isFocused&&!this.insertMode&&i?(this.insertMode=i,this.el.setAttribute("phx-update","ignore"),this.headingEl.setAttribute("contenteditable",""),this.headingEl.focus(),jte(this.headingEl)):this.insertMode&&!i&&(this.insertMode=i,this.headingEl.removeAttribute("contenteditable"),this.el.removeAttribute("phx-update"),this.pushEvent(this.props.onValueChange,{value:this.headingEl.textContent.trim(),metadata:this.props.metadata}))}};function jte(i){let e=document.createRange();e.selectNodeContents(i),e.collapse(!1);let t=window.getSelection();t.removeAllRanges(),t.addRange(e)}var Wte=gCe;var bCe={mounted(){this.props=this.getProps(),this.sourceEl=mc(this.el,"[data-source]"),this.targetEl=mc(this.el,"[data-target]"),this.updateDOM()},updated(){this.props=this.getProps(),this.updateDOM()},getProps(){return Ri(this.el,["language"])},updateDOM(){let i=this.sourceEl.innerText;cm(i,this.props.language).then(e=>{this.targetEl.innerHTML=e,this.el.setAttribute("data-highlighted","")})}},Vte=bCe;var l9=["bg-yellow-100","border-yellow-300"],vCe={mounted(){this.props=this.getProps(),this.inputEl=this.el.querySelector("[data-input]"),this.previewEl=this.el.querySelector("[data-preview]"),this.initialPreviewContentEl=this.previewEl.firstElementChild,this.cameraPreviewEl=this.el.querySelector("[data-camera-preview]"),this.cameraListEl=this.el.querySelector("[data-camera-list]"),this.cameraItemTemplateEl=this.cameraListEl.firstElementChild,this.cameraItemTemplateEl.remove(),this.uploadButton=this.el.querySelector("[data-btn-upload]"),this.openCameraButton=this.el.querySelector("[data-btn-open-camera]"),this.captureCameraButton=this.el.querySelector("[data-btn-capture-camera]"),this.cancelButton=this.el.querySelector("[data-btn-cancel]"),this.cameraListPopulated=!1,this.cameraVideoEl=null,this.cameraStream=null,this.updateImagePreview(),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.loadFile(e),this.closeCameraView()}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...l9)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...l9)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...l9)}),this.openCameraButton.addEventListener("click",i=>{this.cameraListPopulated||(this.renderCameraList(),this.cameraListPopulated=!0)}),this.cameraListEl.addEventListener("click",i=>{let e=i.target.closest("[data-camera-id]");if(e){let t=e.dataset.cameraId;this.openCameraView(t)}}),this.captureCameraButton.addEventListener("click",i=>{let e=this.toCanvas(this.cameraVideoEl,this.cameraVideoEl.videoWidth,this.cameraVideoEl.videoHeight);this.pushImage(e),this.closeCameraView()}),this.cancelButton.addEventListener("click",i=>{this.closeCameraView()})},updated(){this.props=this.getProps(),this.updateImagePreview()},getProps(){return Ri(this.el,["id","phx-target","height","width","format","fit","image-url","value-height","value-width"])},updateImagePreview(){this.props.imageUrl?wCe(this.props.imageUrl,this.props.valueHeight,this.props.valueWidth,this.props.format).then(i=>{this.setPreview(i)}):this.setPreview(this.initialPreviewContentEl)},loadFile(i){let e=new FileReader;e.onload=t=>{let r=document.createElement("img");r.addEventListener("load",n=>{let o=this.toCanvas(r,r.width,r.height);this.pushImage(o)}),r.src=t.target.result},e.readAsDataURL(i)},openCameraView(i){this.cameraPreviewEl.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.captureCameraButton.classList.remove("hidden"),this.previewEl.classList.add("hidden"),this.openCameraButton.classList.add("hidden"),this.uploadButton.classList.add("hidden"),navigator.mediaDevices.getUserMedia(this.cameraConstraints(i)).then(e=>{this.cameraStream=e,this.cameraVideoEl=document.createElement("video"),this.cameraVideoEl.autoplay=!0,this.cameraVideoEl.playsinline=!0,this.cameraVideoEl.muted=!0,this.cameraVideoEl.srcObject=e,this.setCameraPreview(this.cameraVideoEl)}).catch(()=>{})},cameraConstraints(i){return i==="system_default"?{audio:!1,video:!0}:{audio:!1,video:{deviceId:i}}},renderCameraList(){navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then(i=>navigator.mediaDevices.enumerateDevices().then(e=>(this.stopMediaStream(i),e))).then(i=>{let e=i.filter(t=>t.kind==="videoinput").map(t=>({deviceId:t.deviceId,label:t.label}));[{deviceId:"system_default",label:"System Default"},...e].forEach(({deviceId:t,label:r})=>{let n=this.cameraItemTemplateEl.cloneNode(!0);n.querySelector("[data-camera-id]").setAttribute("data-camera-id",t),n.querySelector("[data-label]").innerHTML=r,this.cameraListEl.appendChild(n)})}).catch(i=>{console.error(i),this.openCameraButton.disabled=!0})},closeCameraView(){return this.cameraStream!==null&&(this.stopMediaStream(this.cameraStream),this.cameraStream=null),this.cameraVideoEl!==null&&(this.cameraVideoEl.remove(),this.cameraVideoEl=null),this.cameraPreviewEl.classList.add("hidden"),this.cancelButton.classList.add("hidden"),this.captureCameraButton.classList.add("hidden"),this.previewEl.classList.remove("hidden"),this.openCameraButton.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),!0},stopMediaStream(i){i.getTracks().forEach(e=>{e.stop()})},pushImage(i){_Ce(i,this.props.format).then(e=>{let t={height:i.height,width:i.width},r=new Blob([e]);r.meta=()=>t,this.uploadTo(this.props.phxTarget,"file",[r])})},toCanvas(i,e,t){let{width:r,height:n}=this.props,o=document.createElement("canvas"),s=o.getContext("2d");if(r===null&&n===null||r===e&&n===t)o.width=e,o.height=t,o.getContext("2d").drawImage(i,0,0,e,t,0,0,e,t);else if(this.props.fit==="contain"){let a=r/e,l=n/t,c=Math.min(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=d,o.height=u,s.drawImage(i,0,0,e,t,0,0,d,u)}else if(this.props.fit==="crop"){let a=r/e,l=n/t,c=Math.max(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=r,o.height=n,s.drawImage(i,Math.round((d-r)/c/2),Math.round((u-n)/c/2),e-Math.round((d-r)/c),t-Math.round((u-n)/c),0,0,r,n)}else if(this.props.fit==="pad"){let a=r/e,l=n/t,c=Math.min(a,l),d=Math.round(e*c),u=Math.round(t*c);o.width=r,o.height=n,s.fillStyle="black",s.fillRect(0,0,o.width,o.height),s.drawImage(i,0,0,e,t,Math.round((r-d)/2),Math.round((n-u)/2),d,u)}else o.width=r,o.height=n,s.drawImage(i,0,0,e,t,0,0,r,n);return o},setPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.previewEl.replaceChildren(i)},setCameraPreview(i){i.style.maxHeight="300px",i.style.maxWidth="100%",this.cameraPreviewEl.replaceChildren(i)}};function _Ce(i,e){if(e==="png"||e==="jpeg")return new Promise((t,r)=>{i.toBlob(n=>{n.arrayBuffer().then(o=>{t(o)})},`image/${e}`)});if(e==="rgb"){let t=i.getContext("2d").getImageData(0,0,i.width,i.height),r=yCe(t);return Promise.resolve(r)}throw new Error(`Unexpected format: ${e}`)}function yCe(i){let e=i.width*i.height,t=new Uint8ClampedArray(e*3);for(let r=0;r<e;r++)t[r*3]=i.data[r*4],t[r*3+1]=i.data[r*4+1],t[r*3+2]=i.data[r*4+2];return t.buffer}function wCe(i,e,t,r){if(r==="png"||r==="jpeg"){let n=document.createElement("img");return n.src=i,Promise.resolve(n)}if(r==="rgb")return fetch(i).then(n=>n.arrayBuffer()).then(n=>{let o=document.createElement("canvas");o.height=e,o.width=t;let s=xCe(n,t,e);return o.getContext("2d").putImageData(s,0,0),o});throw new Error(`Unexpected format: ${r}`)}function xCe(i,e,t){let r=e*t,n=new Uint8Array(i),o=new Uint8ClampedArray(r*4);for(let s=0;s<r;s++)o[s*4]=n[s*3],o[s*4+1]=n[s*3+1],o[s*4+2]=n[s*3+2],o[s*4+3]=255;return new ImageData(o,e,t)}var qte=vCe;var CCe={mounted(){this.updateSrc()},updated(){this.updateSrc()},updateSrc(){let i=this.el.src,e="data:image/x-pixel;base64,",t=i.slice(e.length);if(i.startsWith(e)){let r=SQ(t),n=new DataView(r),o=n.getUint32(0,!1),s=n.getUint32(4,!1),a=n.getUint8(8),l=r.slice(9),c=SCe(l,s,o,a),d=document.createElement("canvas");d.height=o,d.width=s,d.getContext("2d").putImageData(c,0,0);let u=d.toDataURL("image/png");this.el.src=u}}};function SCe(i,e,t,r){let n=e*t,o=new Uint8Array(i),s=new Uint8ClampedArray(n*4);for(let a=0;a<n;a++)r===1?(s[a*4]=o[a],s[a*4+1]=o[a],s[a*4+2]=o[a],s[a*4+3]=255):r===2?(s[a*4]=o[a*2],s[a*4+1]=o[a*2],s[a*4+2]=o[a*2],s[a*4+3]=o[a*2+1]):r===3?(s[a*4]=o[a*3],s[a*4+1]=o[a*3+1],s[a*4+2]=o[a*3+2],s[a*4+3]=255):r===4&&(s[a*4]=o[a*4],s[a*4+1]=o[a*4+1],s[a*4+2]=o[a*4+2],s[a*4+3]=o[a*4+3]);return new ImageData(s,e,t)}var Kte=CCe;var kCe=document.querySelector("meta[name='csrf-token']").getAttribute("content"),c9=new ay(window.LIVEBOOK_BASE_URL_PATH+"/socket",{params:{_csrf_token:kCe}}),Kh=null;function $te(i){return Kh||(c9.connect(),Kh=c9.channel("js_view",{session_token:i}),Kh.join()),Kh}function Gte(){Kh&&(Kh.leave(),Kh=null,c9.disconnect())}function Yte(i,e){if(Array.isArray(e)&&e[1]&&e[1].constructor===ArrayBuffer){let[t,r]=e;return fB([i,t],r)}else return{root:[i,e]}}function d9(i){if(i.constructor===ArrayBuffer){let[[e,t],r]=pB(i);return[e,[t,r]]}else{let{root:[e,t]}=i;return[e,t]}}var Xte="wcqj5QWCo66osdAWDnEgPRFyL7nfe8oNqNggnw4vvW8=";function Qte(i,e,t){let r=ECe(e,t);return TCe(r).then(()=>{i.sandbox="allow-scripts allow-same-origin allow-downloads allow-forms allow-modals allow-popups allow-top-navigation",i.allow="accelerometer; ambient-light-sensor; camera; display-capture; encrypted-media; fullscreen; geolocation; gyroscope; microphone; midi; usb; xr-spatial-tracking; clipboard-read; clipboard-write",i.src=r})}function ECe(i,e){let t=window.location.protocol;return e?e.replace(/^https?:/,t):t==="https:"?"https://livebookusercontent.com/iframe/v5.html":`http://${window.location.hostname}:${i}/iframe/v5.html`}var u9=null;function TCe(i){return u9||(u9=fetch(i).then(e=>e.text()).then(e=>{if(xQ(e)!==Xte)throw new Error(`The iframe loaded from ${i} doesn't have the expected checksum ${Xte}`)})),u9}var ICe={mounted(){this.props=this.getProps(),this.id=f4(),this.childToken=yQ(),this.childReadyPromise=null,this.childReady=!1,this.initReceived=!1,this.syncCallbackQueue=[],this.pongCallbackQueue=[],this.initTimeout=setTimeout(()=>this.handleInitTimeout(),2e3),this.channel=$te(this.props.sessionToken),this.iframeActions=this.createIframe(),this.childReadyPromise=new Promise((n,o)=>{this._handleWindowMessage=s=>{s.source===this.iframe.contentWindow&&this.handleChildMessage(s.data,n)},window.addEventListener("message",this._handleWindowMessage)}),this.hiddenInput=document.createElement("input"),this.hiddenInput.style.display="none",this.el.appendChild(this.hiddenInput),this.iframeActions.visibilityPromise.then(()=>{this.loadIframe()});let i=this.channel.on(`init:${this.props.ref}:${this.id}`,n=>{let[,o]=d9(n);this.handleServerInit(o)}),e=this.channel.on(`event:${this.props.ref}`,n=>{let[[o],s]=d9(n);this.handleServerEvent(o,s)}),t=this.channel.on(`error:${this.props.ref}`,({message:n,init:o})=>{this.handleServerError(n,o)}),r=this.channel.on(`pong:${this.props.ref}`,()=>{this.handleServerPong()});this.unsubscribeFromChannelEvents=()=>{this.channel.off(`init:${this.props.ref}:${this.id}`,i),this.channel.off(`event:${this.props.ref}`,e),this.channel.off(`error:${this.props.ref}`,t),this.channel.off(`pong:${this.props.ref}`,r)},this.unsubscribeFromJSViewEvents=_r.subscribe(`js_views:${this.props.ref}`,n=>this.handleJSViewEvent(n)),this.channel.push("connect",{connect_token:this.props.connectToken,ref:this.props.ref,id:this.id},3e4),this.unsubscribeFromCellEvents=_r.subscribe("navigation",n=>this.handleNavigationEvent(n))},updated(){this.props=this.getProps(this)},disconnected(){this.el.removeAttribute("id")},destroyed(){window.removeEventListener("message",this._handleWindowMessage),this.iframeActions.remove(),this.unsubscribeFromChannelEvents(),this.channel.push("disconnect",{ref:this.props.ref}),this.unsubscribeFromJSViewEvents(),this.unsubscribeFromCellEvents()},getProps(){return Ri(this.el,["ref","assets-base-path","assets-cdn-url","js-path","session-token","connect-token","iframe-port","iframe-url","timeout-message"])},createIframe(){this.iframePlaceholder=document.createElement("div"),this.el.appendChild(this.iframePlaceholder),this.iframe=document.createElement("iframe"),this.iframe.className="w-full h-0 absolute z-[1]";let i=document.querySelector("[data-el-notebook]"),e=i.querySelector("[data-el-notebook-content]"),t=new ResizeObserver(a=>{this.repositionIframe()});t.observe(e),t.observe(i);let r=_r.subscribe("js_views",a=>{a.type==="reposition"&&this.repositionIframe()});this.iframe.addEventListener("mouseenter",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0}))}),this.iframe.addEventListener("mouseleave",a=>{this.iframePlaceholder.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0}))});let n=null,o=new Promise((a,l)=>{sN(this.iframePlaceholder)?a():(n=new IntersectionObserver(c=>{sN(this.iframePlaceholder)&&(n.disconnect(),a())}),n.observe(this.iframePlaceholder))});return this.iframe.toggleAttribute("data-js-focused",!!this.el.closest("[data-js-focused]")),{visibilityPromise:o,remove:()=>{t.disconnect(),r(),n&&n.disconnect(),this.iframe.remove(),this.iframePlaceholder.remove()}}},repositionIframe(){let{iframe:i,iframePlaceholder:e}=this,t=document.querySelector("[data-el-notebook]");if(Xd(e))i.classList.add("hidden");else{i.classList.remove("hidden");let r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=n.top-r.top+t.scrollTop;i.style.top=`${o}px`;let s=n.left-r.left+t.scrollLeft;i.style.left=`${s}px`,i.style.height=`${n.height}px`,i.style.width=`${n.width}px`}},loadIframe(){let i=document.querySelector("[data-el-js-view-iframes]");Qte(this.iframe,this.props.iframePort,this.props.iframeUrl).then(()=>{i.appendChild(this.iframe)})},handleChildMessage(i,e){if(i.type==="ready"&&!this.childReady)this.getAssetsBaseUrl().then(t=>{this.postMessage({type:"readyReply",token:this.childToken,baseUrl:t,jsPath:this.props.jsPath}),this.childReady=!0,e()});else{if(i.token!==this.childToken)throw new Error("Token mismatch");if(i.type==="resize")this.iframePlaceholder.style.height=`${i.height}px`,this.iframe.style.height=`${i.height}px`;else if(i.type==="domEvent"){let t=this.replicateDomEvent(i.event);i.isTargetEditable?this.hiddenInput.dispatchEvent(t):this.el.dispatchEvent(t)}else if(i.type==="event"){let{event:t,payload:r}=i,n=Yte([t,this.props.ref],r);this.channel.push("event",n)}else i.type==="syncReply"?(this.pongCallbackQueue.push(this.syncCallbackQueue.shift()),this.channel.push("ping",{ref:this.props.ref})):i.type==="selectSecret"?this.pushEvent("select_secret",{js_view_ref:this.props.ref,preselect_name:i.preselectName,options:i.options}):i.type==="setSmartCellEditorIntellisenseNode"&&this.pushEvent("set_smart_cell_editor_intellisense_node",{js_view_ref:this.props.ref,node:i.node,cookie:i.cookie})}},getAssetsBaseUrl(){return _3().then(i=>!i&&this.props.assetsCdnUrl?this.props.assetsCdnUrl:window.location.origin+this.props.assetsBasePath)},postMessage(i){this.iframe.contentWindow.postMessage(i,"*")},replicateDomEvent(i){if(i.type==="focus")return new FocusEvent("focus");if(i.type==="mousedown")return new MouseEvent("mousedown",{bubbles:!0});if(i.type==="keydown")return new KeyboardEvent(i.type,i.props)},handleInitTimeout(){this.initTimeoutContainer=document.createElement("div"),this.initTimeoutContainer.classList.add("info-box"),this.el.prepend(this.initTimeoutContainer),this.initTimeoutContainer.textContent=this.props.timeoutMessage},clearInitTimeout(){clearTimeout(this.initTimeout),this.initTimeoutContainer&&this.initTimeoutContainer.remove()},handleServerInit(i){this.clearInitTimeout(),this.initReceived=!0,this.childReadyPromise.then(()=>{this.postMessage({type:"init",data:i})})},handleServerEvent(i,e){this.initReceived&&this.childReadyPromise.then(()=>{this.postMessage({type:"event",event:i,payload:e})})},handleServerError(i,e){e&&this.clearInitTimeout(),this.errorContainer||(this.errorContainer=document.createElement("div"),this.errorContainer.classList.add("error-box","mb-4"),this.el.prepend(this.errorContainer)),this.errorContainer.textContent=i},handleServerPong(){this.pongCallbackQueue.shift()()},handleJSViewEvent(i){i.type==="sync"?(this.syncCallbackQueue.push(i.callback),this.postMessage({type:"sync"})):i.type=="secretSelected"&&this.postMessage({type:"secretSelected",secretName:i.secretName})},handleNavigationEvent(i){if(i.type==="element_focused"){let e=this.el.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null;this.iframe.toggleAttribute("data-js-focused",t===i.focusableId)}}};function _3(){return _3.promise=_3.promise||fetch("/public/health").then(i=>i.status===200).catch(i=>!1),_3.promise}var Zte=ICe;var LCe={mounted(){this.props=this.getProps(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentKeyUp=this.handleDocumentKeyUp.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),window.addEventListener("keydown",this._handleDocumentKeyDown,!0),window.addEventListener("keyup",this._handleDocumentKeyUp,!0),window.addEventListener("focus",this._handleDocumentFocus,!0)},updated(){this.props=this.getProps()},destroyed(){window.removeEventListener("keydown",this._handleDocumentKeyDown,!0),window.removeEventListener("keyup",this._handleDocumentKeyUp,!0),window.removeEventListener("focus",this._handleDocumentFocus,!0)},getProps(){return Ri(this.el,["cell-id","default-handlers","keydown-enabled","keyup-enabled","target"])},handleDocumentKeyDown(i){if(this.isKeyboardToggle(i)&&!Qd(document.activeElement)){el(i),this.keyboardEnabled()?this.disableKeyboard():this.enableKeyboard();return}if(this.keyboardEnabled()){if(this.props.defaultHandlers!=="on"&&el(i),i.repeat)return;if(this.props.keydownEnabled){let{key:e}=i;this.pushEventTo(this.props.target,"keydown",{key:e})}}},handleDocumentKeyUp(i){if(this.keyboardEnabled()&&(this.props.defaultHandlers!=="on"&&el(i),this.props.keyupEnabled)){let{key:e}=i;this.pushEventTo(this.props.target,"keyup",{key:e})}},handleDocumentFocus(i){this.props.keydownEnabled&&Qd(i.target)&&this.disableKeyboard()},enableKeyboard(){this.keyboardEnabled()||this.pushEventTo(this.props.target,"enable_keyboard",{})},disableKeyboard(){this.keyboardEnabled()&&this.pushEventTo(this.props.target,"disable_keyboard",{})},keyboardEnabled(){return this.props.keydownEnabled||this.props.keyupEnabled},isKeyboardToggle(i){if(i.repeat)return!1;let{metaKey:e,ctrlKey:t,key:r}=i;return(h4()?e:t)&&r==="k"&&this.isCellFocused()?!this.keyboardEnabled()||["on","disable_only"].includes(this.props.defaultHandlers):!1},isCellFocused(){let i=this.el.closest("[data-el-session]");return i&&i.getAttribute("data-js-focused-id")===this.props.cellId}},Jte=LCe;var ACe={mounted(){this.props=this.getProps(),this.templateEl=mc(this.el,"[data-template]"),this.contentEl=mc(this.el,"[data-content]"),this.markdown=new b4(this.contentEl,this.templateEl.textContent,{baseUrl:this.props.basePath,allowedUriSchemes:this.props.allowedUriSchemes})},updated(){this.props=this.getProps(),this.markdown.setContent(this.templateEl.textContent)},getProps(){return Ri(this.el,["base-path","allowed-uri-schemes"])}},eie=ACe;var DCe={mounted(){this.scroll()},updated(){this.scroll()},scroll(){iv(this.el)}},tie=DCe;var h9=class{constructor(e=2e3){this.resetTimeout=e,this.buffer=[],this.resetTimeoutId=null}push(e){this.buffer.push(e),this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=setTimeout(()=>{this.reset()},this.resetTimeout)}reset(){this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=null,this.buffer=[]}tryMatch(e){if(e.length>this.buffer.length)return!1;let t=this.buffer.slice(-e.length),r=e.every((n,o)=>n===t[o]);return r&&this.reset(),r}},iie=h9;var MCe={mounted(){this.props=this.getProps(),this.focusedId=null,this.insertMode=!1,this.view=null,this.viewOptions=null,this.keyBuffer=new iie,this.clientsMap={},this.lastLocationReportByClientId={},this.followedClientId=null,m4(this.faviconForEvaluationStatus(this.props.globalStatus)),this.updateSectionListHighlight(),this._handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this._handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this._handleDocumentFocus=this.handleDocumentFocus.bind(this),this._handleDocumentClick=this.handleDocumentClick.bind(this),document.addEventListener("keydown",this._handleDocumentKeyDown,!0),document.addEventListener("mousedown",this._handleDocumentMouseDown),document.addEventListener("focus",this._handleDocumentFocus,!0),document.addEventListener("click",this._handleDocumentClick),this.getElement("sections-list").addEventListener("click",i=>{this.handleSectionsListClick(i),this.handleCellIndicatorsClick(i)}),this.getElement("clients-list").addEventListener("click",i=>this.handleClientsListClick(i)),this.getElement("sections-list-toggle").addEventListener("click",i=>this.toggleSectionsList()),this.getElement("clients-list-toggle").addEventListener("click",i=>this.toggleClientsList()),this.getElement("secrets-list-toggle").addEventListener("click",i=>this.toggleSecretsList()),this.getElement("runtime-info-toggle").addEventListener("click",i=>this.toggleRuntimeInfo()),this.getElement("app-info-toggle").addEventListener("click",i=>this.toggleAppInfo()),this.getElement("files-list-toggle").addEventListener("click",i=>this.toggleFilesList()),this.getElement("notebook").addEventListener("scroll",i=>this.updateSectionListHighlight()),this.getElement("notebook-indicators").addEventListener("click",i=>this.handleCellIndicatorsClick(i)),this.getElement("views").addEventListener("click",i=>{this.handleViewsClick(i)}),this.getElement("section-toggle-collapse-all-button").addEventListener("click",i=>this.toggleCollapseAllSections()),this.initializeDragAndDrop(),window.addEventListener("phx:page-loading-stop",()=>{this.initializeFocus()},{once:!0}),this.handleEvent("session_init",({clients:i})=>{i.forEach(e=>{this.clientsMap[e.id]=e})}),this.handleEvent("cell_inserted",({cell_id:i})=>{this.handleCellInserted(i)}),this.handleEvent("cell_deleted",({cell_id:i,sibling_cell_id:e})=>{this.handleCellDeleted(i,e)}),this.handleEvent("cell_restored",({cell_id:i})=>{this.handleCellRestored(i)}),this.handleEvent("cell_moved",({cell_id:i})=>{this.handleCellMoved(i)}),this.handleEvent("section_inserted",({section_id:i})=>{this.handleSectionInserted(i)}),this.handleEvent("section_deleted",({section_id:i})=>{this.handleSectionDeleted(i)}),this.handleEvent("section_moved",({section_id:i})=>{this.handleSectionMoved(i)}),this.handleEvent("cell_upload",({cell_id:i,url:e})=>{this.handleCellUpload(i,e)}),this.handleEvent("client_joined",({client:i})=>{this.handleClientJoined(i)}),this.handleEvent("client_left",({client_id:i})=>{this.handleClientLeft(i)}),this.handleEvent("clients_updated",({clients:i})=>{this.handleClientsUpdated(i)}),this.handleEvent("secret_selected",({select_secret_ref:i,secret_name:e})=>{this.handleSecretSelected(i,e)}),this.handleEvent("location_report",({client_id:i,focusable_id:e,selection:t})=>{let r={focusableId:e,selection:this.decodeSelection(t)};this.handleLocationReport(i,r)}),this.unsubscribeFromSessionEvents=_r.subscribe("session",i=>{this.handleSessionEvent(i)})},updated(){let i=this.props;this.props=this.getProps(),this.props.globalStatus!==i.globalStatus&&m4(this.faviconForEvaluationStatus(this.props.globalStatus))},disconnected(){this.el.removeAttribute("id"),this.keepChannel=!0},destroyed(){this.unsubscribeFromSessionEvents(),document.removeEventListener("keydown",this._handleDocumentKeyDown,!0),document.removeEventListener("mousedown",this._handleDocumentMouseDown),document.removeEventListener("focus",this._handleDocumentFocus,!0),document.removeEventListener("click",this._handleDocumentClick),m4("favicon"),this.keepChannel||Gte()},getProps(){return Ri(this.el,["autofocus-cell-id","global-status"])},faviconForEvaluationStatus(i){return i==="evaluating"?"favicon-evaluating":i==="stale"?"favicon-stale":i==="errored"?"favicon-errored":"favicon"},handleDocumentKeyDown(i){if(i.repeat)return;let e=h4()?i.metaKey:i.ctrlKey,t=i.altKey,r=i.shiftKey,n=i.key,o=this.keyBuffer;if(!(Qd(i.target)&&i.target.closest("[data-el-outputs-container]"))){if(e&&r&&!t&&n==="Enter"){el(i),this.queueFullCellsEvaluation(!0);return}else if(!e&&r&&!t&&n==="Enter"){el(i),Fh(this.focusedCellType())&&this.queueFocusedCellEvaluation(),this.moveFocus(1);return}else if(e&&!t&&n==="Enter"){el(i),Fh(this.focusedCellType())&&this.queueFocusedCellEvaluation();return}else if(e&&n==="s"){el(i),this.saveNotebook();return}else if(e||t)return}this.insertMode?(o.reset(),n==="Escape"&&(this.escapesMonacoWidget(i)||this.escapeInsertMode())):Qd(i.target)?(o.reset(),n==="Escape"&&i.target.blur()):(o.push(i.key),o.tryMatch(["d","d"])?this.deleteFocusedCell():o.tryMatch(["e","a"])?this.queueFullCellsEvaluation(!1):o.tryMatch(["e","e"])?Fh(this.focusedCellType())&&this.queueFocusedCellEvaluation():o.tryMatch(["e","s"])?this.queueFocusedSectionEvaluation():o.tryMatch(["s","s"])?this.toggleSectionsList():o.tryMatch(["s","e"])?this.toggleSecretsList():o.tryMatch(["s","a"])?this.toggleAppInfo():o.tryMatch(["s","u"])?this.toggleClientsList():o.tryMatch(["s","f"])?this.toggleFilesList():o.tryMatch(["s","r"])?this.toggleRuntimeInfo():o.tryMatch(["s","b"])?this.showBin():o.tryMatch(["s","p"])?this.showPackageSearch():o.tryMatch(["e","x"])?this.cancelFocusedCellEvaluation():o.tryMatch(["0","0"])?this.reconnectRuntime():o.tryMatch(["Escape","Escape"])?this.setFocusedEl(null):o.tryMatch(["?"])?this.showShortcuts():o.tryMatch(["i"])||i.target.matches("body, [data-el-cell-body], [data-el-heading], [data-focusable-id]")&&this.focusedId&&n==="Enter"?(el(i),this.isInsertModeAvailable()&&this.enterInsertMode()):o.tryMatch(["j"])?this.moveFocus(1):o.tryMatch(["k"])?this.moveFocus(-1):o.tryMatch(["J"])?this.moveFocusedCell(1):o.tryMatch(["K"])?this.moveFocusedCell(-1):o.tryMatch(["n"])?this.insertCellBelowFocused("code"):o.tryMatch(["N"])?this.insertCellAboveFocused("code"):o.tryMatch(["m"])?(!this.view||this.viewOptions.showMarkdown)&&this.insertCellBelowFocused("markdown"):o.tryMatch(["M"])?(!this.view||this.viewOptions.showMarkdown)&&this.insertCellAboveFocused("markdown"):o.tryMatch(["v","z"])?this.toggleView("code-zen"):o.tryMatch(["v","p"])?this.toggleView("presentation"):o.tryMatch(["v","c"])?this.toggleView("custom"):o.tryMatch(["c"])?(!this.view||this.viewOptions.showSection)&&this.toggleCollapseSection():o.tryMatch(["C"])&&(!this.view||this.viewOptions.showSection)&&this.toggleCollapseAllSections())},escapesMonacoWidget(i){if(i.target.closest(".monaco-inputbox"))return!0;let e=i.target.closest(".monaco-editor.focused");return e?!!(e.querySelector(".editor-widget.parameter-hints-widget.visible")||e.querySelector(".editor-widget.suggest-widget.visible")||e.querySelectorAll(".cursor").length>1||["insert","visual"].includes(e.dataset.vimMode)):!1},handleDocumentMouseDown(i){if(!i.target.closest("[data-el-notebook]")||i.target.closest(".doctest-details-widget")){this.insertMode&&this.setInsertMode(!1);return}if(i.target.closest("[data-el-insert-buttons] button"))return;let e=i.target.closest("[data-focusable-id]"),t=e?e.dataset.focusableId:null,r=this.editableElementClicked(i,e);t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1}),!i.target.closest("[data-el-actions]")&&this.insertMode!==r&&this.setInsertMode(r)},editableElementClicked(i,e){if(e){let t=i.target.closest("[data-el-editor-container], [data-el-heading]");return t&&e.contains(t)}return!1},handleDocumentFocus(i){let e=i.target.closest&&i.target.closest("[data-focusable-id]");if(e){let t=e.dataset.focusableId;t!==this.focusedId&&this.setFocusedEl(t,{scroll:!1,focusElement:!1})}},handleDocumentClick(i){i.target.closest("[data-el-enable-insert-mode-button]")&&this.setInsertMode(!0),i.target.closest("[data-btn-package-search]")&&this.insertMode&&this.setInsertMode(!1);let e=i.target.closest("[data-el-queue-cell-evaluation-button]");if(e){let r=e.getAttribute("data-cell-id"),n=e.hasAttribute("data-disable-dependencies-cache");this.queueCellEvaluation(r,n)}let t=window.location.hash;if(t){let r=t.replace(/^#/,"");!document.getElementById(r).contains(i.target)&&!i.target.closest("a")&&history.pushState(null,document.title,window.location.pathname+window.location.search)}},handleSectionsListClick(i){let e=i.target.closest("[data-el-sections-list-item]");if(e){let t=e.getAttribute("data-section-id");this.getSectionById(t).scrollIntoView({behavior:"smooth",block:"start"})}},handleClientsListClick(i){let e=i.target.closest("[data-el-clients-list-item]");if(e){let t=e.getAttribute("data-client-id");i.target.closest("[data-el-client-link]")&&this.handleClientLinkClick(t),i.target.closest("[data-el-client-follow-toggle]")&&this.handleClientFollowToggleClick(t,e)}},handleClientLinkClick(i){this.mirrorClientFocus(i)},handleClientFollowToggleClick(i,e){let t=this.el.querySelector("[data-el-clients-list-item][data-js-followed]");t&&t.removeAttribute("data-js-followed"),i===this.followedClientId?this.followedClientId=null:(e.setAttribute("data-js-followed",""),this.followedClientId=i,this.mirrorClientFocus(i))},mirrorClientFocus(i){let e=this.lastLocationReportByClientId[i];e&&e.focusableId&&this.setFocusedEl(e.focusableId)},handleCellIndicatorsClick(i){let e=i.target.closest("[data-el-focus-cell-button]");if(e){let t=e.getAttribute("data-target");this.setFocusedEl(t)}},initializeFocus(){let i=window.location.hash;if(i){let e=i.replace(/^#/,""),t=document.getElementById(e);if(t){let r=t.closest("[data-focusable-id]");r?this.setFocusedEl(r.dataset.focusableId):t.scrollIntoView()}}else this.props.autofocusCellId&&(this.setFocusedEl(this.props.autofocusCellId,{scroll:!1}),this.setInsertMode(!0))},updateSectionListHighlight(){let i=this.el.querySelector("[data-el-sections-list-item][data-js-is-viewed]");i&&i.removeAttribute("data-js-is-viewed");let e=this.getSections().reverse().find(t=>{let{top:r}=t.getBoundingClientRect(),n=document.documentElement.scrollTop;return r<=n+window.innerHeight*.35});if(e){let t=e.getAttribute("data-section-id");this.el.querySelector(`[data-el-sections-list-item][data-section-id="${t}"]`).setAttribute("data-js-is-viewed","")}},initializeDragAndDrop(){let i=!1,e=null,t=null,r=(o=null)=>{if(!i){i=!0,e=o;let s=o?"internal":"external";this.el.setAttribute("data-js-dragging",s),s==="external"&&this.toggleFilesList(!0)}},n=()=>{i&&(i=!1,this.el.removeAttribute("data-js-dragging"))};this.el.addEventListener("dragstart",o=>{r(o.target)}),this.el.addEventListener("dragenter",o=>{r()}),this.el.addEventListener("dragleave",o=>{this.el.contains(o.relatedTarget)||n()}),this.el.addEventListener("dragover",o=>{o.stopPropagation(),o.preventDefault()}),this.el.addEventListener("drop",o=>{o.stopPropagation(),o.preventDefault();let s=o.target.closest("[data-el-insert-drop-area]"),a=o.target.closest("[data-el-files-drop-area]");if(s){let l=s.getAttribute("data-section-id")||null,c=s.getAttribute("data-cell-id")||null;if(o.dataTransfer.files.length>0)t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{section_id:l,cell_id:c});else if(e&&e.matches("[data-el-file-entry]")){let d=e.getAttribute("data-name");this.pushEvent("insert_file",{file_entry_name:d,section_id:l,cell_id:c})}}else a&&o.dataTransfer.files.length>0&&(t=o.dataTransfer.files,this.pushEvent("handle_file_drop",{}));n()}),this.handleEvent("finish_file_drop",o=>{let s=document.querySelector('#add-file-entry-modal input[type="file"]');s&&(s.files=t,s.dispatchEvent(new Event("change",{bubbles:!0})))})},toggleSectionsList(i=null){this.toggleSidePanelContent("sections-list",i)},toggleClientsList(i=null){this.toggleSidePanelContent("clients-list",i)},toggleSecretsList(i=null){this.toggleSidePanelContent("secrets-list",i)},toggleAppInfo(i=null){this.toggleSidePanelContent("app-info",i)},toggleFilesList(i=null){this.toggleSidePanelContent("files-list",i)},toggleRuntimeInfo(i=null){this.toggleSidePanelContent("runtime-info",i)},toggleSidePanelContent(i,e=null){(e===null?this.el.getAttribute("data-js-side-panel-content")!==i:e)?this.el.setAttribute("data-js-side-panel-content",i):this.el.removeAttribute("data-js-side-panel-content")},showBin(){let i=this.el.querySelector("[data-btn-show-bin]");i&&i.click()},showPackageSearch(){this.setFocusedEl("setup");let i=this.el.querySelector("[data-btn-package-search]");i&&i.click()},saveNotebook(){this.pushEvent("save",{})},deleteFocusedCell(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("delete_cell",{cell_id:this.focusedId})},queueCellEvaluation(i,e){this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:i,disable_dependencies_cache:e})})},queueFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_cell_evaluation",{cell_id:this.focusedId})})},queueFullCellsEvaluation(i){let e=i&&this.focusedId&&this.isCell(this.focusedId)?[this.focusedId]:[];this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_full_evaluation",{forced_cell_ids:e})})},queueFocusedSectionEvaluation(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);i&&this.dispatchQueueEvaluation(()=>{this.pushEvent("queue_section_evaluation",{section_id:i})})}},dispatchQueueEvaluation(i){Fh(this.focusedCellType())?_r.broadcast(`cells:${this.focusedId}`,{type:"dispatch_queue_evaluation",dispatch:i}):i()},cancelFocusedCellEvaluation(){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("cancel_cell_evaluation",{cell_id:this.focusedId})},reconnectRuntime(){this.pushEvent("reconnect_runtime",{})},showShortcuts(){let i=this.el.querySelector("[data-btn-show-shortcuts]");i&&i.click()},isInsertModeAvailable(){if(!this.focusedId)return!1;let i=this.getFocusableEl(this.focusedId);return!this.isCell(this.focusedId)||!i.hasAttribute("data-js-insert-mode-disabled")},enterInsertMode(){this.focusedId&&this.setInsertMode(!0)},escapeInsertMode(){this.setInsertMode(!1)},moveFocus(i){let e=this.nearbyFocusableId(this.focusedId,i);this.setFocusedEl(e)},moveFocusedCell(i){this.focusedId&&this.isCell(this.focusedId)&&this.pushEvent("move_cell",{cell_id:this.focusedId,offset:i})},insertCellBelowFocused(i){if(this.focusedId)this.insertCellBelowFocusableId(this.focusedId,i);else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[e.length-1],i)}},insertCellAboveFocused(i){if(this.focusedId){let e=this.nearbyFocusableId(this.focusedId,-1);this.insertCellBelowFocusableId(e,i)}else{let e=this.getFocusableIds();e.length>0&&this.insertCellBelowFocusableId(e[0],i)}},insertCellBelowFocusableId(i,e){if(this.isCell(i))this.pushEvent("insert_cell_below",{type:e,cell_id:i});else if(this.isSection(i))this.pushEvent("insert_cell_below",{type:e,section_id:i});else if(this.isNotebook(i)){let t=this.getSectionIds();t.length>0&&this.pushEvent("insert_cell_below",{type:e,section_id:t[0]})}},setFocusedEl(i,{scroll:e=!0,focusElement:t=!0}={}){if(this.focusedId=i,i?this.el.setAttribute("data-js-focused-id",i):this.el.removeAttribute("data-js-focused-id"),i){if(!this.isSection(i)){let n=this.getSectionIdByFocusableId(i);n&&this.getSectionById(n).removeAttribute("data-js-collapsed")}let r=this.getFocusableEl(i);t&&(r.querySelector("[data-el-cell-body]")||r.querySelector("[data-el-heading]")||r).focus({preventScroll:!0})}_r.broadcast("navigation",{type:"element_focused",focusableId:i,scroll:e}),this.setInsertMode(!1)},setInsertMode(i){this.insertMode=i,i?this.el.setAttribute("data-js-insert-mode",""):(this.el.removeAttribute("data-js-insert-mode"),this.sendLocationReport({focusableId:this.focusedId,selection:null})),_r.broadcast("navigation",{type:"insert_mode_changed",enabled:i})},handleViewsClick(i){let e=i.target.closest("[data-el-view-toggle]");if(e){let t=e.getAttribute("data-el-view-toggle");this.toggleView(t)}},toggleView(i){i===this.view?(this.unsetView(),i==="custom"&&this.unsubscribeCustomViewFromSettings()):i==="code-zen"?this.setView(i,{showSection:!1,showMarkdown:!1,showOutput:!0,spotlight:!1}):i==="presentation"?this.setView(i,{showSection:!0,showMarkdown:!0,showOutput:!0,spotlight:!0}):i==="custom"&&(this.unsubscribeCustomViewFromSettings=nr.getAndSubscribe(t=>{this.setView(i,{showSection:t.custom_view_show_section,showMarkdown:t.custom_view_show_markdown,showOutput:t.custom_view_show_output,spotlight:t.custom_view_spotlight})}),this.pushEvent("open_custom_view_settings"));let e=this.focusedId||this.nearbyFocusableId(null,0);if(e){let t=this.ensureVisibleFocusableEl(e);t!==this.focused&&this.setFocusedEl(t,{scroll:!1}),t&&this.getFocusableEl(t).scrollIntoView({block:"center"})}},setView(i,e){this.view=i,this.viewOptions=e,this.el.setAttribute("data-js-view",i),this.el.toggleAttribute("data-js-hide-section",!e.showSection),this.el.toggleAttribute("data-js-hide-markdown",!e.showMarkdown),this.el.toggleAttribute("data-js-hide-output",!e.showOutput),this.el.toggleAttribute("data-js-spotlight",e.spotlight)},unsetView(){this.view=null,this.viewOptions=null,this.el.removeAttribute("data-js-view"),this.el.removeAttribute("data-js-hide-section"),this.el.removeAttribute("data-js-hide-markdown"),this.el.removeAttribute("data-js-hide-output"),this.el.removeAttribute("data-js-spotlight")},toggleCollapseSection(){if(this.focusedId){let i=this.getSectionIdByFocusableId(this.focusedId);if(i){let e=this.getSectionById(i);e.hasAttribute("data-js-collapsed")?e.removeAttribute("data-js-collapsed"):(e.setAttribute("data-js-collapsed",""),this.setFocusedEl(i,{scroll:!0}))}}},toggleCollapseAllSections(){let i=this.getSections().every(e=>e.hasAttribute("data-js-collapsed"));if(this.getSections().forEach(e=>{e.toggleAttribute("data-js-collapsed",!i)}),this.focusedId){let e=this.getSectionIdByFocusableId(this.focusedId);e&&this.setFocusedEl(e,{scroll:!0})}},handleCellInserted(i){this.setFocusedEl(i),DQ(this.focusedCellType())&&this.setInsertMode(!0)},handleCellDeleted(i,e){if(this.focusedId===i)if(this.view){let t=this.ensureVisibleFocusableEl(e);this.setFocusedEl(t)}else this.setFocusedEl(e)},handleCellRestored(i){this.setFocusedEl(i)},handleCellMoved(i){this.repositionJSViews(),this.focusedId===i&&_r.broadcast("cells",{type:"cell_moved",cellId:i})},handleSectionInserted(i){let t=this.getSectionById(i).querySelector("[data-el-section-headline]"),{focusableId:r}=t.dataset;this.setFocusedEl(r),this.setInsertMode(!0),gQ(document.activeElement)},handleSectionDeleted(i){this.focusedId&&!this.getFocusableEl(this.focusedId)&&this.setFocusedEl(null)},handleSectionMoved(i){this.repositionJSViews();let e=this.getSectionById(i);Zd(e)},handleCellUpload(i,e){this.focusedId!==i&&this.setFocusedEl(i),this.insertMode||this.setInsertMode(!0),_r.broadcast("cells",{type:"cell_upload",cellId:i,url:e})},handleClientJoined(i){this.clientsMap[i.id]=i},handleClientLeft(i){let e=this.clientsMap[i];e&&(delete this.clientsMap[i],this.broadcastLocationReport(e,{focusableId:null,selection:null}),e.id===this.followedClientId&&(this.followedClientId=null))},handleClientsUpdated(i){i.forEach(e=>{this.clientsMap[e.id]=e})},handleSecretSelected(i,e){_r.broadcast(`js_views:${i}`,{type:"secretSelected",secretName:e})},handleLocationReport(i,e){let t=this.clientsMap[i];this.lastLocationReportByClientId[i]=e,t&&(this.broadcastLocationReport(t,e),t.id===this.followedClientId&&e.focusableId!==this.focusedId&&this.setFocusedEl(e.focusableId))},handleSessionEvent(i){i.type==="cursor_selection_changed"&&this.sendLocationReport({focusableId:i.focusableId,selection:i.selection})},repositionJSViews(){_r.broadcast("js_views",{type:"reposition"})},broadcastLocationReport(i,e){_r.broadcast("navigation",{type:"location_report",client:i,report:e})},sendLocationReport(i){Object.keys(this.clientsMap).length>1&&this.pushEvent("location_report",{focusable_id:i.focusableId,selection:this.encodeSelection(i.selection)})},encodeSelection(i){if(i===null)return null;let{tag:e,editorSelection:t}=i;return[e,t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn]},decodeSelection(i){if(i===null)return null;let[e,t,r,n,o]=i,s=new ui.Selection(t,r,n,o);return{tag:e,editorSelection:s}},focusedCellType(){return this.focusedId&&this.isCell(this.focusedId)?this.getFocusableEl(this.focusedId).getAttribute("data-type"):null},nearbyFocusableId(i,e){let t=this.getFocusableIds();if(t.length===0)return null;let r=t.indexOf(i);if(r===-1){let n=this.getFocusableEls().find(oN);return n?n.getAttribute("data-focusable-id"):t[0]}else{let n=pQ(r+e,0,t.length-1);return t[n]}},ensureVisibleFocusableEl(i){let e=this.getFocusableEl(i),t=Array.from(this.el.querySelectorAll("[data-focusable-id]")),r=t.indexOf(e),n=[...t.slice(r,-1),...t.slice(0,r).reverse()].find(o=>!Xd(o));return n&&n.getAttribute("data-focusable-id")},isCell(i){return this.getFocusableEl(i).hasAttribute("data-el-cell")},isSection(i){return this.getFocusableEl(i).hasAttribute("data-el-section-headline")},isNotebook(i){return this.getFocusableEl(i).hasAttribute("data-el-notebook-headline")},getFocusableEl(i){return this.el.querySelector(`[data-focusable-id="${i}"]`)},getFocusableEls(){return Array.from(this.el.querySelectorAll("[data-focusable-id]")).filter(i=>!Xd(i))},getFocusableIds(){return this.getFocusableEls().map(i=>i.getAttribute("data-focusable-id"))},getSectionIdByFocusableId(i){let t=this.getFocusableEl(i).closest("[data-el-section]");return t&&t.getAttribute("data-section-id")},getSectionIds(){return this.getSections().map(e=>e.getAttribute("data-section-id"))},getSections(){return Array.from(this.el.querySelectorAll("[data-el-section]"))},getSectionById(i){return this.el.querySelector(`[data-el-section][data-section-id="${i}"]`)},getElement(i){return this.el.querySelector(`[data-el-${i}]`)}},rie=MCe;var NCe={mounted(){this.autosize(),this.el.addEventListener("input",i=>{this.autosize()})},updated(){this.autosize()},autosize(){this.el.style.height="0px",this.el.style.height=`${this.el.scrollHeight+2}px`}},nie=NCe;var RCe=100,PCe={mounted(){this.props=this.getProps(),this.interval=setInterval(()=>this.updateDOM(),RCe)},updated(){this.props=this.getProps(),this.updateDOM()},destroyed(){clearInterval(this.interval)},getProps(){return Ri(this.el,["start"])},updateDOM(){let e=(Date.now()-new Date(this.props.start))/1e3;this.el.innerHTML=`${e.toFixed(1)}s`}},oie=PCe;var sie="lb:user_data";function aie(i){let e=JSON.stringify(i),t=vQ(e);FCe(sie,t,15768e4)}function lie(){let i=OCe(sie);if(i){let e=_Q(i);return JSON.parse(e)}else return null}function OCe(i){let e=document.cookie.split("; ").find(t=>t.startsWith(`${i}=`));return e?e.replace(`${i}=`,""):null}function FCe(i,e,t){let r=`${i}=${e};max-age=${t};path=/${g4()}`;document.cookie=r}var zCe={mounted(){this.el.addEventListener("submit",i=>{let e=this.el.user_form_name.value,t=this.el.user_form_hex_color.value;aie({name:e,hex_color:t})})}},cie=zCe;var BCe={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.datetimeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return Ri(this.el,["utc-value","utc-min","utc-max","phx-target"])},updateAttrs(){this.el.value=this.datetimeUtcToLocal(this.props.utcValue),this.el.min=this.datetimeUtcToLocal(this.props.utcMin),this.el.max=this.datetimeUtcToLocal(this.props.utcMax)},datetimeUtcToLocal(i){if(!i)return null;let e=new Date(i+"Z"),t=e.getFullYear().toString(),r=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0");return`${t}-${r}-${n}T${o}:${s}:${a}`},datetimeLocalToUtc(i){if(!i)return null;let e=new Date(i),t=e.getUTCFullYear().toString(),r=(e.getUTCMonth()+1).toString().padStart(2,"0"),n=e.getUTCDate().toString().padStart(2,"0"),o=e.getUTCHours().toString().padStart(2,"0"),s=e.getUTCMinutes().toString().padStart(2,"0"),a=e.getUTCSeconds().toString().padStart(2,"0");return`${t}-${r}-${n}T${o}:${s}:${a}`}},die=BCe;var HCe={mounted(){this.props=this.getProps(),this.updateAttrs(),this.el.addEventListener("blur",i=>{let e=this.timeLocalToUtc(this.el.value);this.pushEventTo(this.props.phxTarget,"change",{html_value:e})})},updated(){this.props=this.getProps(),this.updateAttrs()},getProps(){return Ri(this.el,["utc-value","utc-min","utc-max","phx-target"])},updateAttrs(){this.el.value=this.timeUtcToLocal(this.props.utcValue),this.el.min=this.timeUtcToLocal(this.props.utcMin),this.el.max=this.timeUtcToLocal(this.props.utcMax)},timeUtcToLocal(i){if(!i)return null;let e=new Date;e.setUTCHours(...i.split(":"));let t=e.getHours().toString().padStart(2,"0"),r=e.getMinutes().toString().padStart(2,"0"),n=e.getSeconds().toString().padStart(2,"0");return`${t}:${r}:${n}`},timeLocalToUtc(i){if(!i)return null;let e=new Date;e.setHours(...i.split(":"));let t=e.getUTCHours().toString().padStart(2,"0"),r=e.getUTCMinutes().toString().padStart(2,"0"),n=e.getUTCSeconds().toString().padStart(2,"0");return`${t}:${r}:${n}`}},uie=HCe;var pie=Wn(fie());var UCe={mounted(){this.props=this.getProps(),this.lineHeight=mQ(this.el),this.templateEl=mc(this.el,"[data-template]"),this.contentEl=mc(this.el,"[data-content]"),this.capLines();let i=this.hyperListConfig();this.virtualizedList=new pie.default(this.contentEl,i),this.props.follow&&iv(this.contentEl)},updated(){this.props=this.getProps(),this.capLines();let i=this.props.follow&&bQ(this.contentEl),e=this.hyperListConfig();this.virtualizedList.refresh(this.contentEl,e),i&&iv(this.contentEl)},getProps(){return Ri(this.el,["max-height","follow","max-lines","ignore-trailing-empty-line"])},hyperListConfig(){let i=this.getLineElements(),e=i.length,t=Math.min(this.props.maxHeight,this.lineHeight*e);return{height:t,total:e,itemHeight:this.lineHeight,generate:r=>{let n=i[r].cloneNode(!0);return n.removeAttribute("id"),n},afterRender:()=>{this.contentEl.scrollWidth>this.contentEl.clientWidth?this.contentEl.style.height=`${t+12}px`:this.contentEl.style.height=`${t}px`}}},getLineElements(){let i=Array.from(this.templateEl.querySelectorAll("[data-line]"));if(i.length===0)return[];let e=i[i.length-1];return this.props.ignoreTrailingEmptyLine&&e.innerText===""?i.slice(0,-1):i},capLines(){if(this.props.maxLines){let e=Array.from(this.templateEl.querySelectorAll("[data-line]")).slice(0,-this.props.maxLines),[t,...r]=e;r.forEach(n=>n.remove()),t&&(t.innerHTML="...")}}},mie=UCe;var jCe={mounted(){let i=nr.get(),e=this.el.querySelector('[name="show_section"][value="true"]'),t=this.el.querySelector('[name="show_markdown"][value="true"]'),r=this.el.querySelector('[name="show_output"][value="true"]'),n=this.el.querySelector('[name="spotlight"][value="true"]');e.checked=i.custom_view_show_section,t.checked=i.custom_view_show_markdown,r.checked=i.custom_view_show_output,n.checked=i.custom_view_spotlight,e.addEventListener("change",o=>{nr.update({custom_view_show_section:o.target.checked})}),t.addEventListener("change",o=>{nr.update({custom_view_show_markdown:o.target.checked})}),r.addEventListener("change",o=>{nr.update({custom_view_show_output:o.target.checked})}),n.addEventListener("change",o=>{nr.update({custom_view_spotlight:o.target.checked})})}},gie=jCe;var bie={AppAuth:uB,AudioInput:mB,Cell:MQ,CellEditor:Jee,Dropzone:ete,EditorSettings:tte,EmojiPicker:Hte,FocusOnUpdate:Ute,Headline:Wte,Highlight:Vte,ImageInput:qte,ImageOutput:Kte,JSView:Zte,KeyboardControl:Jte,MarkdownRenderer:eie,ScrollOnUpdate:tie,Session:rie,TextareaAutosize:nie,Timer:oie,UserForm:cie,UtcDateTimeInput:die,UtcTimeInput:uie,VirtualizedLines:mie,CustomViewSettings:gie};var vie={onBeforeElUpdated(i,e){for(let t of i.attributes)t.name.startsWith("data-js-")&&e.setAttribute(t.name,t.value),t.name==="data-keep-attribute"&&(i.hasAttribute(t.value)?e.setAttribute(t.value,i.getAttribute(t.value)):e.removeAttribute(t.value))},onNodeAdded(i){if(i.nodeType===Node.ELEMENT_NODE&&i.hasAttribute("autofocus")&&(i.focus(),i.setSelectionRange&&i.value)){let e=i.value.length;i.setSelectionRange(e,e)}}};var w3=Wn(yie());function wie(){w3.default.config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"}),window.addEventListener("phx:page-loading-start",()=>{w3.default.show(500)}),window.addEventListener("phx:page-loading-stop",()=>{w3.default.hide()})}function xie(){window.addEventListener("lb:focus",i=>{requestAnimationFrame(()=>{i.target.focus()})}),window.addEventListener("lb:set_value",i=>{i.target.value=i.detail.value}),window.addEventListener("lb:check",i=>{i.target.checked=!0}),window.addEventListener("lb:uncheck",i=>{i.target.checked=!1}),window.addEventListener("lb:set_text",i=>{i.target.textContent=i.detail.value}),window.addEventListener("lb:clipcopy",i=>{"clipboard"in navigator?i.detail.content?navigator.clipboard.writeText(i.detail.content):i.target.tagName==="INPUT"?navigator.clipboard.writeText(i.target.value):navigator.clipboard.writeText(i.target.textContent):alert(`Sorry, your browser does not support clipboard copy. +This generally requires a secure origin \u2014 either HTTPS or localhost.`)}),window.addEventListener("lb:scroll_into_view",i=>{fQ(i.target).then(()=>{y4(i.target,{scrollMode:"if-needed",behavior:"smooth",block:"nearest",inline:"nearest"})})}),window.addEventListener("phx:lb:exec_js",i=>{let e=i.detail.to||"body";document.querySelectorAll(e).forEach(t=>{window.liveSocket.execJS(t,i.detail.js)})}),window.addEventListener("lb:session_list:on_selection_change",()=>{let i=!!document.querySelector("[name='session_ids[]']:checked"),e=document.querySelector("#edit-sessions [name='disconnect']"),t=document.querySelector("#edit-sessions [name='close_all']");e.parentElement.classList.toggle("pointer-events-none",!i),e.parentElement.classList.toggle("opacity-50",!i),t.parentElement.classList.toggle("pointer-events-none",!i),t.parentElement.classList.toggle("opacity-50",!i)}),window.addEventListener("contextmenu",i=>{let e=i.target.closest("[data-contextmenu-trigger-click]");e&&(i.preventDefault(),e.dispatchEvent(new Event("mousedown",{bubbles:!0})),e.dispatchEvent(new Event("click",{bubbles:!0})))}),window.addEventListener("submit",i=>{i.target.hasAttribute("phx-nosubmit")&&(i.preventDefault(),i.stopPropagation())},{capture:!0})}function Cie(){let i=/AppleWebKit/.test(navigator.userAgent),e="ontouchstart"in window||navigator.maxTouchPoints>0;if(i&&e){let t=document.querySelector("meta[name='viewport']");t&&(t.content+=", maximum-scale=1.0")}}var p9="confirm-opted-out-ids";function Sie(){return Cu(p9)||[]}function kie(){window.addEventListener("phx:add_confirm_opt_out_id",i=>{let e=Cu(p9)||[],t=i.detail.opt_out_id;e.push(t),If(p9,e)})}function WCe(){let i=document.querySelector("meta[name='csrf-token']").getAttribute("content"),e=new sB(window.LIVEBOOK_BASE_URL_PATH+"/live",ay,{params:t=>({_csrf_token:i,user_data:lie(),app_auth_token:dB(),confirm_opt_out_ids:Sie()}),hooks:bie,dom:vie});wie(),xie(),kie(),Cie(),nr.getAndSubscribe(t=>{document.body.setAttribute("data-editor-theme",t.editor_theme)}),e.connect(),window.liveSocket=e}if(VCe())WCe();else{let i=document.createElement("div");i.innerHTML=` <div class="fixed top-0 bottom-0 left-0 right-0 z-[1000] px-4 py-8 bg-gray-900/95 flex justify-center items-center"> <div class="max-w-[600px] w-full flex flex-col"> <div class="text-xl text-gray-100 font-medium">