db-studio 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +75 -75
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/{_pathlessLayout-BQk5gSGn.js → _pathlessLayout-CUDS1e28.js} +1 -1
- package/dist/web-dist/assets/_pathlessLayout-WZkezfN7.js +2 -0
- package/dist/web-dist/assets/{_queryId-Buy3oA5p.js → _queryId-CEJb62Vl.js} +1 -1
- package/dist/web-dist/assets/{_table-CE0TjrEn.js → _table-6SZEx92j.js} +1 -1
- package/dist/web-dist/assets/_table-BUNHOVIK.js +1 -0
- package/dist/web-dist/assets/_table-CwyP_2EP.js +1 -0
- package/dist/web-dist/assets/{abap-B7CMCXo3.js → abap-B-HzHdT_.js} +1 -1
- package/dist/web-dist/assets/{apex-D6pniLV0.js → apex-t5VcK3BF.js} +1 -1
- package/dist/web-dist/assets/{azcli-DayXln6N.js → azcli-Ce3iuV2p.js} +1 -1
- package/dist/web-dist/assets/{badge-BIuMcm7O.js → badge-COF6gx-2.js} +1 -1
- package/dist/web-dist/assets/{bat-knBi4IWo.js → bat-bOBZcLbK.js} +1 -1
- package/dist/web-dist/assets/{bicep-CqySwd8I.js → bicep-TSicgsnM.js} +1 -1
- package/dist/web-dist/assets/{browser-DQEdJbyz.js → browser-B-fV6CZb.js} +1 -1
- package/dist/web-dist/assets/{bundle-mjs-qYDTi1yn.js → bundle-mjs-CZwf2xtr.js} +1 -1
- package/dist/web-dist/assets/{cameligo-D1w-uj2C.js → cameligo-D-9xpPXV.js} +1 -1
- package/dist/web-dist/assets/{chat-sidebar-CApWlRXq.js → chat-sidebar-DwzCElBd.js} +5 -5
- package/dist/web-dist/assets/{clojure-D7bkK2B8.js → clojure-9X3x3csE.js} +1 -1
- package/dist/web-dist/assets/{code-editor-Dwq67W-h.js → code-editor-tPwHd3zF.js} +4 -4
- package/dist/web-dist/assets/{coffee-Dpij46Wn.js → coffee-anOch8Z-.js} +1 -1
- package/dist/web-dist/assets/{connect-B0x9CNlf.js → connect-l3LjAClZ.js} +1 -1
- package/dist/web-dist/assets/{constants-BFCsZ8ll.js → constants-CKAehpPm.js} +3 -3
- package/dist/web-dist/assets/{cpp-DWDORc6B.js → cpp-oW293AoF.js} +1 -1
- package/dist/web-dist/assets/{csharp-FpOMvD_o.js → csharp-BOXMgm5k.js} +1 -1
- package/dist/web-dist/assets/{csp-4WiITR2R.js → csp-D67JhNKT.js} +1 -1
- package/dist/web-dist/assets/{css-DMOWqvgH.js → css-Bk6H7_K_.js} +1 -1
- package/dist/web-dist/assets/{cssMode-DHL98brF.js → cssMode-G6latsS7.js} +1 -1
- package/dist/web-dist/assets/{cypher-Byev8hZE.js → cypher-DB0LBjic.js} +1 -1
- package/dist/web-dist/assets/{dart--T4f3SxI.js → dart-CS3MbwLP.js} +1 -1
- package/dist/web-dist/assets/{database.store-BAbH5Geu.js → database.store-BuqVJMY6.js} +13 -13
- package/dist/web-dist/assets/{dist-C_AEsM_Y.js → dist-Bz0qAN0x.js} +1 -1
- package/dist/web-dist/assets/{dist-D4lNl-zm.js → dist-Cf0L32Jd.js} +1 -1
- package/dist/web-dist/assets/{dockerfile-CTL_qQGw.js → dockerfile-BGz3qsmk.js} +1 -1
- package/dist/web-dist/assets/{ecl-D2-VZ5jm.js → ecl-lt3qcklx.js} +1 -1
- package/dist/web-dist/assets/{editor.api-DaW7cLxE.js → editor.api-BTIrAcm5.js} +1 -1
- package/dist/web-dist/assets/{elixir-C__1cTub.js → elixir-cMyUafed.js} +1 -1
- package/dist/web-dist/assets/{esm-DHRCgDAS.js → esm-B-4Q6MuQ.js} +1 -1
- package/dist/web-dist/assets/{flow9-U08FhG_o.js → flow9-BI9V6TuS.js} +1 -1
- package/dist/web-dist/assets/{format-cell-value-BDXXdObX.js → format-cell-value-CgUtYv8B.js} +1 -1
- package/dist/web-dist/assets/{freemarker2-EL1xRRz-.js → freemarker2-mnCFA3xV.js} +1 -1
- package/dist/web-dist/assets/{fsharp-BYeUdvUi.js → fsharp-I1kqnt0E.js} +1 -1
- package/dist/web-dist/assets/{go-D7V_ae37.js → go-Cg4qMFVj.js} +1 -1
- package/dist/web-dist/assets/{graphql-C-zVsbUk.js → graphql-CvtHcP49.js} +1 -1
- package/dist/web-dist/assets/{handlebars-BgZpkJkF.js → handlebars-BUcE6Uyy.js} +1 -1
- package/dist/web-dist/assets/{hcl-B7_QCGTQ.js → hcl-BkvCdKNu.js} +1 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-t8UIAZOZ.js +1 -0
- package/dist/web-dist/assets/{html-e4Xrzf8r.js → html-BBqcfykD.js} +1 -1
- package/dist/web-dist/assets/{htmlMode-B6WabTqV.js → htmlMode-D8je66Rk.js} +1 -1
- package/dist/web-dist/assets/icons-DxFtdMXW.js +1 -0
- package/dist/web-dist/assets/index-QVi4Lb9U.css +2 -0
- package/dist/web-dist/assets/index-WFVurGCI.js +34 -0
- package/dist/web-dist/assets/{indexes-BBz0Je_a.js → indexes-C3Qddb5L.js} +1 -1
- package/dist/web-dist/assets/{ini-B8RMyZP2.js → ini-CPc8BCWu.js} +1 -1
- package/dist/web-dist/assets/{java-B0bzjGsf.js → java-C9Yie4SH.js} +1 -1
- package/dist/web-dist/assets/{javascript-BSAFurIc.js → javascript-CuGq5ydO.js} +1 -1
- package/dist/web-dist/assets/{json-editor-DoEopjNh.js → json-editor-Dc1E8Fc-.js} +1 -1
- package/dist/web-dist/assets/{jsonMode-CMXGrtoZ.js → jsonMode-BgdTmYik.js} +1 -1
- package/dist/web-dist/assets/{julia-Bg58EZ4Y.js → julia--qJGRfN8.js} +1 -1
- package/dist/web-dist/assets/{keys-6E3ilH7R.js → keys-Bs0DRbCB.js} +1 -1
- package/dist/web-dist/assets/{kotlin-DW9Z0gYb.js → kotlin-C3MSe-0N.js} +1 -1
- package/dist/web-dist/assets/{label-Dcwj4aRe.js → label-DzHJlGAx.js} +1 -1
- package/dist/web-dist/assets/{less-Bx9gqQ4s.js → less-DOBYgWSY.js} +1 -1
- package/dist/web-dist/assets/{lexon-CSuDDXgE.js → lexon-Djd2rGvJ.js} +1 -1
- package/dist/web-dist/assets/{liquid-BmNDruwv.js → liquid-DXfHmR66.js} +1 -1
- package/dist/web-dist/assets/{logs-BgfXuAGG.js → logs-BortjBc-.js} +1 -1
- package/dist/web-dist/assets/{lspLanguageFeatures-CvWt81ki.js → lspLanguageFeatures-C7-iyD6G.js} +1 -1
- package/dist/web-dist/assets/{lua-CyCE05f5.js → lua-Ck8vNcPw.js} +1 -1
- package/dist/web-dist/assets/{m3-B4TowLdg.js → m3-a6Kl4TV0.js} +1 -1
- package/dist/web-dist/assets/{markdown-DUAXYKYX.js → markdown-DkcRBwO0.js} +1 -1
- package/dist/web-dist/assets/{mdx-DWKx4rlR.js → mdx-QI5o45qz.js} +1 -1
- package/dist/web-dist/assets/{mermaid-GHXKKRXX-Ci1jaQj_.js → mermaid-GHXKKRXX-D35eppUc.js} +1 -1
- package/dist/web-dist/assets/{middleware-YebY3a0i.js → middleware-CXk7SlTF.js} +1 -1
- package/dist/web-dist/assets/{mips-B8pYMMky.js → mips-Cc1YVI2p.js} +1 -1
- package/dist/web-dist/assets/{module-BfdI0fnl.js → module-D_kjbMCc.js} +1 -1
- package/dist/web-dist/assets/{monaco-theme-C8nJMjlg.js → monaco-theme-C2k_taVU.js} +4 -4
- package/dist/web-dist/assets/{msdax-Dl7lqaqA.js → msdax-Bh41xUoQ.js} +1 -1
- package/dist/web-dist/assets/{mysql-CxF1irIT.js → mysql-BZTZMxPa.js} +1 -1
- package/dist/web-dist/assets/{objective-c-nxQNwVWR.js → objective-c-CxZIMOHQ.js} +1 -1
- package/dist/web-dist/assets/{overlay.store-D93IGU3a.js → overlay.store-DsUdwZjE.js} +1 -1
- package/dist/web-dist/assets/{pascal-CJDb1n8F.js → pascal-I-WmLkmD.js} +1 -1
- package/dist/web-dist/assets/{pascaligo-DNMesjCc.js → pascaligo-DEZ-6bwf.js} +1 -1
- package/dist/web-dist/assets/{perl-Ct14C4yC.js → perl-DfeHQJxJ.js} +1 -1
- package/dist/web-dist/assets/{personal-preferences.store-BXE0mRKp.js → personal-preferences.store-DXSnKmVN.js} +1 -1
- package/dist/web-dist/assets/{pgsql-B2EenuF0.js → pgsql-OdOoQYPW.js} +1 -1
- package/dist/web-dist/assets/{php-D953oiSq.js → php-CF1bUutw.js} +1 -1
- package/dist/web-dist/assets/{pla-DTXlQw1d.js → pla-BHZr0GrY.js} +1 -1
- package/dist/web-dist/assets/{postiats-JN8Ouz04.js → postiats-BSB6a63H.js} +1 -1
- package/dist/web-dist/assets/{powerquery-5V8-uvAS.js → powerquery-Bu0p84Ye.js} +1 -1
- package/dist/web-dist/assets/{powershell-CB8eXyFq.js → powershell-Dcq3YM6T.js} +1 -1
- package/dist/web-dist/assets/{preload-helper-B3GI5Aqe.js → preload-helper-DF7hIgef.js} +1 -1
- package/dist/web-dist/assets/{protobuf-B9TJJ9C4.js → protobuf-CsWrQxqX.js} +1 -1
- package/dist/web-dist/assets/{pug-Bm8fNuV-.js → pug-DLQiv3Bp.js} +1 -1
- package/dist/web-dist/assets/{python-C5yAejbi.js → python-BvKEpyP9.js} +1 -1
- package/dist/web-dist/assets/{qsharp-R8gbdykE.js → qsharp-D8nrRUNu.js} +1 -1
- package/dist/web-dist/assets/{queries.store-Qbtkt7ze.js → queries.store-BaeyNA64.js} +1 -1
- package/dist/web-dist/assets/query-runner-f473QQSD.js +17 -0
- package/dist/web-dist/assets/{r-M-_jtR31.js → r-xhyKpGTk.js} +1 -1
- package/dist/web-dist/assets/{radix-ui-41WpuKNR.js → radix-ui-CxCv--D1.js} +2 -2
- package/dist/web-dist/assets/{razor-C1QqRako.js → razor-Ceb9S1Rz.js} +1 -1
- package/dist/web-dist/assets/react-DEQ0BgTL.js +1 -0
- package/dist/web-dist/assets/{react-dom-BmawA5F6.js → react-dom-ITw3Lqwx.js} +1 -1
- package/dist/web-dist/assets/{redis-Se45CWCe.js → redis-BnpkEvbr.js} +1 -1
- package/dist/web-dist/assets/redis-value-DMk0-Zuc.js +1 -0
- package/dist/web-dist/assets/{redshift-6LxiBjWf.js → redshift-BpxVXjAI.js} +1 -1
- package/dist/web-dist/assets/{restructuredtext-DQZZ8qkw.js → restructuredtext-5afXtW7D.js} +1 -1
- package/dist/web-dist/assets/{rolldown-runtime-CpVMLIgb.js → rolldown-runtime-fzu9RN21.js} +1 -1
- package/dist/web-dist/assets/{ruby-CCIHgGuA.js → ruby-CHaoWUHT.js} +1 -1
- package/dist/web-dist/assets/{runner-DOkX5y17.js → runner-NsYjzIZs.js} +1 -1
- package/dist/web-dist/assets/{rust-DE79jE85.js → rust-Bw0WVsLy.js} +1 -1
- package/dist/web-dist/assets/{sb-vTusoyll.js → sb-CEjXmIyG.js} +1 -1
- package/dist/web-dist/assets/{scala-BfDNOQ4o.js → scala-BuaCSaU6.js} +1 -1
- package/dist/web-dist/assets/schema-CE1yGygf.js +1 -0
- package/dist/web-dist/assets/{schema-CgNnxiB7.js → schema-rxLBue8Q.js} +1 -1
- package/dist/web-dist/assets/{scheme-07Nz-Ikg.js → scheme-DIKzlmFG.js} +1 -1
- package/dist/web-dist/assets/{scss-C2T-BIyo.js → scss-C2_UsWzg.js} +1 -1
- package/dist/web-dist/assets/{select-DzeVPveq.js → select-C-nrz7Tx.js} +1 -1
- package/dist/web-dist/assets/{separator-3IoeVup6.js → separator-DnB61XAO.js} +1 -1
- package/dist/web-dist/assets/{sheet-sidebar-Bne7asEZ.js → sheet-sidebar-BGxJGRbd.js} +1 -1
- package/dist/web-dist/assets/{shell-CYk99G96.js → shell-2aEL2EVH.js} +1 -1
- package/dist/web-dist/assets/{solidity-DZfw6XST.js → solidity-D-5XfYE1.js} +1 -1
- package/dist/web-dist/assets/{sophia-9ELY8Wd6.js → sophia-s4MFSvUF.js} +1 -1
- package/dist/web-dist/assets/{sparql-DBCoTLhO.js → sparql-Dkv46wS5.js} +1 -1
- package/dist/web-dist/assets/{spinner-Z77kD_hS.js → spinner-CNnB5r0X.js} +1 -1
- package/dist/web-dist/assets/{sql-DSSHZrVP.js → sql-Dz9Xhs8s.js} +1 -1
- package/dist/web-dist/assets/{st-9goatbhG.js → st-Cbo0XVmr.js} +1 -1
- package/dist/web-dist/assets/{swift-C8IWUoth.js → swift-B66X97nW.js} +1 -1
- package/dist/web-dist/assets/{systemverilog-DFmMGPsp.js → systemverilog-gGKga8Gf.js} +1 -1
- package/dist/web-dist/assets/{table-Cwbi0FDw.js → table-C8WK3uAc.js} +1 -1
- package/dist/web-dist/assets/tables-D98Kbmcb.js +16 -0
- package/dist/web-dist/assets/{tanstack-BE6ru2gB.js → tanstack-RwHFfmqj.js} +4 -4
- package/dist/web-dist/assets/{tcl-9sp6ieFk.js → tcl-BtbeJsUN.js} +1 -1
- package/dist/web-dist/assets/{tsMode-BjCfzjtF.js → tsMode-BgtcNcpl.js} +1 -1
- package/dist/web-dist/assets/{twig-PTQx-ucO.js → twig-0_nXiuYs.js} +1 -1
- package/dist/web-dist/assets/{typescript-BGXEvFAl.js → typescript-Cy_CzC_-.js} +1 -1
- package/dist/web-dist/assets/{typespec-k1Hrq-4g.js → typespec-DBO6_WMJ.js} +1 -1
- package/dist/web-dist/assets/{use-database-engine-CKCp55rb.js → use-database-engine-DZZj7-4J.js} +1 -1
- package/dist/web-dist/assets/{use-theme-CLKCtULg.js → use-theme-DBhPknw6.js} +1 -1
- package/dist/web-dist/assets/{utils-Cr2_fSDl.js → utils-EJLOIroS.js} +1 -1
- package/dist/web-dist/assets/{vb-BBuEtOk5.js → vb-DFJjBsW2.js} +1 -1
- package/dist/web-dist/assets/{visualizer-XPaDmMrd.js → visualizer-CgYlDJ_-.js} +1 -1
- package/dist/web-dist/assets/{vscode-jtB6jKBB.js → vscode-wuSgCuZI.js} +1 -1
- package/dist/web-dist/assets/{wgsl-MO-DpoEc.js → wgsl-U3RBM2M0.js} +1 -1
- package/dist/web-dist/assets/{workers-7JruDoqH.js → workers-ClRH6A2w.js} +1 -1
- package/dist/web-dist/assets/{xml-C0nHIB7q.js → xml-D11j3J2_.js} +1 -1
- package/dist/web-dist/assets/{yaml-CN9StMra.js → yaml-D7Z_4mnx.js} +1 -1
- package/dist/web-dist/index.html +31 -31
- package/package.json +2 -3
- package/dist/web-dist/assets/_pathlessLayout-WF7WipqP.js +0 -2
- package/dist/web-dist/assets/_table-BnMBHUzk.js +0 -1
- package/dist/web-dist/assets/_table-CQ2NX0I8.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-D8XE2uMh.js +0 -1
- package/dist/web-dist/assets/icons-D72QQyd5.js +0 -1
- package/dist/web-dist/assets/index-DlECfzV9.js +0 -34
- package/dist/web-dist/assets/index-mbFBVmHb.css +0 -2
- package/dist/web-dist/assets/query-runner-DwuQkpxh.js +0 -17
- package/dist/web-dist/assets/react-46S5qMHL.js +0 -1
- package/dist/web-dist/assets/redis-value-DG_0UKZy.js +0 -1
- package/dist/web-dist/assets/schema-B8WxzFU1.js +0 -1
- package/dist/web-dist/assets/tables-BPh2zM7Q.js +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tsMode-
|
|
2
|
-
import{t as U}from"./preload-helper-B3GI5Aqe.js";import{$ as BD,$a as An,$c as Jn,$d as UD,$i as Vc,$l as qu,$n as zD,$o as jD,$r as pS,$s as sr,$t as qD,$u as Ra,A as Bc,Aa as Ah,Ac as zo,Ad as jo,Ai as $D,Al as im,An as Ls,Ao as en,Ar as Oe,As as KD,At as GD,Au as Uc,B as ZD,Ba as ye,Bc as jd,Bd as XD,Bi as YD,Bl as JD,Bn as fS,Bo as QD,Br as mS,Bs as Li,Bt as _S,Bu as $u,C as e0,Ca as t0,Cc as zc,Cd as i0,Ci as K_,Cl as nm,Cn as Di,Co as vS,Cr as G_,Cs as Vi,Ct as sm,Cu as Yt,D as Z_,Da as n0,Dc as kt,Dd as s0,Di as bS,Dl as o0,Dn as om,Do as r0,Dr as a0,Ds as l0,Dt as CS,Du as d0,E as xi,Ea as c0,Ec as h0,Ed as L,Ei as Fh,El as _t,En as u0,Eo as He,Er as g0,Es as X_,Et as SS,Eu as wS,F as or,Fa as to,Fc as Qr,Fd as Y_,Fi as Ta,Fl as pt,Fn as tn,Fo as p0,Fr as Et,Fs as Ds,Ft as f0,Fu as y,G as yS,Ga as xS,Gc as m0,Gd as rm,Gi as IS,Gl as LS,Gn as DS,Go as mo,Gr as _0,Gs as ln,Gt as ES,Gu as J_,H as Ze,Ha as am,Hc as v0,Hd as lm,Hi as RS,Hl as dm,Hn as qd,Ho as Zs,Hr as TS,Hs as b0,Ht as cm,Hu as NS,I as C0,Ia as on,Ic as S0,Id as hm,Ii as kS,Il as gs,In as w0,Io as y0,Ir as jc,Is as lt,It as Q_,Iu as B,J as x0,Ja as ev,Jc as I0,Jd as we,Ji as L0,Jl as tv,Jn as PS,Jo as OS,Jr as al,Js as ve,Jt as iv,Ju as ea,K as MS,Ka as D0,Kc as ls,Kd as Ln,Ki as nv,Kl as Sr,Kn as E0,Ko as AS,Kr as FS,Ks as R0,Kt as T0,Ku as N0,L as sv,La as um,Lc as es,Ld as HS,Li as k0,Ll as gm,Ln as P0,Lo as O0,Lr as Nl,Ls as Es,Lt as qo,Lu as De,M as M0,Ma as A0,Mc as Ht,Md as F0,Mi as hd,Ml as at,Mn as _o,Mo as WS,Mr as Yo,Ms as H0,Mt as W0,Mu as V0,N as B0,Na as U0,Nc as Na,Nd as Dn,Ni as z0,Nl as ll,Nn as j0,No as q0,Nr as $0,Ns as dl,Nt as VS,Nu as V,O as qc,Oa as pm,Oc as K0,Od as G0,Oi as Z0,Ol as X0,On as Y0,Oo as ud,Or as $c,Os as ps,Ot as J0,Ou as ds,P as Q0,Pa as eE,Pc as Jt,Pd as tE,Pi as ov,Pl as iE,Pn as Kc,Po as nE,Pr as sE,Ps as Rn,Pt as rv,Pu as te,Q as Gc,Qa as oE,Qc as av,Qd as Ku,Qi as lv,Ql as ka,Qn as rE,Qo as Zc,Qr as aE,Qs as pe,Qt as BS,Qu as fm,R as mm,Ra as dt,Rc as lE,Rd as ta,Ri as US,Rl as rr,Rn as dE,Ro as je,Rr as cE,Rs as $,Rt as ar,Ru as Jo,S as _m,Sa as hE,Sc as uE,Sd as vm,Si as dv,Sl as gE,Sn as bm,So as zS,Sr as Ar,Ss as $d,St as vt,Su as pE,T as Be,Ta as fE,Tc as cl,Td as m,Ti as mE,Tl as gd,Tn as _E,To as wn,Tr as io,Ts as Cm,Tt as jS,Tu as Gu,U as qS,Ua as H,Uc as vE,Ud as $S,Ui as Sm,Ul as wm,Un as bE,Uo as nn,Ur as ym,Us as fe,Ut as CE,Uu as ue,Va as yn,Vc as cv,Vd as SE,Vi as KS,Vl as Xc,Vn as Pa,Vo as Zu,Vr as GS,Vs as wE,Vt as fs,Vu as et,W as hl,Wa as nt,Wc as wi,Wd as gt,Wi as ZS,Wl as XS,Wn as Oa,Wo as yE,Wr as xE,Ws as ni,Wt as IE,Wu as st,X as wr,Xa as Rs,Xc as xm,Xd as LE,Xi as DE,Xl as EE,Xn as RE,Xo as ct,Xr as pd,Xs as Re,Xt as TE,Xu as Tn,Y as NE,Ya as ul,Yc as Ts,Yd as tt,Yi as kE,Yl as PE,Yn as OE,Yo as hv,Yr as it,Ys as oe,Yt as YS,Z as JS,Za as uv,Zc as ME,Zd as QS,Zi as ew,Zl as AE,Zn as FE,Zo as HE,Zr as S,Zs as ht,Zt as gv,Zu as pv,_ as tw,_a as Xu,_c as de,_d as WE,_i as VE,_l as fv,_n as Yu,_o as fd,_r as BE,_s as UE,_t as lr,_u as Ju,a as mv,aa as zE,ac as $e,ad as O,af as Bi,ai as Im,al as Qu,an as jE,ao as yr,ar as gl,as as kl,at as Ge,au as qE,b as dr,ba as $E,bc as z,bd as xr,bi as iw,bl as KE,bn as GE,bo as Nn,br as ZE,bs as XE,bt as _v,bu as vv,c as bv,ca as YE,cc as nw,cd as JE,cf as Qt,ci as Hh,cl as QE,cn as eR,co as Fr,cr as tR,cs as Mt,ct as pl,cu as ba,d as iR,da as nR,dc as Le,dd as Lm,df as sR,di as oR,dl as Dm,dn as Em,do as rR,dr as sw,ds as k,dt as ms,du as Rm,ea as $o,ec as Ma,ed as Q,ef as aR,ei as Ca,el as Dt,en as eg,eo as ci,er as lR,es as Tt,et as ow,eu as Tm,f as dR,fa as fl,fc as Cn,fd as ke,ff as Cv,fi as cR,fl as Sv,fn as Nm,fo as hR,fr as km,fs as G,ft as uR,fu as gR,g as pR,ga as fR,gc as Wh,gd as tg,gi as mR,gl as Yc,gn as _R,go as me,gr as vR,gs as Jc,gt as bR,gu as Kd,h as no,ha as md,hc as Vh,hd as ml,hi as CR,hl as SR,hn as Ri,ho as wR,hr as wv,hs as Ut,ht as yR,hu as Qc,i as ts,ia as Gd,ic as Kt,id as rw,if as xR,ii as IR,il as LR,in as aw,io as cr,ir as DR,is as lw,it as Ir,iu as ER,j as Zd,ja as dw,jc as vi,jd as Se,ji as cw,jl as _s,jn as RR,jo as rt,jr as Hr,js as TR,jt as NR,ju as kR,k as eh,ka as hw,kc as PR,kd as Pm,ki as _l,kl as sn,kn as OR,ko as MR,kr as uw,ks as AR,kt as FR,ku as gw,l as K,la as pw,lc as HR,ld as fw,lf as WR,li as vl,ll as bl,ln as ti,lo as mw,lr as VR,ls as Om,lt as _w,lu as kn,m as vw,ma as Mm,mc as BR,md as bw,mi as Xd,ml as UR,mn as zR,mo as Z,mr as Yd,ms as jR,mt as yv,mu as Cw,na as Ys,nc as qR,nd as xv,nf as so,ni as hr,nl as $R,nn as Ce,no as Sw,nr as ww,ns as Fn,nt as ig,nu as yw,oa as KR,oc as ie,od as A,of as Iv,oi as Cl,ol as Fi,on as xw,oo as th,or as ih,os as M,ot as Am,ou as Lv,p as GR,pa as ng,pc as Ae,pd as cs,pf as Jd,pi as ZR,pl as Yi,pn as Iw,po as XR,pr as se,ps as ce,pt as YR,pu as _d,q as JR,qa as QR,qc as Dv,qd as Hn,qi as eT,ql as Fm,qn as nh,qo as Qd,qr as It,qs as N,qt as tT,qu as sh,ra as iT,rc as si,rd as hi,rf as nT,ri as Bh,rl as Ne,rn as sT,ro as Lw,rr as oT,rs as xe,rt as rT,ru as aT,sa as lT,sc as dn,sd as Je,sf as dT,si as oh,sl as he,sn as rh,so as cT,sr as ui,ss as gi,st as hT,su as Ev,t as Aa,ta as Pl,tc as ec,td as qe,tf as Ns,ti as Dw,tl as uT,tn as Hm,to as vs,tr as gT,ts as Wn,tt as pT,tu as yt,u as Ew,ua as fT,uc as W,ud as Nt,uf as oo,ui as Rw,ul as T,un as Fa,uo as mT,ur as Wm,us as ah,ut as _T,uu as vT,v as Tw,va as bT,vc as CT,vd as ST,vi as wT,vl as Rv,vn as yT,vo as ur,vr as xT,vs as Pt,vt as IT,vu as Lr,w as LT,wa as Tv,wc as tc,wd as DT,wi as Vm,wl as Nw,wn as ET,wo as Nv,wr as RT,ws as TT,wt as NT,wu as kT,x as kw,xa as PT,xc as di,xd as OT,xi as MT,xl as AT,xn as Ti,xo as ei,xr as FT,xs as HT,xt as lh,xu as is,y as Pw,ya as WT,yc as bs,yd as Pn,yi as Ow,yl as VT,yn as BT,yo as UT,yr as zT,ys as jT,yt as xn,yu as li,z as qT,za as $T,zc as q,zd as KT,zi as Mw,zl as GT,zn as Lt,zo as Aw,zr as ZT,zs as ro,zt as XT,zu as Uh}from"./editor.api-DaW7cLxE.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"db-studio@2.0.0"};var e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="04143ed1-1f8b-430b-99de-35ffe1957bb3",n._sentryDebugIdIdentifier="sentry-dbid-04143ed1-1f8b-430b-99de-35ffe1957bb3")}catch{}})();var YT=class extends lt{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:L(101,"Toggle Collapse Unchanged Regions"),icon:V.map,toggled:N.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:N.has("isInDiffEditor"),menu:{when:N.has("isInDiffEditor"),id:$.EditorTitle,order:22,group:"navigation"}})}run(n,...e){const t=n.get(xe),i=!t.getValue("diffEditor.hideUnchangedRegions.enabled");t.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}},Fw=class extends lt{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:L(102,"Toggle Show Moved Code Blocks"),precondition:N.has("isInDiffEditor")})}run(n,...e){const t=n.get(xe),i=!t.getValue("diffEditor.experimental.showMoves");t.updateValue("diffEditor.experimental.showMoves",i)}},Hw=class extends lt{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:L(103,"Toggle Use Inline View When Space Is Limited"),precondition:N.has("isInDiffEditor")})}run(n,...e){const t=n.get(xe),i=!t.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");t.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}},Sl=L(104,"Diff Editor"),JT=class extends gi{constructor(){super({id:"diffEditor.switchSide",title:L(105,"Switch Side"),icon:V.arrowSwap,precondition:N.has("isInDiffEditor"),f1:!0,category:Sl})}runEditorCommand(n,e,t){const i=vo(n);if(i instanceof dr){if(t&&t.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}},QT=class extends gi{constructor(){super({id:"diffEditor.exitCompareMove",title:L(106,"Exit Compare Move"),icon:V.close,precondition:S.comparingMovedCode,f1:!1,category:Sl,keybinding:{weight:1e4,primary:9}})}runEditorCommand(n,e,...t){const i=vo(n);i instanceof dr&&i.exitCompareMove()}},e1=class extends gi{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:L(107,"Collapse All Unchanged Regions"),icon:V.fold,precondition:N.has("isInDiffEditor"),f1:!0,category:Sl})}runEditorCommand(n,e,...t){const i=vo(n);i instanceof dr&&i.collapseAllUnchangedRegions()}},t1=class extends gi{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:L(108,"Show All Unchanged Regions"),icon:V.unfold,precondition:N.has("isInDiffEditor"),f1:!0,category:Sl})}runEditorCommand(n,e,...t){const i=vo(n);i instanceof dr&&i.showAllUnchangedRegions()}},sg=class extends lt{constructor(){super({id:"diffEditor.revert",title:L(109,"Revert"),f1:!0,category:Sl,precondition:N.has("isInDiffEditor")})}run(n,e){return e?this.runViaToolbarContext(n,e):this.runViaCursorOrSelection(n)}runViaCursorOrSelection(n){const e=vo(n);e instanceof dr&&e.revertFocusedRangeMappings()}runViaToolbarContext(n,e){const t=i1(n,e.originalUri,e.modifiedUri);t instanceof dr&&t.revertRangeMappings(e.mapping.innerChanges??[])}},Ww=L(110,"Accessible Diff Viewer"),Bm=class Vw extends lt{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:Vw.id,title:L(111,"Go to Next Difference"),category:Ww,precondition:N.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){vo(e)?.accessibleDiffViewerNext()}},Bw=class Uw extends lt{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:Uw.id,title:L(112,"Go to Previous Difference"),category:Ww,precondition:N.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){vo(e)?.accessibleDiffViewerPrev()}};function i1(n,e,t){return n.get($e).listDiffEditors().find(i=>{const s=i.getModifiedEditor(),o=i.getOriginalEditor();return s&&s.getModel()?.uri.toString()===t.toString()&&o&&o.getModel()?.uri.toString()===e.toString()})||null}function vo(n){const e=n.get($e).listDiffEditors(),t=zc();if(t){for(const i of e)if(i.getContainerDomNode().contains(t))return i}return null}fe(YT);fe(Fw);fe(Hw);Li.appendMenuItem($.EditorTitle,{command:{id:new Hw().desc.id,title:m(135,"Use Inline View When Space Is Limited"),toggled:N.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:N.has("isInDiffEditor")},order:11,group:"1_diff",when:N.and(S.diffEditorRenderSideBySideInlineBreakpointReached,N.has("isInDiffEditor"))});Li.appendMenuItem($.EditorTitle,{command:{id:new Fw().desc.id,title:m(136,"Show Moved Code Blocks"),icon:V.move,toggled:R0.create("config.diffEditor.experimental.showMoves",!0),precondition:N.has("isInDiffEditor")},order:10,group:"1_diff",when:N.has("isInDiffEditor")});fe(sg);for(const n of[{icon:V.arrowRight,key:S.diffEditorInlineMode.toNegated()},{icon:V.discard,key:S.diffEditorInlineMode}])Li.appendMenuItem($.DiffEditorHunkToolbar,{command:{id:new sg().desc.id,title:m(137,"Revert Block"),icon:n.icon},when:N.and(S.diffEditorModifiedWritable,n.key),order:5,group:"primary"}),Li.appendMenuItem($.DiffEditorSelectionToolbar,{command:{id:new sg().desc.id,title:m(138,"Revert Selection"),icon:n.icon},when:N.and(S.diffEditorModifiedWritable,n.key),order:5,group:"primary"});fe(JT);fe(QT);fe(e1);fe(t1);Li.appendMenuItem($.EditorTitle,{command:{id:Bm.id,title:m(139,"Open Accessible Diff Viewer"),precondition:N.has("isInDiffEditor")},order:10,group:"2_diff",when:N.and(S.accessibleDiffViewerVisible.negate(),N.has("isInDiffEditor"))});Re.registerCommandAlias("editor.action.diffReview.next",Bm.id);fe(Bm);Re.registerCommandAlias("editor.action.diffReview.prev",Bw.id);fe(Bw);var n1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},s1=function(n,e){return function(t,i){e(t,i,n)}},og,dh=new oe("selectionAnchorSet",!1),Cs=class{static{og=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(og.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=dh.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(te.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Lt().appendText(m(834,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ci(m(835,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(te.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Cs=og=n1([s1(1,ve)],Cs);var o1=class extends M{constructor(){super({id:"editor.action.setSelectionAnchor",label:L(836,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:et(2089,2080),weight:100}})}async run(n,e){Cs.get(e)?.setSelectionAnchor()}},r1=class extends M{constructor(){super({id:"editor.action.goToSelectionAnchor",label:L(837,"Go to Selection Anchor"),precondition:dh})}async run(n,e){Cs.get(e)?.goToSelectionAnchor()}},a1=class extends M{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:L(838,"Select from Anchor to Cursor"),precondition:dh,kbOpts:{kbExpr:S.editorTextFocus,primary:et(2089,2089),weight:100}})}async run(n,e){Cs.get(e)?.selectFromAnchorToCursor()}},l1=class extends M{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:L(839,"Cancel Selection Anchor"),precondition:dh,kbOpts:{kbExpr:S.editorTextFocus,primary:9,weight:100}})}async run(n,e){Cs.get(e)?.cancelSelectionAnchor()}};ce(Cs.ID,Cs,4);k(o1);k(r1);k(a1);k(l1);var d1=H("editorOverviewRuler.bracketMatchForeground","#A0A0A0",m(840,"Overview ruler marker color for matching brackets.")),c1=class extends M{constructor(){super({id:"editor.action.jumpToBracket",label:L(842,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:3165,weight:100}})}run(n,e){Ha.get(e)?.jumpToBracket()}},h1=class extends M{constructor(){super({id:"editor.action.selectToBracket",label:L(843,"Select to Bracket"),precondition:void 0,metadata:{description:L(844,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(n,e,t){let i=!0;t&&t.selectBrackets===!1&&(i=!1),Ha.get(e)?.selectToBracket(i)}},u1=class extends M{constructor(){super({id:"editor.action.removeBrackets",label:L(845,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(n,e){Ha.get(e)?.removeBrackets(this.id)}},g1=class{constructor(n,e,t){this.position=n,this.brackets=e,this.options=t}},Ha=class vd extends O{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(vd.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new at(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),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(80)&&(this._matchBrackets=this._editor.getOption(80),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;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const s=i.getStartPosition(),o=e.bracketPairs.matchBracket(s);let r=null;if(o)o[0].containsPosition(s)&&!o[1].containsPosition(s)?r=o[1].getStartPosition():o[1].containsPosition(s)&&(r=o[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(s);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(s);l&&l.range&&(r=l.range.getStartPosition())}}return r?new te(r.lineNumber,r.column,r.lineNumber,r.column):new te(s.lineNumber,s.column,s.lineNumber,s.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(s=>{const o=s.getStartPosition();let r=t.bracketPairs.matchBracket(o);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(o),!r)){const d=t.bracketPairs.findNextBracket(o);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(y.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(o)){const h=a;a=l,l=h}}a&&l&&i.push(new te(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const s=i.getPosition();let o=t.bracketPairs.matchBracket(s);o||(o=t.bracketPairs.findEnclosingBrackets(s)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=se.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline",overviewRuler:{color:it(d1),position:nn.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=se.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const s=i.brackets;s&&(e[t++]={range:s[0],options:i.options},e[t++]={range:s[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let s=[];this._lastVersionId===i&&(s=this._lastBracketsData);const o=[];let r=0;for(let h=0,u=e.length;h<u;h++){const g=e[h];g.isEmpty()&&(o[r++]=g.getStartPosition())}o.length>1&&o.sort(B.compare);const a=[];let l=0,d=0;const c=s.length;for(let h=0,u=o.length;h<u;h++){const g=o[h];for(;d<c&&s[d].position.isBefore(g);)d++;if(d<c&&s[d].position.equals(g))a[l++]=s[d];else{let p=t.bracketPairs.matchBracket(g,20),f=vd._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(g,20),f=vd._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new g1(g,p,f)}}this._lastBracketsData=a,this._lastVersionId=i}};ce(Ha.ID,Ha,1);k(h1);k(c1);k(u1);Li.appendMenuItem($.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m(841,"Go to &&Bracket")},order:2});al((n,e)=>{const t=n.getColor(xE);t&&e.addRule(`.monaco-editor .bracket-match-inline { color: ${t} !important; }`)});var p1=class{constructor(n,e){this._selection=n,this._isMovingLeft=e}getEditOperations(n,e){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const t=this._selection.startLineNumber,i=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&i===1)&&!(!this._isMovingLeft&&s===n.getLineMaxColumn(t)))if(this._isMovingLeft){const o=new y(t,i-1,t,i),r=n.getValueInRange(o);e.addEditOperation(o,null),e.addEditOperation(new y(t,s,t,s),r)}else{const o=new y(t,s,t,s+1),r=n.getValueInRange(o);e.addEditOperation(o,null),e.addEditOperation(new y(t,i,t,i),r)}}computeCursorState(n,e){return this._isMovingLeft?new te(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new te(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}},zw=class extends M{constructor(n,e){super(e),this.left=n}run(n,e){if(!e.hasModel())return;const t=[],i=e.getSelections();for(const s of i)t.push(new p1(s,this.left));e.pushUndoStop(),e.executeCommands(this.id,t),e.pushUndoStop()}},f1=class extends zw{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:L(846,"Move Selected Text Left"),precondition:S.writable})}},m1=class extends zw{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:L(847,"Move Selected Text Right"),precondition:S.writable})}};k(f1);k(m1);var _1=class extends M{constructor(){super({id:"editor.action.transposeLetters",label:L(848,"Transpose Letters"),precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(n,e){if(!e.hasModel())return;const t=e.getModel(),i=[],s=e.getSelections();for(const o of s){if(!o.isEmpty())continue;const r=o.startLineNumber,a=o.startColumn,l=t.getLineMaxColumn(r);if(r===1&&(a===1||a===2&&l===2))continue;const d=a===l?o.getPosition():Hh.rightPosition(t,o.getPosition().lineNumber,o.getPosition().column),c=Hh.leftPosition(t,d),h=Hh.leftPosition(t,c),u=t.getValueInRange(y.fromPositions(h,c)),g=t.getValueInRange(y.fromPositions(c,d)),p=y.fromPositions(h,d);i.push(new vl(p,g+u))}i.length>0&&(e.pushUndoStop(),e.executeCommands(this.id,i),e.pushUndoStop())}};k(_1);var Ve=class Fo{static{this.sep="."}static{this.None=new Fo("@@none@@")}static{this.Empty=new Fo("")}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+Fo.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new Fo((this.value?[this.value,...e]:e).join(Fo.sep))}},v1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},b1=function(n,e){return function(t,i){e(t,i,n)}},C1=se.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:" ",inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),S1=class jw extends O{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,s,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(s),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=W(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=W("span.icon");this.domNode.append(t),t.classList.add(...pe.asClassNameArray(V.loading),"codicon-modifier-spin");const i=()=>{const s=this.editor.getOption(75);this.domNode.style.height=`${s}px`,this.domNode.style.width=`${Math.ceil(.8*s)}px`};i(),this._register(this.editor.onDidChangeConfiguration(s=>{(s.hasChanged(61)||s.hasChanged(75))&&i()})),this._register(de(this.domNode,Ae.CLICK,s=>{this.delegate.cancel()}))}getId(){return jw.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)}},ic=class extends O{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new Je),this._currentWidget=this._register(new Je),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,s,o){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=gs(()=>{const a=y.fromPositions(e);this._currentDecorations.set([{range:a,options:C1}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(S1,this.id,this._editor,a,t,s))},o??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};ic=v1([b1(2,ie)],ic);var w1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},kv=function(n,e){return function(t,i){e(t,i,n)}},bd,qt=class{static{bd=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new oe("messageVisible",!1,m(1333,"Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(bd.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new Je,this._messageListeners=new A,this._mouseOverMessage=!1,this._editor=e,this._visible=bd.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(ci(qd(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),qd(e)){const s=this._messageListeners.add(Kc(e,{actionHandler:(o,r)=>{this.closeMessage(),RR(this._openerService,o,r.isTrusted)}}));this._messageWidget.value=new zh(this._editor,t,s.element)}else this._messageWidget.value=new zh(this._editor,t,e);this._messageListeners.add(qe.debounce(this._editor.onDidBlurEditorText,(s,o)=>o,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&S0(zc(),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(de(this._messageWidget.value.getDomNode(),Ae.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(de(this._messageWidget.value.getDomNode(),Ae.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(s=>{s.target.position&&(i?i.containsPosition(s.target.position)||this.closeMessage():i=new y(t.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(zh.fadeOut(this._messageWidget.value))}};qt=bd=w1([kv(1,ve),kv(2,_o)],qt);var y1=Mt.bindToContribution(qt.get);G(new y1({id:"leaveEditorMessage",precondition:qt.MESSAGE_VISIBLE,handler:n=>n.closeMessage(),kbOpts:{weight:130,primary:9}}));var zh=class{static fadeOut(n){const e=()=>{n.dispose(),clearTimeout(t),n.getDomNode().removeEventListener("animationend",e)},t=setTimeout(e,110);return n.getDomNode().addEventListener("animationend",e),n.getDomNode().classList.add("fadeOut"),{dispose:e}}constructor(n,{lineNumber:e,column:t},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=n,this._editor.revealLinesInCenterIfOutsideViewport(e,e,0),this._position={lineNumber:e,column:t},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");typeof i=="string"?(o.classList.add("message"),o.textContent=i):(i.classList.add("message"),o.appendChild(i)),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),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(n){this._domNode.classList.toggle("below",n===2)}};ce(qt.ID,qt,4);var Um=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Wa=function(n,e){return function(t,i){e(t,i,n)}},zm=class{constructor(n){this.copyMimeTypes=[],this.kind=n,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(n,e,t,i,s){const o=await this.getEdit(t,s);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}async provideDocumentDropEdits(n,e,t,i){const s=await this.getEdit(t,i);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}},Va=class qw extends zm{static{this.id="text"}constructor(){super(Ve.Empty.append("text","plain")),this.id=qw.id,this.dropMimeTypes=[Tt.text],this.pasteMimeTypes=[Tt.text]}async getEdit(e,t){const i=e.get(Tt.text);if(!i||e.has(Tt.uriList))return;const s=await i.asString();return{handledMimeType:Tt.text,title:m(965,"Insert Plain Text"),insertText:s,kind:this.kind}}},$w=class extends zm{constructor(){super(Ve.Empty.append("uri","path","absolute")),this.dropMimeTypes=[Tt.uriList],this.pasteMimeTypes=[Tt.uriList]}async getEdit(n,e){const t=await Kw(n);if(!t.length||e.isCancellationRequested)return;let i=0;const s=t.map(({uri:r,originalText:a})=>r.scheme===_t.file?r.fsPath:(i++,a)).join(" ");let o;return i>0?o=t.length>1?m(966,"Insert Uris"):m(967,"Insert Uri"):o=t.length>1?m(968,"Insert Paths"):m(969,"Insert Path"),{handledMimeType:Tt.uriList,insertText:s,title:o,kind:this.kind}}},nc=class extends zm{constructor(e){super(Ve.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[Tt.uriList],this.pasteMimeTypes=[Tt.uriList]}async getEdit(e,t){const i=await Kw(e);if(!i.length||t.isCancellationRequested)return;const s=Ns(i.map(({uri:o})=>{const r=this._workspaceContextService.getWorkspaceFolder(o);return r?TR(r.uri,o):void 0}));if(s.length)return{handledMimeType:Tt.uriList,insertText:s.join(" "),title:i.length>1?m(970,"Insert Relative Paths"):m(971,"Insert Relative Path"),kind:this.kind}}};nc=Um([Wa(0,ms)],nc);var x1=class{constructor(){this.kind=new Ve("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Tt.text}]}async provideDocumentPasteEdits(n,e,t,i,s){if(i.triggerKind!==Ju.PasteAs&&!i.only?.contains(this.kind))return;const o=await t.get("text/html")?.asString();if(!(!o||s.isCancellationRequested))return{dispose(){},edits:[{insertText:o,yieldTo:this._yieldTo,title:m(972,"Insert HTML"),kind:this.kind}]}}};async function Kw(n){const e=n.get(Tt.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const s of Ow.parse(t))try{i.push({uri:De.parse(s),originalText:s})}catch{}return i}var Js={scheme:"*",hasAccessToAllModels:!0},rg=class extends O{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(Js,new Va)),this._register(e.documentDropEditProvider.register(Js,new $w)),this._register(e.documentDropEditProvider.register(Js,new nc(t)))}};rg=Um([Wa(0,Z),Wa(1,ms)],rg);var ag=class extends O{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(Js,new Va)),this._register(e.documentPasteEditProvider.register(Js,new $w)),this._register(e.documentPasteEditProvider.register(Js,new nc(t))),this._register(e.documentPasteEditProvider.register(Js,new x1))}};ag=Um([Wa(0,Z),Wa(1,ms)],ag);var I1=class $i{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}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};const e=this.pos;let t=0,i=this.value.charCodeAt(e),s;if(s=$i._table[i],typeof s=="number")return this.pos+=1,{type:s,pos:e,len:1};if($i.isDigitCharacter(i)){s=8;do t+=1,i=this.value.charCodeAt(e+t);while($i.isDigitCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}if($i.isVariableCharacter(i)){s=9;do i=this.value.charCodeAt(e+ ++t);while($i.isVariableCharacter(i)||$i.isDigitCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}s=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof $i._table[i]>"u"&&!$i.isDigitCharacter(i)&&!$i.isVariableCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}},Dr=class{constructor(){this._children=[]}appendChild(n){return n instanceof jt&&this._children[this._children.length-1]instanceof jt?this._children[this._children.length-1].value+=n.value:(n.parent=this,this._children.push(n)),this}replace(n,e){const{parent:t}=n,i=t.children.indexOf(n),s=t.children.slice(0);s.splice(i,1,...e),t._children=s,(function o(r,a){for(const l of r)l.parent=a,o(l.children,l)})(e,t)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let n=this;for(;;){if(!n)return;if(n instanceof jm)return n;n=n.parent}}toString(){return this.children.reduce((n,e)=>n+e.toString(),"")}len(){return 0}},jt=class Gw extends Dr{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Gw(this.value)}},Zw=class extends Dr{},Ai=class Xw extends Zw{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 ch?this._children[0]:void 0}clone(){const e=new Xw(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},ch=class Yw extends Dr{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof jt&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new Yw;return this.options.forEach(e.appendChild,e),e}},L1=class Jw extends Dr{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,s=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(o=>o instanceof vn&&!!o.elseValue)&&(s=this._replace([])),s}_replace(e){let t="";for(const i of this._children)if(i instanceof vn){let s=e[i.index]||"";s=i.resolve(s),t+=s}else t+=i.toString();return t}toString(){return""}clone(){const e=new Jw;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}},vn=class Qw extends Dr{constructor(e,t,i,s){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=s}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):"":this.shorthandName==="kebabcase"?e?this._toKebabCase(e):"":this.shorthandName==="snakecase"?e?this._toSnakeCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toKebabCase(e){if(!e.match(/[\p{L}0-9]+/gu))return e;if(!e.match(/[\p{L}0-9]/u))return e.trim().toLowerCase().replace(/^_+|_+$/g,"").replace(/[\s_]+/g,"-");const t=e.trim().replace(/^_+|_+$/g,""),i=t.match(/\p{Lu}{2,}(?=\p{Lu}\p{Ll}+[0-9]*|[\s_-]|$)|\p{Lu}?\p{Ll}+[0-9]*|\p{Lu}(?=\p{Lu}\p{Ll})|\p{Lu}(?=[\s_-]|$)|[0-9]+/gu);return i?i.map(s=>s.toLowerCase()).join("-"):t.split(/[\s_-]+/).filter(s=>s.length>0).map(s=>s.toLowerCase()).join("-")}_toPascalCase(e){const t=e.match(/[\p{L}0-9]+/gu);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[\p{L}0-9]+/gu);return t?t.map((i,s)=>s===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toSnakeCase(e){return e.replace(/(\p{Ll})(\p{Lu})/gu,"$1_$2").replace(/[\s\-]+/g,"_").toLowerCase()}clone(){return new Qw(this.index,this.shorthandName,this.ifValue,this.elseValue)}},Ba=class ey extends Zw{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 jt(t)],!0):!1}clone(){const e=new ey(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};function Pv(n,e){const t=[...n];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}var jm=class ty extends Dr{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof Ai&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(s=>s===e?(i=!0,!1):(t+=s.len(),!0)),i?t:-1}fullLen(e){let t=0;return Pv([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof Ai&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Ba&&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(){const e=new ty;return e._children=this.children.map(t=>t.clone()),e}walk(e){Pv(this.children,e)}},ao=class{constructor(){this._scanner=new I1,this._token={type:14,pos:0,len:0}}static escape(n){return n.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(n){return/\${?CLIPBOARD/.test(n)}parse(n,e,t){const i=new jm;return this.parseFragment(n,i),this.ensureFinalTabstop(i,t??!1,e??!1),i}parseFragment(n,e){const t=e.children.length;for(this._scanner.text(n),this._token=this._scanner.next();this._parse(e););const i=new Map,s=[];e.walk(a=>(a instanceof Ai&&(a.isFinalTabstop?i.set(0,void 0):!i.has(a.index)&&a.children.length>0?i.set(a.index,a.children):s.push(a)),!0));const o=(a,l)=>{const d=i.get(a.index);if(!d)return;const c=new Ai(a.index);c.transform=a.transform;for(const h of d){const u=h.clone();c.appendChild(u),u instanceof Ai&&i.has(u.index)&&!l.has(u.index)&&(l.add(u.index),o(u,l),l.delete(u.index))}e.replace(a,[c])},r=new Set;for(const a of s)o(a,r);return e.children.slice(t)}ensureFinalTabstop(n,e,t){(e||t&&n.placeholders.length>0)&&(n.placeholders.find(i=>i.index===0)||n.appendChild(new Ai(0)))}_accept(n,e){if(n===void 0||this._token.type===n){const t=e?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),t}return!1}_backTo(n){return this._scanner.pos=n.pos+n.len,this._token=n,!1}_until(n){const e=this._token;for(;this._token.type!==n;){if(this._token.type===14)return!1;if(this._token.type===5){const i=this._scanner.next();if(i.type!==0&&i.type!==4&&i.type!==5)return!1}this._token=this._scanner.next()}const t=this._scanner.value.substring(e.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),t}_parse(n){return this._parseEscaped(n)||this._parseTabstopOrVariableName(n)||this._parseComplexPlaceholder(n)||this._parseComplexVariable(n)||this._parseAnything(n)}_parseEscaped(n){let e;return(e=this._accept(5,!0))?(e=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||e,n.appendChild(new jt(e)),!0):!1}_parseTabstopOrVariableName(n){let e;const t=this._token;return this._accept(0)&&(e=this._accept(9,!0)||this._accept(8,!0))?(n.appendChild(/^\d+$/.test(e)?new Ai(Number(e)):new Ba(e)),!0):this._backTo(t)}_parseComplexPlaceholder(n){let e;const t=this._token;if(!(this._accept(0)&&this._accept(3)&&(e=this._accept(8,!0))))return this._backTo(t);const i=new Ai(Number(e));if(this._accept(1))for(;;){if(this._accept(4))return n.appendChild(i),!0;if(!this._parse(i))return n.appendChild(new jt("${"+e+":")),i.children.forEach(n.appendChild,n),!0}else if(i.index>0&&this._accept(7)){const s=new ch;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(s),this._accept(4)))return n.appendChild(i),!0}return this._backTo(t),!1}}else return this._accept(6)?this._parseTransform(i)?(n.appendChild(i),!0):(this._backTo(t),!1):this._accept(4)?(n.appendChild(i),!0):this._backTo(t)}_parseChoiceElement(n){const e=this._token,t=[];for(;!(this._token.type===2||this._token.type===7);){let i;if((i=this._accept(5,!0))?i=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||i:i=this._accept(void 0,!0),!i)return this._backTo(e),!1;t.push(i)}return t.length===0?(this._backTo(e),!1):(n.appendChild(new jt(t.join(""))),!0)}_parseComplexVariable(n){let e;const t=this._token;if(!(this._accept(0)&&this._accept(3)&&(e=this._accept(9,!0))))return this._backTo(t);const i=new Ba(e);if(this._accept(1))for(;;){if(this._accept(4))return n.appendChild(i),!0;if(!this._parse(i))return n.appendChild(new jt("${"+e+":")),i.children.forEach(n.appendChild,n),!0}else return this._accept(6)?this._parseTransform(i)?(n.appendChild(i),!0):(this._backTo(t),!1):this._accept(4)?(n.appendChild(i),!0):this._backTo(t)}_parseTransform(n){const e=new L1;let t="",i="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,t+=s;continue}if(this._token.type!==14){t+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,e.appendChild(new jt(s));continue}if(!(this._parseFormatString(e)||this._parseAnything(e)))return!1}for(;!this._accept(4);){if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}try{e.regexp=new RegExp(t,i)}catch{return!1}return n.transform=e,!0}_parseFormatString(n){const e=this._token;if(!this._accept(0))return!1;let t=!1;this._accept(3)&&(t=!0);const i=this._accept(8,!0);if(i)if(t){if(this._accept(4))return n.appendChild(new vn(Number(i))),!0;if(!this._accept(1))return this._backTo(e),!1}else return n.appendChild(new vn(Number(i))),!0;else return this._backTo(e),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(e),!1):(n.appendChild(new vn(Number(i),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return n.appendChild(new vn(Number(i),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return n.appendChild(new vn(Number(i),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const o=this._until(4);if(o)return n.appendChild(new vn(Number(i),void 0,s,o)),!0}}else{const s=this._until(4);if(s)return n.appendChild(new vn(Number(i),void 0,void 0,s)),!0}return this._backTo(e),!1}_parseAnything(n){return this._token.type!==14?(n.appendChild(new jt(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}};function iy(n,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(i=>new _w(n,{range:i,text:typeof t.insertText=="string"?ao.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function ny(n){function e(r,a){return"mimeType"in r?r.mimeType===a.handledMimeType:!!a.kind&&r.kind.contains(a.kind)}const t=new Map;for(const r of n)for(const a of r.yieldTo??[])for(const l of n)if(l!==r&&e(a,l)){let d=t.get(r);d||(d=[],t.set(r,d)),d.push(l)}if(!t.size)return Array.from(n);const i=new Set,s=[];function o(r){if(!r.length)return[];const a=r[0];if(s.includes(a))return console.warn("Yield to cycle detected",a),r;if(i.has(a))return o(r.slice(1));let l=[];const d=t.get(a);return d&&(s.push(a),l=o(d),s.pop()),i.add(a),[...l,a,...o(r.slice(1))]}return o(Array.from(n))}function jh(n,e){return e&&(n.stack||n.stacktrace)?m(33,"{0}: {1}",Mv(n),Ov(n.stack)||Ov(n.stacktrace)):Mv(n)}function Ov(n){return Array.isArray(n)?n.join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tsMode-BgtcNcpl.js","assets/editor.api-BTIrAcm5.js","assets/preload-helper-DF7hIgef.js","assets/editor-1FQrmyyI.css","assets/workers-ClRH6A2w.js","assets/freemarker2-mnCFA3xV.js","assets/handlebars-BUcE6Uyy.js","assets/html-BBqcfykD.js","assets/javascript-CuGq5ydO.js","assets/typescript-Cy_CzC_-.js","assets/liquid-DXfHmR66.js","assets/mdx-QI5o45qz.js","assets/python-BvKEpyP9.js","assets/razor-Ceb9S1Rz.js","assets/xml-D11j3J2_.js","assets/yaml-D7Z_4mnx.js","assets/cssMode-G6latsS7.js","assets/lspLanguageFeatures-C7-iyD6G.js","assets/htmlMode-D8je66Rk.js","assets/jsonMode-BgdTmYik.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as U}from"./preload-helper-DF7hIgef.js";import{$ as BD,$a as An,$c as Jn,$d as UD,$i as Vc,$l as qu,$n as zD,$o as jD,$r as pS,$s as sr,$t as qD,$u as Ra,A as Bc,Aa as Ah,Ac as zo,Ad as jo,Ai as $D,Al as im,An as Ls,Ao as en,Ar as Oe,As as KD,At as GD,Au as Uc,B as ZD,Ba as ye,Bc as jd,Bd as XD,Bi as YD,Bl as JD,Bn as fS,Bo as QD,Br as mS,Bs as Li,Bt as _S,Bu as $u,C as e0,Ca as t0,Cc as zc,Cd as i0,Ci as K_,Cl as nm,Cn as Di,Co as vS,Cr as G_,Cs as Vi,Ct as sm,Cu as Yt,D as Z_,Da as n0,Dc as kt,Dd as s0,Di as bS,Dl as o0,Dn as om,Do as r0,Dr as a0,Ds as l0,Dt as CS,Du as d0,E as xi,Ea as c0,Ec as h0,Ed as L,Ei as Fh,El as _t,En as u0,Eo as He,Er as g0,Es as X_,Et as SS,Eu as wS,F as or,Fa as to,Fc as Qr,Fd as Y_,Fi as Ta,Fl as pt,Fn as tn,Fo as p0,Fr as Et,Fs as Ds,Ft as f0,Fu as y,G as yS,Ga as xS,Gc as m0,Gd as rm,Gi as IS,Gl as LS,Gn as DS,Go as mo,Gr as _0,Gs as ln,Gt as ES,Gu as J_,H as Ze,Ha as am,Hc as v0,Hd as lm,Hi as RS,Hl as dm,Hn as qd,Ho as Zs,Hr as TS,Hs as b0,Ht as cm,Hu as NS,I as C0,Ia as on,Ic as S0,Id as hm,Ii as kS,Il as gs,In as w0,Io as y0,Ir as jc,Is as lt,It as Q_,Iu as B,J as x0,Ja as ev,Jc as I0,Jd as we,Ji as L0,Jl as tv,Jn as PS,Jo as OS,Jr as al,Js as ve,Jt as iv,Ju as ea,K as MS,Ka as D0,Kc as ls,Kd as Ln,Ki as nv,Kl as Sr,Kn as E0,Ko as AS,Kr as FS,Ks as R0,Kt as T0,Ku as N0,L as sv,La as um,Lc as es,Ld as HS,Li as k0,Ll as gm,Ln as P0,Lo as O0,Lr as Nl,Ls as Es,Lt as qo,Lu as De,M as M0,Ma as A0,Mc as Ht,Md as F0,Mi as hd,Ml as at,Mn as _o,Mo as WS,Mr as Yo,Ms as H0,Mt as W0,Mu as V0,N as B0,Na as U0,Nc as Na,Nd as Dn,Ni as z0,Nl as ll,Nn as j0,No as q0,Nr as $0,Ns as dl,Nt as VS,Nu as V,O as qc,Oa as pm,Oc as K0,Od as G0,Oi as Z0,Ol as X0,On as Y0,Oo as ud,Or as $c,Os as ps,Ot as J0,Ou as ds,P as Q0,Pa as eE,Pc as Jt,Pd as tE,Pi as ov,Pl as iE,Pn as Kc,Po as nE,Pr as sE,Ps as Rn,Pt as rv,Pu as te,Q as Gc,Qa as oE,Qc as av,Qd as Ku,Qi as lv,Ql as ka,Qn as rE,Qo as Zc,Qr as aE,Qs as pe,Qt as BS,Qu as fm,R as mm,Ra as dt,Rc as lE,Rd as ta,Ri as US,Rl as rr,Rn as dE,Ro as je,Rr as cE,Rs as $,Rt as ar,Ru as Jo,S as _m,Sa as hE,Sc as uE,Sd as vm,Si as dv,Sl as gE,Sn as bm,So as zS,Sr as Ar,Ss as $d,St as vt,Su as pE,T as Be,Ta as fE,Tc as cl,Td as m,Ti as mE,Tl as gd,Tn as _E,To as wn,Tr as io,Ts as Cm,Tt as jS,Tu as Gu,U as qS,Ua as H,Uc as vE,Ud as $S,Ui as Sm,Ul as wm,Un as bE,Uo as nn,Ur as ym,Us as fe,Ut as CE,Uu as ue,Va as yn,Vc as cv,Vd as SE,Vi as KS,Vl as Xc,Vn as Pa,Vo as Zu,Vr as GS,Vs as wE,Vt as fs,Vu as et,W as hl,Wa as nt,Wc as wi,Wd as gt,Wi as ZS,Wl as XS,Wn as Oa,Wo as yE,Wr as xE,Ws as ni,Wt as IE,Wu as st,X as wr,Xa as Rs,Xc as xm,Xd as LE,Xi as DE,Xl as EE,Xn as RE,Xo as ct,Xr as pd,Xs as Re,Xt as TE,Xu as Tn,Y as NE,Ya as ul,Yc as Ts,Yd as tt,Yi as kE,Yl as PE,Yn as OE,Yo as hv,Yr as it,Ys as oe,Yt as YS,Z as JS,Za as uv,Zc as ME,Zd as QS,Zi as ew,Zl as AE,Zn as FE,Zo as HE,Zr as S,Zs as ht,Zt as gv,Zu as pv,_ as tw,_a as Xu,_c as de,_d as WE,_i as VE,_l as fv,_n as Yu,_o as fd,_r as BE,_s as UE,_t as lr,_u as Ju,a as mv,aa as zE,ac as $e,ad as O,af as Bi,ai as Im,al as Qu,an as jE,ao as yr,ar as gl,as as kl,at as Ge,au as qE,b as dr,ba as $E,bc as z,bd as xr,bi as iw,bl as KE,bn as GE,bo as Nn,br as ZE,bs as XE,bt as _v,bu as vv,c as bv,ca as YE,cc as nw,cd as JE,cf as Qt,ci as Hh,cl as QE,cn as eR,co as Fr,cr as tR,cs as Mt,ct as pl,cu as ba,d as iR,da as nR,dc as Le,dd as Lm,df as sR,di as oR,dl as Dm,dn as Em,do as rR,dr as sw,ds as k,dt as ms,du as Rm,ea as $o,ec as Ma,ed as Q,ef as aR,ei as Ca,el as Dt,en as eg,eo as ci,er as lR,es as Tt,et as ow,eu as Tm,f as dR,fa as fl,fc as Cn,fd as ke,ff as Cv,fi as cR,fl as Sv,fn as Nm,fo as hR,fr as km,fs as G,ft as uR,fu as gR,g as pR,ga as fR,gc as Wh,gd as tg,gi as mR,gl as Yc,gn as _R,go as me,gr as vR,gs as Jc,gt as bR,gu as Kd,h as no,ha as md,hc as Vh,hd as ml,hi as CR,hl as SR,hn as Ri,ho as wR,hr as wv,hs as Ut,ht as yR,hu as Qc,i as ts,ia as Gd,ic as Kt,id as rw,if as xR,ii as IR,il as LR,in as aw,io as cr,ir as DR,is as lw,it as Ir,iu as ER,j as Zd,ja as dw,jc as vi,jd as Se,ji as cw,jl as _s,jn as RR,jo as rt,jr as Hr,js as TR,jt as NR,ju as kR,k as eh,ka as hw,kc as PR,kd as Pm,ki as _l,kl as sn,kn as OR,ko as MR,kr as uw,ks as AR,kt as FR,ku as gw,l as K,la as pw,lc as HR,ld as fw,lf as WR,li as vl,ll as bl,ln as ti,lo as mw,lr as VR,ls as Om,lt as _w,lu as kn,m as vw,ma as Mm,mc as BR,md as bw,mi as Xd,ml as UR,mn as zR,mo as Z,mr as Yd,ms as jR,mt as yv,mu as Cw,na as Ys,nc as qR,nd as xv,nf as so,ni as hr,nl as $R,nn as Ce,no as Sw,nr as ww,ns as Fn,nt as ig,nu as yw,oa as KR,oc as ie,od as A,of as Iv,oi as Cl,ol as Fi,on as xw,oo as th,or as ih,os as M,ot as Am,ou as Lv,p as GR,pa as ng,pc as Ae,pd as cs,pf as Jd,pi as ZR,pl as Yi,pn as Iw,po as XR,pr as se,ps as ce,pt as YR,pu as _d,q as JR,qa as QR,qc as Dv,qd as Hn,qi as eT,ql as Fm,qn as nh,qo as Qd,qr as It,qs as N,qt as tT,qu as sh,ra as iT,rc as si,rd as hi,rf as nT,ri as Bh,rl as Ne,rn as sT,ro as Lw,rr as oT,rs as xe,rt as rT,ru as aT,sa as lT,sc as dn,sd as Je,sf as dT,si as oh,sl as he,sn as rh,so as cT,sr as ui,ss as gi,st as hT,su as Ev,t as Aa,ta as Pl,tc as ec,td as qe,tf as Ns,ti as Dw,tl as uT,tn as Hm,to as vs,tr as gT,ts as Wn,tt as pT,tu as yt,u as Ew,ua as fT,uc as W,ud as Nt,uf as oo,ui as Rw,ul as T,un as Fa,uo as mT,ur as Wm,us as ah,ut as _T,uu as vT,v as Tw,va as bT,vc as CT,vd as ST,vi as wT,vl as Rv,vn as yT,vo as ur,vr as xT,vs as Pt,vt as IT,vu as Lr,w as LT,wa as Tv,wc as tc,wd as DT,wi as Vm,wl as Nw,wn as ET,wo as Nv,wr as RT,ws as TT,wt as NT,wu as kT,x as kw,xa as PT,xc as di,xd as OT,xi as MT,xl as AT,xn as Ti,xo as ei,xr as FT,xs as HT,xt as lh,xu as is,y as Pw,ya as WT,yc as bs,yd as Pn,yi as Ow,yl as VT,yn as BT,yo as UT,yr as zT,ys as jT,yt as xn,yu as li,z as qT,za as $T,zc as q,zd as KT,zi as Mw,zl as GT,zn as Lt,zo as Aw,zr as ZT,zs as ro,zt as XT,zu as Uh}from"./editor.api-BTIrAcm5.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"db-studio@2.1.0"};var e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="04143ed1-1f8b-430b-99de-35ffe1957bb3",n._sentryDebugIdIdentifier="sentry-dbid-04143ed1-1f8b-430b-99de-35ffe1957bb3")}catch{}})();var YT=class extends lt{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:L(101,"Toggle Collapse Unchanged Regions"),icon:V.map,toggled:N.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:N.has("isInDiffEditor"),menu:{when:N.has("isInDiffEditor"),id:$.EditorTitle,order:22,group:"navigation"}})}run(n,...e){const t=n.get(xe),i=!t.getValue("diffEditor.hideUnchangedRegions.enabled");t.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}},Fw=class extends lt{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:L(102,"Toggle Show Moved Code Blocks"),precondition:N.has("isInDiffEditor")})}run(n,...e){const t=n.get(xe),i=!t.getValue("diffEditor.experimental.showMoves");t.updateValue("diffEditor.experimental.showMoves",i)}},Hw=class extends lt{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:L(103,"Toggle Use Inline View When Space Is Limited"),precondition:N.has("isInDiffEditor")})}run(n,...e){const t=n.get(xe),i=!t.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");t.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}},Sl=L(104,"Diff Editor"),JT=class extends gi{constructor(){super({id:"diffEditor.switchSide",title:L(105,"Switch Side"),icon:V.arrowSwap,precondition:N.has("isInDiffEditor"),f1:!0,category:Sl})}runEditorCommand(n,e,t){const i=vo(n);if(i instanceof dr){if(t&&t.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}},QT=class extends gi{constructor(){super({id:"diffEditor.exitCompareMove",title:L(106,"Exit Compare Move"),icon:V.close,precondition:S.comparingMovedCode,f1:!1,category:Sl,keybinding:{weight:1e4,primary:9}})}runEditorCommand(n,e,...t){const i=vo(n);i instanceof dr&&i.exitCompareMove()}},e1=class extends gi{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:L(107,"Collapse All Unchanged Regions"),icon:V.fold,precondition:N.has("isInDiffEditor"),f1:!0,category:Sl})}runEditorCommand(n,e,...t){const i=vo(n);i instanceof dr&&i.collapseAllUnchangedRegions()}},t1=class extends gi{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:L(108,"Show All Unchanged Regions"),icon:V.unfold,precondition:N.has("isInDiffEditor"),f1:!0,category:Sl})}runEditorCommand(n,e,...t){const i=vo(n);i instanceof dr&&i.showAllUnchangedRegions()}},sg=class extends lt{constructor(){super({id:"diffEditor.revert",title:L(109,"Revert"),f1:!0,category:Sl,precondition:N.has("isInDiffEditor")})}run(n,e){return e?this.runViaToolbarContext(n,e):this.runViaCursorOrSelection(n)}runViaCursorOrSelection(n){const e=vo(n);e instanceof dr&&e.revertFocusedRangeMappings()}runViaToolbarContext(n,e){const t=i1(n,e.originalUri,e.modifiedUri);t instanceof dr&&t.revertRangeMappings(e.mapping.innerChanges??[])}},Ww=L(110,"Accessible Diff Viewer"),Bm=class Vw extends lt{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:Vw.id,title:L(111,"Go to Next Difference"),category:Ww,precondition:N.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){vo(e)?.accessibleDiffViewerNext()}},Bw=class Uw extends lt{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:Uw.id,title:L(112,"Go to Previous Difference"),category:Ww,precondition:N.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){vo(e)?.accessibleDiffViewerPrev()}};function i1(n,e,t){return n.get($e).listDiffEditors().find(i=>{const s=i.getModifiedEditor(),o=i.getOriginalEditor();return s&&s.getModel()?.uri.toString()===t.toString()&&o&&o.getModel()?.uri.toString()===e.toString()})||null}function vo(n){const e=n.get($e).listDiffEditors(),t=zc();if(t){for(const i of e)if(i.getContainerDomNode().contains(t))return i}return null}fe(YT);fe(Fw);fe(Hw);Li.appendMenuItem($.EditorTitle,{command:{id:new Hw().desc.id,title:m(135,"Use Inline View When Space Is Limited"),toggled:N.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:N.has("isInDiffEditor")},order:11,group:"1_diff",when:N.and(S.diffEditorRenderSideBySideInlineBreakpointReached,N.has("isInDiffEditor"))});Li.appendMenuItem($.EditorTitle,{command:{id:new Fw().desc.id,title:m(136,"Show Moved Code Blocks"),icon:V.move,toggled:R0.create("config.diffEditor.experimental.showMoves",!0),precondition:N.has("isInDiffEditor")},order:10,group:"1_diff",when:N.has("isInDiffEditor")});fe(sg);for(const n of[{icon:V.arrowRight,key:S.diffEditorInlineMode.toNegated()},{icon:V.discard,key:S.diffEditorInlineMode}])Li.appendMenuItem($.DiffEditorHunkToolbar,{command:{id:new sg().desc.id,title:m(137,"Revert Block"),icon:n.icon},when:N.and(S.diffEditorModifiedWritable,n.key),order:5,group:"primary"}),Li.appendMenuItem($.DiffEditorSelectionToolbar,{command:{id:new sg().desc.id,title:m(138,"Revert Selection"),icon:n.icon},when:N.and(S.diffEditorModifiedWritable,n.key),order:5,group:"primary"});fe(JT);fe(QT);fe(e1);fe(t1);Li.appendMenuItem($.EditorTitle,{command:{id:Bm.id,title:m(139,"Open Accessible Diff Viewer"),precondition:N.has("isInDiffEditor")},order:10,group:"2_diff",when:N.and(S.accessibleDiffViewerVisible.negate(),N.has("isInDiffEditor"))});Re.registerCommandAlias("editor.action.diffReview.next",Bm.id);fe(Bm);Re.registerCommandAlias("editor.action.diffReview.prev",Bw.id);fe(Bw);var n1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},s1=function(n,e){return function(t,i){e(t,i,n)}},og,dh=new oe("selectionAnchorSet",!1),Cs=class{static{og=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(og.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=dh.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(te.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Lt().appendText(m(834,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ci(m(835,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(te.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Cs=og=n1([s1(1,ve)],Cs);var o1=class extends M{constructor(){super({id:"editor.action.setSelectionAnchor",label:L(836,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:et(2089,2080),weight:100}})}async run(n,e){Cs.get(e)?.setSelectionAnchor()}},r1=class extends M{constructor(){super({id:"editor.action.goToSelectionAnchor",label:L(837,"Go to Selection Anchor"),precondition:dh})}async run(n,e){Cs.get(e)?.goToSelectionAnchor()}},a1=class extends M{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:L(838,"Select from Anchor to Cursor"),precondition:dh,kbOpts:{kbExpr:S.editorTextFocus,primary:et(2089,2089),weight:100}})}async run(n,e){Cs.get(e)?.selectFromAnchorToCursor()}},l1=class extends M{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:L(839,"Cancel Selection Anchor"),precondition:dh,kbOpts:{kbExpr:S.editorTextFocus,primary:9,weight:100}})}async run(n,e){Cs.get(e)?.cancelSelectionAnchor()}};ce(Cs.ID,Cs,4);k(o1);k(r1);k(a1);k(l1);var d1=H("editorOverviewRuler.bracketMatchForeground","#A0A0A0",m(840,"Overview ruler marker color for matching brackets.")),c1=class extends M{constructor(){super({id:"editor.action.jumpToBracket",label:L(842,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:3165,weight:100}})}run(n,e){Ha.get(e)?.jumpToBracket()}},h1=class extends M{constructor(){super({id:"editor.action.selectToBracket",label:L(843,"Select to Bracket"),precondition:void 0,metadata:{description:L(844,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(n,e,t){let i=!0;t&&t.selectBrackets===!1&&(i=!1),Ha.get(e)?.selectToBracket(i)}},u1=class extends M{constructor(){super({id:"editor.action.removeBrackets",label:L(845,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(n,e){Ha.get(e)?.removeBrackets(this.id)}},g1=class{constructor(n,e,t){this.position=n,this.brackets=e,this.options=t}},Ha=class vd extends O{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(vd.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new at(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),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(80)&&(this._matchBrackets=this._editor.getOption(80),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;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const s=i.getStartPosition(),o=e.bracketPairs.matchBracket(s);let r=null;if(o)o[0].containsPosition(s)&&!o[1].containsPosition(s)?r=o[1].getStartPosition():o[1].containsPosition(s)&&(r=o[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(s);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(s);l&&l.range&&(r=l.range.getStartPosition())}}return r?new te(r.lineNumber,r.column,r.lineNumber,r.column):new te(s.lineNumber,s.column,s.lineNumber,s.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(s=>{const o=s.getStartPosition();let r=t.bracketPairs.matchBracket(o);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(o),!r)){const d=t.bracketPairs.findNextBracket(o);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(y.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(o)){const h=a;a=l,l=h}}a&&l&&i.push(new te(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const s=i.getPosition();let o=t.bracketPairs.matchBracket(s);o||(o=t.bracketPairs.findEnclosingBrackets(s)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=se.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline",overviewRuler:{color:it(d1),position:nn.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=se.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const s=i.brackets;s&&(e[t++]={range:s[0],options:i.options},e[t++]={range:s[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let s=[];this._lastVersionId===i&&(s=this._lastBracketsData);const o=[];let r=0;for(let h=0,u=e.length;h<u;h++){const g=e[h];g.isEmpty()&&(o[r++]=g.getStartPosition())}o.length>1&&o.sort(B.compare);const a=[];let l=0,d=0;const c=s.length;for(let h=0,u=o.length;h<u;h++){const g=o[h];for(;d<c&&s[d].position.isBefore(g);)d++;if(d<c&&s[d].position.equals(g))a[l++]=s[d];else{let p=t.bracketPairs.matchBracket(g,20),f=vd._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(g,20),f=vd._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new g1(g,p,f)}}this._lastBracketsData=a,this._lastVersionId=i}};ce(Ha.ID,Ha,1);k(h1);k(c1);k(u1);Li.appendMenuItem($.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m(841,"Go to &&Bracket")},order:2});al((n,e)=>{const t=n.getColor(xE);t&&e.addRule(`.monaco-editor .bracket-match-inline { color: ${t} !important; }`)});var p1=class{constructor(n,e){this._selection=n,this._isMovingLeft=e}getEditOperations(n,e){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const t=this._selection.startLineNumber,i=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&i===1)&&!(!this._isMovingLeft&&s===n.getLineMaxColumn(t)))if(this._isMovingLeft){const o=new y(t,i-1,t,i),r=n.getValueInRange(o);e.addEditOperation(o,null),e.addEditOperation(new y(t,s,t,s),r)}else{const o=new y(t,s,t,s+1),r=n.getValueInRange(o);e.addEditOperation(o,null),e.addEditOperation(new y(t,i,t,i),r)}}computeCursorState(n,e){return this._isMovingLeft?new te(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new te(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}},zw=class extends M{constructor(n,e){super(e),this.left=n}run(n,e){if(!e.hasModel())return;const t=[],i=e.getSelections();for(const s of i)t.push(new p1(s,this.left));e.pushUndoStop(),e.executeCommands(this.id,t),e.pushUndoStop()}},f1=class extends zw{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:L(846,"Move Selected Text Left"),precondition:S.writable})}},m1=class extends zw{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:L(847,"Move Selected Text Right"),precondition:S.writable})}};k(f1);k(m1);var _1=class extends M{constructor(){super({id:"editor.action.transposeLetters",label:L(848,"Transpose Letters"),precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(n,e){if(!e.hasModel())return;const t=e.getModel(),i=[],s=e.getSelections();for(const o of s){if(!o.isEmpty())continue;const r=o.startLineNumber,a=o.startColumn,l=t.getLineMaxColumn(r);if(r===1&&(a===1||a===2&&l===2))continue;const d=a===l?o.getPosition():Hh.rightPosition(t,o.getPosition().lineNumber,o.getPosition().column),c=Hh.leftPosition(t,d),h=Hh.leftPosition(t,c),u=t.getValueInRange(y.fromPositions(h,c)),g=t.getValueInRange(y.fromPositions(c,d)),p=y.fromPositions(h,d);i.push(new vl(p,g+u))}i.length>0&&(e.pushUndoStop(),e.executeCommands(this.id,i),e.pushUndoStop())}};k(_1);var Ve=class Fo{static{this.sep="."}static{this.None=new Fo("@@none@@")}static{this.Empty=new Fo("")}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+Fo.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new Fo((this.value?[this.value,...e]:e).join(Fo.sep))}},v1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},b1=function(n,e){return function(t,i){e(t,i,n)}},C1=se.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:" ",inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),S1=class jw extends O{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,s,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(s),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=W(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=W("span.icon");this.domNode.append(t),t.classList.add(...pe.asClassNameArray(V.loading),"codicon-modifier-spin");const i=()=>{const s=this.editor.getOption(75);this.domNode.style.height=`${s}px`,this.domNode.style.width=`${Math.ceil(.8*s)}px`};i(),this._register(this.editor.onDidChangeConfiguration(s=>{(s.hasChanged(61)||s.hasChanged(75))&&i()})),this._register(de(this.domNode,Ae.CLICK,s=>{this.delegate.cancel()}))}getId(){return jw.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)}},ic=class extends O{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new Je),this._currentWidget=this._register(new Je),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,s,o){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=gs(()=>{const a=y.fromPositions(e);this._currentDecorations.set([{range:a,options:C1}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(S1,this.id,this._editor,a,t,s))},o??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};ic=v1([b1(2,ie)],ic);var w1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},kv=function(n,e){return function(t,i){e(t,i,n)}},bd,qt=class{static{bd=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new oe("messageVisible",!1,m(1333,"Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(bd.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new Je,this._messageListeners=new A,this._mouseOverMessage=!1,this._editor=e,this._visible=bd.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(ci(qd(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),qd(e)){const s=this._messageListeners.add(Kc(e,{actionHandler:(o,r)=>{this.closeMessage(),RR(this._openerService,o,r.isTrusted)}}));this._messageWidget.value=new zh(this._editor,t,s.element)}else this._messageWidget.value=new zh(this._editor,t,e);this._messageListeners.add(qe.debounce(this._editor.onDidBlurEditorText,(s,o)=>o,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&S0(zc(),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(de(this._messageWidget.value.getDomNode(),Ae.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(de(this._messageWidget.value.getDomNode(),Ae.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(s=>{s.target.position&&(i?i.containsPosition(s.target.position)||this.closeMessage():i=new y(t.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(zh.fadeOut(this._messageWidget.value))}};qt=bd=w1([kv(1,ve),kv(2,_o)],qt);var y1=Mt.bindToContribution(qt.get);G(new y1({id:"leaveEditorMessage",precondition:qt.MESSAGE_VISIBLE,handler:n=>n.closeMessage(),kbOpts:{weight:130,primary:9}}));var zh=class{static fadeOut(n){const e=()=>{n.dispose(),clearTimeout(t),n.getDomNode().removeEventListener("animationend",e)},t=setTimeout(e,110);return n.getDomNode().addEventListener("animationend",e),n.getDomNode().classList.add("fadeOut"),{dispose:e}}constructor(n,{lineNumber:e,column:t},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=n,this._editor.revealLinesInCenterIfOutsideViewport(e,e,0),this._position={lineNumber:e,column:t},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");typeof i=="string"?(o.classList.add("message"),o.textContent=i):(i.classList.add("message"),o.appendChild(i)),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),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(n){this._domNode.classList.toggle("below",n===2)}};ce(qt.ID,qt,4);var Um=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Wa=function(n,e){return function(t,i){e(t,i,n)}},zm=class{constructor(n){this.copyMimeTypes=[],this.kind=n,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(n,e,t,i,s){const o=await this.getEdit(t,s);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}async provideDocumentDropEdits(n,e,t,i){const s=await this.getEdit(t,i);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}},Va=class qw extends zm{static{this.id="text"}constructor(){super(Ve.Empty.append("text","plain")),this.id=qw.id,this.dropMimeTypes=[Tt.text],this.pasteMimeTypes=[Tt.text]}async getEdit(e,t){const i=e.get(Tt.text);if(!i||e.has(Tt.uriList))return;const s=await i.asString();return{handledMimeType:Tt.text,title:m(965,"Insert Plain Text"),insertText:s,kind:this.kind}}},$w=class extends zm{constructor(){super(Ve.Empty.append("uri","path","absolute")),this.dropMimeTypes=[Tt.uriList],this.pasteMimeTypes=[Tt.uriList]}async getEdit(n,e){const t=await Kw(n);if(!t.length||e.isCancellationRequested)return;let i=0;const s=t.map(({uri:r,originalText:a})=>r.scheme===_t.file?r.fsPath:(i++,a)).join(" ");let o;return i>0?o=t.length>1?m(966,"Insert Uris"):m(967,"Insert Uri"):o=t.length>1?m(968,"Insert Paths"):m(969,"Insert Path"),{handledMimeType:Tt.uriList,insertText:s,title:o,kind:this.kind}}},nc=class extends zm{constructor(e){super(Ve.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[Tt.uriList],this.pasteMimeTypes=[Tt.uriList]}async getEdit(e,t){const i=await Kw(e);if(!i.length||t.isCancellationRequested)return;const s=Ns(i.map(({uri:o})=>{const r=this._workspaceContextService.getWorkspaceFolder(o);return r?TR(r.uri,o):void 0}));if(s.length)return{handledMimeType:Tt.uriList,insertText:s.join(" "),title:i.length>1?m(970,"Insert Relative Paths"):m(971,"Insert Relative Path"),kind:this.kind}}};nc=Um([Wa(0,ms)],nc);var x1=class{constructor(){this.kind=new Ve("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Tt.text}]}async provideDocumentPasteEdits(n,e,t,i,s){if(i.triggerKind!==Ju.PasteAs&&!i.only?.contains(this.kind))return;const o=await t.get("text/html")?.asString();if(!(!o||s.isCancellationRequested))return{dispose(){},edits:[{insertText:o,yieldTo:this._yieldTo,title:m(972,"Insert HTML"),kind:this.kind}]}}};async function Kw(n){const e=n.get(Tt.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const s of Ow.parse(t))try{i.push({uri:De.parse(s),originalText:s})}catch{}return i}var Js={scheme:"*",hasAccessToAllModels:!0},rg=class extends O{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(Js,new Va)),this._register(e.documentDropEditProvider.register(Js,new $w)),this._register(e.documentDropEditProvider.register(Js,new nc(t)))}};rg=Um([Wa(0,Z),Wa(1,ms)],rg);var ag=class extends O{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(Js,new Va)),this._register(e.documentPasteEditProvider.register(Js,new $w)),this._register(e.documentPasteEditProvider.register(Js,new nc(t))),this._register(e.documentPasteEditProvider.register(Js,new x1))}};ag=Um([Wa(0,Z),Wa(1,ms)],ag);var I1=class $i{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}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};const e=this.pos;let t=0,i=this.value.charCodeAt(e),s;if(s=$i._table[i],typeof s=="number")return this.pos+=1,{type:s,pos:e,len:1};if($i.isDigitCharacter(i)){s=8;do t+=1,i=this.value.charCodeAt(e+t);while($i.isDigitCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}if($i.isVariableCharacter(i)){s=9;do i=this.value.charCodeAt(e+ ++t);while($i.isVariableCharacter(i)||$i.isDigitCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}s=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof $i._table[i]>"u"&&!$i.isDigitCharacter(i)&&!$i.isVariableCharacter(i));return this.pos+=t,{type:s,pos:e,len:t}}},Dr=class{constructor(){this._children=[]}appendChild(n){return n instanceof jt&&this._children[this._children.length-1]instanceof jt?this._children[this._children.length-1].value+=n.value:(n.parent=this,this._children.push(n)),this}replace(n,e){const{parent:t}=n,i=t.children.indexOf(n),s=t.children.slice(0);s.splice(i,1,...e),t._children=s,(function o(r,a){for(const l of r)l.parent=a,o(l.children,l)})(e,t)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let n=this;for(;;){if(!n)return;if(n instanceof jm)return n;n=n.parent}}toString(){return this.children.reduce((n,e)=>n+e.toString(),"")}len(){return 0}},jt=class Gw extends Dr{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Gw(this.value)}},Zw=class extends Dr{},Ai=class Xw extends Zw{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 ch?this._children[0]:void 0}clone(){const e=new Xw(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},ch=class Yw extends Dr{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof jt&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new Yw;return this.options.forEach(e.appendChild,e),e}},L1=class Jw extends Dr{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,s=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(o=>o instanceof vn&&!!o.elseValue)&&(s=this._replace([])),s}_replace(e){let t="";for(const i of this._children)if(i instanceof vn){let s=e[i.index]||"";s=i.resolve(s),t+=s}else t+=i.toString();return t}toString(){return""}clone(){const e=new Jw;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}},vn=class Qw extends Dr{constructor(e,t,i,s){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=s}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):"":this.shorthandName==="kebabcase"?e?this._toKebabCase(e):"":this.shorthandName==="snakecase"?e?this._toSnakeCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toKebabCase(e){if(!e.match(/[\p{L}0-9]+/gu))return e;if(!e.match(/[\p{L}0-9]/u))return e.trim().toLowerCase().replace(/^_+|_+$/g,"").replace(/[\s_]+/g,"-");const t=e.trim().replace(/^_+|_+$/g,""),i=t.match(/\p{Lu}{2,}(?=\p{Lu}\p{Ll}+[0-9]*|[\s_-]|$)|\p{Lu}?\p{Ll}+[0-9]*|\p{Lu}(?=\p{Lu}\p{Ll})|\p{Lu}(?=[\s_-]|$)|[0-9]+/gu);return i?i.map(s=>s.toLowerCase()).join("-"):t.split(/[\s_-]+/).filter(s=>s.length>0).map(s=>s.toLowerCase()).join("-")}_toPascalCase(e){const t=e.match(/[\p{L}0-9]+/gu);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[\p{L}0-9]+/gu);return t?t.map((i,s)=>s===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toSnakeCase(e){return e.replace(/(\p{Ll})(\p{Lu})/gu,"$1_$2").replace(/[\s\-]+/g,"_").toLowerCase()}clone(){return new Qw(this.index,this.shorthandName,this.ifValue,this.elseValue)}},Ba=class ey extends Zw{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 jt(t)],!0):!1}clone(){const e=new ey(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};function Pv(n,e){const t=[...n];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}var jm=class ty extends Dr{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof Ai&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(s=>s===e?(i=!0,!1):(t+=s.len(),!0)),i?t:-1}fullLen(e){let t=0;return Pv([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof Ai&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Ba&&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(){const e=new ty;return e._children=this.children.map(t=>t.clone()),e}walk(e){Pv(this.children,e)}},ao=class{constructor(){this._scanner=new I1,this._token={type:14,pos:0,len:0}}static escape(n){return n.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(n){return/\${?CLIPBOARD/.test(n)}parse(n,e,t){const i=new jm;return this.parseFragment(n,i),this.ensureFinalTabstop(i,t??!1,e??!1),i}parseFragment(n,e){const t=e.children.length;for(this._scanner.text(n),this._token=this._scanner.next();this._parse(e););const i=new Map,s=[];e.walk(a=>(a instanceof Ai&&(a.isFinalTabstop?i.set(0,void 0):!i.has(a.index)&&a.children.length>0?i.set(a.index,a.children):s.push(a)),!0));const o=(a,l)=>{const d=i.get(a.index);if(!d)return;const c=new Ai(a.index);c.transform=a.transform;for(const h of d){const u=h.clone();c.appendChild(u),u instanceof Ai&&i.has(u.index)&&!l.has(u.index)&&(l.add(u.index),o(u,l),l.delete(u.index))}e.replace(a,[c])},r=new Set;for(const a of s)o(a,r);return e.children.slice(t)}ensureFinalTabstop(n,e,t){(e||t&&n.placeholders.length>0)&&(n.placeholders.find(i=>i.index===0)||n.appendChild(new Ai(0)))}_accept(n,e){if(n===void 0||this._token.type===n){const t=e?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),t}return!1}_backTo(n){return this._scanner.pos=n.pos+n.len,this._token=n,!1}_until(n){const e=this._token;for(;this._token.type!==n;){if(this._token.type===14)return!1;if(this._token.type===5){const i=this._scanner.next();if(i.type!==0&&i.type!==4&&i.type!==5)return!1}this._token=this._scanner.next()}const t=this._scanner.value.substring(e.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),t}_parse(n){return this._parseEscaped(n)||this._parseTabstopOrVariableName(n)||this._parseComplexPlaceholder(n)||this._parseComplexVariable(n)||this._parseAnything(n)}_parseEscaped(n){let e;return(e=this._accept(5,!0))?(e=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||e,n.appendChild(new jt(e)),!0):!1}_parseTabstopOrVariableName(n){let e;const t=this._token;return this._accept(0)&&(e=this._accept(9,!0)||this._accept(8,!0))?(n.appendChild(/^\d+$/.test(e)?new Ai(Number(e)):new Ba(e)),!0):this._backTo(t)}_parseComplexPlaceholder(n){let e;const t=this._token;if(!(this._accept(0)&&this._accept(3)&&(e=this._accept(8,!0))))return this._backTo(t);const i=new Ai(Number(e));if(this._accept(1))for(;;){if(this._accept(4))return n.appendChild(i),!0;if(!this._parse(i))return n.appendChild(new jt("${"+e+":")),i.children.forEach(n.appendChild,n),!0}else if(i.index>0&&this._accept(7)){const s=new ch;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(s),this._accept(4)))return n.appendChild(i),!0}return this._backTo(t),!1}}else return this._accept(6)?this._parseTransform(i)?(n.appendChild(i),!0):(this._backTo(t),!1):this._accept(4)?(n.appendChild(i),!0):this._backTo(t)}_parseChoiceElement(n){const e=this._token,t=[];for(;!(this._token.type===2||this._token.type===7);){let i;if((i=this._accept(5,!0))?i=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||i:i=this._accept(void 0,!0),!i)return this._backTo(e),!1;t.push(i)}return t.length===0?(this._backTo(e),!1):(n.appendChild(new jt(t.join(""))),!0)}_parseComplexVariable(n){let e;const t=this._token;if(!(this._accept(0)&&this._accept(3)&&(e=this._accept(9,!0))))return this._backTo(t);const i=new Ba(e);if(this._accept(1))for(;;){if(this._accept(4))return n.appendChild(i),!0;if(!this._parse(i))return n.appendChild(new jt("${"+e+":")),i.children.forEach(n.appendChild,n),!0}else return this._accept(6)?this._parseTransform(i)?(n.appendChild(i),!0):(this._backTo(t),!1):this._accept(4)?(n.appendChild(i),!0):this._backTo(t)}_parseTransform(n){const e=new L1;let t="",i="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,t+=s;continue}if(this._token.type!==14){t+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,e.appendChild(new jt(s));continue}if(!(this._parseFormatString(e)||this._parseAnything(e)))return!1}for(;!this._accept(4);){if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}try{e.regexp=new RegExp(t,i)}catch{return!1}return n.transform=e,!0}_parseFormatString(n){const e=this._token;if(!this._accept(0))return!1;let t=!1;this._accept(3)&&(t=!0);const i=this._accept(8,!0);if(i)if(t){if(this._accept(4))return n.appendChild(new vn(Number(i))),!0;if(!this._accept(1))return this._backTo(e),!1}else return n.appendChild(new vn(Number(i))),!0;else return this._backTo(e),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(e),!1):(n.appendChild(new vn(Number(i),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return n.appendChild(new vn(Number(i),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return n.appendChild(new vn(Number(i),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const o=this._until(4);if(o)return n.appendChild(new vn(Number(i),void 0,s,o)),!0}}else{const s=this._until(4);if(s)return n.appendChild(new vn(Number(i),void 0,void 0,s)),!0}return this._backTo(e),!1}_parseAnything(n){return this._token.type!==14?(n.appendChild(new jt(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}};function iy(n,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(i=>new _w(n,{range:i,text:typeof t.insertText=="string"?ao.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function ny(n){function e(r,a){return"mimeType"in r?r.mimeType===a.handledMimeType:!!a.kind&&r.kind.contains(a.kind)}const t=new Map;for(const r of n)for(const a of r.yieldTo??[])for(const l of n)if(l!==r&&e(a,l)){let d=t.get(r);d||(d=[],t.set(r,d)),d.push(l)}if(!t.size)return Array.from(n);const i=new Set,s=[];function o(r){if(!r.length)return[];const a=r[0];if(s.includes(a))return console.warn("Yield to cycle detected",a),r;if(i.has(a))return o(r.slice(1));let l=[];const d=t.get(a);return d&&(s.push(a),l=o(d),s.pop()),i.add(a),[...l,a,...o(r.slice(1))]}return o(Array.from(n))}function jh(n,e){return e&&(n.stack||n.stacktrace)?m(33,"{0}: {1}",Mv(n),Ov(n.stack)||Ov(n.stacktrace)):Mv(n)}function Ov(n){return Array.isArray(n)?n.join(`
|
|
3
3
|
`):n}function Mv(n){return n.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${n.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof n.code=="string"&&typeof n.errno=="number"&&typeof n.syscall=="string"?m(34,"A system error occurred ({0})",n.message):n.message||m(35,"An unknown error occurred. Please consult the log for more details.")}function sc(n=null,e=!1){if(!n)return m(36,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(n)){const t=Ns(n),i=sc(t[0],e);return t.length>1?m(37,"{0} ({1} errors in total)",i,t.length):i}if(HS(n))return n;if(n.detail){const t=n.detail;if(t.error)return jh(t.error,e);if(t.exception)return jh(t.exception,e)}return n.stack?jh(n,e):n.message?n.message:m(38,"An unknown error occurred. Please consult the log for more details.")}var qm=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},hs=function(n,e){return function(t,i){e(t,i,n)}},lg,sy="acceptSelectedCodeAction",oy="previewSelectedCodeAction",D1=class{get templateId(){return"header"}renderTemplate(n){n.classList.add("group-header");const e=document.createElement("span");return n.append(e),{container:n,text:e}}renderElement(n,e,t){t.text.textContent=n.group?.title??n.label??""}disposeTemplate(n){}},E1=class{get templateId(){return"separator"}renderTemplate(n){n.classList.add("separator");const e=document.createElement("span");return n.append(e),{container:n,text:e}}renderElement(n,e,t){t.text.textContent=n.label??""}disposeTemplate(n){}},dg=class{get templateId(){return"action"}constructor(e,t,i,s,o,r,a,l,d){this._supportsPreview=e,this._onRemoveItem=t,this._onShowSubmenu=i,this._hasAnySubmenuActions=s,this._groupTitleByIndex=o,this._linkHandler=r,this._hideDefaultKeybindingTooltip=a,this._keybindingService=l,this._openerService=d}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const s=document.createElement("span");s.className="action-item-badge",e.append(s);const o=document.createElement("span");o.className="description",e.append(o);const r=document.createElement("span");r.className="group-title",e.append(r);const a=document.createElement("span");a.className="detail",e.append(a);const l=new hl(e,ml),d=document.createElement("div");d.className="action-list-item-toolbar",e.append(d);const c=document.createElement("div");return c.className="action-list-submenu-indicator",e.append(c),{container:e,icon:t,text:i,detail:a,badge:s,description:o,groupTitle:r,keybinding:l,toolbar:d,submenuIndicator:c,elementDisposables:new A}}renderElement(e,t,i){if(i.elementDisposables.clear(),e.group?.icon?(i.icon.className=pe.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=ye(e.group.icon.color.id))):(i.icon.className=pe.asClassName(V.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;if(vE(!e.hideIcon,i.icon),e.isSectionToggle){const l=e.group?.icon===V.chevronDown;i.container.setAttribute("aria-expanded",String(l))}else i.container.removeAttribute("aria-expanded");if(i.previousClassName&&i.container.classList.remove(i.previousClassName),i.container.classList.toggle("action-list-custom",!!e.className),e.className&&i.container.classList.add(e.className),i.previousClassName=e.className,i.text.textContent=Xi(e.label),e.badge?(i.badge.textContent=e.badge,i.badge.style.display=""):(i.badge.textContent="",i.badge.style.display="none"),e.keybinding)i.description.textContent=e.keybinding.getLabel(),i.description.style.display="inline",i.description.style.letterSpacing="0.5px";else if(e.description){if(di(i.description),typeof e.description=="string")i.description.textContent=Xi(e.description);else{const l=Kc(e.description,{actionHandler:d=>{const c=De.parse(d);this._linkHandler?this._linkHandler(c,e):this._openerService.open(c,{allowCommands:!0})}});i.elementDisposables.add(l),i.description.appendChild(l.element)}i.description.style.display="inline"}else i.description.textContent="",i.description.style.display="none";const s=this._groupTitleByIndex.get(t);s?(i.groupTitle.textContent=s,i.groupTitle.style.display=""):(i.groupTitle.textContent="",i.groupTitle.style.display="none"),e.detail?(i.detail.textContent=Xi(e.detail),i.detail.style.display=""):(i.detail.textContent="",i.detail.style.display="none");const o=this._keybindingService.lookupKeybinding(sy)?.getLabel(),r=this._keybindingService.lookupKeybinding(oy)?.getLabel();i.container.classList.toggle("option-disabled",!!e.disabled),e.hover!==void 0?i.container.title="":e.tooltip?i.container.title=e.tooltip:e.disabled?i.container.title=e.label:this._hideDefaultKeybindingTooltip?i.container.title="":o&&r?this._supportsPreview&&e.canPreview?i.container.title=m(1705,"{0} to Apply, {1} to Preview",o,r):i.container.title=m(1706,"{0} to Apply",o):i.container.title="",di(i.toolbar);const a=[...e.toolbarActions??[]];if(e.onRemove&&a.push(qR({id:"actionList.remove",label:m(1707,"Remove"),class:pe.asClassName(V.close),run:async()=>{await e.onRemove(),this._onRemoveItem?.(e)}})),i.container.classList.toggle("has-toolbar",a.length>0),a.length>0){const l=new fs(i.toolbar);i.elementDisposables.add(l),l.push(a,{icon:!0,label:!1})}e.submenuActions?.length&&!e.hover?.content?(i.submenuIndicator.className="action-list-submenu-indicator has-submenu "+pe.asClassName(V.chevronRight),i.submenuIndicator.style.display="",i.submenuIndicator.style.visibility="",i.elementDisposables.add(de(i.submenuIndicator,Ae.CLICK,l=>{l.stopPropagation(),this._onShowSubmenu?.(e)}))):this._hasAnySubmenuActions?(i.submenuIndicator.className="action-list-submenu-indicator",i.submenuIndicator.style.display="",i.submenuIndicator.style.visibility="hidden"):(i.submenuIndicator.className="action-list-submenu-indicator",i.submenuIndicator.style.display="none")}disposeTemplate(e){e.keybinding.dispose(),e.elementDisposables.dispose()}};dg=qm([hs(7,Oe),hs(8,_o)],dg);var R1=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Av=class extends UIEvent{constructor(){super("previewSelectedAction")}};function T1(n){if(n.kind==="action")return n.label}var cg=lg=class extends O{constructor(e,t,i,s,o,r,a,l,d){if(super(),this._supportsPreview=t,this._delegate=s,this._options=r,this._keybindingService=a,this._openerService=l,this._instantiationService=d,this._headerLineHeight=24,this._separatorLineHeight=8,this.cts=this._register(new st),this._submenuDisposables=this._register(new A),this._collapsedSections=new Set,this._filterText="",this._suppressHover=!1,this._hasLaidOut=!1,this._filterCts=this._register(new Je),this._groupTitleByIndex=new Map,this._onDidRequestLayout=this._register(new Q),this.onDidRequestLayout=this._onDidRequestLayout.event,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList"),this._options?.inlineDescription&&this.domNode.classList.add("inline-description"),this._options?.className){const u=this._options.className.split(/\s+/).filter(g=>g.length>0);u.length>0&&this.domNode.classList.add(...u)}if(this._actionLineHeight=24,this._submenuContainer=document.createElement("div"),this._submenuContainer.className="action-list-submenu-panel action-widget",this._submenuContainer.style.display="none",this._submenuContainer.tabIndex=-1,this.domNode.append(this._submenuContainer),this._register(de(this._submenuContainer,"mouseenter",()=>{this._cancelSubmenuHide()})),this._register(de(this._submenuContainer,"mouseleave",()=>{this._scheduleSubmenuHide()})),this._register(ke(()=>{this._cancelSubmenuHide(),this._cancelSubmenuShow()})),this._options?.collapsedByDefault)for(const u of this._options.collapsedByDefault)this._collapsedSections.add(u);const c={getHeight:u=>this._getItemHeight(u),getTemplateId:u=>u.kind},h=(this._options?.reserveSubmenuSpace??!0)&&i.some(u=>!!u.submenuActions?.length&&!u.hover?.content);if(this._list=this._register(new Hm(e,this.domNode,c,[new dg(this._supportsPreview,u=>this._removeItem(u),u=>this._showSubmenuForItem(u),h,this._groupTitleByIndex,this._options?.linkHandler,this._options?.hideDefaultKeybindingTooltip??!1,this._keybindingService,this._openerService),new D1,new E1],{keyboardSupport:!1,typeNavigationEnabled:!this._options?.showFilter,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:T1},accessibilityProvider:{getAriaLabel:u=>{if(u.kind==="action"){let g=u.label?Xi(u?.label):"";if(u.detail&&(g=g+", "+Xi(u.detail)),u.ariaDescription)g=g+", "+Xi(u.ariaDescription);else if(u.description){const p=typeof u.description=="string"?u.description:u.description.value;g=g+", "+Xi(p)}if(u.hover?.content&&!u.ariaDescription&&!u.description){const p=u.hover.content,f=typeof p=="string"?p:qd(p)?p.value:es(p)?p.textContent??void 0:void 0;f&&(!u.detail||Xi(u.detail)!==Xi(f))&&(g=g+", "+Xi(f))}return u.group?.title&&(g=g+", "+u.group.title),u.disabled&&(g=m(1708,"{0}, Disabled Reason: {1}",g,u.disabled)),u.submenuActions?.length&&(g=m(1709,"{0}, use right arrow to access options",g)),g}return null},getWidgetAriaLabel:()=>m(1710,"Action Widget"),getRole:u=>{switch(u.kind){case"action":return"option";case"separator":return"separator";default:return"separator"}},getWidgetRole:()=>"listbox",...o}})),this._list.style(TE),this._register(this._list.onMouseClick(u=>this.onListClick(u))),this._register(this._list.onMouseOver(u=>this.onListHover(u))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(u=>this.onListSelection(u))),this._allMenuItems=[...i],this._options?.showFilter||this._options?.secondaryHeading){this._filterContainer=document.createElement("div"),this._filterContainer.className="action-list-filter";const u=z(this._filterContainer,W(".action-list-filter-row"));if(this._options?.showFilter){this._filterInput=document.createElement("input"),this._filterInput.type="text",this._filterInput.className="action-list-filter-input",this._filterInput.placeholder=this._options?.filterPlaceholder??m(1711,"Search..."),this._filterInput.setAttribute("aria-label",m(1712,"Filter items")),u.appendChild(this._filterInput);const g=this._options?.filterActions??[];if(g.length>0){const p=z(u,W(".action-list-filter-actions"));this._register(new fs(p)).push(g,{icon:!0,label:!1})}this._register(de(this._filterInput,"input",()=>{this._filterText=this._filterInput.value,this._applyOrUpdateFilter()}))}if(this._options?.secondaryHeading){const g=z(u,W(".action-list-filter-label"));g.textContent=this._options.secondaryHeading}}if(this._options?.footerText&&(this._footerContainer=document.createElement("div"),this._footerContainer.className="action-list-footer",this._footerContainer.textContent=this._options.footerText),this._options?.headerText){if(this._headerContainer=document.createElement("div"),this._headerContainer.className="action-list-header",this._options.headerIcon){const g=z(this._headerContainer,W("span.action-list-header-icon"));g.classList.add(...pe.asClassNameArray(this._options.headerIcon)),g.setAttribute("aria-hidden","true")}const u=z(this._headerContainer,W("span.action-list-header-text"));u.textContent=this._options.headerText}this._applyFilter(),this._list.length&&this._focusCheckedOrFirst(),this._register(de(this.domNode,"keydown",u=>{if(u.key==="ArrowRight"){const g=this._list.getFocus();if(g.length>0){const p=this._list.element(g[0]);if(p?.submenuActions?.length){Cn.stop(u,!0);const f=this._getRowElement(g[0]);f&&(this._showSubmenuForElement(p,f),this._currentSubmenuWidget?.focus())}}}})),this._filterInput&&this._register(de(this.domNode,"keydown",u=>{this._filterInput&&!Qr(this._filterInput)&&u.key.length===1&&u.key!==" "&&!u.ctrlKey&&!u.metaKey&&!u.altKey&&(this._filterInput.focus(),this._filterInput.value=u.key,this._filterText=u.key,this._applyOrUpdateFilter(),u.preventDefault(),u.stopPropagation())}))}_toggleSection(e){this._collapsedSections.has(e)?this._collapsedSections.delete(e):this._collapsedSections.add(e),this._options?.onDidToggleSection?.(e,this._collapsedSections.has(e)),this._applyFilter()}_applyOrUpdateFilter(){if(!this._delegate.onFilter){this._applyFilter();return}const e=this._filterText;this._filterCts.value?.cancel();const t=new st;this._filterCts.value=t,this._delegate.onFilter(e,t.token).then(i=>{t.token.isCancellationRequested||(this._allMenuItems=[...i],this._applyFilter(!0))}).catch(()=>{})}_applyFilter(e=!1,t=!0){const i=e?"":this._filterText.toLowerCase(),s=!e&&i.length>0,o=[],r=this._list.getFocus();let a;if(r.length>0&&(a=this._list.element(r[0])),s){let g,p=[],f=!1;const _=()=>{g&&f&&o.push(g),o.push(...p),g=void 0,p=[],f=!1},v=C=>{const x=(C.label??"").toLowerCase(),I=typeof C.description=="string"?C.description:C.description?.value??"";return x.includes(i)||I.toLowerCase().includes(i)};for(const C of this._allMenuItems)if(C.kind!=="header"){if(C.kind==="separator"){_(),g=C.label?C:void 0;continue}if(C.showAlways){p.push(C);continue}C.isSectionToggle||v(C)&&(f=!0,p.push(C))}_()}else for(const g of this._allMenuItems){if(g.kind==="header"){o.push(g);continue}if(g.kind==="separator"){if(g.section&&this._collapsedSections.has(g.section))continue;o.push(g);continue}if(g.isSectionToggle&&g.section){const p=this._collapsedSections.has(g.section);o.push({...g,group:{...g.group,icon:p?V.chevronRight:V.chevronDown}});continue}g.section&&this._collapsedSections.has(g.section)||o.push(g)}const l=[];let d=!1;for(let g=0;g<o.length;g++)l[g]=d,o[g].kind==="action"&&(d=!0);const c=[];let h=!1;for(let g=o.length-1;g>=0;g--){if(o[g].kind==="action"){h=!0;continue}o[g].kind==="separator"&&(c[g]=h,h=!1)}for(let g=o.length-1;g>=0;g--){const p=o[g];if(p.kind!=="separator")continue;const f=c[g],_=!p.label&&!l[g];(!f||_)&&o.splice(g,1)}this._options?.showGroupTitleOnFirstItem&&this._recomputeGroupTitles(o);const u=this._filterInput&&Qr(this._filterInput);if(this._list.splice(0,this._list.length,o),t&&this._onDidRequestLayout.fire(),u)this._filterInput?.focus(),this._focusCheckedOrFirst();else if(this._hasLaidOut&&a){const g=a.item?.id;if(g){for(let p=0;p<this._list.length;p++)if(this._list.element(p).item?.id===g){this._list.setFocus([p]),this._list.reveal(p),this._list.domFocus();break}}}}get filterContainer(){return this._filterContainer}get footerContainer(){return this._footerContainer}get headerContainer(){return this._headerContainer}get filterInput(){return this._filterInput}focusCondition(e){return!e.disabled&&e.kind==="action"}focus(){if(this._filterInput&&this._options?.focusFilterOnOpen){this._filterInput.focus(),this._focusCheckedOrFirst();return}this._list.domFocus(),this._focusCheckedOrFirst()}clearFocus(){this._list.setFocus([])}getFocusedElement(){const e=this._list.getFocus();if(e.length>0)return this._list.element(e[0])}_focusCheckedOrFirst(){this._suppressHover=!0;try{for(let t=0;t<this._list.length;t++){const i=this._list.element(t);if(i.kind==="action"&&i.item?.checked){this._list.setFocus([t]),this._list.reveal(t);return}}this._list.focusFirst(void 0,this.focusCondition);const e=this._list.getFocus();e.length>0&&this._list.reveal(e[0])}finally{this._suppressHover=!1}}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._filterCts.value?.cancel(),this._filterCts.clear(),this._hideSubmenu()}clearFilter(){return this._filterInput&&this._filterText?(this._filterInput.value="",this._filterText="",this._applyOrUpdateFilter(),!0):!1}get hasDynamicHeight(){return this._options?.showFilter?!0:this._allMenuItems.some(e=>e.isSectionToggle)}get lineHeight(){return this._actionLineHeight}_getItemHeight(e){switch(e.kind){case"header":return this._headerLineHeight;case"separator":return e.label?this._actionLineHeight:this._separatorLineHeight;default:return e.detail?this._options?.detailItemHeight??48:this._actionLineHeight}}computeFullHeight(){let e=0;for(const t of this._allMenuItems)e+=this._getItemHeight(t);return e}computeListHeight(){const e=this._list.length;let t=0;for(let i=0;i<e;i++){const s=this._list.element(i);t+=this._getItemHeight(s)}return t}layout(e,t){this._hasLaidOut=!0,this._list.layout(e,t),this.domNode.style.height=`${e}px`,this._filterContainer&&this._filterContainer.parentElement&&this._filterContainer.parentElement.insertBefore(this._filterContainer,this.domNode)}computeMaxWidth(e){const t=this._list.length,i=Math.max(e,this._options?.minWidth??0),s=this._options?.maxWidth??Number.POSITIVE_INFINITY,o=Math.max(s,i),r=c=>Math.min(Math.max(c,i),o);let a=i;const l=this._allMenuItems.length;if(l>=50)return r(380);if(l>t){const c=[];for(let p=0;p<t;p++)c.push(this._list.element(p));const h=[...this._allMenuItems];this._list.splice(0,t,h);let u=0;for(const p of h)u+=this._getItemHeight(p);this._list.layout(u);const g=[];for(let p=0;p<h.length;p++){const f=this._getRowElement(p);if(f){f.style.width="auto";const _=f.getBoundingClientRect().width;f.style.width="",g.push(_+this._computeToolbarWidth(h[p]))}}return a=r(Math.max(...g)),this._list.splice(0,h.length,c),a}const d=[];for(let c=0;c<t;c++){const h=this._getRowElement(c);if(h){h.style.width="auto";const u=h.getBoundingClientRect().width;h.style.width="",d.push(u+this._computeToolbarWidth(this._list.element(c)))}}return r(Math.max(...d))}focusPrevious(){if(this._filterInput&&Qr(this._filterInput)){this._list.domFocus();const i=this._list.getFocus();if(i.length>0){this._list.focusPrevious(1,!1,void 0,this.focusCondition);const s=this._list.getFocus();s.length>0&&s[0]>=i[0]?this._filterInput.focus():s.length>0&&this._list.reveal(s[0])}else{this._list.focusLast(void 0,this.focusCondition);const s=this._list.getFocus();s.length>0&&this._list.reveal(s[0])}return}const e=this._list.getFocus();this._list.focusPrevious(1,!0,void 0,this.focusCondition);const t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]>e[0]){this._list.setFocus([]),this._filterInput.focus();return}this._list.reveal(t[0])}}focusNext(){if(this._filterInput&&Qr(this._filterInput)){if(this._list.domFocus(),this._list.getFocus().length>0){this._list.focusNext(1,!1,void 0,this.focusCondition);const i=this._list.getFocus();i.length>0&&this._list.reveal(i[0])}else{this._list.focusFirst(void 0,this.focusCondition);const i=this._list.getFocus();i.length>0&&this._list.reveal(i[0])}return}const e=this._list.getFocus();this._list.focusNext(1,!0,void 0,this.focusCondition);const t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]<e[0]){this._list.setFocus([]),this._filterInput.focus();return}this._list.reveal(t[0])}}collapseFocusedSection(){const e=this._getFocusedSection();e&&!this._collapsedSections.has(e)&&this._toggleSection(e)}expandFocusedSection(){const e=this._getFocusedSection();e&&this._collapsedSections.has(e)&&this._toggleSection(e)}toggleFocusedSection(){const e=this._list.getFocus();if(e.length===0)return!1;const t=this._list.element(e[0]);return t.isSectionToggle&&t.section?(this._toggleSection(t.section),!0):!1}_getFocusedSection(){const e=this._list.getFocus();if(e.length===0)return;const t=this._list.element(e[0]);return t.isSectionToggle&&t.section,t.section}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const i=t[0],s=this._list.element(i);if(!this.focusCondition(s))return;const o=e?new Av:new R1;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];if(t.isSectionToggle&&t.section){this._list.setSelection([]);const i=t.section;queueMicrotask(()=>{this._toggleSection(i)});return}if(lE(e.browserEvent)){const i=e.browserEvent.target;if(es(i)&&(i.closest(".action-list-item-toolbar")||i.closest(".action-list-submenu-indicator"))){this._list.setSelection([]);return}}if(t.item&&this.focusCondition(t)){const i=e.browserEvent instanceof Av;this._delegate.onSelect(t.item,i&&this._supportsPreview)}else this._list.setSelection([])}onFocus(){const e=this._list.getFocus();if(e.length===0)return;const t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item),this._suppressHover||this._showHoverForElement(i,t)}_removeItem(e){const t=this._allMenuItems.indexOf(e);t>=0&&(this._allMenuItems.splice(t,1),this._applyFilter())}_recomputeGroupTitles(e){this._groupTitleByIndex.clear();const t=new Set;for(let i=0;i<e.length;i++){const s=e[i];s.kind==="action"&&s.group?.title&&!t.has(s.group.title)&&(t.add(s.group.title),this._groupTitleByIndex.set(i,s.group.title))}}_computeToolbarWidth(e){let t=e.toolbarActions?.length??0;return e.onRemove&&t++,t===0?0:t*22+6}_getRowElement(e){return this.domNode.ownerDocument.getElementById(this._list.getElementID(e))}_showHoverForElement(e,t){if(this._currentSubmenuElement===e)return;const i=!!e.hover?.content,s=!!e.submenuActions?.length;if(i||s){const o=this._getRowElement(t);o&&this._showSubmenuForElement(e,o);return}this._hideSubmenu()}_showSubmenuForItem(e){const t=this._list.indexOf(e);if(t>=0){const i=this._getRowElement(t);i&&this._showSubmenuForElement(e,i)}}_showSubmenuForElement(e,t){if(this._currentSubmenuElement===e)return;this._submenuDisposables.clear(),this._currentSubmenuElement=e,this._clearSubmenuContainer();let i;const s=e.hover?.content;if(s){if(es(s))i=s,e.hover?.disposable&&this._register(e.hover.disposable);else{const b=typeof s=="string"?new Lt(s):s,w=this._options?.linkHandler,E=Kc(b,{actionHandler:P=>{const R=De.parse(P);w?w(R,e):this._openerService.open(R,{allowCommands:!0})}});this._submenuDisposables.add(E),i=E.element}i.classList.add("action-list-submenu-hover-header"),e.submenuActions?.length&&i.classList.add("has-submenu"),this._submenuContainer.appendChild(i)}const o=!!e.submenuActions?.length;this._submenuContainer.style.display="",this._submenuContainer.style.position="absolute",this._submenuContainer.removeAttribute("role");const r=t.getBoundingClientRect(),a=this.domNode.getBoundingClientRect(),l=Ht(this.domNode);let d=0,c=i?i.offsetWidth:0;if(o){const b=[],w=e.submenuActions.filter(R=>R instanceof ec).filter(R=>R.actions.length>0);for(let R=0;R<w.length;R++){const D=w[R];D.label&&b.push({kind:"header",group:{title:D.label},label:D.label});for(let F=0;F<D.actions.length;F++){const Y=D.actions[F],re=Y,Me=re.icon??pe.fromId(Y.checked?V.check.id:V.blank.id),_e=re.hoverContent;b.push({item:Y,kind:"action",label:Y.label,description:Y.tooltip||void 0,group:{title:"",icon:Me},hideIcon:!1,hover:_e?{content:_e}:{},onRemove:re.onRemove})}R<w.length-1&&b.push({kind:"separator",label:""})}for(const R of e.submenuActions)if(!(R instanceof ec)){const D=R;b.push({item:R,kind:"action",label:R.label,description:R.tooltip||void 0,group:{title:""},hideIcon:!1,hover:{},onRemove:D.onRemove})}const E=this._submenuDisposables.add(this._instantiationService.createInstance(lg,"submenu",!1,b,{onHide:()=>{},onSelect:R=>{R.run();const D=this._currentSubmenuElement?.item;this._hideSubmenu(),D&&this._delegate.onSelect(D),this.hide()}},void 0,void 0));this._submenuContainer.appendChild(E.domNode),this._currentSubmenuWidget=E,E.clearFocus(),d=E.computeListHeight(),E.layout(d);const P=E.computeMaxWidth(0);c=Math.max(c,P),E.layout(d,c),E.domNode.style.width=`${c}px`,this._submenuDisposables.add(de(E.domNode,"keydown",R=>{if(R.key==="ArrowLeft"||R.key==="Escape")Cn.stop(R,!0),this._hideSubmenu(),this._list.domFocus();else if(R.key==="Enter"){Cn.stop(R,!0);const D=E.getFocusedElement();if(D?.item){D.item.run();const F=this._currentSubmenuElement?.item;this._hideSubmenu(),F&&this._delegate.onSelect(F),this.hide()}}else R.key==="ArrowDown"?(Cn.stop(R,!0),E.focusNext()):R.key==="ArrowUp"&&(Cn.stop(R,!0),E.focusPrevious())}))}const h=l.innerWidth-r.right,u=a.left,g=c+10,p=4;h>=g||h>=u?this._submenuContainer.style.left=`${a.right-a.left+p}px`:this._submenuContainer.style.left=`${-g-p}px`;const f=i?i.offsetHeight:0,_=d+f,v=l.innerHeight,C=r.height;let x=r.top-a.top+(C-_)/2;const I=a.top+x+_;I>v&&(x-=I-v+8),a.top+x<0&&(x=-a.top),this._submenuContainer.style.top=`${x}px`}_hideSubmenu(){this._cancelSubmenuHide(),this._cancelSubmenuShow(),this._submenuDisposables.clear(),this._currentSubmenuWidget=void 0,this._currentSubmenuElement=void 0,this._clearSubmenuContainer(),this._submenuContainer.style.display="none"}_clearSubmenuContainer(){this._submenuContainer.contains(zc())&&this._list.domFocus(),di(this._submenuContainer)}_scheduleSubmenuHide(){this._cancelSubmenuHide(),this._submenuHideTimeout=setTimeout(()=>{this._hideSubmenu()},300)}_cancelSubmenuHide(){this._submenuHideTimeout!==void 0&&(clearTimeout(this._submenuHideTimeout),this._submenuHideTimeout=void 0)}_scheduleSubmenuShow(e,t){this._cancelSubmenuShow(),this._submenuShowTimeout=setTimeout(()=>{this._submenuShowTimeout=void 0;const i=typeof t=="number"?this._getRowElement(t):null;i&&this._showSubmenuForElement(e,i)},500)}_cancelSubmenuShow(){this._submenuShowTimeout!==void 0&&(clearTimeout(this._submenuShowTimeout),this._submenuShowTimeout=void 0)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(es(e.browserEvent.target)&&e.browserEvent.target.closest(".action-list-item-toolbar")!==null){t.submenuActions?.length||this._cancelSubmenuShow(),this._list.setFocus([]);return}const i=!!(t.submenuActions?.length||t.hover?.content);if(i&&(this._suppressHover=!0),this._list.setFocus(typeof e.index=="number"?[e.index]:[]),i&&(this._suppressHover=!1),i){this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow()):(this._hideSubmenu(),this._scheduleSubmenuShow(t,e.index));return}if(this._currentSubmenuElement===t?this._cancelSubmenuHide():(this._cancelSubmenuShow(),this._hideSubmenu()),this._delegate.onHover&&!t.disabled&&t.kind==="action"&&this._currentSubmenuElement!==t){const s=await this._delegate.onHover(t.item,this.cts.token),o=s?s.canPreview:void 0;o!==t.canPreview&&(t.canPreview=o,typeof e.index=="number"&&(this._list.splice(e.index,1,[t]),this._list.setFocus([e.index])))}}else t&&t.hover?.content&&typeof e.index=="number"&&(this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow()):(this._hideSubmenu(),this._scheduleSubmenuShow(t,e.index)))}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};cg=lg=qm([hs(6,Oe),hs(7,_o),hs(8,ie)],cg);var hg=class extends O{get domNode(){return this._widget.domNode}get filterContainer(){return this._widget.filterContainer}get footerContainer(){return this._widget.footerContainer}get headerContainer(){return this._widget.headerContainer}get filterInput(){return this._widget.filterInput}get anchorPosition(){if(this._showAbove!==void 0)return this._showAbove?1:0}constructor(e,t,i,s,o,r,a,l,d,c){super(),this._contextViewService=l,this._layoutService=d,this._lastMinWidth=0,this._hasLaidOut=!1,this._anchor=a,this._widget=this._register(c.createInstance(cg,e,t,i,s,o,r)),this._register(this._widget.onDidRequestLayout(()=>{this._hasLaidOut&&(this.layout(this._lastMinWidth),this._contextViewService.layout())}))}focus(){this._widget.focus()}hide(e){this._widget.hide(e),this._contextViewService.hideContextView()}clearFilter(){return this._widget.clearFilter()}focusPrevious(){this._widget.focusPrevious()}focusNext(){this._widget.focusNext()}collapseFocusedSection(){this._widget.collapseFocusedSection()}expandFocusedSection(){this._widget.expandFocusedSection()}toggleFocusedSection(){return this._widget.toggleFocusedSection()}acceptSelected(e){this._widget.acceptSelected(e)}hasDynamicHeight(){return this._widget.hasDynamicHeight}computeActionWidgetVerticalChromeHeight(){const e=this.domNode.parentElement?.closest(".action-widget");if(!e)return 0;const t=Ht(e).getComputedStyle(e),i=s=>Number.parseFloat(s)||0;return i(t.paddingTop)+i(t.paddingBottom)+i(t.borderTopWidth)+i(t.borderBottomWidth)}computeHeight(){const e=this._widget.computeListHeight(),t=this._widget.filterContainer?36:0,i=this._widget.footerContainer?32:0,s=this._widget.headerContainer?this._widget.headerContainer.offsetHeight||36:0,o=t+i+s,r=Ht(this.domNode);let a;if(this.hasDynamicHeight()){const h=r.innerHeight,u=OR(this._anchor),g=u.top-r.pageYOffset,p=h-g-u.height-30,f=g;if(this._showAbove===void 0){const _=o+this._widget.computeFullHeight();this._showAbove=_>p&&f>p}a=Math.max(0,(this._showAbove?f:p)-this.computeActionWidgetVerticalChromeHeight())}else{const u=this._layoutService.getContainer(r).clientHeight,g=this.domNode.getBoundingClientRect().top;a=g>0?u-g-10:u*.7}const l=Math.floor(r.innerHeight*.6),d=this._widget.lineHeight,c=Math.min(Math.max(a,d*3+o),l);return Math.min(e+o,c)-o}layout(e){this._hasLaidOut=!0,this._lastMinWidth=e;const t=this.computeHeight();this._widget.layout(t);const i=this._widget.computeMaxWidth(e);return this._cachedMaxWidth=i,this._widget.layout(t,this._cachedMaxWidth),this._cachedMaxWidth}};hg=qm([hs(7,ih),hs(8,Y0),hs(9,ie)],hg);function Xi(n){return n.replace(/\r\n|\r|\n/g," ")}var N1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},qh=function(n,e){return function(t,i){e(t,i,n)}};H("actionBar.toggledBackground",Sm,m(1713,"Background color for toggled action items in action bar."));var Wt={Visible:new oe("codeActionMenuVisible",!1,m(1714,"Whether the action widget list is visible")),FilterFocused:new oe("codeActionMenuFilterFocused",!1,m(1715,"Whether the action widget filter input is focused"))},Ni=dn("actionWidgetService"),Ui=class extends O{get isVisible(){return Wt.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new Je)}show(e,t,i,s,o,r,a,l,d){const c=Wt.Visible.bindTo(this._contextKeyService),h=this._instantiationService.createInstance(hg,e,t,i,s,l,d,o);this._contextViewService.showContextView({getAnchor:()=>o,render:u=>(c.set(!0),this._renderWidget(u,h,a??[])),onHide:u=>{c.reset(),this._onWidgetClosed(u)},get anchorPosition(){return h.anchorPosition}},r,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}collapseSection(){this._list?.value?.collapseFocusedSection()}expandSection(){this._list?.value?.expandFocusedSection()}toggleSection(){return this._list?.value?.toggleFocusedSection()??!1}clearFilter(){return this._list?.value?.clearFilter()??!1}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,i){const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,this._list.value)this._list.value.headerContainer&&s.appendChild(this._list.value.headerContainer),this._list.value.filterContainer&&s.appendChild(this._list.value.filterContainer),s.appendChild(this._list.value.domNode),this._list.value.footerContainer&&s.appendChild(this._list.value.footerContainer);else throw new Error("List has no value");const o=new A,r=this._list.value.headerContainer;r&&o.add(Wh(r,f=>f.preventDefault()));const a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),o.add(Wh(l,f=>f.stopPropagation()));const d=document.createElement("div"),c=e.appendChild(d);c.classList.add("context-view-pointerBlock"),o.add(de(c,Ae.POINTER_MOVE,()=>c.remove())),o.add(Wh(c,()=>c.remove()));let h=0;if(i.length){const f=this._createActionBar(".action-widget-action-bar",i);f&&(s.appendChild(f.getContainer().parentElement),o.add(f),h=f.getContainer().offsetWidth)}const u=this._list.value?.layout(h);s.style.width=`${u}px`,this._list.value?.focus();const g=Wt.FilterFocused.bindTo(this._contextKeyService);if(o.add({dispose:()=>g.reset()}),this._list.value?.filterInput){const f=this._list.value.filterInput;o.add(de(f,"focus",()=>g.set(!0))),o.add(de(f,"blur",()=>g.set(!1)))}const p=o.add(ls(e));return o.add(p.onDidBlur(()=>{const f=zc();f?.closest(".action-widget-hover")||f?.closest(".action-list-submenu-panel")||this.hide(!0)})),o}_createActionBar(e,t){if(!t.length)return;const i=W(e),s=new fs(i);return s.push(t,{icon:!1,label:!0}),s}_onWidgetClosed(e){this._list.value?.hide(e)}};Ui=N1([qh(0,ih),qh(1,ve),qh(2,ie)],Ui);Wn(Ni,Ui,1);var ks=1100;fe(class extends lt{constructor(){super({id:"hideCodeActionWidget",title:L(1716,"Hide action widget"),precondition:Wt.Visible,keybinding:{weight:ks,primary:9,secondary:[1033]}})}run(n){n.get(Ni).hide(!0)}});fe(class extends lt{constructor(){super({id:"clearFilterCodeActionWidget",title:L(1717,"Clear action widget filter"),precondition:N.and(Wt.Visible,Wt.FilterFocused),keybinding:{weight:1101,primary:9}})}run(n){const e=n.get(Ni);e instanceof Ui&&(e.clearFilter()||e.hide(!0))}});fe(class extends lt{constructor(){super({id:"selectPrevCodeAction",title:L(1718,"Select previous action"),precondition:Wt.Visible,keybinding:{weight:ks,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(n){const e=n.get(Ni);e instanceof Ui&&e.focusPrevious()}});fe(class extends lt{constructor(){super({id:"selectNextCodeAction",title:L(1719,"Select next action"),precondition:Wt.Visible,keybinding:{weight:ks,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(n){const e=n.get(Ni);e instanceof Ui&&e.focusNext()}});fe(class extends lt{constructor(){super({id:"collapseSectionCodeAction",title:L(1720,"Collapse section"),precondition:N.and(Wt.Visible,Wt.FilterFocused.negate()),keybinding:{weight:ks,primary:15}})}run(n){const e=n.get(Ni);e instanceof Ui&&e.collapseSection()}});fe(class extends lt{constructor(){super({id:"expandSectionCodeAction",title:L(1721,"Expand section"),precondition:N.and(Wt.Visible,Wt.FilterFocused.negate()),keybinding:{weight:ks,primary:17}})}run(n){const e=n.get(Ni);e instanceof Ui&&e.expandSection()}});fe(class extends lt{constructor(){super({id:"toggleSectionCodeAction",title:L(1722,"Toggle section"),precondition:N.and(Wt.Visible,Wt.FilterFocused.negate()),keybinding:{weight:ks,primary:10}})}run(n){const e=n.get(Ni);e instanceof Ui&&(e.toggleSection()||e.acceptSelected())}});fe(class extends lt{constructor(){super({id:sy,title:L(1723,"Accept selected action"),precondition:Wt.Visible,keybinding:{weight:ks,primary:3,secondary:[2137]}})}run(n){const e=n.get(Ni);e instanceof Ui&&e.acceptSelected()}});fe(class extends lt{constructor(){super({id:oy,title:L(1724,"Preview selected action"),precondition:Wt.Visible,keybinding:{weight:ks,primary:2051}})}run(n){const e=n.get(Ni);e instanceof Ui&&e.acceptSelected(!0)}});var ry=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Qo=function(n,e){return function(t,i){e(t,i,n)}},ug,gg=class extends O{static{ug=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,i,s,o,r,a,l,d,c,h){super(),this.typeId=e,this.editor=t,this.showCommand=s,this.range=o,this.edits=r,this.onSelectNewEdit=a,this.additionalActions=l,this._keybindingService=c,this._actionWidgetService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(d),this.visibleContext.set(!0),this._register(ke(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ke((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(u=>{this.dispose()})),this._register(qe.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){this.button.element.title=this._keybindingService.appendKeybinding(this.showCommand.label,this.showCommand.id)}create(){this.domNode=W(".post-edit-widget"),this.button=this._register(new NE(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(de(this.domNode,Ae.CLICK,()=>this.showSelector()))}getId(){return ug.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){const e=kt(this.button.element),t={x:e.left+e.width,y:e.top+e.height};this._actionWidgetService.show("postEditWidget",!1,this.edits.allEdits.map((i,s)=>({kind:"action",item:i,label:i.title,disabled:!1,canPreview:!1,group:{title:"",icon:pe.fromId(s===this.edits.activeEditIndex?V.check.id:V.blank.id)}})),{onHide:()=>{this.editor.focus()},onSelect:i=>{this._actionWidgetService.hide(!1);const s=this.edits.allEdits.findIndex(o=>o===i);if(s!==this.edits.activeEditIndex)return this.onSelectNewEdit(s)}},t,this.editor.getDomNode()??void 0,this.additionalActions)}};gg=ug=ry([Qo(8,ve),Qo(9,Oe),Qo(10,Ni)],gg);var oc=class extends O{constructor(e,t,i,s,o,r,a,l){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=s,this._getAdditionalActions=o,this._instantiationService=r,this._bulkEditService=a,this._notificationService=l,this._currentWidget=this._register(new Je),this._register(qe.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,s,o){if(!e.length||!this._editor.hasModel())return;const r=this._editor.getModel(),a=t.allEdits.at(t.activeEditIndex);if(!a)return;const l=async v=>{const C=this._editor.getModel();C&&(await C.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:v,allEdits:t.allEdits},i,s,o))},d=(v,C)=>{Hn(v)||(this._notificationService.error(C),i&&this.show(e[0],t,l))},c=new no(this._editor,3,void 0,o);let h;try{h=await GT(s(a,c.token),c.token)}catch(v){return d(v,m(976,`Error resolving edit '{0}':
|
|
4
4
|
{1}`,a.title,sc(v)))}finally{c.dispose()}if(o.isCancellationRequested)return;const u=iy(r.uri,e,h),g=e[0],p=r.deltaDecorations([],[{range:g,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let f,_;try{f=await this._bulkEditService.apply(u,{editor:this._editor,token:o}),_=r.getDecorationRange(p[0])}catch(v){return d(v,m(977,`Error applying edit '{0}':
|
|
5
5
|
{1}`,a.title,sc(v)))}finally{r.deltaDecorations(p,[])}o.isCancellationRequested||i&&f.isApplied&&t.allEdits.length>1&&this.show(_??g,t,l)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(gg,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i,this._getAdditionalActions()))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};oc=ry([Qo(5,ie),Qo(6,pl),Qo(7,Et)],oc);var k1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},hn=function(n,e){return function(t,i){e(t,i,n)}},fi,ay="editor.changePasteType",P1="editor.pasteAs.preferences",$m=new oe("pasteWidgetVisible",!1,m(956,"Whether the paste widget is showing")),$h="application/vnd.code.copymetadata",On=class extends O{static{fi=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(e){return e.getContribution(fi.ID)}constructor(e,t,i,s,o,r,a,l,d,c){super(),this._logService=i,this._bulkEditService=s,this._clipboardService=o,this._commandService=r,this._configService=a,this._languageFeaturesService=l,this._quickInputService=d,this._progressService=c,this._editor=e,this._register(e.onWillCopy(h=>this.handleCopy(h))),this._register(e.onWillCut(h=>this.handleCopy(h))),this._register(e.onWillPaste(h=>this.handlePaste(h))),this._pasteProgressManager=this._register(new ic("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(oc,"pasteIntoEditor",e,$m,{id:ay,label:m(957,"Show paste options...")},()=>fi._configureDefaultAction?[fi._configureDefaultAction]:[]))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}async pasteAs(e){this._logService.trace("CopyPasteController.pasteAs"),this._editor.focus();try{this._logService.trace("Before calling editor.action.clipboardPasteAction"),this._pasteAsActionContext={preferred:e},await this._commandService.executeCommand("editor.action.clipboardPasteAction")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(97).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(this._logService.trace("CopyPasteController#handleCopy"),!this._editor.hasTextFocus()||(this._clipboardService.clearInternalState?.(),!this.isPasteAsEnabled()))return;const t=this._editor.getModel(),i=this._editor._getViewModel(),s=this._editor.getSelections();if(!t||!i||!s?.length)return;const o={multicursorText:e.dataToCopy.multicursorText??null,pasteOnNewLine:e.dataToCopy.isFromEmptySelection,mode:null},r=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(h=>!!h.prepareDocumentPaste);if(!r.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:o});return}const a=new iw,l=r.flatMap(h=>h.copyMimeTypes??[]),d=Vm();this.setCopyMetadata(e.clipboardData,{id:d,providerCopyMimeTypes:l,defaultPastePayload:o});const c=r.map(h=>({providerMimeTypes:h.copyMimeTypes,operation:pt(u=>h.prepareDocumentPaste(t,e.dataToCopy.sourceRanges,a,u).catch(g=>{console.error(g)}))}));fi._currentCopyOperation?.operations.forEach(h=>h.operation.cancel()),fi._currentCopyOperation={handle:d,operations:c}}async handlePaste(e){if(this._logService.trace("CopyPasteController#handlePaste for id : ",e.metadata?.id),!this._editor.hasTextFocus())return;const t=e.toExternalVSDataTransfer();if(!t)return;t.delete($h),qt.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const i=this._editor.getModel(),s=this._editor.getSelections();if(!s?.length||!i||this._editor.getOption(104)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const o=this.fetchCopyMetadata(e);this._logService.trace("CopyPasteController#handlePaste with metadata : ",o?.id," and text.length : ",e.clipboardData.getData("text/plain").length);const r=Array.from(e.clipboardData.files).map(d=>d.type),a=[...e.clipboardData.types,...r,...o?.providerCopyMimeTypes??[],Tt.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(d=>{const c=this._pasteAsActionContext?.preferred;return c&&!this.providerMatchesPreference(d,c)?!1:d.pasteMimeTypes?.some(h=>dv(h,a))});if(!l.length){this._pasteAsActionContext?.preferred&&(this.showPasteAsNoEditMessage(s,this._pasteAsActionContext.preferred),e.setHandled());return}e.setHandled(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,l,s,t,o):this.doPasteInline(l,s,t,o,e.browserEvent)}showPasteAsNoEditMessage(e,t){const i="only"in t?t.only.value:"preferences"in t?t.preferences.length?t.preferences.map(s=>s.value).join(", "):m(958,"empty"):t.providerId;qt.get(this._editor)?.showMessage(m(959,"No paste edits for '{0}' found",i),e[0].getStartPosition())}doPasteInline(e,t,i,s,o){this._logService.trace("CopyPasteController#doPasteInline");const r=this._editor;if(!r.hasModel())return;const a=new no(r,3,void 0),l=pt(async d=>{const c=this._editor;if(!c.hasModel())return;const h=c.getModel(),u=new A,g=u.add(new st(d));u.add(a.token.onCancellationRequested(()=>g.cancel()));const p=g.token;try{if(await this.mergeInDataFromCopy(e,i,s,p),p.isCancellationRequested)return;const f=e.filter(C=>this.isSupportedPasteProvider(C,i));if(!f.length||f.length===1&&f[0]instanceof Va)return this.applyDefaultPasteHandler(i,s,p,o);const _={triggerKind:Ju.Automatic},v=await this.getPasteEdits(f,i,h,t,_,p);if(u.add(v),p.isCancellationRequested)return;if(v.edits.length===1&&v.edits[0].provider instanceof Va)return this.applyDefaultPasteHandler(i,s,p,o);if(v.edits.length){const C=c.getOption(97).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:this.getInitialActiveEditIndex(h,v.edits),allEdits:v.edits},C,async(x,I)=>{if(!x.provider.resolveDocumentPasteEdit)return x;const b=x.provider.resolveDocumentPasteEdit(x,I),w=new im,E=await this._pasteProgressManager.showWhile(t[0].getEndPosition(),m(960,"Resolving paste edit for '{0}'. Click to cancel",x.title),rr(Promise.race([w.p,b]),I),{cancel:()=>w.cancel()},0);return E&&(x.insertText=E.insertText,x.additionalEdit=E.additionalEdit),x},p)}await this.applyDefaultPasteHandler(i,s,p,o)}finally{u.dispose(),this._currentPasteOperation===l&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),m(961,"Running paste handlers. Click to cancel and do basic paste"),l,{cancel:async()=>{l.cancel(),!a.token.isCancellationRequested&&await this.applyDefaultPasteHandler(i,s,a.token,o)}}).finally(()=>{a.dispose()}),this._currentPasteOperation=l}showPasteAsPick(e,t,i,s,o){this._logService.trace("CopyPasteController#showPasteAsPick");const r=pt(async a=>{const l=this._editor;if(!l.hasModel())return;const d=l.getModel(),c=new A,h=c.add(new no(l,3,void 0,a));try{if(await this.mergeInDataFromCopy(t,s,o,h.token),h.token.isCancellationRequested)return;let u=t.filter(v=>this.isSupportedPasteProvider(v,s,e));e&&(u=u.filter(v=>this.providerMatchesPreference(v,e)));const g={triggerKind:Ju.PasteAs,only:e&&"only"in e?e.only:void 0};let p=c.add(await this.getPasteEdits(u,s,d,i,g,h.token));if(h.token.isCancellationRequested)return;if(e&&(p={edits:p.edits.filter(v=>"only"in e?e.only.contains(v.kind):"preferences"in e?e.preferences.some(C=>C.contains(v.kind)):e.providerId===v.provider.id),dispose:p.dispose}),!p.edits.length){e&&this.showPasteAsNoEditMessage(i,e);return}let f;if(e)f=p.edits.at(0);else{const v={id:"editor.pasteAs.default",label:m(962,"Configure default paste action"),edit:void 0},C=await this._quickInputService.pick([...p.edits.map(x=>({label:x.title,description:x.kind?.value,edit:x})),...fi._configureDefaultAction?[KT({type:"separator"}),{label:fi._configureDefaultAction.label,edit:void 0}]:[]],{placeHolder:m(963,"Select Paste Action")});if(C===v){fi._configureDefaultAction?.run();return}f=C?.edit}if(!f)return;const _=iy(d.uri,i,f);await this._bulkEditService.apply(_,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:m(964,"Running paste handlers")},()=>r)}setCopyMetadata(e,t){this._logService.trace("CopyPasteController#setCopyMetadata new id : ",t.id),e.setData($h,JSON.stringify(t))}fetchCopyMetadata(e){this._logService.trace("CopyPasteController#fetchCopyMetadata");const t=e.clipboardData.getData($h);if(t)try{return JSON.parse(t)}catch{return}if(e.metadata)return{defaultPastePayload:{mode:e.metadata.mode,multicursorText:e.metadata.multicursorText??null,pasteOnNewLine:!!e.metadata.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,i,s){if(this._logService.trace("CopyPasteController#mergeInDataFromCopy with metadata : ",i?.id),i?.id&&fi._currentCopyOperation?.handle===i.id){const o=fi._currentCopyOperation.operations.filter(a=>e.some(l=>l.pasteMimeTypes.some(d=>dv(d,a.providerMimeTypes)))).map(a=>a.operation),r=await Promise.all(o);if(s.isCancellationRequested)return;for(const a of r.reverse())if(a)for(const[l,d]of a)t.replace(l,d)}if(!t.has(Tt.uriList)){const o=await this._clipboardService.readResources();if(s.isCancellationRequested)return;o.length&&t.append(Tt.uriList,MT(Ow.create(o)))}}async getPasteEdits(e,t,i,s,o,r){const a=new A,l=await rr(Promise.all(e.map(async c=>{try{const h=await c.provideDocumentPasteEdits?.(i,s,t,o,r);return h&&a.add(h),h?.edits?.map(u=>({...u,provider:c}))}catch(h){Hn(h)||console.error(h);return}})),r),d=Ns(l??[]).flat().filter(c=>!o.only||o.only.contains(c.kind));return{edits:ny(d),dispose:()=>a.dispose()}}async applyDefaultPasteHandler(e,t,i,s){const o=await(e.get(Tt.text)??e.get("text"))?.asString()??"";if(i.isCancellationRequested)return;const r={clipboardEvent:s,text:o,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._logService.trace("CopyPasteController#applyDefaultPasteHandler for id : ",t?.id),this._editor.trigger("keyboard","paste",r)}isSupportedPasteProvider(e,t,i){return e.pasteMimeTypes?.some(s=>t.matches(s))?!i||this.providerMatchesPreference(e,i):!1}providerMatchesPreference(e,t){return"only"in t?e.providedPasteEditKinds.some(i=>t.only.contains(i)):"preferences"in t?e.providedPasteEditKinds.some(i=>t.preferences.some(s=>s.contains(i))):e.id===t.providerId}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(P1,{resource:e.uri});for(const s of Array.isArray(i)?i:[]){const o=new Ve(s),r=t.findIndex(a=>o.contains(a.kind));if(r>=0)return r}return 0}};On=fi=k1([hn(1,ie),hn(2,Pt),hn(3,pl),hn(4,ti),hn(5,ht),hn(6,xe),hn(7,Z),hn(8,Di),hn(9,IT)],On);var lo="9_cutcopypaste",O1=xr||document.queryCommandSupported("cut"),ly=xr||document.queryCommandSupported("copy"),M1=typeof navigator.clipboard>"u"||XS?document.queryCommandSupported("paste"):!0;function Km(n){return n.register(),n}var A1=O1?Km(new Om({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:xr?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:$.MenubarEditMenu,group:"2_ccp",title:m(849,"Cu&&t"),order:1},{menuId:$.EditorContext,group:lo,title:m(850,"Cut"),when:S.writable,order:1},{menuId:$.CommandPalette,group:"",title:m(851,"Cut"),order:1},{menuId:$.SimpleEditorContext,group:lo,title:m(852,"Cut"),when:S.writable,order:1}]})):void 0,F1=ly?Km(new Om({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:xr?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:$.MenubarEditMenu,group:"2_ccp",title:m(853,"&&Copy"),order:2},{menuId:$.EditorContext,group:lo,title:m(854,"Copy"),order:2},{menuId:$.CommandPalette,group:"",title:m(855,"Copy"),order:1},{menuId:$.SimpleEditorContext,group:lo,title:m(856,"Copy"),order:2}]})):void 0;Li.appendMenuItem($.MenubarEditMenu,{submenu:$.MenubarCopy,title:L(861,"Copy As"),group:"2_ccp",order:3});Li.appendMenuItem($.EditorContext,{submenu:$.EditorContextCopy,title:L(862,"Copy As"),group:lo,order:3});Li.appendMenuItem($.EditorContext,{submenu:$.EditorContextShare,title:L(863,"Share"),group:"11_share",order:-1,when:N.and(N.notEquals("resourceScheme","output"),S.editorTextFocus)});Li.appendMenuItem($.ExplorerContext,{submenu:$.ExplorerContextShare,title:L(864,"Share"),group:"11_share",order:-1});var Kh=M1?Km(new Om({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:xr?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:$.MenubarEditMenu,group:"2_ccp",title:m(857,"&&Paste"),order:4},{menuId:$.EditorContext,group:lo,title:m(858,"Paste"),when:S.writable,order:4},{menuId:$.CommandPalette,group:"",title:m(859,"Paste"),order:1},{menuId:$.SimpleEditorContext,group:lo,title:m(860,"Paste"),when:S.writable,order:4}]})):void 0,H1=class extends M{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:L(865,"Copy with Syntax Highlighting"),precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,weight:100}})}run(n,e){const t=n.get(Pt),i=n.get(ti);t.trace("ExecCommandCopyWithSyntaxHighlightingAction#run"),e.hasModel()&&(!e.getOption(45)&&e.getSelection().isEmpty()||(Xd.forceCopyWithSyntaxHighlighting=!0,e.focus(),t.trace("ExecCommandCopyWithSyntaxHighlightingAction (before execCommand copy)"),pg(e,i),t.trace("ExecCommandCopyWithSyntaxHighlightingAction (after execCommand copy)"),Xd.forceCopyWithSyntaxHighlighting=!1))}};function pg(n,e){if(Xd.electronBugWorkaroundCopyEventHasFired=!1,n.getContainerDomNode().ownerDocument.execCommand("copy"),xr&&Xd.electronBugWorkaroundCopyEventHasFired===!1){const{dataToCopy:t}=mR(n._getViewModel(),void 0,XS);e.writeText(t.text)}}function dy(n,e){n&&(n.addImplementation(1e4,"code-editor",(t,i)=>{const s=t.get(Pt),o=t.get(ti);s.trace("registerExecCommandImpl (addImplementation code-editor for : ",e,")");const r=t.get($e).getFocusedCodeEditor();if(r&&r.hasTextFocus()&&r.hasModel()){const a=r.getOption(45),l=r.getSelection();return l&&l.isEmpty()&&!a||(r.getOption(170)&&e==="cut"?(Fv(r),s.trace("registerExecCommandImpl (before execCommand copy)"),pg(r,o),r.trigger(void 0,"cut",void 0),s.trace("registerExecCommandImpl (after execCommand copy)")):(Fv(r),s.trace("registerExecCommandImpl (before execCommand "+e+")"),e==="copy"?pg(r,o):r.getContainerDomNode().ownerDocument.execCommand(e),s.trace("registerExecCommandImpl (after execCommand "+e+")"))),!0}return!1}),n.addImplementation(0,"generic-dom",(t,i)=>{const s=t.get(Pt);return s.trace("registerExecCommandImpl (addImplementation generic-dom for : ",e,")"),s.trace("registerExecCommandImpl (before execCommand "+e+")"),uE().execCommand(e),s.trace("registerExecCommandImpl (after execCommand "+e+")"),!0}))}function Fv(n){if(n.getOption(170)){const e=uw.get(n.getId());e&&e.handleWillCopy()}}dy(A1,"cut");dy(F1,"copy");Kh&&(Kh.addImplementation(1e4,"code-editor",(n,e)=>{const t=n.get(Pt);t.trace("registerExecCommandImpl (addImplementation code-editor for : paste)");const i=n.get($e),s=n.get(ti),o=i.getFocusedCodeEditor();if(o&&o.hasModel()&&o.hasTextFocus()){if(o.getOption(170)){const a=uw.get(o.getId());a&&a.handleWillPaste()}t.trace("registerExecCommandImpl (before triggerPaste)");const r=s.triggerPaste(tc().vscodeWindowId);return r?(t.trace("registerExecCommandImpl (triggerPaste defined)"),r.then(async()=>(t.trace("registerExecCommandImpl (after triggerPaste)"),On.get(o)?.finishedPaste()??Promise.resolve()))):(t.trace("registerExecCommandImpl (triggerPaste undefined)"),OT?(t.trace("registerExecCommandImpl (Paste handling on web)"),(async()=>{const a=await s.readText();if(a!==""){const l=CR.INSTANCE.get(a);let d=!1,c=null,h=null;l&&(d=o.getOption(45)&&!!l.isFromEmptySelection,c=typeof l.multicursorText<"u"?l.multicursorText:null,h=l.mode),t.trace("registerExecCommandImpl (clipboardText.length : ",a.length," id : ",l?.id,")"),o.trigger("keyboard","paste",{text:a,pasteOnNewLine:d,multicursorText:c,mode:h})}})()):!0)}return!1}),Kh.addImplementation(0,"generic-dom",(n,e)=>(n.get(Pt).trace("registerExecCommandImpl (addImplementation generic-dom for : paste)"),n.get(ti).triggerPaste(tc().vscodeWindowId)??!1)));ly&&k(H1);var Te=new class{constructor(){this.QuickFix=new Ve("quickfix"),this.Refactor=new Ve("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new Ve("notebook"),this.Source=new Ve("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}},$t;(function(n){n.Refactor="refactor",n.RefactorPreview="refactor preview",n.Lightbulb="lightbulb",n.Default="other (default)",n.SourceAction="source action",n.QuickFix="quick fix action",n.FixAll="fix all",n.OrganizeImports="organize imports",n.AutoFix="auto fix",n.QuickFixHover="quick fix hover window",n.OnSave="save participants",n.ProblemsView="problems view"})($t||($t={}));function W1(n,e){return!(n.include&&!n.include.intersects(e)||n.excludes&&n.excludes.some(t=>cy(e,t,n.include))||!n.includeSourceActions&&Te.Source.contains(e))}function V1(n,e){const t=e.kind?new Ve(e.kind):void 0;return!(n.include&&(!t||!n.include.contains(t))||n.excludes&&t&&n.excludes.some(i=>cy(t,i,n.include))||!n.includeSourceActions&&t&&Te.Source.contains(t)||n.onlyIncludePreferredActions&&!e.isPreferred)}function cy(n,e,t){return!(!e.contains(n)||t&&e.contains(t))}var hh=class Ho{static fromUser(e,t){return!e||typeof e!="object"?new Ho(t.kind,t.apply,!1):new Ho(Ho.getKindFromUser(e,t.kind),Ho.getApplyFromUser(e,t.apply),Ho.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 Ve(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}},B1=class{constructor(n,e,t){this.action=n,this.provider=e,this.highlightRange=t}async resolve(n){if(this.provider?.resolveCodeAction&&!this.action.edit){let e;try{e=await this.provider.resolveCodeAction(this.action,n)}catch(t){tt(t)}e&&(this.action.edit=e.edit)}return this}},hy="editor.action.codeAction",uy="editor.action.quickFix",U1="editor.action.autoFix",gy="editor.action.refactor",py="editor.action.sourceAction",fy="editor.action.organizeImports",my="editor.action.fixAll",z1=1e3,j1=class Cd extends O{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:Qt(e.diagnostics)?Qt(t.diagnostics)?Cd.codeActionsPreferredComparator(e,t):-1:Qt(t.diagnostics)?1:Cd.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(Cd.codeActionsComparator),this.validActions=this.allActions.filter(({action:s})=>!s.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Te.QuickFix.contains(new Ve(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}},Hv={actions:[],documentation:void 0};async function Ko(n,e,t,i,s,o){const r=i.filter||{},a={...r,excludes:[...r.excludes||[],Te.Notebook]},l={only:r.include?.value,trigger:i.type},d=new pR(e,o),c=q1(n,e,i.type===2?a:r),h=new A,u=c.map(async p=>{const f=setTimeout(()=>s.report(p),1250);try{const _=await p.provideCodeActions(e,t,l,d.token);if(d.token.isCancellationRequested)return _?.dispose(),Hv;_&&h.add(_);const v=(_?.actions||[]).filter(x=>x&&V1(r,x)),C=K1(p,v,r.include);return{actions:v.map(x=>new B1(x,p)),documentation:C}}catch(_){if(Hn(_))throw _;return tt(_),Hv}finally{clearTimeout(f)}}),g=n.onDidChange(()=>{const p=n.all(e);Bi(p,c)||d.cancel()});try{const p=await Promise.all(u),f=p.map(C=>C.actions).flat(),_=[...Ns(p.map(C=>C.documentation)),...$1(n,e,i,f)],v=new j1(f,_,h);return h.add(v),v}catch(p){throw h.dispose(),p}finally{g.dispose(),d.dispose()}}function q1(n,e,t){return n.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(s=>W1(t,new Ve(s))):!0)}function*$1(n,e,t,i){if(e&&i.length)for(const s of n.all(e))s._getAdditionalMenuItems&&(yield*s._getAdditionalMenuItems?.({trigger:t.type,only:t.filter?.include?.value},i.map(o=>o.action)))}function K1(n,e,t){if(!n.documentation)return;const i=n.documentation.map(s=>({kind:new Ve(s.kind),command:s.command}));if(t){let s;for(const o of i)o.kind.contains(t)&&(s?s.kind.contains(o.kind)&&(s=o):s=o);if(s)return s?.command}for(const s of e)if(s.kind){for(const o of i)if(o.kind.contains(new Ve(s.kind)))return o.command}}var ns;(function(n){n.OnSave="onSave",n.FromProblemsView="fromProblemsView",n.FromCodeActions="fromCodeActions",n.FromAILightbulb="fromAILightbulb",n.FromProblemsHover="fromProblemsHover"})(ns||(ns={}));async function G1(n,e,t,i,s=ue.None){const o=n.get(pl),r=n.get(ht),a=n.get(Ds),l=n.get(Et),d=n.get(Em);if(a.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),d.playSignal(Fa.codeActionTriggered),await e.resolve(s),!s.isCancellationRequested&&!(e.action.edit?.edits.length&&!(await o.apply(e.action.edit,{editor:i?.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==ns.OnSave,showPreview:i?.preview,reason:io.codeAction({kind:e.action.kind,providerId:wS.fromExtensionId(e.provider?.extensionId)})})).isApplied)){if(e.action.command)try{await r.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const h=Z1(c);l.error(typeof h=="string"?h:m(866,"An unknown error occurred while applying the code action"))}setTimeout(()=>d.playSignal(Fa.codeActionApplied),z1)}}function Z1(n){return typeof n=="string"?n:n instanceof Error&&typeof n.message=="string"?n.message:void 0}Re.registerCommand("_executeCodeActionProvider",async function(n,e,t,i,s){if(!(e instanceof De))throw Ln();const{codeActionProvider:o}=n.get(Z),r=n.get(Kt).getModel(e);if(!r)throw Ln();const a=te.isISelection(t)?te.liftSelection(t):y.isIRange(t)?r.validateRange(t):void 0;if(!a)throw Ln();const l=typeof i=="string"?new Ve(i):void 0,d=await Ko(o,r,a,{type:1,triggerAction:$t.Default,filter:{includeSourceActions:!0,include:l}},xn.None,ue.None),c=[],h=Math.min(d.validActions.length,typeof s=="number"?s:0);for(let u=0;u<h;u++)c.push(d.validActions[u].resolve(ue.None));try{return await Promise.all(c),d.validActions.map(u=>u.action)}finally{setTimeout(()=>d.dispose(),100)}});var X1=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Y1=function(n,e){return function(t,i){e(t,i,n)}},fg,mg=class{static{fg=this}static{this.codeActionCommands=[gy,hy,py,fy,my]}constructor(e){this.keybindingService=e}getResolver(){const e=new Rm(()=>this.keybindingService.getKeybindings().filter(t=>fg.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command==="editor.action.organizeImports"?i={kind:Te.SourceOrganizeImports.value}:t.command==="editor.action.fixAll"&&(i={kind:Te.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...hh.fromUser(i,{kind:Ve.None,apply:"never"})}}));return t=>{if(t.kind)return this.bestKeybindingForCodeAction(t,e.value)?.resolvedKeybinding}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Ve(e.kind);return t.filter(s=>s.kind.contains(i)).filter(s=>s.preferred?e.isPreferred:!0).reduceRight((s,o)=>s?s.kind.contains(o.kind)?o:s:o,void 0)}};mg=fg=X1([Y1(0,Oe)],mg);H("symbolIcon.arrayForeground",dt,m(1547,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.booleanForeground",dt,m(1548,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m(1549,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.colorForeground",dt,m(1550,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.constantForeground",dt,m(1551,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m(1552,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m(1553,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m(1554,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m(1555,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m(1556,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.fileForeground",dt,m(1557,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.folderForeground",dt,m(1558,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m(1559,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m(1560,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.keyForeground",dt,m(1561,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.keywordForeground",dt,m(1562,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m(1563,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.moduleForeground",dt,m(1564,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.namespaceForeground",dt,m(1565,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.nullForeground",dt,m(1566,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.numberForeground",dt,m(1567,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.objectForeground",dt,m(1568,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.operatorForeground",dt,m(1569,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.packageForeground",dt,m(1570,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.propertyForeground",dt,m(1571,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.referenceForeground",dt,m(1572,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.snippetForeground",dt,m(1573,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.stringForeground",dt,m(1574,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.structForeground",dt,m(1575,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.textForeground",dt,m(1576,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.typeParameterForeground",dt,m(1577,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.unitForeground",dt,m(1578,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));H("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m(1579,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));var _y=Object.freeze({kind:Ve.Empty,title:m(902,"More Actions...")}),J1=Object.freeze([{kind:Te.QuickFix,title:m(903,"Quick Fix")},{kind:Te.RefactorExtract,title:m(904,"Extract"),icon:V.wrench},{kind:Te.RefactorInline,title:m(905,"Inline"),icon:V.wrench},{kind:Te.RefactorRewrite,title:m(906,"Rewrite"),icon:V.wrench},{kind:Te.RefactorMove,title:m(907,"Move"),icon:V.wrench},{kind:Te.SurroundWith,title:m(908,"Surround With"),icon:V.surroundWith},{kind:Te.Source,title:m(909,"Source Action"),icon:V.symbolFile},_y]);function Q1(n,e,t){if(!e)return n.map(o=>({kind:"action",item:o,group:_y,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title,canPreview:!!o.action.edit?.edits.length}));const i=J1.map(o=>({group:o,actions:[]}));for(const o of n){const r=o.action.kind?new Ve(o.action.kind):Ve.None;for(const a of i)if(a.group.kind.contains(r)){a.actions.push(o);break}}const s=[];for(const o of i)if(o.actions.length){s.push({kind:"header",group:o.group});for(const r of o.actions){const a=o.group;s.push({kind:"action",item:r,group:r.action.isAI?{title:a.title,kind:a.kind,icon:V.sparkle}:a,label:r.action.title,disabled:!!r.action.disabled,keybinding:t(r.action)})}}return s}var vy=new oe("supportedCodeAction","");var eN=class extends O{constructor(n,e,t,i=250){super(),this._editor=n,this._markerService=e,this._signalChange=t,this._delay=i,this._autoTriggerTimer=this._register(new ll),this.ignoreLightbulbOff=!1,this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(n){const e=this._getRangeOfSelectionUnlessWhitespaceEnclosed(n);this._signalChange(e?{trigger:n,selection:e}:void 0)}_onMarkerChanges(n){const e=this._editor.getModel();e&&n.some(t=>ps(t,e.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:$t.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(n){if(!this._editor.hasModel())return;const e=this._editor.getSelection();if(n.type===1)return e;const t=this._editor.getOption(73).enabled;if(!(t===ea.Off&&!this.ignoreLightbulbOff)){{if(t===ea.Off||t===ea.On)return e;if(t===ea.OnCode){if(!e.isEmpty())return e;const i=this._editor.getModel(),{lineNumber:s,column:o}=e.getPosition(),r=i.getLineContent(s);if(r.length===0)return;if(o===1){if(/\s/.test(r[0]))return}else if(o===i.getLineMaxColumn(s)){if(/\s/.test(r[r.length-1]))return}else if(/\s/.test(r[o-2])&&/\s/.test(r[o-1]))return}}return e}}},Xs;(function(n){n.Empty={type:0};class e{constructor(i,s,o){this.trigger=i,this.position=s,this._cancellablePromise=o,this.type=1,this.actions=o.catch(r=>{if(Hn(r))return _g;throw r})}cancel(){this._cancellablePromise.cancel()}}n.Triggered=e})(Xs||(Xs={}));var _g=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1}),tN=class extends O{constructor(n,e,t,i,s,o){super(),this._editor=n,this._registry=e,this._markerService=t,this._progressService=s,this._configurationService=o,this._codeActionOracle=this._register(new Je),this._state=Xs.Empty,this._onDidChangeState=this._register(new Q),this.onDidChangeState=this._onDidChangeState.event,this.codeActionsDisposable=this._register(new Je),this._disposed=!1,this._ignoreLightbulbOff=!1,this._supportedCodeActions=vy.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(73)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Xs.Empty,!0))}_settingEnabledNearbyQuickfixes(){const n=this._editor?.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:n?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Xs.Empty);const n=this._editor.getModel();if(n&&this._registry.has(n)&&!this._editor.getOption(104)){const e=this._registry.all(n).flatMap(i=>i.providedCodeActionKinds??[]);this._supportedCodeActions.set(e.join(" "));const t=new eN(this._editor,this._markerService,i=>{if(!i){this.setState(Xs.Empty);return}const s=i.selection.getStartPosition(),o=pt(async l=>{if(this._settingEnabledNearbyQuickfixes()&&i.trigger.type===1&&(i.trigger.triggerAction===$t.QuickFix||i.trigger.filter?.include?.contains(Te.QuickFix))){const c=await Ko(this._registry,n,i.selection,i.trigger,xn.None,l);this.codeActionsDisposable.value=c;const h=[...c.allActions];if(l.isCancellationRequested)return c.dispose(),_g;const u=c.validActions?.some(p=>p.action.kind&&Te.QuickFix.contains(new Ve(p.action.kind))&&!p.action.isAI),g=this._markerService.read({resource:n.uri});if(u){for(const p of c.validActions)p.action.command?.arguments?.some(f=>typeof f=="string"&&f.includes("_typescript.applyFixAllCodeAction"))&&(p.action.diagnostics=[...g.filter(f=>f.relatedInformation)]);return{validActions:c.validActions,allActions:h,documentation:c.documentation,hasAutoFix:c.hasAutoFix,hasAIFix:c.hasAIFix,allAIFixes:c.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=c}}}else if(!u&&g.length>0){const p=i.selection.getPosition();let f=p,_=Number.MAX_VALUE;const v=[...c.validActions];for(const x of g){const I=x.endColumn,b=x.endLineNumber,w=x.startLineNumber;if(b===p.lineNumber||w===p.lineNumber){f=new B(b,I);const E={type:i.trigger.type,triggerAction:i.trigger.triggerAction,filter:{include:i.trigger.filter?.include?i.trigger.filter?.include:Te.QuickFix},autoApply:i.trigger.autoApply,context:{notAvailableMessage:i.trigger.context?.notAvailableMessage||"",position:f}},P=new te(f.lineNumber,f.column,f.lineNumber,f.column),R=await Ko(this._registry,n,P,E,xn.None,l);if(l.isCancellationRequested)return R.dispose(),_g;if(R.validActions.length!==0){for(const D of R.validActions)D.action.command?.arguments?.some(F=>typeof F=="string"&&F.includes("_typescript.applyFixAllCodeAction"))&&(D.action.diagnostics=[...g.filter(F=>F.relatedInformation)]);c.allActions.length===0&&h.push(...R.allActions),Math.abs(p.column-I)<_?v.unshift(...R.validActions):v.push(...R.validActions)}_=Math.abs(p.column-I)}}const C=v.filter((x,I,b)=>b.findIndex(w=>w.action.title===x.action.title)===I);return C.sort((x,I)=>x.action.isPreferred&&!I.action.isPreferred?-1:!x.action.isPreferred&&I.action.isPreferred||x.action.isAI&&!I.action.isAI?1:!x.action.isAI&&I.action.isAI?-1:0),{validActions:C,allActions:h,documentation:c.documentation,hasAutoFix:c.hasAutoFix,hasAIFix:c.hasAIFix,allAIFixes:c.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=c}}}}if(i.trigger.type===1){const c=await Ko(this._registry,n,i.selection,i.trigger,xn.None,l);return this.codeActionsDisposable.value=c,c}const d=await Ko(this._registry,n,i.selection,i.trigger,xn.None,l);return this.codeActionsDisposable.value=d,d});i.trigger.type===1&&this._progressService?.showWhile(o,250);const r=new Xs.Triggered(i.trigger,s,o);let a=!1;this._state.type===1&&(a=this._state.trigger.type===1&&r.type===1&&r.trigger.type===2&&this._state.position!==r.position),a?setTimeout(()=>{this.setState(r)},500):this.setState(r)},void 0);t.ignoreLightbulbOff=this._ignoreLightbulbOff,this._codeActionOracle.value=t,this._codeActionOracle.value.trigger({type:2,triggerAction:$t.Default})}else this._supportedCodeActions.reset()}trigger(n){this._codeActionOracle.value?.trigger(n),this.codeActionsDisposable.dispose()}setState(n,e){n!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=n,!e&&!this._disposed&&this._onDidChangeState.fire(n))}},iN=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},nN=function(n,e){return function(t,i){e(t,i,n)}},qn,by=Ze("gutter-lightbulb",V.lightBulb,m(910,"Icon which spawns code actions menu from the gutter when there is no space in the editor.")),Cy=Ze("gutter-lightbulb-auto-fix",V.lightbulbAutofix,m(911,"Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),Sy=Ze("gutter-lightbulb-sparkle",V.lightbulbSparkle,m(912,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),wy=Ze("gutter-lightbulb-aifix-auto-fix",V.lightbulbSparkleAutofix,m(913,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),yy=Ze("gutter-lightbulb-sparkle-filled",V.sparkleFilled,m(914,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),Oi;(function(n){n.Hidden={type:0};class e{constructor(i,s,o,r){this.actions=i,this.trigger=s,this.editorPosition=o,this.widgetPosition=r,this.type=1}}n.Showing=e})(Oi||(Oi={}));function xy(n,e,t,i,s=!1){if(n.validActions.length<=0)return;let o,r=!1;n.allAIFixes?(o=s?yy:V.sparkleFilled,n.validActions.length===1&&(r=!0)):n.hasAutoFix?n.hasAIFix?o=s?wy:V.lightbulbSparkleAutofix:o=s?Cy:V.lightbulbAutofix:n.hasAIFix?o=s?Sy:V.lightbulbSparkle:o=s?by:V.lightBulb;let a;return r?a=m(915,"Run: {0}",n.validActions[0].action.title):n.hasAutoFix&&t?a=m(916,"Show Code Actions. Preferred Quick Fix Available ({0})",t):!n.hasAutoFix&&i?a=m(917,"Show Code Actions ({0})",i):a=m(918,"Show Code Actions"),{actions:n,trigger:e,icon:o,autoRun:r,title:a,isGutter:s}}var Ua=class extends O{static{qn=this}static{this.GUTTER_DECORATION=se.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:pe.asClassName(V.lightBulb),glyphMargin:{position:Zu.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}static _computeLightBulbInfo(e,t,i,s){if(e.type===1)return xy(e.actions,e.trigger,i,s,t)}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this.onlyWithEmptySelection=!1,this._onClick=this._register(new Q),this.onClick=this._onClick.event,this._state=Ne(this,Oi.Hidden),this._gutterState=Ne(this,Oi.Hidden),this._combinedInfo=T(this,i=>{const s=this._gutterState.read(i);if(s.type===1)return qn._computeLightBulbInfo(s,!0,this._preferredKbLabel.read(i),this._quickFixKbLabel.read(i));const o=this._state.read(i);if(o.type===1)return qn._computeLightBulbInfo(o,!1,this._preferredKbLabel.read(i),this._quickFixKbLabel.read(i))}),this._iconClasses=[],this.lightbulbClasses=["codicon-"+by.id,"codicon-"+wy.id,"codicon-"+Cy.id,"codicon-"+Sy.id,"codicon-"+yy.id],this._preferredKbLabel=Ne(this,void 0),this._quickFixKbLabel=Ne(this,void 0),this.gutterDecoration=qn.GUTTER_DECORATION,this._domNode=W("div.lightBulbWidget"),this._domNode.role="listbox",this._register(cw.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const s=this._editor.getModel(),o=this._state.get();(o.type!==1||!s||o.editorPosition.lineNumber>=s.getLineCount())&&this.hide();const r=this._gutterState.get();(r.type!==1||!s||r.editorPosition.lineNumber>=s.getLineCount())&&this.gutterHide()})),this._register(CT(this._domNode,i=>{const s=this._state.get();if(s.type!==1)return;this._editor.focus(),i.preventDefault();const{top:o,height:r}=kt(this._domNode),a=this._editor.getOption(75);let l=Math.floor(a/3);s.widgetPosition.position!==null&&s.widgetPosition.position.lineNumber<s.editorPosition.lineNumber&&(l+=a),this._onClick.fire({x:i.posx,y:o+r+l,actions:s.actions,trigger:s.trigger})})),this._register(de(this._domNode,"mouseenter",i=>{(i.buttons&1)===1&&this.hide()})),this._register(qe.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel.set(this._keybindingService.lookupKeybinding("editor.action.autoFix")?.getLabel()??void 0,void 0),this._quickFixKbLabel.set(this._keybindingService.lookupKeybinding("editor.action.quickFix")?.getLabel()??void 0,void 0)})),this._register(he(i=>{const s=this._combinedInfo.read(i);this._updateLightBulbTitleAndIcon(s),this._updateGutterDecorationOptions(s)})),this._register(this._editor.onMouseDown(async i=>{if(!i.target.element||!this.lightbulbClasses.some(d=>i.target.element&&i.target.element.classList.contains(d)))return;const s=this._gutterState.get();if(s.type!==1)return;this._editor.focus();const{top:o,height:r}=kt(i.target.element),a=this._editor.getOption(75);let l=Math.floor(a/3);s.widgetPosition.position!==null&&s.widgetPosition.position.lineNumber<s.editorPosition.lineNumber&&(l+=a),this._onClick.fire({x:i.event.posx,y:o+r+l,actions:s.actions,trigger:s.trigger})}))}dispose(){super.dispose(),this._editor.removeContentWidget(this),this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){const e=this._state.get();return e.type===1?e.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.gutterHide(),this.hide();if(this.onlyWithEmptySelection&&!this._editor.getSelection()?.isEmpty())return this.gutterHide(),this.hide();if(!this._editor.hasTextFocus())return this.gutterHide(),this.hide();if(this._editor.getOptions().get(73).enabled===ea.Off)return this.gutterHide(),this.hide();const s=this._editor.getModel();if(!s)return this.gutterHide(),this.hide();const{lineNumber:o,column:r}=s.validatePosition(i),a=s.getOptions().tabSize,l=this._editor.getOptions().get(59),d=s.getLineContent(o),c=ym(d,a),h=l.spaceWidth*c>22,u=x=>x>2&&this._editor.getTopForLineNumber(x)===this._editor.getTopForLineNumber(x-1),g=this._editor.getLineDecorations(o);let p=!1;if(g)for(const x of g){const I=x.options.glyphMarginClassName;if(I&&!this.lightbulbClasses.some(b=>I.includes(b))){p=!0;break}}let f=o,_=1;if(!h){const x=I=>{const b=s.getLineContent(I);return/^\s*$|^\s+/.test(b)||b.length<=_};if(o>1&&!u(o-1)){const I=o===s.getLineCount(),b=o>1&&x(o-1),w=!I&&x(o+1),E=x(o),P=!w&&!b;if(!w&&!b&&!p)return this._gutterState.set(new Oi.Showing(e,t,i,{position:{lineNumber:f,column:_},preference:qn._posPref}),void 0),this.renderGutterLightbub(),this.hide();b||I||b&&!E?f-=1:(w||P&&E)&&(f+=1)}else if(o===1&&(o===s.getLineCount()||!x(o+1)&&!x(o)))if(this._gutterState.set(new Oi.Showing(e,t,i,{position:{lineNumber:f,column:_},preference:qn._posPref}),void 0),p)this.gutterHide();else return this.renderGutterLightbub(),this.hide();else if(o<s.getLineCount()&&!u(o+1))f+=1;else if(r*l.spaceWidth<22)return this.hide();_=/^\S\s*$/.test(s.getLineContent(f))?2:1}this._state.set(new Oi.Showing(e,t,i,{position:{lineNumber:f,column:_},preference:qn._posPref}),void 0),this._gutterDecorationID&&(this._removeGutterDecoration(this._gutterDecorationID),this.gutterHide());const v=e.validActions,C=e.validActions[0].action.kind;if(v.length!==1||!C){this._editor.layoutContentWidget(this);return}this._editor.layoutContentWidget(this)}hide(){this._state.get()!==Oi.Hidden&&(this._state.set(Oi.Hidden,void 0),this._editor.layoutContentWidget(this))}gutterHide(){this._gutterState.get()!==Oi.Hidden&&(this._gutterDecorationID&&this._removeGutterDecoration(this._gutterDecorationID),this._gutterState.set(Oi.Hidden,void 0))}_updateLightBulbTitleAndIcon(e){this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],!(!e||e.isGutter)&&(this._domNode.title=e.title,this._iconClasses=pe.asClassNameArray(e.icon),this._domNode.classList.add(...this._iconClasses))}_updateGutterDecorationOptions(e){!e||!e.isGutter||(this.gutterDecoration=se.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:pe.asClassName(e.icon),glyphMargin:{position:Zu.Left},stickiness:1}))}renderGutterLightbub(){const e=this._editor.getSelection();e&&(this._gutterDecorationID===void 0?this._addGutterDecoration(e.startLineNumber):this._updateGutterDecoration(this._gutterDecorationID,e.startLineNumber))}_addGutterDecoration(e){this._editor.changeDecorations(t=>{this._gutterDecorationID=t.addDecoration(new y(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(t=>{t.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,t){this._editor.changeDecorations(i=>{i.changeDecoration(e,new y(t,0,t,0)),i.changeDecorationOptions(e,this.gutterDecoration)})}};Ua=qn=iN([nN(1,Oe)],Ua);var sN=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ki=function(n,e){return function(t,i){e(t,i,n)}},Wo,oN="quickfix-edit-highlight",co=class extends O{static{Wo=this}static{this.ID="editor.contrib.codeActionController"}static get(e){return e.getContribution(Wo.ID)}constructor(e,t,i,s,o,r,a,l,d,c,h,u){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=d,this._instantiationService=c,this._progressService=h,this._keybindingService=u,this._activeCodeActions=this._register(new Je),this._showDisabled=!1,this._disposed=!1,this._onlyLightBulbWithEmptySelection=!1,this._lightBulbInfoObs=Ne(this,void 0),this._preferredKbLabel=Ne(this,void 0),this._quickFixKbLabel=Ne(this,void 0),this._editor=e,this._model=this._register(new tN(this._editor,o.codeActionProvider,t,i,r,l)),this._register(this._model.onDidChangeState(g=>this.update(g))),this._register(qe.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{this._preferredKbLabel.set(this._keybindingService.lookupKeybinding("editor.action.autoFix")?.getLabel()??void 0,void 0),this._quickFixKbLabel.set(this._keybindingService.lookupKeybinding("editor.action.quickFix")?.getLabel()??void 0,void 0)})),this._lightBulbWidget=new Rm(()=>{const g=this._editor.getContribution(Ua.ID);return g&&(this._register(g.onClick(p=>this.showCodeActionsFromLightbulb(p.actions,p))),g.onlyWithEmptySelection=this._onlyLightBulbWithEmptySelection),g}),this._resolver=s.createInstance(mg),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&e.validActions.length===1){const i=e.validActions[0],s=i.action.command;s&&s.id==="inlineChat.start"&&s.arguments&&s.arguments.length>=1&&s.arguments[0]&&(s.arguments[0]={...s.arguments[0],autoSend:!1}),await this.applyCodeAction(i,!1,!1,ns.FromAILightbulb);return}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,s){if(!this._editor.hasModel())return;qt.get(this._editor)?.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:s,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}async applyCodeAction(e,t,i,s){const o=this._progressService.show(!0,500);try{await this._instantiationService.invokeFunction(G1,e,s,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:$t.QuickFix,filter:{}}),o.done()}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(e.type!==1){this.hideLightBulbWidget(),this._lightBulbInfoObs.set(void 0,void 0);return}let t;try{t=await e.actions}catch(i){we(i);return}if(!this._disposed&&this._editor.getSelection()?.startLineNumber===e.position.lineNumber)if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),this._lightBulbInfoObs.set(xy(t,e.trigger,this._preferredKbLabel.get(),this._quickFixKbLabel.get()),void 0),e.trigger.type===1){if(e.trigger.filter?.include){const s=this.tryGetValidActionToApply(e.trigger,t);if(s){try{this.hideLightBulbWidget(),await this.applyCodeAction(s,!1,!1,ns.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){const o=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(o&&o.action.disabled){qt.get(this._editor)?.showMessage(o.action.disabled,e.trigger.context.position),t.dispose();return}}}const i=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!i&&!t.validActions.length)){qt.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,t.dispose();return}this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:i,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}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:i})=>i.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]}static{this.DECORATION=se.register({description:"quickfix-highlight",className:oN})}async showCodeActionList(e,t,i){const s=this._editor.createDecorationsCollection(),o=this._editor.getDomNode();if(!o)return;const r=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=B.isIPosition(t)?this.toCoords(t):t;this._actionWidgetService.show("codeActionWidget",!0,Q1(r,this._shouldShowHeaders(),this._resolver.getResolver()),{onSelect:async(l,d)=>{this.applyCodeAction(l,!0,!!d,i.fromLightbulb?ns.FromAILightbulb:ns.FromCodeActions),this._actionWidgetService.hide(!1),s.clear()},onHide:l=>{this._editor?.focus(),s.clear()},onHover:async(l,d)=>{if(d.isCancellationRequested)return;let c=!1;const h=l.action.kind;if(h){const u=new Ve(h);c=[Te.RefactorExtract,Te.RefactorInline,Te.RefactorRewrite,Te.RefactorMove,Te.Source].some(g=>g.contains(u))}return{canPreview:c||!!l.action.edit?.edits.length}},onFocus:l=>{if(l&&l.action){const d=l.action.ranges,c=l.action.diagnostics;if(s.clear(),d&&d.length>0){const h=c&&c?.length>1?c.map(u=>({range:u,options:Wo.DECORATION})):d.map(u=>({range:u,options:Wo.DECORATION}));s.set(h)}else if(c&&c.length>0){const h=c.map(g=>({range:g,options:Wo.DECORATION}));s.set(h);const u=c[0];if(u.startLineNumber&&u.startColumn){const g=this._editor.getModel()?.getWordAtPosition({lineNumber:u.startLineNumber,column:u.startColumn})?.word;vs(m(899,"Context: {0} at line {1} and column {2}.",g,u.startLineNumber,u.startColumn))}}}else s.clear()}},a,o,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=kt(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){const e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const s=e.documentation.map(o=>({id:o.id,label:o.title,tooltip:o.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(o.id,...o.arguments??[])}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&s.push(this._showDisabled?{id:"hideMoreActions",label:m(900,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:m(901,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),s}};co=Wo=sN([ki(1,lh),ki(2,ve),ki(3,ie),ki(4,Z),ki(5,lr),ki(6,ht),ki(7,xe),ki(8,Ni),ki(9,ie),ki(10,lr),ki(11,Oe)],co);al((n,e)=>{((s,o)=>{o&&e.addRule(`.monaco-editor ${s} { background-color: ${o}; }`)})(".quickfix-edit-highlight",n.getColor(YE));const i=n.getColor(pw);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Ta(n.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function wl(n){return N.regex(vy.keys()[0],new RegExp("(\\s|^)"+ka(n.value)+"\\b"))}var Gm={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:m(867,"Kind of the code action to run.")},apply:{type:"string",description:m(868,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[m(869,"Always apply the first returned code action."),m(870,"Apply the first returned code action if it is the only one."),m(871,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:m(872,"Controls if only preferred code actions should be returned.")}}};function bo(n,e,t,i,s=$t.Default){n.hasModel()&&co.get(n)?.manualTriggerAtCurrentPosition(e,s,t,i)}var rN=class extends gi{constructor(){super({id:uy,title:L(889,"Quick Fix..."),precondition:N.and(S.writable,S.hasCodeActionsProvider),icon:V.lightBulb,f1:!0,keybinding:{when:S.textInputFocus,primary:2137,weight:100},menu:{id:$.InlineChatEditorAffordance,group:"1_quickfix",order:0,when:N.and(S.writable,S.hasCodeActionsProvider)}})}runEditorCommand(n,e){return bo(e,m(873,"No code actions available"),void 0,void 0,$t.QuickFix)}},aN=class extends Mt{constructor(){super({id:hy,precondition:N.and(S.writable,S.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:Gm}]}})}runEditorCommand(n,e,t){const i=hh.fromUser(t,{kind:Ve.Empty,apply:"ifSingle"});return bo(e,typeof t?.kind=="string"?i.preferred?m(874,"No preferred code actions for '{0}' available",t.kind):m(875,"No code actions for '{0}' available",t.kind):i.preferred?m(876,"No preferred code actions available"):m(877,"No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}},lN=class extends M{constructor(){super({id:gy,label:L(890,"Refactor..."),precondition:N.and(S.writable,S.hasCodeActionsProvider),kbOpts:{kbExpr:S.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:N.and(S.writable,wl(Te.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:Gm}]}})}run(n,e,t){const i=hh.fromUser(t,{kind:Te.Refactor,apply:"never"});return bo(e,typeof t?.kind=="string"?i.preferred?m(878,"No preferred refactorings for '{0}' available",t.kind):m(879,"No refactorings for '{0}' available",t.kind):i.preferred?m(880,"No preferred refactorings available"):m(881,"No refactorings available"),{include:Te.Refactor.contains(i.kind)?i.kind:Ve.None,onlyIncludePreferredActions:i.preferred},i.apply,$t.Refactor)}},dN=class extends M{constructor(){super({id:py,label:L(891,"Source Action..."),precondition:N.and(S.writable,S.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:N.and(S.writable,wl(Te.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:Gm}]}})}run(n,e,t){const i=hh.fromUser(t,{kind:Te.Source,apply:"never"});return bo(e,typeof t?.kind=="string"?i.preferred?m(882,"No preferred source actions for '{0}' available",t.kind):m(883,"No source actions for '{0}' available",t.kind):i.preferred?m(884,"No preferred source actions available"):m(885,"No source actions available"),{include:Te.Source.contains(i.kind)?i.kind:Ve.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,$t.SourceAction)}},cN=class extends M{constructor(){super({id:fy,label:L(892,"Organize Imports"),precondition:N.and(S.writable,wl(Te.SourceOrganizeImports)),kbOpts:{kbExpr:S.textInputFocus,primary:1581,weight:100},metadata:{description:L(893,"Organize imports in the current file. Also called 'Optimize Imports' by some tools")}})}run(n,e){return bo(e,m(886,"No organize imports action available"),{include:Te.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",$t.OrganizeImports)}},hN=class extends M{constructor(){super({id:my,label:L(894,"Fix All"),precondition:N.and(S.writable,wl(Te.SourceFixAll))})}run(n,e){return bo(e,m(887,"No fix all action available"),{include:Te.SourceFixAll,includeSourceActions:!0},"ifSingle",$t.FixAll)}},uN=class extends M{constructor(){super({id:U1,label:L(895,"Auto Fix..."),precondition:N.and(S.writable,wl(Te.QuickFix)),kbOpts:{kbExpr:S.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(n,e){return bo(e,m(888,"No auto fixes available"),{include:Te.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",$t.AutoFix)}};ce(co.ID,co,3);ce(Ua.ID,Ua,4);fe(rN);k(lN);k(dN);k(cN);k(uN);k(hN);G(new aN);ln.as(Zc.Configuration).registerConfiguration({...Am,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:6,description:m(896,"Enable/disable showing group headers in the Code Action menu."),default:!0}}});ln.as(Zc.Configuration).registerConfiguration({...Am,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:6,description:m(897,"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});ln.as(Zc.Configuration).registerConfiguration({...Am,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:6,markdownDescription:m(898,"Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}});var rc=class Iy{constructor(){this.lenses=[]}static{this.Empty=new Iy}dispose(){this._store?.dispose()}get isDisposed(){return this._store?.isDisposed??!1}add(e,t){Lm(e)&&(this._store??=new A,this._store.add(e));for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}};async function Ly(n,e,t){const i=n.ordered(e),s=new Map,o=new rc,r=i.map(async(a,l)=>{s.set(a,l);try{const d=await Promise.resolve(a.provideCodeLenses(e,t));d&&o.add(d,a)}catch(d){tt(d)}});return await Promise.all(r),t.isCancellationRequested?(o.dispose(),rc.Empty):(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:s.get(a.provider)<s.get(l.provider)?-1:s.get(a.provider)>s.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),o)}Re.registerCommand("_executeCodeLensProvider",function(n,...e){let[t,i]=e;Se(De.isUri(t)),Se(typeof i=="number"||!i);const{codeLensProvider:s}=n.get(Z),o=n.get(Kt).getModel(t);if(!o)throw Ln();const r=[],a=new A;return Ly(s,o,ue.None).then(l=>{a.add(l);const d=[];for(const c of l.lenses)i==null||c.symbol.command?r.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&d.push(Promise.resolve(c.provider.resolveCodeLens(o,c.symbol,ue.None)).then(h=>r.push(h||c.symbol)));return Promise.all(d)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var gN=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},pN=function(n,e){return function(t,i){e(t,i,n)}},Dy=dn("ICodeLensCache"),Wv=class{constructor(n,e){this.lineCount=n,this.data=e}},vg=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new dl(20,.75);const t="codelens/cache";v0(_d,()=>e.remove(t,1));const i="codelens/cache2",s=e.get(i,1,"{}");this._deserialize(s);const o=qe.filter(e.onWillSaveState,r=>r.reason===bm.SHUTDOWN);qe.once(o)(r=>{e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>({range:r.symbol.range,command:r.symbol.command&&{id:"",title:r.symbol.command?.title}})),s=new rc;s.add({lenses:i},this._fakeProvider);const o=new Wv(e.getLineCount(),s);this._cache.set(e.uri.toString(),o)}get(e){const 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(){const e=Object.create(null);for(const[t,i]of this._cache){const s=new Set;for(const o of i.data.lenses)s.add(o.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...s.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const s=t[i],o=[];for(const a of s.lines)o.push({range:new y(a,1,a,11)});const r=new rc;r.add({lenses:o},this._fakeProvider),this._cache.set(i,new Wv(s.lineCount,r))}}catch{}}};vg=gN([pN(0,Ti)],vg);Wn(Dy,vg,1);var fN=class{constructor(n,e,t){this.afterColumn=1073741824,this.afterLineNumber=n,this.heightInPx=e,this._onHeight=t,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(n){this._lastHeight===void 0?this._lastHeight=n:this._lastHeight!==n&&(this._lastHeight=n,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}},mN=class bg{static{this._idPool=0}constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${bg._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let s=!1;for(let o=0;o<e.length;o++){const r=e[o];if(r&&(s=!0,r.command)){const a=w0(r.command.title.trim());if(r.command.id){const l=`c${bg._idPool++}`;i.push(W("a",{id:l,title:r.command.tooltip,role:"button"},...a)),this._commands.set(l,r.command)}else i.push(W("span",{title:r.command.tooltip},...a));o+1<e.length&&i.push(W("span",void 0," | "))}}s?(jd(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):jd(this._domNode,W("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){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}},Gh=class{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(n,e){this._addDecorations.push(n),this._addDecorationsCallbacks.push(e)}removeDecoration(n){this._removeDecorations.push(n)}commit(n){const e=n.deltaDecorations(this._removeDecorations,this._addDecorations);for(let t=0,i=e.length;t<i;t++)this._addDecorationsCallbacks[t](e[t])}},Vv=se.register({collapseOnReplaceEdit:!0,description:"codelens"}),Bv=class{constructor(n,e,t,i,s,o){this._isDisposed=!1,this._editor=e,this._data=n,this._decorationIds=[];let r;const a=[];this._data.forEach((l,d)=>{l.symbol.command&&a.push(l.symbol),t.addDecoration({range:l.symbol.range,options:Vv},c=>this._decorationIds[d]=c),r?r=y.plusRange(r,l.symbol.range):r=y.lift(l.symbol.range)}),this._viewZone=new fN(r.startLineNumber-1,s,o),this._viewZoneId=i.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new mN(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(n,e){this._decorationIds.forEach(n.removeDecoration,n),this._decorationIds=[],e?.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((n,e)=>{const t=this._editor.getModel().getDecorationRange(n),i=this._data[e].symbol;return!!(t&&y.isEmpty(i.range)===t.isEmpty())})}updateCodeLensSymbols(n,e){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],this._data=n,this._data.forEach((t,i)=>{e.addDecoration({range:t.symbol.range,options:Vv},s=>this._decorationIds[i]=s)})}updateHeight(n,e){this._viewZone.heightInPx=n,e.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(n){if(!this._viewZone.isVisible())return null;for(let e=0;e<this._decorationIds.length;e++){const t=n.getDecorationRange(this._decorationIds[e]);t&&(this._data[e].symbol.range=t)}return this._data}updateCommands(n){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(n,!0);for(let e=0;e<this._data.length;e++){const t=n[e];if(t){const{symbol:i}=this._data[e];i.command=t.command||i.command}}}getCommand(n){return this._contentWidget?.getCommand(n)}getLineNumber(){const n=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return n?n.startLineNumber:-1}update(n){if(this.isValid()){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);e&&(this._viewZone.afterLineNumber=e.startLineNumber-1,n.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(e.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}},_N=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Wr=function(n,e){return function(t,i){e(t,i,n)}},za=class{static{this.ID="css.editor.codeLens"}constructor(e,t,i,s,o,r){this._editor=e,this._languageFeaturesService=t,this._commandService=s,this._notificationService=o,this._codeLensCache=r,this._disposables=new A,this._localToDispose=new A,this._lenses=[],this._oldCodeLensModels=new A,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new at(()=>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(59)||a.hasChanged(25)||a.hasChanged(24))&&this._updateLensStyle(),a.hasChanged(23)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._localToDispose.dispose(),this._disposables.dispose(),this._resolveCodeLensesScheduler.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(75)/this._editor.getOption(61));let t=this._editor.getOption(25);return(!t||t<5)&&(t=this._editor.getOption(61)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(24),s=this._editor.getOption(59),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",s.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",fm.fontFamily)),this._editor.changeViewZones(r=>{for(const a of this._lenses)a.updateHeight(e,r)})}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(23)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&gs(()=>{const s=this._codeLensCache.get(e);t===s&&(this._codeLensCache.delete(e),this._onModelChange())},3e4,this._localToDispose);return}for(const s of this._languageFeaturesService.codeLensProvider.all(e))if(typeof s.onDidChange=="function"){const o=s.onDidChange(()=>i.schedule());this._localToDispose.add(o)}const i=new at(()=>{const s=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=pt(o=>Ly(this._languageFeaturesService.codeLensProvider,e,o)),this._getCodeLensModelPromise.then(o=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=o,this._codeLensCache.put(e,o);const r=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=r,this._renderCodeLensSymbols(o),this._resolveCodeLensesInViewportSoon()},we)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(ke(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(s=>{this._editor.changeViewZones(o=>{const r=[];let a=-1;this._lenses.forEach(d=>{!d.isValid()||a===d.getLineNumber()?r.push(d):(d.update(o),a=d.getLineNumber())});const l=new Gh;r.forEach(d=>{d.dispose(l,o),this._lenses.splice(this._lenses.indexOf(d),1)}),l.commit(s)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(s=>{s.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ke(()=>{if(this._editor.getModel()){const s=or.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(o,r)})}),s.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(s=>{if(s.target.type!==9)return;let o=s.target.element;if(o?.tagName==="SPAN"&&(o=o.parentElement),o?.tagName==="A")for(const r of this._lenses){const a=r.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new Gh;for(const s of this._lenses)s.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let s;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(s&&s[s.length-1].symbol.range.startLineNumber===l?s.push(a):(s=[a],i.push(s)))}if(!i.length&&!this._lenses.length)return;const o=or.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const d=new Gh;let c=0,h=0;for(;h<i.length&&c<this._lenses.length;){const u=i[h][0].symbol.range.startLineNumber,g=this._lenses[c].getLineNumber();g<u?(this._lenses[c].dispose(d,l),this._lenses.splice(c,1)):g===u?(this._lenses[c].updateCodeLensSymbols(i[h],d),h++,c++):(this._lenses.splice(c,0,new Bv(i[h],this._editor,d,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),c++,h++)}for(;c<this._lenses.length;)this._lenses[c].dispose(d,l),this._lenses.splice(c,1);for(;h<i.length;)this._lenses.push(new Bv(i[h],this._editor,d,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),h++;d.commit(a)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const t=[],i=[];if(this._lenses.forEach(r=>{const a=r.computeIfNecessary(e);a&&(t.push(a),i.push(r))}),t.length===0){this._oldCodeLensModels.clear();return}const s=Date.now(),o=pt(r=>{const a=t.map((l,d)=>{const c=new Array(l.length),h=l.map((u,g)=>!u.symbol.command&&typeof u.provider.resolveCodeLens=="function"?Promise.resolve(u.provider.resolveCodeLens(e,u.symbol,r)).then(p=>{c[g]=p},tt):(c[g]=u.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!r.isCancellationRequested&&!i[d].isDisposed()&&i[d].updateCommands(c)})});return Promise.all(a)});this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then(()=>{const r=this._resolveCodeLensesDebounce.update(e,Date.now()-s);this._resolveCodeLensesScheduler.delay=r,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},r=>{we(r),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};za=_N([Wr(1,Z),Wr(2,Ri),Wr(3,ht),Wr(4,Et),Wr(5,Dy)],za);ce(za.ID,za,1);k(class extends M{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:S.hasCodeLensProvider,label:L(920,"Show CodeLens Commands for Current Line")})}async run(e,t){if(!t.hasModel())return;const i=e.get(Di),s=e.get(ht),o=e.get(Et),r=t.getSelection().positionLineNumber,a=t.getContribution(za.ID);if(!a)return;const l=await a.getModel();if(!l)return;const d=[];for(const u of l.lenses)u.symbol.command&&u.symbol.range.startLineNumber===r&&d.push({label:u.symbol.command.title,command:u.symbol.command});if(d.length===0)return;const c=await i.pick(d,{canPickMany:!1,placeHolder:m(919,"Select a command")});if(!c)return;let h=c.command;if(l.isDisposed){const u=(await a.getModel())?.lenses.find(g=>g.symbol.range.startLineNumber===r&&g.symbol.command?.title===h.title);if(!u||!u.symbol.command)return;h=u.symbol.command}try{await s.executeCommand(h.id,...h.arguments||[])}catch(u){o.error(u)}}});var Zh=class{constructor(n,e,t,i){this.priority=n,this.range=e,this.initialMousePosX=t,this.initialMousePosY=i,this.type=1}equals(n){return n.type===1&&this.range.equalsRange(n.range)}canAdoptVisibleHover(n,e){return n.type===1&&e.lineNumber===this.range.startLineNumber}},ia=class{constructor(n,e,t,i,s,o){this.priority=n,this.owner=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=s,this.supportsMarkerHover=o,this.type=2}equals(n){return n.type===2&&this.owner===n.owner}canAdoptVisibleHover(n,e){return n.type===2&&this.owner===n.owner}},ho=class{constructor(n,e){this.renderedHoverParts=n,this.disposables=e}dispose(){for(const n of this.renderedHoverParts)n.dispose();this.disposables?.dispose()}},Co=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}},Ey=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Cg=function(n,e){return function(t,i){e(t,i,n)}},ja=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const s=t.range,o=t.color,r=new me(new ur(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),o.alpha)),a=me.Format.CSS.formatRGB(r),l=me.Format.CSS.formatHSL(r),d=me.Format.CSS.formatHexA(r,!0),c=[];return c.push({label:a,textEdit:{range:s,text:a}}),c.push({label:l,textEdit:{range:s,text:l}}),c.push({label:d,textEdit:{range:s,text:d}}),c}};ja=Ey([Cg(0,An)],ja);var Sg=class extends O{constructor(e,t){super(),this._register(e.colorProvider.register("*",new ja(t)))}};Sg=Ey([Cg(0,Z),Cg(1,An)],Sg);async function Ry(n,e,t,i="auto"){return Zm(new vN,n,e,t,i)}function Ty(n,e,t,i){return Promise.resolve(t.provideColorPresentations(n,e,i))}var vN=class{constructor(){}async compute(n,e,t,i){const s=await n.provideDocumentColors(e,t);if(Array.isArray(s))for(const o of s)i.push({colorInfo:o,provider:n});return Array.isArray(s)}},bN=class{constructor(){}async compute(n,e,t,i){const s=await n.provideDocumentColors(e,t);if(Array.isArray(s))for(const o of s)i.push({range:o.range,color:[o.color.red,o.color.green,o.color.blue,o.color.alpha]});return Array.isArray(s)}},CN=class{constructor(n){this.colorInfo=n}async compute(n,e,t,i){const s=await n.provideColorPresentations(e,this.colorInfo,ue.None);return Array.isArray(s)&&i.push(...s),Array.isArray(s)}};async function Zm(n,e,t,i,s){let o=!1,r;const a=[],l=e.ordered(t);for(let d=l.length-1;d>=0;d--){const c=l[d];if(s!=="always"&&c instanceof ja)r=c;else try{await n.compute(c,t,i,a)&&(o=!0)}catch(h){tt(h)}}return o?a:r&&s!=="never"?(await n.compute(r,t,i,a),a):[]}function Ny(n,e){const{colorProvider:t}=n.get(Z),i=n.get(Kt).getModel(e);if(!i)throw Ln();return{model:i,colorProviderRegistry:t,defaultColorDecoratorsEnablement:n.get(xe).getValue("editor.defaultColorDecorators",{resource:e})}}var SN=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Xh=function(n,e){return function(t,i){e(t,i,n)}},wg,ky=Object.create({}),gr=class extends O{static{wg=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,i,s){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new A),this._decorationsIds=[],this._colorDatas=new Map,this._decoratorLimitReporter=this._register(new wN),this._colorDecorationClassRefs=this._register(new A),this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=this._register(new kS(this._editor)),this._debounceInformation=s.for(i.colorProvider,"Document Colors",{min:wg.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(i.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{const r=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167);const a=r!==this._isColorDecoratorsEnabled||o.hasChanged(27),l=o.hasChanged(167);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const s=i.colorDecorators;if(s&&s.enable!==void 0&&!s.enable)return s.enable}return this._editor.getOption(26)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new ll,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=pt(async e=>{const t=this._editor.getModel();if(!t)return[];const i=new hi(!1),s=await Ry(this._languageFeaturesService.colorProvider,t,e,this._defaultColorDecoratorsEnablement);return this._debounceInformation.update(t,i.elapsed()),s});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){we(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:se.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((s,o)=>this._colorDatas.set(s,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(27);for(let o=0;o<e.length&&t.length<i;o++){const{red:r,green:a,blue:l,alpha:d}=e[o].colorInfo.color,c=new ur(Math.round(r*255),Math.round(a*255),Math.round(l*255),d),h=`rgba(${c.r}, ${c.g}, ${c.b}, ${c.a})`,u=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:h}));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:" ",inlineClassName:`${u.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:ky}}})}const s=i<e.length?i:!1;this._decoratorLimitReporter.update(e.length,s),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(y.fromPositions(e,e)).filter(s=>this._colorDatas.has(s.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};gr=wg=SN([Xh(1,xe),Xh(2,Z),Xh(3,Ri)],gr);var wN=class extends O{constructor(){super(...arguments),this._onDidChange=this._register(new Q),this._computed=0,this._limited=!1}update(n,e){(n!==this._computed||e!==this._limited)&&(this._computed=n,this._limited=e,this._onDidChange.fire())}},yN="editor.action.showHover",xN="editor.action.showDefinitionPreviewHover",IN="editor.action.hideHover",LN="editor.action.scrollUpHover",DN="editor.action.scrollDownHover",EN="editor.action.scrollLeftHover",RN="editor.action.scrollRightHover",TN="editor.action.pageUpHover",NN="editor.action.pageDownHover",kN="editor.action.goToTopHover",PN="editor.action.goToBottomHover",Xm="editor.action.increaseHoverVerbosityLevel",ON=m(1145,"Increase Hover Verbosity Level"),Ym="editor.action.decreaseHoverVerbosityLevel",MN=m(1146,"Decrease Hover Verbosity Level"),yg="editor.action.hideLongLineWarningHover",yl="editor.action.inlineSuggest.commit",uh="editor.action.inlineSuggest.commitAlternativeAction",Py="editor.action.inlineSuggest.showPrevious",Oy="editor.action.inlineSuggest.showNext",My="editor.action.inlineSuggest.jump",Ay="editor.action.inlineSuggest.hide",xg="editor.action.inlineSuggest.toggleShowCollapsed",Uv="editor.action.inlineSuggest.renameSymbol",Jm=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},bi=function(n,e){return function(t,i){e(t,i,n)}},Sd,Ig=class extends O{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=Dt(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(71).showToolbar==="always"),this.sessionPosition=void 0,this.position=T(this,s=>{const o=this.model.read(s)?.primaryGhostText.read(s);if(!this.alwaysShowToolbar.read(s)||!o||o.parts.length===0)return this.sessionPosition=void 0,null;const r=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const a=new B(o.lineNumber,Math.min(r,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(bl((s,o)=>{const r=this.model.read(s);if(!r||!this.alwaysShowToolbar.read(s))return;const a=T(d=>{const c=d.store.add(this.instantiationService.createInstance(pr.hot.read(d),this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands,r.warning,()=>{}));return e.addContentWidget(c),d.store.add(ke(()=>e.removeContentWidget(c))),d.store.add(he(h=>{this.position.read(h)&&r.lastTriggerKind.read(h)!==Yt.Explicit&&r.triggerExplicitly()})),c}),l=Ts(this,(d,c)=>!!this.position.read(d)||!!c);o.add(he(d=>{l.read(d)&&a.read(d)}))}))}};Ig=Jm([bi(2,ie)],Ig);var AN=Ze("inline-suggestion-hints-next",V.chevronRight,m(1250,"Icon for show next parameter hint.")),FN=Ze("inline-suggestion-hints-previous",V.chevronLeft,m(1251,"Icon for show previous parameter hint.")),pr=class extends O{static{Sd=this}static{this.hot=mm(this)}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,i){const s=new sr(e,t,i,!0,()=>this._commandService.executeCommand(e));return s.tooltip=this.keybindingService.appendKeybinding(t,e,this._contextKeyService),s}constructor(e,t,i,s,o,r,a,l,d,c,h,u,g){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=s,this._suggestionCount=o,this._extraCommands=r,this._warning=a,this._relayout=l,this._commandService=d,this.keybindingService=h,this._contextKeyService=u,this._menuService=g,this.id=`InlineSuggestionHintsContentWidget${Sd.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._warningMessageContentNode=T(p=>{const f=this._warning.read(p);if(f)return typeof f.message=="string"?f.message:p.store.add(Kc(f.message)).element}),this._warningMessageNode=q.div({class:"warningMessage",style:{maxWidth:400,margin:4,marginBottom:4,display:T(p=>this._warning.read(p)?"block":"none")}},[this._warningMessageContentNode]).keepUpdated(this._store),this.nodes=Na("div.inlineSuggestionsHints",{className:this.withBorder?"monaco-hover monaco-hover-content":""},[this._warningMessageNode.element,Na("div@toolBar")]),this.previousAction=this._register(this.createCommandAction(Py,m(1252,"Previous"),pe.asClassName(FN))),this.availableSuggestionCountAction=this._register(new sr("inlineSuggestionHints.availableSuggestionCount","",void 0,!1)),this.nextAction=this._register(this.createCommandAction(Oy,m(1253,"Next"),pe.asClassName(AN))),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu($.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new at(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new at(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this._register(he(p=>{this._warningMessageContentNode.read(p),this._warningMessageNode.readEffect(p),this._relayout()})),this.toolBar=this._register(c.createInstance(Lg,this.nodes.toolBar,$.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:p=>p.startsWith("primary")},actionViewItemProvider:(p,f)=>{if(p instanceof ro)return c.createInstance(WN,p,void 0);if(p===this.availableSuggestionCountAction){const _=new HN(void 0,p,{label:!0,icon:!1});return _.setClass("availableSuggestionCount"),_}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(p=>{Sd._dropDownVisible=p})),this._register(he(p=>{this._position.read(p),this.editor.layoutContentWidget(this)})),this._register(he(p=>{const f=this._suggestionCount.read(p),_=this._currentSuggestionIdx.read(p);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${_+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(he(p=>{const f=this._extraCommands.read(p).map(_=>({class:void 0,id:_.command.id,enabled:!0,tooltip:_.command.tooltip||"",label:_.command.title,run:()=>this._commandService.executeCommand(_.command.id,..._.command.arguments??[])}));for(const[_,v]of this.inlineCompletionsActionsMenus.getActions())for(const C of v)C instanceof ro&&f.push(C);f.length>0&&f.unshift(new Ma),this.toolBar.setAdditionalSecondaryActions(f)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};pr=Sd=Jm([bi(8,ht),bi(9,ie),bi(10,Oe),bi(11,ve),bi(12,Es)],pr);var HN=class extends eg{constructor(){super(...arguments),this._className=void 0}setClass(n){this._className=n}render(n){super.render(n),this._className&&n.classList.add(this._className)}updateTooltip(){}},WN=class extends cm{updateLabel(){const n=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService,!0);if(!n)return super.updateLabel();if(this.label){const e=Na("div.keybinding").root;this._register(new hl(e,ml,{disableTitle:!0,...yS})).set(n),this.label.textContent=this._action.label,this.label.appendChild(e),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},Lg=class extends LT{constructor(e,t,i,s,o,r,a,l,d){super(e,{resetMenu:t,...i},s,o,r,a,l,d),this.menuId=t,this.options2=i,this.menuService=s,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this.additionalPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){const{primary:e,secondary:t}=ES(this.menu.getActions(this.options2?.menuOptions),this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions);t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),e.push(...this.additionalPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){Bi(this.prependedPrimaryActions,e,(t,i)=>t===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Bi(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};Lg=Jm([bi(3,Es),bi(4,ve),bi(5,gl),bi(6,Oe),bi(7,ht),bi(8,Ds)],Lg);function gh(n,e,t){const i=kt(n);return!(e<i.left+3||e>i.left+i.width-3||t<i.top+3||t>i.top+i.height-3)}function Fy(n,e,t){return n==="on"?!0:n==="off"?!1:Qm(e,t.event)}function Qm(n,e){return n==="altKey"?e.ctrlKey||e.metaKey:e.altKey}var VN=class{constructor(n,e,t,i){this.value=n,this.isComplete=e,this.hasLoadingMessage=t,this.options=i}},Hy=class extends O{constructor(n,e){super(),this._editor=n,this._computer=e,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._asyncComputationScheduler=this._register(new Yh(t=>this._triggerAsyncComputation(t),0)),this._syncComputationScheduler=this._register(new Yh(t=>this._triggerSyncComputation(t),0)),this._loadingMessageScheduler=this._register(new Yh(t=>this._triggerLoadingMessage(t),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._options=void 0,super.dispose()}get _hoverTime(){return this._editor.getOption(69).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(n,e){this._options=e,this._state=n,this._fireResult(e)}_triggerAsyncComputation(n){this._setState(2,n),this._syncComputationScheduler.schedule(n,this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=iE(e=>this._computer.computeAsync(n,e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult(n));this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0,n)}catch(e){we(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(n){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync(n))),this._setState(this._asyncIterableDone?0:3,n)}_triggerLoadingMessage(n){this._state===3&&this._setState(4,n)}_fireResult(n){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new VN(this._result.slice(0),e,t,n))}start(n,e){if(n===0)this._state===0&&(this._setState(1,e),this._asyncComputationScheduler.schedule(e,this._firstWaitTime),this._loadingMessageScheduler.schedule(e,this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(e),this._syncComputationScheduler.cancel(),this._triggerSyncComputation(e);break;case 2:this._syncComputationScheduler.cancel(),this._triggerSyncComputation(e)}}cancel(){this._asyncComputationScheduler.cancel(),this._syncComputationScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._options=void 0,this._state=0}get options(){return this._options}},Yh=class extends O{constructor(n,e){super(),this._scheduler=this._register(new at(()=>n(this._options),e))}schedule(n,e){this._options=n,this._scheduler.schedule(e)}cancel(){this._scheduler.cancel()}},e_=class{get onDidWillResize(){return this._onDidWillResize.event}get onDidResize(){return this._onDidResize.event}constructor(){this._onDidWillResize=new Q,this._onDidResize=new Q,this._sashListener=new A,this._size=new Le(0,0),this._minSize=new Le(0,0),this._maxSize=new Le(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new qo(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new qo(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new qo(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Q_.North}),this._southSash=new qo(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Q_.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let n,e=0,t=0;this._sashListener.add(qe.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{n===void 0&&(this._onDidWillResize.fire(),n=this._size,e=0,t=0)})),this._sashListener.add(qe.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{n!==void 0&&(n=void 0,e=0,t=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{n&&(t=i.currentX-i.startX,this.layout(n.height+e,n.width+t),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{n&&(t=-(i.currentX-i.startX),this.layout(n.height+e,n.width+t),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{n&&(e=-(i.currentY-i.startY),this.layout(n.height+e,n.width+t),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{n&&(e=i.currentY-i.startY,this.layout(n.height+e,n.width+t),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(qe.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(qe.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{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(n,e,t,i){this._northSash.state=n?3:0,this._eastSash.state=e?3:0,this._southSash.state=t?3:0,this._westSash.state=i?3:0}layout(n=this.size.height,e=this.size.width){const{height:t,width:i}=this._minSize,{height:s,width:o}=this._maxSize;n=Math.max(t,Math.min(s,n)),e=Math.max(i,Math.min(o,e));const r=new Le(e,n);Le.equals(r,this._size)||(this.domNode.style.height=n+"px",this.domNode.style.width=e+"px",this._size=r,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(n){this._maxSize=n}get maxSize(){return this._maxSize}set minSize(n){this._minSize=n}get minSize(){return this._minSize}set preferredSize(n){this._preferredSize=n}get preferredSize(){return this._preferredSize}},BN=30,UN=24,zN=class extends O{constructor(n,e=new Le(10,10)){super(),this._editor=n,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new e_),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Le.lift(e),this._resizableNode.layout(e.height,e.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(t=>{this._resize(new Le(t.dimension.width,t.dimension.height)),t.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(){return this._contentPosition?.position?B.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(n){const e=this._editor.getDomNode(),t=this._editor.getScrolledVisiblePosition(n);if(!(!e||!t))return kt(e).top+t.top-BN}_availableVerticalSpaceBelow(n){const e=this._editor.getDomNode(),t=this._editor.getScrolledVisiblePosition(n);if(!e||!t)return;const i=kt(e),s=cl(e.ownerDocument.body),o=i.top+t.top+t.height;return s.height-o-UN}_findPositionPreference(n,e){const t=Math.min(this._availableVerticalSpaceBelow(e)??1/0,n),i=Math.min(this._availableVerticalSpaceAbove(e)??1/0,n),s=Math.min(n,Math.min(Math.max(i,t),n));let o;return this._editor.getOption(69).above?o=s<=i?1:2:o=s<=t?2:1,o===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),o}_resize(n){this._resizableNode.layout(n.height,n.width)}},jN=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ol=function(n,e){return function(t,i){e(t,i,n)}},mi,zv=30,Dg=class extends zN{static{mi=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new Le(0,0)}get isVisibleFromKeyboard(){return this._renderedHover?.source===2}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,i,s,o){const r=e.getOption(75)+8,a=new Le(150,r);super(e,a),this._configurationService=i,this._accessibilityService=s,this._keybindingService=o,this._hover=this._register(new ww(!0)),this._onDidResize=this._register(new Q),this.onDidResize=this._onDidResize.event,this._onDidScroll=this._register(new Q),this.onDidScroll=this._onDidScroll.event,this._onContentsChanged=this._register(new Q),this.onContentsChanged=this._onContentsChanged.event,this._minimumSize=a,this._hoverVisibleKey=S.hoverVisible.bindTo(t),this._hoverFocusedKey=S.hoverFocused.bindTo(t),z(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._resizableNode.domNode.className="monaco-resizable-hover",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(59)&&this._updateFont()}));const l=this._register(ls(this._resizableNode.domNode));this._register(l.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(l.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._register(this._hover.scrollbar.onScroll(d=>{this._onDidScroll.fire(d)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return mi.ID}static _applyDimensions(e,t,i){const s=typeof t=="number"?`${t}px`:t,o=typeof i=="number"?`${i}px`:i;e.style.width=s,e.style.height=o}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return mi._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return mi._applyDimensions(i,e,t)}_setScrollableElementDimensions(e,t){const i=this._hover.scrollbar.getDomNode();return mi._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContainerDomNodeDimensions(e,t),this._setScrollableElementDimensions(e,t),this._setContentsDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const s=typeof t=="number"?`${t}px`:t,o=typeof i=="number"?`${i}px`:i;e.style.maxWidth=s,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){mi._applyMaxDimensions(this._hover.contentsDomNode,e,t),mi._applyMaxDimensions(this._hover.scrollbar.getDomNode(),e,t),mi._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none"),this._setHoverWidgetDimensions(e.width,e.height)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new Le(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){mi._lastDimensions=new Le(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){const e=this._renderedHover?.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=this._hover.contentsDomNode.children.length-1;return Array.from(this._hover.contentsDomNode.children).forEach(i=>{t+=i.clientHeight}),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const 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;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth;return e||this._hover.containerDomNode.clientWidth<t?cl(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth}isMouseGettingCloser(e,t){if(!this._renderedHover)return!1;if(this._renderedHover.initialMousePosX===void 0||this._renderedHover.initialMousePosY===void 0)return this._renderedHover.initialMousePosX=e,this._renderedHover.initialMousePosY=t,!1;const i=kt(this.getDomNode());this._renderedHover.closestMouseDistance===void 0&&(this._renderedHover.closestMouseDistance=jv(this._renderedHover.initialMousePosX,this._renderedHover.initialMousePosY,i.left,i.top,i.width,i.height));const s=jv(e,t,i.left,i.top,i.width,i.height);return s>this._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,s),!0)}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(59),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(s=>this._editor.applyFontInfo(s))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,mi._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,750,mi._lastDimensions.width);this._resizableNode.maxSize=new Le(t,e),this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this.handleContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);const t=zo(this._hover.containerDomNode),i=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,i)??1,this.handleContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const s=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&DR(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");s&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+s)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new Le(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto"),this._updateMaxDimensions()}setMinimumDimensions(e){this._minimumSize=new Le(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Le(e,this._minimumSize.height)}handleContentsChanged(){this._removeConstraintsRenderNormally();const e=this._hover.contentsDomNode;let t=zo(e),i=vi(e)+2;if(this._resizableNode.layout(t,i),this._setHoverWidgetDimensions(i,t),t=zo(e),i=vi(e),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(t,i),this._renderedHover?.showAtPosition){const s=zo(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(s,this._renderedHover.showAtPosition)}this._layoutContentWidget(),this._onContentsChanged.fire()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-zv})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+zv})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const 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})}};Dg=mi=jN([Ol(1,ve),Ol(2,xe),Ol(3,Rs),Ol(4,Oe)],Dg);function jv(n,e,t,i,s,o){const r=t+s/2,a=i+o/2,l=Math.max(Math.abs(n-r)-s/2,0),d=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+d*d)}var qN=class Eg{constructor(e,t){this._editor=e,this._participants=t}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),s=t.range.startLineNumber;if(s>i.getLineCount())return[];const o=i.getLineMaxColumn(s);return e.getLineDecorations(s).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===s?r.range.startColumn:1,l=r.range.endLineNumber===s?r.range.endColumn:o;if(r.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,t){const i=e.anchor;if(!this._editor.hasModel()||!i)return sn.EMPTY;const s=Eg._getLineDecorations(this._editor,i);return sn.merge(this._participants.map(o=>o.computeAsync?o.computeAsync(i,s,e.source,t):sn.EMPTY))}computeSync(e){if(!this._editor.hasModel())return[];const t=e.anchor,i=Eg._getLineDecorations(this._editor,t);let s=[];for(const o of this._participants)s=s.concat(o.computeSync(t,i,e.source));return Ns(s)}},Wy=class{constructor(n,e,t){this.hoverParts=n,this.isComplete=e,this.options=t}filter(n){const e=this.hoverParts.filter(t=>t.isValidForHoverAnchor(n));return e.length===this.hoverParts.length?this:new $N(this,e,this.isComplete,this.options)}},$N=class extends Wy{constructor(n,e,t,i){super(e,t,i),this.original=n}filter(n){return this.original.filter(n)}},KN=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},qv=function(n,e){return function(t,i){e(t,i,n)}},$v=W,ac=class extends O{get hasContent(){return this._hasContent}constructor(e,t){super(),this._keybindingService=e,this._hoverService=t,this.actions=[],this._hasContent=!1,this.hoverElement=$v("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=z(this.hoverElement,$v("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._hasContent=!0;const s=this._register(gT.render(this.actionsElement,e,i));return this._register(this._hoverService.setupManagedHover(aw("element"),s.actionContainer,s.actionRenderedLabel)),this.actions.push(s),s}append(e){const t=z(this.actionsElement,e);return this._hasContent=!0,t}};ac=KN([qv(0,Oe),qv(1,ui)],ac);var GN=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){const 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){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e<this._decorations.length?this._decorations[e]:null;return t?this._editor.getModel().getDecorationRange(t):null}getCurrentMatchesPosition(e){const t=this._editor.getModel().getDecorationsInRange(e);for(const i of t){const s=i.options;if(s===_i._FIND_MATCH_DECORATION||s===_i._FIND_MATCH_NO_OVERVIEW_DECORATION||s===_i._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let s=0,o=this._decorations.length;s<o;s++){const r=this._editor.getModel().getDecorationRange(this._decorations[s]);if(e.equalsRange(r)){t=this._decorations[s],i=s+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(s=>{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,_i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,s.changeDecorationOptions(this._highlightedDecorationId,_i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){const r=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(r);o=new y(o.startLineNumber,o.startColumn,r,a)}this._rangeHighlightDecorationId=s.addDecoration(o,_i._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let s=_i._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){s=_i._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/l));let c=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let u=1,g=e.length;u<g;u++){const p=e[u].range;h+d>=p.startLineNumber?p.endLineNumber>h&&(h=p.endLineNumber):(o.push({range:new y(c,1,h,1),options:_i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=p.startLineNumber,h=p.endLineNumber)}o.push({range:new y(c,1,h,1),options:_i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const r=new Array(e.length);for(let a=0,l=e.length;a<l;a++)r[a]={range:e[a].range,options:s};this._decorations=i.deltaDecorations(this._decorations,r),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,o),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>i.removeDecoration(a)),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map(a=>i.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--){const i=this._decorations[t],s=this._editor.getModel().getDecorationRange(i);if(!(!s||s.endLineNumber>e.lineNumber)){if(s.endLineNumber<e.lineNumber)return s;if(!(s.endColumn>e.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;t<i;t++){const s=this._decorations[t],o=this._editor.getModel().getDecorationRange(s);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}static{this._CURRENT_FIND_MATCH_DECORATION=se.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",inlineClassName:"currentFindMatchInline",showIfCollapsed:!0,overviewRuler:{color:it(Ah),position:nn.Center},minimap:{color:it(lv),position:1}})}static{this._FIND_MATCH_DECORATION=se.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",inlineClassName:"findMatchInline",showIfCollapsed:!0,overviewRuler:{color:it(Ah),position:nn.Center},minimap:{color:it(lv),position:1}})}static{this._FIND_MATCH_NO_OVERVIEW_DECORATION=se.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0})}static{this._FIND_MATCH_ONLY_OVERVIEW_DECORATION=se.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:it(Ah),position:nn.Center}})}static{this._RANGE_HIGHLIGHT_DECORATION=se.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0})}static{this._FIND_SCOPE_DECORATION=se.register({description:"find-scope",className:"findScope",isWholeLine:!0})}},ZN=class{constructor(n,e,t){this._editorSelection=n,this._ranges=e,this._replaceStrings=t,this._trackedEditorSelectionId=null}getEditOperations(n,e){if(this._ranges.length>0){const t=[];for(let o=0;o<this._ranges.length;o++)t.push({range:this._ranges[o],text:this._replaceStrings[o]});t.sort((o,r)=>y.compareRangesUsingStarts(o.range,r.range));const i=[];let s=t[0];for(let o=1;o<t.length;o++)s.range.endLineNumber===t[o].range.startLineNumber&&s.range.endColumn===t[o].range.startColumn?(s.range=s.range.plusRange(t[o].range),s.text=s.text+t[o].text):(i.push(s),s=t[o]);i.push(s);for(const o of i)e.addEditOperation(o.range,o.text)}this._trackedEditorSelectionId=e.trackSelection(this._editorSelection)}computeCursorState(n,e){return e.getTrackedSelection(this._trackedEditorSelectionId)}};function Vy(n,e){if(n&&n[0]!==""){const t=Kv(n,e,"-"),i=Kv(n,e,"_");return t&&!i?Gv(n,e,"-"):!t&&i?Gv(n,e,"_"):n[0].toUpperCase()===n[0]?e.toUpperCase():n[0].toLowerCase()===n[0]?e.toLowerCase():AE(n[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):n[0][0].toUpperCase()!==n[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Kv(n,e,t){return n[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&n[0].split(t).length===e.split(t).length}function Gv(n,e,t){const i=e.split(t),s=n[0].split(t);let o="";return i.forEach((r,a)=>{o+=Vy([s[a]],r)+t}),o.slice(0,-1)}var Zv=class{constructor(n){this.staticValue=n,this.kind=0}},XN=class{constructor(n){this.pieces=n,this.kind=1}},t_=class Rg{static fromStaticValue(e){return new Rg([wd.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new Zv(""):e.length===1&&e[0].staticValue!==null?this._state=new Zv(e[0].staticValue):this._state=new XN(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?Vy(e,this._state.staticValue):this._state.staticValue;let i="";for(let s=0,o=this._state.pieces.length;s<o;s++){const r=this._state.pieces[s];if(r.staticValue!==null){i+=r.staticValue;continue}let a=Rg._substitute(r.matchIndex,e);if(r.caseOps!==null&&r.caseOps.length>0){const l=[],d=r.caseOps.length;let c=0;for(let h=0,u=a.length;h<u;h++){if(c>=d){l.push(a.slice(h));break}switch(r.caseOps[c]){case"U":l.push(a[h].toUpperCase());break;case"u":l.push(a[h].toUpperCase()),c++;break;case"L":l.push(a[h].toLowerCase());break;case"l":l.push(a[h].toLowerCase()),c++;break;default:l.push(a[h])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e<t.length)return(t[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}},wd=class Tg{static staticValue(e){return new Tg(e,-1,null)}static caseOps(e,t){return new Tg(null,e,t)}constructor(e,t,i){this.staticValue=e,this.matchIndex=t,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}},YN=class{constructor(n){this._source=n,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(n){this._emitStatic(this._source.substring(this._lastCharIndex,n)),this._lastCharIndex=n}emitStatic(n,e){this._emitStatic(n),this._lastCharIndex=e}_emitStatic(n){n.length!==0&&(this._currentStaticPiece+=n)}emitMatchIndex(n,e,t){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=wd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=wd.caseOps(n,t),this._lastCharIndex=e}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=wd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new t_(this._result)}};function JN(n){if(!n||n.length===0)return new t_(null);const e=[],t=new YN(n);for(let i=0,s=n.length;i<s;i++){const o=n.charCodeAt(i);if(o===92){if(i++,i>=s)break;const r=n.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(`
|
|
@@ -59,6 +59,6 @@ ${o}
|
|
|
59
59
|
|
|
60
60
|
`))});break;case"saveTextureAtlas":t.invokeFunction(async s=>{const o=s.get(ms),r=s.get(iC),a=o.getWorkspace().folders;if(a.length>0){const l=Hr.atlas,d=[];for(const[c,h]of l.pages.entries())d.push(r.writeFile(De.joinPath(a[0].uri,`textureAtlasPage${c}_actual.png`),gd.wrap(new Uint8Array(await(await h.source.convertToBlob()).arrayBuffer()))),r.writeFile(De.joinPath(a[0].uri,`textureAtlasPage${c}_usage.png`),gd.wrap(new Uint8Array(await(await h.getUsagePreview()).arrayBuffer()))));await Promise.all(d)}});break;case"drawGlyph":t.invokeFunction(async s=>{const o=s.get(xe),r=s.get(iC),a=s.get(Di),l=s.get(ms).getWorkspace().folders;if(l.length===0)return;const d=Hr.atlas,c=o.getValue("editor.fontFamily"),h=o.getValue("editor.fontSize"),u=new cE(h,c,tc().devicePixelRatio,Hr.decorationStyleCache);let g=await a.input({prompt:"Enter a character to draw (prefix with 0x for code point))"});if(!g)return;const p=g.match(/0x(?<codePoint>[0-9a-f]+)/i)?.groups?.codePoint;p!==void 0&&(g=String.fromCodePoint(parseInt(p,16)));const f=0,_=d.getGlyph(u,g,f,0,0);if(!_)return;const v=d.pages[_.pageIndex].source.getContext("2d")?.getImageData(_.x,_.y,_.w,_.h);if(!v)return;const C=new OffscreenCanvas(v.width,v.height);ZT(C.getContext("2d")).putImageData(v,0,0);const x=await C.convertToBlob({type:"image/png"}),I=De.joinPath(l[0].uri,`glyph_${g}_${f}_${h}px_${c.replaceAll(/[,\\\/\.'\s]/g,"_")}.png`);await r.writeFile(I,gd.wrap(new Uint8Array(await x.arrayBuffer())))})}}};k(_V);var Mi;(function(n){n.NoAutoFocus="noAutoFocus",n.FocusIfVisible="focusIfVisible",n.AutoFocusImmediately="autoFocusImmediately"})(Mi||(Mi={}));var vV=class extends M{constructor(){super({id:yN,label:L(1150,"Show or Focus Hover"),metadata:{description:L(1151,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[Mi.NoAutoFocus,Mi.FocusIfVisible,Mi.AutoFocusImmediately],enumDescriptions:[m(1147,"The hover will not automatically take focus."),m(1148,"The hover will take focus only if it is already visible."),m(1149,"The hover will automatically take focus when it appears.")],default:Mi.FocusIfVisible}}}}]},precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:et(2089,2087),weight:100}})}run(n,e,t){if(!e.hasModel())return;const i=xt.get(e);if(!i)return;const s=t?.focus;let o=Mi.FocusIfVisible;Object.values(Mi).includes(s)?o=s:typeof s=="boolean"&&s&&(o=Mi.AutoFocusImmediately);const r=l=>{const d=e.getPosition(),c=new y(d.lineNumber,d.column,d.lineNumber,d.column);i.showContentHover(c,1,2,l)},a=e.getOption(2)===2;i.isHoverVisible?o!==Mi.NoAutoFocus?i.focus():r(a):r(a||o===Mi.AutoFocusImmediately)}},bV=class extends M{constructor(){super({id:xN,label:L(1152,"Show Definition Preview Hover"),precondition:void 0,metadata:{description:L(1153,"Show the definition preview hover in the editor.")}})}run(n,e){const t=xt.get(e);if(!t)return;const i=e.getPosition();if(!i)return;const s=new y(i.lineNumber,i.column,i.lineNumber,i.column),o=tl.get(e);o&&o.startFindDefinitionFromCursor(i).then(()=>{t.showContentHover(s,1,2,!0)})}},CV=class extends M{constructor(){super({id:IN,label:L(1154,"Hide Hover"),alias:"Hide Content Hover",precondition:void 0})}run(n,e){xt.get(e)?.hideContentHover()}},SV=class extends M{constructor(){super({id:LN,label:L(1155,"Scroll Up Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:16,weight:100},metadata:{description:L(1156,"Scroll up the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.scrollUp()}},wV=class extends M{constructor(){super({id:DN,label:L(1157,"Scroll Down Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:18,weight:100},metadata:{description:L(1158,"Scroll down the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.scrollDown()}},yV=class extends M{constructor(){super({id:EN,label:L(1159,"Scroll Left Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:15,weight:100},metadata:{description:L(1160,"Scroll left the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.scrollLeft()}},xV=class extends M{constructor(){super({id:RN,label:L(1161,"Scroll Right Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:17,weight:100},metadata:{description:L(1162,"Scroll right the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.scrollRight()}},IV=class extends M{constructor(){super({id:TN,label:L(1163,"Page Up Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:L(1164,"Page up the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.pageUp()}},LV=class extends M{constructor(){super({id:NN,label:L(1165,"Page Down Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:L(1166,"Page down the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.pageDown()}},DV=class extends M{constructor(){super({id:kN,label:L(1167,"Go To Top Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:L(1168,"Go to the top of the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.goToTop()}},EV=class extends M{constructor(){super({id:PN,label:L(1169,"Go To Bottom Hover"),precondition:S.hoverFocused,kbOpts:{kbExpr:S.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:L(1170,"Go to the bottom of the editor hover.")}})}run(n,e){const t=xt.get(e);t&&t.goToBottom()}},RV=class extends M{constructor(){super({id:Xm,label:ON,alias:"Increase Hover Verbosity Level",precondition:S.hoverVisible})}run(n,e,t){const i=xt.get(e);if(!i)return;const s=t?.index!==void 0?t.index:i.focusedHoverPartIndex();i.updateHoverVerbosityLevel(li.Increase,s,t?.focus)}},TV=class extends M{constructor(){super({id:Ym,label:MN,alias:"Decrease Hover Verbosity Level",precondition:S.hoverVisible})}run(n,e,t){const i=xt.get(e);if(!i)return;const s=t?.index!==void 0?t.index:i.focusedHoverPartIndex();xt.get(e)?.updateHoverVerbosityLevel(li.Decrease,s,t?.focus)}},NV=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Zr=function(n,e){return function(t,i){e(t,i,n)}},pi=W,kV=class{constructor(n,e,t){this.owner=n,this.range=e,this.marker=t}isValidForHoverAnchor(n){return n.type===1&&this.range.startColumn<=n.range.startColumn&&this.range.endColumn>=n.range.endColumn}},DC={type:1,filter:{include:Te.QuickFix},triggerAction:$t.QuickFixHover},Cf=class{constructor(e,t,i,s,o,r){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=s,this._menuService=o,this._contextKeyService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),s=e.range;if(!i.isValidRange(e.range))return[];const o=s.startLineNumber,r=i.getLineMaxColumn(o),a=[];for(const l of t){const d=l.range.startLineNumber===o?l.range.startColumn:1,c=l.range.endLineNumber===o?l.range.endColumn:r,h=this._markerDecorationsService.getMarker(i.uri,l);if(!h)continue;const u=new y(e.range.startLineNumber,d,e.range.startLineNumber,c);a.push(new kV(this,u,h))}return a}renderHoverParts(e,t){if(!t.length)return new ho([]);const i=[];t.forEach(r=>{const a=this._renderMarkerHover(r);e.fragment.appendChild(a.hoverElement),i.push(a)});const s=t.length===1?t[0]:t.sort((r,a)=>vt.compare(r.marker.severity,a.marker.severity))[0],o=this._renderMarkerStatusbar(e,s);return new ho(i,o)}getAccessibleContent(e){return e.marker.message}_renderMarkerHover(e){const t=new A,i=pi("div.hover-row"),s=z(i,pi("div.marker.hover-contents")),{source:o,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(s);const d=z(s,pi("span"));if(d.style.whiteSpace="pre-wrap",d.innerText=r,o||a)if(a&&typeof a!="string"){const c=pi("span");if(o){const p=z(c,pi("span"));p.innerText=o}const h=z(c,pi("a.code-link"));h.setAttribute("href",a.target.toString(!0)),t.add(de(h,"click",p=>{this._openerService.open(a.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()}));const u=z(h,pi("span"));u.innerText=a.value;const g=z(s,c);g.style.opacity="0.6",g.style.paddingLeft="6px"}else{const c=z(s,pi("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(Qt(l))for(const{message:c,resource:h,startLineNumber:u,startColumn:g}of l){const p=z(s,pi("div"));p.style.marginTop="8px";const f=z(p,pi("a"));f.innerText=`${Vi(h)}(${u}, ${g}): `,f.style.cursor="pointer",t.add(de(f,"click",v=>{if(v.stopPropagation(),v.preventDefault(),this._openerService){const C={selection:{startLineNumber:u,startColumn:g}};this._openerService.open(h,{fromUserGesture:!0,editorOptions:C}).catch(we)}}));const _=z(p,pi("span"));_.innerText=c,this._editor.applyFontInfo(_)}return{hoverPart:e,hoverElement:i,dispose:()=>t.dispose()}}_renderMarkerStatusbar(e,t){const i=new A;if(t.marker.severity===vt.Error||t.marker.severity===vt.Warning||t.marker.severity===vt.Info){const r=po.get(this._editor);r&&e.statusBar.addAction({label:m(1180,"View Problem"),commandId:S_.ID,run:()=>{e.hide(),r.showAtMarker(t.marker),this._editor.focus()}})}const s=[];for(const[,r]of this._menuService.getMenuActions($.MarkerHoverStatusBar,this._contextKeyService))for(const a of r)a instanceof ro&&a.enabled&&s.push(a);const o=()=>{for(const r of s)e.statusBar.addAction({label:r.label,commandId:r.id,iconClass:r.class,run:()=>{e.hide(),this._editor.setSelection(y.lift(t.range)),r.run()}})};if(this._editor.getOption(104))o();else{const r=e.statusBar.append(pi("div"));this.recentMarkerCodeActionsInfo&&(_v.makeKey(this.recentMarkerCodeActionsInfo.marker)===_v.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||s.length===0&&(r.textContent=m(1181,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const a=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?O.None:gs(()=>r.textContent=m(1182,"Checking for quick fixes..."),200,i);r.textContent||(r.textContent=" ");const l=this.getCodeActions(t.marker);i.add(ke(()=>l.cancel())),l.then(d=>{if(a.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:d.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){d.dispose(),s.length===0?r.textContent=m(1183,"No quick fixes available"):r.style.display="none",o();return}r.style.display="none";let c=!1;i.add(ke(()=>{c||d.dispose()})),e.statusBar.addAction({label:m(1184,"Quick Fix..."),commandId:uy,run:u=>{c=!0;const g=co.get(this._editor),p=kt(u);e.hide(),g?.showCodeActions(DC,d,{x:p.left,y:p.top,width:p.width,height:p.height})}});const h=d.validActions.find(u=>u.action.isAI);h?e.statusBar.addAction({label:h.action.title,commandId:h.action.command?.id??"",iconClass:pe.asClassName(V.sparkle),run:()=>{co.get(this._editor)?.applyCodeAction(h,!1,!1,ns.FromProblemsHover)}}):o(),e.onContentsChanged()},we)}return i}getCodeActions(e){return pt(t=>Ko(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),DC,xn.None,t))}};Cf=NV([Zr(1,oE),Zr(2,_o),Zr(3,Z),Zr(4,Es),Zr(5,ve)],Cf);var PV=class{constructor(n){this._editor=n}computeSync(n){const e=o=>({value:o}),t=this._editor.getLineDecorations(n.lineNumber),i=[],s=n.laneOrLine==="lineNo";if(!t)return i;for(const o of t){const r=o.options.glyphMargin?.position??Zu.Center;if(!s&&r!==n.laneOrLine)continue;const a=s?o.options.lineNumberHoverMessage:o.options.glyphMarginHoverMessage;!a||Pa(a)||i.push(...QS(a).map(e))}return i}},OV=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},MV=function(n,e){return function(t,i){e(t,i,n)}},Sf,EC=W,wf=class extends O{static{Sf=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t){super(),this._markdownRendererService=t,this.allowEditorOverflow=!0,this._renderDisposeables=this._register(new A),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new ww(!0)),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._hoverOperation=this._register(new Hy(this._editor,new PV(this._editor))),this._register(this._hoverOperation.onResult(i=>this._withResult(i))),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(59)&&this._updateFont()})),this._register(bs(this._hover.containerDomNode,"mouseleave",i=>{this._onMouseLeave(i)})),this._editor.addOverlayWidget(this)}dispose(){this._hoverComputerOptions=void 0,this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Sf.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(e=>this._editor.applyFontInfo(e))}_onModelDecorationsChanged(){this._isVisible&&this._hoverComputerOptions&&(this._hoverOperation.cancel(),this._hoverOperation.start(0,this._hoverComputerOptions))}showsOrWillShow(e){const t=e.target;return t.type===2&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):t.type===3?(this._startShowingAt(t.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,t){this._hoverComputerOptions&&this._hoverComputerOptions.lineNumber===e&&this._hoverComputerOptions.laneOrLine===t||(this._hoverOperation.cancel(),this.hide(),this._hoverComputerOptions={lineNumber:e,laneOrLine:t},this._hoverOperation.start(0,this._hoverComputerOptions))}hide(){this._hoverComputerOptions=void 0,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e.value,this._messages.length>0?this._renderMessages(e.options.lineNumber,e.options.laneOrLine,this._messages):this.hide()}_renderMessages(e,t,i){this._renderDisposeables.clear();const s=document.createDocumentFragment();for(const o of i){const r=EC("div.hover-row.markdown-hover"),a=z(r,EC("div.hover-contents")),l=this._renderDisposeables.add(this._markdownRendererService.render(o.value,{context:this._editor}));a.appendChild(l.element),s.appendChild(r)}this._updateContents(s),this._showAt(e,t)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e,t){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const i=this._editor.getLayoutInfo(),s=this._editor.getTopForLineNumber(e),o=this._editor.getScrollTop(),r=this._editor.getOption(75),a=this._hover.containerDomNode.clientHeight,l=s-o-(a-r)/2,d=i.glyphMarginLeft+i.glyphMarginWidth+(t==="lineNo"?i.lineNumbersWidth:0),c=i.height-a,h=Math.max(0,Math.min(Math.round(l),c));if(this._editor.getOption(51)){const u=this._editor.getDomNode();if(u){const g=kt(u);this._hover.containerDomNode.style.position="fixed",this._hover.containerDomNode.style.left=`${g.left+d}px`,this._hover.containerDomNode.style.top=`${g.top+h}px`}}else this._hover.containerDomNode.style.position="absolute",this._hover.containerDomNode.style.left=`${d}px`,this._hover.containerDomNode.style.top=`${h}px`;this._hover.containerDomNode.style.zIndex="11"}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!gh(t,e.x,e.y))&&this.hide()}};wf=Sf=OV([MV(1,Ls)],wf);var AV=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},FV=function(n,e){return function(t,i){e(t,i,n)}},kc=class extends O{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new A,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new at(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){const e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled!=="off"?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this.hideGlyphHover()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideGlyphHover()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._isMouseOnGlyphHoverWidget(e)&&this.hideGlyphHover()}_isMouseOnGlyphHoverWidget(e){const t=this._glyphWidget?.getDomNode();return t?gh(t,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),!this._isMouseOnGlyphHoverWidget(e)&&this.hideGlyphHover())}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=this._isMouseOnGlyphHoverWidget(e);return t&&i}_onEditorMouseMove(e){if(!this.shouldKeepOpenOnEditorMouseMoveOrLeave){if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}this._reactToEditorMouseMove(e)}}_reactToEditorMouseMove(e){if(e){if(!Fy(this._hoverSettings.enabled,this._editor.getOption(86),e)){this.hideGlyphHover();return}this._tryShowHoverWidget(e)||this.hideGlyphHover()}}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){if(this._editor.hasModel()){if(this._hoverSettings.enabled==="onKeyboardModifier"&&Qm(this._editor.getOption(86),e)&&this._mouseMoveEvent){this._tryShowHoverWidget(this._mouseMoveEvent);return}NS(e.keyCode)||this.hideGlyphHover()}}hideGlyphHover(){this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(wf,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};kc=AV([FV(1,ie)],kc);var HV=class{},WV=class{},VV=class{};ce(xt.ID,xt,2);ce(kc.ID,kc,2);k(vV);k(bV);k(CV);k(SV);k(wV);k(yV);k(xV);k(IV);k(LV);k(DV);k(EV);k(RV);k(TV);Co.register(qa);Co.register(Cf);Re.registerCommand(yg,n=>{n.get(xe).updateValue("editor.hover.showLongLineWarning",!1)});al((n,e)=>{const t=n.getColor(Mm);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)}; }`))});bh.register(new HV);bh.register(new WV);bh.register(new VV);function vL(n,e,t,i){if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return[];const s=e.getLanguageConfiguration(n.getLanguageId()).indentRulesSupport;if(!s)return[];const o=new IR(n,s,e);for(i=Math.min(i,n.getLineCount());t<=i&&o.shouldIgnore(t);)t++;if(t>i-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=n.getOptions(),d=(f,_)=>(_=_||1,hr.shiftIndent(f,f.length+_,r,a,l)),c=(f,_)=>(_=_||1,hr.unshiftIndent(f,f.length+_,r,a,l)),h=[],u=n.getLineContent(t);let g=yt(u),p=g;o.shouldIncrease(t)?(p=d(p),g=d(g)):o.shouldIndentNextLine(t)&&(p=d(p)),t++;for(let f=t;f<=i;f++){if(BV(n,f))continue;const _=n.getLineContent(f),v=yt(_),C=p;o.shouldDecrease(f,C)&&(p=c(p),g=c(g)),v!==p&&h.push(Ge.replaceMove(new te(f,1,f,v.length+1),ZR(p,a,l))),!o.shouldIgnore(f)&&(o.shouldIncrease(f,C)?(g=d(g),p=g):o.shouldIndentNextLine(f,C)?p=d(p):p=g)}return h}function BV(n,e){return n.tokenization.isCheapToTokenize(e)?n.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var UV=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},zV=function(n,e){return function(t,i){e(t,i,n)}},jV=class bL extends M{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:bL.ID,label:L(1189,"Convert Indentation to Spaces"),precondition:S.writable,metadata:{description:L(1190,"Convert the tab indentation to spaces.")}})}run(e,t){const i=t.getModel();if(!i)return;const s=i.getOptions(),o=t.getSelection();if(!o)return;const r=new e3(o,s.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}},qV=class CL extends M{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:CL.ID,label:L(1191,"Convert Indentation to Tabs"),precondition:S.writable,metadata:{description:L(1192,"Convert the spaces indentation to tabs.")}})}run(e,t){const i=t.getModel();if(!i)return;const s=i.getOptions(),o=t.getSelection();if(!o)return;const r=new t3(o,s.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}},k_=class extends M{constructor(n,e,t){super(t),this.insertSpaces=n,this.displaySizeOnly=e}run(n,e){const t=n.get(Di),i=n.get(Kt),s=e.getModel();if(!s)return;const o=i.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map(d=>({id:d.toString(),label:d.toString(),description:d===o.tabSize&&d===r.tabSize?m(1185,"Configured Tab Size"):d===o.tabSize?m(1186,"Default Tab Size"):d===r.tabSize?m(1187,"Current Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{t.pick(a,{placeHolder:m(1188,"Select Tab Size for Current File"),activeItem:a[l]}).then(d=>{if(d&&s&&!s.isDisposed()){const c=parseInt(d.label,10);this.displaySizeOnly?s.updateOptions({tabSize:c}):s.updateOptions({tabSize:c,indentSize:c,insertSpaces:this.insertSpaces})}})},50)}},$V=class SL extends k_{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:SL.ID,label:L(1193,"Indent Using Tabs"),precondition:void 0,metadata:{description:L(1194,"Use indentation with tabs.")}})}},KV=class wL extends k_{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:wL.ID,label:L(1195,"Indent Using Spaces"),precondition:void 0,metadata:{description:L(1196,"Use indentation with spaces.")}})}},GV=class yL extends k_{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:yL.ID,label:L(1197,"Change Tab Display Size"),precondition:void 0,metadata:{description:L(1198,"Change the space size equivalent of the tab.")}})}},ZV=class xL extends M{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:xL.ID,label:L(1199,"Detect Indentation from Content"),precondition:void 0,metadata:{description:L(1200,"Detect the indentation from content.")}})}run(e,t){const i=e.get(Kt),s=t.getModel();if(!s)return;const o=i.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget);s.detectIndentation(o.insertSpaces,o.tabSize)}},XV=class extends M{constructor(){super({id:"editor.action.reindentlines",label:L(1201,"Reindent Lines"),precondition:S.writable,metadata:{description:L(1202,"Reindent the lines of the editor.")},canTriggerInlineEdits:!0})}run(n,e){const t=n.get(ct),i=e.getModel();if(!i)return;const s=vL(i,t,1,i.getLineCount());s.length>0&&(e.pushUndoStop(),e.executeEdits(this.id,s),e.pushUndoStop())}},YV=class extends M{constructor(){super({id:"editor.action.reindentselectedlines",label:L(1203,"Reindent Selected Lines"),precondition:S.writable,metadata:{description:L(1204,"Reindent the selected lines of the editor.")},canTriggerInlineEdits:!0})}run(n,e){const t=n.get(ct),i=e.getModel();if(!i)return;const s=e.getSelections();if(s===null)return;const o=[];for(const r of s){let a=r.startLineNumber,l=r.endLineNumber;if(a!==l&&r.endColumn===1&&l--,a===1){if(a===l)continue}else a--;const d=vL(i,t,a,l);o.push(...d)}o.length>0&&(e.pushUndoStop(),e.executeEdits(this.id,o),e.pushUndoStop())}},JV=class{constructor(n,e){this._initialSelection=e,this._edits=[],this._selectionId=null;for(const t of n)t.range&&typeof t.text=="string"&&this._edits.push(t)}getEditOperations(n,e){for(const i of this._edits)e.addEditOperation(y.lift(i.range),i.text);let t=!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?(t=!0,this._selectionId=e.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(t=!0,this._selectionId=e.trackSelection(this._initialSelection,!1))),t||(this._selectionId=e.trackSelection(this._initialSelection))}computeCursorState(n,e){return e.getTrackedSelection(this._selectionId)}},Pc=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new A,this.callOnModel=new A,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(17)||this.editor.getOption(16)<4)&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||this.rangeContainsOnlyWhitespaceCharacters(i,e)||!this.editor.getOption(18)&&QV(i,e)||!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const s=this.editor.getOption(16),{tabSize:o,indentSize:r,insertSpaces:a}=i.getOptions(),l=[],d={shiftIndent:g=>hr.shiftIndent(g,g.length+1,o,r,a),unshiftIndent:g=>hr.unshiftIndent(g,g.length+1,o,r,a)};let c=e.startLineNumber,h=i.getLineContent(c);if(!/\S/.test(h.substring(0,e.startColumn-1))){const g=Ca(s,i,i.getLanguageId(),c,d,this._languageConfigurationService);if(g!==null){const p=yt(h),f=zt(g,o);if(f!==zt(p,o)){const _=ya(f,o,a);l.push({range:new y(c,1,c,p.length+1),text:_}),h=_+h.substring(p.length)}else{const _=Dw(i,c,this._languageConfigurationService);if(_===0||_===8)return}}}const u=c;for(;c<e.endLineNumber;){if(!/\S/.test(i.getLineContent(c+1))){c++;continue}break}if(c!==e.endLineNumber){const g=Ca(s,{tokenization:{getLineTokens:p=>i.tokenization.getLineTokens(p),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(p,f)=>i.getLanguageIdAtPosition(p,f)},getLineContent:p=>p===u?h:i.getLineContent(p)},i.getLanguageId(),c+1,d,this._languageConfigurationService);if(g!==null){const p=zt(g,o),f=zt(yt(i.getLineContent(c+1)),o);if(p!==f){const _=p-f;for(let v=c+1;v<=e.endLineNumber;v++){const C=i.getLineContent(v),x=yt(C),I=zt(x,o)+_,b=ya(I,o,a);b!==x&&l.push({range:new y(v,1,v,x.length+1),text:b})}}}}if(l.length>0){this.editor.pushUndoStop();const g=new JV(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",g),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){const i=o=>o.trim().length===0;let s=!0;if(t.startLineNumber===t.endLineNumber)s=i(e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1));else for(let o=t.startLineNumber;o<=t.endLineNumber;o++){const r=e.getLineContent(o);if(o===t.startLineNumber?s=i(r.substring(t.startColumn-1)):o===t.endLineNumber?s=i(r.substring(0,t.endColumn-1)):s=e.getLineFirstNonWhitespaceColumn(o)===0,!s)break}return s}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};Pc=UV([zV(1,ct)],Pc);function QV(n,e){const t=i=>cT(n,i)===2;return t(e.getStartPosition())||t(e.getEndPosition())}function IL(n,e,t,i){if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s="";for(let r=0;r<t;r++)s+=" ";const o=new RegExp(s,"gi");for(let r=1,a=n.getLineCount();r<=a;r++){let l=n.getLineFirstNonWhitespaceColumn(r);if(l===0&&(l=n.getLineMaxColumn(r)),l===1)continue;const d=new y(r,1,r,l),c=n.getValueInRange(d),h=i?c.replace(/\t/gi,s):c.replace(o," ");e.addEditOperation(d,h)}}var e3=class{constructor(n,e){this.selection=n,this.tabSize=e,this.selectionId=null}getEditOperations(n,e){this.selectionId=e.trackSelection(this.selection),IL(n,e,this.tabSize,!0)}computeCursorState(n,e){return e.getTrackedSelection(this.selectionId)}},t3=class{constructor(n,e){this.selection=n,this.tabSize=e,this.selectionId=null}getEditOperations(n,e){this.selectionId=e.trackSelection(this.selection),IL(n,e,this.tabSize,!1)}computeCursorState(n,e){return e.getTrackedSelection(this.selectionId)}};ce(Pc.ID,Pc,2);k(jV);k(qV);k($V);k(KV);k(GV);k(ZV);k(XV);k(YV);ce(Ka.ID,Ka,1);Co.register(gc);var i3=class{constructor(n,e,t){this._editRange=n,this._originalSelection=e,this._text=t}getEditOperations(n,e){e.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(n,e){const t=e.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new te(t.endLineNumber,Math.min(this._originalSelection.positionColumn,t.endColumn),t.endLineNumber,Math.min(this._originalSelection.positionColumn,t.endColumn)):new te(t.endLineNumber,t.endColumn-this._text.length,t.endLineNumber,t.endColumn)}},n3=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},s3=function(n,e){return function(t,i){e(t,i,n)}},Fd,vr=class{static{Fd=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(Fd.ID)}static{this.DECORATION=se.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();const i=this.editor.getSelection(),s=this.editor.getModel();if(!s||!i)return;let o=i;if(o.startLineNumber!==o.endLineNumber)return;const r=new vw(this.editor,5),a=s.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=pt(l=>this.editorWorkerService.navigateValueSet(a,o,t)),this.currentRequest.then(l=>{if(!l||!l.range||!l.value||!r.validate(this.editor))return;const d=y.lift(l.range);let c=l.range;const h=l.value.length-(o.endColumn-o.startColumn);c={startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.startColumn+l.value.length},h>1&&(o=new te(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+h-1));const u=new i3(d,o,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,u),this.editor.pushUndoStop(),this.decorations.set([{range:c,options:Fd.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=Xc(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(we)}).catch(we)):Promise.resolve(void 0)}};vr=Fd=n3([s3(1,An)],vr);var o3=class extends M{constructor(){super({id:"editor.action.inPlaceReplace.up",label:L(1286,"Replace with Previous Value"),precondition:S.writable,kbOpts:{kbExpr:S.editorTextFocus,primary:3159,weight:100}})}run(n,e){const t=vr.get(e);return t?t.run(this.id,!1):Promise.resolve(void 0)}},r3=class extends M{constructor(){super({id:"editor.action.inPlaceReplace.down",label:L(1287,"Replace with Next Value"),precondition:S.writable,kbOpts:{kbExpr:S.editorTextFocus,primary:3161,weight:100}})}run(n,e){const t=vr.get(e);return t?t.run(this.id,!0):Promise.resolve(void 0)}};ce(vr.ID,vr,4);k(o3);k(r3);var a3=class{constructor(n){this._selection=n,this._selectionId=null}getEditOperations(n,e){const t=l3(n);t&&e.addEditOperation(t.range,t.text),this._selectionId=e.trackSelection(this._selection)}computeCursorState(n,e){return e.getTrackedSelection(this._selectionId)}};function l3(n){const e=n.getLineCount(),t=n.getLineContent(e),i=ba(t)===-1;if(!(!e||i))return Ge.insert(new B(e,n.getLineMaxColumn(e)),n.getEOL())}var d3=class LL extends M{static{this.ID="editor.action.insertFinalNewLine"}constructor(){super({id:LL.ID,label:L(1288,"Insert Final New Line"),precondition:S.writable})}run(e,t,i){const s=t.getSelection();if(s===null)return;const o=new a3(s);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}};k(d3);var c3=class extends M{constructor(){super({id:"expandLineSelection",label:L(1289,"Expand Line Selection"),precondition:void 0,kbOpts:{weight:0,kbExpr:S.textInputFocus,primary:2090}})}run(n,e,t){if(t=t||{},!e.hasModel())return;const i=e._getViewModel();i.model.pushStackElement(),i.setCursorStates(t.source,3,Im.expandLineSelection(i,i.getCursorStates())),i.revealAllCursors(t.source,!0)}};k(c3);var h3=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},od=function(n,e){return function(t,i){e(t,i,n)}},Hd,DL=new oe("LinkedEditingInputVisible",!1),u3="linked-editing-decoration",br=class extends O{static{Hd=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=se.register({description:"linked-editing",stickiness:0,className:u3})}static get(e){return e.getContribution(Hd.ID)}constructor(e,t,i,s,o){super(),this.languageConfigurationService=s,this._syncRangesToken=0,this._localToDispose=this._register(new A),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=DL.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 A),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(r=>{(r.hasChanged(78)||r.hasChanged(106))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=t!==null&&(this._editor.getOption(78)||this._editor.getOption(106))&&this._providers.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||t===null))return;this._localToDispose.add(qe.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const s=new _s(this._debounceInformation.get(t)),o=()=>{this._rangeUpdateTriggerPromise=s.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},r=new _s(0),a=l=>{this._rangeSyncTriggerPromise=r.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){const d=this._currentDecorations.getRange(0);if(d&&l.changes.every(c=>d.intersectRanges(c.range))){a(this._syncRangesToken);return}}o()})),this._localToDispose.add({dispose:()=>{s.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const s=t.getValueInRange(i);if(this._currentWordPattern){const r=s.match(this._currentWordPattern);if((r?r[0].length:0)!==s.length)return this.clearRanges()}const o=[];for(let r=1,a=this._currentDecorations.length;r<a;r++){const l=this._currentDecorations.getRange(r);if(l)if(l.startLineNumber!==l.endLineNumber)o.push({range:l,text:s});else{let d=t.getValueInRange(l),c=s,h=l.startColumn,u=l.endColumn;const g=Sr(d,c);h+=g,d=d.substr(g),c=c.substr(g);const p=Fm(d,c);u-=p,d=d.substr(0,d.length-p),c=c.substr(0,c.length-p),(h!==u||c.length!==0)&&o.push({range:new y(l.startLineNumber,h,l.endLineNumber,u),text:c})}}if(o.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const r=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(r)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequestCts&&(this._currentRequestCts.cancel(),this._currentRequestCts=null,this._currentRequestPosition=null)}async updateRanges(e=!1){if(!this._editor.hasModel()){this.clearRanges();return}const t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}const i=this._editor.getModel(),s=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const r=this._currentDecorations.getRange(0);if(r&&r.containsPosition(t))return}}this._currentRequestPosition?.equals(t)||this._currentDecorations.getRange(0)?.containsPosition(t)||this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=s;const o=this._currentRequestCts=new st;try{const r=new hi(!1),a=await EL(this._providers,i,t,o.token);if(this._debounceInformation.update(i,r.elapsed()),o!==this._currentRequestCts||(this._currentRequestCts=null,s!==i.getVersionId()))return;let l=[];a?.ranges&&(l=a.ranges),this._currentWordPattern=a?.wordPattern||this._languageWordPattern;let d=!1;for(let h=0,u=l.length;h<u;h++)if(y.containsPosition(l[h],t)){if(d=!0,h!==0){const g=l[h];l.splice(h,1),l.unshift(g)}break}if(!d){this.clearRanges();return}const c=l.map(h=>({range:h,options:Hd.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(c),this._syncRangesToken++}catch(r){Hn(r)||we(r),(this._currentRequestCts===o||!this._currentRequestCts)&&this.clearRanges()}}};br=Hd=h3([od(1,ve),od(2,Z),od(3,ct),od(4,Ri)],br);var g3=class extends M{constructor(){super({id:"editor.action.linkedEditing",label:L(1322,"Start Linked Editing"),precondition:N.and(S.writable,S.hasRenameProvider),kbOpts:{kbExpr:S.editorTextFocus,primary:3132,weight:100}})}runCommand(n,e){const t=n.get($e),[i,s]=Array.isArray(e)&&e||[void 0,void 0];return De.isUri(i)&&B.isIPosition(s)?t.openCodeEditor({resource:i},t.getActiveCodeEditor()).then(o=>{o&&(o.setPosition(s),o.invokeWithinContext(r=>(this.reportTelemetry(r,o),this.run(r,o))))},we):super.runCommand(n,e)}run(n,e){const t=br.get(e);return t?Promise.resolve(t.updateRanges(!0)):Promise.resolve()}},p3=Mt.bindToContribution(br.get);G(new p3({id:"cancelLinkedEditingInput",precondition:DL,handler:n=>n.clearRanges(),kbOpts:{kbExpr:S.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function EL(n,e,t,i){const s=n.ordered(e);return gm(s.map(o=>async()=>{try{return await o.provideLinkedEditingRanges(e,t,i)}catch(r){tt(r);return}}),o=>!!o&&Qt(o?.ranges))}H("editor.linkedEditingBackground",{dark:me.fromHex("#f00").transparent(.3),light:me.fromHex("#f00").transparent(.3),hcDark:me.fromHex("#f00").transparent(.3),hcLight:me.white},m(1321,"Background color when the editor auto renames on type."));Ut("_executeLinkedEditingProvider",(n,e,t)=>{const{linkedEditingRangeProvider:i}=n.get(Z);return EL(i,e,t,ue.None)});ce(br.ID,br,1);k(g3);var f3=class{constructor(n,e){this._link=n,this._provider=e}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}async resolve(n){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,n)).then(e=>(this._link=e||this._link,this._link.url?this.resolve(n):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}},RC=class yf{static{this.Empty=new yf([])}constructor(e){this._disposables=new A;let t=[];for(const[i,s]of e){const o=i.links.map(r=>new f3(r,s));t=yf._union(t,o),Lm(i)&&(this._disposables??=new A,this._disposables.add(i))}this.links=t}dispose(){this._disposables?.dispose(),this.links.length=0}static _union(e,t){const i=[];let s,o,r,a;for(s=0,r=0,o=e.length,a=t.length;s<o&&r<a;){const l=e[s],d=t[r];if(y.areIntersectingOrTouching(l.range,d.range)){s++;continue}y.compareRangesUsingStarts(l.range,d.range)<0?(i.push(l),s++):(i.push(d),r++)}for(;s<o;s++)i.push(e[s]);for(;r<a;r++)i.push(t[r]);return i}};async function RL(n,e,t){const i=[],s=n.ordered(e).reverse().map(async(r,a)=>{try{const l=await r.provideLinks(e,t);l&&(i[a]=[l,r])}catch(l){tt(l)}});await Promise.all(s);let o=new RC(Ns(i));return t.isCancellationRequested&&(o.dispose(),o=RC.Empty),o}Re.registerCommand("_executeLinkProvider",async(n,...e)=>{let[t,i]=e;Se(t instanceof De),typeof i!="number"&&(i=0);const{linkProvider:s}=n.get(Z),o=n.get(Kt).getModel(t);if(!o)return[];const r=await RL(s,o,ue.None);if(!r)return[];for(let l=0;l<Math.min(i,r.links.length);l++)await r.links[l].resolve(ue.None);const a=r.links.slice(0);return r.dispose(),a});var m3=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},rd=function(n,e){return function(t,i){e(t,i,n)}},xf,il=class extends O{static{xf=this}static{this.ID="editor.linkDetector"}static get(e){return e.getContribution(xf.ID)}constructor(e,t,i,s,o){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=s,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=o.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new at(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new fh(e));this._register(r.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(r.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(r.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(79)&&(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)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(79))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=pt(t=>RL(this.providers,e,t));try{const t=new hi(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){we(t)}finally{this.computePromise=null}}}updateDecorations(e){const t=this.editor.getOption(86)==="altKey",i=[],s=Object.keys(this.currentOccurrences);for(const r of s){const a=this.currentOccurrences[r];i.push(a.decorationId)}const o=[];if(e)for(const r of e)o.push(NC.decoration(r,t));this.editor.changeDecorations(r=>{const a=r.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,d=a.length;l<d;l++){const c=new NC(e[l],a[l]);this.currentOccurrences[c.decorationId]=c}})}_onEditorMouseMove(e,t){const i=this.editor.getOption(86)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const s=this.getLinkOccurrence(e.target.position);s&&this.editor.changeDecorations(o=>{s.activate(o,i),this.activeLinkDecorationId=s.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(86)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:s}=e;s.resolve(ue.None).then(o=>{if(typeof o=="string"&&this.editor.hasModel()){const r=this.editor.getModel().uri;if(r.scheme===_t.file&&o.startsWith(`${_t.file}:`)){const a=De.parse(o);if(a.scheme===_t.file){const l=KD(a);let d=null;l.startsWith("/./")||l.startsWith("\\.\\")?d=`.${l.substr(1)}`:(l.startsWith("//./")||l.startsWith("\\\\.\\"))&&(d=`.${l.substr(2)}`),d&&(o=AR(r,d))}}}return this.openerService.open(o,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},o=>{const r=o instanceof Error?o.message:o;r==="invalid"?this.notificationService.warn(m(1323,"Failed to open this link because it is not well-formed: {0}",s.url.toString())):r==="missing"?this.notificationService.warn(m(1324,"Failed to open this link because its target is missing.")):we(o)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const s=this.currentOccurrences[i.id];if(s)return s}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey||e.isMiddleClick&&e.mouseMiddleClickAction==="openLink"))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};il=xf=m3([rd(1,_o),rd(2,Et),rd(3,Z),rd(4,Ri)],il);var TC={general:se.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:se.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},NC=class Wd{static decoration(e,t){return{range:e.range,options:Wd._getOptions(e,t,!1)}}static _getOptions(e,t,i){const s={...i?TC.active:TC.general};return s.hoverMessage=_3(e,t),s}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,Wd._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,Wd._getOptions(this.link,t,!1))}};function _3(n,e){const t=n.url&&/^command:/i.test(n.url.toString()),i=n.tooltip?n.tooltip:t?m(1325,"Execute command"):m(1326,"Follow link"),s=e?Pn?m(1327,"cmd + click"):m(1328,"ctrl + click"):Pn?m(1329,"option + click"):m(1330,"alt + click");if(n.url){let o="";if(/^command:/i.test(n.url.toString())){const r=n.url.toString().match(/^command:([^?#]+)/);if(r){const a=r[1];o=m(1331,"Execute command {0}",a)}}return new Lt("",!0).appendLink(n.url.toString(!0).replace(/ /g,"%20"),i,o).appendMarkdown(` (${s})`)}else return new Lt().appendText(`${i} (${s})`)}var v3=class extends M{constructor(){super({id:"editor.action.openLink",label:L(1332,"Open Link"),precondition:void 0})}run(n,e){const t=il.get(e);if(!t||!e.hasModel())return;const i=e.getSelections();for(const s of i){const o=t.getLinkOccurrence(s.getEndPosition());o&&t.openLinkOccurrence(o,!1)}}};ce(il.ID,il,1);k(v3);var kC=class extends O{static{this.ID="editor.contrib.longLinesHelper"}constructor(n){super(),this._editor=n,this._register(this._editor.onMouseDown(e=>{const t=this._editor.getOption(133);t>=0&&e.target.type===6&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};ce(kC.ID,kC,2);var PC=class extends O{static{this.ID="editor.contrib.middleScroll"}constructor(n){super(),this._editor=n;const e=Be(this._editor),t=e.getOption(171);this._register(he(i=>{if(!t.read(i))return;const s=e.domNode.read(i);if(!s)return;const o=i.store.add($R("scrollingSession",void 0));i.store.add(this._editor.onMouseDown(a=>{if(o.read(void 0)){o.set(void 0,void 0);return}if(!a.event.middleButton)return;a.event.stopPropagation(),a.event.preventDefault();const l=new A,d=new xi(a.event.posx,a.event.posy),c=b3(Ht(s),d,l).map(g=>g.subtract(d).withThreshold(5)),h=s.getBoundingClientRect(),u=new xi(d.x-h.left,d.y-h.top);o.set({mouseDeltaAfterThreshold:c,initialMousePosInEditor:u,didScroll:!1,dispose:()=>l.dispose()},void 0),l.add(this._editor.onMouseUp(g=>{const p=o.read(void 0);p&&p.didScroll&&o.set(void 0,void 0)})),l.add(this._editor.onKeyDown(g=>{o.set(void 0,void 0)}))})),i.store.add(he(a=>{const l=o.read(a);if(!l)return;let d=Date.now();a.store.add(he(h=>{Ep.instance.invalidateOnNextAnimationFrame(h);const u=Date.now(),g=u-d;d=u;const p=l.mouseDeltaAfterThreshold.read(void 0),f=g/32,_=p.scale(f),v=new xi(this._editor.getScrollLeft(),this._editor.getScrollTop());this._editor.setScrollPosition(C3(v.add(_))),_.isZero()||(l.didScroll=!0)}));const c=T(h=>{const u=l.mouseDeltaAfterThreshold.read(h);let g="";return g+=u.y<0?"n":u.y>0?"s":"",g+=u.x<0?"w":u.x>0?"e":"",g});a.store.add(he(h=>{s.setAttribute("data-scroll-direction",c.read(h))}))}));const r=i.store.add(q.div({class:["scroll-editor-on-middle-click-dot",o.map(a=>a?"":"hidden")],style:{left:o.map(a=>a?a.initialMousePosInEditor.x:0),top:o.map(a=>a?a.initialMousePosInEditor.y:0)}}).toDisposableLiveElement());i.store.add(Q0(s,r.element)),i.store.add(he(a=>{const l=o.read(a);s.classList.toggle("scroll-editor-on-middle-click-editor",!!l)}))}))}};function b3(n,e,t){const i=Ne("pos",e);return t.add(de(n,"mousemove",s=>{i.set(new xi(s.pageX,s.pageY),void 0)})),i}function C3(n){return{scrollLeft:n.x,scrollTop:n.y}}ce(PC.ID,PC,2);var S3=H("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},m(1615,"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);H("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},m(1616,"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);H("editor.wordHighlightTextBackground",S3,m(1617,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);var w3=H("editor.wordHighlightBorder",{light:null,dark:null,hcDark:to,hcLight:to},m(1618,"Border color of a symbol during read-access, like reading a variable."));H("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:to,hcLight:to},m(1619,"Border color of a symbol during write-access, like writing to a variable."));H("editor.wordHighlightTextBorder",w3,m(1620,"Border color of a textual occurrence for a symbol."));var y3=H("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",m(1621,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),x3=H("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",m(1622,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),I3=H("editorOverviewRuler.wordHighlightTextForeground",dw,m(1623,"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),L3=se.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:it(x3),position:nn.Center},minimap:{color:it(Vc),position:1}}),D3=se.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:it(I3),position:nn.Center},minimap:{color:it(Vc),position:1}}),E3=se.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:it(dw),position:nn.Center},minimap:{color:it(Vc),position:1}}),R3=se.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),T3=se.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:it(y3),position:nn.Center},minimap:{color:it(Vc),position:1}});function N3(n){return n===Kd.Write?L3:n===Kd.Text?D3:T3}function k3(n){return n?R3:E3}al((n,e)=>{const t=n.getColor(fE);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});var P3=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},O3=function(n,e){return function(t,i){e(t,i,n)}},If;function Ps(n,e){const t=e.filter(i=>!n.find(s=>s.equals(i)));if(t.length>=1){const i=t.map(o=>`line ${o.viewState.position.lineNumber} column ${o.viewState.position.column}`).join(", "),s=t.length===1?m(1334,"Cursor added: {0}",i):m(1335,"Cursors added: {0}",i);vs(s)}}var M3=class extends M{constructor(){super({id:"editor.action.insertCursorAbove",label:L(1344,"Add Cursor Above"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:$.MenubarSelectionMenu,group:"3_multi",title:m(1336,"&&Add Cursor Above"),order:2}})}run(n,e,t){if(!e.hasModel())return;let i=!0;t&&t.logicalLine===!1&&(i=!1);const s=e._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=s.getCursorStates();s.setCursorStates(t.source,3,Im.addCursorUp(s,o,i)),s.revealTopMostCursor(t.source),Ps(o,s.getCursorStates())}},A3=class extends M{constructor(){super({id:"editor.action.insertCursorBelow",label:L(1345,"Add Cursor Below"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:$.MenubarSelectionMenu,group:"3_multi",title:m(1337,"A&&dd Cursor Below"),order:3}})}run(n,e,t){if(!e.hasModel())return;let i=!0;t&&t.logicalLine===!1&&(i=!1);const s=e._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=s.getCursorStates();s.setCursorStates(t.source,3,Im.addCursorDown(s,o,i)),s.revealBottomMostCursor(t.source),Ps(o,s.getCursorStates())}},F3=class extends M{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:L(1346,"Add Cursors to Line Ends"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:$.MenubarSelectionMenu,group:"3_multi",title:m(1338,"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(n,e,t){if(!n.isEmpty()){for(let i=n.startLineNumber;i<n.endLineNumber;i++){const s=e.getLineMaxColumn(i);t.push(new te(i,s,i,s))}n.endColumn>1&&t.push(new te(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn))}}run(n,e){if(!e.hasModel())return;const t=e.getModel(),i=e.getSelections(),s=e._getViewModel(),o=s.getCursorStates(),r=[];i.forEach(a=>this.getCursorsForSelection(a,t,r)),r.length>0&&e.setSelections(r),Ps(o,s.getCursorStates())}},H3=class extends M{constructor(){super({id:"editor.action.addCursorsToBottom",label:L(1347,"Add Cursors to Bottom"),precondition:void 0})}run(n,e){if(!e.hasModel())return;const t=e.getSelections(),i=e.getModel().getLineCount(),s=[];for(let a=t[0].startLineNumber;a<=i;a++)s.push(new te(a,t[0].startColumn,a,t[0].endColumn));const o=e._getViewModel(),r=o.getCursorStates();s.length>0&&e.setSelections(s),Ps(r,o.getCursorStates())}},W3=class extends M{constructor(){super({id:"editor.action.addCursorsToTop",label:L(1348,"Add Cursors to Top"),precondition:void 0})}run(n,e){if(!e.hasModel())return;const t=e.getSelections(),i=[];for(let r=t[0].startLineNumber;r>=1;r--)i.push(new te(r,t[0].startColumn,r,t[0].endColumn));const s=e._getViewModel(),o=s.getCursorStates();i.length>0&&e.setSelections(i),Ps(o,s.getCursorStates())}},ad=class{constructor(n,e,t){this.selections=n,this.revealRange=e,this.revealScrollType=t}},TL=class Lf{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new Lf(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let s=!1,o,r;const a=e.getSelections();a.length===1&&a[0].isEmpty()?(s=!0,o=!0,r=!0):(o=i.wholeWord,r=i.matchCase);const l=e.getSelection();let d,c=null;if(l.isEmpty()){const h=e.getConfiguredWordAtPosition(l.getStartPosition());if(!h)return null;d=h.word,c=new te(l.startLineNumber,h.startColumn,l.startLineNumber,h.endColumn)}else d=e.getModel().getValueInRange(l).replace(/\r\n/g,`
|
|
61
61
|
`);return new Lf(e,t,s,d,o,r,c)}constructor(e,t,i,s,o,r,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=s,this.wholeWord=o,this.matchCase=r,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new ad(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new ad(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new te(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new ad(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new ad(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return i?new te(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824)}},Oc=class NL extends O{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(NL.ID)}constructor(e){super(),this._sessionDispose=this._register(new A),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=TL.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(s=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(s=>{(s.matchCase||s.wholeWord)&&this._endSession()}))}}_endSession(){this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController&&this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1),this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new te(t.startLineNumber,i.startColumn,t.startLineNumber,i.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){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!kL(this._editor.getModel(),t,i)){const s=this._editor.getModel(),o=[];for(let r=0,a=t.length;r<a;r++)o[r]=this._expandEmptyToWord(s,t[r]);this._editor.setSelections(o);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;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){const s=this._editor.getModel();i.searchScope?t=s.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,1073741824):t=s.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(148):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const s=this._editor.getSelection();for(let o=0,r=t.length;o<r;o++){const a=t[o];if(a.range.intersectRanges(s)){t[o]=t[0],t[0]=a;break}}this._setSelections(t.map(o=>new te(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)))}}},kr=class extends M{run(n,e){const t=Oc.get(e);if(!t)return;const i=e._getViewModel();if(i){const s=i.getCursorStates(),o=Bt.get(e);if(o)this._run(t,o);else{const r=n.get(ie).createInstance(Bt,e);this._run(t,r),r.dispose()}Ps(s,i.getCursorStates())}}},V3=class extends kr{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:L(1349,"Add Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:S.focus,primary:2082,weight:100},menuOpts:{menuId:$.MenubarSelectionMenu,group:"3_multi",title:m(1339,"Add &&Next Occurrence"),order:5}})}_run(n,e){n.addSelectionToNextFindMatch(e)}},B3=class extends kr{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:L(1350,"Add Selection to Previous Find Match"),precondition:void 0,menuOpts:{menuId:$.MenubarSelectionMenu,group:"3_multi",title:m(1340,"Add P&&revious Occurrence"),order:6}})}_run(n,e){n.addSelectionToPreviousFindMatch(e)}},U3=class extends kr{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:L(1351,"Move Last Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:S.focus,primary:et(2089,2082),weight:100}})}_run(n,e){n.moveSelectionToNextFindMatch(e)}},z3=class extends kr{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:L(1352,"Move Last Selection to Previous Find Match"),precondition:void 0})}_run(n,e){n.moveSelectionToPreviousFindMatch(e)}},j3=class extends kr{constructor(){super({id:"editor.action.selectHighlights",label:L(1353,"Select All Occurrences of Find Match"),precondition:void 0,kbOpts:{kbExpr:S.focus,primary:3114,weight:100},menuOpts:{menuId:$.MenubarSelectionMenu,group:"3_multi",title:m(1341,"Select All &&Occurrences"),order:7}})}_run(n,e){n.selectAll(e)}},q3=class extends kr{constructor(){super({id:"editor.action.changeAll",label:L(1354,"Change All Occurrences"),precondition:N.and(S.writable,S.editorTextFocus),kbOpts:{kbExpr:S.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(n,e){n.selectAll(e)}},$3=class{constructor(n,e,t,i,s){this._model=n,this._searchText=e,this._matchCase=t,this._wordSeparators=i,this._cachedFindMatches=null,this._modelVersionId=this._model.getVersionId(),s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(n=>n.range),this._cachedFindMatches.sort(y.compareRangesUsingStarts)),this._cachedFindMatches}},Mc=class extends O{static{If=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new at(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(s=>{this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123)})),this._register(e.onDidChangeCursorSelection(s=>{this._isEnabled&&(s.selection.isEmpty()?s.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(s=>{this._setState(null)})),this._register(e.onDidChangeModelContent(s=>{this._isEnabled&&this.updateSoon.schedule()}));const i=Bt.get(e);i&&this._register(i.getState().onFindReplaceStateChange(s=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(If._createState(this.state,this._isEnabled,this._isEnabledMultiline,this._maxLength,this.editor))}static _createState(e,t,i,s,o){if(!t||!o.hasModel())return null;if(!i){const h=o.getSelection();if(h.startLineNumber!==h.endLineNumber)return null}const r=Oc.get(o);if(!r)return null;const a=Bt.get(o);if(!a)return null;let l=r.getSession(a);if(!l){const h=o.getSelections();if(h.length>1){const u=a.getState().matchCase;if(!kL(o.getModel(),h,u))return null}l=TL.create(o,a)}if(!l||l.currentMatch||/^[ \t]+$/.test(l.searchText)||s>0&&l.searchText.length>s)return null;const d=a.getState(),c=d.matchCase;if(d.isRevealed){let h=d.searchString;c||(h=h.toLowerCase());let u=l.searchText;if(c||(u=u.toLowerCase()),h===u&&l.matchCase===d.matchCase&&l.wholeWord===d.wholeWord&&!d.isRegex)return null}return new $3(o.getModel(),l.searchText,l.matchCase,l.wholeWord?o.getOption(148):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),s=this.editor.getSelections();s.sort(y.compareRangesUsingStarts);const o=[];for(let d=0,c=0,h=i.length,u=s.length;d<h;){const g=i[d];if(c>=u)o.push(g),d++;else{const p=y.compareRangesUsingStarts(g,s[c]);p<0?((s[c].isEmpty()||!y.areIntersecting(g,s[c]))&&o.push(g),d++):(p>0||d++,c++)}}const r=this.editor.getOption(90)!=="off",a=this._languageFeaturesService.documentHighlightProvider.has(t)&&r,l=o.map(d=>({range:d,options:k3(a)}));this._decorations.set(l)}dispose(){this._setState(null),super.dispose()}};Mc=If=P3([O3(1,Z)],Mc);function kL(n,e,t){const i=OC(n,e[0],!t);for(let s=1,o=e.length;s<o;s++){const r=e[s];if(r.isEmpty()||i!==OC(n,r,!t))return!1}return!0}function OC(n,e,t){const i=n.getValueInRange(e);return t?i.toLowerCase():i}var K3=class extends M{constructor(){super({id:"editor.action.focusNextCursor",label:L(1355,"Focus Next Cursor"),metadata:{description:m(1342,"Focuses the next cursor"),args:[]},precondition:void 0})}run(n,e,t){if(!e.hasModel())return;const i=e._getViewModel();if(i.cursorConfig.readOnly)return;i.model.pushStackElement();const s=Array.from(i.getCursorStates()),o=s.shift();o&&(s.push(o),i.setCursorStates(t.source,3,s),i.revealPrimaryCursor(t.source,!0),Ps(s,i.getCursorStates()))}},G3=class extends M{constructor(){super({id:"editor.action.focusPreviousCursor",label:L(1356,"Focus Previous Cursor"),metadata:{description:m(1343,"Focuses the previous cursor"),args:[]},precondition:void 0})}run(n,e,t){if(!e.hasModel())return;const i=e._getViewModel();if(i.cursorConfig.readOnly)return;i.model.pushStackElement();const s=Array.from(i.getCursorStates()),o=s.pop();o&&(s.unshift(o),i.setCursorStates(t.source,3,s),i.revealPrimaryCursor(t.source,!0),Ps(s,i.getCursorStates()))}};ce(Oc.ID,Oc,4);ce(Mc.ID,Mc,1);k(M3);k(A3);k(F3);k(V3);k(B3);k(U3);k(z3);k(j3);k(q3);k(H3);k(W3);k(K3);k(G3);var fo={Visible:new oe("parameterHintsVisible",!1),MultipleSignatures:new oe("parameterHintsMultipleSignatures",!1)};async function PL(n,e,t,i,s){const o=n.ordered(e);for(const r of o)try{const a=await r.provideSignatureHelp(e,t,s,i);if(a)return a}catch(a){tt(a)}}Re.registerCommand("_executeSignatureHelpProvider",async(n,...e)=>{const[t,i,s]=e;Se(De.isUri(t)),Se(B.isIPosition(i)),Se(typeof s=="string"||!s);const o=n.get(Z),r=await n.get(si).createModelReference(t);try{const a=await PL(o.signatureHelpProvider,r.object.textEditorModel,B.lift(i),{triggerKind:ds.Invoke,isRetrigger:!1,triggerCharacter:s},ue.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{r.dispose()}});var Yn;(function(n){n.Default={type:0};class e{constructor(s,o){this.request=s,this.previouslyActiveHints=o,this.type=2}}n.Pending=e;class t{constructor(s){this.hints=s,this.type=1}}n.Active=t})(Yn||(Yn={}));var Z3=class OL extends O{static{this.DEFAULT_DELAY=120}constructor(e,t,i=OL.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Q),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Yn.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Je),this.triggerChars=new Qd,this.retriggerChars=new Qd,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=this._register(new _s(i)),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(s=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(s=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(s=>this.onCursorChange(s))),this._register(this.editor.onDidChangeModelContent(s=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(s=>this.onDidType(s))),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=Yn.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const s=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(s),t).catch(we)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,s=this.editor.getOption(98).cycle;if((e<2||i)&&!s){this.cancel();return}this.updateActiveSignature(i&&s?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,s=this.editor.getOption(98).cycle;if((e<2||i)&&!s){this.cancel();return}this.updateActiveSignature(i&&s?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new Yn.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const s=this._pendingTriggers.reduce(X3);this._pendingTriggers=[];const o={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),a=this.editor.getPosition();this.state=new Yn.Pending(pt(l=>PL(this.providers,r,a,o,l)),i);try{const l=await this.state.request;return e!==this.triggerId?(l?.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new Yn.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=Yn.Default),we(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();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])if(i.length){const s=i.charCodeAt(0);this.triggerChars.add(s),this.retriggerChars.add(s)}for(const i of t.signatureHelpRetriggerCharacters||[])i.length&&this.retriggerChars.add(i.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:ds.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:ds.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:ds.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(98).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};function X3(n,e){switch(e.triggerKind){case ds.Invoke:return e;case ds.ContentChange:return n;case ds.TriggerCharacter:default:return e}}var Y3=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},MC=function(n,e){return function(t,i){e(t,i,n)}},Df,Gt=W,J3=Ze("parameter-hints-next",V.chevronDown,m(1358,"Icon for show next parameter hint.")),Q3=Ze("parameter-hints-previous",V.chevronUp,m(1359,"Icon for show previous parameter hint.")),Ef=class extends O{static{Df=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,s){super(),this.editor=e,this.model=t,this.markdownRendererService=s,this.renderDisposeables=this._register(new A),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.keyVisible=fo.Visible.bindTo(i),this.keyMultipleSignatures=fo.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=Gt(".editor-widget.parameter-hints-widget"),t=z(e,Gt(".phwrapper"));t.tabIndex=-1;const i=z(t,Gt(".controls")),s=z(i,Gt(".button"+pe.asCSSSelector(Q3))),o=z(i,Gt(".overloads")),r=z(i,Gt(".button"+pe.asCSSSelector(J3)));this._register(de(s,"click",u=>{Cn.stop(u),this.previous()})),this._register(de(r,"click",u=>{Cn.stop(u),this.next()}));const a=Gt(".body"),l=new bS(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());const d=z(a,Gt(".signature")),c=z(a,Gt(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:d,overloads:o,docs:c,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(u=>{this.visible&&this.editor.layoutContentWidget(this)}));const h=()=>{if(!this.domNodes)return;const u=this.editor.getOption(59),g=this.domNodes.element;g.style.fontSize=`${u.fontSize}px`,g.style.lineHeight=`${u.lineHeight/u.fontSize}`,g.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",u.fontFamily),g.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",fm.fontFamily)};h(),this._register(qe.chain(this.editor.onDidChangeConfiguration.bind(this.editor),u=>u.filter(g=>g.hasChanged(59)))(h)),this._register(this.editor.onDidLayoutChange(u=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const s=z(this.domNodes.signature,Gt(".code")),o=i.parameters.length>0,r=i.activeParameter??e.activeParameter;if(o)this.renderParameters(s,i,r);else{const d=z(s,Gt("span"));d.textContent=i.label}const a=i.parameters[r];if(a?.documentation){const d=Gt("span.documentation");if(typeof a.documentation=="string")d.textContent=a.documentation;else{const c=this.renderMarkdownDocs(a.documentation);d.appendChild(c.element)}z(this.domNodes.docs,Gt("p",{},d))}if(i.documentation!==void 0)if(typeof i.documentation=="string")z(this.domNodes.docs,Gt("p",{},i.documentation));else{const d=this.renderMarkdownDocs(i.documentation);z(this.domNodes.docs,d.element)}const l=this.hasDocs(i,a);if(this.domNodes.signature.classList.toggle("has-docs",l),this.domNodes.docs.classList.toggle("empty",!l),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,a){let d="";const c=i.parameters[r];Array.isArray(c.label)?d=i.label.substring(c.label[0],c.label[1]):d=c.label,c.documentation&&(d+=typeof c.documentation=="string"?`, ${c.documentation}`:`, ${c.documentation.value}`),i.documentation&&(d+=typeof i.documentation=="string"?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==d&&(ci(m(1360,"{0}, hint",d)),this.announcedLabel=d)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRendererService.render(e,{context:this.editor,asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&jo(t.documentation).length>0||t&&typeof t.documentation=="object"&&jo(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&jo(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&jo(e.documentation.value).length>0)}renderParameters(e,t,i){const[s,o]=this.getParameterLabelOffsets(t,i),r=document.createElement("span");r.textContent=t.label.substring(0,s);const a=document.createElement("span");a.textContent=t.label.substring(s,o),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(o),z(e,r,a,l)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const s=new RegExp(`(\\W|^)${ka(i.label)}(?=\\W|$)`,"g");s.test(e.label);const o=s.lastIndex-i.label.length;return o>=0?[o,s.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 Df.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};Ef=Df=Y3([MC(2,ve),MC(3,Ls)],Ef);H("editorHoverWidget.highlightForeground",ew,m(1361,"Foreground color of the active item in the parameter hint."));var eB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},AC=function(n,e){return function(t,i){e(t,i,n)}},Rf,Cr=class extends O{static{Rf=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution(Rf.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new Z3(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints(s=>{s?(this.widget.value.show(),this.widget.value.render(s)):this.widget.rawValue?.hide()})),this.widget=new Rm(()=>this._register(t.createInstance(Ef,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};Cr=Rf=eB([AC(1,ie),AC(2,Z)],Cr);var tB=class extends M{constructor(){super({id:"editor.action.triggerParameterHints",label:L(1357,"Trigger Parameter Hints"),precondition:S.hasSignatureHelpProvider,kbOpts:{kbExpr:S.editorTextFocus,primary:3082,weight:100}})}run(n,e){Cr.get(e)?.trigger({triggerKind:ds.Invoke})}};ce(Cr.ID,Cr,2);k(tB);var P_=175,O_=Mt.bindToContribution(Cr.get);G(new O_({id:"closeParameterHints",precondition:fo.Visible,handler:n=>n.cancel(),kbOpts:{weight:P_,kbExpr:S.focus,primary:9,secondary:[1033]}}));G(new O_({id:"showPrevParameterHint",precondition:N.and(fo.Visible,fo.MultipleSignatures),handler:n=>n.previous(),kbOpts:{weight:P_,kbExpr:S.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));G(new O_({id:"showNextParameterHint",precondition:N.and(fo.Visible,fo.MultipleSignatures),handler:n=>n.next(),kbOpts:{weight:P_,kbExpr:S.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var FC=class extends O{static{this.ID="editor.contrib.placeholderText"}constructor(n){super(),this._editor=n,this._editorObs=Be(this._editor),this._placeholderText=this._editorObs.getOption(100),this._state=Yi({owner:this,equalsFn:gE},e=>{const t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}}),this._shouldViewBeAlive=iB(this,e=>this._state.read(e)?.placeholder!==void 0),this._view=T(e=>{if(!this._shouldViewBeAlive.read(e))return;const t=Na("div.editorPlaceholder");e.store.add(he(i=>{const s=this._state.read(i),o=s?.placeholder!==void 0;t.root.style.display=o?"block":"none",t.root.innerText=s?.placeholder??""})),e.store.add(he(i=>{const s=this._editorObs.layoutInfo.read(i);t.root.style.left=`${s.contentLeft}px`,t.root.style.width=s.contentWidth-s.verticalScrollbarWidth+"px",t.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),e.store.add(he(i=>{t.root.style.fontFamily=this._editorObs.getOption(58).read(i),t.root.style.fontSize=this._editorObs.getOption(61).read(i)+"px",t.root.style.lineHeight=this._editorObs.getOption(75).read(i)+"px"})),e.store.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:Ce(0),position:Ce(null),domNode:t.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}};function iB(n,e){return Ts(n,(t,i)=>i===!0?!0:e(t))}var nB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},sB=function(n,e){return function(t,i){e(t,i,n)}},oB=class{constructor(n){this.instantiationService=n}init(...n){}};function rB(n){return n()}var HC=class extends oB{constructor(e,t){super(t),this.init(e)}};HC=nB([sB(1,ie)],HC);ce(FC.ID,rB(()=>FC),0);H("editor.placeholder.foreground",_0,m(1380,"Foreground color of the placeholder text in the editor."));var aB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},WC=function(n,e){return function(t,i){e(t,i,n)}},Ac=class extends O{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(81)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(s=>{const o=this.editor.getModel()?.getLanguageId();o&&s.affects(o)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(s=>{this.options&&!s.hasChanged(81)||(this.options=this.createOptions(e.getOption(81)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(s=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(s=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new at(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,s=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!i&&!s?.markers))return{foldingRules:s,markSectionHeaderRegex:e.markSectionHeaderRegex,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)})}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter(o=>{if(!o.shouldBeInComments)return!0;const r=t.validateRange(o.range),a=t.tokenization.getLineTokens(r.startLineNumber),l=a.findTokenIndexAtOffset(r.startColumn-1),d=a.getStandardTokenType(l),c=t.getLanguageIdAtPosition(r.startLineNumber,r.startColumn);return a.getLanguageId(l)===c&&d===1}));const i=Object.values(this.currentOccurrences).map(o=>o.decorationId),s=e.map(o=>lB(o));this.editor.changeDecorations(o=>{const r=o.deltaDecorations(i,s);this.currentOccurrences={};for(let a=0,l=r.length;a<l;a++){const d={sectionHeader:e[a],decorationId:r[a]};this.currentOccurrences[d.decorationId]=d}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}};Ac=aB([WC(1,ct),WC(2,An)],Ac);function lB(n){return{range:n.range,options:se.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:n.hasSeparatorLine?2:1,sectionHeaderText:n.text}})}}ce(Ac.ID,Ac,1);function dB(n){for(let e=0,t=n.length;e<t;e+=4){const i=n[e+0],s=n[e+1],o=n[e+2],r=n[e+3];n[e+0]=r,n[e+1]=o,n[e+2]=s,n[e+3]=i}}function cB(n){const e=new Uint8Array(n.buffer,n.byteOffset,n.length*4);return ST()||dB(e),gd.wrap(e)}function ML(n){const e=new Uint32Array(hB(n));let t=0;if(e[t++]=n.id,n.type==="full")e[t++]=1,e[t++]=n.data.length,e.set(n.data,t),t+=n.data.length;else{e[t++]=2,e[t++]=n.deltas.length;for(const i of n.deltas)e[t++]=i.start,e[t++]=i.deleteCount,i.data?(e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length):e[t++]=0}return cB(e)}function hB(n){let e=0;if(e+=2,n.type==="full")e+=1+n.data.length;else{e+=1,e+=3*n.deltas.length;for(const t of n.deltas)t.data&&(e+=t.data.length)}return e}function Th(n){return n&&!!n.data}function AL(n){return n&&Array.isArray(n.edits)}var uB=class{constructor(n,e,t){this.provider=n,this.tokens=e,this.error=t}};function FL(n,e){return n.has(e)}function gB(n,e){const t=n.orderedGroups(e);return t.length>0?t[0]:[]}async function HL(n,e,t,i,s){const o=gB(n,e),r=await Promise.all(o.map(async a=>{let l,d=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?i:null,s)}catch(c){d=c,l=null}return(!l||!Th(l)&&!AL(l))&&(l=null),new uB(a,l,d)}));for(const a of r){if(a.error)throw a.error;if(a.tokens)return a}return r.length>0?r[0]:null}function pB(n,e){const t=n.orderedGroups(e);return t.length>0?t[0]:null}var fB=class{constructor(n,e){this.provider=n,this.tokens=e}};function mB(n,e){return n.has(e)}function WL(n,e){const t=n.orderedGroups(e);return t.length>0?t[0]:[]}async function M_(n,e,t,i){const s=WL(n,e),o=await Promise.all(s.map(async r=>{let a;try{a=await r.provideDocumentRangeSemanticTokens(e,t,i)}catch(l){tt(l),a=null}return(!a||!Th(a))&&(a=null),new fB(r,a)}));for(const r of o)if(r.tokens)return r;return o.length>0?o[0]:null}Re.registerCommand("_provideDocumentSemanticTokensLegend",async(n,...e)=>{const[t]=e;Se(t instanceof De);const i=n.get(Kt).getModel(t);if(!i)return;const{documentSemanticTokensProvider:s}=n.get(Z),o=pB(s,i);return o?o[0].getLegend():n.get(ht).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});Re.registerCommand("_provideDocumentSemanticTokens",async(n,...e)=>{const[t]=e;Se(t instanceof De);const i=n.get(Kt).getModel(t);if(!i)return;const{documentSemanticTokensProvider:s}=n.get(Z);if(!FL(s,i))return n.get(ht).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const o=await HL(s,i,null,null,ue.None);if(!o)return;const{provider:r,tokens:a}=o;if(!a||!Th(a))return;const l=ML({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l});Re.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(n,...e)=>{const[t,i]=e;Se(t instanceof De);const s=n.get(Kt).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:o}=n.get(Z),r=WL(o,s);if(r.length===0)return;if(r.length===1)return r[0].getLegend();if(!i||!y.isIRange(i))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=await M_(o,s,y.lift(i),ue.None);if(a)return a.provider.getLegend()});Re.registerCommand("_provideDocumentRangeSemanticTokens",async(n,...e)=>{const[t,i]=e;Se(t instanceof De),Se(y.isIRange(i));const s=n.get(Kt).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:o}=n.get(Z),r=await M_(o,s,y.lift(i),ue.None);if(!(!r||!r.tokens))return ML({id:0,type:"full",data:r.tokens.data})});var _B="editor.semanticHighlighting";function Vd(n,e,t){const i=t.getValue(_B,{overrideIdentifier:n.getLanguageId(),resource:n.uri})?.enabled;return typeof i=="boolean"?i:e.getColorTheme().semanticHighlighting}var VL=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ji=function(n,e){return function(t,i){e(t,i,n)}},Xn,Tf=class extends O{constructor(e,t,i,s,o,r){super(),this._watchers=new Rn,this._providerChangeListeners=this._register(new A);const a=r.documentSemanticTokensProvider,l=u=>{this._watchers.get(u.uri)?.dispose(),this._watchers.set(u.uri,new Nf(u,e,i,o,r))},d=(u,g)=>{g.dispose(),this._watchers.delete(u.uri)},c=()=>{for(const u of t.getModels()){const g=this._watchers.get(u.uri);Vd(u,i,s)?g||l(u):g&&d(u,g)}},h=()=>{this._providerChangeListeners.clear();for(const u of a.allNoModel())typeof u.onDidChange=="function"&&this._providerChangeListeners.add(u.onDidChange(()=>{for(const g of this._watchers.values())g.handleProviderDidChange(u)}))};t.getModels().forEach(u=>{Vd(u,i,s)&&l(u)}),this._register(t.onModelAdded(u=>{Vd(u,i,s)&&l(u)})),this._register(t.onModelRemoved(u=>{const g=this._watchers.get(u.uri);g&&d(u,g)})),this._register(s.onDidChangeConfiguration(u=>{u.affectsConfiguration("editor.semanticHighlighting")&&c()})),this._register(i.onDidColorThemeChange(c)),h(),this._register(a.onDidChange(()=>{h();for(const u of this._watchers.values())u.handleRegistryChange()}))}dispose(){Nt(this._watchers.values()),this._watchers.clear(),super.dispose()}};Tf=VL([Ji(0,Nm),Ji(1,Kt),Ji(2,It),Ji(3,xe),Ji(4,Ri),Ji(5,Z)],Tf);var Nf=class extends O{static{Xn=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,s,o){super(),this._semanticTokensStylingService=t,this._relevantProviders=new Set,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:Xn.REQUEST_MIN_DELAY,max:Xn.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new at(()=>this._fetchDocumentSemanticTokensNow(),Xn.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._providersChangedDuringRequest=!1,this._updateRelevantProviders(),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._updateRelevantProviders(),this._fetchDocumentSemanticTokens.schedule(0)})),this._register(i.onDidColorThemeChange(r=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}handleRegistryChange(){this._updateRelevantProviders(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}handleProviderDidChange(e){if(this._relevantProviders.has(e)){if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}}_updateRelevantProviders(){this._relevantProviders=new Set(this._provider.all(this._model))}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!FL(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new st,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,s=HL(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],r=this._model.onDidChangeContent(l=>{o.push(l)}),a=new hi(!1);s.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,o);else{const{provider:d,tokens:c}=l,h=this._semanticTokensStylingService.getStyling(d);this._setDocumentSemanticTokens(d,c||null,h,o)}},l=>{l&&(Hn(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||we(l),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,i,s,o){o=Math.min(o,i.length-s,e.length-t);for(let r=0;r<o;r++)i[s+r]=e[t+r]}_setDocumentSemanticTokens(e,t,i,s){const o=this._currentDocumentResponse,r=()=>{(s.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||!i){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),r();return}if(AL(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(const u of t.edits)a+=(u.data?u.data.length:0)-u.deleteCount;const l=o.data,d=new Uint32Array(l.length+a);let c=l.length,h=d.length;for(let u=t.edits.length-1;u>=0;u--){const g=t.edits[u];if(g.start>l.length){i.warnInvalidEditStart(o.resultId,t.resultId,u,g.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const p=c-(g.start+g.deleteCount);p>0&&(Xn._copy(l,c-p,d,h-p,p),h-=p),g.data&&(Xn._copy(g.data,0,d,h-g.data.length,g.data.length),h-=g.data.length),c=g.start}c>0&&Xn._copy(l,0,d,0,c),t={resultId:t.resultId,data:d}}}if(Th(t)){this._currentDocumentResponse=new vB(e,t.resultId,t.data);const a=Iw(t,i,this._model.getLanguageId());if(s.length>0)for(const l of s)for(const d of a)for(const c of l.changes)d.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}};Nf=Xn=VL([Ji(1,Nm),Ji(2,It),Ji(3,Ri),Ji(4,Z)],Nf);var vB=class{constructor(n,e,t){this.provider=n,this.resultId=e,this.data=t}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}};Ir(Tf);var bB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Xr=function(n,e){return function(t,i){e(t,i,n)}},Fc=class extends O{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,s,o,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=s,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new at(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[],this._rangeProvidersChangeListeners=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))},l=()=>{if(this._cleanupProviderListeners(),this._editor.hasModel()){const d=this._editor.getModel();for(const c of this._provider.all(d)){const h=c.onDidChange?.(()=>{this._cancelAll(),a()});h&&this._rangeProvidersChangeListeners.push(h)}}};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{l(),this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelLanguage(()=>{l(),this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(d=>{this._cancelAll(),a()})),l(),this._register(this._provider.onDidChange(()=>{l(),this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("editor.semanticHighlighting")&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}dispose(){this._cleanupProviderListeners(),super.dispose()}_cleanupProviderListeners(){Nt(this._rangeProvidersChangeListeners),this._rangeProvidersChangeListeners=[]}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!Vd(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!mB(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(i=>this._requestRange(e,i)))}_requestRange(e,t){const i=e.getVersionId(),s=pt(r=>Promise.resolve(M_(this._provider,e,t,r))),o=new hi(!1);return s.then(r=>{if(this._debounceInformation.update(e,o.elapsed()),!r||!r.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:a,tokens:l}=r,d=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,Iw(l,d,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}};Fc=bB([Xr(1,Nm),Xr(2,It),Xr(3,xe),Xr(4,Ri),Xr(5,Z)],Fc);ce(Fc.ID,Fc,1);var CB=class{constructor(n=!0){this.selectSubwords=n}provideSelectionRanges(n,e){const t=[];for(const i of e){const s=[];t.push(s),this.selectSubwords&&this._addInWordRanges(s,n,i),this._addWordRanges(s,n,i),this._addWhitespaceLine(s,n,i),s.push({range:n.getFullModelRange()})}return t}_addInWordRanges(n,e,t){const i=e.getWordAtPosition(t);if(!i)return;const{word:s,startColumn:o}=i,r=t.column-o;let a=r,l=r,d=0;for(;a>=0;a--){const c=s.charCodeAt(a);if(a!==r&&(c===95||c===45))break;if(Lv(c)&&Ev(d))break;d=c}for(a+=1;l<s.length;l++){const c=s.charCodeAt(l);if(Ev(c)&&Lv(d))break;if(c===95||c===45)break;d=c}a<l&&n.push({range:new y(t.lineNumber,o+a,t.lineNumber,o+l)})}_addWordRanges(n,e,t){const i=e.getWordAtPosition(t);i&&n.push({range:new y(t.lineNumber,i.startColumn,t.lineNumber,i.endColumn)})}_addWhitespaceLine(n,e,t){e.getLineLength(t.lineNumber)>0&&e.getLineFirstNonWhitespaceColumn(t.lineNumber)===0&&e.getLineLastNonWhitespaceColumn(t.lineNumber)===0&&n.push({range:new y(t.lineNumber,1,t.lineNumber,e.getLineMaxColumn(t.lineNumber))})}},SB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},wB=function(n,e){return function(t,i){e(t,i,n)}},kf,yB=class BL{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new BL(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}},nl=class{static{kf=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(kf.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await zL(this._languageFeaturesService.selectionRangeProvider,i,t.map(o=>o.getPosition()),this._editor.getOption(129),ue.None).then(o=>{if(!(!Qt(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Bi(this._editor.getSelections(),t,(r,a)=>r.equalsSelection(a)))){for(let r=0;r<o.length;r++)o[r]=o[r].filter(a=>a.containsPosition(t[r].getStartPosition())&&a.containsPosition(t[r].getEndPosition())),o[r].unshift(t[r]);this._state=o.map(r=>new yB(0,r)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(o=>o.mov(e));const s=this._state.map(o=>te.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}};nl=kf=SB([wB(1,Z)],nl);var UL=class extends M{constructor(n,e){super(e),this._forward=n}async run(n,e){const t=nl.get(e);t&&await t.run(this._forward)}},xB=class extends UL{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:L(1449,"Expand Selection"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:$.MenubarSelectionMenu,group:"1_basic",title:m(1447,"&&Expand Selection"),order:2}})}};Re.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");var IB=class extends UL{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:L(1450,"Shrink Selection"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:$.MenubarSelectionMenu,group:"1_basic",title:m(1448,"&&Shrink Selection"),order:3}})}};ce(nl.ID,nl,4);k(xB);k(IB);async function zL(n,e,t,i,s){const o=n.all(e).concat(new CB(i.selectSubwords));o.length===1&&o.unshift(new WI);const r=[],a=[];for(const l of o)r.push(Promise.resolve(l.provideSelectionRanges(e,t,s)).then(d=>{if(Qt(d)&&d.length===t.length)for(let c=0;c<t.length;c++){a[c]||(a[c]=[]);for(const h of d[c])y.isIRange(h.range)&&y.containsPosition(h.range,t[c])&&a[c].push(y.lift(h.range))}},tt));return await Promise.all(r),a.map(l=>{if(l.length===0)return[];l.sort((u,g)=>B.isBefore(u.getStartPosition(),g.getStartPosition())?1:B.isBefore(g.getStartPosition(),u.getStartPosition())||B.isBefore(u.getEndPosition(),g.getEndPosition())?-1:B.isBefore(g.getEndPosition(),u.getEndPosition())?1:0);const d=[];let c;for(const u of l)(!c||y.containsRange(u,c)&&!y.equalsRange(u,c))&&(d.push(u),c=u);if(!i.selectLeadingAndTrailingWhitespace)return d;const h=[d[0]];for(let u=1;u<d.length;u++){const g=d[u-1],p=d[u];if(p.startLineNumber!==g.startLineNumber||p.endLineNumber!==g.endLineNumber){const f=new y(g.startLineNumber,e.getLineFirstNonWhitespaceColumn(g.startLineNumber),g.endLineNumber,e.getLineLastNonWhitespaceColumn(g.endLineNumber));f.containsRange(g)&&!f.equalsRange(g)&&p.containsRange(f)&&!p.equalsRange(f)&&h.push(f);const _=new y(g.startLineNumber,1,g.endLineNumber,e.getLineMaxColumn(g.endLineNumber));_.containsRange(g)&&!_.equalsRange(f)&&p.containsRange(_)&&!p.equalsRange(_)&&h.push(_)}h.push(p)}return h})}Re.registerCommand("_executeSelectionRangeProvider",async function(n,...e){const[t,i]=e;Se(De.isUri(t)),Se(F0(i,r=>B.isIPosition(r)));const s=n.get(Z).selectionRangeProvider,o=await n.get(si).createModelReference(t);try{return zL(s,o.object.textEditorModel,i.map(B.lift),{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},ue.None)}finally{o.dispose()}});var Pf=Object.freeze({View:L(1692,"View"),Help:L(1693,"Help"),Test:L(1694,"Test"),File:L(1695,"File"),Preferences:L(1696,"Preferences"),Developer:L(1697,"Developer")}),LB=class extends gi{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...L(1498,"Toggle Editor Sticky Scroll"),mnemonicTitle:m(1494,"&&Toggle Editor Sticky Scroll")},metadata:{description:L(1499,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:Pf.View,toggled:{condition:N.equals("config.editor.stickyScroll.enabled",!0),title:m(1495,"Sticky Scroll"),mnemonicTitle:m(1496,"&&Sticky Scroll")},menu:[{id:$.CommandPalette},{id:$.MenubarAppearanceMenu,group:"4_editor",order:3},{id:$.StickyScrollContext}]})}async runEditorCommand(n,e){const t=n.get(xe),i=!t.getValue("editor.stickyScroll.enabled"),s=Ei.get(e)?.isFocused();t.updateValue("editor.stickyScroll.enabled",i),s&&e.focus()}},Nh=100,DB=class extends gi{constructor(){super({id:"editor.action.focusStickyScroll",title:{...L(1500,"Focus Editor Sticky Scroll"),mnemonicTitle:m(1497,"&&Focus Editor Sticky Scroll")},precondition:N.and(N.has("config.editor.stickyScroll.enabled"),S.stickyScrollVisible),menu:[{id:$.CommandPalette}]})}runEditorCommand(n,e){Ei.get(e)?.focus()}},EB=class extends gi{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:L(1501,"Select the next editor sticky scroll line"),precondition:S.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Nh,primary:18}})}runEditorCommand(n,e){Ei.get(e)?.focusNext()}},RB=class extends gi{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:L(1502,"Select the previous sticky scroll line"),precondition:S.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Nh,primary:16}})}runEditorCommand(n,e){Ei.get(e)?.focusPrevious()}},TB=class extends gi{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:L(1503,"Go to the focused sticky scroll line"),precondition:S.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Nh,primary:3}})}runEditorCommand(n,e){Ei.get(e)?.goToFocused()}},NB=class extends gi{constructor(){super({id:"editor.action.selectEditor",title:L(1504,"Select Editor"),precondition:S.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Nh,primary:9}})}runEditorCommand(n,e){Ei.get(e)?.selectEditor()}};ce(Ei.ID,Ei,1);fe(LB);fe(DB);fe(RB);fe(EB);fe(TB);fe(NB);var jL=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},_a=function(n,e){return function(t,i){e(t,i,n)}},kB=class{constructor(n,e,t,i,s,o,r){this.range=n,this.insertText=e,this.filterText=t,this.additionalTextEdits=i,this.command=s,this.gutterMenuLinkAction=o,this.completion=r,this.doNotLog=!0}},Of=class extends JE{constructor(e,t,i,s,o,r){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=s,this._suggestMemoryService=r}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn<i.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){const e=[],{items:t}=this.completionModel,i=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},t),s=cs.slice(t,i),o=cs.slice(t,0,i);let r=5;for(const a of cs.concat(s,o)){if(a.score===Oa.Default)continue;const l=new y(a.editStart.lineNumber,a.editStart.column,a.editInsertEnd.lineNumber,a.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),d=a.completion.insertTextRules&&a.completion.insertTextRules&4?{snippet:a.completion.insertText}:a.completion.insertText;e.push(new kB(l,d,a.filterTextLow??a.labelLow,a.completion.additionalTextEdits,a.completion.command,a.completion.action,a)),r-->=0&&a.resolve(ue.None)}return e}};Of=jL([_a(5,Dh)],Of);var Mf=class extends O{constructor(e,t,i,s){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=s,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,s){if(i.selectedSuggestionInfo)return;let o;for(const g of this._editorService.listCodeEditors())if(g.getModel()===e){o=g;break}if(!o)return;const r=o.getOption(102);if(Zo.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(Zo.valueFor(r,l)!=="inline")return;let d=e.getWordAtPosition(t),c;if(d?.word||(c=this._getTriggerCharacterInfo(e,t)),!d?.word&&!c||(d||(d=e.getWordUntilPosition(t)),d.endColumn!==t.column))return;let h;const u=e.getValueInRange(new y(t.lineNumber,1,t.lineNumber,t.column));if(!c&&this._lastResult?.canBeReused(e,t.lineNumber,d)){const g=new eC(u,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=g,this._lastResult.acquire(),h=this._lastResult}else{const g=await b_(this._languageFeatureService.completionProvider,e,t,new v_(void 0,Dc.createSuggestFilter(o).itemKind,c?.providers),c&&{triggerKind:1,triggerCharacter:c.ch},s);let p;g.needsClipboard&&(p=await this._clipboardService.readText());const f=new HI(g.items,t.column,new eC(u,0),VI.None,o.getOption(134),o.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},p);h=new Of(e,t.lineNumber,d,f,g,this._suggestMemoryService)}return this._lastResult=h,h}handleItemDidShow(e,t){t.completion.resolve(ue.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const i=e.getValueInRange(y.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const o of this._languageFeatureService.completionProvider.all(e))o.triggerCharacters?.includes(i)&&s.add(o);if(s.size!==0)return{providers:s,ch:i}}};Mf=jL([_a(0,Z),_a(1,ti),_a(2,Dh),_a(3,$e)],Mf);Ir(Mf);var PB=class extends M{constructor(){super({id:"editor.action.forceRetokenize",label:L(1584,"Developer: Force Retokenize"),precondition:void 0})}run(n,e){if(!e.hasModel())return;const t=e.getModel();t.tokenization.resetTokenization();const i=new hi;t.tokenization.forceTokenization(t.getLineCount()),i.stop(),console.log(`tokenization took ${i.elapsed()}`)}};k(PB);var OB=class qL extends lt{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:qL.ID,title:L(1582,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:L(1583,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const e=!uv.getTabFocusMode();uv.setTabFocusMode(e),e?ci(m(1580,"Pressing Tab will now move focus to the next focusable element")):ci(m(1581,"Pressing Tab will now insert the tab character"))}};fe(OB);var MB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},VC=function(n,e){return function(t,i){e(t,i,n)}},Af=class extends O{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,i={},s,o){super(),this._link=t,this._hoverService=s,this._enabled=!0,this.el=z(e,W("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??aw("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const r=this._register(new Fh(this.el,"click")),a=this._register(new Fh(this.el,"keydown")),l=qe.chain(a.event,h=>h.map(u=>new wm(u)).filter(u=>u.keyCode===3||u.keyCode===10)),d=this._register(new Fh(this.el,$D.Tap)).event;this._register(cw.addTarget(this.el));const c=qe.any(r.event,l,d);this._register(c(h=>{this.enabled&&(Cn.stop(h,!0),i?.opener?i.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};Af=MB([VC(3,ui),VC(4,_o)],Af);var $L=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ff=function(n,e){return function(t,i){e(t,i,n)}},AB=26,Hf=class extends O{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(Wf))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,AB)}};Hf=$L([Ff(1,ie)],Hf);var Wf=class extends O{constructor(e,t){super(),this.instantiationService=e,this.markdownRendererService=t,this.element=W("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"){const t=W("span");return t.innerText=e,t}return this.markdownRendererService.render(e).element}clear(){di(this.element)}show(e){di(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=z(this.element,W("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(W(`div${pe.asCSSSelector(e.icon)}`));const s=z(this.element,W("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=z(this.element,W("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(Af,this.messageActionsContainer,{...r,tabIndex:-1},{}));const o=z(this.element,W("div.action-container"));this.actionBar=this._register(new fs(o)),this.actionBar.push(this._register(new sr("banner.close",m(1585,"Close Banner"),pe.asClassName(qS),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Wf=$L([Ff(0,ie),Ff(1,Ls)],Wf);var A_=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Da=function(n,e){return function(t,i){e(t,i,n)}},FB=Ze("extensions-warning-message",V.warning,m(1586,"Icon shown with a warning message in the extensions editor.")),sl=class extends O{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,s){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=o=>{if(o&&o.hasMore){if(this._bannerClosed)return;const r=Math.max(o.ambiguousCharacterCount,o.nonBasicAsciiCharacterCount,o.invisibleCharacterCount);let a;if(o.nonBasicAsciiCharacterCount>=r)a={message:m(1587,"This document contains many non-basic ASCII unicode characters"),command:new H_};else if(o.ambiguousCharacterCount>=r)a={message:m(1588,"This document contains many ambiguous unicode characters"),command:new Tl};else if(o.invisibleCharacterCount>=r)a={message:m(1589,"This document contains many invisible unicode characters"),command:new F_};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:FB,actions:[{label:a.command.shortLabel,href:`command:${a.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(s.createInstance(Hf,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(i.onDidChangeTrust(o=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(142)&&(this._options=e.getOption(142),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;const e=HB(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(i=>i===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(i=>i.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(i=>i==="_os"?AS.NumberFormat().value.resolvedOptions().locale:i==="_vscode"?i0:i)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Vf(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new WB(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};sl=A_([Da(1,An),Da(2,_T),Da(3,ie)],sl);function HB(n,e){return{nonBasicASCII:e.nonBasicASCII==="inUntrustedWorkspace"?!n:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments==="inUntrustedWorkspace"?!n:e.includeComments,includeStrings:e.includeStrings==="inUntrustedWorkspace"?!n:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}var Vf=class extends O{constructor(e,t,i,s){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new at(()=>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}const 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);const i=[];if(!t.hasMore)for(const s of t.ranges)i.push({range:s,options:ZL.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();return TS(t,e)?{reason:GL(t.getValueInRange(e.range),this._options),inComment:mS(t,e),inString:GS(t,e)}:null}};Vf=A_([Da(3,An)],Vf);var WB=class extends O{constructor(n,e,t){super(),this._editor=n,this._options=e,this._updateState=t,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new at(()=>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}const n=this._editor.getVisibleRanges(),e=[],t={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const i of n){const s=Aw.computeUnicodeHighlights(this._model,this._options,i);for(const o of s.ranges)t.ranges.push(o);t.ambiguousCharacterCount+=t.ambiguousCharacterCount,t.invisibleCharacterCount+=t.invisibleCharacterCount,t.nonBasicAsciiCharacterCount+=t.nonBasicAsciiCharacterCount,t.hasMore=t.hasMore||s.hasMore}if(!t.hasMore)for(const i of t.ranges)e.push({range:i,options:ZL.instance.getDecorationFromOptions(this._options)});this._updateState(t),this._decorations.set(e)}getDecorationInfo(n){if(!this._decorations.has(n))return null;const e=this._editor.getModel(),t=e.getValueInRange(n.range);return TS(e,n)?{reason:GL(t,this._options),inComment:mS(e,n),inString:GS(e,n)}:null}},KL=m(1590,"Configure Unicode Highlight Options"),Bf=class{constructor(e,t){this._editor=e,this._markdownRendererService=t,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),s=this._editor.getContribution(sl.ID);if(!s)return[];const o=[],r=new Set;let a=300;for(const l of t){const d=s.getDecorationInfo(l);if(!d)continue;const c=i.getValueInRange(l.range).codePointAt(0),h=Nu(c);let u;switch(d.reason.kind){case 0:yw(d.reason.confusableWith)?u=m(1591,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,Nu(d.reason.confusableWith.codePointAt(0))):u=m(1592,"The character {0} could be confused with the character {1}, which is more common in source code.",h,Nu(d.reason.confusableWith.codePointAt(0)));break;case 1:u=m(1593,"The character {0} is invisible.",h);break;case 2:u=m(1594,"The character {0} is not a basic ASCII character.",h)}if(r.has(u))continue;r.add(u);const g={codePoint:c,reason:d.reason,inComment:d.inComment,inString:d.inString},p=m(1595,"Adjust settings"),f=fS(eD.ID,g),_=new Lt("",!0).appendMarkdown(u).appendText(" ").appendLink(f,p,KL);o.push(new yi(this,l.range,[_],!1,a++))}return o}renderHoverParts(e,t){return Pk(e,t,this._editor,this._markdownRendererService)}getAccessibleContent(e){return e.contents.map(t=>t.value).join(`
|
|
62
|
-
`)}};Bf=A_([Da(1,Ls)],Bf);function Uf(n){return`U+${n.toString(16).padStart(4,"0")}`}function Nu(n){let e=`\`${Uf(n)}\``;return LS.isInvisibleCharacter(n)||(e+=` "${`${VB(n)}`}"`),e}function VB(n){return n===96?"`` ` ``":"`"+String.fromCodePoint(n)+"`"}function GL(n,e){return Aw.computeUnicodeHighlightReason(n,e)}var ZL=class XL{constructor(){this.map=new Map}static{this.instance=new XL}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let s=this.map.get(i);return s||(s=se.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,s)),s}},BB=class extends M{constructor(){super({id:Tl.ID,label:L(1604,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=m(1596,"Disable Highlight In Comments")}async run(n,e){const t=n.get(xe);t&&this.runAction(t)}async runAction(n){await n.updateValue(Tn.includeComments,!1,2)}},UB=class extends M{constructor(){super({id:Tl.ID,label:L(1605,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=m(1597,"Disable Highlight In Strings")}async run(n,e){const t=n.get(xe);t&&this.runAction(t)}async runAction(n){await n.updateValue(Tn.includeStrings,!1,2)}},Tl=class YL extends lt{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:YL.ID,title:L(1606,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1598,"Disable Ambiguous Highlight")}async run(e,t){const i=e.get(xe);i&&this.runAction(i)}async runAction(e){await e.updateValue(Tn.ambiguousCharacters,!1,2)}},F_=class JL extends lt{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:JL.ID,title:L(1607,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1599,"Disable Invisible Highlight")}async run(e,t){const i=e.get(xe);i&&this.runAction(i)}async runAction(e){await e.updateValue(Tn.invisibleCharacters,!1,2)}},H_=class QL extends lt{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:QL.ID,title:L(1608,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1600,"Disable Non ASCII Highlight")}async run(e,t){const i=e.get(xe);i&&this.runAction(i)}async runAction(e){await e.updateValue(Tn.nonBasicASCII,!1,2)}},eD=class tD extends lt{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:tD.ID,title:L(1609,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){const{codePoint:i,reason:s,inString:o,inComment:r}=t,a=String.fromCodePoint(i),l=e.get(Di),d=e.get(xe);function c(p){return LS.isInvisibleCharacter(p)?m(1601,"Exclude {0} (invisible character) from being highlighted",Uf(p)):m(1602,"Exclude {0} from being highlighted",`${Uf(p)} "${a}"`)}const h=[];if(s.kind===0)for(const p of s.notAmbiguousInLocales)h.push({label:m(1603,'Allow unicode characters that are more common in the language "{0}".',p),run:async()=>{jB(d,[p])}});if(h.push({label:c(i),run:()=>zB(d,[i])}),r){const p=new BB;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(o){const p=new UB;h.push({label:p.label,run:async()=>p.runAction(d)})}function u(p){return typeof p.desc.title=="string"?p.desc.title:p.desc.title.value}if(s.kind===0){const p=new Tl;h.push({label:u(p),run:async()=>p.runAction(d)})}else if(s.kind===1){const p=new F_;h.push({label:u(p),run:async()=>p.runAction(d)})}else if(s.kind===2){const p=new H_;h.push({label:u(p),run:async()=>p.runAction(d)})}else qB(s);const g=await l.pick(h,{title:KL});g&&await g.run()}};async function zB(n,e){const t=n.getValue(Tn.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const s of e)i[String.fromCodePoint(s)]=!0;await n.updateValue(Tn.allowedCharacters,i,2)}async function jB(n,e){const t=n.inspect(Tn.allowedLocales).user?.value;let i;typeof t=="object"&&t?i=Object.assign({},t):i={};for(const s of e)i[s]=!0;await n.updateValue(Tn.allowedLocales,i,2)}function qB(n){throw new Error(`Unexpected value: ${n}`)}fe(Tl);fe(F_);fe(H_);fe(eD);ce(sl.ID,sl,1);Co.register(Bf);var $B=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},BC=function(n,e){return function(t,i){e(t,i,n)}},iD="ignoreUnusualLineTerminators";function KB(n,e,t){n.setModelProperty(e.uri,iD,t)}function GB(n,e){return n.getModelProperty(e.uri,iD)}var Hc=class extends O{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||GB(this._codeEditorService,e)===!0||this._editor.getOption(104))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let t;try{this._isPresentingDialog=!0,t=await this._dialogService.confirm({title:m(1610,"Unusual Line Terminators"),message:m(1611,"Detected unusual line terminators"),detail:m(1612,"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`.",Vi(e.uri)),primaryButton:m(1613,"&&Remove Unusual Line Terminators"),cancelButton:m(1614,"Ignore")})}finally{this._isPresentingDialog=!1}if(!t.confirmed){KB(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};Hc=$B([BC(1,om),BC(2,$e)],Hc);ce(Hc.ID,Hc,1);var ZB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},XB=function(n,e){return function(t,i){e(t,i,n)}},UC=class{constructor(){this.selector={language:"*"}}provideDocumentHighlights(n,e,t){if(n.isDisposed())return;const i=[],s=n.getWordAtPosition({lineNumber:e.lineNumber,column:e.column});return s?n.findMatches(s.word,!0,!1,!0,pv,!1).map(o=>({range:o.range,kind:Kd.Text})):Promise.resolve(i)}provideMultiDocumentHighlights(n,e,t,i){if(n.isDisposed())return;const s=new Rn,o=n.getWordAtPosition({lineNumber:e.lineNumber,column:e.column});if(!o)return Promise.resolve(s);for(const r of[n,...t]){if(r.isDisposed())continue;const a=r.findMatches(o.word,!0,!1,!0,pv,!1).map(l=>({range:l.range,kind:Kd.Text}));a&&s.set(r.uri,a)}return s}},zf=class extends O{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new UC)),this._register(e.multiDocumentHighlightProvider.register("*",new UC))}};zf=ZB([XB(0,Z)],zf);var nD=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Qi=function(n,e){return function(t,i){e(t,i,n)}},Fe,jf,W_=new oe("hasWordHighlights",!1);function sD(n,e,t,i){const s=n.ordered(e);return gm(s.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,i)).then(void 0,tt)),o=>o!=null).then(o=>{if(o){const r=new Rn;return r.set(e.uri,o),r}return new Rn})}function YB(n,e,t,i,s){const o=n.ordered(e);return gm(o.map(r=>()=>{const a=s.filter(l=>yE(l)).filter(l=>zR(r.selector,l.uri,l.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(r.provideMultiDocumentHighlights(e,t,a,i)).then(void 0,tt)}),r=>r!=null)}var oD=class{constructor(n,e,t){this._model=n,this._selection=e,this._wordSeparators=t,this._wordRange=this._getCurrentWordRange(n,e),this._result=null}get result(){return this._result||(this._result=pt(n=>this._compute(this._model,this._selection,this._wordSeparators,n))),this._result}_getCurrentWordRange(n,e){const t=n.getWordAtPosition(e.getPosition());return t?new y(e.startLineNumber,t.startColumn,e.startLineNumber,t.endColumn):null}cancel(){this.result.cancel()}},JB=class extends oD{constructor(n,e,t,i){super(n,e,t),this._providers=i}_compute(n,e,t,i){return sD(this._providers,n,e.getPosition(),i).then(s=>s||new Rn)}},QB=class extends oD{constructor(n,e,t,i,s){super(n,e,t),this._providers=i,this._otherModels=s}_compute(n,e,t,i){return YB(this._providers,n,e.getPosition(),i,this._otherModels).then(s=>s||new Rn)}};function e2(n,e,t,i){return new JB(e,t,i,n)}function t2(n,e,t,i,s){return new QB(e,t,i,n,s)}Ut("_executeDocumentHighlights",async(n,e,t)=>(await sD(n.get(Z).documentHighlightProvider,e,t,ue.None))?.get(e.uri));var qf=class{static{Fe=this}static{this.storedDecorationIDs=new Rn}static{this.query=null}constructor(e,t,i,s,o,r,a,l){this.toUnhook=new A,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Rn,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new _s(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=r,this.textModelService=o,this.configurationService=a,this.logService=l,this._hasWordHighlights=W_.bindTo(s),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(d=>{this._ignorePositionChangeEvent||this.occurrencesHighlightEnablement!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(d)}).catch(we)})),this.toUnhook.add(e.onDidFocusEditorText(d=>{this.occurrencesHighlightEnablement!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}).catch(we))})),this.toUnhook.add(e.onDidChangeModelContent(d=>{o0(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(d=>{!d.newModelUrl&&d.oldModelUrl?this._stopSingular():Fe.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(d=>{const c=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==c)switch(this.occurrencesHighlightEnablement=c,c){case"off":this._stopAll();break;case"singleFile":this._stopAll(Fe.query?.modelInfo?.modelURI);break;case"multiFile":Fe.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",c)}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(d=>{if(d.affectsConfiguration("editor.occurrencesHighlightDelay")){const c=a.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==c&&(this.occurrencesHighlightDelay=c)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{const d=this.codeEditorService.getFocusedCodeEditor();d?d.getModel()?.uri.scheme===_t.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==_t.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,Fe.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){this.occurrencesHighlightEnablement!=="off"&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}).catch(we))}stop(){this.occurrencesHighlightEnablement!=="off"&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(y.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(i.startLineNumber);ci(`${o}, ${t+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(i.startLineNumber);ci(`${o}, ${t+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=Fe.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Fe.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const s of t){if(!s.hasModel()||ps(s.getModel().uri,e))continue;const o=Fe.storedDecorationIDs.get(s.getModel().uri);if(!o)continue;s.removeDecorations(o),i.push(s.getModel().uri);const r=xs.get(s);r?.wordHighlighter&&r.wordHighlighter.decorations.length>0&&(r.wordHighlighter.decorations.clear(),r.wordHighlighter.workerRequest=null,r.wordHighlighter._hasWordHighlights.set(!1))}for(const s of i)Fe.storedDecorationIDs.delete(s)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==_t.vscodeNotebookCell&&Fe.query?.modelInfo?.modelURI.scheme!==_t.vscodeNotebookCell?(Fe.query=null,this._run()):Fe.query?.modelInfo&&(Fe.query.modelInfo=null)),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlightEnablement==="off"){this._stopAll();return}if(e.source!=="api"&&e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===_t.vscodeNotebookCell){const s=[],o=this.codeEditorService.listCodeEditors();for(const r of o){const a=r.getModel();a&&a!==e&&a.uri.scheme===_t.vscodeNotebookCell&&s.push(a)}return s}const t=[],i=this.codeEditorService.listCodeEditors();for(const s of i){if(!Pw(s))continue;const o=s.getModel();o&&e===o.modified&&t.push(o.modified)}if(t.length)return t;if(this.occurrencesHighlightEnablement==="singleFile")return[];for(const s of i){const o=s.getModel();o&&o!==e&&t.push(o)}return t}async _run(e,t){if(this.editor.hasTextFocus()){const i=this.editor.getSelection();if(!i||i.startLineNumber!==i.endLineNumber){Fe.query=null,this._stopAll();return}const s=i.startColumn,o=i.endColumn,r=this._getWord();if(!r||r.startColumn>s||r.endColumn<o){Fe.query=null,this._stopAll();return}Fe.query={modelInfo:{modelURI:this.model.uri,selection:i}}}else if(!Fe.query){this._stopAll();return}if(this.lastCursorPositionChangeTime=new Date().getTime(),ps(this.editor.getModel().uri,Fe.query.modelInfo?.modelURI)){if(!e){const r=this.decorations.getRanges();for(const a of r)if(a.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model.uri:void 0);const i=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const s=this.getOtherModelsToHighlight(this.editor.getModel());if(!Fe.query||!Fe.query.modelInfo)return;const o=await this.textModelService.createModelReference(Fe.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(o.object.textEditorModel,Fe.query.modelInfo.selection,s),this.workerRequest?.result.then(r=>{i===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=r||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},we)}catch(r){this.logService.error("Unexpected error during occurrence request. Log: ",r)}finally{o.dispose()}}else if(this.model.uri.scheme===_t.vscodeNotebookCell){const i=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!Fe.query||!Fe.query.modelInfo)return;const s=await this.textModelService.createModelReference(Fe.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,Fe.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(o=>{i===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=o||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},we)}catch(o){this.logService.error("Unexpected error during occurrence request. Log: ",o)}finally{s.dispose()}}}computeWithModel(e,t,i){return i.length?t2(this.multiDocumentProviders,e,t,this.editor.getOption(148),i):e2(this.providers,e,t,this.editor.getOption(148))}_beginRenderDecorations(e){const t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){this.renderDecorationsTimer=void 0;const e=this.codeEditorService.listCodeEditors();for(const t of e){const i=xs.get(t);if(!i)continue;const s=[],o=t.getModel()?.uri;if(o&&this.workerRequestValue.has(o)){const r=Fe.storedDecorationIDs.get(o),a=this.workerRequestValue.get(o);if(a)for(const d of a)d.range&&s.push({range:d.range,options:N3(d.kind)});let l=[];t.changeDecorations(d=>{l=d.deltaDecorations(r??[],s)}),Fe.storedDecorationIDs=Fe.storedDecorationIDs.set(o,l),s.length>0&&(i.wordHighlighter?.decorations.set(s),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}};qf=Fe=nD([Qi(4,si),Qi(5,$e),Qi(6,xe),Qi(7,Pt)],qf);var xs=class extends O{static{jf=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(jf.ID)}constructor(e,t,i,s,o,r,a){super(),this._wordHighlighter=null;const l=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==_t.accessibleView&&(this._wordHighlighter=new qf(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,o,s,r,a))};this._register(e.onDidChangeModel(d=>{this._wordHighlighter&&(!d.newModelUrl&&d.oldModelUrl?.scheme!==_t.vscodeNotebookCell&&this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),l()})),l()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};xs=jf=nD([Qi(1,ve),Qi(2,Z),Qi(3,$e),Qi(4,si),Qi(5,xe),Qi(6,Pt)],xs);var rD=class extends M{constructor(n,e){super(e),this._isNext=n}run(n,e){const t=xs.get(e);t&&(this._isNext?t.moveNext():t.moveBack())}},i2=class extends rD{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:L(1624,"Go to Next Symbol Highlight"),precondition:W_,kbOpts:{kbExpr:S.editorTextFocus,primary:65,weight:100}})}},n2=class extends rD{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:L(1625,"Go to Previous Symbol Highlight"),precondition:W_,kbOpts:{kbExpr:S.editorTextFocus,primary:1089,weight:100}})}},s2=class extends M{constructor(){super({id:"editor.action.wordHighlight.trigger",label:L(1626,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:0,weight:100}})}run(n,e){const t=xs.get(e);t&&t.restoreViewState(!0)}};ce(xs.ID,xs,0);k(i2);k(n2);k(s2);Ir(zf);var kh=class extends Mt{constructor(n){super(n),this._inSelectionMode=n.inSelectionMode,this._wordNavigationType=n.wordNavigationType}runEditorCommand(n,e,t){if(!e.hasModel())return;const i=mo(e.getOption(148),e.getOption(147)),s=e.getModel(),o=e.getSelections(),r=o.length>1,a=o.map(l=>{const d=new B(l.positionLineNumber,l.positionColumn),c=this._move(i,s,d,this._wordNavigationType,r);return this._moveTo(l,c,this._inSelectionMode)});if(s.pushStackElement(),e._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>cR.fromModelSelection(l))),a.length===1){const l=new B(a[0].positionLineNumber,a[0].positionColumn);e.revealPosition(l,0)}}_moveTo(n,e,t){return t?new te(n.selectionStartLineNumber,n.selectionStartColumn,e.lineNumber,e.column):new te(e.lineNumber,e.column,e.lineNumber,e.column)}},Os=class extends kh{_move(n,e,t,i,s){return Cl.moveWordLeft(n,e,t,i,s)}},Ms=class extends kh{_move(n,e,t,i,s){return Cl.moveWordRight(n,e,t,i)}},o2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},r2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},a2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:2063,mac:{primary:527},weight:100}})}},l2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},d2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},c2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}},h2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},u2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},g2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},p2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:2065,mac:{primary:529},weight:100}})}},f2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},m2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},_2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}},v2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},b2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},C2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},Ph=class extends Mt{constructor(n){super({canTriggerInlineEdits:!0,...n}),this._whitespaceHeuristics=n.whitespaceHeuristics,this._wordNavigationType=n.wordNavigationType}runEditorCommand(n,e,t){const i=n?.get(ct);if(!e.hasModel()||!i)return;const s=mo(e.getOption(148),e.getOption(147)),o=e.getModel(),r=e.getSelections(),a=e.getOption(10),l=e.getOption(15),d=i.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),c=e._getViewModel(),h=r.map(u=>{const g=this._delete({wordSeparators:s,model:o,selection:u,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:e.getOption(13),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:d,autoClosedCharacters:c.getCursorAutoClosedCharacters()},this._wordNavigationType);return new vl(g,"")});e.pushUndoStop(),e.executeCommands(this.id,h),e.pushUndoStop()}},V_=class extends Ph{_delete(n,e){const t=Cl.deleteWordLeft(n,e);return t||new y(1,1,1,1)}},B_=class extends Ph{_delete(n,e){const t=Cl.deleteWordRight(n,e);if(t)return t;const i=n.model.getLineCount(),s=n.model.getLineMaxColumn(i);return new y(i,s,i,s)}},S2=class extends V_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:S.writable})}},w2=class extends V_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:S.writable})}},y2=class extends V_{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},x2=class extends B_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:S.writable})}},I2=class extends B_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:S.writable})}},L2=class extends B_{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},D2=class extends M{constructor(){super({id:"deleteInsideWord",precondition:S.writable,label:L(1628,"Delete Word"),metadata:{description:L(1629,"Delete the word at the cursor"),args:[{name:"args",schema:{type:"object",properties:{onlyWord:{type:"boolean",default:!1,description:m(1627,"Delete only the word and leave surrounding whitespace")}}}}]}})}run(n,e,t){if(!e.hasModel())return;const i=!!(t&&typeof t=="object"&&t.onlyWord),s=mo(e.getOption(148),e.getOption(147)),o=e.getModel(),r=e.getSelections().map(a=>{const l=Cl.deleteInsideWord(s,o,a,i);return new vl(l,"")});e.pushUndoStop(),e.executeCommands(this.id,r),e.pushUndoStop()}};G(new o2);G(new r2);G(new a2);G(new l2);G(new d2);G(new c2);G(new g2);G(new p2);G(new f2);G(new m2);G(new _2);G(new v2);G(new h2);G(new u2);G(new b2);G(new C2);G(new S2);G(new w2);G(new y2);G(new x2);G(new I2);G(new L2);k(D2);var E2=class extends Ph{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(n,e){const t=oh.deleteWordPartLeft(n);return t||new y(1,1,1,1)}},R2=class extends Ph{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(n,e){const t=oh.deleteWordPartRight(n);if(t)return t;const i=n.model.getLineCount(),s=n.model.getLineMaxColumn(i);return new y(i,s,i,s)}},aD=class extends kh{_move(n,e,t,i,s){return oh.moveWordPartLeft(n,e,t,s)}},T2=class extends aD{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};Re.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var N2=class extends aD{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};Re.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var lD=class extends kh{_move(n,e,t,i,s){return oh.moveWordPartRight(n,e,t)}},k2=class extends lD{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},P2=class extends lD{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};G(new E2);G(new R2);G(new T2);G(new N2);G(new k2);G(new P2);var zC=class extends O{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(n){super(),this.editor=n,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const n=qt.get(this.editor);if(n&&this.editor.hasModel()){let e=this.editor.getOptions().get(105);e||(this.editor.isSimpleWidget?e=new Lt(m(1427,"Cannot edit in read-only input")):e=new Lt(m(1428,"Cannot edit in read-only editor"))),n.showMessage(e,this.editor.getPosition())}}};ce(zC.ID,zC,2);var O2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},jC=function(n,e){return function(t,i){e(t,i,n)}},$f=class extends O{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=Ne(this,void 0);const s=Zd("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),o=Zd("_textModel.onDidChangeContent",qe.debounce(r=>this._textModel.onDidChangeContent(r),()=>{},100));this._register(bl(async(r,a)=>{s.read(r),o.read(r);const l=a.add(new B0),d=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(d,void 0)}))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const s=i.asListOfDocumentSymbols().filter(o=>e.contains(o.range.startLineNumber)&&!e.contains(o.range.endLineNumber));return s.sort(Cv(so(o=>o.range.endLineNumber-o.range.startLineNumber,oo))),s.map(o=>({name:o.name,kind:o.kind,startLineNumber:o.range.startLineNumber}))}getAt(e,t){const i=this._currentModel.read(t);if(!i)return[];const s=i.asListOfDocumentSymbols().filter(o=>new rt(o.range.startLineNumber,o.range.endLineNumber).contains(e));return s.length===0?[]:(s.sort(Cv(so(o=>o.range.endLineNumber-o.range.startLineNumber,oo))),s.map(o=>({name:o.name,kind:o.kind,startLineNumber:o.range.startLineNumber})))}};$f=O2([jC(1,Z),jC(2,El)],$f);kw.setBreadcrumbsSourceFactory((n,e)=>e.createInstance($f,n));var dD=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ir=function(n,e){return function(t,i){e(t,i,n)}},Wc=class extends O{static{this.ID="editor.contrib.floatingToolbar"}constructor(e,t,i,s){super();const o=this._register(Be(e)),r=T(l=>o.model.read(l)?.uri),a=this._register(t.createInstance(Kf,$.EditorContent,e.contextKeyService,r));this._register(he(l=>{a.hasActions.read(l)&&l.store.add(o.createOverlayWidget({allowEditorOverflow:!1,domNode:a.element,minContentWidthInPx:Ce(0),position:Ce({preference:1})}))}))}};Wc=dD([ir(1,ie),ir(2,Oe),ir(3,Es)],Wc);var Kf=class extends O{constructor(e,t,i,s,o,r){super();const a=this._register(r.createMenu(e,t)),l=Dt(this,a.onDidChange,()=>a.getActions()),d=T(c=>{const h=l.read(c),{primary:u}=ES(h,()=>!0);return u.filter(g=>g.id!==Ma.ID)});this.hasActions=T(c=>d.read(c).length>0),this.element=Na("div.floating-menu-overlay-widget").root,this._register(ke(()=>this.element.remove())),this._register(he(c=>{const h=d.read(c),u=h.length>0,g=u?h[0].id:void 0,p=h.length===1;if(this.element.classList.toggle("single-button",p),this.element.style.height=p?"28px":"26px",!u)return;const f=s.createInstance(e0,this.element,e,{actionViewItemProvider:(_,v)=>{if(_ instanceof ro)return s.createInstance(class extends cm{render(C){super.render(C),_.id===g&&this.element?.classList.add("primary")}updateLabel(){const C=o.lookupKeybinding(_.id),x=C?C.getLabel():void 0;this.options.label&&this.label&&(this.label.textContent=x?`${this._commandAction.label} (${x})`:this._commandAction.label)}},_,{...v,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});c.store.add(f),c.store.add(he(_=>{const v=i.read(_);f.context=v}))}))}};Kf=dD([ir(3,ie),ir(4,Oe),ir(5,Es)],Kf);ce(Wc.ID,Wc,1);var qC=class extends O{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(n){super(),this.editor=n,this.widget=null,tg&&(this._register(n.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const n=!this.editor.getOption(104);!this.widget&&n?this.widget=new M2(this.editor):this.widget&&!n&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}},M2=class cD extends O{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(de(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(de(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return cD.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};ce(qC.ID,qC,3);var A2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},$C=function(n,e){return function(t,i){e(t,i,n)}},Gf,ol=class extends O{static{Gf=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(Gf.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(Uc.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new V2(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};ol=Gf=A2([$C(1,JS),$C(2,Fn)],ol);var F2=class extends M{constructor(){super({id:"editor.action.inspectTokens",label:BD.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(n,e){ol.get(e)?.launch()}};function H2(n){let e="";for(let t=0,i=n.length;t<i;t++){const s=n.charCodeAt(t);switch(s){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(s)}}return e}function W2(n,e){const t=Uc.get(e);if(t)return t;const i=n.encodeLanguageId(e);return{getInitialState:()=>mT,tokenize:(s,o,r)=>rR(e,r),tokenizeEncoded:(s,o,r)=>hR(i,r)}}var V2=class hD extends O{static{this._ID="editor.contrib.inspectTokensWidget"}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=W2(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return hD._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const d=t.tokens1[l];if(e.column-1>=d.offset){i=l;break}}let s=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){s=l;break}const o=this._model.getLineContent(e.lineNumber);let r="";if(i<t.tokens1.length){const l=t.tokens1[i].offset,d=i+1<t.tokens1.length?t.tokens1[i+1].offset:o.length;r=o.substring(l,d)}jd(this._domNode,W("h2.tm-token",void 0,H2(r),W("span.tm-token-length",void 0,`${r.length} ${r.length===1?"char":"chars"}`))),z(this._domNode,W("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(s<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(s<<1)+1]):null;z(this._domNode,W("table.tm-metadata-table",void 0,W("tbody",void 0,W("tr",void 0,W("td.tm-metadata-key",void 0,"language"),W("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"token type"),W("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"font style"),W("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"foreground"),W("td.tm-metadata-value",void 0,`${a?me.Format.CSS.formatHex(a.foreground):"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"background"),W("td.tm-metadata-value",void 0,`${a?me.Format.CSS.formatHex(a.background):"-?-"}`))))),z(this._domNode,W("hr.tokens-inspect-separator")),i<t.tokens1.length&&z(this._domNode,W("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=Uc.getColorMap(),i=Fr.getLanguageId(e),s=Fr.getTokenType(e),o=Fr.getFontStyle(e),r=Fr.getForeground(e),a=Fr.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:s,fontStyle:o,foreground:t[r],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){const t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),s=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:s.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};ce(ol.ID,ol,4);k(F2);var B2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ku=function(n,e){return function(t,i){e(t,i,n)}},va,Zf=class{static{va=this}static{this.PREFIX="?"}constructor(e,t,i){this.quickInputService=e,this.keybindingService=t,this.contextKeyService=i,this.registry=ln.as(wr.Quickaccess)}provide(e){const t=new A;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const s=this.registry.getQuickAccessProvider(i.substr(va.PREFIX.length),this.contextKeyService);s?.prefix&&s.prefix!==va.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==va.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders(this.contextKeyService).sort((e,t)=>e.prefix.localeCompare(t.prefix)).flatMap(e=>this.createPicks(e))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,s=i||"…";return{prefix:i,label:s,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:m(1811,"{0}, {1}",s,t.description),description:t.description}})}};Zf=va=B2([ku(0,Di),ku(1,Oe),ku(2,ve)],Zf);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Zf,prefix:"",helpEntries:[{description:pT.helpQuickAccessActionLabel}]});var uD=class{constructor(n){this.options=n,this.rangeHighlightDecorationId=void 0}provide(n,e,t){const i=new A;n.canAcceptInBackground=!!this.options?.canAcceptInBackground,n.matchOnLabel=n.matchOnDescription=n.matchOnDetail=n.sortByLabel=!1;const s=i.add(new Je);return s.value=this.doProvide(n,e,t),i.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(n,e)})),i}doProvide(n,e,t){const i=new A,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const o={editor:s},r=tw(s);if(r){let a=s.saveViewState()??void 0;i.add(r.onDidChangeCursorPosition(()=>{a=s.saveViewState()??void 0})),o.restoreViewState=()=>{a&&s===this.activeTextEditorControl&&s.restoreViewState(a)},i.add(bw(e.onCancellationRequested)(()=>o.restoreViewState?.()))}i.add(ke(()=>this.clearDecorations(s))),i.add(this.provideWithTextEditor(o,n,e,t))}else i.add(this.provideWithoutTextEditor(n,e));return i}canProvideWithTextEditor(n){return!0}gotoLocation({editor:n},e){n.setSelection(e.range,"code.jump"),n.revealRangeInCenter(e.range,0),e.preserveFocus||n.focus();const t=this.getModel(n);if(t){const i=t.getLineContent(e.range.startLineNumber);vs(m(1381,"Line {0}, column {1}: {2}",e.range.startLineNumber,e.range.startColumn,i))}}getModel(n){return Pw(n)?n.getModel()?.modified:n.getModel()}addDecorations(n,e){n.changeDecorations(t=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:e,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:e,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:it(FS),position:nn.Full}}}],[o,r]=t.deltaDecorations(i,s);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:r}})}clearDecorations(n){const e=this.rangeHighlightDecorationId;e&&(n.changeDecorations(t=>{t.deltaDecorations([e.overviewRulerDecorationId,e.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}},U2=class Bd extends uD{static{this.GO_TO_LINE_PREFIX=":"}static{this.GO_TO_OFFSET_PREFIX="::"}static{this.ZERO_BASED_OFFSET_STORAGE_KEY="gotoLine.useZeroBasedOffset"}constructor(){super({canAcceptInBackground:!0})}get useZeroBasedOffset(){return this.storageService.getBoolean(Bd.ZERO_BASED_OFFSET_STORAGE_KEY,-1,!1)}set useZeroBasedOffset(e){this.storageService.store(Bd.ZERO_BASED_OFFSET_STORAGE_KEY,e,-1,0)}provideWithoutTextEditor(e){const t=m(1382,"Open a text editor first to go to a line or an offset.");return e.items=[{label:t}],e.ariaLabel=t,O.None}provideWithTextEditor(e,t,i){const s=e.editor,o=new A;t.ariaLabel=m(1383,"Go to line. Type a line number, optionally followed by colon and column number."),o.add(t.onDidAccept(d=>{const[c]=t.selectedItems;if(c){if(!c.lineNumber)return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:d.inBackground}),d.inBackground||t.hide()}}));const r={iconClass:pe.asClassName(V.indexZero),tooltip:m(1384,"Toggle Zero-Based Offset"),location:_E.Input,toggle:{checked:this.useZeroBasedOffset}},a=()=>{const d=t.value.trim().substring(Bd.GO_TO_LINE_PREFIX.length),{inOffsetMode:c,lineNumber:h,column:u,label:g}=this.parsePosition(s,d);if(t.buttons=c?[r]:[],t.items=[{lineNumber:h,column:u,label:g,ariaLabel:h?m(1385,"Go to line {0}, column {1}. Press Enter to navigate.",h,u||1):g}],!h){this.clearDecorations(s);return}const p=this.toRange(h,u);s.revealRangeInCenter(p,0),this.addDecorations(s,p)};o.add(t.onDidTriggerButton(d=>{d===r&&(this.useZeroBasedOffset=d.toggle?.checked??!this.useZeroBasedOffset,a())})),a(),o.add(t.onDidChangeValue(()=>a()));const l=tw(s);return l&&l.getOptions().get(76).renderType===2&&(l.updateOptions({lineNumbers:"on"}),o.add(ke(()=>l.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=this.getModel(e);if(!i)return{label:m(1386,"Open a text editor first to go to a line or an offset.")};if(t.startsWith(":")){let s=parseInt(t.substring(1),10);const o=i.getValueLength();if(isNaN(s))return{inOffsetMode:!0,label:this.useZeroBasedOffset?m(1387,"Type a character position to go to (from 0 to {0}).",o-1):m(1388,"Type a character position to go to (from 1 to {0}).",o)};{const r=s<0;this.useZeroBasedOffset||(s-=Math.sign(s)),r&&(s+=o);const a=i.getPositionAt(s),l=hd.visibleColumnFromColumn(i.getLineContent(a.lineNumber),a.column,i.getOptions().tabSize)+1;return{...a,inOffsetMode:!0,label:m(1389,"Press 'Enter' to go to line {0} at column {1}.",a.lineNumber,l)}}}else{const s=t.split(/,|:|#/),o=i.getLineCount();let r=parseInt(s[0]?.trim(),10);if(s.length<1||isNaN(r))return{label:m(1390,"Type a line number to go to (from 1 to {0}).",o)};r=r>=0?r:o+1+r,r=Math.min(Math.max(1,r),o);const a=i.getOptions().tabSize,l=i.getLineContent(r),d=hd.visibleColumnFromColumn(l,i.getLineMaxColumn(r),a)+1;let c=parseInt(s[1]?.trim(),10);if(s.length<2||isNaN(c))return{lineNumber:r,column:1,label:s.length<2?m(1391,"Press 'Enter' to go to line {0} or enter colon : to add a column number.",r):m(1392,"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).",r,d)};c=c>=0?c:d+c,c=Math.min(Math.max(1,c),d);const h=hd.columnFromVisibleColumn(l,c-1,a);return{lineNumber:r,column:h,label:m(1393,"Press 'Enter' to go to line {0} at column {1}.",r,c)}}}},z2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},KC=function(n,e){return function(t,i){e(t,i,n)}},Is=class extends U2{constructor(e,t){super(),this.editorService=e,this.storageService=t,this.onDidActiveTextEditorControlChange=qe.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};Is=z2([KC(0,$e),KC(1,Ti)],Is);var gD=class pD extends M{static{this.ID="editor.action.gotoLine"}constructor(){super({id:pD.ID,label:Gc.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:S.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Di).quickAccess.show(Is.GO_TO_LINE_PREFIX)}};k(gD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Is,prefix:Is.GO_TO_LINE_PREFIX,helpEntries:[{description:Gc.gotoLineActionLabel,commandId:gD.ID}]});var fD=class mD extends M{static{this.ID="editor.action.gotoOffset"}constructor(){super({id:mD.ID,label:Gc.gotoOffsetActionLabel,alias:"Go to Offset...",precondition:void 0})}run(e){e.get(Di).quickAccess.show(Is.GO_TO_OFFSET_PREFIX)}};k(fD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Is,prefix:Is.GO_TO_OFFSET_PREFIX,helpEntries:[{description:Gc.gotoOffsetActionLabel,commandId:fD.ID}]});var _D=[void 0,[]];function Pu(n,e,t=0,i=0){const s=e;return s.values&&s.values.length>1?j2(n,s.values,t,i):vD(n,e,t,i)}function j2(n,e,t,i){let s=0;const o=[];for(const r of e){const[a,l]=vD(n,r,t,i);if(typeof a!="number")return _D;s+=a,o.push(...l)}return[s,q2(o)]}function vD(n,e,t,i){const s=PS(e.normalized,e.normalizedLowercase,t,n,n.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],nh(s)]:_D}function q2(n){const e=n.sort((s,o)=>s.start-o.start),t=[];let i;for(const s of e)!i||!$2(i,s)?(i=s,t.push(s)):(i.start=Math.min(i.start,s.start),i.end=Math.max(i.end,s.end));return t}function $2(n,e){return!(n.end<e.start||e.end<n.start)}function GC(n){return n.startsWith('"')&&n.endsWith('"')}var bD=" ";function Xf(n){typeof n!="string"&&(n="");const e=n.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:s}=ZC(n),o=t.indexOf($u)>=0,r=GC(n);let a;const l=n.split(bD);if(l.length>1)for(const d of l){const c=GC(d),{pathNormalized:h,normalized:u,normalizedLowercase:g}=ZC(d);u&&(a||(a=[]),a.push({original:d,originalLowercase:d.toLowerCase(),pathNormalized:h,normalized:u,normalizedLowercase:g,expectContiguousMatch:c}))}return{original:n,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:s,values:a,containsPathSeparator:o,expectContiguousMatch:r}}function ZC(n){let e;vm?e=n.replace(/\//g,$u):e=n.replace(/\\/g,$u);const t=e.replace(/[\*\u2026\s"]/g,"").replace(/(?<=.)#$/,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function XC(n){return Array.isArray(n)?Xf(n.map(e=>e.original).join(bD)):Xf(n.original)}var K2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},YC=function(n,e){return function(t,i){e(t,i,n)}},Ud,eo=class extends uD{static{Ud=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,m(1394,"To go to a symbol, first open a text editor with symbol information.")),O.None}provideWithTextEditor(e,t,i,s){const o=e.editor,r=this.getModel(o);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,i,s):this.doProvideWithoutEditorSymbols(e,r,t,i):O.None}doProvideWithoutEditorSymbols(e,t,i,s){const o=new A;return this.provideLabelPick(i,m(1395,"The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,o)||s.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,i,s)))(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new im,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),i.complete(!0))}));return t.add(ke(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,s,o){const r=e.editor,a=new A;a.add(i.onDidAccept(h=>{const[u]=i.selectedItems;if(u&&u.range){if(i.keyMods.shift&&u.attach){u.attach(i.keyMods,h);return}this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,preserveFocus:h.inBackground}),o?.handleAccept?.(u,h.inBackground),h.inBackground||i.hide()}})),a.add(i.onDidTriggerItemButton(({item:h})=>{h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,s),d=a.add(new Je),c=async h=>{d?.value?.cancel(),i.busy=!1,d.value=new st,i.busy=!0;try{const u=Xf(i.value.substr(Ud.PREFIX.length).trim()),g=await this.doGetSymbolPicks(l,u,void 0,d.value.token,t);if(s.isCancellationRequested)return;if(g.length>0){if(i.items=g,h&&u.original.length===0){const p=p0(g,f=>!!(f.type!=="separator"&&f.range&&y.containsPosition(f.range.decoration,h)));p&&(i.activeItems=[p])}}else u.original.length>0?this.provideLabelPick(i,m(1396,"No matching editor symbols")):this.provideLabelPick(i,m(1397,"No editor symbols"))}finally{s.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue(()=>c(void 0))),c(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive(()=>{const[h]=i.activeItems;h&&h.range&&(r.revealRangeInCenter(h.range.selection,0),this.addDecorations(r,h.range.decoration))})),a}async doGetSymbolPicks(e,t,i,s,o){const r=await e;if(s.isCancellationRequested)return[];const a=t.original.indexOf(Ud.SCOPE_PREFIX)===0,l=a?1:0;let d,c;t.values&&t.values.length>1?(d=XC(t.values[0]),c=XC(t.values.slice(1))):d=t;let h;const u=this.options?.openSideBySideDirection?.();u&&(h=[{iconClass:u==="right"?pe.asClassName(V.splitHorizontal):pe.asClassName(V.splitVertical),tooltip:u==="right"?m(1398,"Open to the Side"):m(1399,"Open to the Bottom")}]);const g=[];for(let _=0;_<r.length;_++){const v=r[_],C=vT(v.name),x=`$(${gw.toIcon(v.kind).id}) ${C}`,I=x.length-C.length;let b=v.containerName;i?.extraContainerLabel&&(b?b=`${i.extraContainerLabel} • ${b}`:b=i.extraContainerLabel);let w,E,P,R;if(t.original.length>l){let F=!1;if(d!==t&&([w,E]=Pu(x,{...t,values:void 0},l,I),typeof w=="number"&&(F=!0)),typeof w!="number"&&([w,E]=Pu(x,d,l,I),typeof w!="number"))continue;if(!F&&c){if(b&&c.original.length>0&&([P,R]=Pu(b,c)),typeof P!="number")continue;typeof w=="number"&&(w+=P)}}const D=v.tags&&v.tags.indexOf(1)>=0;g.push({index:_,kind:v.kind,score:w,label:x,ariaLabel:kR(v.name,v.kind),description:b,highlights:D?void 0:{label:E,description:R},range:{selection:y.collapseToStart(v.selectionRange),decoration:v.range},uri:o.uri,symbolName:C,strikethrough:D,buttons:h})}const p=g.sort((_,v)=>a?this.compareByKindAndScore(_,v):this.compareByScore(_,v));let f=[];if(a){let x=function(){v&&typeof _=="number"&&C>0&&(v.label=Tm(Mu[_]||Ou,C))},_,v,C=0;for(const I of p)_!==I.kind?(x(),_=I.kind,C=1,v={type:"separator"},f.push(v)):C++,f.push(I);x()}else p.length>0&&(f=[{label:m(1400,"symbols ({0})",g.length),type:"separator"},...p]);return f}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){const i=Mu[e.kind]||Ou,s=Mu[t.kind]||Ou,o=i.localeCompare(s);return o===0?this.compareByScore(e,t):o}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};eo=Ud=K2([YC(0,Z),YC(1,El)],eo);var Ou=m(1401,"properties ({0})"),Mu={5:m(1402,"methods ({0})"),11:m(1403,"functions ({0})"),8:m(1404,"constructors ({0})"),12:m(1405,"variables ({0})"),4:m(1406,"classes ({0})"),22:m(1407,"structs ({0})"),23:m(1408,"events ({0})"),24:m(1409,"operators ({0})"),10:m(1410,"interfaces ({0})"),2:m(1411,"namespaces ({0})"),3:m(1412,"packages ({0})"),25:m(1413,"type parameters ({0})"),1:m(1414,"modules ({0})"),6:m(1415,"properties ({0})"),9:m(1416,"enumerations ({0})"),21:m(1417,"enumeration members ({0})"),14:m(1418,"strings ({0})"),0:m(1419,"files ({0})"),17:m(1420,"arrays ({0})"),15:m(1421,"numbers ({0})"),16:m(1422,"booleans ({0})"),18:m(1423,"objects ({0})"),19:m(1424,"keys ({0})"),7:m(1425,"fields ({0})"),13:m(1426,"constants ({0})")},G2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Au=function(n,e){return function(t,i){e(t,i,n)}},Yf=class extends eo{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=qe.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};Yf=G2([Au(0,$e),Au(1,Z),Au(2,El)],Yf);var CD=class SD extends M{static{this.ID="editor.action.quickOutline"}constructor(){super({id:SD.ID,label:ig.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:S.hasDocumentSymbolProvider,kbOpts:{kbExpr:S.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Di).quickAccess.show(eo.PREFIX,{itemActivation:ET.NONE})}};k(CD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Yf,prefix:eo.PREFIX,helpEntries:[{description:ig.quickOutlineActionLabel,prefix:eo.PREFIX,commandId:CD.ID},{description:ig.quickOutlineByCategoryActionLabel,prefix:eo.PREFIX_BY_CATEGORY}]});function Z2(n){const e=new Map;for(const t of n)e.set(t,(e.get(t)??0)+1);return e}var X2=class zd{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),s=new Map,o=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const d=this.computeSimilarityScore(l,i,s);d>0&&o.push({key:r,score:d})}}return o}static termFrequencies(e){return Z2(zd.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const s=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(s.length>1)for(const o of s)o.length>2&&/\p{Letter}{3,}/gu.test(o)&&(yield t(o))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const i=[];for(const s of t.textChunks){const o=zd.termFrequencies(s);for(const r of o.keys())this.chunkOccurrences.set(r,(this.chunkOccurrences.get(r)??0)+1);i.push({text:s,tf:o})}this.chunkCount+=i.length,this.documents.set(t.key,{chunks:i})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const s of i.tf.keys()){const o=this.chunkOccurrences.get(s);if(typeof o=="number"){const r=o-1;r<=0?this.chunkOccurrences.delete(s):this.chunkOccurrences.set(s,r)}}}}computeSimilarityScore(e,t,i){let s=0;for(const[o,r]of Object.entries(t)){const a=e.tf.get(o);if(!a)continue;let l=i.get(o);typeof l!="number"&&(l=this.computeIdf(o),i.set(o,l));const d=a*l;s+=d*r}return s}computeEmbedding(e){const t=zd.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,s]of e){const o=this.computeIdf(i);o>0&&(t[i]=s*o)}return t}};function Y2(n){const e=n.slice(0);e.sort((i,s)=>s.score-i.score);const t=e[0]?.score??0;if(t>0)for(const i of e)i.score/=t;return e}var rs;(function(n){n[n.NO_ACTION=0]="NO_ACTION",n[n.CLOSE_PICKER=1]="CLOSE_PICKER",n[n.REFRESH_PICKER=2]="REFRESH_PICKER",n[n.REMOVE_ITEM=3]="REMOVE_ITEM"})(rs||(rs={}));function Fu(n){return Array.isArray(n.items)}function JC(n){const e=n;return!!e.picks&&e.additionalPicks instanceof Promise}var J2=class extends O{constructor(n,e){super(),this.prefix=n,this.options=e}provide(n,e,t){const i=new A;n.canAcceptInBackground=!!this.options?.canAcceptInBackground,n.matchOnLabel=n.matchOnDescription=n.matchOnDetail=n.sortByLabel=!1;let s;const o=i.add(new Je),r=async()=>{s?.dispose(!0),n.busy=!1;const l=o.value=new A;s=l.add(new st(e));const d=s.token;let c=n.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(c=c.trim());const h=this._getPicks(c,l,d,t),u=(p,f)=>{let _,v;if(Fu(p)?(_=p.items,v=p.active):_=p,_.length===0){if(f)return!1;(c.length>0||n.hideInput)&&this.options?.noResultsPick&&(tE(this.options.noResultsPick)?_=[this.options.noResultsPick(c)]:_=[this.options.noResultsPick])}return n.items=_,v&&(n.activeItems=[v]),!0},g=async p=>{let f=!1,_=!1;await Promise.all([(async()=>{typeof p.mergeDelay=="number"&&(await Xc(p.mergeDelay),d.isCancellationRequested)||_||(f=u(p.picks,!0))})(),(async()=>{n.busy=!0;try{const v=await p.additionalPicks;if(d.isCancellationRequested)return;let C,x;Fu(p.picks)?(C=p.picks.items,x=p.picks.active):C=p.picks;let I,b;if(Fu(v)?(I=v.items,b=v.active):I=v,I.length>0||!f){let w;if(!x&&!b){const E=n.activeItems[0];E&&C.indexOf(E)!==-1&&(w=E)}u({items:[...C,...I],active:x||b||w})}}finally{d.isCancellationRequested||(n.busy=!1),_=!0}})()])};if(h!==null)if(JC(h))await g(h);else if(!(h instanceof Promise))u(h);else{n.busy=!0;try{const p=await h;if(d.isCancellationRequested)return;JC(p)?await g(p):u(p)}finally{d.isCancellationRequested||(n.busy=!1)}}};i.add(n.onDidChangeValue(()=>r())),r(),i.add(n.onDidAccept(l=>{if(t?.handleAccept){l.inBackground||n.hide(),t.handleAccept?.(n.activeItems[0],l.inBackground);return}const[d]=n.selectedItems;if(typeof d?.accept=="function"){if(u0(n.keyMods)&&d.attach){d.attach(n.keyMods,l);return}l.inBackground||n.hide(),d.accept(n.keyMods,l)}}));const a=async(l,d)=>{if(typeof d.trigger!="function")return;const c=d.buttons?.indexOf(l)??-1;if(c>=0){const h=d.trigger(c,n.keyMods),u=typeof h=="number"?h:await h;if(e.isCancellationRequested)return;switch(u){case rs.NO_ACTION:break;case rs.CLOSE_PICKER:n.hide();break;case rs.REFRESH_PICKER:r();break;case rs.REMOVE_ITEM:{const g=n.items.indexOf(d);if(g!==-1){const p=n.items.slice(),f=p.splice(g,1),_=n.activeItems.filter(C=>C!==f[0]),v=n.keepScrollPosition;n.keepScrollPosition=!0,n.items=p,_&&(n.activeItems=_),n.keepScrollPosition=v}break}}}};return i.add(n.onDidTriggerItemButton(({button:l,item:d})=>a(l,d))),i.add(n.onDidTriggerSeparatorButton(({button:l,separator:d})=>a(l,d))),i}},wD=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Qn=function(n,e){return function(t,i){e(t,i,n)}},Gs,ze,Jf=class extends J2{static{Gs=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=zD(RE,rE)}constructor(e,t,i,s,o,r){super(Gs.PREFIX,e),this.keybindingService=i,this.commandService=s,this.telemetryService=o,this.dialogService=r,this.commandsHistory=this._register(t.createInstance(Qf)),this.options=e}async _getPicks(e,t,i,s){const o=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const r=bw(()=>{const g=new X2;g.updateDocuments(o.map(f=>({key:f.commandId,textChunks:[this.getTfIdfChunk(f)]})));const p=g.calculateScores(e,i);return Y2(p).filter(f=>f.score>Gs.TFIDF_THRESHOLD).slice(0,Gs.TFIDF_MAX_RESULTS)}),a=[];for(const g of o){const p=Gs.WORD_FILTER(e,g.label)??void 0;let f;if(g.commandAlias&&(f=Gs.WORD_FILTER(e,g.commandAlias)??void 0),p||f)g.highlights={label:p,detail:this.options.showAlias?f:void 0},a.push(g);else if(e===g.commandId)a.push(g);else if(e.length>=3){const _=r();if(i.isCancellationRequested)return[];const v=_.find(C=>C.key===g.commandId);v&&(g.tfIdfScore=v.score,a.push(g))}}const l=new Map;for(const g of a){const p=l.get(g.label);p?(g.description=g.commandId,p.description=p.commandId):l.set(g.label,g)}a.sort((g,p)=>{if(g.tfIdfScore&&p.tfIdfScore)return g.tfIdfScore===p.tfIdfScore?g.label.localeCompare(p.label):p.tfIdfScore-g.tfIdfScore;if(g.tfIdfScore)return 1;if(p.tfIdfScore)return-1;const f=this.commandsHistory.peek(g.commandId),_=this.commandsHistory.peek(p.commandId);if(f&&_)return f>_?-1:1;if(f)return-1;if(_)return 1;if(this.options.suggestedCommandIds){const x=this.options.suggestedCommandIds.has(g.commandId),I=this.options.suggestedCommandIds.has(p.commandId);if(x&&I)return 0;if(x)return-1;if(I)return 1}const v=g.commandCategory===Pf.Developer.value,C=p.commandCategory===Pf.Developer.value;return v&&!C?1:!v&&C?-1:g.label.localeCompare(p.label)});const d=[];let c=!1,h=!0,u=!!this.options.suggestedCommandIds;for(let g=0;g<a.length;g++){const p=a[g],f=!!this.commandsHistory.peek(p.commandId);g===0&&f&&(d.push({type:"separator",label:m(1803,"recently used")}),c=!0),h&&p.tfIdfScore!==void 0&&(d.push({type:"separator",label:m(1804,"similar commands")}),h=!1),u&&p.tfIdfScore===void 0&&!f&&this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1805,"commonly used")}),c=!0,u=!1),c&&p.tfIdfScore===void 0&&!f&&!this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1806,"other commands")}),c=!1),d.push(this.toCommandPick(p,s,f))}return this.hasAdditionalCommandPicks(e,i)?{picks:d,additionalPicks:(async()=>{const g=await this.getAdditionalCommandPicks(o,a,e,i);if(i.isCancellationRequested)return[];const p=g.map(f=>this.toCommandPick(f,s));return h&&p[0]?.type!=="separator"&&p.unshift({type:"separator",label:m(1807,"similar commands")}),p})()}:d}toCommandPick(e,t,i=!1){if(e.type==="separator")return e;const s=e.tooltip??e.commandDescription?.value,o=this.keybindingService.lookupKeybinding(e.commandId),r=o?m(1808,"{0}, {1}",e.label,o.getAriaLabel()):e.label,a=e.buttons||[],l=i?[...a,{iconClass:pe.asClassName(V.close),tooltip:m(1809,"Remove from Recently Used")}]:e.buttons;return{...e,tooltip:s,ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:o,buttons:l,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(d){Hn(d)||this.dialogService.error(m(1810,"Command '{0}' resulted in an error",e.label),sc(d))}},trigger:i?(d,c)=>d===a.length?(this.commandsHistory.remove(e.commandId),rs.REMOVE_ITEM):e.trigger?e.trigger(d,c):rs.NO_ACTION:e.trigger}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let s=e;return t&&t!==e&&(s+=` - ${t}`),i&&i.value!==e&&(s+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),s}};Jf=Gs=wD([Qn(1,ie),Qn(2,Oe),Qn(3,ht),Qn(4,Ds),Qn(5,om)],Jf);var Qf=class extends O{static{ze=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===bm.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=ze.getConfiguredCommandHistoryLength(this.configurationService),ze.cache&&ze.cache.limit!==this.configuredCommandsHistoryLength&&(ze.cache.limit=this.configuredCommandsHistoryLength,ze.hasChanges=!0))}load(){const e=this.storageService.get(ze.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(s){this.logService.error(`[CommandsHistory] invalid data: ${s}`)}const i=ze.cache=new dl(this.configuredCommandsHistoryLength,1);if(t){let s;t.usesLRU?s=t.entries:s=t.entries.sort((o,r)=>o.value-r.value),s.forEach(o=>i.set(o.key,o.value))}ze.counter=this.storageService.getNumber(ze.PREF_KEY_COUNTER,0,ze.counter)}push(e){ze.cache&&(ze.cache.set(e,ze.counter++),ze.hasChanges=!0)}peek(e){return ze.cache?.peek(e)}remove(e){ze.cache&&(ze.cache.delete(e),ze.hasChanges=!0)}saveState(){if(!ze.cache||!ze.hasChanges)return;const e={usesLRU:!0,entries:[]};ze.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(ze.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(ze.PREF_KEY_COUNTER,ze.counter,0,0),ze.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const t=e.getValue().workbench?.commandPalette?.history;return typeof t=="number"?t:ze.DEFAULT_COMMANDS_HISTORY_LENGTH}};Qf=ze=wD([Qn(0,Ti),Qn(1,xe),Qn(2,Pt)],Qf);var Q2=class extends Jf{constructor(n,e,t,i,s,o){super(n,e,t,i,s,o)}getCodeEditorCommandPicks(){const n=this.activeTextEditorControl;if(!n)return[];const e=[];for(const t of n.getSupportedActions()){let i;t.metadata?.description&&(qD(t.metadata.description)?i=t.metadata.description:i={original:t.metadata.description,value:t.metadata.description}),e.push({commandId:t.id,commandAlias:t.alias,commandDescription:i,label:bE(t.label)||t.id})}return e}},e5=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Mo=function(n,e){return function(t,i){e(t,i,n)}},rl=class extends Q2{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,s,o,r){super({showAlias:!1},e,i,s,o,r),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};rl=e5([Mo(0,ie),Mo(1,$e),Mo(2,Oe),Mo(3,ht),Mo(4,Ds),Mo(5,om)],rl);var yD=class xD extends M{static{this.ID="editor.action.quickCommand"}constructor(){super({id:xD.ID,label:ow.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:S.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Di).quickAccess.show(rl.PREFIX)}};k(yD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:rl,prefix:rl.PREFIX,helpEntries:[{description:ow.quickCommandHelp,commandId:yD.ID}]});var t5=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ao=function(n,e){return function(t,i){e(t,i,n)}},em=class extends uo{constructor(e,t,i,s,o,r,a){super(!0,e,t,i,s,o,r,a)}};em=t5([Ao(1,ve),Ao(2,$e),Ao(3,Et),Ao(4,ie),Ao(5,Ti),Ao(6,xe)],em);ce(uo.ID,em,4);var i5=class extends M{constructor(){super({id:"editor.action.toggleHighContrast",label:rT.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(n,e){const t=n.get(JS),i=t.getColorTheme();Ta(i.type)?(t.setTheme(this._originalThemeName||(ov(i.type)?"vs-dark":"vs")),this._originalThemeName=null):(t.setTheme(ov(i.type)?qT:ZD),this._originalThemeName=i.themeName)}};k(i5);var ID=class{constructor(n,e,t,i,s){this._onDidChange=new Aa,this._onDidExtraLibsChange=new Aa,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(n),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(n,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===n)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:n,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[t];s&&s.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(n){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),n&&n.length>0)for(const e of n){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let s=1;this._removedExtraLibs[t]&&(s=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(n){this._compilerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(n){this._workerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(n){this._inlayHintsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(n){}setEagerModelSync(n){this._eagerModelSync=n}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(void 0)}},LD={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},n5=new ID({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},LD),s5=new ID({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},LD);function DD(){return U(()=>import("./tsMode-BjCfzjtF.js"),__vite__mapDeps([0,1,2,3,4]))}K.onLanguage("typescript",()=>DD().then(n=>n.setupTypeScript(n5)));K.onLanguage("javascript",()=>DD().then(n=>n.setupJavaScript(s5)));var o5=Object.defineProperty,r5=(n,e,t)=>e in n?o5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ne=(n,e,t)=>r5(n,typeof e!="symbol"?e+"":e,t),ld,QC,dd,Hu,cd;function a5(n){return n.method!==void 0}var eS;(function(n){function e(t){return t}n.create=e})(eS||(eS={}));var Si;(function(n){n.parseError=-32700,n.invalidRequest=-32600,n.methodNotFound=-32601,n.invalidParams=-32602,n.internalError=-32603;function e(o){return-32099<=o&&o<=-32e3}n.isServerError=e;function t(o){if(!e(o))throw new Error("Invalid range for a server error.");return o}n.serverError=t,n.unexpectedServerError=-32e3;function i(o){return!0}n.isApplicationError=i;function s(o){return o}n.applicationError=s,n.genericApplicationError=-320100})(Si||(Si={}));var ED=class{constructor(){ne(this,"listeners",new Set),ne(this,"event",n=>(this.listeners.add(n),{dispose:()=>{this.listeners.delete(n)}}))}fire(n){this.listeners.forEach(e=>e(n))}},l5=class{constructor(n){ne(this,"_value"),ne(this,"eventEmitter"),this._value=n,this.eventEmitter=new ED}get value(){return this._value}set value(n){this._value!==n&&(this._value=n,this.eventEmitter.fire(n))}get onChange(){return this.eventEmitter.event}};function d5(n,e){const t=setTimeout(e,n);return{dispose:()=>clearTimeout(t)}}function Wu(n,e,t){return n instanceof Set?(n.add(e),{dispose:()=>n.delete(e)}):(n.set(e,t),{dispose:()=>n.delete(e)})}var c5=class{constructor(){ne(this,"_state","none"),ne(this,"promise"),ne(this,"resolve",()=>{}),ne(this,"reject",()=>{}),this.promise=new Promise((n,e)=>{this.resolve=n,this.reject=e})}get state(){return this._state}},$j=(ld=class{constructor(){ne(this,"_unprocessedMessages",[]),ne(this,"_messageListener"),ne(this,"id",ld.id++),ne(this,"_state",new l5({state:"open"})),ne(this,"state",this._state)}setListener(n){if(this._messageListener=n,!!n)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(n){return this._sendImpl(n)}_dispatchReceivedMessage(n){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(n):this._unprocessedMessages.push(n)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(n){return new h5(this,n??new u5)}},ne(ld,"id",0),ld),h5=class{constructor(n,e){ne(this,"baseStream"),ne(this,"logger"),this.baseStream=n,this.logger=e}get state(){return this.baseStream.state}setListener(n){if(n===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),n(e)})}send(n){return this.logger.log(this.baseStream,"outgoing",n),this.baseStream.send(n)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},u5=class{log(n,e,t){console.log(`${e==="incoming"?"<-":"->"} [${n.toString()}] ${JSON.stringify(t)}`)}},g5=class RD{constructor(e){ne(this,"connect"),this.connect=e}mapContext(e){return new RD(t=>this.connect(t?p5(t,e):void 0))}};function p5(n,e){return{handleNotification:(t,i)=>n.handleNotification(t,e(i)),handleRequest:(t,i,s)=>n.handleRequest(t,i,e(s))}}var f5=class TD{constructor(e,t,i){ne(this,"_stream"),ne(this,"_listener"),ne(this,"_logger"),ne(this,"_unprocessedResponses",new Map),ne(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(s=>{a5(s)?s.id===void 0?this._processNotification(s):this._processRequest(s):this._processResponse(s)})}static createChannel(e,t){let i=!1;return new g5(s=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new TD(e,s,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(s){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${s}`,message:e,exception:s}),t={error:{code:Si.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Si.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const s={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(s.id),new Promise((o,r)=>{const a=""+s.id;this._unprocessedResponses.set(a,l=>{"result"in l?o({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),o({error:l.error}))}),this._stream.send(s).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},nr;(function(n){function e(){return{deserializeFromJson:s=>({hasErrors:!1,value:s}),serializeToJson:s=>s}}n.sAny=e;function t(){return{deserializeFromJson:s=>({hasErrors:!1,value:{}}),serializeToJson:s=>({})}}n.sEmptyObject=t;function i(){return{deserializeFromJson:s=>({hasErrors:!1,value:void 0}),serializeToJson:s=>null}}n.sVoidFromNull=i})(nr||(nr={}));var ND=Symbol("OptionalMethodNotFound"),kD=class{contextualize(n){return new m5(this,n)}},m5=class extends kD{constructor(n,e){super(),ne(this,"underylingTypedChannel"),ne(this,"converters"),this.underylingTypedChannel=n,this.converters=e}async request(n,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(n,e,i)}async notify(n,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(n,e,i)}registerNotificationHandler(n,e){return this.underylingTypedChannel.registerNotificationHandler(n,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(n,e){return this.underylingTypedChannel.registerRequestHandler(n,async(t,i,s)=>await e(t,i,await this.converters.getNewContext(s)))}},tS=class PD extends kD{constructor(e,t={}){super(),ne(this,"channelCtor"),ne(this,"_requestSender"),ne(this,"_handler",new Map),ne(this,"_unknownNotificationHandler",new Set),ne(this,"_timeout"),ne(this,"sendExceptionDetails",!1),ne(this,"_logger"),ne(this,"listeningDeferred",new c5),ne(this,"onListening",this.listeningDeferred.promise),ne(this,"_requestDidErrorEventEmitter",new ED),ne(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=d5(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new PD(f5.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const s=this._handler.get(e.method);if(!s)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Si.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(s.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Si.invalidRequest,message:r,data:{method:e.method}}}}const o=s.requestType.paramsSerializer.deserializeFromJson(e.params);if(o.hasErrors){const r=`Got invalid params: ${o.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:o.errorMessage}}),{error:{code:Si.invalidParams,message:r,data:{errors:o.errorMessage}}}}else{const r=o.value;let a;try{const l=await s.handler(r,t,i);if("error"in l||"errorMessage"in l){const d=l.error?s.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Si.genericApplicationError,message:l.errorMessage||"An error was returned",data:d}}}else a={result:s.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nS?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Si.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const s=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${s}`,data:{requestObject:e,errorMessage:s.errorMessage}});return}const o=s.value;for(const r of i.handlers)try{r(o,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return Wu(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return Wu(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return Wu(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const s=e.paramsSerializer.serializeToJson(t);iS(s);const o=await this._requestSender.sendRequest({method:e.method,params:s},i);if("error"in o){if(e.isOptional&&o.error.code===Si.methodNotFound)return ND;let r;if(o.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(o.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nS(o.error.message,r,o.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(o.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+`
|
|
62
|
+
`)}};Bf=A_([Da(1,Ls)],Bf);function Uf(n){return`U+${n.toString(16).padStart(4,"0")}`}function Nu(n){let e=`\`${Uf(n)}\``;return LS.isInvisibleCharacter(n)||(e+=` "${`${VB(n)}`}"`),e}function VB(n){return n===96?"`` ` ``":"`"+String.fromCodePoint(n)+"`"}function GL(n,e){return Aw.computeUnicodeHighlightReason(n,e)}var ZL=class XL{constructor(){this.map=new Map}static{this.instance=new XL}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let s=this.map.get(i);return s||(s=se.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,s)),s}},BB=class extends M{constructor(){super({id:Tl.ID,label:L(1604,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=m(1596,"Disable Highlight In Comments")}async run(n,e){const t=n.get(xe);t&&this.runAction(t)}async runAction(n){await n.updateValue(Tn.includeComments,!1,2)}},UB=class extends M{constructor(){super({id:Tl.ID,label:L(1605,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=m(1597,"Disable Highlight In Strings")}async run(n,e){const t=n.get(xe);t&&this.runAction(t)}async runAction(n){await n.updateValue(Tn.includeStrings,!1,2)}},Tl=class YL extends lt{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:YL.ID,title:L(1606,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1598,"Disable Ambiguous Highlight")}async run(e,t){const i=e.get(xe);i&&this.runAction(i)}async runAction(e){await e.updateValue(Tn.ambiguousCharacters,!1,2)}},F_=class JL extends lt{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:JL.ID,title:L(1607,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1599,"Disable Invisible Highlight")}async run(e,t){const i=e.get(xe);i&&this.runAction(i)}async runAction(e){await e.updateValue(Tn.invisibleCharacters,!1,2)}},H_=class QL extends lt{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:QL.ID,title:L(1608,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=m(1600,"Disable Non ASCII Highlight")}async run(e,t){const i=e.get(xe);i&&this.runAction(i)}async runAction(e){await e.updateValue(Tn.nonBasicASCII,!1,2)}},eD=class tD extends lt{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:tD.ID,title:L(1609,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){const{codePoint:i,reason:s,inString:o,inComment:r}=t,a=String.fromCodePoint(i),l=e.get(Di),d=e.get(xe);function c(p){return LS.isInvisibleCharacter(p)?m(1601,"Exclude {0} (invisible character) from being highlighted",Uf(p)):m(1602,"Exclude {0} from being highlighted",`${Uf(p)} "${a}"`)}const h=[];if(s.kind===0)for(const p of s.notAmbiguousInLocales)h.push({label:m(1603,'Allow unicode characters that are more common in the language "{0}".',p),run:async()=>{jB(d,[p])}});if(h.push({label:c(i),run:()=>zB(d,[i])}),r){const p=new BB;h.push({label:p.label,run:async()=>p.runAction(d)})}else if(o){const p=new UB;h.push({label:p.label,run:async()=>p.runAction(d)})}function u(p){return typeof p.desc.title=="string"?p.desc.title:p.desc.title.value}if(s.kind===0){const p=new Tl;h.push({label:u(p),run:async()=>p.runAction(d)})}else if(s.kind===1){const p=new F_;h.push({label:u(p),run:async()=>p.runAction(d)})}else if(s.kind===2){const p=new H_;h.push({label:u(p),run:async()=>p.runAction(d)})}else qB(s);const g=await l.pick(h,{title:KL});g&&await g.run()}};async function zB(n,e){const t=n.getValue(Tn.allowedCharacters);let i;typeof t=="object"&&t?i=t:i={};for(const s of e)i[String.fromCodePoint(s)]=!0;await n.updateValue(Tn.allowedCharacters,i,2)}async function jB(n,e){const t=n.inspect(Tn.allowedLocales).user?.value;let i;typeof t=="object"&&t?i=Object.assign({},t):i={};for(const s of e)i[s]=!0;await n.updateValue(Tn.allowedLocales,i,2)}function qB(n){throw new Error(`Unexpected value: ${n}`)}fe(Tl);fe(F_);fe(H_);fe(eD);ce(sl.ID,sl,1);Co.register(Bf);var $B=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},BC=function(n,e){return function(t,i){e(t,i,n)}},iD="ignoreUnusualLineTerminators";function KB(n,e,t){n.setModelProperty(e.uri,iD,t)}function GB(n,e){return n.getModelProperty(e.uri,iD)}var Hc=class extends O{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||GB(this._codeEditorService,e)===!0||this._editor.getOption(104))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let t;try{this._isPresentingDialog=!0,t=await this._dialogService.confirm({title:m(1610,"Unusual Line Terminators"),message:m(1611,"Detected unusual line terminators"),detail:m(1612,"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`.",Vi(e.uri)),primaryButton:m(1613,"&&Remove Unusual Line Terminators"),cancelButton:m(1614,"Ignore")})}finally{this._isPresentingDialog=!1}if(!t.confirmed){KB(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}};Hc=$B([BC(1,om),BC(2,$e)],Hc);ce(Hc.ID,Hc,1);var ZB=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},XB=function(n,e){return function(t,i){e(t,i,n)}},UC=class{constructor(){this.selector={language:"*"}}provideDocumentHighlights(n,e,t){if(n.isDisposed())return;const i=[],s=n.getWordAtPosition({lineNumber:e.lineNumber,column:e.column});return s?n.findMatches(s.word,!0,!1,!0,pv,!1).map(o=>({range:o.range,kind:Kd.Text})):Promise.resolve(i)}provideMultiDocumentHighlights(n,e,t,i){if(n.isDisposed())return;const s=new Rn,o=n.getWordAtPosition({lineNumber:e.lineNumber,column:e.column});if(!o)return Promise.resolve(s);for(const r of[n,...t]){if(r.isDisposed())continue;const a=r.findMatches(o.word,!0,!1,!0,pv,!1).map(l=>({range:l.range,kind:Kd.Text}));a&&s.set(r.uri,a)}return s}},zf=class extends O{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new UC)),this._register(e.multiDocumentHighlightProvider.register("*",new UC))}};zf=ZB([XB(0,Z)],zf);var nD=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Qi=function(n,e){return function(t,i){e(t,i,n)}},Fe,jf,W_=new oe("hasWordHighlights",!1);function sD(n,e,t,i){const s=n.ordered(e);return gm(s.map(o=>()=>Promise.resolve(o.provideDocumentHighlights(e,t,i)).then(void 0,tt)),o=>o!=null).then(o=>{if(o){const r=new Rn;return r.set(e.uri,o),r}return new Rn})}function YB(n,e,t,i,s){const o=n.ordered(e);return gm(o.map(r=>()=>{const a=s.filter(l=>yE(l)).filter(l=>zR(r.selector,l.uri,l.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(r.provideMultiDocumentHighlights(e,t,a,i)).then(void 0,tt)}),r=>r!=null)}var oD=class{constructor(n,e,t){this._model=n,this._selection=e,this._wordSeparators=t,this._wordRange=this._getCurrentWordRange(n,e),this._result=null}get result(){return this._result||(this._result=pt(n=>this._compute(this._model,this._selection,this._wordSeparators,n))),this._result}_getCurrentWordRange(n,e){const t=n.getWordAtPosition(e.getPosition());return t?new y(e.startLineNumber,t.startColumn,e.startLineNumber,t.endColumn):null}cancel(){this.result.cancel()}},JB=class extends oD{constructor(n,e,t,i){super(n,e,t),this._providers=i}_compute(n,e,t,i){return sD(this._providers,n,e.getPosition(),i).then(s=>s||new Rn)}},QB=class extends oD{constructor(n,e,t,i,s){super(n,e,t),this._providers=i,this._otherModels=s}_compute(n,e,t,i){return YB(this._providers,n,e.getPosition(),i,this._otherModels).then(s=>s||new Rn)}};function e2(n,e,t,i){return new JB(e,t,i,n)}function t2(n,e,t,i,s){return new QB(e,t,i,n,s)}Ut("_executeDocumentHighlights",async(n,e,t)=>(await sD(n.get(Z).documentHighlightProvider,e,t,ue.None))?.get(e.uri));var qf=class{static{Fe=this}static{this.storedDecorationIDs=new Rn}static{this.query=null}constructor(e,t,i,s,o,r,a,l){this.toUnhook=new A,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Rn,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new _s(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=r,this.textModelService=o,this.configurationService=a,this.logService=l,this._hasWordHighlights=W_.bindTo(s),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(d=>{this._ignorePositionChangeEvent||this.occurrencesHighlightEnablement!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(d)}).catch(we)})),this.toUnhook.add(e.onDidFocusEditorText(d=>{this.occurrencesHighlightEnablement!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}).catch(we))})),this.toUnhook.add(e.onDidChangeModelContent(d=>{o0(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(d=>{!d.newModelUrl&&d.oldModelUrl?this._stopSingular():Fe.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(d=>{const c=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==c)switch(this.occurrencesHighlightEnablement=c,c){case"off":this._stopAll();break;case"singleFile":this._stopAll(Fe.query?.modelInfo?.modelURI);break;case"multiFile":Fe.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",c)}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(d=>{if(d.affectsConfiguration("editor.occurrencesHighlightDelay")){const c=a.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==c&&(this.occurrencesHighlightDelay=c)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{const d=this.codeEditorService.getFocusedCodeEditor();d?d.getModel()?.uri.scheme===_t.vscodeNotebookCell&&this.editor.getModel()?.uri.scheme!==_t.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,Fe.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){this.occurrencesHighlightEnablement!=="off"&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}).catch(we))}stop(){this.occurrencesHighlightEnablement!=="off"&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(y.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(i.startLineNumber);ci(`${o}, ${t+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(i.startLineNumber);ci(`${o}, ${t+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=Fe.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Fe.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const s of t){if(!s.hasModel()||ps(s.getModel().uri,e))continue;const o=Fe.storedDecorationIDs.get(s.getModel().uri);if(!o)continue;s.removeDecorations(o),i.push(s.getModel().uri);const r=xs.get(s);r?.wordHighlighter&&r.wordHighlighter.decorations.length>0&&(r.wordHighlighter.decorations.clear(),r.wordHighlighter.workerRequest=null,r.wordHighlighter._hasWordHighlights.set(!1))}for(const s of i)Fe.storedDecorationIDs.delete(s)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==_t.vscodeNotebookCell&&Fe.query?.modelInfo?.modelURI.scheme!==_t.vscodeNotebookCell?(Fe.query=null,this._run()):Fe.query?.modelInfo&&(Fe.query.modelInfo=null)),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlightEnablement==="off"){this._stopAll();return}if(e.source!=="api"&&e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===_t.vscodeNotebookCell){const s=[],o=this.codeEditorService.listCodeEditors();for(const r of o){const a=r.getModel();a&&a!==e&&a.uri.scheme===_t.vscodeNotebookCell&&s.push(a)}return s}const t=[],i=this.codeEditorService.listCodeEditors();for(const s of i){if(!Pw(s))continue;const o=s.getModel();o&&e===o.modified&&t.push(o.modified)}if(t.length)return t;if(this.occurrencesHighlightEnablement==="singleFile")return[];for(const s of i){const o=s.getModel();o&&o!==e&&t.push(o)}return t}async _run(e,t){if(this.editor.hasTextFocus()){const i=this.editor.getSelection();if(!i||i.startLineNumber!==i.endLineNumber){Fe.query=null,this._stopAll();return}const s=i.startColumn,o=i.endColumn,r=this._getWord();if(!r||r.startColumn>s||r.endColumn<o){Fe.query=null,this._stopAll();return}Fe.query={modelInfo:{modelURI:this.model.uri,selection:i}}}else if(!Fe.query){this._stopAll();return}if(this.lastCursorPositionChangeTime=new Date().getTime(),ps(this.editor.getModel().uri,Fe.query.modelInfo?.modelURI)){if(!e){const r=this.decorations.getRanges();for(const a of r)if(a.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model.uri:void 0);const i=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const s=this.getOtherModelsToHighlight(this.editor.getModel());if(!Fe.query||!Fe.query.modelInfo)return;const o=await this.textModelService.createModelReference(Fe.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(o.object.textEditorModel,Fe.query.modelInfo.selection,s),this.workerRequest?.result.then(r=>{i===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=r||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},we)}catch(r){this.logService.error("Unexpected error during occurrence request. Log: ",r)}finally{o.dispose()}}else if(this.model.uri.scheme===_t.vscodeNotebookCell){const i=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!Fe.query||!Fe.query.modelInfo)return;const s=await this.textModelService.createModelReference(Fe.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(s.object.textEditorModel,Fe.query.modelInfo.selection,[this.model]),this.workerRequest?.result.then(o=>{i===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=o||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},we)}catch(o){this.logService.error("Unexpected error during occurrence request. Log: ",o)}finally{s.dispose()}}}computeWithModel(e,t,i){return i.length?t2(this.multiDocumentProviders,e,t,this.editor.getOption(148),i):e2(this.providers,e,t,this.editor.getOption(148))}_beginRenderDecorations(e){const t=new Date().getTime(),i=this.lastCursorPositionChangeTime+e;t>=i?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},i-t)}renderDecorations(){this.renderDecorationsTimer=void 0;const e=this.codeEditorService.listCodeEditors();for(const t of e){const i=xs.get(t);if(!i)continue;const s=[],o=t.getModel()?.uri;if(o&&this.workerRequestValue.has(o)){const r=Fe.storedDecorationIDs.get(o),a=this.workerRequestValue.get(o);if(a)for(const d of a)d.range&&s.push({range:d.range,options:N3(d.kind)});let l=[];t.changeDecorations(d=>{l=d.deltaDecorations(r??[],s)}),Fe.storedDecorationIDs=Fe.storedDecorationIDs.set(o,l),s.length>0&&(i.wordHighlighter?.decorations.set(s),i.wordHighlighter?._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}};qf=Fe=nD([Qi(4,si),Qi(5,$e),Qi(6,xe),Qi(7,Pt)],qf);var xs=class extends O{static{jf=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(jf.ID)}constructor(e,t,i,s,o,r,a){super(),this._wordHighlighter=null;const l=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==_t.accessibleView&&(this._wordHighlighter=new qf(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,o,s,r,a))};this._register(e.onDidChangeModel(d=>{this._wordHighlighter&&(!d.newModelUrl&&d.oldModelUrl?.scheme!==_t.vscodeNotebookCell&&this.wordHighlighter?.stop(),this._wordHighlighter.dispose(),this._wordHighlighter=null),l()})),l()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};xs=jf=nD([Qi(1,ve),Qi(2,Z),Qi(3,$e),Qi(4,si),Qi(5,xe),Qi(6,Pt)],xs);var rD=class extends M{constructor(n,e){super(e),this._isNext=n}run(n,e){const t=xs.get(e);t&&(this._isNext?t.moveNext():t.moveBack())}},i2=class extends rD{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:L(1624,"Go to Next Symbol Highlight"),precondition:W_,kbOpts:{kbExpr:S.editorTextFocus,primary:65,weight:100}})}},n2=class extends rD{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:L(1625,"Go to Previous Symbol Highlight"),precondition:W_,kbOpts:{kbExpr:S.editorTextFocus,primary:1089,weight:100}})}},s2=class extends M{constructor(){super({id:"editor.action.wordHighlight.trigger",label:L(1626,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:0,weight:100}})}run(n,e){const t=xs.get(e);t&&t.restoreViewState(!0)}};ce(xs.ID,xs,0);k(i2);k(n2);k(s2);Ir(zf);var kh=class extends Mt{constructor(n){super(n),this._inSelectionMode=n.inSelectionMode,this._wordNavigationType=n.wordNavigationType}runEditorCommand(n,e,t){if(!e.hasModel())return;const i=mo(e.getOption(148),e.getOption(147)),s=e.getModel(),o=e.getSelections(),r=o.length>1,a=o.map(l=>{const d=new B(l.positionLineNumber,l.positionColumn),c=this._move(i,s,d,this._wordNavigationType,r);return this._moveTo(l,c,this._inSelectionMode)});if(s.pushStackElement(),e._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>cR.fromModelSelection(l))),a.length===1){const l=new B(a[0].positionLineNumber,a[0].positionColumn);e.revealPosition(l,0)}}_moveTo(n,e,t){return t?new te(n.selectionStartLineNumber,n.selectionStartColumn,e.lineNumber,e.column):new te(e.lineNumber,e.column,e.lineNumber,e.column)}},Os=class extends kh{_move(n,e,t,i,s){return Cl.moveWordLeft(n,e,t,i,s)}},Ms=class extends kh{_move(n,e,t,i,s){return Cl.moveWordRight(n,e,t,i)}},o2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}},r2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}},a2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:2063,mac:{primary:527},weight:100}})}},l2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}},d2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}},c2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}},h2=class extends Os{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},u2=class extends Os{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},g2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}},p2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:2065,mac:{primary:529},weight:100}})}},f2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}},m2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}},_2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:N.and(S.textInputFocus,N.and(ul,rh)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}},v2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}},b2=class extends Ms{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},C2=class extends Ms{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(n,e,t,i,s){return super._move(mo(sh.wordSeparators.defaultValue,n.intlSegmenterLocales),e,t,i,s)}},Ph=class extends Mt{constructor(n){super({canTriggerInlineEdits:!0,...n}),this._whitespaceHeuristics=n.whitespaceHeuristics,this._wordNavigationType=n.wordNavigationType}runEditorCommand(n,e,t){const i=n?.get(ct);if(!e.hasModel()||!i)return;const s=mo(e.getOption(148),e.getOption(147)),o=e.getModel(),r=e.getSelections(),a=e.getOption(10),l=e.getOption(15),d=i.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),c=e._getViewModel(),h=r.map(u=>{const g=this._delete({wordSeparators:s,model:o,selection:u,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:e.getOption(13),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:d,autoClosedCharacters:c.getCursorAutoClosedCharacters()},this._wordNavigationType);return new vl(g,"")});e.pushUndoStop(),e.executeCommands(this.id,h),e.pushUndoStop()}},V_=class extends Ph{_delete(n,e){const t=Cl.deleteWordLeft(n,e);return t||new y(1,1,1,1)}},B_=class extends Ph{_delete(n,e){const t=Cl.deleteWordRight(n,e);if(t)return t;const i=n.model.getLineCount(),s=n.model.getLineMaxColumn(i);return new y(i,s,i,s)}},S2=class extends V_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:S.writable})}},w2=class extends V_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:S.writable})}},y2=class extends V_{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}},x2=class extends B_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:S.writable})}},I2=class extends B_{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:S.writable})}},L2=class extends B_{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}},D2=class extends M{constructor(){super({id:"deleteInsideWord",precondition:S.writable,label:L(1628,"Delete Word"),metadata:{description:L(1629,"Delete the word at the cursor"),args:[{name:"args",schema:{type:"object",properties:{onlyWord:{type:"boolean",default:!1,description:m(1627,"Delete only the word and leave surrounding whitespace")}}}}]}})}run(n,e,t){if(!e.hasModel())return;const i=!!(t&&typeof t=="object"&&t.onlyWord),s=mo(e.getOption(148),e.getOption(147)),o=e.getModel(),r=e.getSelections().map(a=>{const l=Cl.deleteInsideWord(s,o,a,i);return new vl(l,"")});e.pushUndoStop(),e.executeCommands(this.id,r),e.pushUndoStop()}};G(new o2);G(new r2);G(new a2);G(new l2);G(new d2);G(new c2);G(new g2);G(new p2);G(new f2);G(new m2);G(new _2);G(new v2);G(new h2);G(new u2);G(new b2);G(new C2);G(new S2);G(new w2);G(new y2);G(new x2);G(new I2);G(new L2);k(D2);var E2=class extends Ph{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(n,e){const t=oh.deleteWordPartLeft(n);return t||new y(1,1,1,1)}},R2=class extends Ph{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(n,e){const t=oh.deleteWordPartRight(n);if(t)return t;const i=n.model.getLineCount(),s=n.model.getLineMaxColumn(i);return new y(i,s,i,s)}},aD=class extends kh{_move(n,e,t,i,s){return oh.moveWordPartLeft(n,e,t,s)}},T2=class extends aD{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:783},weight:100}})}};Re.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var N2=class extends aD{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}};Re.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var lD=class extends kh{_move(n,e,t,i,s){return oh.moveWordPartRight(n,e,t)}},k2=class extends lD{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:785},weight:100}})}},P2=class extends lD{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}};G(new E2);G(new R2);G(new T2);G(new N2);G(new k2);G(new P2);var zC=class extends O{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(n){super(),this.editor=n,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const n=qt.get(this.editor);if(n&&this.editor.hasModel()){let e=this.editor.getOptions().get(105);e||(this.editor.isSimpleWidget?e=new Lt(m(1427,"Cannot edit in read-only input")):e=new Lt(m(1428,"Cannot edit in read-only editor"))),n.showMessage(e,this.editor.getPosition())}}};ce(zC.ID,zC,2);var O2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},jC=function(n,e){return function(t,i){e(t,i,n)}},$f=class extends O{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=Ne(this,void 0);const s=Zd("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),o=Zd("_textModel.onDidChangeContent",qe.debounce(r=>this._textModel.onDidChangeContent(r),()=>{},100));this._register(bl(async(r,a)=>{s.read(r),o.read(r);const l=a.add(new B0),d=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(d,void 0)}))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const s=i.asListOfDocumentSymbols().filter(o=>e.contains(o.range.startLineNumber)&&!e.contains(o.range.endLineNumber));return s.sort(Cv(so(o=>o.range.endLineNumber-o.range.startLineNumber,oo))),s.map(o=>({name:o.name,kind:o.kind,startLineNumber:o.range.startLineNumber}))}getAt(e,t){const i=this._currentModel.read(t);if(!i)return[];const s=i.asListOfDocumentSymbols().filter(o=>new rt(o.range.startLineNumber,o.range.endLineNumber).contains(e));return s.length===0?[]:(s.sort(Cv(so(o=>o.range.endLineNumber-o.range.startLineNumber,oo))),s.map(o=>({name:o.name,kind:o.kind,startLineNumber:o.range.startLineNumber})))}};$f=O2([jC(1,Z),jC(2,El)],$f);kw.setBreadcrumbsSourceFactory((n,e)=>e.createInstance($f,n));var dD=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ir=function(n,e){return function(t,i){e(t,i,n)}},Wc=class extends O{static{this.ID="editor.contrib.floatingToolbar"}constructor(e,t,i,s){super();const o=this._register(Be(e)),r=T(l=>o.model.read(l)?.uri),a=this._register(t.createInstance(Kf,$.EditorContent,e.contextKeyService,r));this._register(he(l=>{a.hasActions.read(l)&&l.store.add(o.createOverlayWidget({allowEditorOverflow:!1,domNode:a.element,minContentWidthInPx:Ce(0),position:Ce({preference:1})}))}))}};Wc=dD([ir(1,ie),ir(2,Oe),ir(3,Es)],Wc);var Kf=class extends O{constructor(e,t,i,s,o,r){super();const a=this._register(r.createMenu(e,t)),l=Dt(this,a.onDidChange,()=>a.getActions()),d=T(c=>{const h=l.read(c),{primary:u}=ES(h,()=>!0);return u.filter(g=>g.id!==Ma.ID)});this.hasActions=T(c=>d.read(c).length>0),this.element=Na("div.floating-menu-overlay-widget").root,this._register(ke(()=>this.element.remove())),this._register(he(c=>{const h=d.read(c),u=h.length>0,g=u?h[0].id:void 0,p=h.length===1;if(this.element.classList.toggle("single-button",p),this.element.style.height=p?"28px":"26px",!u)return;const f=s.createInstance(e0,this.element,e,{actionViewItemProvider:(_,v)=>{if(_ instanceof ro)return s.createInstance(class extends cm{render(C){super.render(C),_.id===g&&this.element?.classList.add("primary")}updateLabel(){const C=o.lookupKeybinding(_.id),x=C?C.getLabel():void 0;this.options.label&&this.label&&(this.label.textContent=x?`${this._commandAction.label} (${x})`:this._commandAction.label)}},_,{...v,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});c.store.add(f),c.store.add(he(_=>{const v=i.read(_);f.context=v}))}))}};Kf=dD([ir(3,ie),ir(4,Oe),ir(5,Es)],Kf);ce(Wc.ID,Wc,1);var qC=class extends O{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(n){super(),this.editor=n,this.widget=null,tg&&(this._register(n.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const n=!this.editor.getOption(104);!this.widget&&n?this.widget=new M2(this.editor):this.widget&&!n&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}},M2=class cD extends O{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(de(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(de(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return cD.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};ce(qC.ID,qC,3);var A2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},$C=function(n,e){return function(t,i){e(t,i,n)}},Gf,ol=class extends O{static{Gf=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(Gf.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(Uc.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new V2(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};ol=Gf=A2([$C(1,JS),$C(2,Fn)],ol);var F2=class extends M{constructor(){super({id:"editor.action.inspectTokens",label:BD.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(n,e){ol.get(e)?.launch()}};function H2(n){let e="";for(let t=0,i=n.length;t<i;t++){const s=n.charCodeAt(t);switch(s){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(s)}}return e}function W2(n,e){const t=Uc.get(e);if(t)return t;const i=n.encodeLanguageId(e);return{getInitialState:()=>mT,tokenize:(s,o,r)=>rR(e,r),tokenizeEncoded:(s,o,r)=>hR(i,r)}}var V2=class hD extends O{static{this._ID="editor.contrib.inspectTokensWidget"}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=W2(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return hD._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let l=t.tokens1.length-1;l>=0;l--){const d=t.tokens1[l];if(e.column-1>=d.offset){i=l;break}}let s=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){s=l;break}const o=this._model.getLineContent(e.lineNumber);let r="";if(i<t.tokens1.length){const l=t.tokens1[i].offset,d=i+1<t.tokens1.length?t.tokens1[i+1].offset:o.length;r=o.substring(l,d)}jd(this._domNode,W("h2.tm-token",void 0,H2(r),W("span.tm-token-length",void 0,`${r.length} ${r.length===1?"char":"chars"}`))),z(this._domNode,W("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(s<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(s<<1)+1]):null;z(this._domNode,W("table.tm-metadata-table",void 0,W("tbody",void 0,W("tr",void 0,W("td.tm-metadata-key",void 0,"language"),W("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"token type"),W("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"font style"),W("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"foreground"),W("td.tm-metadata-value",void 0,`${a?me.Format.CSS.formatHex(a.foreground):"-?-"}`)),W("tr",void 0,W("td.tm-metadata-key",void 0,"background"),W("td.tm-metadata-value",void 0,`${a?me.Format.CSS.formatHex(a.background):"-?-"}`))))),z(this._domNode,W("hr.tokens-inspect-separator")),i<t.tokens1.length&&z(this._domNode,W("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=Uc.getColorMap(),i=Fr.getLanguageId(e),s=Fr.getTokenType(e),o=Fr.getFontStyle(e),r=Fr.getForeground(e),a=Fr.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(i),tokenType:s,fontStyle:o,foreground:t[r],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){const t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),s=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:i.tokens,tokens2:s.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};ce(ol.ID,ol,4);k(F2);var B2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ku=function(n,e){return function(t,i){e(t,i,n)}},va,Zf=class{static{va=this}static{this.PREFIX="?"}constructor(e,t,i){this.quickInputService=e,this.keybindingService=t,this.contextKeyService=i,this.registry=ln.as(wr.Quickaccess)}provide(e){const t=new A;return t.add(e.onDidAccept(()=>{const[i]=e.selectedItems;i&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(i=>{const s=this.registry.getQuickAccessProvider(i.substr(va.PREFIX.length),this.contextKeyService);s?.prefix&&s.prefix!==va.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(i=>i.prefix!==va.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders(this.contextKeyService).sort((e,t)=>e.prefix.localeCompare(t.prefix)).flatMap(e=>this.createPicks(e))}createPicks(e){return e.helpEntries.map(t=>{const i=t.prefix||e.prefix,s=i||"…";return{prefix:i,label:s,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:m(1811,"{0}, {1}",s,t.description),description:t.description}})}};Zf=va=B2([ku(0,Di),ku(1,Oe),ku(2,ve)],Zf);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Zf,prefix:"",helpEntries:[{description:pT.helpQuickAccessActionLabel}]});var uD=class{constructor(n){this.options=n,this.rangeHighlightDecorationId=void 0}provide(n,e,t){const i=new A;n.canAcceptInBackground=!!this.options?.canAcceptInBackground,n.matchOnLabel=n.matchOnDescription=n.matchOnDetail=n.sortByLabel=!1;const s=i.add(new Je);return s.value=this.doProvide(n,e,t),i.add(this.onDidActiveTextEditorControlChange(()=>{s.value=void 0,s.value=this.doProvide(n,e)})),i}doProvide(n,e,t){const i=new A,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const o={editor:s},r=tw(s);if(r){let a=s.saveViewState()??void 0;i.add(r.onDidChangeCursorPosition(()=>{a=s.saveViewState()??void 0})),o.restoreViewState=()=>{a&&s===this.activeTextEditorControl&&s.restoreViewState(a)},i.add(bw(e.onCancellationRequested)(()=>o.restoreViewState?.()))}i.add(ke(()=>this.clearDecorations(s))),i.add(this.provideWithTextEditor(o,n,e,t))}else i.add(this.provideWithoutTextEditor(n,e));return i}canProvideWithTextEditor(n){return!0}gotoLocation({editor:n},e){n.setSelection(e.range,"code.jump"),n.revealRangeInCenter(e.range,0),e.preserveFocus||n.focus();const t=this.getModel(n);if(t){const i=t.getLineContent(e.range.startLineNumber);vs(m(1381,"Line {0}, column {1}: {2}",e.range.startLineNumber,e.range.startColumn,i))}}getModel(n){return Pw(n)?n.getModel()?.modified:n.getModel()}addDecorations(n,e){n.changeDecorations(t=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:e,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:e,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:it(FS),position:nn.Full}}}],[o,r]=t.deltaDecorations(i,s);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:r}})}clearDecorations(n){const e=this.rangeHighlightDecorationId;e&&(n.changeDecorations(t=>{t.deltaDecorations([e.overviewRulerDecorationId,e.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}},U2=class Bd extends uD{static{this.GO_TO_LINE_PREFIX=":"}static{this.GO_TO_OFFSET_PREFIX="::"}static{this.ZERO_BASED_OFFSET_STORAGE_KEY="gotoLine.useZeroBasedOffset"}constructor(){super({canAcceptInBackground:!0})}get useZeroBasedOffset(){return this.storageService.getBoolean(Bd.ZERO_BASED_OFFSET_STORAGE_KEY,-1,!1)}set useZeroBasedOffset(e){this.storageService.store(Bd.ZERO_BASED_OFFSET_STORAGE_KEY,e,-1,0)}provideWithoutTextEditor(e){const t=m(1382,"Open a text editor first to go to a line or an offset.");return e.items=[{label:t}],e.ariaLabel=t,O.None}provideWithTextEditor(e,t,i){const s=e.editor,o=new A;t.ariaLabel=m(1383,"Go to line. Type a line number, optionally followed by colon and column number."),o.add(t.onDidAccept(d=>{const[c]=t.selectedItems;if(c){if(!c.lineNumber)return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:d.inBackground}),d.inBackground||t.hide()}}));const r={iconClass:pe.asClassName(V.indexZero),tooltip:m(1384,"Toggle Zero-Based Offset"),location:_E.Input,toggle:{checked:this.useZeroBasedOffset}},a=()=>{const d=t.value.trim().substring(Bd.GO_TO_LINE_PREFIX.length),{inOffsetMode:c,lineNumber:h,column:u,label:g}=this.parsePosition(s,d);if(t.buttons=c?[r]:[],t.items=[{lineNumber:h,column:u,label:g,ariaLabel:h?m(1385,"Go to line {0}, column {1}. Press Enter to navigate.",h,u||1):g}],!h){this.clearDecorations(s);return}const p=this.toRange(h,u);s.revealRangeInCenter(p,0),this.addDecorations(s,p)};o.add(t.onDidTriggerButton(d=>{d===r&&(this.useZeroBasedOffset=d.toggle?.checked??!this.useZeroBasedOffset,a())})),a(),o.add(t.onDidChangeValue(()=>a()));const l=tw(s);return l&&l.getOptions().get(76).renderType===2&&(l.updateOptions({lineNumbers:"on"}),o.add(ke(()=>l.updateOptions({lineNumbers:"relative"})))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=this.getModel(e);if(!i)return{label:m(1386,"Open a text editor first to go to a line or an offset.")};if(t.startsWith(":")){let s=parseInt(t.substring(1),10);const o=i.getValueLength();if(isNaN(s))return{inOffsetMode:!0,label:this.useZeroBasedOffset?m(1387,"Type a character position to go to (from 0 to {0}).",o-1):m(1388,"Type a character position to go to (from 1 to {0}).",o)};{const r=s<0;this.useZeroBasedOffset||(s-=Math.sign(s)),r&&(s+=o);const a=i.getPositionAt(s),l=hd.visibleColumnFromColumn(i.getLineContent(a.lineNumber),a.column,i.getOptions().tabSize)+1;return{...a,inOffsetMode:!0,label:m(1389,"Press 'Enter' to go to line {0} at column {1}.",a.lineNumber,l)}}}else{const s=t.split(/,|:|#/),o=i.getLineCount();let r=parseInt(s[0]?.trim(),10);if(s.length<1||isNaN(r))return{label:m(1390,"Type a line number to go to (from 1 to {0}).",o)};r=r>=0?r:o+1+r,r=Math.min(Math.max(1,r),o);const a=i.getOptions().tabSize,l=i.getLineContent(r),d=hd.visibleColumnFromColumn(l,i.getLineMaxColumn(r),a)+1;let c=parseInt(s[1]?.trim(),10);if(s.length<2||isNaN(c))return{lineNumber:r,column:1,label:s.length<2?m(1391,"Press 'Enter' to go to line {0} or enter colon : to add a column number.",r):m(1392,"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).",r,d)};c=c>=0?c:d+c,c=Math.min(Math.max(1,c),d);const h=hd.columnFromVisibleColumn(l,c-1,a);return{lineNumber:r,column:h,label:m(1393,"Press 'Enter' to go to line {0} at column {1}.",r,c)}}}},z2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},KC=function(n,e){return function(t,i){e(t,i,n)}},Is=class extends U2{constructor(e,t){super(),this.editorService=e,this.storageService=t,this.onDidActiveTextEditorControlChange=qe.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};Is=z2([KC(0,$e),KC(1,Ti)],Is);var gD=class pD extends M{static{this.ID="editor.action.gotoLine"}constructor(){super({id:pD.ID,label:Gc.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:S.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Di).quickAccess.show(Is.GO_TO_LINE_PREFIX)}};k(gD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Is,prefix:Is.GO_TO_LINE_PREFIX,helpEntries:[{description:Gc.gotoLineActionLabel,commandId:gD.ID}]});var fD=class mD extends M{static{this.ID="editor.action.gotoOffset"}constructor(){super({id:mD.ID,label:Gc.gotoOffsetActionLabel,alias:"Go to Offset...",precondition:void 0})}run(e){e.get(Di).quickAccess.show(Is.GO_TO_OFFSET_PREFIX)}};k(fD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Is,prefix:Is.GO_TO_OFFSET_PREFIX,helpEntries:[{description:Gc.gotoOffsetActionLabel,commandId:fD.ID}]});var _D=[void 0,[]];function Pu(n,e,t=0,i=0){const s=e;return s.values&&s.values.length>1?j2(n,s.values,t,i):vD(n,e,t,i)}function j2(n,e,t,i){let s=0;const o=[];for(const r of e){const[a,l]=vD(n,r,t,i);if(typeof a!="number")return _D;s+=a,o.push(...l)}return[s,q2(o)]}function vD(n,e,t,i){const s=PS(e.normalized,e.normalizedLowercase,t,n,n.toLowerCase(),i,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],nh(s)]:_D}function q2(n){const e=n.sort((s,o)=>s.start-o.start),t=[];let i;for(const s of e)!i||!$2(i,s)?(i=s,t.push(s)):(i.start=Math.min(i.start,s.start),i.end=Math.max(i.end,s.end));return t}function $2(n,e){return!(n.end<e.start||e.end<n.start)}function GC(n){return n.startsWith('"')&&n.endsWith('"')}var bD=" ";function Xf(n){typeof n!="string"&&(n="");const e=n.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:s}=ZC(n),o=t.indexOf($u)>=0,r=GC(n);let a;const l=n.split(bD);if(l.length>1)for(const d of l){const c=GC(d),{pathNormalized:h,normalized:u,normalizedLowercase:g}=ZC(d);u&&(a||(a=[]),a.push({original:d,originalLowercase:d.toLowerCase(),pathNormalized:h,normalized:u,normalizedLowercase:g,expectContiguousMatch:c}))}return{original:n,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:s,values:a,containsPathSeparator:o,expectContiguousMatch:r}}function ZC(n){let e;vm?e=n.replace(/\//g,$u):e=n.replace(/\\/g,$u);const t=e.replace(/[\*\u2026\s"]/g,"").replace(/(?<=.)#$/,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function XC(n){return Array.isArray(n)?Xf(n.map(e=>e.original).join(bD)):Xf(n.original)}var K2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},YC=function(n,e){return function(t,i){e(t,i,n)}},Ud,eo=class extends uD{static{Ud=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,m(1394,"To go to a symbol, first open a text editor with symbol information.")),O.None}provideWithTextEditor(e,t,i,s){const o=e.editor,r=this.getModel(o);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,i,s):this.doProvideWithoutEditorSymbols(e,r,t,i):O.None}doProvideWithoutEditorSymbols(e,t,i,s){const o=new A;return this.provideLabelPick(i,m(1395,"The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,o)||s.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,i,s)))(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new im,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),i.complete(!0))}));return t.add(ke(()=>i.complete(!1))),i.p}doProvideWithEditorSymbols(e,t,i,s,o){const r=e.editor,a=new A;a.add(i.onDidAccept(h=>{const[u]=i.selectedItems;if(u&&u.range){if(i.keyMods.shift&&u.attach){u.attach(i.keyMods,h);return}this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,preserveFocus:h.inBackground}),o?.handleAccept?.(u,h.inBackground),h.inBackground||i.hide()}})),a.add(i.onDidTriggerItemButton(({item:h})=>{h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const l=this.getDocumentSymbols(t,s),d=a.add(new Je),c=async h=>{d?.value?.cancel(),i.busy=!1,d.value=new st,i.busy=!0;try{const u=Xf(i.value.substr(Ud.PREFIX.length).trim()),g=await this.doGetSymbolPicks(l,u,void 0,d.value.token,t);if(s.isCancellationRequested)return;if(g.length>0){if(i.items=g,h&&u.original.length===0){const p=p0(g,f=>!!(f.type!=="separator"&&f.range&&y.containsPosition(f.range.decoration,h)));p&&(i.activeItems=[p])}}else u.original.length>0?this.provideLabelPick(i,m(1396,"No matching editor symbols")):this.provideLabelPick(i,m(1397,"No editor symbols"))}finally{s.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue(()=>c(void 0))),c(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive(()=>{const[h]=i.activeItems;h&&h.range&&(r.revealRangeInCenter(h.range.selection,0),this.addDecorations(r,h.range.decoration))})),a}async doGetSymbolPicks(e,t,i,s,o){const r=await e;if(s.isCancellationRequested)return[];const a=t.original.indexOf(Ud.SCOPE_PREFIX)===0,l=a?1:0;let d,c;t.values&&t.values.length>1?(d=XC(t.values[0]),c=XC(t.values.slice(1))):d=t;let h;const u=this.options?.openSideBySideDirection?.();u&&(h=[{iconClass:u==="right"?pe.asClassName(V.splitHorizontal):pe.asClassName(V.splitVertical),tooltip:u==="right"?m(1398,"Open to the Side"):m(1399,"Open to the Bottom")}]);const g=[];for(let _=0;_<r.length;_++){const v=r[_],C=vT(v.name),x=`$(${gw.toIcon(v.kind).id}) ${C}`,I=x.length-C.length;let b=v.containerName;i?.extraContainerLabel&&(b?b=`${i.extraContainerLabel} • ${b}`:b=i.extraContainerLabel);let w,E,P,R;if(t.original.length>l){let F=!1;if(d!==t&&([w,E]=Pu(x,{...t,values:void 0},l,I),typeof w=="number"&&(F=!0)),typeof w!="number"&&([w,E]=Pu(x,d,l,I),typeof w!="number"))continue;if(!F&&c){if(b&&c.original.length>0&&([P,R]=Pu(b,c)),typeof P!="number")continue;typeof w=="number"&&(w+=P)}}const D=v.tags&&v.tags.indexOf(1)>=0;g.push({index:_,kind:v.kind,score:w,label:x,ariaLabel:kR(v.name,v.kind),description:b,highlights:D?void 0:{label:E,description:R},range:{selection:y.collapseToStart(v.selectionRange),decoration:v.range},uri:o.uri,symbolName:C,strikethrough:D,buttons:h})}const p=g.sort((_,v)=>a?this.compareByKindAndScore(_,v):this.compareByScore(_,v));let f=[];if(a){let x=function(){v&&typeof _=="number"&&C>0&&(v.label=Tm(Mu[_]||Ou,C))},_,v,C=0;for(const I of p)_!==I.kind?(x(),_=I.kind,C=1,v={type:"separator"},f.push(v)):C++,f.push(I);x()}else p.length>0&&(f=[{label:m(1400,"symbols ({0})",g.length),type:"separator"},...p]);return f}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){const i=Mu[e.kind]||Ou,s=Mu[t.kind]||Ou,o=i.localeCompare(s);return o===0?this.compareByScore(e,t):o}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};eo=Ud=K2([YC(0,Z),YC(1,El)],eo);var Ou=m(1401,"properties ({0})"),Mu={5:m(1402,"methods ({0})"),11:m(1403,"functions ({0})"),8:m(1404,"constructors ({0})"),12:m(1405,"variables ({0})"),4:m(1406,"classes ({0})"),22:m(1407,"structs ({0})"),23:m(1408,"events ({0})"),24:m(1409,"operators ({0})"),10:m(1410,"interfaces ({0})"),2:m(1411,"namespaces ({0})"),3:m(1412,"packages ({0})"),25:m(1413,"type parameters ({0})"),1:m(1414,"modules ({0})"),6:m(1415,"properties ({0})"),9:m(1416,"enumerations ({0})"),21:m(1417,"enumeration members ({0})"),14:m(1418,"strings ({0})"),0:m(1419,"files ({0})"),17:m(1420,"arrays ({0})"),15:m(1421,"numbers ({0})"),16:m(1422,"booleans ({0})"),18:m(1423,"objects ({0})"),19:m(1424,"keys ({0})"),7:m(1425,"fields ({0})"),13:m(1426,"constants ({0})")},G2=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Au=function(n,e){return function(t,i){e(t,i,n)}},Yf=class extends eo{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=qe.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};Yf=G2([Au(0,$e),Au(1,Z),Au(2,El)],Yf);var CD=class SD extends M{static{this.ID="editor.action.quickOutline"}constructor(){super({id:SD.ID,label:ig.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:S.hasDocumentSymbolProvider,kbOpts:{kbExpr:S.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Di).quickAccess.show(eo.PREFIX,{itemActivation:ET.NONE})}};k(CD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:Yf,prefix:eo.PREFIX,helpEntries:[{description:ig.quickOutlineActionLabel,prefix:eo.PREFIX,commandId:CD.ID},{description:ig.quickOutlineByCategoryActionLabel,prefix:eo.PREFIX_BY_CATEGORY}]});function Z2(n){const e=new Map;for(const t of n)e.set(t,(e.get(t)??0)+1);return e}var X2=class zd{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),s=new Map,o=[];for(const[r,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const d=this.computeSimilarityScore(l,i,s);d>0&&o.push({key:r,score:d})}}return o}static termFrequencies(e){return Z2(zd.splitTerms(e))}static*splitTerms(e){const t=i=>i.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const s=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(s.length>1)for(const o of s)o.length>2&&/\p{Letter}{3,}/gu.test(o)&&(yield t(o))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const i=[];for(const s of t.textChunks){const o=zd.termFrequencies(s);for(const r of o.keys())this.chunkOccurrences.set(r,(this.chunkOccurrences.get(r)??0)+1);i.push({text:s,tf:o})}this.chunkCount+=i.length,this.documents.set(t.key,{chunks:i})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const i of t.chunks)for(const s of i.tf.keys()){const o=this.chunkOccurrences.get(s);if(typeof o=="number"){const r=o-1;r<=0?this.chunkOccurrences.delete(s):this.chunkOccurrences.set(s,r)}}}}computeSimilarityScore(e,t,i){let s=0;for(const[o,r]of Object.entries(t)){const a=e.tf.get(o);if(!a)continue;let l=i.get(o);typeof l!="number"&&(l=this.computeIdf(o),i.set(o,l));const d=a*l;s+=d*r}return s}computeEmbedding(e){const t=zd.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,s]of e){const o=this.computeIdf(i);o>0&&(t[i]=s*o)}return t}};function Y2(n){const e=n.slice(0);e.sort((i,s)=>s.score-i.score);const t=e[0]?.score??0;if(t>0)for(const i of e)i.score/=t;return e}var rs;(function(n){n[n.NO_ACTION=0]="NO_ACTION",n[n.CLOSE_PICKER=1]="CLOSE_PICKER",n[n.REFRESH_PICKER=2]="REFRESH_PICKER",n[n.REMOVE_ITEM=3]="REMOVE_ITEM"})(rs||(rs={}));function Fu(n){return Array.isArray(n.items)}function JC(n){const e=n;return!!e.picks&&e.additionalPicks instanceof Promise}var J2=class extends O{constructor(n,e){super(),this.prefix=n,this.options=e}provide(n,e,t){const i=new A;n.canAcceptInBackground=!!this.options?.canAcceptInBackground,n.matchOnLabel=n.matchOnDescription=n.matchOnDetail=n.sortByLabel=!1;let s;const o=i.add(new Je),r=async()=>{s?.dispose(!0),n.busy=!1;const l=o.value=new A;s=l.add(new st(e));const d=s.token;let c=n.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(c=c.trim());const h=this._getPicks(c,l,d,t),u=(p,f)=>{let _,v;if(Fu(p)?(_=p.items,v=p.active):_=p,_.length===0){if(f)return!1;(c.length>0||n.hideInput)&&this.options?.noResultsPick&&(tE(this.options.noResultsPick)?_=[this.options.noResultsPick(c)]:_=[this.options.noResultsPick])}return n.items=_,v&&(n.activeItems=[v]),!0},g=async p=>{let f=!1,_=!1;await Promise.all([(async()=>{typeof p.mergeDelay=="number"&&(await Xc(p.mergeDelay),d.isCancellationRequested)||_||(f=u(p.picks,!0))})(),(async()=>{n.busy=!0;try{const v=await p.additionalPicks;if(d.isCancellationRequested)return;let C,x;Fu(p.picks)?(C=p.picks.items,x=p.picks.active):C=p.picks;let I,b;if(Fu(v)?(I=v.items,b=v.active):I=v,I.length>0||!f){let w;if(!x&&!b){const E=n.activeItems[0];E&&C.indexOf(E)!==-1&&(w=E)}u({items:[...C,...I],active:x||b||w})}}finally{d.isCancellationRequested||(n.busy=!1),_=!0}})()])};if(h!==null)if(JC(h))await g(h);else if(!(h instanceof Promise))u(h);else{n.busy=!0;try{const p=await h;if(d.isCancellationRequested)return;JC(p)?await g(p):u(p)}finally{d.isCancellationRequested||(n.busy=!1)}}};i.add(n.onDidChangeValue(()=>r())),r(),i.add(n.onDidAccept(l=>{if(t?.handleAccept){l.inBackground||n.hide(),t.handleAccept?.(n.activeItems[0],l.inBackground);return}const[d]=n.selectedItems;if(typeof d?.accept=="function"){if(u0(n.keyMods)&&d.attach){d.attach(n.keyMods,l);return}l.inBackground||n.hide(),d.accept(n.keyMods,l)}}));const a=async(l,d)=>{if(typeof d.trigger!="function")return;const c=d.buttons?.indexOf(l)??-1;if(c>=0){const h=d.trigger(c,n.keyMods),u=typeof h=="number"?h:await h;if(e.isCancellationRequested)return;switch(u){case rs.NO_ACTION:break;case rs.CLOSE_PICKER:n.hide();break;case rs.REFRESH_PICKER:r();break;case rs.REMOVE_ITEM:{const g=n.items.indexOf(d);if(g!==-1){const p=n.items.slice(),f=p.splice(g,1),_=n.activeItems.filter(C=>C!==f[0]),v=n.keepScrollPosition;n.keepScrollPosition=!0,n.items=p,_&&(n.activeItems=_),n.keepScrollPosition=v}break}}}};return i.add(n.onDidTriggerItemButton(({button:l,item:d})=>a(l,d))),i.add(n.onDidTriggerSeparatorButton(({button:l,separator:d})=>a(l,d))),i}},wD=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Qn=function(n,e){return function(t,i){e(t,i,n)}},Gs,ze,Jf=class extends J2{static{Gs=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=zD(RE,rE)}constructor(e,t,i,s,o,r){super(Gs.PREFIX,e),this.keybindingService=i,this.commandService=s,this.telemetryService=o,this.dialogService=r,this.commandsHistory=this._register(t.createInstance(Qf)),this.options=e}async _getPicks(e,t,i,s){const o=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const r=bw(()=>{const g=new X2;g.updateDocuments(o.map(f=>({key:f.commandId,textChunks:[this.getTfIdfChunk(f)]})));const p=g.calculateScores(e,i);return Y2(p).filter(f=>f.score>Gs.TFIDF_THRESHOLD).slice(0,Gs.TFIDF_MAX_RESULTS)}),a=[];for(const g of o){const p=Gs.WORD_FILTER(e,g.label)??void 0;let f;if(g.commandAlias&&(f=Gs.WORD_FILTER(e,g.commandAlias)??void 0),p||f)g.highlights={label:p,detail:this.options.showAlias?f:void 0},a.push(g);else if(e===g.commandId)a.push(g);else if(e.length>=3){const _=r();if(i.isCancellationRequested)return[];const v=_.find(C=>C.key===g.commandId);v&&(g.tfIdfScore=v.score,a.push(g))}}const l=new Map;for(const g of a){const p=l.get(g.label);p?(g.description=g.commandId,p.description=p.commandId):l.set(g.label,g)}a.sort((g,p)=>{if(g.tfIdfScore&&p.tfIdfScore)return g.tfIdfScore===p.tfIdfScore?g.label.localeCompare(p.label):p.tfIdfScore-g.tfIdfScore;if(g.tfIdfScore)return 1;if(p.tfIdfScore)return-1;const f=this.commandsHistory.peek(g.commandId),_=this.commandsHistory.peek(p.commandId);if(f&&_)return f>_?-1:1;if(f)return-1;if(_)return 1;if(this.options.suggestedCommandIds){const x=this.options.suggestedCommandIds.has(g.commandId),I=this.options.suggestedCommandIds.has(p.commandId);if(x&&I)return 0;if(x)return-1;if(I)return 1}const v=g.commandCategory===Pf.Developer.value,C=p.commandCategory===Pf.Developer.value;return v&&!C?1:!v&&C?-1:g.label.localeCompare(p.label)});const d=[];let c=!1,h=!0,u=!!this.options.suggestedCommandIds;for(let g=0;g<a.length;g++){const p=a[g],f=!!this.commandsHistory.peek(p.commandId);g===0&&f&&(d.push({type:"separator",label:m(1803,"recently used")}),c=!0),h&&p.tfIdfScore!==void 0&&(d.push({type:"separator",label:m(1804,"similar commands")}),h=!1),u&&p.tfIdfScore===void 0&&!f&&this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1805,"commonly used")}),c=!0,u=!1),c&&p.tfIdfScore===void 0&&!f&&!this.options.suggestedCommandIds?.has(p.commandId)&&(d.push({type:"separator",label:m(1806,"other commands")}),c=!1),d.push(this.toCommandPick(p,s,f))}return this.hasAdditionalCommandPicks(e,i)?{picks:d,additionalPicks:(async()=>{const g=await this.getAdditionalCommandPicks(o,a,e,i);if(i.isCancellationRequested)return[];const p=g.map(f=>this.toCommandPick(f,s));return h&&p[0]?.type!=="separator"&&p.unshift({type:"separator",label:m(1807,"similar commands")}),p})()}:d}toCommandPick(e,t,i=!1){if(e.type==="separator")return e;const s=e.tooltip??e.commandDescription?.value,o=this.keybindingService.lookupKeybinding(e.commandId),r=o?m(1808,"{0}, {1}",e.label,o.getAriaLabel()):e.label,a=e.buttons||[],l=i?[...a,{iconClass:pe.asClassName(V.close),tooltip:m(1809,"Remove from Recently Used")}]:e.buttons;return{...e,tooltip:s,ariaLabel:r,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:o,buttons:l,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(d){Hn(d)||this.dialogService.error(m(1810,"Command '{0}' resulted in an error",e.label),sc(d))}},trigger:i?(d,c)=>d===a.length?(this.commandsHistory.remove(e.commandId),rs.REMOVE_ITEM):e.trigger?e.trigger(d,c):rs.NO_ACTION:e.trigger}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let s=e;return t&&t!==e&&(s+=` - ${t}`),i&&i.value!==e&&(s+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),s}};Jf=Gs=wD([Qn(1,ie),Qn(2,Oe),Qn(3,ht),Qn(4,Ds),Qn(5,om)],Jf);var Qf=class extends O{static{ze=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===bm.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=ze.getConfiguredCommandHistoryLength(this.configurationService),ze.cache&&ze.cache.limit!==this.configuredCommandsHistoryLength&&(ze.cache.limit=this.configuredCommandsHistoryLength,ze.hasChanges=!0))}load(){const e=this.storageService.get(ze.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(s){this.logService.error(`[CommandsHistory] invalid data: ${s}`)}const i=ze.cache=new dl(this.configuredCommandsHistoryLength,1);if(t){let s;t.usesLRU?s=t.entries:s=t.entries.sort((o,r)=>o.value-r.value),s.forEach(o=>i.set(o.key,o.value))}ze.counter=this.storageService.getNumber(ze.PREF_KEY_COUNTER,0,ze.counter)}push(e){ze.cache&&(ze.cache.set(e,ze.counter++),ze.hasChanges=!0)}peek(e){return ze.cache?.peek(e)}remove(e){ze.cache&&(ze.cache.delete(e),ze.hasChanges=!0)}saveState(){if(!ze.cache||!ze.hasChanges)return;const e={usesLRU:!0,entries:[]};ze.cache.forEach((t,i)=>e.entries.push({key:i,value:t})),this.storageService.store(ze.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(ze.PREF_KEY_COUNTER,ze.counter,0,0),ze.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const t=e.getValue().workbench?.commandPalette?.history;return typeof t=="number"?t:ze.DEFAULT_COMMANDS_HISTORY_LENGTH}};Qf=ze=wD([Qn(0,Ti),Qn(1,xe),Qn(2,Pt)],Qf);var Q2=class extends Jf{constructor(n,e,t,i,s,o){super(n,e,t,i,s,o)}getCodeEditorCommandPicks(){const n=this.activeTextEditorControl;if(!n)return[];const e=[];for(const t of n.getSupportedActions()){let i;t.metadata?.description&&(qD(t.metadata.description)?i=t.metadata.description:i={original:t.metadata.description,value:t.metadata.description}),e.push({commandId:t.id,commandAlias:t.alias,commandDescription:i,label:bE(t.label)||t.id})}return e}},e5=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Mo=function(n,e){return function(t,i){e(t,i,n)}},rl=class extends Q2{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,s,o,r){super({showAlias:!1},e,i,s,o,r),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};rl=e5([Mo(0,ie),Mo(1,$e),Mo(2,Oe),Mo(3,ht),Mo(4,Ds),Mo(5,om)],rl);var yD=class xD extends M{static{this.ID="editor.action.quickCommand"}constructor(){super({id:xD.ID,label:ow.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:S.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Di).quickAccess.show(rl.PREFIX)}};k(yD);ln.as(wr.Quickaccess).registerQuickAccessProvider({ctor:rl,prefix:rl.PREFIX,helpEntries:[{description:ow.quickCommandHelp,commandId:yD.ID}]});var t5=function(n,e,t,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ao=function(n,e){return function(t,i){e(t,i,n)}},em=class extends uo{constructor(e,t,i,s,o,r,a){super(!0,e,t,i,s,o,r,a)}};em=t5([Ao(1,ve),Ao(2,$e),Ao(3,Et),Ao(4,ie),Ao(5,Ti),Ao(6,xe)],em);ce(uo.ID,em,4);var i5=class extends M{constructor(){super({id:"editor.action.toggleHighContrast",label:rT.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(n,e){const t=n.get(JS),i=t.getColorTheme();Ta(i.type)?(t.setTheme(this._originalThemeName||(ov(i.type)?"vs-dark":"vs")),this._originalThemeName=null):(t.setTheme(ov(i.type)?qT:ZD),this._originalThemeName=i.themeName)}};k(i5);var ID=class{constructor(n,e,t,i,s){this._onDidChange=new Aa,this._onDidExtraLibsChange=new Aa,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(n),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(n,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===n)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:n,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let s=this._extraLibs[t];s&&s.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(n){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),n&&n.length>0)for(const e of n){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let s=1;this._removedExtraLibs[t]&&(s=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:s}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(n){this._compilerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(n){this._workerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(n){this._inlayHintsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(n){}setEagerModelSync(n){this._eagerModelSync=n}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(void 0)}},LD={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},n5=new ID({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},LD),s5=new ID({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},LD);function DD(){return U(()=>import("./tsMode-BgtcNcpl.js"),__vite__mapDeps([0,1,2,3,4]))}K.onLanguage("typescript",()=>DD().then(n=>n.setupTypeScript(n5)));K.onLanguage("javascript",()=>DD().then(n=>n.setupJavaScript(s5)));var o5=Object.defineProperty,r5=(n,e,t)=>e in n?o5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ne=(n,e,t)=>r5(n,typeof e!="symbol"?e+"":e,t),ld,QC,dd,Hu,cd;function a5(n){return n.method!==void 0}var eS;(function(n){function e(t){return t}n.create=e})(eS||(eS={}));var Si;(function(n){n.parseError=-32700,n.invalidRequest=-32600,n.methodNotFound=-32601,n.invalidParams=-32602,n.internalError=-32603;function e(o){return-32099<=o&&o<=-32e3}n.isServerError=e;function t(o){if(!e(o))throw new Error("Invalid range for a server error.");return o}n.serverError=t,n.unexpectedServerError=-32e3;function i(o){return!0}n.isApplicationError=i;function s(o){return o}n.applicationError=s,n.genericApplicationError=-320100})(Si||(Si={}));var ED=class{constructor(){ne(this,"listeners",new Set),ne(this,"event",n=>(this.listeners.add(n),{dispose:()=>{this.listeners.delete(n)}}))}fire(n){this.listeners.forEach(e=>e(n))}},l5=class{constructor(n){ne(this,"_value"),ne(this,"eventEmitter"),this._value=n,this.eventEmitter=new ED}get value(){return this._value}set value(n){this._value!==n&&(this._value=n,this.eventEmitter.fire(n))}get onChange(){return this.eventEmitter.event}};function d5(n,e){const t=setTimeout(e,n);return{dispose:()=>clearTimeout(t)}}function Wu(n,e,t){return n instanceof Set?(n.add(e),{dispose:()=>n.delete(e)}):(n.set(e,t),{dispose:()=>n.delete(e)})}var c5=class{constructor(){ne(this,"_state","none"),ne(this,"promise"),ne(this,"resolve",()=>{}),ne(this,"reject",()=>{}),this.promise=new Promise((n,e)=>{this.resolve=n,this.reject=e})}get state(){return this._state}},$j=(ld=class{constructor(){ne(this,"_unprocessedMessages",[]),ne(this,"_messageListener"),ne(this,"id",ld.id++),ne(this,"_state",new l5({state:"open"})),ne(this,"state",this._state)}setListener(n){if(this._messageListener=n,!!n)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(n){return this._sendImpl(n)}_dispatchReceivedMessage(n){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(n):this._unprocessedMessages.push(n)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(n){return new h5(this,n??new u5)}},ne(ld,"id",0),ld),h5=class{constructor(n,e){ne(this,"baseStream"),ne(this,"logger"),this.baseStream=n,this.logger=e}get state(){return this.baseStream.state}setListener(n){if(n===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),n(e)})}send(n){return this.logger.log(this.baseStream,"outgoing",n),this.baseStream.send(n)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},u5=class{log(n,e,t){console.log(`${e==="incoming"?"<-":"->"} [${n.toString()}] ${JSON.stringify(t)}`)}},g5=class RD{constructor(e){ne(this,"connect"),this.connect=e}mapContext(e){return new RD(t=>this.connect(t?p5(t,e):void 0))}};function p5(n,e){return{handleNotification:(t,i)=>n.handleNotification(t,e(i)),handleRequest:(t,i,s)=>n.handleRequest(t,i,e(s))}}var f5=class TD{constructor(e,t,i){ne(this,"_stream"),ne(this,"_listener"),ne(this,"_logger"),ne(this,"_unprocessedResponses",new Map),ne(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=i,this._stream.setListener(s=>{a5(s)?s.id===void 0?this._processNotification(s):this._processRequest(s):this._processResponse(s)})}static createChannel(e,t){let i=!1;return new g5(s=>{if(i)throw new Error(`A channel to the stream ${e} was already constructed!`);return i=!0,new TD(e,s,t)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw new Error;if(!this._listener){this._logger&&this._logger.debug({text:"Notification ignored",message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw new Error;let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(s){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${s}`,message:e,exception:s}),t={error:{code:Si.internalError,message:"An unexpected exception was thrown.",data:void 0}}}else this._logger&&this._logger.debug({text:"Received request even though not listening for requests",message:e}),t={error:{code:Si.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let i;"result"in t?i={jsonrpc:"2.0",id:e.id,result:t.result}:i={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(i)}_processResponse(e){const t=""+e.id,i=this._unprocessedResponses.get(t);if(!i){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),i(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,i){const s={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return i&&i(s.id),new Promise((o,r)=>{const a=""+s.id;this._unprocessedResponses.set(a,l=>{"result"in l?o({result:l.result}):(l.error||r(new Error("Response had neither 'result' nor 'error' field set.")),o({error:l.error}))}),this._stream.send(s).then(void 0,l=>{this._unprocessedResponses.delete(a),r(l)})})}sendNotification(e,t){const i={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(i)}toString(){return"StreamChannel/"+this._stream.toString()}},nr;(function(n){function e(){return{deserializeFromJson:s=>({hasErrors:!1,value:s}),serializeToJson:s=>s}}n.sAny=e;function t(){return{deserializeFromJson:s=>({hasErrors:!1,value:{}}),serializeToJson:s=>({})}}n.sEmptyObject=t;function i(){return{deserializeFromJson:s=>({hasErrors:!1,value:void 0}),serializeToJson:s=>null}}n.sVoidFromNull=i})(nr||(nr={}));var ND=Symbol("OptionalMethodNotFound"),kD=class{contextualize(n){return new m5(this,n)}},m5=class extends kD{constructor(n,e){super(),ne(this,"underylingTypedChannel"),ne(this,"converters"),this.underylingTypedChannel=n,this.converters=e}async request(n,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(n,e,i)}async notify(n,e,t){const i=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(n,e,i)}registerNotificationHandler(n,e){return this.underylingTypedChannel.registerNotificationHandler(n,async(t,i)=>await e(t,await this.converters.getNewContext(i)))}registerRequestHandler(n,e){return this.underylingTypedChannel.registerRequestHandler(n,async(t,i,s)=>await e(t,i,await this.converters.getNewContext(s)))}},tS=class PD extends kD{constructor(e,t={}){super(),ne(this,"channelCtor"),ne(this,"_requestSender"),ne(this,"_handler",new Map),ne(this,"_unknownNotificationHandler",new Set),ne(this,"_timeout"),ne(this,"sendExceptionDetails",!1),ne(this,"_logger"),ne(this,"listeningDeferred",new c5),ne(this,"onListening",this.listeningDeferred.promise),ne(this,"_requestDidErrorEventEmitter",new ED),ne(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=d5(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(e,t={}){return new PD(f5.createChannel(e,t.logger),t)}startListen(){if(this._requestSender)throw new Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&(this._timeout.dispose(),this._timeout=void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,i)=>this.handleRequest(e,t,i),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw new Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,i){const s=this._handler.get(e.method);if(!s)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Si.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(s.kind!="request"){const r=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e}}),{error:{code:Si.invalidRequest,message:r,data:{method:e.method}}}}const o=s.requestType.paramsSerializer.deserializeFromJson(e.params);if(o.hasErrors){const r=`Got invalid params: ${o.errorMessage}`;return this._logger&&this._logger.debug({text:r,data:{requestObject:e,errorMessage:o.errorMessage}}),{error:{code:Si.invalidParams,message:r,data:{errors:o.errorMessage}}}}else{const r=o.value;let a;try{const l=await s.handler(r,t,i);if("error"in l||"errorMessage"in l){const d=l.error?s.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Si.genericApplicationError,message:l.errorMessage||"An error was returned",data:d}}}else a={result:s.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof nS?a={error:{code:l.code,message:l.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${l}.`,exception:l,data:{requestObject:e}}),a={error:{code:Si.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${l}.`:"Server has thrown an unexpected exception"}})}return a}}async handleNotification(e,t){const i=this._handler.get(e.method);if(!i){for(const r of this._unknownNotificationHandler)r(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(i.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const s=i.notificationType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${s}`,data:{requestObject:e,errorMessage:s.errorMessage}});return}const o=s.value;for(const r of i.handlers)try{r(o,t)}catch(a){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${a}.`,exception:a,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return Wu(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return Wu(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let i=this._handler.get(e.method);if(!i)i={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,i);else{if(i.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(i.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return Wu(i.handlers,t)}getRegisteredTypes(){const e=[];for(const t of this._handler.values())t.kind==="notification"?e.push(t.notificationType):t.kind==="request"&&e.push(t.requestType);return e}async request(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const s=e.paramsSerializer.serializeToJson(t);iS(s);const o=await this._requestSender.sendRequest({method:e.method,params:s},i);if("error"in o){if(e.isOptional&&o.error.code===Si.methodNotFound)return ND;let r;if(o.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(o.error.data);if(l.hasErrors)throw new Error(l.errorMessage);r=l.value}else r=void 0;const a=new nS(o.error.message,r,o.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const r=e.resultSerializer.deserializeFromJson(o.result);if(r.hasErrors)throw new Error("Could not deserialize response: "+r.errorMessage+`
|
|
63
63
|
|
|
64
|
-
${JSON.stringify(o,null,2)}`);return r.value}}async notify(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error;const s=e.paramsSerializer.serializeToJson(t);iS(s),this._requestSender.sendNotification({method:e.method,params:s},i)}};function iS(n){if(n!==null&&Array.isArray(n)&&typeof n!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var nS=class OD extends Error{constructor(e,t,i=Si.genericApplicationError){super(e),ne(this,"data"),ne(this,"code"),this.data=t,this.code=i,Object.setPrototypeOf(this,OD.prototype)}},_5=class tm{constructor(e,t,i,s,o=!1){ne(this,"method"),ne(this,"paramsSerializer"),ne(this,"resultSerializer"),ne(this,"errorSerializer"),ne(this,"isOptional"),ne(this,"kind","request"),this.method=e,this.paramsSerializer=t,this.resultSerializer=i,this.errorSerializer=s,this.isOptional=o}withMethod(e){return new tm(e,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new tm(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},v5=class MD{constructor(e,t){ne(this,"method"),ne(this,"paramsSerializer"),ne(this,"kind","notification"),this.method=e,this.paramsSerializer=t}withMethod(e){return new MD(e,this.paramsSerializer)}};function ee(n){return new _5((n||{}).method,nr.sAny(),nr.sAny(),nr.sAny())}function Ue(n){return new v5((n||{}).method,nr.sAny())}var sS=(QC=Symbol(),dd=class{constructor(n){ne(this,"error"),ne(this,QC),this.error=n}},ne(dd,"factory",n=>new dd(n)),dd);function b5(n){const e=oS(n.server),t=oS(n.client);return new C5(n.tags||[],e,t)}function oS(n){const e={};for(const[t,i]of Object.entries(n)){const s=i.method?i.method:t;e[t]=i.withMethod(s)}return e}var C5=class AD{constructor(e=[],t,i){ne(this,"tags"),ne(this,"server"),ne(this,"client"),this.tags=e,this.server=t,this.client=i}_onlyDesignTime(){return new Error("This property is not meant to be accessed at runtime")}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,i,s){const o=this.buildCounterpart(e,i),r=this.registerHandlers(e,t,s,o);return{counterpart:o,dispose:()=>r.dispose()}}buildCounterpart(e,t){const i={};for(const[s,o]of Object.entries(t)){let r;o.kind==="request"?o.isOptional?r=async(a,l)=>{a===void 0&&(a={});try{return await e.request(o,a,l)}catch(d){if(d&&d.code===Si.methodNotFound)return ND;throw d}}:r=(a,l)=>(a===void 0&&(a={}),e.request(o,a,l)):r=(a,l)=>(a===void 0&&(a={}),e.notify(o,a,l)),i[s]=r}return i}registerHandlers(e,t,i,s){const o=[];for(const[r,a]of Object.entries(t))if(a.kind==="request"){let l=i[r];if(!l)continue;const d=this.createRequestHandler(s,l);o.push(e.registerRequestHandler(a,d))}else{const l=i[r];l&&o.push(e.registerNotificationHandler(a,(d,c)=>{l(d,{context:c,counterpart:s})}))}return{dispose:()=>o.forEach(r=>r.dispose())}}createRequestHandler(e,t){return async(i,s,o)=>{const r=await t(i,{context:o,counterpart:e,newErr:sS.factory,requestId:s});return r instanceof sS?r.error:{ok:r}}}static getServerFromStream(e,t,i,s){const o=tS.fromTransport(t,i),{server:r}=e.getServer(o,s);return o.startListen(),{channel:o,server:r}}static registerServerToStream(e,t,i,s){const o=tS.fromTransport(t,i),{client:r}=e.registerServer(o,s);return o.startListen(),{channel:o,client:r}}getServer(e,t){const{counterpart:i,dispose:s}=this.getInterface(e,this.client,this.server,t);return{server:i,dispose:s}}registerServer(e,t){const{counterpart:i,dispose:s}=this.getInterface(e,this.server,this.client,t);return{client:i,dispose:s}}withContext(){return new AD(this.tags,this.server,this.client)}},Vu=(function(n){return n.Comment="comment",n.Imports="imports",n.Region="region",n})({}),Xe=(function(n){return n[n.File=1]="File",n[n.Module=2]="Module",n[n.Namespace=3]="Namespace",n[n.Package=4]="Package",n[n.Class=5]="Class",n[n.Method=6]="Method",n[n.Property=7]="Property",n[n.Field=8]="Field",n[n.Constructor=9]="Constructor",n[n.Enum=10]="Enum",n[n.Interface=11]="Interface",n[n.Function=12]="Function",n[n.Variable=13]="Variable",n[n.Constant=14]="Constant",n[n.String=15]="String",n[n.Number=16]="Number",n[n.Boolean=17]="Boolean",n[n.Array=18]="Array",n[n.Object=19]="Object",n[n.Key=20]="Key",n[n.Null=21]="Null",n[n.EnumMember=22]="EnumMember",n[n.Struct=23]="Struct",n[n.Event=24]="Event",n[n.Operator=25]="Operator",n[n.TypeParameter=26]="TypeParameter",n})({}),S5=(function(n){return n[n.Deprecated=1]="Deprecated",n})({}),rS=(function(n){return n[n.Type=1]="Type",n[n.Parameter=2]="Parameter",n})({}),Qe=(function(n){return n[n.Text=1]="Text",n[n.Method=2]="Method",n[n.Function=3]="Function",n[n.Constructor=4]="Constructor",n[n.Field=5]="Field",n[n.Variable=6]="Variable",n[n.Class=7]="Class",n[n.Interface=8]="Interface",n[n.Module=9]="Module",n[n.Property=10]="Property",n[n.Unit=11]="Unit",n[n.Value=12]="Value",n[n.Enum=13]="Enum",n[n.Keyword=14]="Keyword",n[n.Snippet=15]="Snippet",n[n.Color=16]="Color",n[n.File=17]="File",n[n.Reference=18]="Reference",n[n.Folder=19]="Folder",n[n.EnumMember=20]="EnumMember",n[n.Constant=21]="Constant",n[n.Struct=22]="Struct",n[n.Event=23]="Event",n[n.Operator=24]="Operator",n[n.TypeParameter=25]="TypeParameter",n})({}),w5=(function(n){return n[n.Deprecated=1]="Deprecated",n})({}),y5=(function(n){return n[n.PlainText=1]="PlainText",n[n.Snippet=2]="Snippet",n})({}),Bu=(function(n){return n[n.Text=1]="Text",n[n.Read=2]="Read",n[n.Write=3]="Write",n})({}),fn=(function(n){return n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll",n})({}),as=(function(n){return n[n.Error=1]="Error",n[n.Warning=2]="Warning",n[n.Information=3]="Information",n[n.Hint=4]="Hint",n})({}),aS=(function(n){return n[n.Unnecessary=1]="Unnecessary",n[n.Deprecated=2]="Deprecated",n})({}),Uu=(function(n){return n[n.Invoked=1]="Invoked",n[n.TriggerCharacter=2]="TriggerCharacter",n[n.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",n})({}),zu=(function(n){return n[n.Invoked=1]="Invoked",n[n.TriggerCharacter=2]="TriggerCharacter",n[n.ContentChange=3]="ContentChange",n})({}),lS=(function(n){return n[n.Invoked=1]="Invoked",n[n.Automatic=2]="Automatic",n})({}),ge=class{constructor(n){this.method=n}},x5={textDocumentImplementation:new ge("textDocument/implementation"),textDocumentTypeDefinition:new ge("textDocument/typeDefinition"),textDocumentDocumentColor:new ge("textDocument/documentColor"),textDocumentColorPresentation:new ge("textDocument/colorPresentation"),textDocumentFoldingRange:new ge("textDocument/foldingRange"),textDocumentDeclaration:new ge("textDocument/declaration"),textDocumentSelectionRange:new ge("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new ge("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new ge("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new ge("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new ge("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new ge("workspace/willCreateFiles"),workspaceWillRenameFiles:new ge("workspace/willRenameFiles"),workspaceWillDeleteFiles:new ge("workspace/willDeleteFiles"),textDocumentMoniker:new ge("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new ge("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new ge("textDocument/inlineValue"),textDocumentInlayHint:new ge("textDocument/inlayHint"),textDocumentDiagnostic:new ge("textDocument/diagnostic"),textDocumentInlineCompletion:new ge("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new ge("textDocument/willSaveWaitUntil"),textDocumentCompletion:new ge("textDocument/completion"),textDocumentHover:new ge("textDocument/hover"),textDocumentSignatureHelp:new ge("textDocument/signatureHelp"),textDocumentDefinition:new ge("textDocument/definition"),textDocumentReferences:new ge("textDocument/references"),textDocumentDocumentHighlight:new ge("textDocument/documentHighlight"),textDocumentDocumentSymbol:new ge("textDocument/documentSymbol"),textDocumentCodeAction:new ge("textDocument/codeAction"),workspaceSymbol:new ge("workspace/symbol"),textDocumentCodeLens:new ge("textDocument/codeLens"),textDocumentDocumentLink:new ge("textDocument/documentLink"),textDocumentFormatting:new ge("textDocument/formatting"),textDocumentRangeFormatting:new ge("textDocument/rangeFormatting"),textDocumentRangesFormatting:new ge("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new ge("textDocument/onTypeFormatting"),textDocumentRename:new ge("textDocument/rename"),workspaceExecuteCommand:new ge("workspace/executeCommand"),workspaceDidCreateFiles:new ge("workspace/didCreateFiles"),workspaceDidRenameFiles:new ge("workspace/didRenameFiles"),workspaceDidDeleteFiles:new ge("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new ge("workspace/didChangeConfiguration"),textDocumentDidOpen:new ge("textDocument/didOpen"),textDocumentDidChange:new ge("textDocument/didChange"),textDocumentDidClose:new ge("textDocument/didClose"),textDocumentDidSave:new ge("textDocument/didSave"),textDocumentWillSave:new ge("textDocument/willSave"),workspaceDidChangeWatchedFiles:new ge("workspace/didChangeWatchedFiles")},Kj=b5({server:{textDocumentImplementation:ee({method:"textDocument/implementation"}),textDocumentTypeDefinition:ee({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:ee({method:"textDocument/documentColor"}),textDocumentColorPresentation:ee({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:ee({method:"textDocument/foldingRange"}),textDocumentDeclaration:ee({method:"textDocument/declaration"}),textDocumentSelectionRange:ee({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:ee({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:ee({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:ee({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:ee({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:ee({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:ee({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:ee({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:ee({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:ee({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:ee({method:"workspace/willDeleteFiles"}),textDocumentMoniker:ee({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:ee({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:ee({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:ee({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:ee({method:"textDocument/inlineValue"}),textDocumentInlayHint:ee({method:"textDocument/inlayHint"}),inlayHintResolve:ee({method:"inlayHint/resolve"}),textDocumentDiagnostic:ee({method:"textDocument/diagnostic"}),workspaceDiagnostic:ee({method:"workspace/diagnostic"}),textDocumentInlineCompletion:ee({method:"textDocument/inlineCompletion"}),initialize:ee({method:"initialize"}),shutdown:ee({method:"shutdown"}),textDocumentWillSaveWaitUntil:ee({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:ee({method:"textDocument/completion"}),completionItemResolve:ee({method:"completionItem/resolve"}),textDocumentHover:ee({method:"textDocument/hover"}),textDocumentSignatureHelp:ee({method:"textDocument/signatureHelp"}),textDocumentDefinition:ee({method:"textDocument/definition"}),textDocumentReferences:ee({method:"textDocument/references"}),textDocumentDocumentHighlight:ee({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:ee({method:"textDocument/documentSymbol"}),textDocumentCodeAction:ee({method:"textDocument/codeAction"}),codeActionResolve:ee({method:"codeAction/resolve"}),workspaceSymbol:ee({method:"workspace/symbol"}),workspaceSymbolResolve:ee({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:ee({method:"textDocument/codeLens"}),codeLensResolve:ee({method:"codeLens/resolve"}),textDocumentDocumentLink:ee({method:"textDocument/documentLink"}),documentLinkResolve:ee({method:"documentLink/resolve"}),textDocumentFormatting:ee({method:"textDocument/formatting"}),textDocumentRangeFormatting:ee({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:ee({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:ee({method:"textDocument/onTypeFormatting"}),textDocumentRename:ee({method:"textDocument/rename"}),textDocumentPrepareRename:ee({method:"textDocument/prepareRename"}),workspaceExecuteCommand:ee({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:Ue({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:Ue({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:Ue({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:Ue({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:Ue({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:Ue({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:Ue({method:"notebookDocument/didChange"}),notebookDocumentDidSave:Ue({method:"notebookDocument/didSave"}),notebookDocumentDidClose:Ue({method:"notebookDocument/didClose"}),initialized:Ue({method:"initialized"}),exit:Ue({method:"exit"}),workspaceDidChangeConfiguration:Ue({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:Ue({method:"textDocument/didOpen"}),textDocumentDidChange:Ue({method:"textDocument/didChange"}),textDocumentDidClose:Ue({method:"textDocument/didClose"}),textDocumentDidSave:Ue({method:"textDocument/didSave"}),textDocumentWillSave:Ue({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:Ue({method:"workspace/didChangeWatchedFiles"}),setTrace:Ue({method:"$/setTrace"}),cancelRequest:Ue({method:"$/cancelRequest"}),progress:Ue({method:"$/progress"})},client:{workspaceWorkspaceFolders:ee({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:ee({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:ee({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:ee({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:ee({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:ee({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:ee({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:ee({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:ee({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:ee({method:"client/registerCapability"}).optional(),clientUnregisterCapability:ee({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:ee({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:ee({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:ee({method:"workspace/applyEdit"}).optional(),windowShowMessage:Ue({method:"window/showMessage"}),windowLogMessage:Ue({method:"window/logMessage"}),telemetryEvent:Ue({method:"telemetry/event"}),textDocumentPublishDiagnostics:Ue({method:"textDocument/publishDiagnostics"}),logTrace:Ue({method:"$/logTrace"}),cancelRequest:Ue({method:"$/cancelRequest"}),progress:Ue({method:"$/progress"})}}),Gj=(Hu=class{constructor(){ne(this,"_store",new I5)}dispose(){this._store.dispose()}_register(n){if(n===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(n)}},ne(Hu,"None",Object.freeze({dispose(){}})),Hu),I5=(cd=class{constructor(){ne(this,"_toDispose",new Set),ne(this,"_isDisposed",!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const n of this._toDispose)n.dispose()}finally{this._toDispose.clear()}}add(n){if(!n)return n;if(n===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?cd.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(n),n}},ne(cd,"DISABLE_DISPOSED_WARNING",!1),cd),Zj=new Map([[fn.Empty,""],[fn.QuickFix,"quickfix"],[fn.Refactor,"refactor"],[fn.RefactorExtract,"refactor.extract"],[fn.RefactorInline,"refactor.inline"],[fn.RefactorRewrite,"refactor.rewrite"],[fn.Source,"source"],[fn.SourceOrganizeImports,"source.organizeImports"],[fn.SourceFixAll,"source.fixAll"]]),Xj=new Map([[K.CodeActionTriggerType.Invoke,lS.Invoked],[K.CodeActionTriggerType.Auto,lS.Automatic]]),Yj=new Map([[Qe.Text,K.CompletionItemKind.Text],[Qe.Method,K.CompletionItemKind.Method],[Qe.Function,K.CompletionItemKind.Function],[Qe.Constructor,K.CompletionItemKind.Constructor],[Qe.Field,K.CompletionItemKind.Field],[Qe.Variable,K.CompletionItemKind.Variable],[Qe.Class,K.CompletionItemKind.Class],[Qe.Interface,K.CompletionItemKind.Interface],[Qe.Module,K.CompletionItemKind.Module],[Qe.Property,K.CompletionItemKind.Property],[Qe.Unit,K.CompletionItemKind.Unit],[Qe.Value,K.CompletionItemKind.Value],[Qe.Enum,K.CompletionItemKind.Enum],[Qe.Keyword,K.CompletionItemKind.Keyword],[Qe.Snippet,K.CompletionItemKind.Snippet],[Qe.Color,K.CompletionItemKind.Color],[Qe.File,K.CompletionItemKind.File],[Qe.Reference,K.CompletionItemKind.Reference],[Qe.Folder,K.CompletionItemKind.Folder],[Qe.EnumMember,K.CompletionItemKind.EnumMember],[Qe.Constant,K.CompletionItemKind.Constant],[Qe.Struct,K.CompletionItemKind.Struct],[Qe.Event,K.CompletionItemKind.Event],[Qe.Operator,K.CompletionItemKind.Operator],[Qe.TypeParameter,K.CompletionItemKind.TypeParameter]]),Jj=new Map([[w5.Deprecated,K.CompletionItemTag.Deprecated]]),Qj=new Map([[K.CompletionTriggerKind.Invoke,Uu.Invoked],[K.CompletionTriggerKind.TriggerCharacter,Uu.TriggerCharacter],[K.CompletionTriggerKind.TriggerForIncompleteCompletions,Uu.TriggerForIncompleteCompletions]]),e4=new Map([[y5.Snippet,K.CompletionItemInsertTextRule.InsertAsSnippet]]),t4=new Map([[Xe.File,K.SymbolKind.File],[Xe.Module,K.SymbolKind.Module],[Xe.Namespace,K.SymbolKind.Namespace],[Xe.Package,K.SymbolKind.Package],[Xe.Class,K.SymbolKind.Class],[Xe.Method,K.SymbolKind.Method],[Xe.Property,K.SymbolKind.Property],[Xe.Field,K.SymbolKind.Field],[Xe.Constructor,K.SymbolKind.Constructor],[Xe.Enum,K.SymbolKind.Enum],[Xe.Interface,K.SymbolKind.Interface],[Xe.Function,K.SymbolKind.Function],[Xe.Variable,K.SymbolKind.Variable],[Xe.Constant,K.SymbolKind.Constant],[Xe.String,K.SymbolKind.String],[Xe.Number,K.SymbolKind.Number],[Xe.Boolean,K.SymbolKind.Boolean],[Xe.Array,K.SymbolKind.Array],[Xe.Object,K.SymbolKind.Object],[Xe.Key,K.SymbolKind.Key],[Xe.Null,K.SymbolKind.Null],[Xe.EnumMember,K.SymbolKind.EnumMember],[Xe.Struct,K.SymbolKind.Struct],[Xe.Event,K.SymbolKind.Event],[Xe.Operator,K.SymbolKind.Operator],[Xe.TypeParameter,K.SymbolKind.TypeParameter]]),i4=new Map([[S5.Deprecated,K.SymbolTag.Deprecated]]),n4=new Map([[Bu.Text,K.DocumentHighlightKind.Text],[Bu.Read,K.DocumentHighlightKind.Read],[Bu.Write,K.DocumentHighlightKind.Write]]),s4=new Map([[Vu.Comment,K.FoldingRangeKind.Comment],[Vu.Imports,K.FoldingRangeKind.Imports],[Vu.Region,K.FoldingRangeKind.Region]]),o4=new Map([[ts.Error,as.Error],[ts.Warning,as.Warning],[ts.Info,as.Information],[ts.Hint,as.Hint]]),r4=new Map([[as.Error,ts.Error],[as.Warning,ts.Warning],[as.Information,ts.Info],[as.Hint,ts.Hint]]),a4=new Map([[aS.Unnecessary,mv.Unnecessary],[aS.Deprecated,mv.Deprecated]]),l4=new Map([[K.SignatureHelpTriggerKind.Invoke,zu.Invoked],[K.SignatureHelpTriggerKind.TriggerCharacter,zu.TriggerCharacter],[K.SignatureHelpTriggerKind.ContentChange,zu.ContentChange]]),d4=new Map([[rS.Type,K.InlayHintKind.Type],[rS.Parameter,K.InlayHintKind.Parameter]]),c4=new Map([...Object.values(x5)].map(n=>[n.method,n])),Yr=null;typeof WebSocket<"u"?Yr=WebSocket:typeof MozWebSocket<"u"?Yr=MozWebSocket:typeof global<"u"?Yr=global.WebSocket||global.MozWebSocket:typeof window<"u"?Yr=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Yr=self.WebSocket||self.MozWebSocket);var FD={},ju={},L5=class HD{static getOrCreate(e){return ju[e]||(ju[e]=new HD(e)),ju[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,FD[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function j(n){const e=n.id;FD[e]=n,K.register(n);const t=L5.getOrCreate(e);K.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),K.onLanguageEncountered(e,async()=>{const i=await t.load();K.setLanguageConfiguration(e,i.conf)})}j({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>U(()=>import("./abap-B7CMCXo3.js"),[])});j({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>U(()=>import("./apex-D6pniLV0.js"),[])});j({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>U(()=>import("./azcli-DayXln6N.js"),[])});j({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>U(()=>import("./bat-knBi4IWo.js"),[])});j({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>U(()=>import("./bicep-CqySwd8I.js"),[])});j({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>U(()=>import("./cameligo-D1w-uj2C.js"),[])});j({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>U(()=>import("./clojure-D7bkK2B8.js"),[])});j({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>U(()=>import("./coffee-Dpij46Wn.js"),[])});j({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>U(()=>import("./cpp-DWDORc6B.js"),[])});j({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>U(()=>import("./cpp-DWDORc6B.js"),[])});j({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>U(()=>import("./csharp-FpOMvD_o.js"),[])});j({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>U(()=>import("./csp-4WiITR2R.js"),[])});j({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>U(()=>import("./css-DMOWqvgH.js"),[])});j({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>U(()=>import("./cypher-Byev8hZE.js"),[])});j({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>U(()=>import("./dart--T4f3SxI.js"),[])});j({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>U(()=>import("./dockerfile-CTL_qQGw.js"),[])});j({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>U(()=>import("./ecl-D2-VZ5jm.js"),[])});j({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>U(()=>import("./elixir-C__1cTub.js"),[])});j({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>U(()=>import("./flow9-U08FhG_o.js"),[])});j({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>U(()=>import("./fsharp-BYeUdvUi.js"),[])});j({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>U(()=>import("./freemarker2-EL1xRRz-.js").then(n=>n.TagAutoInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>U(()=>import("./freemarker2-EL1xRRz-.js").then(n=>n.TagAngleInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>U(()=>import("./freemarker2-EL1xRRz-.js").then(n=>n.TagBracketInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>U(()=>import("./freemarker2-EL1xRRz-.js").then(n=>n.TagAngleInterpolationBracket),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>U(()=>import("./freemarker2-EL1xRRz-.js").then(n=>n.TagBracketInterpolationBracket),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>U(()=>import("./freemarker2-EL1xRRz-.js").then(n=>n.TagAutoInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>U(()=>import("./freemarker2-EL1xRRz-.js").then(n=>n.TagAutoInterpolationBracket),__vite__mapDeps([5,1,2,3]))});j({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>U(()=>import("./go-D7V_ae37.js"),[])});j({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>U(()=>import("./graphql-C-zVsbUk.js"),[])});j({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>U(()=>import("./handlebars-BgZpkJkF.js"),__vite__mapDeps([6,1,2,3]))});j({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>U(()=>import("./hcl-B7_QCGTQ.js"),[])});j({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>U(()=>import("./html-e4Xrzf8r.js"),__vite__mapDeps([7,1,2,3]))});j({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>U(()=>import("./ini-B8RMyZP2.js"),[])});j({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>U(()=>import("./java-B0bzjGsf.js"),[])});j({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>U(()=>import("./javascript-BSAFurIc.js"),__vite__mapDeps([8,9,1,2,3]))});j({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>U(()=>import("./julia-Bg58EZ4Y.js"),[])});j({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>U(()=>import("./kotlin-DW9Z0gYb.js"),[])});j({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>U(()=>import("./less-Bx9gqQ4s.js"),[])});j({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>U(()=>import("./lexon-CSuDDXgE.js"),[])});j({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>U(()=>import("./lua-CyCE05f5.js"),[])});j({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>U(()=>import("./liquid-BmNDruwv.js"),__vite__mapDeps([10,1,2,3]))});j({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>U(()=>import("./m3-B4TowLdg.js"),[])});j({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>U(()=>import("./markdown-DUAXYKYX.js"),[])});j({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>U(()=>import("./mdx-DWKx4rlR.js"),__vite__mapDeps([11,1,2,3]))});j({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>U(()=>import("./mips-B8pYMMky.js"),[])});j({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>U(()=>import("./msdax-Dl7lqaqA.js"),[])});j({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>U(()=>import("./mysql-CxF1irIT.js"),[])});j({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>U(()=>import("./objective-c-nxQNwVWR.js"),[])});j({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>U(()=>import("./pascal-CJDb1n8F.js"),[])});j({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>U(()=>import("./pascaligo-DNMesjCc.js"),[])});j({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>U(()=>import("./perl-Ct14C4yC.js"),[])});j({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>U(()=>import("./pgsql-B2EenuF0.js"),[])});j({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>U(()=>import("./php-D953oiSq.js"),[])});j({id:"pla",extensions:[".pla"],loader:()=>U(()=>import("./pla-DTXlQw1d.js"),[])});j({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>U(()=>import("./postiats-JN8Ouz04.js"),[])});j({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>U(()=>import("./powerquery-5V8-uvAS.js"),[])});j({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>U(()=>import("./powershell-CB8eXyFq.js"),[])});j({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>U(()=>import("./protobuf-B9TJJ9C4.js"),[])});j({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>U(()=>import("./pug-Bm8fNuV-.js"),[])});j({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>U(()=>import("./python-C5yAejbi.js"),__vite__mapDeps([12,1,2,3]))});j({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>U(()=>import("./qsharp-R8gbdykE.js"),[])});j({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>U(()=>import("./r-M-_jtR31.js"),[])});j({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>U(()=>import("./razor-C1QqRako.js"),__vite__mapDeps([13,1,2,3]))});j({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>U(()=>import("./redis-Se45CWCe.js"),[])});j({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>U(()=>import("./redshift-6LxiBjWf.js"),[])});j({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>U(()=>import("./restructuredtext-DQZZ8qkw.js"),[])});j({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>U(()=>import("./ruby-CCIHgGuA.js"),[])});j({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>U(()=>import("./rust-DE79jE85.js"),[])});j({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>U(()=>import("./sb-vTusoyll.js"),[])});j({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>U(()=>import("./scala-BfDNOQ4o.js"),[])});j({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>U(()=>import("./scheme-07Nz-Ikg.js"),[])});j({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>U(()=>import("./scss-C2T-BIyo.js"),[])});j({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>U(()=>import("./shell-CYk99G96.js"),[])});j({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>U(()=>import("./solidity-DZfw6XST.js"),[])});j({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>U(()=>import("./sophia-9ELY8Wd6.js"),[])});j({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>U(()=>import("./sparql-DBCoTLhO.js"),[])});j({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>U(()=>import("./sql-DSSHZrVP.js"),[])});j({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>U(()=>import("./st-9goatbhG.js"),[])});j({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>U(()=>import("./swift-C8IWUoth.js"),[])});j({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>U(()=>import("./systemverilog-DFmMGPsp.js"),[])});j({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>U(()=>import("./systemverilog-DFmMGPsp.js"),[])});j({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>U(()=>import("./tcl-9sp6ieFk.js"),[])});j({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>U(()=>import("./twig-PTQx-ucO.js"),[])});j({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>U(()=>import("./typescript-BGXEvFAl.js"),__vite__mapDeps([9,1,2,3]))});j({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>U(()=>import("./typespec-k1Hrq-4g.js"),[])});j({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>U(()=>import("./vb-BBuEtOk5.js"),[])});j({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>U(()=>import("./wgsl-MO-DpoEc.js"),[])});j({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:()=>U(()=>import("./xml-C0nHIB7q.js"),__vite__mapDeps([14,1,2,3]))});j({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>U(()=>import("./yaml-CN9StMra.js"),__vite__mapDeps([15,1,2,3]))});var U_=class{constructor(n,e,t){this._onDidChange=new Aa,this._languageId=n,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(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},z_={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}},j_={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},D5=new U_("css",z_,j_),E5=new U_("scss",z_,j_),R5=new U_("less",z_,j_);function q_(){return U(()=>import("./cssMode-DHL98brF.js"),__vite__mapDeps([16,1,2,3,4,17]))}K.onLanguage("less",()=>{q_().then(n=>n.setupMode(R5))});K.onLanguage("scss",()=>{q_().then(n=>n.setupMode(E5))});K.onLanguage("css",()=>{q_().then(n=>n.setupMode(D5))});var T5=class{constructor(n,e,t){this._onDidChange=new Aa,this._languageId=n,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(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},Oh={format:{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"},suggest:{},data:{useDefaultDataProvider:!0}};function Mh(n){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:n===Ea,documentFormattingEdits:n===Ea,documentRangeFormattingEdits:n===Ea}}var Ea="html",dS="handlebars",cS="razor",N5=$_(Ea,Oh,Mh(Ea)),h4=N5.defaults,k5=$_(dS,Oh,Mh(dS)),u4=k5.defaults,P5=$_(cS,Oh,Mh(cS)),g4=P5.defaults;function O5(){return U(()=>import("./htmlMode-B6WabTqV.js"),__vite__mapDeps([18,1,2,3,4,17]))}function $_(n,e=Oh,t=Mh(n)){const i=new T5(n,e,t);let s;const o=K.onLanguage(n,async()=>{s=(await O5()).setupMode(i)});return{defaults:i,dispose(){o.dispose(),s?.dispose(),s=void 0}}}var M5=class{constructor(n,e,t){this._onDidChange=new Aa,this._languageId=n,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(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},A5=new M5("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function F5(){return U(()=>import("./jsonMode-CMXGrtoZ.js"),__vite__mapDeps([19,1,2,3,4,17]))}K.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});K.onLanguage("json",()=>{F5().then(n=>n.setupMode(A5))});var hS="__monacoFindWidgetTabIndexPatchApplied",Jr="__monacoFindWidgetOriginalTabIndex";function uS(n,e){const t=n?._domNode;if(!t)return;const i=t.querySelectorAll('input, textarea, [tabindex], [role="button"], [role="checkbox"]');for(const s of i)if(s instanceof HTMLElement)if(e){if(!(Jr in s.dataset))continue;const o=s.dataset[Jr];o===""?s.removeAttribute("tabindex"):s.tabIndex=Number(o),delete s.dataset[Jr]}else Jr in s.dataset||(s.dataset[Jr]=s.getAttribute("tabindex")??""),s.tabIndex=-1}if(!Us[hS]){const n=Us.prototype._reveal,e=Us.prototype._hide;Us.prototype._reveal=function(...t){n.apply(this,t),uS(this,!0)},Us.prototype._hide=function(...t){e.apply(this,t),uS(this,!1)},Us[hS]=!0}function H5(n){return new Worker("/assets/editor.worker-BYfbSb3U.js",{name:n?.name})}function W5(n){return new Worker("/assets/json.worker-DI02pyM8.js",{name:n?.name})}self.MonacoEnvironment={getWorker:(n,e)=>e==="json"?new W5:new H5};var V5="db-studio-dark",B5="db-studio-light",gS=!1,p4=()=>{if(gS)return;gS=!0;const n={"editor.background":"#00000000","editorGutter.background":"#00000000","editor.lineHighlightBackground":"#00000000","editorOverviewRuler.background":"#00000000"};bv.defineTheme(V5,{base:"vs-dark",inherit:!0,rules:[],colors:n}),bv.defineTheme(B5,{base:"vs",inherit:!0,rules:[],colors:n})};export{n5 as i,B5 as n,p4 as r,V5 as t};
|
|
64
|
+
${JSON.stringify(o,null,2)}`);return r.value}}async notify(e,t,i){if(!this.checkChannel(this._requestSender))throw new Error;const s=e.paramsSerializer.serializeToJson(t);iS(s),this._requestSender.sendNotification({method:e.method,params:s},i)}};function iS(n){if(n!==null&&Array.isArray(n)&&typeof n!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var nS=class OD extends Error{constructor(e,t,i=Si.genericApplicationError){super(e),ne(this,"data"),ne(this,"code"),this.data=t,this.code=i,Object.setPrototypeOf(this,OD.prototype)}},_5=class tm{constructor(e,t,i,s,o=!1){ne(this,"method"),ne(this,"paramsSerializer"),ne(this,"resultSerializer"),ne(this,"errorSerializer"),ne(this,"isOptional"),ne(this,"kind","request"),this.method=e,this.paramsSerializer=t,this.resultSerializer=i,this.errorSerializer=s,this.isOptional=o}withMethod(e){return new tm(e,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new tm(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},v5=class MD{constructor(e,t){ne(this,"method"),ne(this,"paramsSerializer"),ne(this,"kind","notification"),this.method=e,this.paramsSerializer=t}withMethod(e){return new MD(e,this.paramsSerializer)}};function ee(n){return new _5((n||{}).method,nr.sAny(),nr.sAny(),nr.sAny())}function Ue(n){return new v5((n||{}).method,nr.sAny())}var sS=(QC=Symbol(),dd=class{constructor(n){ne(this,"error"),ne(this,QC),this.error=n}},ne(dd,"factory",n=>new dd(n)),dd);function b5(n){const e=oS(n.server),t=oS(n.client);return new C5(n.tags||[],e,t)}function oS(n){const e={};for(const[t,i]of Object.entries(n)){const s=i.method?i.method:t;e[t]=i.withMethod(s)}return e}var C5=class AD{constructor(e=[],t,i){ne(this,"tags"),ne(this,"server"),ne(this,"client"),this.tags=e,this.server=t,this.client=i}_onlyDesignTime(){return new Error("This property is not meant to be accessed at runtime")}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,i,s){const o=this.buildCounterpart(e,i),r=this.registerHandlers(e,t,s,o);return{counterpart:o,dispose:()=>r.dispose()}}buildCounterpart(e,t){const i={};for(const[s,o]of Object.entries(t)){let r;o.kind==="request"?o.isOptional?r=async(a,l)=>{a===void 0&&(a={});try{return await e.request(o,a,l)}catch(d){if(d&&d.code===Si.methodNotFound)return ND;throw d}}:r=(a,l)=>(a===void 0&&(a={}),e.request(o,a,l)):r=(a,l)=>(a===void 0&&(a={}),e.notify(o,a,l)),i[s]=r}return i}registerHandlers(e,t,i,s){const o=[];for(const[r,a]of Object.entries(t))if(a.kind==="request"){let l=i[r];if(!l)continue;const d=this.createRequestHandler(s,l);o.push(e.registerRequestHandler(a,d))}else{const l=i[r];l&&o.push(e.registerNotificationHandler(a,(d,c)=>{l(d,{context:c,counterpart:s})}))}return{dispose:()=>o.forEach(r=>r.dispose())}}createRequestHandler(e,t){return async(i,s,o)=>{const r=await t(i,{context:o,counterpart:e,newErr:sS.factory,requestId:s});return r instanceof sS?r.error:{ok:r}}}static getServerFromStream(e,t,i,s){const o=tS.fromTransport(t,i),{server:r}=e.getServer(o,s);return o.startListen(),{channel:o,server:r}}static registerServerToStream(e,t,i,s){const o=tS.fromTransport(t,i),{client:r}=e.registerServer(o,s);return o.startListen(),{channel:o,client:r}}getServer(e,t){const{counterpart:i,dispose:s}=this.getInterface(e,this.client,this.server,t);return{server:i,dispose:s}}registerServer(e,t){const{counterpart:i,dispose:s}=this.getInterface(e,this.server,this.client,t);return{client:i,dispose:s}}withContext(){return new AD(this.tags,this.server,this.client)}},Vu=(function(n){return n.Comment="comment",n.Imports="imports",n.Region="region",n})({}),Xe=(function(n){return n[n.File=1]="File",n[n.Module=2]="Module",n[n.Namespace=3]="Namespace",n[n.Package=4]="Package",n[n.Class=5]="Class",n[n.Method=6]="Method",n[n.Property=7]="Property",n[n.Field=8]="Field",n[n.Constructor=9]="Constructor",n[n.Enum=10]="Enum",n[n.Interface=11]="Interface",n[n.Function=12]="Function",n[n.Variable=13]="Variable",n[n.Constant=14]="Constant",n[n.String=15]="String",n[n.Number=16]="Number",n[n.Boolean=17]="Boolean",n[n.Array=18]="Array",n[n.Object=19]="Object",n[n.Key=20]="Key",n[n.Null=21]="Null",n[n.EnumMember=22]="EnumMember",n[n.Struct=23]="Struct",n[n.Event=24]="Event",n[n.Operator=25]="Operator",n[n.TypeParameter=26]="TypeParameter",n})({}),S5=(function(n){return n[n.Deprecated=1]="Deprecated",n})({}),rS=(function(n){return n[n.Type=1]="Type",n[n.Parameter=2]="Parameter",n})({}),Qe=(function(n){return n[n.Text=1]="Text",n[n.Method=2]="Method",n[n.Function=3]="Function",n[n.Constructor=4]="Constructor",n[n.Field=5]="Field",n[n.Variable=6]="Variable",n[n.Class=7]="Class",n[n.Interface=8]="Interface",n[n.Module=9]="Module",n[n.Property=10]="Property",n[n.Unit=11]="Unit",n[n.Value=12]="Value",n[n.Enum=13]="Enum",n[n.Keyword=14]="Keyword",n[n.Snippet=15]="Snippet",n[n.Color=16]="Color",n[n.File=17]="File",n[n.Reference=18]="Reference",n[n.Folder=19]="Folder",n[n.EnumMember=20]="EnumMember",n[n.Constant=21]="Constant",n[n.Struct=22]="Struct",n[n.Event=23]="Event",n[n.Operator=24]="Operator",n[n.TypeParameter=25]="TypeParameter",n})({}),w5=(function(n){return n[n.Deprecated=1]="Deprecated",n})({}),y5=(function(n){return n[n.PlainText=1]="PlainText",n[n.Snippet=2]="Snippet",n})({}),Bu=(function(n){return n[n.Text=1]="Text",n[n.Read=2]="Read",n[n.Write=3]="Write",n})({}),fn=(function(n){return n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll",n})({}),as=(function(n){return n[n.Error=1]="Error",n[n.Warning=2]="Warning",n[n.Information=3]="Information",n[n.Hint=4]="Hint",n})({}),aS=(function(n){return n[n.Unnecessary=1]="Unnecessary",n[n.Deprecated=2]="Deprecated",n})({}),Uu=(function(n){return n[n.Invoked=1]="Invoked",n[n.TriggerCharacter=2]="TriggerCharacter",n[n.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",n})({}),zu=(function(n){return n[n.Invoked=1]="Invoked",n[n.TriggerCharacter=2]="TriggerCharacter",n[n.ContentChange=3]="ContentChange",n})({}),lS=(function(n){return n[n.Invoked=1]="Invoked",n[n.Automatic=2]="Automatic",n})({}),ge=class{constructor(n){this.method=n}},x5={textDocumentImplementation:new ge("textDocument/implementation"),textDocumentTypeDefinition:new ge("textDocument/typeDefinition"),textDocumentDocumentColor:new ge("textDocument/documentColor"),textDocumentColorPresentation:new ge("textDocument/colorPresentation"),textDocumentFoldingRange:new ge("textDocument/foldingRange"),textDocumentDeclaration:new ge("textDocument/declaration"),textDocumentSelectionRange:new ge("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new ge("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new ge("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new ge("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new ge("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new ge("workspace/willCreateFiles"),workspaceWillRenameFiles:new ge("workspace/willRenameFiles"),workspaceWillDeleteFiles:new ge("workspace/willDeleteFiles"),textDocumentMoniker:new ge("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new ge("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new ge("textDocument/inlineValue"),textDocumentInlayHint:new ge("textDocument/inlayHint"),textDocumentDiagnostic:new ge("textDocument/diagnostic"),textDocumentInlineCompletion:new ge("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new ge("textDocument/willSaveWaitUntil"),textDocumentCompletion:new ge("textDocument/completion"),textDocumentHover:new ge("textDocument/hover"),textDocumentSignatureHelp:new ge("textDocument/signatureHelp"),textDocumentDefinition:new ge("textDocument/definition"),textDocumentReferences:new ge("textDocument/references"),textDocumentDocumentHighlight:new ge("textDocument/documentHighlight"),textDocumentDocumentSymbol:new ge("textDocument/documentSymbol"),textDocumentCodeAction:new ge("textDocument/codeAction"),workspaceSymbol:new ge("workspace/symbol"),textDocumentCodeLens:new ge("textDocument/codeLens"),textDocumentDocumentLink:new ge("textDocument/documentLink"),textDocumentFormatting:new ge("textDocument/formatting"),textDocumentRangeFormatting:new ge("textDocument/rangeFormatting"),textDocumentRangesFormatting:new ge("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new ge("textDocument/onTypeFormatting"),textDocumentRename:new ge("textDocument/rename"),workspaceExecuteCommand:new ge("workspace/executeCommand"),workspaceDidCreateFiles:new ge("workspace/didCreateFiles"),workspaceDidRenameFiles:new ge("workspace/didRenameFiles"),workspaceDidDeleteFiles:new ge("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new ge("workspace/didChangeConfiguration"),textDocumentDidOpen:new ge("textDocument/didOpen"),textDocumentDidChange:new ge("textDocument/didChange"),textDocumentDidClose:new ge("textDocument/didClose"),textDocumentDidSave:new ge("textDocument/didSave"),textDocumentWillSave:new ge("textDocument/willSave"),workspaceDidChangeWatchedFiles:new ge("workspace/didChangeWatchedFiles")},Kj=b5({server:{textDocumentImplementation:ee({method:"textDocument/implementation"}),textDocumentTypeDefinition:ee({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:ee({method:"textDocument/documentColor"}),textDocumentColorPresentation:ee({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:ee({method:"textDocument/foldingRange"}),textDocumentDeclaration:ee({method:"textDocument/declaration"}),textDocumentSelectionRange:ee({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:ee({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:ee({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:ee({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:ee({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:ee({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:ee({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:ee({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:ee({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:ee({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:ee({method:"workspace/willDeleteFiles"}),textDocumentMoniker:ee({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:ee({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:ee({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:ee({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:ee({method:"textDocument/inlineValue"}),textDocumentInlayHint:ee({method:"textDocument/inlayHint"}),inlayHintResolve:ee({method:"inlayHint/resolve"}),textDocumentDiagnostic:ee({method:"textDocument/diagnostic"}),workspaceDiagnostic:ee({method:"workspace/diagnostic"}),textDocumentInlineCompletion:ee({method:"textDocument/inlineCompletion"}),initialize:ee({method:"initialize"}),shutdown:ee({method:"shutdown"}),textDocumentWillSaveWaitUntil:ee({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:ee({method:"textDocument/completion"}),completionItemResolve:ee({method:"completionItem/resolve"}),textDocumentHover:ee({method:"textDocument/hover"}),textDocumentSignatureHelp:ee({method:"textDocument/signatureHelp"}),textDocumentDefinition:ee({method:"textDocument/definition"}),textDocumentReferences:ee({method:"textDocument/references"}),textDocumentDocumentHighlight:ee({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:ee({method:"textDocument/documentSymbol"}),textDocumentCodeAction:ee({method:"textDocument/codeAction"}),codeActionResolve:ee({method:"codeAction/resolve"}),workspaceSymbol:ee({method:"workspace/symbol"}),workspaceSymbolResolve:ee({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:ee({method:"textDocument/codeLens"}),codeLensResolve:ee({method:"codeLens/resolve"}),textDocumentDocumentLink:ee({method:"textDocument/documentLink"}),documentLinkResolve:ee({method:"documentLink/resolve"}),textDocumentFormatting:ee({method:"textDocument/formatting"}),textDocumentRangeFormatting:ee({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:ee({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:ee({method:"textDocument/onTypeFormatting"}),textDocumentRename:ee({method:"textDocument/rename"}),textDocumentPrepareRename:ee({method:"textDocument/prepareRename"}),workspaceExecuteCommand:ee({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:Ue({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:Ue({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:Ue({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:Ue({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:Ue({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:Ue({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:Ue({method:"notebookDocument/didChange"}),notebookDocumentDidSave:Ue({method:"notebookDocument/didSave"}),notebookDocumentDidClose:Ue({method:"notebookDocument/didClose"}),initialized:Ue({method:"initialized"}),exit:Ue({method:"exit"}),workspaceDidChangeConfiguration:Ue({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:Ue({method:"textDocument/didOpen"}),textDocumentDidChange:Ue({method:"textDocument/didChange"}),textDocumentDidClose:Ue({method:"textDocument/didClose"}),textDocumentDidSave:Ue({method:"textDocument/didSave"}),textDocumentWillSave:Ue({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:Ue({method:"workspace/didChangeWatchedFiles"}),setTrace:Ue({method:"$/setTrace"}),cancelRequest:Ue({method:"$/cancelRequest"}),progress:Ue({method:"$/progress"})},client:{workspaceWorkspaceFolders:ee({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:ee({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:ee({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:ee({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:ee({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:ee({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:ee({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:ee({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:ee({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:ee({method:"client/registerCapability"}).optional(),clientUnregisterCapability:ee({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:ee({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:ee({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:ee({method:"workspace/applyEdit"}).optional(),windowShowMessage:Ue({method:"window/showMessage"}),windowLogMessage:Ue({method:"window/logMessage"}),telemetryEvent:Ue({method:"telemetry/event"}),textDocumentPublishDiagnostics:Ue({method:"textDocument/publishDiagnostics"}),logTrace:Ue({method:"$/logTrace"}),cancelRequest:Ue({method:"$/cancelRequest"}),progress:Ue({method:"$/progress"})}}),Gj=(Hu=class{constructor(){ne(this,"_store",new I5)}dispose(){this._store.dispose()}_register(n){if(n===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(n)}},ne(Hu,"None",Object.freeze({dispose(){}})),Hu),I5=(cd=class{constructor(){ne(this,"_toDispose",new Set),ne(this,"_isDisposed",!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const n of this._toDispose)n.dispose()}finally{this._toDispose.clear()}}add(n){if(!n)return n;if(n===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?cd.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(n),n}},ne(cd,"DISABLE_DISPOSED_WARNING",!1),cd),Zj=new Map([[fn.Empty,""],[fn.QuickFix,"quickfix"],[fn.Refactor,"refactor"],[fn.RefactorExtract,"refactor.extract"],[fn.RefactorInline,"refactor.inline"],[fn.RefactorRewrite,"refactor.rewrite"],[fn.Source,"source"],[fn.SourceOrganizeImports,"source.organizeImports"],[fn.SourceFixAll,"source.fixAll"]]),Xj=new Map([[K.CodeActionTriggerType.Invoke,lS.Invoked],[K.CodeActionTriggerType.Auto,lS.Automatic]]),Yj=new Map([[Qe.Text,K.CompletionItemKind.Text],[Qe.Method,K.CompletionItemKind.Method],[Qe.Function,K.CompletionItemKind.Function],[Qe.Constructor,K.CompletionItemKind.Constructor],[Qe.Field,K.CompletionItemKind.Field],[Qe.Variable,K.CompletionItemKind.Variable],[Qe.Class,K.CompletionItemKind.Class],[Qe.Interface,K.CompletionItemKind.Interface],[Qe.Module,K.CompletionItemKind.Module],[Qe.Property,K.CompletionItemKind.Property],[Qe.Unit,K.CompletionItemKind.Unit],[Qe.Value,K.CompletionItemKind.Value],[Qe.Enum,K.CompletionItemKind.Enum],[Qe.Keyword,K.CompletionItemKind.Keyword],[Qe.Snippet,K.CompletionItemKind.Snippet],[Qe.Color,K.CompletionItemKind.Color],[Qe.File,K.CompletionItemKind.File],[Qe.Reference,K.CompletionItemKind.Reference],[Qe.Folder,K.CompletionItemKind.Folder],[Qe.EnumMember,K.CompletionItemKind.EnumMember],[Qe.Constant,K.CompletionItemKind.Constant],[Qe.Struct,K.CompletionItemKind.Struct],[Qe.Event,K.CompletionItemKind.Event],[Qe.Operator,K.CompletionItemKind.Operator],[Qe.TypeParameter,K.CompletionItemKind.TypeParameter]]),Jj=new Map([[w5.Deprecated,K.CompletionItemTag.Deprecated]]),Qj=new Map([[K.CompletionTriggerKind.Invoke,Uu.Invoked],[K.CompletionTriggerKind.TriggerCharacter,Uu.TriggerCharacter],[K.CompletionTriggerKind.TriggerForIncompleteCompletions,Uu.TriggerForIncompleteCompletions]]),e4=new Map([[y5.Snippet,K.CompletionItemInsertTextRule.InsertAsSnippet]]),t4=new Map([[Xe.File,K.SymbolKind.File],[Xe.Module,K.SymbolKind.Module],[Xe.Namespace,K.SymbolKind.Namespace],[Xe.Package,K.SymbolKind.Package],[Xe.Class,K.SymbolKind.Class],[Xe.Method,K.SymbolKind.Method],[Xe.Property,K.SymbolKind.Property],[Xe.Field,K.SymbolKind.Field],[Xe.Constructor,K.SymbolKind.Constructor],[Xe.Enum,K.SymbolKind.Enum],[Xe.Interface,K.SymbolKind.Interface],[Xe.Function,K.SymbolKind.Function],[Xe.Variable,K.SymbolKind.Variable],[Xe.Constant,K.SymbolKind.Constant],[Xe.String,K.SymbolKind.String],[Xe.Number,K.SymbolKind.Number],[Xe.Boolean,K.SymbolKind.Boolean],[Xe.Array,K.SymbolKind.Array],[Xe.Object,K.SymbolKind.Object],[Xe.Key,K.SymbolKind.Key],[Xe.Null,K.SymbolKind.Null],[Xe.EnumMember,K.SymbolKind.EnumMember],[Xe.Struct,K.SymbolKind.Struct],[Xe.Event,K.SymbolKind.Event],[Xe.Operator,K.SymbolKind.Operator],[Xe.TypeParameter,K.SymbolKind.TypeParameter]]),i4=new Map([[S5.Deprecated,K.SymbolTag.Deprecated]]),n4=new Map([[Bu.Text,K.DocumentHighlightKind.Text],[Bu.Read,K.DocumentHighlightKind.Read],[Bu.Write,K.DocumentHighlightKind.Write]]),s4=new Map([[Vu.Comment,K.FoldingRangeKind.Comment],[Vu.Imports,K.FoldingRangeKind.Imports],[Vu.Region,K.FoldingRangeKind.Region]]),o4=new Map([[ts.Error,as.Error],[ts.Warning,as.Warning],[ts.Info,as.Information],[ts.Hint,as.Hint]]),r4=new Map([[as.Error,ts.Error],[as.Warning,ts.Warning],[as.Information,ts.Info],[as.Hint,ts.Hint]]),a4=new Map([[aS.Unnecessary,mv.Unnecessary],[aS.Deprecated,mv.Deprecated]]),l4=new Map([[K.SignatureHelpTriggerKind.Invoke,zu.Invoked],[K.SignatureHelpTriggerKind.TriggerCharacter,zu.TriggerCharacter],[K.SignatureHelpTriggerKind.ContentChange,zu.ContentChange]]),d4=new Map([[rS.Type,K.InlayHintKind.Type],[rS.Parameter,K.InlayHintKind.Parameter]]),c4=new Map([...Object.values(x5)].map(n=>[n.method,n])),Yr=null;typeof WebSocket<"u"?Yr=WebSocket:typeof MozWebSocket<"u"?Yr=MozWebSocket:typeof global<"u"?Yr=global.WebSocket||global.MozWebSocket:typeof window<"u"?Yr=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Yr=self.WebSocket||self.MozWebSocket);var FD={},ju={},L5=class HD{static getOrCreate(e){return ju[e]||(ju[e]=new HD(e)),ju[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,i)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=i})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,FD[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function j(n){const e=n.id;FD[e]=n,K.register(n);const t=L5.getOrCreate(e);K.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),K.onLanguageEncountered(e,async()=>{const i=await t.load();K.setLanguageConfiguration(e,i.conf)})}j({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>U(()=>import("./abap-B-HzHdT_.js"),[])});j({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>U(()=>import("./apex-t5VcK3BF.js"),[])});j({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>U(()=>import("./azcli-Ce3iuV2p.js"),[])});j({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>U(()=>import("./bat-bOBZcLbK.js"),[])});j({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>U(()=>import("./bicep-TSicgsnM.js"),[])});j({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>U(()=>import("./cameligo-D-9xpPXV.js"),[])});j({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>U(()=>import("./clojure-9X3x3csE.js"),[])});j({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>U(()=>import("./coffee-anOch8Z-.js"),[])});j({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>U(()=>import("./cpp-oW293AoF.js"),[])});j({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>U(()=>import("./cpp-oW293AoF.js"),[])});j({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>U(()=>import("./csharp-BOXMgm5k.js"),[])});j({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>U(()=>import("./csp-D67JhNKT.js"),[])});j({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>U(()=>import("./css-Bk6H7_K_.js"),[])});j({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>U(()=>import("./cypher-DB0LBjic.js"),[])});j({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>U(()=>import("./dart-CS3MbwLP.js"),[])});j({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>U(()=>import("./dockerfile-BGz3qsmk.js"),[])});j({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>U(()=>import("./ecl-lt3qcklx.js"),[])});j({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>U(()=>import("./elixir-cMyUafed.js"),[])});j({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>U(()=>import("./flow9-BI9V6TuS.js"),[])});j({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>U(()=>import("./fsharp-I1kqnt0E.js"),[])});j({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>U(()=>import("./freemarker2-mnCFA3xV.js").then(n=>n.TagAutoInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>U(()=>import("./freemarker2-mnCFA3xV.js").then(n=>n.TagAngleInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>U(()=>import("./freemarker2-mnCFA3xV.js").then(n=>n.TagBracketInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>U(()=>import("./freemarker2-mnCFA3xV.js").then(n=>n.TagAngleInterpolationBracket),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>U(()=>import("./freemarker2-mnCFA3xV.js").then(n=>n.TagBracketInterpolationBracket),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>U(()=>import("./freemarker2-mnCFA3xV.js").then(n=>n.TagAutoInterpolationDollar),__vite__mapDeps([5,1,2,3]))});j({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>U(()=>import("./freemarker2-mnCFA3xV.js").then(n=>n.TagAutoInterpolationBracket),__vite__mapDeps([5,1,2,3]))});j({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>U(()=>import("./go-Cg4qMFVj.js"),[])});j({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>U(()=>import("./graphql-CvtHcP49.js"),[])});j({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>U(()=>import("./handlebars-BUcE6Uyy.js"),__vite__mapDeps([6,1,2,3]))});j({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>U(()=>import("./hcl-BkvCdKNu.js"),[])});j({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>U(()=>import("./html-BBqcfykD.js"),__vite__mapDeps([7,1,2,3]))});j({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>U(()=>import("./ini-CPc8BCWu.js"),[])});j({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>U(()=>import("./java-C9Yie4SH.js"),[])});j({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>U(()=>import("./javascript-CuGq5ydO.js"),__vite__mapDeps([8,9,1,2,3]))});j({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>U(()=>import("./julia--qJGRfN8.js"),[])});j({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>U(()=>import("./kotlin-C3MSe-0N.js"),[])});j({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>U(()=>import("./less-DOBYgWSY.js"),[])});j({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>U(()=>import("./lexon-Djd2rGvJ.js"),[])});j({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>U(()=>import("./lua-Ck8vNcPw.js"),[])});j({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>U(()=>import("./liquid-DXfHmR66.js"),__vite__mapDeps([10,1,2,3]))});j({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>U(()=>import("./m3-a6Kl4TV0.js"),[])});j({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>U(()=>import("./markdown-DkcRBwO0.js"),[])});j({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>U(()=>import("./mdx-QI5o45qz.js"),__vite__mapDeps([11,1,2,3]))});j({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>U(()=>import("./mips-Cc1YVI2p.js"),[])});j({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>U(()=>import("./msdax-Bh41xUoQ.js"),[])});j({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>U(()=>import("./mysql-BZTZMxPa.js"),[])});j({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>U(()=>import("./objective-c-CxZIMOHQ.js"),[])});j({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>U(()=>import("./pascal-I-WmLkmD.js"),[])});j({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>U(()=>import("./pascaligo-DEZ-6bwf.js"),[])});j({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>U(()=>import("./perl-DfeHQJxJ.js"),[])});j({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>U(()=>import("./pgsql-OdOoQYPW.js"),[])});j({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>U(()=>import("./php-CF1bUutw.js"),[])});j({id:"pla",extensions:[".pla"],loader:()=>U(()=>import("./pla-BHZr0GrY.js"),[])});j({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>U(()=>import("./postiats-BSB6a63H.js"),[])});j({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>U(()=>import("./powerquery-Bu0p84Ye.js"),[])});j({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>U(()=>import("./powershell-Dcq3YM6T.js"),[])});j({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>U(()=>import("./protobuf-CsWrQxqX.js"),[])});j({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>U(()=>import("./pug-DLQiv3Bp.js"),[])});j({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>U(()=>import("./python-BvKEpyP9.js"),__vite__mapDeps([12,1,2,3]))});j({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>U(()=>import("./qsharp-D8nrRUNu.js"),[])});j({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>U(()=>import("./r-xhyKpGTk.js"),[])});j({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>U(()=>import("./razor-Ceb9S1Rz.js"),__vite__mapDeps([13,1,2,3]))});j({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>U(()=>import("./redis-BnpkEvbr.js"),[])});j({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>U(()=>import("./redshift-BpxVXjAI.js"),[])});j({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>U(()=>import("./restructuredtext-5afXtW7D.js"),[])});j({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>U(()=>import("./ruby-CHaoWUHT.js"),[])});j({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>U(()=>import("./rust-Bw0WVsLy.js"),[])});j({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>U(()=>import("./sb-CEjXmIyG.js"),[])});j({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>U(()=>import("./scala-BuaCSaU6.js"),[])});j({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>U(()=>import("./scheme-DIKzlmFG.js"),[])});j({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>U(()=>import("./scss-C2_UsWzg.js"),[])});j({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>U(()=>import("./shell-2aEL2EVH.js"),[])});j({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>U(()=>import("./solidity-D-5XfYE1.js"),[])});j({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>U(()=>import("./sophia-s4MFSvUF.js"),[])});j({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>U(()=>import("./sparql-Dkv46wS5.js"),[])});j({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>U(()=>import("./sql-Dz9Xhs8s.js"),[])});j({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>U(()=>import("./st-Cbo0XVmr.js"),[])});j({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>U(()=>import("./swift-B66X97nW.js"),[])});j({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>U(()=>import("./systemverilog-gGKga8Gf.js"),[])});j({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>U(()=>import("./systemverilog-gGKga8Gf.js"),[])});j({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>U(()=>import("./tcl-BtbeJsUN.js"),[])});j({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>U(()=>import("./twig-0_nXiuYs.js"),[])});j({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>U(()=>import("./typescript-Cy_CzC_-.js"),__vite__mapDeps([9,1,2,3]))});j({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>U(()=>import("./typespec-DBO6_WMJ.js"),[])});j({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>U(()=>import("./vb-DFJjBsW2.js"),[])});j({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>U(()=>import("./wgsl-U3RBM2M0.js"),[])});j({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:()=>U(()=>import("./xml-D11j3J2_.js"),__vite__mapDeps([14,1,2,3]))});j({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>U(()=>import("./yaml-D7Z_4mnx.js"),__vite__mapDeps([15,1,2,3]))});var U_=class{constructor(n,e,t){this._onDidChange=new Aa,this._languageId=n,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(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},z_={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}},j_={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},D5=new U_("css",z_,j_),E5=new U_("scss",z_,j_),R5=new U_("less",z_,j_);function q_(){return U(()=>import("./cssMode-G6latsS7.js"),__vite__mapDeps([16,1,2,3,4,17]))}K.onLanguage("less",()=>{q_().then(n=>n.setupMode(R5))});K.onLanguage("scss",()=>{q_().then(n=>n.setupMode(E5))});K.onLanguage("css",()=>{q_().then(n=>n.setupMode(D5))});var T5=class{constructor(n,e,t){this._onDidChange=new Aa,this._languageId=n,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(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},Oh={format:{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"},suggest:{},data:{useDefaultDataProvider:!0}};function Mh(n){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:n===Ea,documentFormattingEdits:n===Ea,documentRangeFormattingEdits:n===Ea}}var Ea="html",dS="handlebars",cS="razor",N5=$_(Ea,Oh,Mh(Ea)),h4=N5.defaults,k5=$_(dS,Oh,Mh(dS)),u4=k5.defaults,P5=$_(cS,Oh,Mh(cS)),g4=P5.defaults;function O5(){return U(()=>import("./htmlMode-D8je66Rk.js"),__vite__mapDeps([18,1,2,3,4,17]))}function $_(n,e=Oh,t=Mh(n)){const i=new T5(n,e,t);let s;const o=K.onLanguage(n,async()=>{s=(await O5()).setupMode(i)});return{defaults:i,dispose(){o.dispose(),s?.dispose(),s=void 0}}}var M5=class{constructor(n,e,t){this._onDidChange=new Aa,this._languageId=n,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(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},A5=new M5("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function F5(){return U(()=>import("./jsonMode-BgdTmYik.js"),__vite__mapDeps([19,1,2,3,4,17]))}K.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});K.onLanguage("json",()=>{F5().then(n=>n.setupMode(A5))});var hS="__monacoFindWidgetTabIndexPatchApplied",Jr="__monacoFindWidgetOriginalTabIndex";function uS(n,e){const t=n?._domNode;if(!t)return;const i=t.querySelectorAll('input, textarea, [tabindex], [role="button"], [role="checkbox"]');for(const s of i)if(s instanceof HTMLElement)if(e){if(!(Jr in s.dataset))continue;const o=s.dataset[Jr];o===""?s.removeAttribute("tabindex"):s.tabIndex=Number(o),delete s.dataset[Jr]}else Jr in s.dataset||(s.dataset[Jr]=s.getAttribute("tabindex")??""),s.tabIndex=-1}if(!Us[hS]){const n=Us.prototype._reveal,e=Us.prototype._hide;Us.prototype._reveal=function(...t){n.apply(this,t),uS(this,!0)},Us.prototype._hide=function(...t){e.apply(this,t),uS(this,!1)},Us[hS]=!0}function H5(n){return new Worker("/assets/editor.worker-BYfbSb3U.js",{name:n?.name})}function W5(n){return new Worker("/assets/json.worker-DI02pyM8.js",{name:n?.name})}self.MonacoEnvironment={getWorker:(n,e)=>e==="json"?new W5:new H5};var V5="db-studio-dark",B5="db-studio-light",gS=!1,p4=()=>{if(gS)return;gS=!0;const n={"editor.background":"#00000000","editorGutter.background":"#00000000","editor.lineHighlightBackground":"#00000000","editorOverviewRuler.background":"#00000000"};bv.defineTheme(V5,{base:"vs-dark",inherit:!0,rules:[],colors:n}),bv.defineTheme(B5,{base:"vs",inherit:!0,rules:[],colors:n})};export{n5 as i,B5 as n,p4 as r,V5 as t};
|